diff --git a/.eslintrc.json b/.eslintrc.json index 4c12eb9b3..25fe733c2 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -84,6 +84,7 @@ "eqeqeq": ["error", "smart"], "guard-for-in": "error", "id-blacklist": "off", + "import/no-duplicates": "error", "import/no-extraneous-dependencies": "off", // imports are handled by simple-import-sort/sort "import/no-internal-modules": "off", // imports are handled by simple-import-sort/sort "import/order": "off", // imports are handled by simple-import-sort/sort diff --git a/.prettierignore b/.prettierignore index b8413739d..f298afef4 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,4 @@ types/ schema.graphql -src/type-policies.ts \ No newline at end of file +*.generated.* +src/graphql/extendedTypes.ts \ No newline at end of file diff --git a/codegen.yml b/codegen.yml index b2528d830..294fb5418 100644 --- a/codegen.yml +++ b/codegen.yml @@ -1,12 +1,53 @@ overwrite: true -schema: ./schema.graphql +schema: ./introspection.json generates: - fragmentTypes.json: + ./src/graphql/fragmentTypes.generated.ts: plugins: + - add: + content: /* eslint-disable */ - fragment-matcher config: minify: false apolloClientVersion: 3 - ./src/type-policies.ts: + ./src/graphql/typePolicies.generated.ts: plugins: + - add: + content: /* eslint-disable */ - typescript-apollo-client-helpers + ./src/graphql/types.generated.ts: + documents: + - ./src/**/queries.ts + - ./src/**/mutations.ts + - ./src/**/fragments/*.ts + - ./src/searches/*.ts + config: + nonOptionalTypename: true + avoidOptionals: + field: true + inputValue: false + object: false + defaultValue: false + namingConvention: + enumValues: change-case-all#upperCase + onlyOperationTypes: true + plugins: + - add: + content: /* eslint-disable */ + - typescript + - typescript-operations + ./src/graphql/hooks.generated.ts: + documents: + - ./src/**/queries.ts + - ./src/**/mutations.ts + - ./src/**/fragments/*.ts + - ./src/searches/*.ts + preset: import-types + presetConfig: + typesPath: ./types.generated + config: + withHooks: true + apolloReactHooksImportFrom: "@saleor/hooks/graphql" + plugins: + - add: + content: /* eslint-disable */ + - typescript-react-apollo diff --git a/fetch-schema.yml b/fetch-schema.yml new file mode 100644 index 000000000..12a5b2b5f --- /dev/null +++ b/fetch-schema.yml @@ -0,0 +1,5 @@ +schema: ${API_URI} +generates: + ./introspection.json: + plugins: + - introspection diff --git a/introspection.json b/introspection.json new file mode 100644 index 000000000..6d1b18ba5 --- /dev/null +++ b/introspection.json @@ -0,0 +1,88121 @@ +{ + "__schema": { + "queryType": { + "name": "Query" + }, + "mutationType": { + "name": "Mutation" + }, + "subscriptionType": null, + "types": [ + { + "kind": "OBJECT", + "name": "AccountAddressCreate", + "description": "Create a new address for the customer.", + "fields": [ + { + "name": "user", + "description": "A user instance for which the address was created.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "address", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Address", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AccountAddressDelete", + "description": "Delete an address of the logged-in user.", + "fields": [ + { + "name": "user", + "description": "A user instance for which the address was deleted.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "address", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Address", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AccountAddressUpdate", + "description": "Updates an address of the logged-in user.", + "fields": [ + { + "name": "user", + "description": "A user object for which the address was edited.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "address", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Address", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AccountDelete", + "description": "Remove user account.", + "fields": [ + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AccountError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AccountErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addressType", + "description": "A type of address that causes the error.", + "args": [], + "type": { + "kind": "ENUM", + "name": "AddressTypeEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "String", + "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AccountErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ACTIVATE_OWN_ACCOUNT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ACTIVATE_SUPERUSER_ACCOUNT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DUPLICATED_INPUT_ITEM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DEACTIVATE_OWN_ACCOUNT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DEACTIVATE_SUPERUSER_ACCOUNT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DELETE_NON_STAFF_USER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DELETE_OWN_ACCOUNT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DELETE_STAFF_ACCOUNT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DELETE_SUPERUSER_ACCOUNT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INACTIVE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID_PASSWORD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LEFT_NOT_MANAGEABLE_PERMISSION", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID_CREDENTIALS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OUT_OF_SCOPE_USER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OUT_OF_SCOPE_GROUP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OUT_OF_SCOPE_PERMISSION", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PASSWORD_ENTIRELY_NUMERIC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PASSWORD_TOO_COMMON", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PASSWORD_TOO_SHORT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PASSWORD_TOO_SIMILAR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "JWT_SIGNATURE_EXPIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "JWT_INVALID_TOKEN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "JWT_DECODE_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "JWT_MISSING_TOKEN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "JWT_INVALID_CSRF_TOKEN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHANNEL_INACTIVE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MISSING_CHANNEL_SLUG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ACCOUNT_NOT_CONFIRMED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AccountInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "firstName", + "description": "Given name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastName", + "description": "Family name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": "User language code.", + "type": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultBillingAddress", + "description": "Billing address of the customer.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultShippingAddress", + "description": "Shipping address of the customer.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AccountRegister", + "description": "Register a new user.", + "fields": [ + { + "name": "requiresConfirmation", + "description": "Informs whether users need to confirm their email address.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "Boolean", + "description": "The `Boolean` scalar type represents `true` or `false`.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AccountRegisterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "firstName", + "description": "Given name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastName", + "description": "Family name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": "User language code.", + "type": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "email", + "description": "The email address of the user.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "password", + "description": "Password.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "redirectUrl", + "description": "Base of frontend URL that will be needed to create confirmation URL.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "User public metadata.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel which will be used to notify users. Optional when only one channel exists.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AccountRequestDeletion", + "description": "Sends an email with the account removal link for the logged-in user.", + "fields": [ + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AccountSetDefaultAddress", + "description": "Sets a default address for the authenticated user.", + "fields": [ + { + "name": "user", + "description": "An updated user instance.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AccountUpdate", + "description": "Updates the account of the logged-in user.", + "fields": [ + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Address", + "description": "Represents user address data.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "firstName", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastName", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "companyName", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "streetAddress1", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "streetAddress2", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "city", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cityArea", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "postalCode", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "country", + "description": "Shop's default country.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CountryDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countryArea", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "phone", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isDefaultShippingAddress", + "description": "Address is user's default shipping address.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isDefaultBillingAddress", + "description": "Address is user's default billing address.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "ID", + "description": "The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"4\"`) or integer (such as `4`) input value will be accepted as an ID.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AddressCreate", + "description": "Creates user address.", + "fields": [ + { + "name": "user", + "description": "A user instance for which the address was created.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "address", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Address", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AddressDelete", + "description": "Deletes an address.", + "fields": [ + { + "name": "user", + "description": "A user instance for which the address was deleted.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "address", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Address", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "firstName", + "description": "Given name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastName", + "description": "Family name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "companyName", + "description": "Company or organization.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "streetAddress1", + "description": "Address.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "streetAddress2", + "description": "Address.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "city", + "description": "City.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cityArea", + "description": "District.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "postalCode", + "description": "Postal code.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "country", + "description": "Country.", + "type": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countryArea", + "description": "State or province.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "phone", + "description": "Phone number.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AddressSetDefault", + "description": "Sets a default address for the given user.", + "fields": [ + { + "name": "user", + "description": "An updated user instance.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AddressTypeEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "BILLING", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHIPPING", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AddressUpdate", + "description": "Updates an address.", + "fields": [ + { + "name": "user", + "description": "A user object for which the address was edited.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "address", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Address", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AddressValidationData", + "description": null, + "fields": [ + { + "name": "countryCode", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countryName", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addressFormat", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addressLatinFormat", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "allowedFields", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "requiredFields", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "upperFields", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countryAreaType", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countryAreaChoices", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ChoiceValue", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cityType", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cityChoices", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ChoiceValue", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cityAreaType", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cityAreaChoices", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ChoiceValue", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "postalCodeType", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "postalCodeMatchers", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "postalCodeExamples", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "postalCodePrefix", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Allocation", + "description": "Represents allocation.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantity", + "description": "Quantity allocated for orders.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "warehouse", + "description": "The warehouse were items were allocated.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Warehouse", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "Int", + "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "App", + "description": "Represents app data.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "permissions", + "description": "List of the app's permissions.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Permission", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "created", + "description": "The date and time when the app was created.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isActive", + "description": "Determine if app will be set active or not.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Name of the app.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "Type of the app.", + "args": [], + "type": { + "kind": "ENUM", + "name": "AppTypeEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tokens", + "description": "Last 4 characters of the tokens.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppToken", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "webhooks", + "description": "List of webhooks assigned to this app.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Webhook", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "aboutApp", + "description": "Description of this app.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "dataPrivacy", + "description": "Description of the data privacy defined for this app.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "dataPrivacyUrl", + "description": "Url to details about the privacy policy on the app owner page.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "homepageUrl", + "description": "Homepage of the app.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "supportUrl", + "description": "Support page for the app.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "configurationUrl", + "description": "Url to iframe with the configuration for the app.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appUrl", + "description": "Url to iframe with the app.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "version", + "description": "Version number of the app.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accessToken", + "description": "JWT token used to authenticate by thridparty app.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "extensions", + "description": "New in Saleor 3.1. App's dashboard extensions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppExtension", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppActivate", + "description": "Activate the app.", + "fields": [ + { + "name": "appErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "app", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "App", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "App", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppCreate", + "description": "Creates a new app.", + "fields": [ + { + "name": "authToken", + "description": "The newly created authentication token.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "app", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "App", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppDeactivate", + "description": "Deactivate the app.", + "fields": [ + { + "name": "appErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "app", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "App", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppDelete", + "description": "Deletes an app.", + "fields": [ + { + "name": "appErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "app", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "App", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppDeleteFailedInstallation", + "description": "Delete failed installation.", + "fields": [ + { + "name": "appErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appInstallation", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "AppInstallation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AppErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "permissions", + "description": "List of permissions which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PermissionEnum", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AppErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "FORBIDDEN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID_STATUS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID_PERMISSION", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID_URL_FORMAT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID_MANIFEST_FORMAT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MANIFEST_URL_CANT_CONNECT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OUT_OF_SCOPE_APP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OUT_OF_SCOPE_PERMISSION", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppExtension", + "description": "Represents app data.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "permissions", + "description": "List of the app extension's permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Permission", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "label", + "description": "Label of the extension to show in the dashboard.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "URL of a view where extension's iframe is placed.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "mount", + "description": "Place where given extension will be mounted.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AppExtensionMountEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "target", + "description": "Type of way how app extension will be opened.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AppExtensionTargetEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "app", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "App", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accessToken", + "description": "JWT token used to authenticate by thridparty app extension.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppExtensionCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppExtensionCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppExtensionCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppExtension", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AppExtensionFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "mount", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AppExtensionMountEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "target", + "description": null, + "type": { + "kind": "ENUM", + "name": "AppExtensionTargetEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AppExtensionMountEnum", + "description": "All places where app extension can be mounted.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "PRODUCT_OVERVIEW_CREATE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_OVERVIEW_MORE_ACTIONS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_DETAILS_MORE_ACTIONS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NAVIGATION_CATALOG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NAVIGATION_ORDERS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NAVIGATION_CUSTOMERS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NAVIGATION_DISCOUNTS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NAVIGATION_TRANSLATIONS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NAVIGATION_PAGES", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AppExtensionTargetEnum", + "description": "All available ways of opening an app extension.\n\n POPUP - app's extension will be mounted as a popup window\n APP_PAGE - redirect to app's page\n ", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "POPUP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "APP_PAGE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppFetchManifest", + "description": "Fetch and validate manifest.", + "fields": [ + { + "name": "manifest", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Manifest", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AppFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isActive", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": null, + "type": { + "kind": "ENUM", + "name": "AppTypeEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AppInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "Name of the app.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "permissions", + "description": "List of permission code names to assign to this app.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PermissionEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppInstall", + "description": "Install new app by using app manifest.", + "fields": [ + { + "name": "appErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appInstallation", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "AppInstallation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AppInstallInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "appName", + "description": "Name of the app to install.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "manifestUrl", + "description": "Url to app's manifest in JSON format.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "activateAfterInstallation", + "description": "Determine if app will be set active or not.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "true", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "permissions", + "description": "List of permission code names to assign to this app.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PermissionEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppInstallation", + "description": "Represents ongoing installation of app.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "status", + "description": "Job status.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "JobStatusEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Created date time of job in ISO 8601 format.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": "Date time of job last update in ISO 8601 format.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "Job message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appName", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "manifestUrl", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Job", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppManifestExtension", + "description": null, + "fields": [ + { + "name": "permissions", + "description": "List of the app extension's permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Permission", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "label", + "description": "Label of the extension to show in the dashboard.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "URL of a view where extension's iframe is placed.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "mount", + "description": "Place where given extension will be mounted.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AppExtensionMountEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "target", + "description": "Type of way how app extension will be opened.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AppExtensionTargetEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppRetryInstall", + "description": "Retry failed installation of new app.", + "fields": [ + { + "name": "appErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appInstallation", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "AppInstallation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AppSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NAME", + "description": "Sort apps by name.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CREATION_DATE", + "description": "Sort apps by creation date.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AppSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort apps by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AppSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppToken", + "description": "Represents token data.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Name of the authenticated token.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "authToken", + "description": "Last 4 characters of the token.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppTokenCreate", + "description": "Creates a new token.", + "fields": [ + { + "name": "authToken", + "description": "The newly created authentication token.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appToken", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "AppToken", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppTokenDelete", + "description": "Deletes an authentication token assigned to app.", + "fields": [ + { + "name": "appErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appToken", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "AppToken", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AppTokenInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "Name of the token.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "app", + "description": "ID of app.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppTokenVerify", + "description": "Verify provided app token.", + "fields": [ + { + "name": "valid", + "description": "Determine if token is valid or not.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AppTypeEnum", + "description": "Enum determining type of your App.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "LOCAL", + "description": "Local Saleor App. The app is fully manageable from dashboard. You can change assigned permissions, add webhooks, or authentication token", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "THIRDPARTY", + "description": "Third party external App. Installation is fully automated. Saleor uses a defined App manifest to gather all required information.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AppUpdate", + "description": "Updates an existing app.", + "fields": [ + { + "name": "appErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "app", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "App", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AreaUnitsEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "SQ_CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SQ_M", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SQ_KM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SQ_FT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SQ_YD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SQ_INCH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AssignNavigation", + "description": "Assigns storefront's navigation menus.", + "fields": [ + { + "name": "menu", + "description": "Assigned navigation menu.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Menu", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AssignedVariantAttribute", + "description": "New in Saleor 3.1. Represents assigned attribute to variant with variant selection attached.", + "fields": [ + { + "name": "attribute", + "description": "Attribute assigned to variant.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Attribute", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantSelection", + "description": "Determines, whether assigned attribute is allowed for variant selection. Supported variant types for variant selection are: ['dropdown', 'boolean', 'swatch', 'numeric']", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Attribute", + "description": "Custom attribute of a product. Attributes can be assigned to products and variants at the product type level.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "inputType", + "description": "The input type to use for entering attribute values in the dashboard.", + "args": [], + "type": { + "kind": "ENUM", + "name": "AttributeInputTypeEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "entityType", + "description": "The entity type which can be used as a reference.", + "args": [], + "type": { + "kind": "ENUM", + "name": "AttributeEntityTypeEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Name of an attribute displayed in the interface.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "Internal representation of an attribute name.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "The attribute type.", + "args": [], + "type": { + "kind": "ENUM", + "name": "AttributeTypeEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "unit", + "description": "The unit of attribute values.", + "args": [], + "type": { + "kind": "ENUM", + "name": "MeasurementUnitsEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "choices", + "description": "List of attribute's values.", + "args": [ + { + "name": "sortBy", + "description": "Sort attribute choices.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AttributeChoicesSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filter", + "description": "Filtering options for attribute choices.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AttributeValueFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AttributeValueCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "valueRequired", + "description": "Whether the attribute requires values to be passed or not.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "visibleInStorefront", + "description": "Whether the attribute should be visible or not in storefront.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filterableInStorefront", + "description": "Whether the attribute can be filtered in storefront.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filterableInDashboard", + "description": "Whether the attribute can be filtered in dashboard.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "availableInGrid", + "description": "Whether the attribute can be displayed in the admin product list.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translation", + "description": "Returns translated attribute fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for attribute.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AttributeTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "storefrontSearchPosition", + "description": "The position of the attribute in the storefront navigation (0 by default).", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "withChoices", + "description": "Flag indicating that attribute has predefined choices.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productTypes", + "description": null, + "args": [ + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductTypeCountableConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariantTypes", + "description": null, + "args": [ + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductTypeCountableConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeBulkDelete", + "description": "Deletes attributes.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AttributeChoicesSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NAME", + "description": "Sort attribute choice by name.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SLUG", + "description": "Sort attribute choice by slug.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AttributeChoicesSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort attribute choices by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AttributeChoicesSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Attribute", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeCreate", + "description": "Creates an attribute.", + "fields": [ + { + "name": "attribute", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Attribute", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AttributeCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "inputType", + "description": "The input type to use for entering attribute values in the dashboard.", + "type": { + "kind": "ENUM", + "name": "AttributeInputTypeEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "entityType", + "description": "The entity type which can be used as a reference.", + "type": { + "kind": "ENUM", + "name": "AttributeEntityTypeEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Name of an attribute displayed in the interface.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "Internal representation of an attribute name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "The attribute type.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AttributeTypeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "unit", + "description": "The unit of attribute values.", + "type": { + "kind": "ENUM", + "name": "MeasurementUnitsEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "values", + "description": "List of attribute's values.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AttributeValueCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "valueRequired", + "description": "Whether the attribute requires values to be passed or not.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isVariantOnly", + "description": "Whether the attribute is for variants only.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "visibleInStorefront", + "description": "Whether the attribute should be visible or not in storefront.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filterableInStorefront", + "description": "Whether the attribute can be filtered in storefront.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filterableInDashboard", + "description": "Whether the attribute can be filtered in dashboard.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "storefrontSearchPosition", + "description": "The position of the attribute in the storefront navigation (0 by default).", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "availableInGrid", + "description": "Whether the attribute can be displayed in the admin product list.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeDelete", + "description": "Deletes an attribute.", + "fields": [ + { + "name": "attributeErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attribute", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Attribute", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AttributeEntityTypeEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "PAGE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AttributeErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AttributeErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ALREADY_EXISTS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AttributeFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "valueRequired", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isVariantOnly", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "visibleInStorefront", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filterableInStorefront", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filterableInDashboard", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "availableInGrid", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ids", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": null, + "type": { + "kind": "ENUM", + "name": "AttributeTypeEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "inCollection", + "description": null, + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "inCategory", + "description": null, + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Specifies the channel by which the data should be filtered. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AttributeInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "slug", + "description": "Internal representation of an attribute name.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "values", + "description": "Internal representation of a value (unique per attribute).", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "valuesRange", + "description": "The range that the returned values should be in.", + "type": { + "kind": "INPUT_OBJECT", + "name": "IntRangeInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "dateTime", + "description": "The date time range that the returned values should be in.", + "type": { + "kind": "INPUT_OBJECT", + "name": "DateTimeRangeInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "date", + "description": "The date range that the returned values should be in.", + "type": { + "kind": "INPUT_OBJECT", + "name": "DateRangeInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "boolean", + "description": "The boolean value of the attribute.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AttributeInputTypeEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "DROPDOWN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MULTISELECT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FILE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REFERENCE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NUMERIC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RICH_TEXT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SWATCH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BOOLEAN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DATE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DATE_TIME", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeReorderValues", + "description": "Reorder the values of an attribute.", + "fields": [ + { + "name": "attribute", + "description": "Attribute from which values are reordered.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Attribute", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AttributeSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NAME", + "description": "Sort attributes by name", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SLUG", + "description": "Sort attributes by slug", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VALUE_REQUIRED", + "description": "Sort attributes by the value required flag", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IS_VARIANT_ONLY", + "description": "Sort attributes by the variant only flag", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VISIBLE_IN_STOREFRONT", + "description": "Sort attributes by visibility in the storefront", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FILTERABLE_IN_STOREFRONT", + "description": "Sort attributes by the filterable in storefront flag", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FILTERABLE_IN_DASHBOARD", + "description": "Sort attributes by the filterable in dashboard flag", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "STOREFRONT_SEARCH_POSITION", + "description": "Sort attributes by their position in storefront", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AVAILABLE_IN_GRID", + "description": "Sort attributes based on whether they can be displayed or not in a product grid.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AttributeSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort attributes by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AttributeSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeTranslatableContent", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translation", + "description": "Returns translated attribute fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for attribute.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AttributeTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attribute", + "description": "Custom attribute of a product.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Attribute", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Get model fields from the root level queries." + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeTranslate", + "description": "Creates/updates translations for an attribute.", + "fields": [ + { + "name": "translationErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attribute", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Attribute", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeTranslation", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "language", + "description": "Translation language.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LanguageDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AttributeTypeEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "PRODUCT_TYPE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAGE_TYPE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeUpdate", + "description": "Updates attribute.", + "fields": [ + { + "name": "attribute", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Attribute", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AttributeUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "Name of an attribute displayed in the interface.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "Internal representation of an attribute name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "unit", + "description": "The unit of attribute values.", + "type": { + "kind": "ENUM", + "name": "MeasurementUnitsEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeValues", + "description": "IDs of values to be removed from this attribute.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addValues", + "description": "New values to be created for this attribute.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AttributeValueUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "valueRequired", + "description": "Whether the attribute requires values to be passed or not.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isVariantOnly", + "description": "Whether the attribute is for variants only.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "visibleInStorefront", + "description": "Whether the attribute should be visible or not in storefront.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filterableInStorefront", + "description": "Whether the attribute can be filtered in storefront.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filterableInDashboard", + "description": "Whether the attribute can be filtered in dashboard.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "storefrontSearchPosition", + "description": "The position of the attribute in the storefront navigation (0 by default).", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "availableInGrid", + "description": "Whether the attribute can be displayed in the admin product list.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeValue", + "description": "Represents a value of an attribute.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Name of a value displayed in the interface.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "Internal representation of a value (unique per attribute).", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "value", + "description": "Represent value of the attribute value (e.g. color values for swatch attributes).", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translation", + "description": "Returns translated attribute value fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for attribute value.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AttributeValueTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "inputType", + "description": "The input type to use for entering attribute values in the dashboard.", + "args": [], + "type": { + "kind": "ENUM", + "name": "AttributeInputTypeEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reference", + "description": "The ID of the attribute reference.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "file", + "description": "Represents file URL and content type (if attribute value is a file).", + "args": [], + "type": { + "kind": "OBJECT", + "name": "File", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "richText", + "description": "Represents the text (JSON) of the attribute value.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "boolean", + "description": "Represents the boolean value of the attribute value.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "date", + "description": "Represents the date value of the attribute value.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "dateTime", + "description": "Represents the date time value of the attribute value.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeValueBulkDelete", + "description": "Deletes values of attributes.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeValueCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeValueCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeValueCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeValue", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeValueCreate", + "description": "Creates a value for an attribute.", + "fields": [ + { + "name": "attribute", + "description": "The updated attribute.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Attribute", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeValue", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "AttributeValue", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AttributeValueCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "value", + "description": "Represent value of the attribute value (e.g. color values for swatch attributes).", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "richText", + "description": "Represents the text (JSON) of the attribute value.", + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fileUrl", + "description": "URL of the file attribute. Every time, a new value is created.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "contentType", + "description": "File content type.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Name of a value displayed in the interface.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeValueDelete", + "description": "Deletes a value of an attribute.", + "fields": [ + { + "name": "attribute", + "description": "The updated attribute.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Attribute", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeValue", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "AttributeValue", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AttributeValueFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AttributeValueInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "id", + "description": "ID of the selected attribute.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "values", + "description": "The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "file", + "description": "URL of the file attribute. Every time, a new value is created.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "contentType", + "description": "File content type.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "references", + "description": "List of entity IDs that will be used as references.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "richText", + "description": "Text content in JSON format.", + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "boolean", + "description": "Represents the boolean value of the attribute value.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "date", + "description": "Represents the date value of the attribute value.", + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "dateTime", + "description": "Represents the date time value of the attribute value.", + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeValueTranslatableContent", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "richText", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translation", + "description": "Returns translated attribute value fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for attribute value.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AttributeValueTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeValue", + "description": "Represents a value of an attribute.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "AttributeValue", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Get model fields from the root level queries." + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeValueTranslate", + "description": "Creates/updates translations for an attribute value.", + "fields": [ + { + "name": "translationErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeValue", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "AttributeValue", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeValueTranslation", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "language", + "description": "Translation language.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LanguageDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "richText", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AttributeValueTranslationInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "richText", + "description": null, + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AttributeValueUpdate", + "description": "Updates value of an attribute.", + "fields": [ + { + "name": "attribute", + "description": "The updated attribute.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Attribute", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeValue", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "AttributeValue", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AttributeValueUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "value", + "description": "Represent value of the attribute value (e.g. color values for swatch attributes).", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "richText", + "description": "Represents the text (JSON) of the attribute value.", + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fileUrl", + "description": "URL of the file attribute. Every time, a new value is created.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "contentType", + "description": "File content type.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Name of a value displayed in the interface.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "BulkAttributeValueInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "id", + "description": "ID of the selected attribute.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "values", + "description": "The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "boolean", + "description": "The boolean value of an attribute to resolve. If the passed value is non-existent, it will be created.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "BulkProductError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ProductErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributes", + "description": "List of attributes IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "values", + "description": "List of attribute values IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "index", + "description": "Index of an input list item that caused the error.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "warehouses", + "description": "List of warehouse IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channels", + "description": "List of channel IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "BulkStockError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ProductErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributes", + "description": "List of attributes IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "values", + "description": "List of attribute values IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "index", + "description": "Index of an input list item that caused the error.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CardInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "code", + "description": "Payment method nonce, a token returned by the appropriate provider's SDK.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cvc", + "description": "Card security code.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "money", + "description": "Information about currency and amount.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CatalogueInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "products", + "description": "Products related to the discount.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "categories", + "description": "Categories related to the discount.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collections", + "description": "Collections related to the discount.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variants", + "description": "New in Saleor 3.1. Product variant related to the discount.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Category", + "description": "Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoTitle", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoDescription", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "parent", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Category", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "level", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "descriptionJson", + "description": "Description of the category (JSON).", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use the `description` field instead." + }, + { + "name": "ancestors", + "description": "List of ancestors of the category.", + "args": [ + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CategoryCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "products", + "description": "List of products in the category.", + "args": [ + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "children", + "description": "List of children of the category.", + "args": [ + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CategoryCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "backgroundImage", + "description": null, + "args": [ + { + "name": "size", + "description": "Size of the image.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Image", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translation", + "description": "Returns translated category fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for category.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CategoryTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CategoryBulkDelete", + "description": "Deletes categories.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CategoryCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CategoryCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CategoryCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Category", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CategoryCreate", + "description": "Creates a new category.", + "fields": [ + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "category", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Category", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CategoryDelete", + "description": "Deletes a category.", + "fields": [ + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "category", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Category", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CategoryFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ids", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CategoryInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "description", + "description": "Category description (JSON).", + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Category name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "Category slug.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seo", + "description": "Search engine optimization fields.", + "type": { + "kind": "INPUT_OBJECT", + "name": "SeoInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "backgroundImage", + "description": "Background image file.", + "type": { + "kind": "SCALAR", + "name": "Upload", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "backgroundImageAlt", + "description": "Alt text for a product media.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "CategorySortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NAME", + "description": "Sort categories by name.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_COUNT", + "description": "Sort categories by product count.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SUBCATEGORY_COUNT", + "description": "Sort categories by subcategory count.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CategorySortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Specifies the channel in which to sort the data. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort categories by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CategorySortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CategoryTranslatableContent", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoTitle", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoDescription", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "descriptionJson", + "description": "Description of the category (JSON).", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use the `description` field instead." + }, + { + "name": "translation", + "description": "Returns translated category fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for category.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CategoryTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "category", + "description": "Represents a single category of products.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Category", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Get model fields from the root level queries." + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CategoryTranslate", + "description": "Creates/updates translations for a category.", + "fields": [ + { + "name": "translationErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "category", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Category", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CategoryTranslation", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "language", + "description": "Translation language.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LanguageDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoTitle", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoDescription", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "descriptionJson", + "description": "Translated description of the product (JSON).", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use the `description` field instead." + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CategoryUpdate", + "description": "Updates a category.", + "fields": [ + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "category", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Category", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Channel", + "description": "Represents channel.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isActive", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "currencyCode", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasOrders", + "description": "Whether a channel has associated orders.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultCountry", + "description": "New in Saleor 3.1. Default country for the channel. Default country can be used in checkout to determine the stock quantities or calculate taxes when the country was not explicitly provided.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CountryDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ChannelActivate", + "description": "Activate a channel.", + "fields": [ + { + "name": "channel", + "description": "Activated channel.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Channel", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channelErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ChannelError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ChannelError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ChannelCreate", + "description": "Creates new channel.", + "fields": [ + { + "name": "channelErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ChannelError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ChannelError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Channel", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ChannelCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "isActive", + "description": "isActive flag.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Name of the channel.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "Slug of the channel.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "currencyCode", + "description": "Currency of the channel.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultCountry", + "description": "New in Saleor 3.1. Default country for the channel. Default country can be used in checkout to determine the stock quantities or calculate taxes when the country was not explicitly provided.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addShippingZones", + "description": "List of shipping zones to assign to the channel.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ChannelDeactivate", + "description": "Deactivate a channel.", + "fields": [ + { + "name": "channel", + "description": "Deactivated channel.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Channel", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channelErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ChannelError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ChannelError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ChannelDelete", + "description": "Delete a channel. Orders associated with the deleted channel will be moved to the target channel. Checkouts, product availability, and pricing will be removed.", + "fields": [ + { + "name": "channelErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ChannelError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ChannelError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Channel", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ChannelDeleteInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "channelId", + "description": "ID of channel to migrate orders from origin channel.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ChannelError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ChannelErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingZones", + "description": "List of shipping zone IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ChannelErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ALREADY_EXISTS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHANNELS_CURRENCY_MUST_BE_THE_SAME", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHANNEL_WITH_ORDERS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DUPLICATED_INPUT_ITEM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ChannelUpdate", + "description": "Update a channel.", + "fields": [ + { + "name": "channelErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ChannelError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ChannelError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Channel", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ChannelUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "isActive", + "description": "isActive flag.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Name of the channel.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "Slug of the channel.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultCountry", + "description": "New in Saleor 3.1. Default country for the channel. Default country can be used in checkout to determine the stock quantities or calculate taxes when the country was not explicitly provided.", + "type": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addShippingZones", + "description": "List of shipping zones to assign to the channel.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeShippingZones", + "description": "List of shipping zones to unassign from the channel.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Checkout", + "description": "Checkout object.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "created", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastChange", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Channel", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "billingAddress", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Address", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingAddress", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Address", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "note", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discount", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountName", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translatedDiscountName", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "voucherCode", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "availableShippingMethods", + "description": "Shipping methods that can be used with this checkout.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingMethod", + "ofType": null + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `shippingMethods` instead." + }, + { + "name": "shippingMethods", + "description": "Shipping methods that can be used with this checkout.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingMethod", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "availableCollectionPoints", + "description": "New in Saleor 3.1. Collection points that can be used for this order.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Warehouse", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "availablePaymentGateways", + "description": "List of available payment gateways.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PaymentGateway", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "email", + "description": "Email of a customer.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCards", + "description": "List of gift cards associated with this checkout.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCard", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isShippingRequired", + "description": "Returns True, if checkout requires shipping.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantity", + "description": "The number of items purchased.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "stockReservationExpires", + "description": "New in Saleor 3.1. Date when oldest stock reservation for this checkout expires or null if no stock is reserved.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lines", + "description": "A list of checkout lines, each containing information about an item in the checkout.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutLine", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingPrice", + "description": "The price of the shipping, with all the taxes included.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingMethod", + "description": "The shipping method related with checkout.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ShippingMethod", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `deliveryMethod` instead." + }, + { + "name": "deliveryMethod", + "description": "New in Saleor 3.1. The delivery method selected for this checkout.", + "args": [], + "type": { + "kind": "UNION", + "name": "DeliveryMethod", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subtotalPrice", + "description": "The price of the checkout before shipping, with taxes included.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "The checkout's token.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalPrice", + "description": "The sum of the the checkout line prices, with all the taxes,shipping costs, and discounts included.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": "Checkout language code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutAddPromoCode", + "description": "Adds a gift card or a voucher to a checkout.", + "fields": [ + { + "name": "checkout", + "description": "The checkout with the added gift card or voucher.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutBillingAddressUpdate", + "description": "Update billing address in the existing checkout.", + "fields": [ + { + "name": "checkout", + "description": "An updated checkout.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutComplete", + "description": "Completes the checkout. As a result a new order is created and a payment charge is made. This action requires a successful payment before it can be performed. In case additional confirmation step as 3D secure is required confirmationNeeded flag will be set to True and no order created until payment is confirmed with second call of this mutation.", + "fields": [ + { + "name": "order", + "description": "Placed order.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "confirmationNeeded", + "description": "Set to true if payment needs to be confirmed before checkout is complete.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "confirmationData", + "description": "Confirmation data used to process additional authorization steps.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutCreate", + "description": "Create a new checkout.", + "fields": [ + { + "name": "created", + "description": "Whether the checkout was created or the current active one was returned. Refer to checkoutLinesAdd and checkoutLinesUpdate to merge a cart with an active checkout.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Always returns `True`." + }, + { + "name": "checkoutErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkout", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CheckoutCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "channel", + "description": "Slug of a channel in which to create a checkout.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lines", + "description": "A list of checkout lines, each containing information about an item in the checkout.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutLineInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "email", + "description": "The customer's email address.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingAddress", + "description": "The mailing address to where the checkout will be shipped. Note: the address will be ignored if the checkout doesn't contain shippable items.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "billingAddress", + "description": "Billing address of the customer.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": "Checkout language code.", + "type": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutCustomerAttach", + "description": "Sets the customer as the owner of the checkout.", + "fields": [ + { + "name": "checkout", + "description": "An updated checkout.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutCustomerDetach", + "description": "Removes the user assigned as the owner of the checkout.", + "fields": [ + { + "name": "checkout", + "description": "An updated checkout.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutDeliveryMethodUpdate", + "description": "New in Saleor 3.1. Updates the delivery method (shipping method or pick up point) of the checkout.", + "fields": [ + { + "name": "checkout", + "description": "An updated checkout.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutEmailUpdate", + "description": "Updates email address in the existing checkout object.", + "fields": [ + { + "name": "checkout", + "description": "An updated checkout.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CheckoutErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variants", + "description": "List of varint IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lines", + "description": "List of line Ids which cause the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addressType", + "description": "A type of address that causes the error.", + "args": [], + "type": { + "kind": "ENUM", + "name": "AddressTypeEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "CheckoutErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "BILLING_ADDRESS_NOT_SET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHECKOUT_NOT_FULLY_PAID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_NOT_PUBLISHED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_UNAVAILABLE_FOR_PURCHASE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INSUFFICIENT_STOCK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID_SHIPPING_METHOD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "QUANTITY_GREATER_THAN_LIMIT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHIPPING_ADDRESS_NOT_SET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHIPPING_METHOD_NOT_APPLICABLE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DELIVERY_METHOD_NOT_APPLICABLE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHIPPING_METHOD_NOT_SET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHIPPING_NOT_REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TAX_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VOUCHER_NOT_APPLICABLE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GIFT_CARD_NOT_APPLICABLE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ZERO_QUANTITY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MISSING_CHANNEL_SLUG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHANNEL_INACTIVE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNAVAILABLE_VARIANT_IN_CHANNEL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EMAIL_NOT_SET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NO_LINES", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CheckoutFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "customer", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "created", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateRangeInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channels", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutLanguageCodeUpdate", + "description": "Update language code in the existing checkout.", + "fields": [ + { + "name": "checkout", + "description": "An updated checkout.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutLine", + "description": "Represents an item in the checkout.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variant", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantity", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalPrice", + "description": "The sum of the checkout line price, taxes and discounts.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "requiresShipping", + "description": "Indicates whether the item need to be delivered.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutLineCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutLineCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutLineCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutLine", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutLineDelete", + "description": "Deletes a CheckoutLine.", + "fields": [ + { + "name": "checkout", + "description": "An updated checkout.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CheckoutLineInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "quantity", + "description": "The number of items purchased.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantId", + "description": "ID of the product variant.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutLinesAdd", + "description": "Adds a checkout line to the existing checkout.If line was already in checkout, its quantity will be increased.", + "fields": [ + { + "name": "checkout", + "description": "An updated checkout.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutLinesDelete", + "description": "Deletes checkout lines.", + "fields": [ + { + "name": "checkout", + "description": "An updated checkout.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutLinesUpdate", + "description": "Updates checkout line in the existing checkout.", + "fields": [ + { + "name": "checkout", + "description": "An updated checkout.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutPaymentCreate", + "description": "Create a new payment for given checkout.", + "fields": [ + { + "name": "checkout", + "description": "Related checkout object.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "payment", + "description": "A newly created payment.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Payment", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PaymentError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PaymentError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutRemovePromoCode", + "description": "Remove a gift card or a voucher from a checkout.", + "fields": [ + { + "name": "checkout", + "description": "The checkout with the removed gift card or voucher.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutShippingAddressUpdate", + "description": "Update shipping address in the existing checkout.", + "fields": [ + { + "name": "checkout", + "description": "An updated checkout.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutShippingMethodUpdate", + "description": "Updates the shipping method of the checkout.", + "fields": [ + { + "name": "checkout", + "description": "An updated checkout.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "CheckoutSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CREATION_DATE", + "description": "Sort checkouts by creation date.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUSTOMER", + "description": "Sort checkouts by customer.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT", + "description": "Sort checkouts by payment.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CheckoutSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort checkouts by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CheckoutSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ChoiceValue", + "description": null, + "fields": [ + { + "name": "raw", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "verbose", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Collection", + "description": "Represents a collection of products.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoTitle", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoDescription", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Channel given to retrieve this collection. Also used by federation gateway to resolve this object in a federated query.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "descriptionJson", + "description": "Description of the collection (JSON).", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use the `description` field instead." + }, + { + "name": "products", + "description": "List of products in this collection.", + "args": [ + { + "name": "filter", + "description": "Filtering options for products.", + "type": { + "kind": "INPUT_OBJECT", + "name": "ProductFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort products.", + "type": { + "kind": "INPUT_OBJECT", + "name": "ProductOrder", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "backgroundImage", + "description": null, + "args": [ + { + "name": "size", + "description": "Size of the image.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Image", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translation", + "description": "Returns translated collection fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for collection.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CollectionTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channelListings", + "description": "List of channels in which the collection is available.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CollectionChannelListing", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CollectionAddProducts", + "description": "Adds products to a collection.", + "fields": [ + { + "name": "collection", + "description": "Collection to which products will be added.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Collection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collectionErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CollectionError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CollectionError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CollectionBulkDelete", + "description": "Deletes collections.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collectionErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CollectionError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CollectionError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CollectionChannelListing", + "description": "Represents collection channel listing.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "publicationDate", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isPublished", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Channel", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CollectionChannelListingError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ProductErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributes", + "description": "List of attributes IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "values", + "description": "List of attribute values IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channels", + "description": "List of channels IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CollectionChannelListingUpdate", + "description": "Manage collection's availability in channels.", + "fields": [ + { + "name": "collection", + "description": "An updated collection instance.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Collection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collectionChannelListingErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CollectionChannelListingError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CollectionChannelListingError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CollectionChannelListingUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "addChannels", + "description": "List of channels to which the collection should be assigned.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "PublishableChannelListingInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeChannels", + "description": "List of channels from which the collection should be unassigned.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CollectionCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CollectionCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CollectionCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Collection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CollectionCreate", + "description": "Creates a new collection.", + "fields": [ + { + "name": "collectionErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CollectionError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CollectionError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collection", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Collection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CollectionCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "isPublished", + "description": "Informs whether a collection is published.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Name of the collection.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "Slug of the collection.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "Description of the collection (JSON).", + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "backgroundImage", + "description": "Background image file.", + "type": { + "kind": "SCALAR", + "name": "Upload", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "backgroundImageAlt", + "description": "Alt text for an image.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seo", + "description": "Search engine optimization fields.", + "type": { + "kind": "INPUT_OBJECT", + "name": "SeoInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "publicationDate", + "description": "Publication date. ISO 8601 standard.", + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "products", + "description": "List of products to be added to the collection.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CollectionDelete", + "description": "Deletes a collection.", + "fields": [ + { + "name": "collectionErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CollectionError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CollectionError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collection", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Collection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CollectionError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "products", + "description": "List of products IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CollectionErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "CollectionErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "DUPLICATED_INPUT_ITEM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CollectionFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "published", + "description": null, + "type": { + "kind": "ENUM", + "name": "CollectionPublished", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ids", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Specifies the channel by which the data should be filtered. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CollectionInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "isPublished", + "description": "Informs whether a collection is published.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Name of the collection.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "Slug of the collection.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "Description of the collection (JSON).", + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "backgroundImage", + "description": "Background image file.", + "type": { + "kind": "SCALAR", + "name": "Upload", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "backgroundImageAlt", + "description": "Alt text for an image.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seo", + "description": "Search engine optimization fields.", + "type": { + "kind": "INPUT_OBJECT", + "name": "SeoInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "publicationDate", + "description": "Publication date. ISO 8601 standard.", + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "CollectionPublished", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "PUBLISHED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HIDDEN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CollectionRemoveProducts", + "description": "Remove products from a collection.", + "fields": [ + { + "name": "collection", + "description": "Collection from which products will be removed.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Collection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collectionErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CollectionError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CollectionError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CollectionReorderProducts", + "description": "Reorder the products of a collection.", + "fields": [ + { + "name": "collection", + "description": "Collection from which products are reordered.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Collection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collectionErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CollectionError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CollectionError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "CollectionSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NAME", + "description": "Sort collections by name.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AVAILABILITY", + "description": "Sort collections by availability.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_COUNT", + "description": "Sort collections by product count.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PUBLICATION_DATE", + "description": "Sort collections by publication date.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CollectionSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Specifies the channel in which to sort the data. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort collections by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CollectionSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CollectionTranslatableContent", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoTitle", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoDescription", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "descriptionJson", + "description": "Description of the collection (JSON).", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use the `description` field instead." + }, + { + "name": "translation", + "description": "Returns translated collection fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for collection.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CollectionTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collection", + "description": "Represents a collection of products.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Collection", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Get model fields from the root level queries." + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CollectionTranslate", + "description": "Creates/updates translations for a collection.", + "fields": [ + { + "name": "translationErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collection", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Collection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CollectionTranslation", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "language", + "description": "Translation language.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LanguageDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoTitle", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoDescription", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "descriptionJson", + "description": "Translated description of the product (JSON).", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use the `description` field instead." + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CollectionUpdate", + "description": "Updates a collection.", + "fields": [ + { + "name": "collectionErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CollectionError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CollectionError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collection", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Collection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ConfigurationItem", + "description": "Stores information about a single configuration field.", + "fields": [ + { + "name": "name", + "description": "Name of the field.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "value", + "description": "Current value of the field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "Type of the field.", + "args": [], + "type": { + "kind": "ENUM", + "name": "ConfigurationTypeFieldEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "helpText", + "description": "Help text for the field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "label", + "description": "Label for the field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ConfigurationItemInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "Name of the field to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "value", + "description": "Value of the given field to update.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ConfigurationTypeFieldEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "STRING", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MULTILINE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BOOLEAN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SECRET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PASSWORD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SECRETMULTILINE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OUTPUT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ConfirmAccount", + "description": "Confirm user account with token sent by email during registration.", + "fields": [ + { + "name": "user", + "description": "An activated user account.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ConfirmEmailChange", + "description": "Confirm the email change of the logged-in user.", + "fields": [ + { + "name": "user", + "description": "A user instance with a new email.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "CountryCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "AF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AX", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AQ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BJ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BQ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BV", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CV", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CX", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DJ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SV", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GQ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FJ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IQ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "JM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "JP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "JE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "JO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LV", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MV", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ML", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MQ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "YT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MX", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ME", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "QA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "WS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ST", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SX", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ZA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SJ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TJ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TV", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "US", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "WF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "YE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ZM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ZW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CountryDisplay", + "description": null, + "fields": [ + { + "name": "code", + "description": "Country code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "country", + "description": "Country name.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "vat", + "description": "Country tax.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "VAT", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CountryFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "attachedToShippingZones", + "description": "Boolean for filtering countries by having shipping zone assigned.If 'true', return countries with shipping zone assigned.If 'false', return countries without any shipping zone assigned.If the argument is not provided (null), return all countries.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CreateToken", + "description": "Create JWT token.", + "fields": [ + { + "name": "token", + "description": "JWT token, required to authenticate.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "refreshToken", + "description": "JWT refresh token, required to re-generate access token.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "csrfToken", + "description": "CSRF token required to re-generate access token.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": "A user instance.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CreditCard", + "description": null, + "fields": [ + { + "name": "brand", + "description": "Card brand.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "firstDigits", + "description": "First 4 digits of the card number.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastDigits", + "description": "Last 4 digits of the card number.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "expMonth", + "description": "Two-digit number representing the card’s expiration month.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "expYear", + "description": "Four-digit number representing the card’s expiration year.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CustomerBulkDelete", + "description": "Deletes customers.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CustomerCreate", + "description": "Creates a new customer.", + "fields": [ + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CustomerDelete", + "description": "Deletes a customer.", + "fields": [ + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CustomerEvent", + "description": "History log of the customer.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "date", + "description": "Date when event happened at in ISO 8601 format.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "Customer event type.", + "args": [], + "type": { + "kind": "ENUM", + "name": "CustomerEventsEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": "User who performed the action.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "app", + "description": "App that performed the action.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "App", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "Content of the event.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "count", + "description": "Number of objects concerned by the event.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "order", + "description": "The concerned order.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderLine", + "description": "The concerned order line.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "OrderLine", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "CustomerEventsEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ACCOUNT_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PASSWORD_RESET_LINK_SENT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PASSWORD_RESET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EMAIL_CHANGED_REQUEST", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PASSWORD_CHANGED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EMAIL_CHANGED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PLACED_ORDER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOTE_ADDED_TO_ORDER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DIGITAL_LINK_DOWNLOADED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUSTOMER_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NAME_ASSIGNED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EMAIL_ASSIGNED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOTE_ADDED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CustomerFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "dateJoined", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateRangeInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "numberOfOrders", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IntRangeInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "placedOrders", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateRangeInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CustomerInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "defaultBillingAddress", + "description": "Billing address of the customer.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultShippingAddress", + "description": "Shipping address of the customer.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "firstName", + "description": "Given name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastName", + "description": "Family name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "email", + "description": "The unique email address of the user.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isActive", + "description": "User account is active.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "note", + "description": "A note about the user.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": "User language code.", + "type": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CustomerUpdate", + "description": "Updates an existing customer.", + "fields": [ + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "Date", + "description": "The `Date` scalar type represents a Date\nvalue as specified by\n[iso8601](https://en.wikipedia.org/wiki/ISO_8601).", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "DateRangeInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "gte", + "description": "Start date.", + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lte", + "description": "End date.", + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "DateTime", + "description": "The `DateTime` scalar type represents a DateTime\nvalue as specified by\n[iso8601](https://en.wikipedia.org/wiki/ISO_8601).", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "DateTimeRangeInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "gte", + "description": "Start date.", + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lte", + "description": "End date.", + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeactivateAllUserTokens", + "description": "Deactivate all JWT tokens of the currently authenticated user.", + "fields": [ + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeleteMetadata", + "description": "Delete metadata of an object.", + "fields": [ + { + "name": "metadataErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "item", + "description": null, + "args": [], + "type": { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeletePrivateMetadata", + "description": "Delete object's private metadata.", + "fields": [ + { + "name": "metadataErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "item", + "description": null, + "args": [], + "type": { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "UNION", + "name": "DeliveryMethod", + "description": "Represents a delivery method chosen for the checkout. `Warehouse` type is used when checkout is marked as \"click and collect\" and `ShippingMethod` otherwise.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Warehouse", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ShippingMethod", + "ofType": null + } + ] + }, + { + "kind": "OBJECT", + "name": "DigitalContent", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "useDefaultSettings", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "automaticFulfillment", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "contentFile", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "maxDownloads", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "urlValidDays", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "urls", + "description": "List of URLs for the digital variant.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DigitalContentUrl", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariant", + "description": "Product variant assigned to digital content.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DigitalContentCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DigitalContentCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DigitalContentCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DigitalContent", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DigitalContentCreate", + "description": "Create new digital content. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec", + "fields": [ + { + "name": "variant", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "content", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "DigitalContent", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DigitalContentDelete", + "description": "Remove digital content assigned to given variant.", + "fields": [ + { + "name": "variant", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "DigitalContentInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "useDefaultSettings", + "description": "Use default digital content settings for this product.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "maxDownloads", + "description": "Determines how many times a download link can be accessed by a customer.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "urlValidDays", + "description": "Determines for how many days a download link is active since it was generated.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "automaticFulfillment", + "description": "Overwrite default automatic_fulfillment setting for variant.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DigitalContentUpdate", + "description": "Update digital content.", + "fields": [ + { + "name": "variant", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "content", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "DigitalContent", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "DigitalContentUploadInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "useDefaultSettings", + "description": "Use default digital content settings for this product.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "maxDownloads", + "description": "Determines how many times a download link can be accessed by a customer.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "urlValidDays", + "description": "Determines for how many days a download link is active since it was generated.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "automaticFulfillment", + "description": "Overwrite default automatic_fulfillment setting for variant.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "contentFile", + "description": "Represents an file in a multipart request.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Upload", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DigitalContentUrl", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "content", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DigitalContent", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "created", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "downloadNum", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "URL for digital content.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "UUID of digital content.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DigitalContentUrlCreate", + "description": "Generate new URL to digital content.", + "fields": [ + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "digitalContentUrl", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "DigitalContentUrl", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "DigitalContentUrlCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "content", + "description": "Digital content ID which URL will belong to.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DiscountError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "products", + "description": "List of products IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "DiscountErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channels", + "description": "List of channels IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "DiscountErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ALREADY_EXISTS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DUPLICATED_INPUT_ITEM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "DiscountStatusEnum", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ACTIVE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EXPIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SCHEDULED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "DiscountValueTypeEnum", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "FIXED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PERCENTAGE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "DistanceUnitsEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "M", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "YD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INCH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Domain", + "description": "Represents shop's domain.", + "fields": [ + { + "name": "host", + "description": "The host name of the domain.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sslEnabled", + "description": "Inform if SSL is enabled.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "Shop's absolute URL.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DraftOrderBulkDelete", + "description": "Deletes draft orders.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DraftOrderComplete", + "description": "Completes creating an order.", + "fields": [ + { + "name": "order", + "description": "Completed order.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DraftOrderCreate", + "description": "Creates a new draft order.", + "fields": [ + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "order", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "DraftOrderCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "billingAddress", + "description": "Billing address of the customer.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": "Customer associated with the draft order.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "userEmail", + "description": "Email address of the customer.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discount", + "description": "Discount amount for the order.", + "type": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingAddress", + "description": "Shipping address of the customer.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingMethod", + "description": "ID of a selected shipping method.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "voucher", + "description": "ID of the voucher associated with the order.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "customerNote", + "description": "A note from a customer. Visible by customers in the order summary.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channelId", + "description": "ID of the channel associated with the order.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "redirectUrl", + "description": "URL of a view where users should be redirected to see the order details. URL in RFC 1808 format.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lines", + "description": "Variant line input consisting of variant ID and quantity of products.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderLineCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DraftOrderDelete", + "description": "Deletes a draft order.", + "fields": [ + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "order", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "DraftOrderInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "billingAddress", + "description": "Billing address of the customer.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": "Customer associated with the draft order.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "userEmail", + "description": "Email address of the customer.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discount", + "description": "Discount amount for the order.", + "type": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingAddress", + "description": "Shipping address of the customer.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingMethod", + "description": "ID of a selected shipping method.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "voucher", + "description": "ID of the voucher associated with the order.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "customerNote", + "description": "A note from a customer. Visible by customers in the order summary.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channelId", + "description": "ID of the channel associated with the order.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "redirectUrl", + "description": "URL of a view where users should be redirected to see the order details. URL in RFC 1808 format.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DraftOrderLinesBulkDelete", + "description": "Deletes order lines.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DraftOrderUpdate", + "description": "Updates a draft order.", + "fields": [ + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "order", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "EventDelivery", + "description": "Event delivery.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "status", + "description": "Event delivery status.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "EventDeliveryStatusEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "eventType", + "description": "Webhook event type.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "WebhookEventTypeEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attempts", + "description": "Event delivery attempts.", + "args": [ + { + "name": "sortBy", + "description": "Event delivery sorter", + "type": { + "kind": "INPUT_OBJECT", + "name": "EventDeliveryAttemptSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "EventDeliveryAttemptCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "payload", + "description": "Event payload.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "EventDeliveryAttempt", + "description": "Event delivery attempts.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Event delivery creation date and time.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taskId", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "duration", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "response", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "responseHeaders", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "requestHeaders", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "status", + "description": "Event delivery status.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "EventDeliveryStatusEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "Float", + "description": "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "EventDeliveryAttemptCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EventDeliveryAttemptCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "EventDeliveryAttemptCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EventDeliveryAttempt", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "EventDeliveryAttemptSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CREATED_AT", + "description": "Sort event delivery attempts by created at.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "EventDeliveryAttemptSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort attempts by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "EventDeliveryAttemptSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "EventDeliveryCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EventDeliveryCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "EventDeliveryCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EventDelivery", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "EventDeliveryFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "status", + "description": null, + "type": { + "kind": "ENUM", + "name": "EventDeliveryStatusEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "eventType", + "description": null, + "type": { + "kind": "ENUM", + "name": "WebhookEventTypeEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "EventDeliveryRetry", + "description": "Retries event delivery.", + "fields": [ + { + "name": "delivery", + "description": "Event delivery.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "EventDelivery", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WebhookError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "EventDeliverySortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CREATED_AT", + "description": "Sort event deliveries by created at.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "EventDeliverySortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort deliveries by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "EventDeliverySortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "EventDeliveryStatusEnum", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "PENDING", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SUCCESS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FAILED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExportError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ExportErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ExportErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExportEvent", + "description": "History log of export file.", + "fields": [ + { + "name": "id", + "description": "The ID of the object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "date", + "description": "Date when event happened at in ISO 8601 format.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "Export event type.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ExportEventsEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": "User who performed the action.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "app", + "description": "App which performed the action.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "App", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "Content of the event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ExportEventsEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "EXPORT_PENDING", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EXPORT_SUCCESS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EXPORT_FAILED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EXPORT_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EXPORTED_FILE_SENT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EXPORT_FAILED_INFO_SENT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExportFile", + "description": "Represents a job data of exported file.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "status", + "description": "Job status.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "JobStatusEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Created date time of job in ISO 8601 format.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": "Date time of job last update in ISO 8601 format.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "Job message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "The URL of field to download.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "events", + "description": "List of events associated with the export.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ExportEvent", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "app", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "App", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Job", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExportFileCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ExportFileCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExportFileCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ExportFile", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ExportFileFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "createdAt", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateTimeRangeInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateTimeRangeInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "status", + "description": null, + "type": { + "kind": "ENUM", + "name": "JobStatusEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "app", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ExportFileSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "STATUS", + "description": "Sort export file by status.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CREATED_AT", + "description": "Sort export file by created at.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UPDATED_AT", + "description": "Sort export file by updated at.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ExportFileSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort export file by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ExportFileSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExportGiftCards", + "description": "New in Saleor 3.1. Export gift cards to csv file.", + "fields": [ + { + "name": "exportFile", + "description": "The newly created export file job which is responsible for export data.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ExportFile", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ExportError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ExportGiftCardsInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "scope", + "description": "Determine which gift cards should be exported.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ExportScope", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filter", + "description": "Filtering options for gift cards.", + "type": { + "kind": "INPUT_OBJECT", + "name": "GiftCardFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ids", + "description": "List of gift cards IDs to export.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fileType", + "description": "Type of exported file.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "FileTypesEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ExportInfoInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "attributes", + "description": "List of attribute ids witch should be exported.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "warehouses", + "description": "List of warehouse ids witch should be exported.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channels", + "description": "List of channels ids which should be exported.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fields", + "description": "List of product fields witch should be exported.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ProductFieldEnum", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExportProducts", + "description": "Export products to csv file.", + "fields": [ + { + "name": "exportFile", + "description": "The newly created export file job which is responsible for export data.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ExportFile", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "exportErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ExportError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ExportError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ExportProductsInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "scope", + "description": "Determine which products should be exported.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ExportScope", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filter", + "description": "Filtering options for products.", + "type": { + "kind": "INPUT_OBJECT", + "name": "ProductFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ids", + "description": "List of products IDs to export.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "exportInfo", + "description": "Input with info about fields which should be exported.", + "type": { + "kind": "INPUT_OBJECT", + "name": "ExportInfoInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fileType", + "description": "Type of exported file.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "FileTypesEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ExportScope", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ALL", + "description": "Export all products.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IDS", + "description": "Export products with given ids.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FILTER", + "description": "Export the filtered products.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExternalAuthentication", + "description": null, + "fields": [ + { + "name": "id", + "description": "ID of external authentication plugin.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Name of external authentication plugin.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExternalAuthenticationUrl", + "description": "Prepare external authentication url for user by custom plugin.", + "fields": [ + { + "name": "authenticationData", + "description": "The data returned by authentication plugin.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExternalLogout", + "description": "Logout user by custom plugin.", + "fields": [ + { + "name": "logoutData", + "description": "The data returned by authentication plugin.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExternalNotificationError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ExternalNotificationErrorCodes", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ExternalNotificationErrorCodes", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID_MODEL_TYPE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHANNEL_INACTIVE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExternalNotificationTrigger", + "description": "New in Saleor 3.1. Trigger sending a notification with the notify plugin method. Serializes nodes provided as ids parameter and includes this data in the notification payload.", + "fields": [ + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ExternalNotificationError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ExternalNotificationTriggerInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "ids", + "description": "The list of customers or orders node IDs that will be serialized and included in the notification payload.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "extraPayload", + "description": "Additional payload that will be merged with the one based on the bussines object ID.", + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "externalEventType", + "description": "External event type. This field is passed to a plugin as an event type.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExternalObtainAccessTokens", + "description": "Obtain external access tokens for user by custom plugin.", + "fields": [ + { + "name": "token", + "description": "The token, required to authenticate.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "refreshToken", + "description": "The refresh token, required to re-generate external access token.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "csrfToken", + "description": "CSRF token required to re-generate external access token.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": "A user instance.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExternalRefresh", + "description": "Refresh user's access by custom plugin.", + "fields": [ + { + "name": "token", + "description": "The token, required to authenticate.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "refreshToken", + "description": "The refresh token, required to re-generate external access token.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "csrfToken", + "description": "CSRF token required to re-generate external access token.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": "A user instance.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExternalVerify", + "description": "Verify external authentication data by plugin.", + "fields": [ + { + "name": "user", + "description": "User assigned to data.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isValid", + "description": "Determine if authentication data is valid or not.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "verifyData", + "description": "External data.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "File", + "description": null, + "fields": [ + { + "name": "url", + "description": "The URL of the file.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "contentType", + "description": "Content type of the file.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "FileTypesEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CSV", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "XLSX", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "FileUpload", + "description": "Upload a file. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec", + "fields": [ + { + "name": "uploadedFile", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "File", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "uploadErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "UploadError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "UploadError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Fulfillment", + "description": "Represents order fulfillment.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fulfillmentOrder", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "status", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "FulfillmentStatus", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "trackingNumber", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "created", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lines", + "description": "List of lines for the fulfillment.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "FulfillmentLine", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "statusDisplay", + "description": "User-friendly fulfillment status.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "warehouse", + "description": "Warehouse from fulfillment was fulfilled.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Warehouse", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "FulfillmentApprove", + "description": "New in Saleor 3.1. Approve existing fulfillment.", + "fields": [ + { + "name": "fulfillment", + "description": "An approved fulfillment.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Fulfillment", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "order", + "description": "Order which fulfillment was approved.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "FulfillmentCancel", + "description": "Cancels existing fulfillment and optionally restocks items.", + "fields": [ + { + "name": "fulfillment", + "description": "A canceled fulfillment.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Fulfillment", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "order", + "description": "Order which fulfillment was cancelled.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "FulfillmentCancelInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "warehouseId", + "description": "ID of a warehouse where items will be restocked. Optional when fulfillment is in WAITING_FOR_APPROVAL state.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "FulfillmentLine", + "description": "Represents line of the fulfillment.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantity", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderLine", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "OrderLine", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "FulfillmentRefundProducts", + "description": "Refund products.", + "fields": [ + { + "name": "fulfillment", + "description": "A refunded fulfillment.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Fulfillment", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "order", + "description": "Order which fulfillment was refunded.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "FulfillmentReturnProducts", + "description": "Return products.", + "fields": [ + { + "name": "returnFulfillment", + "description": "A return fulfillment.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Fulfillment", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "replaceFulfillment", + "description": "A replace fulfillment.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Fulfillment", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "order", + "description": "Order which fulfillment was returned.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "replaceOrder", + "description": "A draft order which was created for products with replace flag.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "FulfillmentStatus", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "FULFILLED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REFUNDED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RETURNED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REPLACED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REFUNDED_AND_RETURNED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CANCELED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "WAITING_FOR_APPROVAL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "FulfillmentUpdateTracking", + "description": "Updates a fulfillment for an order.", + "fields": [ + { + "name": "fulfillment", + "description": "A fulfillment with updated tracking.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Fulfillment", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "order", + "description": "Order for which fulfillment was updated.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "FulfillmentUpdateTrackingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "trackingNumber", + "description": "Fulfillment tracking number.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "notifyCustomer", + "description": "If true, send an email notification to the customer.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false", + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GatewayConfigLine", + "description": "Payment gateway client configuration key and value pair.", + "fields": [ + { + "name": "field", + "description": "Gateway config key.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "value", + "description": "Gateway config value for key.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "GenericScalar", + "description": "The `GenericScalar` scalar type represents a generic\nGraphQL scalar value that could be:\nString, Boolean, Int, Float, List or Object.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCard", + "description": "A gift card is a prepaid electronic payment card accepted in stores. They can be used during checkout by providing a valid gift card codes.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "displayCode", + "description": "Code in format which allows displaying in a user interface.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last4CodeChars", + "description": "Last 4 characters of gift card code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "Gift card code. Can be fetched by staff member with manage gift card permission when gift card wasn't used yet and by the gift card owner.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "created", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdBy", + "description": "New in Saleor 3.1. The user who bought or issued a gift card.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "usedBy", + "description": "New in Saleor 3.1. The customer who used a gift card.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdByEmail", + "description": "New in Saleor 3.1. Email address of the user who bought or issued gift card.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "usedByEmail", + "description": "New in Saleor 3.1. Email address of the customer who used a gift card.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastUsedOn", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "expiryDate", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "app", + "description": "New in Saleor 3.1. App which created the gift card.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "App", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "product", + "description": "New in Saleor 3.1. Related gift card product.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Product", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "events", + "description": "New in Saleor 3.1. List of events associated with the gift card.", + "args": [ + { + "name": "filter", + "description": "Filtering options for gift card events.", + "type": { + "kind": "INPUT_OBJECT", + "name": "GiftCardEventFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardEvent", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tags", + "description": "New in Saleor 3.1. The gift card tag.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardTag", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "boughtInChannel", + "description": "{ADDED_IN_31} Slug of the channel where the gift card was bought.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isActive", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "initialBalance", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "currentBalance", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": "The customer who bought a gift card.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `createdBy` field instead." + }, + { + "name": "endDate", + "description": "End date of gift card.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `expiryDate` field instead." + }, + { + "name": "startDate", + "description": "Start date of gift card.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0." + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardActivate", + "description": "Activate a gift card.", + "fields": [ + { + "name": "giftCard", + "description": "Activated gift card.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "GiftCard", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCardErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardAddNote", + "description": "New in Saleor 3.1. Adds note to the gift card.", + "fields": [ + { + "name": "giftCard", + "description": "Gift card with the note added.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "GiftCard", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "event", + "description": "Gift card note created.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "GiftCardEvent", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "GiftCardAddNoteInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "message", + "description": "Note message.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardBulkActivate", + "description": "New in Saleor 3.1. Activate gift cards.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardBulkCreate", + "description": "New in Saleor 3.1. Create gift cards.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCards", + "description": "List of created gift cards.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCard", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "GiftCardBulkCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "count", + "description": "The number of cards to issue.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "balance", + "description": "Balance of the gift card.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "PriceInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tags", + "description": "The gift card tags.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "expiryDate", + "description": "The gift card expiry date.", + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isActive", + "description": "Determine if gift card is active.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardBulkDeactivate", + "description": "New in Saleor 3.1. Deactivate gift cards.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardBulkDelete", + "description": "New in Saleor 3.1. Delete gift cards.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCard", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardCreate", + "description": "Creates a new gift card.", + "fields": [ + { + "name": "giftCardErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCard", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "GiftCard", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "GiftCardCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "addTags", + "description": "New in Saleor 3.1. The gift card tags to add.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "expiryDate", + "description": "New in Saleor 3.1. The gift card expiry date.", + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "startDate", + "description": "Start date of the gift card in ISO 8601 format. \n\nDEPRECATED: this field will be removed in Saleor 4.0.", + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "endDate", + "description": "End date of the gift card in ISO 8601 format. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use `expiryDate` from `expirySettings` instead.", + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "balance", + "description": "Balance of the gift card.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "PriceInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "userEmail", + "description": "Email of the customer to whom gift card will be sent.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "New in Saleor 3.1. Slug of a channel from which the email should be sent.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isActive", + "description": "New in Saleor 3.1. Determine if gift card is active.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "Code to use the gift card. \n\nDEPRECATED: this field will be removed in Saleor 4.0. The code is now auto generated.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "note", + "description": "New in Saleor 3.1. The gift card note from the staff member.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardDeactivate", + "description": "Deactivate a gift card.", + "fields": [ + { + "name": "giftCard", + "description": "Deactivated gift card.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "GiftCard", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCardErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardDelete", + "description": "New in Saleor 3.1. Delete gift card.", + "fields": [ + { + "name": "giftCardErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCard", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "GiftCard", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "GiftCardErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tags", + "description": "List of tag values that cause the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "GiftCardErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ALREADY_EXISTS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EXPIRED_GIFT_CARD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DUPLICATED_INPUT_ITEM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardEvent", + "description": "New in Saleor 3.1. History log of the gift card.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "date", + "description": "Date when event happened at in ISO 8601 format.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "Gift card event type.", + "args": [], + "type": { + "kind": "ENUM", + "name": "GiftCardEventsEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": "User who performed the action.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "app", + "description": "App that performed the action.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "App", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "Content of the event.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "email", + "description": "Email of the customer.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderId", + "description": "The order ID where gift card was used or bought.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderNumber", + "description": "User-friendly number of an order where gift card was used or bought.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tags", + "description": "The list of gift card tags.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "oldTags", + "description": "The list of old gift card tags.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "balance", + "description": "The gift card balance.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "GiftCardEventBalance", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "expiryDate", + "description": "The gift card expiry date.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "oldExpiryDate", + "description": "Previous gift card expiry date.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardEventBalance", + "description": null, + "fields": [ + { + "name": "initialBalance", + "description": "Initial balance of the gift card.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "currentBalance", + "description": "Current balance of the gift card.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "oldInitialBalance", + "description": "Previous initial balance of the gift card.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "oldCurrentBalance", + "description": "Previous current balance of the gift card.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "GiftCardEventFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "type", + "description": null, + "type": { + "kind": "ENUM", + "name": "GiftCardEventsEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orders", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "GiftCardEventsEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ISSUED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BOUGHT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ACTIVATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DEACTIVATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BALANCE_RESET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EXPIRY_DATE_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TAGS_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SENT_TO_CUSTOMER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RESENT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOTE_ADDED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "USED_IN_ORDER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "GiftCardFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "isActive", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tags", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "products", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "usedBy", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "used", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "currency", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "currentBalance", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "PriceRangeInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "initialBalance", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "PriceRangeInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardResend", + "description": "New in Saleor 3.1. Resend a gift card.", + "fields": [ + { + "name": "giftCard", + "description": "Gift card which has been sent.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "GiftCard", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "GiftCardResendInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "id", + "description": "ID of a gift card to resend.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "email", + "description": "Email to which gift card should be send.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel from which the email should be sent.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardSettings", + "description": "Gift card related settings from site settings.", + "fields": [ + { + "name": "expiryType", + "description": "The gift card expiry type settings.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "GiftCardSettingsExpiryTypeEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "expiryPeriod", + "description": "The gift card expiry period settings.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TimePeriod", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardSettingsError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "GiftCardSettingsErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "GiftCardSettingsErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "GiftCardSettingsExpiryTypeEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NEVER_EXPIRE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EXPIRY_PERIOD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardSettingsUpdate", + "description": "Update gift card settings.", + "fields": [ + { + "name": "giftCardSettings", + "description": "Gift card settings.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "GiftCardSettings", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardSettingsError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "GiftCardSettingsUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "expiryType", + "description": "Defines gift card default expiry settings.", + "type": { + "kind": "ENUM", + "name": "GiftCardSettingsExpiryTypeEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "expiryPeriod", + "description": "Defines gift card expiry period.", + "type": { + "kind": "INPUT_OBJECT", + "name": "TimePeriodInputType", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "GiftCardSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "PRODUCT", + "description": "Sort orders by product.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "USED_BY", + "description": "Sort orders by used by.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CURRENT_BALANCE", + "description": "Sort orders by current balance.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "GiftCardSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort gift cards by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "GiftCardSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardTag", + "description": "New in Saleor 3.1. The gift card tag.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardTagCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardTagCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardTagCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardTag", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "GiftCardTagFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GiftCardUpdate", + "description": "Update a gift card.", + "fields": [ + { + "name": "giftCardErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCard", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "GiftCard", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "GiftCardUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "addTags", + "description": "New in Saleor 3.1. The gift card tags to add.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "expiryDate", + "description": "New in Saleor 3.1. The gift card expiry date.", + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "startDate", + "description": "Start date of the gift card in ISO 8601 format. \n\nDEPRECATED: this field will be removed in Saleor 4.0.", + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "endDate", + "description": "End date of the gift card in ISO 8601 format. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use `expiryDate` from `expirySettings` instead.", + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeTags", + "description": "New in Saleor 3.1. The gift card tags to remove.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "balanceAmount", + "description": "New in Saleor 3.1. The gift card balance amount.", + "type": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Group", + "description": "Represents permission group data.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "users", + "description": "List of group users", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "permissions", + "description": "List of group permissions", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Permission", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "userCanManage", + "description": "True, if the currently authenticated user has rights to manage a group.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GroupCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GroupCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GroupCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Group", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Image", + "description": "Represents an image.", + "fields": [ + { + "name": "url", + "description": "The URL of the image.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "alt", + "description": "Alt text for an image.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "IntRangeInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "gte", + "description": "Value greater than or equal to.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lte", + "description": "Value less than or equal to.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Invoice", + "description": "Represents an Invoice.", + "fields": [ + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "status", + "description": "Job status.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "JobStatusEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": "The ID of the object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "number", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "externalUrl", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "URL to download an invoice.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Job", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "InvoiceCreate", + "description": "Creates a ready to send invoice.", + "fields": [ + { + "name": "invoiceErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "InvoiceError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "InvoiceError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "invoice", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Invoice", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "InvoiceCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "number", + "description": "Invoice number.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "URL of an invoice to download.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "InvoiceDelete", + "description": "Deletes an invoice.", + "fields": [ + { + "name": "invoiceErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "InvoiceError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "InvoiceError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "invoice", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Invoice", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "InvoiceError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "InvoiceErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "InvoiceErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_READY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "URL_NOT_SET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EMAIL_NOT_SET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NUMBER_NOT_SET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID_STATUS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NO_INVOICE_PLUGIN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "InvoiceRequest", + "description": "Request an invoice for the order using plugin.", + "fields": [ + { + "name": "order", + "description": "Order related to an invoice.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "invoiceErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "InvoiceError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "InvoiceError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "invoice", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Invoice", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "InvoiceRequestDelete", + "description": "Requests deletion of an invoice.", + "fields": [ + { + "name": "invoiceErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "InvoiceError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "InvoiceError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "invoice", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Invoice", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "InvoiceSendNotification", + "description": "Send an invoice notification to the customer.", + "fields": [ + { + "name": "invoiceErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "InvoiceError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "InvoiceError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "invoice", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Invoice", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "InvoiceUpdate", + "description": "Updates an invoice.", + "fields": [ + { + "name": "invoiceErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "InvoiceError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "InvoiceError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "invoice", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Invoice", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "JSONString", + "description": "Allows use of a JSON String for input / output from the GraphQL schema.\n\nUse of this type is *not recommended* as you lose the benefits of having a defined, static\nschema (one of the key benefits of GraphQL).", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INTERFACE", + "name": "Job", + "description": null, + "fields": [ + { + "name": "status", + "description": "Job status.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "JobStatusEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Created date time of job in ISO 8601 format.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": "Date time of job last update in ISO 8601 format.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "Job message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "AppInstallation", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ExportFile", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Invoice", + "ofType": null + } + ] + }, + { + "kind": "ENUM", + "name": "JobStatusEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "PENDING", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SUCCESS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FAILED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "AF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AF_NA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AF_ZA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AGQ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AGQ_CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AK_GH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AM_ET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_AE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_BH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_DJ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_DZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_EG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_EH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_ER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_IL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_IQ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_JO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_KM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_KW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_LB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_LY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_MA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_MR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_OM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_PS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_QA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_SA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_SD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_SO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_SS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_SY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_TD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_TN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AR_YE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AS_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ASA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ASA_TZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AST", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AST_ES", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AZ_CYRL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AZ_CYRL_AZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AZ_LATN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AZ_LATN_AZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BAS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BAS_CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BE_BY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BEM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BEM_ZM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BEZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BEZ_TZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BG_BG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BM_ML", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BN_BD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BN_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BO_CN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BO_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BR_FR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BRX", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BRX_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BS_CYRL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BS_CYRL_BA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BS_LATN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BS_LATN_BA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CA_AD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CA_ES", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CA_ES_VALENCIA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CA_FR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CA_IT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CCP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CCP_BD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CCP_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CE_RU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CEB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CEB_PH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CGG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CGG_UG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHR_US", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CKB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CKB_IQ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CKB_IR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CS_CZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CU_RU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CY_GB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DA_DK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DA_GL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DAV", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DAV_KE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DE_AT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DE_BE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DE_CH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DE_DE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DE_IT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DE_LI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DE_LU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DJE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DJE_NE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DSB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DSB_DE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DUA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DUA_CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DYO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DYO_SN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DZ_BT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EBU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EBU_KE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EE_GH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EE_TG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EL_CY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EL_GR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_AE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_AG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_AI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_AS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_AT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_AU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_BB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_BE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_BI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_BM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_BS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_BW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_BZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_CA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_CC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_CH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_CK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_CX", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_CY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_DE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_DG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_DK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_DM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_ER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_FI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_FJ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_FK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_FM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_GB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_GD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_GG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_GH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_GI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_GM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_GU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_GY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_HK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_IE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_IL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_IM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_IO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_JE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_JM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_KE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_KI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_KN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_KY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_LC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_LR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_LS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_MG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_MH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_MO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_MP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_MS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_MT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_MU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_MW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_MY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_NA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_NF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_NG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_NL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_NR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_NU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_NZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_PG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_PH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_PK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_PN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_PR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_PW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_RW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_SB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_SC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_SD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_SE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_SG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_SH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_SI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_SL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_SS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_SX", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_SZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_TC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_TK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_TO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_TT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_TV", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_TZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_UG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_UM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_US", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_VC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_VG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_VI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_VU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_WS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_ZA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_ZM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EN_ZW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_AR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_BO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_BR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_BZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_CL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_CO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_CR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_CU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_DO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_EA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_EC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_ES", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_GQ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_GT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_HN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_IC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_MX", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_NI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_PA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_PE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_PH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_PR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_PY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_SV", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_US", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_UY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ES_VE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ET_EE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EU_ES", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EWO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EWO_CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FA_AF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FA_IR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_ADLM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_ADLM_BF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_ADLM_CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_ADLM_GH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_ADLM_GM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_ADLM_GN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_ADLM_GW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_ADLM_LR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_ADLM_MR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_ADLM_NE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_ADLM_NG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_ADLM_SL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_ADLM_SN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_LATN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_LATN_BF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_LATN_CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_LATN_GH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_LATN_GM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_LATN_GN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_LATN_GW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_LATN_LR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_LATN_MR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_LATN_NE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_LATN_NG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_LATN_SL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FF_LATN_SN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FI_FI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FIL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FIL_PH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FO_DK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FO_FO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_BE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_BF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_BI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_BJ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_BL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_CA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_CD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_CF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_CG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_CH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_CI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_DJ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_DZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_FR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_GA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_GF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_GN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_GP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_GQ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_HT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_KM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_LU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_MA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_MC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_MF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_MG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_ML", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_MQ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_MR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_MU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_NC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_NE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_PF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_PM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_RE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_RW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_SC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_SN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_SY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_TD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_TG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_TN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_VU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_WF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FR_YT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FUR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FUR_IT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FY_NL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GA_GB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GA_IE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GD_GB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GL_ES", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GSW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GSW_CH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GSW_FR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GSW_LI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GU_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GUZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GUZ_KE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GV", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GV_IM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HA_GH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HA_NE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HA_NG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HAW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HAW_US", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HE_IL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HI_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HR_BA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HR_HR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HSB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HSB_DE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HU_HU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HY_AM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ID_ID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IG_NG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "II", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "II_CN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IS_IS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IT_CH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IT_IT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IT_SM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IT_VA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "JA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "JA_JP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "JGO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "JGO_CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "JMC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "JMC_TZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "JV", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "JV_ID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KA_GE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KAB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KAB_DZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KAM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KAM_KE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KDE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KDE_TZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KEA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KEA_CV", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KHQ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KHQ_ML", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KI_KE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KK_KZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KKJ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KKJ_CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KL_GL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KLN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KLN_KE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KM_KH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KN_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KO_KP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KO_KR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KOK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KOK_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KS_ARAB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KS_ARAB_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KSB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KSB_TZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KSF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KSF_CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KSH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KSH_DE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KU_TR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KW_GB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KY_KG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LAG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LAG_TZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LB_LU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LG_UG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LKT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LKT_US", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LN_AO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LN_CD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LN_CF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LN_CG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LO_LA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LRC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LRC_IQ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LRC_IR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LT_LT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LU_CD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LUO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LUO_KE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LUY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LUY_KE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LV", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LV_LV", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MAI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MAI_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MAS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MAS_KE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MAS_TZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MER_KE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MFE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MFE_MU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MG_MG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MGH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MGH_MZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MGO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MGO_CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MI_NZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MK_MK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ML", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ML_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MN_MN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MNI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MNI_BENG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MNI_BENG_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MR_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MS_BN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MS_ID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MS_MY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MS_SG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MT_MT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MUA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MUA_CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MY_MM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MZN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MZN_IR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NAQ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NAQ_NA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NB_NO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NB_SJ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ND_ZW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NDS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NDS_DE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NDS_NL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NE_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NE_NP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NL_AW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NL_BE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NL_BQ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NL_CW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NL_NL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NL_SR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NL_SX", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NMG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NMG_CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NN_NO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NNH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NNH_CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NUS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NUS_SS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NYN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NYN_UG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OM_ET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OM_KE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OR_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OS_GE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OS_RU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PA_ARAB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PA_ARAB_PK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PA_GURU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PA_GURU_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PCM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PCM_NG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PL_PL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PS_AF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PS_PK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PT_AO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PT_BR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PT_CH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PT_CV", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PT_GQ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PT_GW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PT_LU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PT_MO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PT_MZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PT_PT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PT_ST", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PT_TL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "QU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "QU_BO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "QU_EC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "QU_PE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RM_CH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RN_BI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RO_MD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RO_RO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ROF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ROF_TZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RU_BY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RU_KG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RU_KZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RU_MD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RU_RU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RU_UA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RW_RW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RWK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RWK_TZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SAH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SAH_RU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SAQ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SAQ_KE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SAT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SAT_OLCK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SAT_OLCK_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SBP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SBP_TZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SD_ARAB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SD_ARAB_PK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SD_DEVA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SD_DEVA_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SE_FI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SE_NO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SE_SE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SEH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SEH_MZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SES", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SES_ML", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SG_CF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHI_LATN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHI_LATN_MA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHI_TFNG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHI_TFNG_MA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SI_LK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SK_SK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SL_SI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SMN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SMN_FI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SN_ZW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SO_DJ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SO_ET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SO_KE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SO_SO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SQ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SQ_AL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SQ_MK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SQ_XK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SR_CYRL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SR_CYRL_BA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SR_CYRL_ME", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SR_CYRL_RS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SR_CYRL_XK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SR_LATN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SR_LATN_BA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SR_LATN_ME", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SR_LATN_RS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SR_LATN_XK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SU_LATN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SU_LATN_ID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SV", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SV_AX", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SV_FI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SV_SE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SW_CD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SW_KE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SW_TZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SW_UG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TA_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TA_LK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TA_MY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TA_SG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TE_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TEO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TEO_KE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TEO_UG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TG_TJ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TH_TH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TI_ER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TI_ET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TK_TM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TO_TO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TR_CY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TR_TR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TT_RU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TWQ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TWQ_NE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TZM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TZM_MA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UG_CN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UK_UA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UR_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UR_PK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UZ_ARAB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UZ_ARAB_AF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UZ_CYRL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UZ_CYRL_UZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UZ_LATN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UZ_LATN_UZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VAI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VAI_LATN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VAI_LATN_LR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VAI_VAII", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VAI_VAII_LR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VI_VN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VUN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VUN_TZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "WAE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "WAE_CH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "WO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "WO_SN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "XH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "XH_ZA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "XOG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "XOG_UG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "YAV", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "YAV_CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "YI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "YO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "YO_BJ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "YO_NG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "YUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "YUE_HANS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "YUE_HANS_CN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "YUE_HANT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "YUE_HANT_HK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ZGH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ZGH_MA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ZH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ZH_HANS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ZH_HANS_CN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ZH_HANS_HK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ZH_HANS_MO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ZH_HANS_SG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ZH_HANT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ZH_HANT_HK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ZH_HANT_MO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ZH_HANT_TW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ZU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ZU_ZA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "LanguageDisplay", + "description": null, + "fields": [ + { + "name": "code", + "description": "ISO 639 representation of the language name.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "language", + "description": "Full name of the language.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "LimitInfo", + "description": null, + "fields": [ + { + "name": "currentUsage", + "description": "Defines the current resource usage.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Limits", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "allowedUsage", + "description": "Defines the allowed maximum resource usage, null means unlimited.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Limits", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Limits", + "description": null, + "fields": [ + { + "name": "channels", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orders", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariants", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "staffUsers", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "warehouses", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Manifest", + "description": "The manifest definition.", + "fields": [ + { + "name": "identifier", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "version", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "about", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "permissions", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Permission", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appUrl", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "configurationUrl", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tokenTargetUrl", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "dataPrivacy", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "dataPrivacyUrl", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "homepageUrl", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "supportUrl", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "extensions", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppManifestExtension", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Margin", + "description": null, + "fields": [ + { + "name": "start", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "stop", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "MeasurementUnitsEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "M", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "YD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INCH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SQ_CM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SQ_M", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SQ_KM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SQ_FT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SQ_YD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SQ_INCH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUBIC_MILLIMETER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUBIC_CENTIMETER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUBIC_DECIMETER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUBIC_METER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LITER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUBIC_FOOT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUBIC_INCH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUBIC_YARD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "QT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PINT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FL_OZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ACRE_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ACRE_FT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "G", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TONNE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Menu", + "description": "Represents a single menu - an object that is used to help navigate through the store.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "items", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuItem", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MenuBulkDelete", + "description": "Deletes menus.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MenuCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MenuCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Menu", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MenuCreate", + "description": "Creates a new Menu.", + "fields": [ + { + "name": "menuErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menu", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Menu", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "MenuCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "Name of the menu.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "Slug of the menu. Will be generated if not provided.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "items", + "description": "List of menu items.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MenuItemInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MenuDelete", + "description": "Deletes a menu.", + "fields": [ + { + "name": "menuErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menu", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Menu", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MenuError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "MenuErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "MenuErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CANNOT_ASSIGN_NODE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID_MENU_ITEM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NO_MENU_ITEM_PROVIDED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TOO_MANY_MENU_ITEMS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "MenuFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "MenuInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "Name of the menu.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "Slug of the menu.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MenuItem", + "description": "Represents a single item of the related menu. Can store categories, collection or pages.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menu", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Menu", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "parent", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "MenuItem", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "category", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Category", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collection", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Collection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "page", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Page", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "level", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "children", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuItem", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "URL to the menu item.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translation", + "description": "Returns translated menu item fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for menu item.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "MenuItemTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MenuItemBulkDelete", + "description": "Deletes menu items.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MenuItemCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuItemCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MenuItemCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuItem", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MenuItemCreate", + "description": "Creates a new menu item.", + "fields": [ + { + "name": "menuErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuItem", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "MenuItem", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "MenuItemCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "Name of the menu item.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "URL of the pointed item.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "category", + "description": "Category to which item points.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collection", + "description": "Collection to which item points.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "page", + "description": "Page to which item points.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menu", + "description": "Menu to which item belongs.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "parent", + "description": "ID of the parent menu. If empty, menu will be top level menu.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MenuItemDelete", + "description": "Deletes a menu item.", + "fields": [ + { + "name": "menuErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuItem", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "MenuItem", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "MenuItemFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "MenuItemInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "Name of the menu item.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "URL of the pointed item.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "category", + "description": "Category to which item points.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collection", + "description": "Collection to which item points.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "page", + "description": "Page to which item points.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MenuItemMove", + "description": "Moves items of menus.", + "fields": [ + { + "name": "menu", + "description": "Assigned menu to move within.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Menu", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "MenuItemMoveInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "itemId", + "description": "The menu item ID to move.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "parentId", + "description": "ID of the parent menu. If empty, menu will be top level menu.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortOrder", + "description": "The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "MenuItemSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort menu items by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "MenuItemsSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MenuItemTranslatableContent", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translation", + "description": "Returns translated menu item fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for menu item.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "MenuItemTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuItem", + "description": "Represents a single item of the related menu. Can store categories, collection or pages.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "MenuItem", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Get model fields from the root level queries." + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MenuItemTranslate", + "description": "Creates/updates translations for a menu item.", + "fields": [ + { + "name": "translationErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuItem", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "MenuItem", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MenuItemTranslation", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "language", + "description": "Translation language.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LanguageDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MenuItemUpdate", + "description": "Updates a menu item.", + "fields": [ + { + "name": "menuErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuItem", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "MenuItem", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "MenuItemsSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NAME", + "description": "Sort menu items by name.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "MenuSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NAME", + "description": "Sort menus by name.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ITEMS_COUNT", + "description": "Sort menus by items count.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "MenuSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort menus by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "MenuSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MenuUpdate", + "description": "Updates a menu.", + "fields": [ + { + "name": "menuErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MenuError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menu", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Menu", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MetadataError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "MetadataErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "MetadataErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "key", + "description": "Key of a metadata item.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "value", + "description": "Value of a metadata item.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "MetadataInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "key", + "description": "Key of a metadata item.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "value", + "description": "Value of a metadata item.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MetadataItem", + "description": null, + "fields": [ + { + "name": "key", + "description": "Key of a metadata item.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "value", + "description": "Value of a metadata item.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Money", + "description": "Represents amount of money in specific currency.", + "fields": [ + { + "name": "currency", + "description": "Currency code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "amount", + "description": "Amount of money.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "MoneyInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "currency", + "description": "Currency code.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "amount", + "description": "Amount of money.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MoneyRange", + "description": "Represents a range of amounts of money.", + "fields": [ + { + "name": "start", + "description": "Lower bound of a price range.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "stop", + "description": "Upper bound of a price range.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "MoveProductInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "productId", + "description": "The ID of the product to move.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortOrder", + "description": "The relative sorting position of the product (from -inf to +inf) starting from the first given product's actual position.1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Mutation", + "description": null, + "fields": [ + { + "name": "webhookCreate", + "description": "Creates a new webhook subscription.", + "args": [ + { + "name": "input", + "description": "Fields required to create a webhook.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "WebhookCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "WebhookCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "webhookDelete", + "description": "Deletes a webhook subscription.", + "args": [ + { + "name": "id", + "description": "ID of a webhook to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "WebhookDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "webhookUpdate", + "description": "Updates a webhook subscription.", + "args": [ + { + "name": "id", + "description": "ID of a webhook to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a webhook.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "WebhookUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "WebhookUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "eventDeliveryRetry", + "description": "Retries event delivery.", + "args": [ + { + "name": "id", + "description": "ID of the event delivery to retry.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "EventDeliveryRetry", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createWarehouse", + "description": "Creates new warehouse.", + "args": [ + { + "name": "input", + "description": "Fields required to create warehouse.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "WarehouseCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "WarehouseCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updateWarehouse", + "description": "Updates given warehouse.", + "args": [ + { + "name": "id", + "description": "ID of a warehouse to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update warehouse.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "WarehouseUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "WarehouseUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deleteWarehouse", + "description": "Deletes selected warehouse.", + "args": [ + { + "name": "id", + "description": "ID of a warehouse to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "WarehouseDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "assignWarehouseShippingZone", + "description": "Add shipping zone to given warehouse.", + "args": [ + { + "name": "id", + "description": "ID of a warehouse to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingZoneIds", + "description": "List of shipping zone IDs.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "WarehouseShippingZoneAssign", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "unassignWarehouseShippingZone", + "description": "Remove shipping zone from given warehouse.", + "args": [ + { + "name": "id", + "description": "ID of a warehouse to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingZoneIds", + "description": "List of shipping zone IDs.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "WarehouseShippingZoneUnassign", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "staffNotificationRecipientCreate", + "description": "Creates a new staff notification recipient.", + "args": [ + { + "name": "input", + "description": "Fields required to create a staff notification recipient.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "StaffNotificationRecipientInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "StaffNotificationRecipientCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "staffNotificationRecipientUpdate", + "description": "Updates a staff notification recipient.", + "args": [ + { + "name": "id", + "description": "ID of a staff notification recipient to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a staff notification recipient.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "StaffNotificationRecipientInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "StaffNotificationRecipientUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "staffNotificationRecipientDelete", + "description": "Delete staff notification recipient.", + "args": [ + { + "name": "id", + "description": "ID of a staff notification recipient to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "StaffNotificationRecipientDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shopDomainUpdate", + "description": "Updates site domain of the shop.", + "args": [ + { + "name": "input", + "description": "Fields required to update site.", + "type": { + "kind": "INPUT_OBJECT", + "name": "SiteDomainInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShopDomainUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shopSettingsUpdate", + "description": "Updates shop settings.", + "args": [ + { + "name": "input", + "description": "Fields required to update shop settings.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ShopSettingsInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShopSettingsUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shopFetchTaxRates", + "description": "Fetch tax rates.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ShopFetchTaxRates", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shopSettingsTranslate", + "description": "Creates/updates translations for shop settings.", + "args": [ + { + "name": "input", + "description": "Fields required to update shop settings translations.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ShopSettingsTranslationInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": "Translation language code.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShopSettingsTranslate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shopAddressUpdate", + "description": "Update the shop's address. If the `null` value is passed, the currently selected address will be deleted.", + "args": [ + { + "name": "input", + "description": "Fields required to update shop address.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShopAddressUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderSettingsUpdate", + "description": "Update shop order settings.", + "args": [ + { + "name": "input", + "description": "Fields required to update shop order settings.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderSettingsUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderSettingsUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCardSettingsUpdate", + "description": "Update gift card settings.", + "args": [ + { + "name": "input", + "description": "Fields required to update gift card settings.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "GiftCardSettingsUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "GiftCardSettingsUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingMethodChannelListingUpdate", + "description": "Manage shipping method's availability in channels.", + "args": [ + { + "name": "id", + "description": "ID of a shipping method to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update shipping method channel listings.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ShippingMethodChannelListingInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShippingMethodChannelListingUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingPriceCreate", + "description": "Creates a new shipping price.", + "args": [ + { + "name": "input", + "description": "Fields required to create a shipping price.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ShippingPriceInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShippingPriceCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingPriceDelete", + "description": "Deletes a shipping price.", + "args": [ + { + "name": "id", + "description": "ID of a shipping price to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShippingPriceDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingPriceBulkDelete", + "description": "Deletes shipping prices.", + "args": [ + { + "name": "ids", + "description": "List of shipping price IDs to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShippingPriceBulkDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingPriceUpdate", + "description": "Updates a new shipping price.", + "args": [ + { + "name": "id", + "description": "ID of a shipping price to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a shipping price.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ShippingPriceInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShippingPriceUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingPriceTranslate", + "description": "Creates/updates translations for a shipping method.", + "args": [ + { + "name": "id", + "description": "('ShippingMethodType ID or ShippingMethodTranslatableContent ID.',)", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ShippingPriceTranslationInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": "Translation language code.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShippingPriceTranslate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingPriceExcludeProducts", + "description": "Exclude products from shipping price.", + "args": [ + { + "name": "id", + "description": "ID of a shipping price.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Exclude products input.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ShippingPriceExcludeProductsInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShippingPriceExcludeProducts", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingPriceRemoveProductFromExclude", + "description": "Remove product from excluded list for shipping price.", + "args": [ + { + "name": "id", + "description": "ID of a shipping price.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "products", + "description": "List of products which will be removed from excluded list.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShippingPriceRemoveProductFromExclude", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingZoneCreate", + "description": "Creates a new shipping zone.", + "args": [ + { + "name": "input", + "description": "Fields required to create a shipping zone.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ShippingZoneCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShippingZoneCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingZoneDelete", + "description": "Deletes a shipping zone.", + "args": [ + { + "name": "id", + "description": "ID of a shipping zone to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShippingZoneDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingZoneBulkDelete", + "description": "Deletes shipping zones.", + "args": [ + { + "name": "ids", + "description": "List of shipping zone IDs to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShippingZoneBulkDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingZoneUpdate", + "description": "Updates a new shipping zone.", + "args": [ + { + "name": "id", + "description": "ID of a shipping zone to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a shipping zone.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ShippingZoneUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShippingZoneUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productAttributeAssign", + "description": "Assign attributes to a given product type.", + "args": [ + { + "name": "operations", + "description": "The operations to perform.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProductAttributeAssignInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productTypeId", + "description": "ID of the product type to assign the attributes into.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductAttributeAssign", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productAttributeAssignmentUpdate", + "description": "New in Saleor 3.1. Update attributes assigned to product variant for given product type.", + "args": [ + { + "name": "operations", + "description": "The operations to perform.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProductAttributeAssignmentUpdateInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productTypeId", + "description": "ID of the product type to assign the attributes into.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductAttributeAssignmentUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productAttributeUnassign", + "description": "Un-assign attributes from a given product type.", + "args": [ + { + "name": "attributeIds", + "description": "The IDs of the attributes to unassign.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productTypeId", + "description": "ID of the product type from which the attributes should be unassigned.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductAttributeUnassign", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "categoryCreate", + "description": "Creates a new category.", + "args": [ + { + "name": "input", + "description": "Fields required to create a category.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CategoryInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "parent", + "description": "ID of the parent category. If empty, category will be top level category.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CategoryCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "categoryDelete", + "description": "Deletes a category.", + "args": [ + { + "name": "id", + "description": "ID of a category to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CategoryDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "categoryBulkDelete", + "description": "Deletes categories.", + "args": [ + { + "name": "ids", + "description": "List of category IDs to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CategoryBulkDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "categoryUpdate", + "description": "Updates a category.", + "args": [ + { + "name": "id", + "description": "ID of a category to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a category.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CategoryInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CategoryUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "categoryTranslate", + "description": "Creates/updates translations for a category.", + "args": [ + { + "name": "id", + "description": "Category ID or CategoryTranslatableContent ID.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TranslationInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": "Translation language code.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CategoryTranslate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collectionAddProducts", + "description": "Adds products to a collection.", + "args": [ + { + "name": "collectionId", + "description": "ID of a collection.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "products", + "description": "List of product IDs.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CollectionAddProducts", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collectionCreate", + "description": "Creates a new collection.", + "args": [ + { + "name": "input", + "description": "Fields required to create a collection.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CollectionCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CollectionCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collectionDelete", + "description": "Deletes a collection.", + "args": [ + { + "name": "id", + "description": "ID of a collection to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CollectionDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collectionReorderProducts", + "description": "Reorder the products of a collection.", + "args": [ + { + "name": "collectionId", + "description": "ID of a collection.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "moves", + "description": "The collection products position operations.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoveProductInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CollectionReorderProducts", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collectionBulkDelete", + "description": "Deletes collections.", + "args": [ + { + "name": "ids", + "description": "List of collection IDs to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CollectionBulkDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collectionRemoveProducts", + "description": "Remove products from a collection.", + "args": [ + { + "name": "collectionId", + "description": "ID of a collection.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "products", + "description": "List of product IDs.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CollectionRemoveProducts", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collectionUpdate", + "description": "Updates a collection.", + "args": [ + { + "name": "id", + "description": "ID of a collection to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a collection.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CollectionInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CollectionUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collectionTranslate", + "description": "Creates/updates translations for a collection.", + "args": [ + { + "name": "id", + "description": "Collection ID or CollectionTranslatableContent ID.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TranslationInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": "Translation language code.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CollectionTranslate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collectionChannelListingUpdate", + "description": "Manage collection's availability in channels.", + "args": [ + { + "name": "id", + "description": "ID of a collection to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to create or update collection channel listings.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CollectionChannelListingUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CollectionChannelListingUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productCreate", + "description": "Creates a new product.", + "args": [ + { + "name": "input", + "description": "Fields required to create a product.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProductCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productDelete", + "description": "Deletes a product.", + "args": [ + { + "name": "id", + "description": "ID of a product to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productBulkDelete", + "description": "Deletes products.", + "args": [ + { + "name": "ids", + "description": "List of product IDs to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductBulkDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productUpdate", + "description": "Updates an existing product.", + "args": [ + { + "name": "id", + "description": "ID of a product to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a product.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProductInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productTranslate", + "description": "Creates/updates translations for a product.", + "args": [ + { + "name": "id", + "description": "Product ID or ProductTranslatableContent ID.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TranslationInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": "Translation language code.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductTranslate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productChannelListingUpdate", + "description": "Manage product's availability in channels.", + "args": [ + { + "name": "id", + "description": "ID of a product to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to create or update product channel listings.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProductChannelListingUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductChannelListingUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productMediaCreate", + "description": "Create a media object (image or video URL) associated with product. For image, this mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec", + "args": [ + { + "name": "input", + "description": "Fields required to create a product media.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProductMediaCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductMediaCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariantReorder", + "description": "Reorder the variants of a product. Mutation updates updated_at on product and triggers PRODUCT_UPDATED webhook.", + "args": [ + { + "name": "moves", + "description": "The list of variant reordering operations.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ReorderInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productId", + "description": "Id of product that variants order will be altered.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariantReorder", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productMediaDelete", + "description": "Deletes a product media.", + "args": [ + { + "name": "id", + "description": "ID of a product media to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductMediaDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productMediaBulkDelete", + "description": "Deletes product media.", + "args": [ + { + "name": "ids", + "description": "List of product media IDs to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductMediaBulkDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productMediaReorder", + "description": "Changes ordering of the product media.", + "args": [ + { + "name": "mediaIds", + "description": "IDs of a product media in the desired order.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productId", + "description": "ID of product that media order will be altered.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductMediaReorder", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productMediaUpdate", + "description": "Updates a product media.", + "args": [ + { + "name": "id", + "description": "ID of a product media to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a product media.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProductMediaUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductMediaUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productTypeCreate", + "description": "Creates a new product type.", + "args": [ + { + "name": "input", + "description": "Fields required to create a product type.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProductTypeInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductTypeCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productTypeDelete", + "description": "Deletes a product type.", + "args": [ + { + "name": "id", + "description": "ID of a product type to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductTypeDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productTypeBulkDelete", + "description": "Deletes product types.", + "args": [ + { + "name": "ids", + "description": "List of product type IDs to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductTypeBulkDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productTypeUpdate", + "description": "Updates an existing product type.", + "args": [ + { + "name": "id", + "description": "ID of a product type to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a product type.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProductTypeInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductTypeUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productTypeReorderAttributes", + "description": "Reorder the attributes of a product type.", + "args": [ + { + "name": "moves", + "description": "The list of attribute reordering operations.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ReorderInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productTypeId", + "description": "ID of a product type.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "The attribute type to reorder.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ProductAttributeType", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductTypeReorderAttributes", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productReorderAttributeValues", + "description": "Reorder product attribute values.", + "args": [ + { + "name": "attributeId", + "description": "ID of an attribute.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "moves", + "description": "The list of reordering operations for given attribute values.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ReorderInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productId", + "description": "ID of a product.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductReorderAttributeValues", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "digitalContentCreate", + "description": "Create new digital content. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec", + "args": [ + { + "name": "input", + "description": "Fields required to create a digital content.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DigitalContentUploadInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantId", + "description": "ID of a product variant to upload digital content.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DigitalContentCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "digitalContentDelete", + "description": "Remove digital content assigned to given variant.", + "args": [ + { + "name": "variantId", + "description": "ID of a product variant with digital content to remove.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DigitalContentDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "digitalContentUpdate", + "description": "Update digital content.", + "args": [ + { + "name": "input", + "description": "Fields required to update a digital content.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DigitalContentInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantId", + "description": "ID of a product variant with digital content to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DigitalContentUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "digitalContentUrlCreate", + "description": "Generate new URL to digital content.", + "args": [ + { + "name": "input", + "description": "Fields required to create a new url.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DigitalContentUrlCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DigitalContentUrlCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariantCreate", + "description": "Creates a new variant for a product.", + "args": [ + { + "name": "input", + "description": "Fields required to create a product variant.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProductVariantCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariantCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariantDelete", + "description": "Deletes a product variant.", + "args": [ + { + "name": "id", + "description": "ID of a product variant to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariantDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariantBulkCreate", + "description": "Creates product variants for a given product.", + "args": [ + { + "name": "product", + "description": "ID of the product to create the variants for.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variants", + "description": "Input list of product variants to create.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProductVariantBulkCreateInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariantBulkCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariantBulkDelete", + "description": "Deletes product variants.", + "args": [ + { + "name": "ids", + "description": "List of product variant IDs to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariantBulkDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariantStocksCreate", + "description": "Creates stocks for product variant.", + "args": [ + { + "name": "stocks", + "description": "Input list of stocks to create.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "StockInput", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantId", + "description": "ID of a product variant for which stocks will be created.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariantStocksCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariantStocksDelete", + "description": "Delete stocks from product variant.", + "args": [ + { + "name": "variantId", + "description": "ID of product variant for which stocks will be deleted.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "warehouseIds", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariantStocksDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariantStocksUpdate", + "description": "Update stocks for product variant.", + "args": [ + { + "name": "stocks", + "description": "Input list of stocks to create.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "StockInput", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantId", + "description": "ID of a product variant for which stocks will be created.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariantStocksUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariantUpdate", + "description": "Updates an existing variant for product.", + "args": [ + { + "name": "id", + "description": "ID of a product variant to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a product variant.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProductVariantInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariantUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariantSetDefault", + "description": "Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook.", + "args": [ + { + "name": "productId", + "description": "Id of a product that will have the default variant set.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantId", + "description": "Id of a variant that will be set as default.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariantSetDefault", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariantTranslate", + "description": "Creates/updates translations for a product variant.", + "args": [ + { + "name": "id", + "description": "ProductVariant ID or ProductVariantTranslatableContent ID.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NameTranslationInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": "Translation language code.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariantTranslate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariantChannelListingUpdate", + "description": "Manage product variant prices in channels.", + "args": [ + { + "name": "id", + "description": "ID of a product variant to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "List of fields required to create or upgrade product variant channel listings.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProductVariantChannelListingAddInput", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariantChannelListingUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariantReorderAttributeValues", + "description": "Reorder product variant attribute values.", + "args": [ + { + "name": "attributeId", + "description": "ID of an attribute.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "moves", + "description": "The list of reordering operations for given attribute values.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ReorderInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantId", + "description": "ID of a product variant.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariantReorderAttributeValues", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariantPreorderDeactivate", + "description": "New in Saleor 3.1. Deactivates product variant preorder.It changes all preorder allocation into regular allocation.", + "args": [ + { + "name": "id", + "description": "ID of a variant which preorder should be deactivated.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariantPreorderDeactivate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantMediaAssign", + "description": "Assign an media to a product variant.", + "args": [ + { + "name": "mediaId", + "description": "ID of a product media to assign to a variant.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantId", + "description": "ID of a product variant.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "VariantMediaAssign", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantMediaUnassign", + "description": "Unassign an media from a product variant.", + "args": [ + { + "name": "mediaId", + "description": "ID of a product media to unassign from a variant.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantId", + "description": "ID of a product variant.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "VariantMediaUnassign", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentCapture", + "description": "Captures the authorized payment amount.", + "args": [ + { + "name": "amount", + "description": "Transaction amount.", + "type": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentId", + "description": "Payment ID.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PaymentCapture", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentRefund", + "description": "Refunds the captured payment amount.", + "args": [ + { + "name": "amount", + "description": "Transaction amount.", + "type": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentId", + "description": "Payment ID.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PaymentRefund", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentVoid", + "description": "Voids the authorized payment.", + "args": [ + { + "name": "paymentId", + "description": "Payment ID.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PaymentVoid", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentInitialize", + "description": "Initializes payment process when it is required by gateway.", + "args": [ + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "gateway", + "description": "A gateway name used to initialize the payment.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentData", + "description": "Client-side generated data required to initialize the payment.", + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PaymentInitialize", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentCheckBalance", + "description": "Check payment balance.", + "args": [ + { + "name": "input", + "description": "Fields required to check payment balance.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "PaymentCheckBalanceInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PaymentCheckBalance", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageCreate", + "description": "Creates a new page.", + "args": [ + { + "name": "input", + "description": "Fields required to create a page.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "PageCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PageCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageDelete", + "description": "Deletes a page.", + "args": [ + { + "name": "id", + "description": "ID of a page to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PageDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageBulkDelete", + "description": "Deletes pages.", + "args": [ + { + "name": "ids", + "description": "List of page IDs to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PageBulkDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageBulkPublish", + "description": "Publish pages.", + "args": [ + { + "name": "ids", + "description": "List of page IDs to (un)publish.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isPublished", + "description": "Determine if pages will be published or not.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PageBulkPublish", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageUpdate", + "description": "Updates an existing page.", + "args": [ + { + "name": "id", + "description": "ID of a page to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a page.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "PageInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PageUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageTranslate", + "description": "Creates/updates translations for a page.", + "args": [ + { + "name": "id", + "description": "Page ID or PageTranslatableContent ID.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "PageTranslationInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": "Translation language code.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PageTranslate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageTypeCreate", + "description": "Create a new page type.", + "args": [ + { + "name": "input", + "description": "Fields required to create page type.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "PageTypeCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PageTypeCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageTypeUpdate", + "description": "Update page type.", + "args": [ + { + "name": "id", + "description": "ID of the page type to update.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update page type.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "PageTypeUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PageTypeUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageTypeDelete", + "description": "Delete a page type.", + "args": [ + { + "name": "id", + "description": "ID of the page type to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PageTypeDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageTypeBulkDelete", + "description": "Delete page types.", + "args": [ + { + "name": "ids", + "description": "List of page type IDs to delete", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PageTypeBulkDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageAttributeAssign", + "description": "Assign attributes to a given page type.", + "args": [ + { + "name": "attributeIds", + "description": "The IDs of the attributes to assign.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageTypeId", + "description": "ID of the page type to assign the attributes into.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PageAttributeAssign", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageAttributeUnassign", + "description": "Unassign attributes from a given page type.", + "args": [ + { + "name": "attributeIds", + "description": "The IDs of the attributes to unassign.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageTypeId", + "description": "ID of the page type from which the attributes should be unassign.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PageAttributeUnassign", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageTypeReorderAttributes", + "description": "Reorder the attributes of a page type.", + "args": [ + { + "name": "moves", + "description": "The list of attribute reordering operations.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ReorderInput", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageTypeId", + "description": "ID of a page type.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PageTypeReorderAttributes", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageReorderAttributeValues", + "description": "Reorder page attribute values.", + "args": [ + { + "name": "attributeId", + "description": "ID of an attribute.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "moves", + "description": "The list of reordering operations for given attribute values.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ReorderInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageId", + "description": "ID of a page.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PageReorderAttributeValues", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "draftOrderComplete", + "description": "Completes creating an order.", + "args": [ + { + "name": "id", + "description": "ID of the order that will be completed.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DraftOrderComplete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "draftOrderCreate", + "description": "Creates a new draft order.", + "args": [ + { + "name": "input", + "description": "Fields required to create an order.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DraftOrderCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DraftOrderCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "draftOrderDelete", + "description": "Deletes a draft order.", + "args": [ + { + "name": "id", + "description": "ID of a draft order to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DraftOrderDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "draftOrderBulkDelete", + "description": "Deletes draft orders.", + "args": [ + { + "name": "ids", + "description": "List of draft order IDs to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DraftOrderBulkDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "draftOrderLinesBulkDelete", + "description": "Deletes order lines.", + "args": [ + { + "name": "ids", + "description": "List of order lines IDs to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DraftOrderLinesBulkDelete", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0." + }, + { + "name": "draftOrderUpdate", + "description": "Updates a draft order.", + "args": [ + { + "name": "id", + "description": "ID of a draft order to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update an order.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DraftOrderInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DraftOrderUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderAddNote", + "description": "Adds note to the order.", + "args": [ + { + "name": "order", + "description": "ID of the order to add a note for.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to create a note for the order.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderAddNoteInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderAddNote", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderCancel", + "description": "Cancel an order.", + "args": [ + { + "name": "id", + "description": "ID of the order to cancel.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderCancel", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderCapture", + "description": "Capture an order.", + "args": [ + { + "name": "amount", + "description": "Amount of money to capture.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": "ID of the order to capture.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderCapture", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderConfirm", + "description": "Confirms an unconfirmed order by changing status to unfulfilled.", + "args": [ + { + "name": "id", + "description": "ID of an order to confirm.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderConfirm", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderFulfill", + "description": "Creates new fulfillments for an order.", + "args": [ + { + "name": "input", + "description": "Fields required to create a fulfillment.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderFulfillInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "order", + "description": "ID of the order to be fulfilled.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderFulfill", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderFulfillmentCancel", + "description": "Cancels existing fulfillment and optionally restocks items.", + "args": [ + { + "name": "id", + "description": "ID of a fulfillment to cancel.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to cancel a fulfillment.", + "type": { + "kind": "INPUT_OBJECT", + "name": "FulfillmentCancelInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "FulfillmentCancel", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderFulfillmentApprove", + "description": "New in Saleor 3.1. Approve existing fulfillment.", + "args": [ + { + "name": "allowStockToBeExceeded", + "description": "True if stock could be exceeded.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": "ID of a fulfillment to approve.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "notifyCustomer", + "description": "True if confirmation email should be send.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "FulfillmentApprove", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderFulfillmentUpdateTracking", + "description": "Updates a fulfillment for an order.", + "args": [ + { + "name": "id", + "description": "ID of a fulfillment to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a fulfillment.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "FulfillmentUpdateTrackingInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "FulfillmentUpdateTracking", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderFulfillmentRefundProducts", + "description": "Refund products.", + "args": [ + { + "name": "input", + "description": "Fields required to create an refund fulfillment.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderRefundProductsInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "order", + "description": "ID of the order to be refunded.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "FulfillmentRefundProducts", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderFulfillmentReturnProducts", + "description": "Return products.", + "args": [ + { + "name": "input", + "description": "Fields required to return products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderReturnProductsInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "order", + "description": "ID of the order to be returned.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "FulfillmentReturnProducts", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderLinesCreate", + "description": "Create order lines for an order.", + "args": [ + { + "name": "id", + "description": "ID of the order to add the lines to.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to add order lines.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderLineCreateInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderLinesCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderLineDelete", + "description": "Deletes an order line from an order.", + "args": [ + { + "name": "id", + "description": "ID of the order line to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderLineDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderLineUpdate", + "description": "Updates an order line of an order.", + "args": [ + { + "name": "id", + "description": "ID of the order line to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update an order line.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderLineInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderLineUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderDiscountAdd", + "description": "Adds discount to the order.", + "args": [ + { + "name": "input", + "description": "Fields required to create a discount for the order.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderDiscountCommonInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderId", + "description": "ID of an order to discount.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderDiscountAdd", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderDiscountUpdate", + "description": "Update discount for the order.", + "args": [ + { + "name": "discountId", + "description": "ID of a discount to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a discount for the order.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderDiscountCommonInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderDiscountUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderDiscountDelete", + "description": "Remove discount from the order.", + "args": [ + { + "name": "discountId", + "description": "ID of a discount to remove.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderDiscountDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderLineDiscountUpdate", + "description": "Update discount for the order line.", + "args": [ + { + "name": "input", + "description": "Fields required to update price for the order line.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderDiscountCommonInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderLineId", + "description": "ID of a order line to update price", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderLineDiscountUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderLineDiscountRemove", + "description": "Remove discount applied to the order line.", + "args": [ + { + "name": "orderLineId", + "description": "ID of a order line to remove its discount", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderLineDiscountRemove", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderMarkAsPaid", + "description": "Mark order as manually paid.", + "args": [ + { + "name": "id", + "description": "ID of the order to mark paid.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "transactionReference", + "description": "The external transaction reference.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderMarkAsPaid", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderRefund", + "description": "Refund an order.", + "args": [ + { + "name": "amount", + "description": "Amount of money to refund.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": "ID of the order to refund.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderRefund", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderUpdate", + "description": "Updates an order.", + "args": [ + { + "name": "id", + "description": "ID of an order to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update an order.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderUpdateShipping", + "description": "Updates a shipping method of the order. Requires shipping method ID to update, when null is passed then currently assigned shipping method is removed.", + "args": [ + { + "name": "order", + "description": "ID of the order to update a shipping method.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to change shipping method of the order.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderUpdateShippingInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderUpdateShipping", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderVoid", + "description": "Void an order.", + "args": [ + { + "name": "id", + "description": "ID of the order to void.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderVoid", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderBulkCancel", + "description": "Cancels orders.", + "args": [ + { + "name": "ids", + "description": "List of orders IDs to cancel.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderBulkCancel", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deleteMetadata", + "description": "Delete metadata of an object.", + "args": [ + { + "name": "id", + "description": "ID or token (for Order and Checkout) of an object to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "keys", + "description": "Metadata keys to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DeleteMetadata", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deletePrivateMetadata", + "description": "Delete object's private metadata.", + "args": [ + { + "name": "id", + "description": "ID or token (for Order and Checkout) of an object to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "keys", + "description": "Metadata keys to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DeletePrivateMetadata", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updateMetadata", + "description": "Updates metadata of an object.", + "args": [ + { + "name": "id", + "description": "ID or token (for Order and Checkout) of an object to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update the object's metadata.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataInput", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "UpdateMetadata", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatePrivateMetadata", + "description": "Updates private metadata of an object.", + "args": [ + { + "name": "id", + "description": "ID or token (for Order and Checkout) of an object to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update the object's metadata.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataInput", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "UpdatePrivateMetadata", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "assignNavigation", + "description": "Assigns storefront's navigation menus.", + "args": [ + { + "name": "menu", + "description": "ID of the menu.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "navigationType", + "description": "Type of the navigation bar to assign the menu to.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "NavigationType", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AssignNavigation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuCreate", + "description": "Creates a new Menu.", + "args": [ + { + "name": "input", + "description": "Fields required to create a menu.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MenuCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "MenuCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuDelete", + "description": "Deletes a menu.", + "args": [ + { + "name": "id", + "description": "ID of a menu to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "MenuDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuBulkDelete", + "description": "Deletes menus.", + "args": [ + { + "name": "ids", + "description": "List of menu IDs to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "MenuBulkDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuUpdate", + "description": "Updates a menu.", + "args": [ + { + "name": "id", + "description": "ID of a menu to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a menu.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MenuInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "MenuUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuItemCreate", + "description": "Creates a new menu item.", + "args": [ + { + "name": "input", + "description": "Fields required to update a menu item. Only one of `url`, `category`, `page`, `collection` is allowed per item.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MenuItemCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "MenuItemCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuItemDelete", + "description": "Deletes a menu item.", + "args": [ + { + "name": "id", + "description": "ID of a menu item to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "MenuItemDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuItemBulkDelete", + "description": "Deletes menu items.", + "args": [ + { + "name": "ids", + "description": "List of menu item IDs to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "MenuItemBulkDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuItemUpdate", + "description": "Updates a menu item.", + "args": [ + { + "name": "id", + "description": "ID of a menu item to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a menu item. Only one of `url`, `category`, `page`, `collection` is allowed per item.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MenuItemInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "MenuItemUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuItemTranslate", + "description": "Creates/updates translations for a menu item.", + "args": [ + { + "name": "id", + "description": "MenuItem ID or MenuItemTranslatableContent ID.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NameTranslationInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": "Translation language code.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "MenuItemTranslate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuItemMove", + "description": "Moves items of menus.", + "args": [ + { + "name": "menu", + "description": "ID of the menu.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "moves", + "description": "The menu position data.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MenuItemMoveInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "MenuItemMove", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "invoiceRequest", + "description": "Request an invoice for the order using plugin.", + "args": [ + { + "name": "number", + "description": "Invoice number, if not provided it will be generated.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderId", + "description": "ID of the order related to invoice.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "InvoiceRequest", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "invoiceRequestDelete", + "description": "Requests deletion of an invoice.", + "args": [ + { + "name": "id", + "description": "ID of an invoice to request the deletion.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "InvoiceRequestDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "invoiceCreate", + "description": "Creates a ready to send invoice.", + "args": [ + { + "name": "input", + "description": "Fields required when creating an invoice.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "InvoiceCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderId", + "description": "ID of the order related to invoice.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "InvoiceCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "invoiceDelete", + "description": "Deletes an invoice.", + "args": [ + { + "name": "id", + "description": "ID of an invoice to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "InvoiceDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "invoiceUpdate", + "description": "Updates an invoice.", + "args": [ + { + "name": "id", + "description": "ID of an invoice to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields to use when updating an invoice.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateInvoiceInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "InvoiceUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "invoiceSendNotification", + "description": "Send an invoice notification to the customer.", + "args": [ + { + "name": "id", + "description": "ID of an invoice to be sent.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "InvoiceSendNotification", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCardActivate", + "description": "Activate a gift card.", + "args": [ + { + "name": "id", + "description": "ID of a gift card to activate.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "GiftCardActivate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCardCreate", + "description": "Creates a new gift card.", + "args": [ + { + "name": "input", + "description": "Fields required to create a gift card.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "GiftCardCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "GiftCardCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCardDelete", + "description": "New in Saleor 3.1. Delete gift card.", + "args": [ + { + "name": "id", + "description": "ID of the gift card to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "GiftCardDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCardDeactivate", + "description": "Deactivate a gift card.", + "args": [ + { + "name": "id", + "description": "ID of a gift card to deactivate.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "GiftCardDeactivate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCardUpdate", + "description": "Update a gift card.", + "args": [ + { + "name": "id", + "description": "ID of a gift card to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a gift card.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "GiftCardUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "GiftCardUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCardResend", + "description": "New in Saleor 3.1. Resend a gift card.", + "args": [ + { + "name": "input", + "description": "Fields required to resend a gift card.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "GiftCardResendInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "GiftCardResend", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCardAddNote", + "description": "New in Saleor 3.1. Adds note to the gift card.", + "args": [ + { + "name": "id", + "description": "ID of the gift card to add a note for.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to create a note for the gift card.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "GiftCardAddNoteInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "GiftCardAddNote", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCardBulkCreate", + "description": "New in Saleor 3.1. Create gift cards.", + "args": [ + { + "name": "input", + "description": "Fields required to create gift cards.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "GiftCardBulkCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "GiftCardBulkCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCardBulkDelete", + "description": "New in Saleor 3.1. Delete gift cards.", + "args": [ + { + "name": "ids", + "description": "List of gift card IDs to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "GiftCardBulkDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCardBulkActivate", + "description": "New in Saleor 3.1. Activate gift cards.", + "args": [ + { + "name": "ids", + "description": "List of gift card IDs to activate.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "GiftCardBulkActivate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCardBulkDeactivate", + "description": "New in Saleor 3.1. Deactivate gift cards.", + "args": [ + { + "name": "ids", + "description": "List of gift card IDs to deactivate.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "GiftCardBulkDeactivate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pluginUpdate", + "description": "Update plugin configuration.", + "args": [ + { + "name": "channelId", + "description": "ID of a channel for which the data should be modified.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": "ID of plugin to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a plugin configuration.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "PluginUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PluginUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "externalNotificationTrigger", + "description": "New in Saleor 3.1. Trigger sending a notification with the notify plugin method. Serializes nodes provided as ids parameter and includes this data in the notification payload.", + "args": [ + { + "name": "channel", + "description": "Channel slug. Saleor will send a notification within a provided channel. Please, make sure that necessary plugins are active.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Input for External Notification Trigger. ", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalNotificationTriggerInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pluginId", + "description": "The ID of notification plugin.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ExternalNotificationTrigger", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "saleCreate", + "description": "Creates a new sale.", + "args": [ + { + "name": "input", + "description": "Fields required to create a sale.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "SaleInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "SaleCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "saleDelete", + "description": "Deletes a sale.", + "args": [ + { + "name": "id", + "description": "ID of a sale to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "SaleDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "saleBulkDelete", + "description": "Deletes sales.", + "args": [ + { + "name": "ids", + "description": "List of sale IDs to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "SaleBulkDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "saleUpdate", + "description": "Updates a sale.", + "args": [ + { + "name": "id", + "description": "ID of a sale to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a sale.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "SaleInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "SaleUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "saleCataloguesAdd", + "description": "Adds products, categories, collections to a voucher.", + "args": [ + { + "name": "id", + "description": "ID of a sale.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to modify catalogue IDs of sale.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CatalogueInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "SaleAddCatalogues", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "saleCataloguesRemove", + "description": "Removes products, categories, collections from a sale.", + "args": [ + { + "name": "id", + "description": "ID of a sale.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to modify catalogue IDs of sale.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CatalogueInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "SaleRemoveCatalogues", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "saleTranslate", + "description": "Creates/updates translations for a sale.", + "args": [ + { + "name": "id", + "description": "Sale ID or SaleTranslatableContent ID.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NameTranslationInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": "Translation language code.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "SaleTranslate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "saleChannelListingUpdate", + "description": "Manage sale's availability in channels.", + "args": [ + { + "name": "id", + "description": "ID of a sale to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update sale channel listings.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "SaleChannelListingInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "SaleChannelListingUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "voucherCreate", + "description": "Creates a new voucher.", + "args": [ + { + "name": "input", + "description": "Fields required to create a voucher.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "VoucherInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "VoucherCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "voucherDelete", + "description": "Deletes a voucher.", + "args": [ + { + "name": "id", + "description": "ID of a voucher to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "VoucherDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "voucherBulkDelete", + "description": "Deletes vouchers.", + "args": [ + { + "name": "ids", + "description": "List of voucher IDs to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "VoucherBulkDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "voucherUpdate", + "description": "Updates a voucher.", + "args": [ + { + "name": "id", + "description": "ID of a voucher to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a voucher.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "VoucherInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "VoucherUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "voucherCataloguesAdd", + "description": "Adds products, categories, collections to a voucher.", + "args": [ + { + "name": "id", + "description": "ID of a voucher.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to modify catalogue IDs of voucher.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CatalogueInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "VoucherAddCatalogues", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "voucherCataloguesRemove", + "description": "Removes products, categories, collections from a voucher.", + "args": [ + { + "name": "id", + "description": "ID of a voucher.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to modify catalogue IDs of voucher.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CatalogueInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "VoucherRemoveCatalogues", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "voucherTranslate", + "description": "Creates/updates translations for a voucher.", + "args": [ + { + "name": "id", + "description": "Voucher ID or VoucherTranslatableContent ID.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NameTranslationInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": "Translation language code.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "VoucherTranslate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "voucherChannelListingUpdate", + "description": "Manage voucher's availability in channels.", + "args": [ + { + "name": "id", + "description": "ID of a voucher to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update voucher channel listings.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "VoucherChannelListingInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "VoucherChannelListingUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "exportProducts", + "description": "Export products to csv file.", + "args": [ + { + "name": "input", + "description": "Fields required to export product data.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExportProductsInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ExportProducts", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "exportGiftCards", + "description": "New in Saleor 3.1. Export gift cards to csv file.", + "args": [ + { + "name": "input", + "description": "Fields required to export gift cards data.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExportGiftCardsInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ExportGiftCards", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fileUpload", + "description": "Upload a file. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec", + "args": [ + { + "name": "file", + "description": "Represents a file in a multipart request.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Upload", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "FileUpload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutAddPromoCode", + "description": "Adds a gift card or a voucher to a checkout.", + "args": [ + { + "name": "checkoutId", + "description": "The ID of the checkout. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use token instead.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "promoCode", + "description": "Gift card code or voucher code.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "Checkout token.", + "type": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutAddPromoCode", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutBillingAddressUpdate", + "description": "Update billing address in the existing checkout.", + "args": [ + { + "name": "billingAddress", + "description": "The billing address of the checkout.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutId", + "description": "The ID of the checkout. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use token instead.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "Checkout token.", + "type": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutBillingAddressUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutComplete", + "description": "Completes the checkout. As a result a new order is created and a payment charge is made. This action requires a successful payment before it can be performed. In case additional confirmation step as 3D secure is required confirmationNeeded flag will be set to True and no order created until payment is confirmed with second call of this mutation.", + "args": [ + { + "name": "checkoutId", + "description": "The ID of the checkout. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use token instead.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentData", + "description": "Client-side generated data required to finalize the payment.", + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "redirectUrl", + "description": "URL of a view where users should be redirected to see the order details. URL in RFC 1808 format.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "storeSource", + "description": "Determines whether to store the payment source for future usage. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use checkoutPaymentCreate for this action.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "Checkout token.", + "type": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutComplete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutCreate", + "description": "Create a new checkout.", + "args": [ + { + "name": "input", + "description": "Fields required to create checkout.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutCustomerAttach", + "description": "Sets the customer as the owner of the checkout.", + "args": [ + { + "name": "checkoutId", + "description": "The ID of the checkout. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use token instead.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "customerId", + "description": "ID of customer to attach to checkout. Can be used to attach customer to checkout by staff or app. Requires IMPERSONATE_USER permission.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "Checkout token.", + "type": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutCustomerAttach", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutCustomerDetach", + "description": "Removes the user assigned as the owner of the checkout.", + "args": [ + { + "name": "checkoutId", + "description": "The ID of the checkout. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use token instead.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "Checkout token.", + "type": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutCustomerDetach", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutEmailUpdate", + "description": "Updates email address in the existing checkout object.", + "args": [ + { + "name": "checkoutId", + "description": "The ID of the checkout. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use token instead.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "email", + "description": "email.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "Checkout token.", + "type": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutEmailUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutLineDelete", + "description": "Deletes a CheckoutLine.", + "args": [ + { + "name": "checkoutId", + "description": "The ID of the checkout. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use token instead.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lineId", + "description": "ID of the checkout line to delete.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "Checkout token.", + "type": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutLineDelete", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "DEPRECATED: Will be removed in Saleor 4.0. Use `checkoutLinesDelete` instead." + }, + { + "name": "checkoutLinesDelete", + "description": "Deletes checkout lines.", + "args": [ + { + "name": "linesIds", + "description": "A list of checkout lines.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "Checkout token.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutLinesDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutLinesAdd", + "description": "Adds a checkout line to the existing checkout.If line was already in checkout, its quantity will be increased.", + "args": [ + { + "name": "checkoutId", + "description": "The ID of the checkout. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use token instead.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lines", + "description": "A list of checkout lines, each containing information about an item in the checkout.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutLineInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "Checkout token.", + "type": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutLinesAdd", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutLinesUpdate", + "description": "Updates checkout line in the existing checkout.", + "args": [ + { + "name": "checkoutId", + "description": "The ID of the checkout. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use token instead.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lines", + "description": "A list of checkout lines, each containing information about an item in the checkout.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutLineInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "Checkout token.", + "type": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutLinesUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutRemovePromoCode", + "description": "Remove a gift card or a voucher from a checkout.", + "args": [ + { + "name": "checkoutId", + "description": "The ID of the checkout. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use token instead.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "promoCode", + "description": "Gift card code or voucher code.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "promoCodeId", + "description": "Gift card or voucher ID.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "Checkout token.", + "type": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutRemovePromoCode", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutPaymentCreate", + "description": "Create a new payment for given checkout.", + "args": [ + { + "name": "checkoutId", + "description": "The ID of the checkout. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use token instead.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Data required to create a new payment.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "PaymentInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "Checkout token.", + "type": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutPaymentCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutShippingAddressUpdate", + "description": "Update shipping address in the existing checkout.", + "args": [ + { + "name": "checkoutId", + "description": "The ID of the checkout. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use token instead.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingAddress", + "description": "The mailing address to where the checkout will be shipped.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "Checkout token.", + "type": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutShippingAddressUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutShippingMethodUpdate", + "description": "Updates the shipping method of the checkout.", + "args": [ + { + "name": "checkoutId", + "description": "The ID of the checkout. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use token instead.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingMethodId", + "description": "Shipping method.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "Checkout token.", + "type": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutShippingMethodUpdate", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `checkoutDeliveryMethodUpdate` instead." + }, + { + "name": "checkoutDeliveryMethodUpdate", + "description": "New in Saleor 3.1. Updates the delivery method (shipping method or pick up point) of the checkout.", + "args": [ + { + "name": "deliveryMethodId", + "description": "Delivery Method ID (`Warehouse` ID or `ShippingMethod` ID).", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "Checkout token.", + "type": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutDeliveryMethodUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutLanguageCodeUpdate", + "description": "Update language code in the existing checkout.", + "args": [ + { + "name": "checkoutId", + "description": "The ID of the checkout. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use token instead.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": "New language code.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "Checkout token.", + "type": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutLanguageCodeUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channelCreate", + "description": "Creates new channel.", + "args": [ + { + "name": "input", + "description": "Fields required to create channel.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ChannelCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ChannelCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channelUpdate", + "description": "Update a channel.", + "args": [ + { + "name": "id", + "description": "ID of a channel to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a channel.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ChannelUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ChannelUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channelDelete", + "description": "Delete a channel. Orders associated with the deleted channel will be moved to the target channel. Checkouts, product availability, and pricing will be removed.", + "args": [ + { + "name": "id", + "description": "ID of a channel to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to delete a channel.", + "type": { + "kind": "INPUT_OBJECT", + "name": "ChannelDeleteInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ChannelDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channelActivate", + "description": "Activate a channel.", + "args": [ + { + "name": "id", + "description": "ID of the channel to activate.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ChannelActivate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channelDeactivate", + "description": "Deactivate a channel.", + "args": [ + { + "name": "id", + "description": "ID of the channel to deactivate.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ChannelDeactivate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeCreate", + "description": "Creates an attribute.", + "args": [ + { + "name": "input", + "description": "Fields required to create an attribute.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AttributeCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AttributeCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeDelete", + "description": "Deletes an attribute.", + "args": [ + { + "name": "id", + "description": "ID of an attribute to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AttributeDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeUpdate", + "description": "Updates attribute.", + "args": [ + { + "name": "id", + "description": "ID of an attribute to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update an attribute.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AttributeUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AttributeUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeTranslate", + "description": "Creates/updates translations for an attribute.", + "args": [ + { + "name": "id", + "description": "Attribute ID or AttributeTranslatableContent ID.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NameTranslationInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": "Translation language code.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AttributeTranslate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeBulkDelete", + "description": "Deletes attributes.", + "args": [ + { + "name": "ids", + "description": "List of attribute IDs to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AttributeBulkDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeValueBulkDelete", + "description": "Deletes values of attributes.", + "args": [ + { + "name": "ids", + "description": "List of attribute value IDs to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AttributeValueBulkDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeValueCreate", + "description": "Creates a value for an attribute.", + "args": [ + { + "name": "attribute", + "description": "Attribute to which value will be assigned.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to create an AttributeValue.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AttributeValueCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AttributeValueCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeValueDelete", + "description": "Deletes a value of an attribute.", + "args": [ + { + "name": "id", + "description": "ID of a value to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AttributeValueDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeValueUpdate", + "description": "Updates value of an attribute.", + "args": [ + { + "name": "id", + "description": "ID of an AttributeValue to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update an AttributeValue.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AttributeValueUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AttributeValueUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeValueTranslate", + "description": "Creates/updates translations for an attribute value.", + "args": [ + { + "name": "id", + "description": "AttributeValue ID or AttributeValueTranslatableContent ID.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AttributeValueTranslationInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": "Translation language code.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AttributeValueTranslate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeReorderValues", + "description": "Reorder the values of an attribute.", + "args": [ + { + "name": "attributeId", + "description": "ID of an attribute.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "moves", + "description": "The list of reordering operations for given attribute values.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ReorderInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AttributeReorderValues", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appCreate", + "description": "Creates a new app.", + "args": [ + { + "name": "input", + "description": "Fields required to create a new app.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AppInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AppCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appUpdate", + "description": "Updates an existing app.", + "args": [ + { + "name": "id", + "description": "ID of an app to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update an existing app.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AppInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AppUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appDelete", + "description": "Deletes an app.", + "args": [ + { + "name": "id", + "description": "ID of an app to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AppDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appTokenCreate", + "description": "Creates a new token.", + "args": [ + { + "name": "input", + "description": "Fields required to create a new auth token.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AppTokenInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AppTokenCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appTokenDelete", + "description": "Deletes an authentication token assigned to app.", + "args": [ + { + "name": "id", + "description": "ID of an auth token to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AppTokenDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appTokenVerify", + "description": "Verify provided app token.", + "args": [ + { + "name": "token", + "description": "App token to verify.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AppTokenVerify", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appInstall", + "description": "Install new app by using app manifest.", + "args": [ + { + "name": "input", + "description": "Fields required to install a new app.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AppInstallInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AppInstall", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appRetryInstall", + "description": "Retry failed installation of new app.", + "args": [ + { + "name": "activateAfterInstallation", + "description": "Determine if app will be set active or not.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "true", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": "ID of failed installation.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AppRetryInstall", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appDeleteFailedInstallation", + "description": "Delete failed installation.", + "args": [ + { + "name": "id", + "description": "ID of failed installation to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AppDeleteFailedInstallation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appFetchManifest", + "description": "Fetch and validate manifest.", + "args": [ + { + "name": "manifestUrl", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AppFetchManifest", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appActivate", + "description": "Activate the app.", + "args": [ + { + "name": "id", + "description": "ID of app to activate.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AppActivate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appDeactivate", + "description": "Deactivate the app.", + "args": [ + { + "name": "id", + "description": "ID of app to deactivate.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AppDeactivate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tokenCreate", + "description": "Create JWT token.", + "args": [ + { + "name": "email", + "description": "Email of a user.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "password", + "description": "Password of a user.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CreateToken", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tokenRefresh", + "description": "Refresh JWT token. Mutation tries to take refreshToken from the input.If it fails it will try to take refreshToken from the http-only cookie -refreshToken. csrfToken is required when refreshToken is provided as a cookie.", + "args": [ + { + "name": "csrfToken", + "description": "CSRF token required to refresh token. This argument is required when refreshToken is provided as a cookie.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "refreshToken", + "description": "Refresh token.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "RefreshToken", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tokenVerify", + "description": "Verify JWT token.", + "args": [ + { + "name": "token", + "description": "JWT token to validate.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "VerifyToken", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tokensDeactivateAll", + "description": "Deactivate all JWT tokens of the currently authenticated user.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "DeactivateAllUserTokens", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "externalAuthenticationUrl", + "description": "Prepare external authentication url for user by custom plugin.", + "args": [ + { + "name": "input", + "description": "The data required by plugin to create external authentication url.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pluginId", + "description": "The ID of the authentication plugin.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ExternalAuthenticationUrl", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "externalObtainAccessTokens", + "description": "Obtain external access tokens for user by custom plugin.", + "args": [ + { + "name": "input", + "description": "The data required by plugin to create authentication data.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pluginId", + "description": "The ID of the authentication plugin.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ExternalObtainAccessTokens", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "externalRefresh", + "description": "Refresh user's access by custom plugin.", + "args": [ + { + "name": "input", + "description": "The data required by plugin to proceed the refresh process.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pluginId", + "description": "The ID of the authentication plugin.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ExternalRefresh", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "externalLogout", + "description": "Logout user by custom plugin.", + "args": [ + { + "name": "input", + "description": "The data required by plugin to proceed the logout process.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pluginId", + "description": "The ID of the authentication plugin.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ExternalLogout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "externalVerify", + "description": "Verify external authentication data by plugin.", + "args": [ + { + "name": "input", + "description": "The data required by plugin to proceed the verification.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pluginId", + "description": "The ID of the authentication plugin.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ExternalVerify", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "requestPasswordReset", + "description": "Sends an email with the account password modification link.", + "args": [ + { + "name": "channel", + "description": "Slug of a channel which will be used for notify user. Optional when only one channel exists.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "email", + "description": "Email of the user that will be used for password recovery.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "redirectUrl", + "description": "URL of a view where users should be redirected to reset the password. URL in RFC 1808 format.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "RequestPasswordReset", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "confirmAccount", + "description": "Confirm user account with token sent by email during registration.", + "args": [ + { + "name": "email", + "description": "E-mail of the user performing account confirmation.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "A one-time token required to confirm the account.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ConfirmAccount", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "setPassword", + "description": "Sets the user's password from the token sent by email using the RequestPasswordReset mutation.", + "args": [ + { + "name": "email", + "description": "Email of a user.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "password", + "description": "Password of a user.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "A one-time token required to set the password.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "SetPassword", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "passwordChange", + "description": "Change the password of the logged in user.", + "args": [ + { + "name": "newPassword", + "description": "New user password.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "oldPassword", + "description": "Current user password.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PasswordChange", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "requestEmailChange", + "description": "Request email change of the logged in user.", + "args": [ + { + "name": "channel", + "description": "Slug of a channel which will be used to notify users. Optional when only one channel exists.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "newEmail", + "description": "New user email.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "password", + "description": "User password.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "redirectUrl", + "description": "URL of a view where users should be redirected to update the email address. URL in RFC 1808 format.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "RequestEmailChange", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "confirmEmailChange", + "description": "Confirm the email change of the logged-in user.", + "args": [ + { + "name": "channel", + "description": "Slug of a channel which will be used to notify users. Optional when only one channel exists.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "A one-time token required to change the email.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ConfirmEmailChange", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountAddressCreate", + "description": "Create a new address for the customer.", + "args": [ + { + "name": "input", + "description": "Fields required to create address.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "A type of address. If provided, the new address will be automatically assigned as the customer's default address of that type.", + "type": { + "kind": "ENUM", + "name": "AddressTypeEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AccountAddressCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountAddressUpdate", + "description": "Updates an address of the logged-in user.", + "args": [ + { + "name": "id", + "description": "ID of the address to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update the address.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AccountAddressUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountAddressDelete", + "description": "Delete an address of the logged-in user.", + "args": [ + { + "name": "id", + "description": "ID of the address to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AccountAddressDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountSetDefaultAddress", + "description": "Sets a default address for the authenticated user.", + "args": [ + { + "name": "id", + "description": "ID of the address to set as default.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "The type of address.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AddressTypeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AccountSetDefaultAddress", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountRegister", + "description": "Register a new user.", + "args": [ + { + "name": "input", + "description": "Fields required to create a user.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AccountRegisterInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AccountRegister", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountUpdate", + "description": "Updates the account of the logged-in user.", + "args": [ + { + "name": "input", + "description": "Fields required to update the account of the logged-in user.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AccountInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AccountUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountRequestDeletion", + "description": "Sends an email with the account removal link for the logged-in user.", + "args": [ + { + "name": "channel", + "description": "Slug of a channel which will be used to notify users. Optional when only one channel exists.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "redirectUrl", + "description": "URL of a view where users should be redirected to delete their account. URL in RFC 1808 format.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AccountRequestDeletion", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountDelete", + "description": "Remove user account.", + "args": [ + { + "name": "token", + "description": "A one-time token required to remove account. Sent by email using AccountRequestDeletion mutation.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AccountDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addressCreate", + "description": "Creates user address.", + "args": [ + { + "name": "input", + "description": "Fields required to create address.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "userId", + "description": "ID of a user to create address for.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AddressCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addressUpdate", + "description": "Updates an address.", + "args": [ + { + "name": "id", + "description": "ID of the address to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update the address.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AddressUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addressDelete", + "description": "Deletes an address.", + "args": [ + { + "name": "id", + "description": "ID of the address to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AddressDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addressSetDefault", + "description": "Sets a default address for the given user.", + "args": [ + { + "name": "addressId", + "description": "ID of the address.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "The type of address.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AddressTypeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "userId", + "description": "ID of the user to change the address for.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AddressSetDefault", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "customerCreate", + "description": "Creates a new customer.", + "args": [ + { + "name": "input", + "description": "Fields required to create a customer.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UserCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CustomerCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "customerUpdate", + "description": "Updates an existing customer.", + "args": [ + { + "name": "id", + "description": "ID of a customer to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a customer.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CustomerInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CustomerUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "customerDelete", + "description": "Deletes a customer.", + "args": [ + { + "name": "id", + "description": "ID of a customer to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CustomerDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "customerBulkDelete", + "description": "Deletes customers.", + "args": [ + { + "name": "ids", + "description": "List of user IDs to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CustomerBulkDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "staffCreate", + "description": "Creates a new staff user.", + "args": [ + { + "name": "input", + "description": "Fields required to create a staff user.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "StaffCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "StaffCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "staffUpdate", + "description": "Updates an existing staff user.", + "args": [ + { + "name": "id", + "description": "ID of a staff user to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a staff user.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "StaffUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "StaffUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "staffDelete", + "description": "Deletes a staff user.", + "args": [ + { + "name": "id", + "description": "ID of a staff user to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "StaffDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "staffBulkDelete", + "description": "Deletes staff users.", + "args": [ + { + "name": "ids", + "description": "List of user IDs to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "StaffBulkDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "userAvatarUpdate", + "description": "Create a user avatar. Only for staff members. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec", + "args": [ + { + "name": "image", + "description": "Represents an image file in a multipart request.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Upload", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "UserAvatarUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "userAvatarDelete", + "description": "Deletes a user avatar. Only for staff members.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "UserAvatarDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "userBulkSetActive", + "description": "Activate or deactivate users.", + "args": [ + { + "name": "ids", + "description": "List of user IDs to (de)activate).", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isActive", + "description": "Determine if users will be set active or not.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "UserBulkSetActive", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "permissionGroupCreate", + "description": "Create new permission group.", + "args": [ + { + "name": "input", + "description": "Input fields to create permission group.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "PermissionGroupCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PermissionGroupCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "permissionGroupUpdate", + "description": "Update permission group.", + "args": [ + { + "name": "id", + "description": "ID of the group to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Input fields to create permission group.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "PermissionGroupUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PermissionGroupUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "permissionGroupDelete", + "description": "Delete permission group.", + "args": [ + { + "name": "id", + "description": "ID of the group to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PermissionGroupDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "NameTranslationInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "NavigationType", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "MAIN", + "description": "Main storefront navigation.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SECONDARY", + "description": "Secondary storefront navigation.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INTERFACE", + "name": "Node", + "description": "An object with an ID", + "fields": [ + { + "name": "id", + "description": "The ID of the object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Address", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Allocation", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "App", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "AppExtension", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "AppInstallation", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "AppToken", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Attribute", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "AttributeTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "AttributeTranslation", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "AttributeValue", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "AttributeValueTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "AttributeValueTranslation", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Category", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "CategoryTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "CategoryTranslation", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Channel", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "CheckoutLine", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Collection", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "CollectionChannelListing", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "CollectionTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "CollectionTranslation", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "CustomerEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "DigitalContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "DigitalContentUrl", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "EventDelivery", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "EventDeliveryAttempt", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ExportEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ExportFile", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Fulfillment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "FulfillmentLine", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "GiftCard", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "GiftCardEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "GiftCardTag", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Group", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Invoice", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Menu", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "MenuItem", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "MenuItemTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "MenuItemTranslation", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "OrderDiscount", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "OrderEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "OrderLine", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Page", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PageTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PageTranslation", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PageType", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Payment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Product", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ProductChannelListing", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ProductMedia", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ProductTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ProductTranslation", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ProductType", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantChannelListing", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantTranslation", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Sale", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "SaleChannelListing", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "SaleTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "SaleTranslation", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ShippingMethod", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ShippingMethodChannelListing", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ShippingMethodPostalCodeRule", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ShippingMethodTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ShippingMethodTranslation", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ShippingMethodType", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ShippingZone", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ShopTranslation", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "StaffNotificationRecipient", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Stock", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Transaction", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Voucher", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "VoucherChannelListing", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "VoucherTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "VoucherTranslation", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Warehouse", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Webhook", + "ofType": null + } + ] + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "description": null, + "fields": [ + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "App", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Attribute", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Category", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Collection", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "DigitalContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Fulfillment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "GiftCard", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Invoice", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Menu", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "MenuItem", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Page", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PageType", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Payment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Product", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ProductType", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Sale", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ShippingMethod", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ShippingMethodType", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ShippingZone", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Voucher", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Warehouse", + "ofType": null + } + ] + }, + { + "kind": "OBJECT", + "name": "Order", + "description": "Represents an order in the shop.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "created", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "status", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderStatus", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "trackingClientId", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "billingAddress", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Address", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingAddress", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Address", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingMethodName", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collectionPointName", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Channel", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fulfillments", + "description": "List of shipments for the order.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Fulfillment", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lines", + "description": "List of order lines.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderLine", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "actions", + "description": "List of actions that can be performed in the current state of an order.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderAction", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "availableShippingMethods", + "description": "Shipping methods that can be used with this order.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingMethod", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "Use `shippingMethods`, this field will be removed in 4.0" + }, + { + "name": "shippingMethods", + "description": "Shipping methods related to this order.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingMethod", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "availableCollectionPoints", + "description": "New in Saleor 3.1. Collection points that can be used for this order.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Warehouse", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "invoices", + "description": "List of order invoices.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Invoice", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "number", + "description": "User-friendly number of an order.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "original", + "description": "The ID of the order that was the base for this order.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "origin", + "description": "The order origin.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderOriginEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isPaid", + "description": "Informs if an order is fully paid.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentStatus", + "description": "Internal payment status.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PaymentChargeStatusEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentStatusDisplay", + "description": "User-friendly payment status.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "payments", + "description": "List of payments for the order.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Payment", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "total", + "description": "Total amount of the order.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "undiscountedTotal", + "description": "Undiscounted total amount of the order.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingMethod", + "description": "Shipping method for this order.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ShippingMethod", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `deliveryMethod` instead." + }, + { + "name": "shippingPrice", + "description": "Total price of shipping.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingTaxRate", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "voucher", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Voucher", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCards", + "description": "List of user gift cards.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCard", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "displayGrossPrices", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "customerNote", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "weight", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Weight", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "redirectUrl", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subtotal", + "description": "The sum of line prices not including shipping.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "statusDisplay", + "description": "User-friendly order status.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "canFinalize", + "description": "Informs whether a draft order can be finalized(turned into a regular order).", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalAuthorized", + "description": "Amount authorized for the order.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCaptured", + "description": "Amount captured by payment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "events", + "description": "List of events associated with the order.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderEvent", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalBalance", + "description": "The difference between the paid and the order total amount.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "userEmail", + "description": "Email address of the customer.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isShippingRequired", + "description": "Returns True, if order requires shipping.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deliveryMethod", + "description": "New in Saleor 3.1. The delivery method selected for this checkout.", + "args": [], + "type": { + "kind": "UNION", + "name": "DeliveryMethod", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use the `languageCodeEnum` field to fetch the language code. " + }, + { + "name": "languageCodeEnum", + "description": "Order language code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discount", + "description": "Returns applied discount.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use discounts field." + }, + { + "name": "discountName", + "description": "Discount name.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use discounts field." + }, + { + "name": "translatedDiscountName", + "description": "Translated discount name.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use discounts field. " + }, + { + "name": "discounts", + "description": "List of all discounts assigned to the order.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderDiscount", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "errors", + "description": "List of errors that occurred during order validation.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "OrderAction", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CAPTURE", + "description": "Represents the capture action.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MARK_AS_PAID", + "description": "Represents a mark-as-paid action.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REFUND", + "description": "Represents a refund action.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VOID", + "description": "Represents a void action.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderAddNote", + "description": "Adds note to the order.", + "fields": [ + { + "name": "order", + "description": "Order with the note added.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "event", + "description": "Order note created.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "OrderEvent", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderAddNoteInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "message", + "description": "Note message.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderBulkCancel", + "description": "Cancels orders.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderCancel", + "description": "Cancel an order.", + "fields": [ + { + "name": "order", + "description": "Canceled order.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderCapture", + "description": "Capture an order.", + "fields": [ + { + "name": "order", + "description": "Captured order.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderConfirm", + "description": "Confirms an unconfirmed order by changing status to unfulfilled.", + "fields": [ + { + "name": "order", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "OrderDirection", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ASC", + "description": "Specifies an ascending sort order.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DESC", + "description": "Specifies a descending sort order.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderDiscount", + "description": "Contains all details related to the applied discount to the order.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDiscountType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translatedName", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "valueType", + "description": "Type of the discount: fixed or percent", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "DiscountValueTypeEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "value", + "description": "Value of the discount. Can store fixed value or percent value", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reason", + "description": "Explanation for the applied discount.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "amount", + "description": "Returns amount of discount.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderDiscountAdd", + "description": "Adds discount to the order.", + "fields": [ + { + "name": "order", + "description": "Order which has been discounted.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderDiscountCommonInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "valueType", + "description": "Type of the discount: fixed or percent", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "DiscountValueTypeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "value", + "description": "Value of the discount. Can store fixed value or percent value", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reason", + "description": "Explanation for the applied discount.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderDiscountDelete", + "description": "Remove discount from the order.", + "fields": [ + { + "name": "order", + "description": "Order which has removed discount.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "OrderDiscountType", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "VOUCHER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MANUAL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderDiscountUpdate", + "description": "Update discount for the order.", + "fields": [ + { + "name": "order", + "description": "Order which has been discounted.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderDraftFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "customer", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "created", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateRangeInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channels", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "warehouse", + "description": "Warehouse ID which causes the error.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderLines", + "description": "List of order line IDs that cause the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variants", + "description": "List of product variants that are associated with the error", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addressType", + "description": "A type of address that causes the error.", + "args": [], + "type": { + "kind": "ENUM", + "name": "AddressTypeEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "OrderErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "BILLING_ADDRESS_NOT_SET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CANNOT_CANCEL_FULFILLMENT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CANNOT_CANCEL_ORDER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CANNOT_DELETE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CANNOT_DISCOUNT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CANNOT_REFUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CANNOT_FULFILL_UNPAID_ORDER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CAPTURE_INACTIVE_PAYMENT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GIFT_CARD_LINE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_EDITABLE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FULFILL_ORDER_LINE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_NOT_PUBLISHED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_UNAVAILABLE_FOR_PURCHASE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_NO_SHIPPING_ADDRESS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_MISSING", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHIPPING_METHOD_NOT_APPLICABLE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHIPPING_METHOD_REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TAX_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VOID_INACTIVE_PAYMENT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ZERO_QUANTITY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID_QUANTITY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INSUFFICIENT_STOCK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DUPLICATED_INPUT_ITEM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_AVAILABLE_IN_CHANNEL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHANNEL_INACTIVE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderEvent", + "description": "History log of the order.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "date", + "description": "Date when event happened at in ISO 8601 format.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "Order event type.", + "args": [], + "type": { + "kind": "ENUM", + "name": "OrderEventsEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": "User who performed the action.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "app", + "description": "App that performed the action.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "App", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "Content of the event.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "email", + "description": "Email of the customer.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "emailType", + "description": "Type of an email sent to the customer.", + "args": [], + "type": { + "kind": "ENUM", + "name": "OrderEventsEmailsEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "amount", + "description": "Amount of money.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentId", + "description": "The payment ID from the payment gateway.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentGateway", + "description": "The payment gateway of the payment.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantity", + "description": "Number of items.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "composedId", + "description": "Composed ID of the Fulfillment.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderNumber", + "description": "User-friendly number of an order.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "invoiceNumber", + "description": "Number of an invoice related to the order.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "oversoldItems", + "description": "List of oversold lines names.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lines", + "description": "The concerned lines.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderEventOrderLineObject", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fulfilledItems", + "description": "The lines fulfilled.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "FulfillmentLine", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "warehouse", + "description": "The warehouse were items were restocked.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Warehouse", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "transactionReference", + "description": "The transaction reference of captured payment.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingCostsIncluded", + "description": "Define if shipping costs were included to the refund.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "relatedOrder", + "description": "The order which is related to this order.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discount", + "description": "The discount applied to the order.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "OrderEventDiscountObject", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderEventCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderEventCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderEventCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderEvent", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderEventDiscountObject", + "description": null, + "fields": [ + { + "name": "valueType", + "description": "Type of the discount: fixed or percent.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "DiscountValueTypeEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "value", + "description": "Value of the discount. Can store fixed value or percent value.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reason", + "description": "Explanation for the applied discount.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "amount", + "description": "Returns amount of discount.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "oldValueType", + "description": "Type of the discount: fixed or percent.", + "args": [], + "type": { + "kind": "ENUM", + "name": "DiscountValueTypeEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "oldValue", + "description": "Value of the discount. Can store fixed value or percent value.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "oldAmount", + "description": "Returns amount of discount.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderEventOrderLineObject", + "description": null, + "fields": [ + { + "name": "quantity", + "description": "The variant quantity.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderLine", + "description": "The order line.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "OrderLine", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "itemName", + "description": "The variant name.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discount", + "description": "The discount applied to the order line.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "OrderEventDiscountObject", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "OrderEventsEmailsEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "PAYMENT_CONFIRMATION", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CONFIRMED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHIPPING_CONFIRMATION", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TRACKING_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_CONFIRMATION", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_CANCEL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_REFUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FULFILLMENT_CONFIRMATION", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DIGITAL_LINKS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "OrderEventsEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "DRAFT_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DRAFT_CREATED_FROM_REPLACE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ADDED_PRODUCTS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REMOVED_PRODUCTS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PLACED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PLACED_FROM_DRAFT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OVERSOLD_ITEMS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CANCELED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_MARKED_AS_PAID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_FULLY_PAID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_REPLACEMENT_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_DISCOUNT_ADDED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_DISCOUNT_AUTOMATICALLY_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_DISCOUNT_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_DISCOUNT_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_LINE_DISCOUNT_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_LINE_DISCOUNT_REMOVED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_LINE_PRODUCT_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_LINE_VARIANT_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UPDATED_ADDRESS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EMAIL_SENT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CONFIRMED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_AUTHORIZED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_CAPTURED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EXTERNAL_SERVICE_NOTIFICATION", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_REFUNDED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_VOIDED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_FAILED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVOICE_REQUESTED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVOICE_GENERATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVOICE_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVOICE_SENT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FULFILLMENT_CANCELED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FULFILLMENT_RESTOCKED_ITEMS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FULFILLMENT_FULFILLED_ITEMS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FULFILLMENT_REFUNDED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FULFILLMENT_RETURNED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FULFILLMENT_REPLACED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FULFILLMENT_AWAITS_APPROVAL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TRACKING_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOTE_ADDED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OTHER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "paymentStatus", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PaymentChargeStatusEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "status", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderStatusFilter", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "customer", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "created", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateRangeInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channels", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isClickAndCollect", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isPreorder", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ids", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCardUsed", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCardBought", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderFulfill", + "description": "Creates new fulfillments for an order.", + "fields": [ + { + "name": "fulfillments", + "description": "List of created fulfillments.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Fulfillment", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "order", + "description": "Fulfilled order.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderFulfillInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "lines", + "description": "List of items informing how to fulfill the order.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderFulfillLineInput", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "notifyCustomer", + "description": "If true, send an email notification to the customer.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "allowStockToBeExceeded", + "description": "If true, then allow proceed fulfillment when stock is exceeded.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false", + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderFulfillLineInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "orderLineId", + "description": "The ID of the order line.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "stocks", + "description": "List of stock items to create.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderFulfillStockInput", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderFulfillStockInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "quantity", + "description": "The number of line items to be fulfilled from given warehouse.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "warehouse", + "description": "ID of the warehouse from which the item will be fulfilled.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderLine", + "description": "Represents order line of particular order.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productName", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantName", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productSku", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariantId", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isShippingRequired", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantity", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantityFulfilled", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "unitDiscountReason", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxRate", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "digitalContentUrl", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "DigitalContentUrl", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "thumbnail", + "description": "The main thumbnail for the ordered product.", + "args": [ + { + "name": "size", + "description": "Size of thumbnail.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Image", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "unitPrice", + "description": "Price of the single item in the order line.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "undiscountedUnitPrice", + "description": "Price of the single item in the order line without applied an order line discount.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "unitDiscount", + "description": "The discount applied to the single order line.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "unitDiscountValue", + "description": "Value of the discount. Can store fixed value or percent value", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalPrice", + "description": "Price of the order line.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variant", + "description": "A purchased product variant. Note: this field may be null if the variant has been removed from stock at all.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translatedProductName", + "description": "Product name in the customer's language", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translatedVariantName", + "description": "Variant name in the customer's language", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "allocations", + "description": "List of allocations across warehouses.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Allocation", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantityToFulfill", + "description": "New in Saleor 3.1. A quantity of items remaining to be fulfilled.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "unitDiscountType", + "description": "Type of the discount: fixed or percent", + "args": [], + "type": { + "kind": "ENUM", + "name": "DiscountValueTypeEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderLineCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "quantity", + "description": "Number of variant items ordered.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantId", + "description": "Product variant ID.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderLineDelete", + "description": "Deletes an order line from an order.", + "fields": [ + { + "name": "order", + "description": "A related order.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderLine", + "description": "An order line that was deleted.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "OrderLine", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderLineDiscountRemove", + "description": "Remove discount applied to the order line.", + "fields": [ + { + "name": "orderLine", + "description": "Order line which has removed discount.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "OrderLine", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "order", + "description": "Order which is related to line which has removed discount.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderLineDiscountUpdate", + "description": "Update discount for the order line.", + "fields": [ + { + "name": "orderLine", + "description": "Order line which has been discounted.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "OrderLine", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "order", + "description": "Order which is related to the discounted line.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderLineInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "quantity", + "description": "Number of variant items ordered.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderLineUpdate", + "description": "Updates an order line of an order.", + "fields": [ + { + "name": "order", + "description": "Related order.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderLine", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "OrderLine", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderLinesCreate", + "description": "Create order lines for an order.", + "fields": [ + { + "name": "order", + "description": "Related order.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderLines", + "description": "List of added order lines.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderLine", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderMarkAsPaid", + "description": "Mark order as manually paid.", + "fields": [ + { + "name": "order", + "description": "Order marked as paid.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "OrderOriginEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CHECKOUT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DRAFT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REISSUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderRefund", + "description": "Refund an order.", + "fields": [ + { + "name": "order", + "description": "A refunded order.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderRefundFulfillmentLineInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "fulfillmentLineId", + "description": "The ID of the fulfillment line to refund.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantity", + "description": "The number of items to be refunded.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderRefundLineInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "orderLineId", + "description": "The ID of the order line to refund.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantity", + "description": "The number of items to be refunded.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderRefundProductsInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "orderLines", + "description": "List of unfulfilled lines to refund.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderRefundLineInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fulfillmentLines", + "description": "List of fulfilled lines to refund.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderRefundFulfillmentLineInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "amountToRefund", + "description": "The total amount of refund when the value is provided manually.", + "type": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "includeShippingCosts", + "description": "If true, Saleor will refund shipping costs. If amountToRefund is providedincludeShippingCosts will be ignored.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false", + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderReturnFulfillmentLineInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "fulfillmentLineId", + "description": "The ID of the fulfillment line to return.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantity", + "description": "The number of items to be returned.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "replace", + "description": "Determines, if the line should be added to replace order.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false", + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderReturnLineInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "orderLineId", + "description": "The ID of the order line to return.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantity", + "description": "The number of items to be returned.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "replace", + "description": "Determines, if the line should be added to replace order.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false", + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderReturnProductsInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "orderLines", + "description": "List of unfulfilled lines to return.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderReturnLineInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fulfillmentLines", + "description": "List of fulfilled lines to return.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderReturnFulfillmentLineInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "amountToRefund", + "description": "The total amount of refund when the value is provided manually.", + "type": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "includeShippingCosts", + "description": "If true, Saleor will refund shipping costs. If amountToRefund is providedincludeShippingCosts will be ignored.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "refund", + "description": "If true, Saleor will call refund action for all lines.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false", + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderSettings", + "description": "Order related settings from site settings.", + "fields": [ + { + "name": "automaticallyConfirmAllNewOrders", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "automaticallyFulfillNonShippableGiftCard", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderSettingsError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderSettingsErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "OrderSettingsErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderSettingsUpdate", + "description": "Update shop order settings.", + "fields": [ + { + "name": "orderSettings", + "description": "Order settings.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "OrderSettings", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderSettingsErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderSettingsError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderSettingsError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderSettingsUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "automaticallyConfirmAllNewOrders", + "description": "When disabled, all new orders from checkout will be marked as unconfirmed. When enabled orders from checkout will become unfulfilled immediately.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "automaticallyFulfillNonShippableGiftCard", + "description": "When enabled, all non-shippable gift card orders will be fulfilled automatically.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "OrderSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NUMBER", + "description": "Sort orders by number.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CREATION_DATE", + "description": "Sort orders by creation date.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUSTOMER", + "description": "Sort orders by customer.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT", + "description": "Sort orders by payment.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FULFILLMENT_STATUS", + "description": "Sort orders by fulfillment status.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort orders by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "OrderStatus", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "DRAFT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNCONFIRMED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNFULFILLED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PARTIALLY_FULFILLED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PARTIALLY_RETURNED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RETURNED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FULFILLED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CANCELED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "OrderStatusFilter", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "READY_TO_FULFILL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "READY_TO_CAPTURE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNFULFILLED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNCONFIRMED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PARTIALLY_FULFILLED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FULFILLED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CANCELED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderUpdate", + "description": "Updates an order.", + "fields": [ + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "order", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "billingAddress", + "description": "Billing address of the customer.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "userEmail", + "description": "Email address of the customer.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingAddress", + "description": "Shipping address of the customer.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderUpdateShipping", + "description": "Updates a shipping method of the order. Requires shipping method ID to update, when null is passed then currently assigned shipping method is removed.", + "fields": [ + { + "name": "order", + "description": "Order with updated shipping method.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderUpdateShippingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "shippingMethod", + "description": "ID of the selected shipping method, pass null to remove currently assigned shipping method.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrderVoid", + "description": "Void an order.", + "fields": [ + { + "name": "order", + "description": "A voided order.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Page", + "description": "A static page that can be manually added by a shop operator through the dashboard.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoTitle", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoDescription", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "title", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "content", + "description": "Content of the page (JSON).", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "publicationDate", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isPublished", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageType", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "created", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "contentJson", + "description": "Content of the page (JSON).", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use the `content` field instead." + }, + { + "name": "translation", + "description": "Returns translated page fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for page.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PageTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributes", + "description": "List of attributes assigned to this product.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SelectedAttribute", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageAttributeAssign", + "description": "Assign attributes to a given page type.", + "fields": [ + { + "name": "pageType", + "description": "The updated page type.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "PageType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageAttributeUnassign", + "description": "Unassign attributes from a given page type.", + "fields": [ + { + "name": "pageType", + "description": "The updated page type.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "PageType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageBulkDelete", + "description": "Deletes pages.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageBulkPublish", + "description": "Publish pages.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Page", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageCreate", + "description": "Creates a new page.", + "fields": [ + { + "name": "pageErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "page", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Page", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PageCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "slug", + "description": "Page internal name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "title", + "description": "Page title.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "content", + "description": "Page content in JSON format.", + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributes", + "description": "List of attributes.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AttributeValueInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isPublished", + "description": "Determines if page is visible in the storefront.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "publicationDate", + "description": "Publication date. ISO 8601 standard.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seo", + "description": "Search engine optimization fields.", + "type": { + "kind": "INPUT_OBJECT", + "name": "SeoInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageType", + "description": "ID of the page type that page belongs to.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageDelete", + "description": "Deletes a page.", + "fields": [ + { + "name": "pageErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "page", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Page", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PageErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributes", + "description": "List of attributes IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "values", + "description": "List of attribute values IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "PageErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DUPLICATED_INPUT_ITEM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ATTRIBUTE_ALREADY_ASSIGNED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PageFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageTypes", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ids", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageInfo", + "description": "The Relay compliant `PageInfo` type, containing data necessary to paginate this connection.", + "fields": [ + { + "name": "hasNextPage", + "description": "When paginating forwards, are there more items?", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasPreviousPage", + "description": "When paginating backwards, are there more items?", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "startCursor", + "description": "When paginating backwards, the cursor to continue.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "endCursor", + "description": "When paginating forwards, the cursor to continue.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PageInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "slug", + "description": "Page internal name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "title", + "description": "Page title.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "content", + "description": "Page content in JSON format.", + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributes", + "description": "List of attributes.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AttributeValueInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isPublished", + "description": "Determines if page is visible in the storefront.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "publicationDate", + "description": "Publication date. ISO 8601 standard.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seo", + "description": "Search engine optimization fields.", + "type": { + "kind": "INPUT_OBJECT", + "name": "SeoInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageReorderAttributeValues", + "description": "Reorder page attribute values.", + "fields": [ + { + "name": "page", + "description": "Page from which attribute values are reordered.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Page", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "PageSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "TITLE", + "description": "Sort pages by title.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SLUG", + "description": "Sort pages by slug.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VISIBILITY", + "description": "Sort pages by visibility.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CREATION_DATE", + "description": "Sort pages by creation date.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PUBLICATION_DATE", + "description": "Sort pages by publication date.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PageSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort pages by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PageSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageTranslatableContent", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoTitle", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoDescription", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "title", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "content", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "contentJson", + "description": "Content of the page (JSON).", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use the `content` field instead." + }, + { + "name": "translation", + "description": "Returns translated page fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for page.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PageTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "page", + "description": "('A static page that can be manually added by a shop operator ', 'through the dashboard.')", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Page", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Get model fields from the root level queries." + }, + { + "name": "attributeValues", + "description": "List of page content attribute values that can be translated.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeValueTranslatableContent", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageTranslate", + "description": "Creates/updates translations for a page.", + "fields": [ + { + "name": "translationErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "page", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "PageTranslatableContent", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageTranslation", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "language", + "description": "Translation language.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LanguageDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoTitle", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoDescription", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "title", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "content", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "contentJson", + "description": "Translated description of the page (JSON).", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use the `content` field instead." + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PageTranslationInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "seoTitle", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoDescription", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "title", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "content", + "description": null, + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageType", + "description": "Represents a type of page. It defines what attributes are available to pages of this type.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributes", + "description": "Page attributes of that page type.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Attribute", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "availableAttributes", + "description": "Attributes that can be assigned to the page type.", + "args": [ + { + "name": "filter", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "AttributeFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AttributeCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasPages", + "description": "Whether page type has pages assigned.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageTypeBulkDelete", + "description": "Delete page types.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageTypeCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageTypeCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageTypeCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageTypeCreate", + "description": "Create a new page type.", + "fields": [ + { + "name": "pageErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageType", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "PageType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PageTypeCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "Name of the page type.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "Page type slug.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addAttributes", + "description": "List of attribute IDs to be assigned to the page type.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageTypeDelete", + "description": "Delete a page type.", + "fields": [ + { + "name": "pageErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageType", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "PageType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PageTypeFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageTypeReorderAttributes", + "description": "Reorder the attributes of a page type.", + "fields": [ + { + "name": "pageType", + "description": "Page type from which attributes are reordered.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "PageType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "PageTypeSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NAME", + "description": "Sort page types by name.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SLUG", + "description": "Sort page types by slug.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PageTypeSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort page types by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PageTypeSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageTypeUpdate", + "description": "Update page type.", + "fields": [ + { + "name": "pageErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageType", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "PageType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PageTypeUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "Name of the page type.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "Page type slug.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addAttributes", + "description": "List of attribute IDs to be assigned to the page type.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeAttributes", + "description": "List of attribute IDs to be assigned to the page type.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageUpdate", + "description": "Updates an existing page.", + "fields": [ + { + "name": "pageErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "page", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Page", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PasswordChange", + "description": "Change the password of the logged in user.", + "fields": [ + { + "name": "user", + "description": "A user instance with a new password.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Payment", + "description": "Represents a payment of a given type.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "gateway", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isActive", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "created", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "modified", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkout", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "order", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentMethodType", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "customerIpAddress", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chargeStatus", + "description": "Internal payment status.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PaymentChargeStatusEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "actions", + "description": "List of actions that can be performed in the current state of a payment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderAction", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "total", + "description": "Total amount of the payment.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "capturedAmount", + "description": "Total amount captured for this payment.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "transactions", + "description": "List of all transactions within this payment.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Transaction", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "availableCaptureAmount", + "description": "Maximum amount of money that can be captured.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "availableRefundAmount", + "description": "Maximum amount of money that can be refunded.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "creditCard", + "description": "The details of the card used for this payment.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "CreditCard", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PaymentCapture", + "description": "Captures the authorized payment amount.", + "fields": [ + { + "name": "payment", + "description": "Updated payment.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Payment", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PaymentError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PaymentError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "PaymentChargeStatusEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NOT_CHARGED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PENDING", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PARTIALLY_CHARGED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FULLY_CHARGED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PARTIALLY_REFUNDED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FULLY_REFUNDED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REFUSED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CANCELLED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PaymentCheckBalance", + "description": "Check payment balance.", + "fields": [ + { + "name": "data", + "description": "Response from the gateway.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PaymentError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PaymentError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PaymentCheckBalanceInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "gatewayId", + "description": "An ID of a payment gateway to check.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "method", + "description": "Payment method name.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "card", + "description": "Information about card.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CardInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PaymentCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PaymentCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PaymentCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Payment", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PaymentError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PaymentErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variants", + "description": "List of varint IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "PaymentErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "BILLING_ADDRESS_NOT_SET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PARTIAL_PAYMENT_NOT_ALLOWED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHIPPING_ADDRESS_NOT_SET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID_SHIPPING_METHOD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHIPPING_METHOD_NOT_SET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_SUPPORTED_GATEWAY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHANNEL_INACTIVE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BALANCE_CHECK_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHECKOUT_EMAIL_NOT_SET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNAVAILABLE_VARIANT_IN_CHANNEL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NO_CHECKOUT_LINES", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PaymentFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "checkouts", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PaymentGateway", + "description": "Available payment gateway backend with configuration necessary to setup client.", + "fields": [ + { + "name": "name", + "description": "Payment gateway name.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": "Payment gateway ID.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "config", + "description": "Payment gateway client configuration.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GatewayConfigLine", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "currencies", + "description": "Payment gateway supported currencies.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PaymentInitialize", + "description": "Initializes payment process when it is required by gateway.", + "fields": [ + { + "name": "initializedPayment", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "PaymentInitialized", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PaymentError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PaymentError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PaymentInitialized", + "description": "Server-side data generated by a payment gateway. Optional step when the payment provider requires an additional action to initialize payment session.", + "fields": [ + { + "name": "gateway", + "description": "ID of a payment gateway.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Payment gateway name.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "data", + "description": "Initialized data by gateway.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PaymentInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "gateway", + "description": "A gateway to use with that payment.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": "Client-side generated payment token, representing customer's billing data in a secure manner.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "amount", + "description": "Total amount of the transaction, including all taxes and discounts. If no amount is provided, the checkout total will be used.", + "type": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "returnUrl", + "description": "URL of a storefront view where user should be redirected after requiring additional actions. Payment with additional actions will not be finished if this field is not provided.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "storePaymentMethod", + "description": "New in Saleor 3.1. Payment store type.", + "type": { + "kind": "ENUM", + "name": "StorePaymentMethodEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "New in Saleor 3.1. User public metadata.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PaymentRefund", + "description": "Refunds the captured payment amount.", + "fields": [ + { + "name": "payment", + "description": "Updated payment.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Payment", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PaymentError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PaymentError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PaymentSource", + "description": "Represents a payment source stored for user in payment gateway, such as credit card.", + "fields": [ + { + "name": "gateway", + "description": "Payment gateway name.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentMethodId", + "description": "ID of stored payment method.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "creditCardInfo", + "description": "Stored credit card details if available.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "CreditCard", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "New in Saleor 3.1. List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PaymentVoid", + "description": "Voids the authorized payment.", + "fields": [ + { + "name": "payment", + "description": "Updated payment.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Payment", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PaymentError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PaymentError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Permission", + "description": "Represents a permission object in a friendly form.", + "fields": [ + { + "name": "code", + "description": "Internal code for permission.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PermissionEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Describe action(s) allowed to do by permission.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "PermissionEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "MANAGE_USERS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MANAGE_STAFF", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IMPERSONATE_USER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MANAGE_APPS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MANAGE_CHANNELS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MANAGE_DISCOUNTS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MANAGE_PLUGINS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MANAGE_GIFT_CARD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MANAGE_MENUS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MANAGE_ORDERS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MANAGE_PAGES", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MANAGE_PAGE_TYPES_AND_ATTRIBUTES", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HANDLE_PAYMENTS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MANAGE_PRODUCTS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MANAGE_SHIPPING", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MANAGE_SETTINGS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MANAGE_TRANSLATIONS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MANAGE_CHECKOUTS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PermissionGroupCreate", + "description": "Create new permission group.", + "fields": [ + { + "name": "permissionGroupErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PermissionGroupError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PermissionGroupError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "group", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Group", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PermissionGroupCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "addPermissions", + "description": "List of permission code names to assign to this group.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PermissionEnum", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addUsers", + "description": "List of users to assign to this group.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Group name.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PermissionGroupDelete", + "description": "Delete permission group.", + "fields": [ + { + "name": "permissionGroupErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PermissionGroupError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PermissionGroupError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "group", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Group", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PermissionGroupError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PermissionGroupErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "permissions", + "description": "List of permissions which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PermissionEnum", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "users", + "description": "List of user IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "PermissionGroupErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ASSIGN_NON_STAFF_MEMBER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DUPLICATED_INPUT_ITEM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CANNOT_REMOVE_FROM_LAST_GROUP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LEFT_NOT_MANAGEABLE_PERMISSION", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OUT_OF_SCOPE_PERMISSION", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OUT_OF_SCOPE_USER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PermissionGroupFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ids", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "PermissionGroupSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NAME", + "description": "Sort permission group accounts by name.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PermissionGroupSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort permission group by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PermissionGroupSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PermissionGroupUpdate", + "description": "Update permission group.", + "fields": [ + { + "name": "permissionGroupErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PermissionGroupError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PermissionGroupError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "group", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Group", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PermissionGroupUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "addPermissions", + "description": "List of permission code names to assign to this group.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PermissionEnum", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addUsers", + "description": "List of users to assign to this group.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Group name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removePermissions", + "description": "List of permission code names to unassign from this group.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PermissionEnum", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeUsers", + "description": "List of users to unassign from this group.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Plugin", + "description": "Plugin.", + "fields": [ + { + "name": "id", + "description": "Identifier of the plugin.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Name of the plugin.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "Description of the plugin.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "globalConfiguration", + "description": "Global configuration of the plugin (not channel-specific).", + "args": [], + "type": { + "kind": "OBJECT", + "name": "PluginConfiguration", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channelConfigurations", + "description": "Channel-specific plugin configuration.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PluginConfiguration", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PluginConfiguration", + "description": "Stores information about a configuration of plugin.", + "fields": [ + { + "name": "active", + "description": "Determines if plugin is active or not.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "The channel to which the plugin configuration is assigned to.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Channel", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "configuration", + "description": "Configuration of the plugin.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ConfigurationItem", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "PluginConfigurationType", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "PER_CHANNEL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GLOBAL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PluginCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PluginCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PluginCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Plugin", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PluginError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PluginErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "PluginErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PLUGIN_MISCONFIGURED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PluginFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "statusInChannels", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "PluginStatusInChannelsInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": null, + "type": { + "kind": "ENUM", + "name": "PluginConfigurationType", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "PluginSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NAME", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IS_ACTIVE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PluginSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort plugins by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PluginSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PluginStatusInChannelsInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "active", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channels", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PluginUpdate", + "description": "Update plugin configuration.", + "fields": [ + { + "name": "plugin", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Plugin", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pluginsErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PluginError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PluginError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PluginUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "active", + "description": "Indicates whether the plugin should be enabled.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "configuration", + "description": "Configuration of the plugin.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ConfigurationItemInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "PositiveDecimal", + "description": "Positive Decimal scalar implementation.\n\nShould be used in places where value must be positive.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "PostalCodeRuleInclusionTypeEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "INCLUDE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EXCLUDE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PreorderData", + "description": "Represents preorder settings for product variant.", + "fields": [ + { + "name": "globalThreshold", + "description": "The global preorder threshold for product variant.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "globalSoldUnits", + "description": "Total number of sold product variant during preorder.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "endDate", + "description": "Preorder end date.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PreorderSettingsInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "globalThreshold", + "description": "The global threshold for preorder variant.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "endDate", + "description": "The end date for preorder.", + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PreorderThreshold", + "description": "Represents preorder variant data for channel.", + "fields": [ + { + "name": "quantity", + "description": "Preorder threshold for product variant in this channel.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "soldUnits", + "description": "Number of sold product variant in this channel.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PriceInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "currency", + "description": "Currency code.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "amount", + "description": "Amount of money.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PriceRangeInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "gte", + "description": "Price greater than or equal to.", + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lte", + "description": "Price less than or equal to.", + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Product", + "description": "Represents an individual item for sale in the storefront.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoTitle", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoDescription", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productType", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "category", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Category", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chargeTaxes", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "weight", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Weight", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultVariant", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "rating", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Channel given to retrieve this product. Also used by federation gateway to resolve this object in a federated query.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "descriptionJson", + "description": "Description of the product (JSON).", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use the `description` field instead." + }, + { + "name": "thumbnail", + "description": "The main thumbnail for a product.", + "args": [ + { + "name": "size", + "description": "Size of thumbnail.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Image", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pricing", + "description": "Lists the storefront product's pricing, the current price and discounts, only meant for displaying.", + "args": [ + { + "name": "address", + "description": "Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductPricingInfo", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isAvailable", + "description": "Whether the product is in stock and visible or not.", + "args": [ + { + "name": "address", + "description": "Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxType", + "description": "A type of tax. Assigned by enabled tax gateway", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributes", + "description": "List of attributes assigned to this product.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SelectedAttribute", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channelListings", + "description": "List of availability in channels for the product.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductChannelListing", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "mediaById", + "description": "Get a single product media by ID.", + "args": [ + { + "name": "id", + "description": "ID of a product media.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductMedia", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "imageById", + "description": "Get a single product image by ID.", + "args": [ + { + "name": "id", + "description": "ID of a product image.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductImage", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use the `mediaById` field instead." + }, + { + "name": "variants", + "description": "List of variants for the product.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "media", + "description": "List of media for the product.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductMedia", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "images", + "description": "List of images for the product.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductImage", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use the `media` field instead." + }, + { + "name": "collections", + "description": "List of collections for the product.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Collection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translation", + "description": "Returns translated product fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for product.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "availableForPurchase", + "description": "Date when product is available for purchase. ", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isAvailableForPurchase", + "description": "Whether the product is available for purchase.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductAttributeAssign", + "description": "Assign attributes to a given product type.", + "fields": [ + { + "name": "productType", + "description": "The updated product type.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProductAttributeAssignInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "id", + "description": "The ID of the attribute to assign.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "The attribute type to be assigned as.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ProductAttributeType", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantSelection", + "description": "New in Saleor 3.1. Whether attribute is allowed in variant selection. Allowed types are: ['dropdown', 'boolean', 'swatch', 'numeric'].", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductAttributeAssignmentUpdate", + "description": "New in Saleor 3.1. Update attributes assigned to product variant for given product type.", + "fields": [ + { + "name": "productType", + "description": "The updated product type.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProductAttributeAssignmentUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "id", + "description": "The ID of the attribute to assign.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantSelection", + "description": "New in Saleor 3.1. Whether attribute is allowed in variant selection. Allowed types are: ['dropdown', 'boolean', 'swatch', 'numeric'].", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ProductAttributeType", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "PRODUCT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VARIANT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductAttributeUnassign", + "description": "Un-assign attributes from a given product type.", + "fields": [ + { + "name": "productType", + "description": "The updated product type.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductBulkDelete", + "description": "Deletes products.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductChannelListing", + "description": "Represents product channel listing.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "publicationDate", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isPublished", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Channel", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "visibleInListings", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "availableForPurchase", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountedPrice", + "description": "The price of the cheapest variant (including discounts).", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "purchaseCost", + "description": "Purchase cost of product.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "MoneyRange", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "margin", + "description": "Range of margin percentage value.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Margin", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isAvailableForPurchase", + "description": "Whether the product is available for purchase.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pricing", + "description": "Lists the storefront product's pricing, the current price and discounts, only meant for displaying.", + "args": [ + { + "name": "address", + "description": "Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductPricingInfo", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProductChannelListingAddInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "channelId", + "description": "ID of a channel.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isPublished", + "description": "Determines if object is visible to customers.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "publicationDate", + "description": "Publication date. ISO 8601 standard.", + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "visibleInListings", + "description": "Determines if product is visible in product listings (doesn't apply to product collections).", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isAvailableForPurchase", + "description": "Determine if product should be available for purchase.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "availableForPurchaseDate", + "description": "A start date from which a product will be available for purchase. When not set and isAvailable is set to True, the current day is assumed.", + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addVariants", + "description": "List of variants to which the channel should be assigned.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeVariants", + "description": "List of variants from which the channel should be unassigned.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductChannelListingError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ProductErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributes", + "description": "List of attributes IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "values", + "description": "List of attribute values IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channels", + "description": "List of channels IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variants", + "description": "List of variants IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductChannelListingUpdate", + "description": "Manage product's availability in channels.", + "fields": [ + { + "name": "product", + "description": "An updated product instance.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Product", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productChannelListingErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductChannelListingError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductChannelListingError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProductChannelListingUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "updateChannels", + "description": "List of channels to which the product should be assigned or updated.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProductChannelListingAddInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeChannels", + "description": "List of channels from which the product should be unassigned.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Product", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductCreate", + "description": "Creates a new product.", + "fields": [ + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "product", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Product", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProductCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "attributes", + "description": "List of attributes.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AttributeValueInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "category", + "description": "ID of the product's category.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chargeTaxes", + "description": "Determine if taxes are being charged for the product.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collections", + "description": "List of IDs of collections that the product belongs to.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "Product description (JSON).", + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Product name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "Product slug.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxCode", + "description": "Tax rate for enabled tax gateway.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seo", + "description": "Search engine optimization fields.", + "type": { + "kind": "INPUT_OBJECT", + "name": "SeoInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "weight", + "description": "Weight of the Product.", + "type": { + "kind": "SCALAR", + "name": "WeightScalar", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "rating", + "description": "Defines the product rating value.", + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productType", + "description": "ID of the type that product belongs to.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductDelete", + "description": "Deletes a product.", + "fields": [ + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "product", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Product", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ProductErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributes", + "description": "List of attributes IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "values", + "description": "List of attribute values IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ProductErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ALREADY_EXISTS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ATTRIBUTE_ALREADY_ASSIGNED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ATTRIBUTE_CANNOT_BE_ASSIGNED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ATTRIBUTE_VARIANTS_DISABLED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DUPLICATED_INPUT_ITEM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_WITHOUT_CATEGORY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_PRODUCTS_IMAGE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_PRODUCTS_VARIANT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VARIANT_NO_DIGITAL_CONTENT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_NOT_ASSIGNED_TO_CHANNEL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNSUPPORTED_MEDIA_PROVIDER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PREORDER_VARIANT_CANNOT_BE_DEACTIVATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ProductFieldEnum", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NAME", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DESCRIPTION", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_TYPE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CATEGORY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_WEIGHT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "COLLECTIONS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHARGE_TAXES", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_MEDIA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VARIANT_ID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VARIANT_SKU", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VARIANT_WEIGHT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VARIANT_MEDIA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProductFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "isPublished", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collections", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "categories", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasCategory", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributes", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AttributeInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "stockAvailability", + "description": null, + "type": { + "kind": "ENUM", + "name": "StockAvailability", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "stocks", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "ProductStockFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "price", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "PriceRangeInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "minimalPrice", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "PriceRangeInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productTypes", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCard", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ids", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasPreorderedVariants", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Specifies the channel by which the data should be filtered. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductImage", + "description": "Represents a product image.", + "fields": [ + { + "name": "id", + "description": "The ID of the image.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "alt", + "description": "The alt text of the image.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortOrder", + "description": "The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "The URL of the image.", + "args": [ + { + "name": "size", + "description": "Size of the image.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProductInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "attributes", + "description": "List of attributes.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AttributeValueInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "category", + "description": "ID of the product's category.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chargeTaxes", + "description": "Determine if taxes are being charged for the product.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collections", + "description": "List of IDs of collections that the product belongs to.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "Product description (JSON).", + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Product name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "Product slug.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxCode", + "description": "Tax rate for enabled tax gateway.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seo", + "description": "Search engine optimization fields.", + "type": { + "kind": "INPUT_OBJECT", + "name": "SeoInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "weight", + "description": "Weight of the Product.", + "type": { + "kind": "SCALAR", + "name": "WeightScalar", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "rating", + "description": "Defines the product rating value.", + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductMedia", + "description": "Represents a product media.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortOrder", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "alt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ProductMediaType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "oembedData", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "The URL of the media.", + "args": [ + { + "name": "size", + "description": "Size of the image.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductMediaBulkDelete", + "description": "Deletes product media.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductMediaCreate", + "description": "Create a media object (image or video URL) associated with product. For image, this mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec", + "fields": [ + { + "name": "product", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Product", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "media", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductMedia", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProductMediaCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "alt", + "description": "Alt text for a product media.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "image", + "description": "Represents an image file in a multipart request.", + "type": { + "kind": "SCALAR", + "name": "Upload", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "product", + "description": "ID of an product.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "mediaUrl", + "description": "Represents an URL to an external media.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductMediaDelete", + "description": "Deletes a product media.", + "fields": [ + { + "name": "product", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Product", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "media", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductMedia", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductMediaReorder", + "description": "Changes ordering of the product media.", + "fields": [ + { + "name": "product", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Product", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "media", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductMedia", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ProductMediaType", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "IMAGE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VIDEO", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductMediaUpdate", + "description": "Updates a product media.", + "fields": [ + { + "name": "product", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Product", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "media", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductMedia", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProductMediaUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "alt", + "description": "Alt text for a product media.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProductOrder", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Specifies the channel in which to sort the data. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributeId", + "description": "Sort product by the selected attribute's values.\nNote: this doesn't take translations into account yet.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort products by the selected field.", + "type": { + "kind": "ENUM", + "name": "ProductOrderField", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ProductOrderField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NAME", + "description": "Sort products by name.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RANK", + "description": "Sort products by name.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRICE", + "description": "Sort products by price.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MINIMAL_PRICE", + "description": "Sort products by a minimal price of a product's variant.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DATE", + "description": "Sort products by update date.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TYPE", + "description": "Sort products by type.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PUBLISHED", + "description": "Sort products by publication status.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PUBLICATION_DATE", + "description": "Sort products by publication date.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "COLLECTION", + "description": "Sort products by collection. Note: This option is available only for the `Collection.products` query.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RATING", + "description": "Sort products by rating.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductPricingInfo", + "description": "Represents availability of a product in the storefront.", + "fields": [ + { + "name": "onSale", + "description": "Whether it is in sale or not.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discount", + "description": "The discount amount if in sale (null otherwise).", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountLocalCurrency", + "description": "The discount amount in the local currency.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "priceRange", + "description": "The discounted price range of the product variants.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxedMoneyRange", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "priceRangeUndiscounted", + "description": "The undiscounted price range of the product variants.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxedMoneyRange", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "priceRangeLocalCurrency", + "description": "The discounted price range of the product variants in the local currency.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxedMoneyRange", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductReorderAttributeValues", + "description": "Reorder product attribute values.", + "fields": [ + { + "name": "product", + "description": "Product from which attribute values are reordered.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Product", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProductStockFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "warehouseIds", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantity", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IntRangeInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductTranslatableContent", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoTitle", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoDescription", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "descriptionJson", + "description": "Description of the product (JSON).", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use the `description` field instead." + }, + { + "name": "translation", + "description": "Returns translated product fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for product.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "product", + "description": "Represents an individual item for sale in the storefront.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Product", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Get model fields from the root level queries." + }, + { + "name": "attributeValues", + "description": "List of product attribute values that can be translated.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeValueTranslatableContent", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductTranslate", + "description": "Creates/updates translations for a product.", + "fields": [ + { + "name": "translationErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "product", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Product", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductTranslation", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "language", + "description": "Translation language.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LanguageDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoTitle", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoDescription", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "descriptionJson", + "description": "Translated description of the product (JSON).", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use the `description` field instead." + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductType", + "description": "Represents a type of product. It defines what attributes are available to products of this type.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasVariants", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isShippingRequired", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isDigital", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "weight", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Weight", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "kind", + "description": "The product type kind.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ProductTypeKindEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "products", + "description": "List of products of this type.", + "args": [ + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductCountableConnection", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use the top-level `products` query with the `productTypes` filter." + }, + { + "name": "taxType", + "description": "A type of tax. Assigned by enabled tax gateway", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantAttributes", + "description": "Variant attributes of that product type.", + "args": [ + { + "name": "variantSelection", + "description": "Define scope of returned attributes.", + "type": { + "kind": "ENUM", + "name": "VariantAttributeScope", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Attribute", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `assignedVariantAttributes` instead." + }, + { + "name": "assignedVariantAttributes", + "description": "New in Saleor 3.1. Variant attributes of that product type with attached variant selection.", + "args": [ + { + "name": "variantSelection", + "description": "Define scope of returned attributes.", + "type": { + "kind": "ENUM", + "name": "VariantAttributeScope", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AssignedVariantAttribute", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productAttributes", + "description": "Product attributes of that product type.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Attribute", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "availableAttributes", + "description": null, + "args": [ + { + "name": "filter", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "AttributeFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AttributeCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductTypeBulkDelete", + "description": "Deletes product types.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ProductTypeConfigurable", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CONFIGURABLE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SIMPLE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductTypeCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductTypeCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductTypeCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductTypeCreate", + "description": "Creates a new product type.", + "fields": [ + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productType", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductTypeDelete", + "description": "Deletes a product type.", + "fields": [ + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productType", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ProductTypeEnum", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "DIGITAL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHIPPABLE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProductTypeFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "configurable", + "description": null, + "type": { + "kind": "ENUM", + "name": "ProductTypeConfigurable", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productType", + "description": null, + "type": { + "kind": "ENUM", + "name": "ProductTypeEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "kind", + "description": null, + "type": { + "kind": "ENUM", + "name": "ProductTypeKindEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ids", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProductTypeInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "Name of the product type.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "Product type slug.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "kind", + "description": "The product type kind.", + "type": { + "kind": "ENUM", + "name": "ProductTypeKindEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasVariants", + "description": "Determines if product of this type has multiple variants. This option mainly simplifies product management in the dashboard. There is always at least one variant created under the hood.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productAttributes", + "description": "List of attributes shared among all product variants.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantAttributes", + "description": "List of attributes used to distinguish between different variants of a product.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isShippingRequired", + "description": "Determines if shipping is required for products of this variant.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isDigital", + "description": "Determines if products are digital.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "weight", + "description": "Weight of the ProductType items.", + "type": { + "kind": "SCALAR", + "name": "WeightScalar", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxCode", + "description": "Tax rate for enabled tax gateway.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ProductTypeKindEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NORMAL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GIFT_CARD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductTypeReorderAttributes", + "description": "Reorder the attributes of a product type.", + "fields": [ + { + "name": "productType", + "description": "Product type from which attributes are reordered.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ProductTypeSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NAME", + "description": "Sort products by name.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DIGITAL", + "description": "Sort products by type.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHIPPING_REQUIRED", + "description": "Sort products by shipping.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProductTypeSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort product types by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ProductTypeSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductTypeUpdate", + "description": "Updates an existing product type.", + "fields": [ + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productType", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductUpdate", + "description": "Updates an existing product.", + "fields": [ + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "product", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Product", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductVariant", + "description": "Represents a version of a product such as different size or color.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sku", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "product", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Product", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "trackInventory", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantityLimitPerCustomer", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "weight", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Weight", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Channel given to retrieve this product variant. Also used by federation gateway to resolve this object in a federated query.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channelListings", + "description": "List of price information in channels for the product.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductVariantChannelListing", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pricing", + "description": "Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.", + "args": [ + { + "name": "address", + "description": "Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "VariantPricingInfo", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributes", + "description": "List of attributes assigned to this variant.", + "args": [ + { + "name": "variantSelection", + "description": "Define scope of returned attributes.", + "type": { + "kind": "ENUM", + "name": "VariantAttributeScope", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SelectedAttribute", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "margin", + "description": "Gross margin percentage value.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantityOrdered", + "description": "Total quantity ordered.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "revenue", + "description": "Total revenue generated by a variant in given period of time. Note: this field should be queried using `reportProductSales` query as it uses optimizations suitable for such calculations.", + "args": [ + { + "name": "period", + "description": null, + "type": { + "kind": "ENUM", + "name": "ReportingPeriod", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "images", + "description": "List of images for the product variant.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductImage", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use the `media` field instead." + }, + { + "name": "media", + "description": "List of media for the product variant.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductMedia", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translation", + "description": "Returns translated product variant fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for product variant.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariantTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "digitalContent", + "description": "Digital content for the product variant.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "DigitalContent", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "stocks", + "description": "Stocks for the product variant.", + "args": [ + { + "name": "address", + "description": "Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countryCode", + "description": "Two-letter ISO 3166-1 country code. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use `address` argument instead.", + "type": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Stock", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantityAvailable", + "description": "Quantity of a product available for sale in one checkout. Field value will be `null` when no `limitQuantityPerCheckout` in global settings has been set, and `productVariant` stocks are not tracked.", + "args": [ + { + "name": "address", + "description": "Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countryCode", + "description": "Two-letter ISO 3166-1 country code. When provided, the exact quantity from a warehouse operating in shipping zones that contain this country will be returned. Otherwise, it will return the maximum quantity from all shipping zones. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use `address` argument instead.", + "type": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "preorder", + "description": "New in Saleor 3.1. Preorder data for product variant.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "PreorderData", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantBulkCreate", + "description": "Creates product variants for a given product.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariants", + "description": "List of the created variants.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "bulkProductErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "BulkProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "BulkProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProductVariantBulkCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "attributes", + "description": "List of attributes specific to this variant.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "BulkAttributeValueInput", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sku", + "description": "Stock keeping unit.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "trackInventory", + "description": "Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "weight", + "description": "Weight of the Product Variant.", + "type": { + "kind": "SCALAR", + "name": "WeightScalar", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "preorder", + "description": "New in Saleor 3.1. Determines if variant is in preorder.", + "type": { + "kind": "INPUT_OBJECT", + "name": "PreorderSettingsInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantityLimitPerCustomer", + "description": "New in Saleor 3.1. Determines maximum quantity of `ProductVariant`,that can be bought in a single checkout.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "stocks", + "description": "Stocks of a product available for sale.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "StockInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channelListings", + "description": "List of prices assigned to channels.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProductVariantChannelListingAddInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantBulkDelete", + "description": "Deletes product variants.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantChannelListing", + "description": "Represents product varaint channel listing.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Channel", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "price", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "costPrice", + "description": "Cost price of the variant.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "margin", + "description": "Gross margin percentage value.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "preorderThreshold", + "description": "New in Saleor 3.1. Preorder variant data.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "PreorderThreshold", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProductVariantChannelListingAddInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "channelId", + "description": "ID of a channel.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "price", + "description": "Price of the particular variant in channel.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "costPrice", + "description": "Cost price of the variant in channel.", + "type": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "preorderThreshold", + "description": "New in Saleor 3.1. The threshold for preorder variant in channel.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantChannelListingUpdate", + "description": "Manage product variant prices in channels.", + "fields": [ + { + "name": "variant", + "description": "An updated product variant instance.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productChannelListingErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductChannelListingError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductChannelListingError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductVariantCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantCreate", + "description": "Creates a new variant for a product.", + "fields": [ + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariant", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProductVariantCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "attributes", + "description": "List of attributes specific to this variant.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AttributeValueInput", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sku", + "description": "Stock keeping unit.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "trackInventory", + "description": "Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "weight", + "description": "Weight of the Product Variant.", + "type": { + "kind": "SCALAR", + "name": "WeightScalar", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "preorder", + "description": "New in Saleor 3.1. Determines if variant is in preorder.", + "type": { + "kind": "INPUT_OBJECT", + "name": "PreorderSettingsInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantityLimitPerCustomer", + "description": "New in Saleor 3.1. Determines maximum quantity of `ProductVariant`,that can be bought in a single checkout.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "product", + "description": "Product ID of which type is the variant.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "stocks", + "description": "Stocks of a product available for sale.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "StockInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantDelete", + "description": "Deletes a product variant.", + "fields": [ + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariant", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProductVariantFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sku", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isPreorder", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProductVariantInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "attributes", + "description": "List of attributes specific to this variant.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AttributeValueInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sku", + "description": "Stock keeping unit.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "trackInventory", + "description": "Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "weight", + "description": "Weight of the Product Variant.", + "type": { + "kind": "SCALAR", + "name": "WeightScalar", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "preorder", + "description": "New in Saleor 3.1. Determines if variant is in preorder.", + "type": { + "kind": "INPUT_OBJECT", + "name": "PreorderSettingsInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantityLimitPerCustomer", + "description": "New in Saleor 3.1. Determines maximum quantity of `ProductVariant`,that can be bought in a single checkout.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantPreorderDeactivate", + "description": "New in Saleor 3.1. Deactivates product variant preorder.It changes all preorder allocation into regular allocation.", + "fields": [ + { + "name": "productVariant", + "description": "Product variant with ended preorder.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantReorder", + "description": "Reorder the variants of a product. Mutation updates updated_at on product and triggers PRODUCT_UPDATED webhook.", + "fields": [ + { + "name": "product", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Product", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantReorderAttributeValues", + "description": "Reorder product variant attribute values.", + "fields": [ + { + "name": "productVariant", + "description": "Product variant from which attribute values are reordered.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantSetDefault", + "description": "Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook.", + "fields": [ + { + "name": "product", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Product", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantStocksCreate", + "description": "Creates stocks for product variant.", + "fields": [ + { + "name": "productVariant", + "description": "Updated product variant.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "bulkStockErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "BulkStockError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "BulkStockError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantStocksDelete", + "description": "Delete stocks from product variant.", + "fields": [ + { + "name": "productVariant", + "description": "Updated product variant.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "stockErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "StockError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "StockError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantStocksUpdate", + "description": "Update stocks for product variant.", + "fields": [ + { + "name": "productVariant", + "description": "Updated product variant.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "bulkStockErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "BulkStockError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "BulkStockError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantTranslatableContent", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translation", + "description": "Returns translated product variant fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for product variant.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariantTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariant", + "description": "Represents a version of a product such as different size or color.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Get model fields from the root level queries." + }, + { + "name": "attributeValues", + "description": "List of product variant attribute values that can be translated.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeValueTranslatableContent", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantTranslate", + "description": "Creates/updates translations for a product variant.", + "fields": [ + { + "name": "translationErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariant", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantTranslation", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "language", + "description": "Translation language.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LanguageDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantUpdate", + "description": "Updates an existing variant for product.", + "fields": [ + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariant", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "PublishableChannelListingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "channelId", + "description": "ID of a channel.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isPublished", + "description": "Determines if object is visible to customers.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "publicationDate", + "description": "Publication date. ISO 8601 standard.", + "type": { + "kind": "SCALAR", + "name": "Date", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Query", + "description": null, + "fields": [ + { + "name": "webhook", + "description": "Look up a webhook by ID.", + "args": [ + { + "name": "id", + "description": "ID of the webhook.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Webhook", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "webhookEvents", + "description": "List of all available webhook events.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WebhookEvent", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `WebhookEventTypeAsyncEnum` and `WebhookEventTypeSyncEnum` to get available event types." + }, + { + "name": "webhookSamplePayload", + "description": "Retrieve a sample payload for a given webhook event based on real data. It can be useful for some integrations where sample payload is required.", + "args": [ + { + "name": "eventType", + "description": "Name of the requested event type.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "WebhookSampleEventTypeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "warehouse", + "description": "Look up a warehouse by ID.", + "args": [ + { + "name": "id", + "description": "ID of an warehouse", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Warehouse", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "warehouses", + "description": "List of warehouses.", + "args": [ + { + "name": "filter", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "WarehouseFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "WarehouseSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "WarehouseCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translations", + "description": "Returns a list of all translatable items of a given kind.", + "args": [ + { + "name": "kind", + "description": "Kind of objects to retrieve.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TranslatableKinds", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TranslatableItemConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translation", + "description": null, + "args": [ + { + "name": "id", + "description": "ID of the object to retrieve.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "kind", + "description": "Kind of the object to retrieve.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TranslatableKinds", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "UNION", + "name": "TranslatableItem", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "stock", + "description": "Look up a stock by ID", + "args": [ + { + "name": "id", + "description": "ID of an warehouse", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Stock", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "stocks", + "description": "List of stocks.", + "args": [ + { + "name": "filter", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StockFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "StockCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shop", + "description": "Return information about the shop.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Shop", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderSettings", + "description": "Order related settings from site settings.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "OrderSettings", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCardSettings", + "description": "Gift card related settings from site settings.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GiftCardSettings", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingZone", + "description": "Look up a shipping zone by ID.", + "args": [ + { + "name": "id", + "description": "ID of the shipping zone.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShippingZone", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingZones", + "description": "List of the shop's shipping zones.", + "args": [ + { + "name": "filter", + "description": "Filtering options for shipping zones.", + "type": { + "kind": "INPUT_OBJECT", + "name": "ShippingZoneFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShippingZoneCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "digitalContent", + "description": "Look up digital content by ID.", + "args": [ + { + "name": "id", + "description": "ID of the digital content.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DigitalContent", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "digitalContents", + "description": "List of digital content.", + "args": [ + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DigitalContentCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "categories", + "description": "List of the shop's categories.", + "args": [ + { + "name": "filter", + "description": "Filtering options for categories.", + "type": { + "kind": "INPUT_OBJECT", + "name": "CategoryFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort categories.", + "type": { + "kind": "INPUT_OBJECT", + "name": "CategorySortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "level", + "description": "Filter categories by the nesting level in the category tree.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CategoryCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "category", + "description": "Look up a category by ID or slug.", + "args": [ + { + "name": "id", + "description": "ID of the category.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "Slug of the category", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Category", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collection", + "description": "Look up a collection by ID.", + "args": [ + { + "name": "id", + "description": "ID of the collection.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "Slug of the category", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Collection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collections", + "description": "List of the shop's collections.", + "args": [ + { + "name": "filter", + "description": "Filtering options for collections.", + "type": { + "kind": "INPUT_OBJECT", + "name": "CollectionFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort collections.", + "type": { + "kind": "INPUT_OBJECT", + "name": "CollectionSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CollectionCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "product", + "description": "Look up a product by ID.", + "args": [ + { + "name": "id", + "description": "ID of the product.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "Slug of the product.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Product", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "products", + "description": "List of the shop's products.", + "args": [ + { + "name": "filter", + "description": "Filtering options for products.", + "type": { + "kind": "INPUT_OBJECT", + "name": "ProductFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort products.", + "type": { + "kind": "INPUT_OBJECT", + "name": "ProductOrder", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productType", + "description": "Look up a product type by ID.", + "args": [ + { + "name": "id", + "description": "ID of the product type.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productTypes", + "description": "List of the shop's product types.", + "args": [ + { + "name": "filter", + "description": "Filtering options for product types.", + "type": { + "kind": "INPUT_OBJECT", + "name": "ProductTypeFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort product types.", + "type": { + "kind": "INPUT_OBJECT", + "name": "ProductTypeSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductTypeCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariant", + "description": "Look up a product variant by ID or SKU.", + "args": [ + { + "name": "id", + "description": "ID of the product variant.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sku", + "description": "Sku of the product variant.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariants", + "description": "List of product variants.", + "args": [ + { + "name": "ids", + "description": "Filter product variants by given IDs.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filter", + "description": "Filtering options for product variant.", + "type": { + "kind": "INPUT_OBJECT", + "name": "ProductVariantFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariantCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reportProductSales", + "description": "List of top selling products.", + "args": [ + { + "name": "period", + "description": "Span of time.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ReportingPeriod", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariantCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "payment", + "description": "Look up a payment by ID.", + "args": [ + { + "name": "id", + "description": "ID of the payment.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Payment", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "payments", + "description": "List of payments.", + "args": [ + { + "name": "filter", + "description": "Filtering options for payments.", + "type": { + "kind": "INPUT_OBJECT", + "name": "PaymentFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PaymentCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "page", + "description": "Look up a page by ID or slug.", + "args": [ + { + "name": "id", + "description": "ID of the page.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "The slug of the page.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Page", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pages", + "description": "List of the shop's pages.", + "args": [ + { + "name": "sortBy", + "description": "Sort pages.", + "type": { + "kind": "INPUT_OBJECT", + "name": "PageSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filter", + "description": "Filtering options for pages.", + "type": { + "kind": "INPUT_OBJECT", + "name": "PageFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PageCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageType", + "description": "Look up a page type by ID.", + "args": [ + { + "name": "id", + "description": "ID of the page type.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PageType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageTypes", + "description": "List of the page types.", + "args": [ + { + "name": "sortBy", + "description": "Sort page types.", + "type": { + "kind": "INPUT_OBJECT", + "name": "PageTypeSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filter", + "description": "Filtering options for page types.", + "type": { + "kind": "INPUT_OBJECT", + "name": "PageTypeFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PageTypeCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "homepageEvents", + "description": "List of activity events to display on homepage (at the moment it only contains order-events).", + "args": [ + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderEventCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "order", + "description": "Look up an order by ID.", + "args": [ + { + "name": "id", + "description": "ID of an order.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orders", + "description": "List of orders.", + "args": [ + { + "name": "sortBy", + "description": "Sort orders.", + "type": { + "kind": "INPUT_OBJECT", + "name": "OrderSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filter", + "description": "Filtering options for orders.", + "type": { + "kind": "INPUT_OBJECT", + "name": "OrderFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "draftOrders", + "description": "List of draft orders.", + "args": [ + { + "name": "sortBy", + "description": "Sort draft orders.", + "type": { + "kind": "INPUT_OBJECT", + "name": "OrderSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filter", + "description": "Filtering options for draft orders.", + "type": { + "kind": "INPUT_OBJECT", + "name": "OrderDraftFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ordersTotal", + "description": "Return the total sales amount from a specific period.", + "args": [ + { + "name": "period", + "description": "A period of time.", + "type": { + "kind": "ENUM", + "name": "ReportingPeriod", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderByToken", + "description": "Look up an order by token.", + "args": [ + { + "name": "token", + "description": "The order's token.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menu", + "description": "Look up a navigation menu by ID or name.", + "args": [ + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": "ID of the menu.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "The menu's name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "The menu's slug.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Menu", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menus", + "description": "List of the storefront's menus.", + "args": [ + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort menus.", + "type": { + "kind": "INPUT_OBJECT", + "name": "MenuSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filter", + "description": "Filtering options for menus.", + "type": { + "kind": "INPUT_OBJECT", + "name": "MenuFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "MenuCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuItem", + "description": "Look up a menu item by ID.", + "args": [ + { + "name": "id", + "description": "ID of the menu item.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "MenuItem", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "menuItems", + "description": "List of the storefronts's menu items.", + "args": [ + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort menus items.", + "type": { + "kind": "INPUT_OBJECT", + "name": "MenuItemSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filter", + "description": "Filtering options for menu items.", + "type": { + "kind": "INPUT_OBJECT", + "name": "MenuItemFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "MenuItemCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCard", + "description": "Look up a gift card by ID.", + "args": [ + { + "name": "id", + "description": "ID of the gift card.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "GiftCard", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCards", + "description": "List of gift cards.", + "args": [ + { + "name": "sortBy", + "description": "New in Saleor 3.1. Sort gift cards.", + "type": { + "kind": "INPUT_OBJECT", + "name": "GiftCardSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filter", + "description": "New in Saleor 3.1. Filtering options for gift cards.", + "type": { + "kind": "INPUT_OBJECT", + "name": "GiftCardFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "GiftCardCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCardCurrencies", + "description": "New in Saleor 3.1. List of gift card currencies.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCardTags", + "description": "{ADDED_IN_31} List of gift card tags.", + "args": [ + { + "name": "filter", + "description": "Filtering options for gift card tags.", + "type": { + "kind": "INPUT_OBJECT", + "name": "GiftCardTagFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "GiftCardTagCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "plugin", + "description": "Look up a plugin by ID.", + "args": [ + { + "name": "id", + "description": "ID of the plugin.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Plugin", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "plugins", + "description": "List of plugins.", + "args": [ + { + "name": "filter", + "description": "Filtering options for plugins.", + "type": { + "kind": "INPUT_OBJECT", + "name": "PluginFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort plugins.", + "type": { + "kind": "INPUT_OBJECT", + "name": "PluginSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PluginCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sale", + "description": "Look up a sale by ID.", + "args": [ + { + "name": "id", + "description": "ID of the sale.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Sale", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sales", + "description": "List of the shop's sales.", + "args": [ + { + "name": "filter", + "description": "Filtering options for sales.", + "type": { + "kind": "INPUT_OBJECT", + "name": "SaleFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort sales.", + "type": { + "kind": "INPUT_OBJECT", + "name": "SaleSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "query", + "description": "Search sales by name, value or type. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use `filter.search` input instead.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "SaleCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "voucher", + "description": "Look up a voucher by ID.", + "args": [ + { + "name": "id", + "description": "ID of the voucher.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Voucher", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "vouchers", + "description": "List of the shop's vouchers.", + "args": [ + { + "name": "filter", + "description": "Filtering options for vouchers.", + "type": { + "kind": "INPUT_OBJECT", + "name": "VoucherFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort voucher.", + "type": { + "kind": "INPUT_OBJECT", + "name": "VoucherSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "query", + "description": "Search vouchers by name or code. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use `filter.search` input instead.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "VoucherCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "exportFile", + "description": "Look up a export file by ID.", + "args": [ + { + "name": "id", + "description": "ID of the export file job.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ExportFile", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "exportFiles", + "description": "List of export files.", + "args": [ + { + "name": "filter", + "description": "Filtering options for export files.", + "type": { + "kind": "INPUT_OBJECT", + "name": "ExportFileFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort export files.", + "type": { + "kind": "INPUT_OBJECT", + "name": "ExportFileSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ExportFileCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxTypes", + "description": "List of all tax rates available from tax gateway.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkout", + "description": "Look up a checkout by token and slug of channel.", + "args": [ + { + "name": "token", + "description": "The checkout's token.", + "type": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkouts", + "description": "List of checkouts.", + "args": [ + { + "name": "sortBy", + "description": "New in Saleor 3.1. Sort checkouts.", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filter", + "description": "New in Saleor 3.1. Filtering options for checkouts.", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkoutLines", + "description": "List of checkout lines.", + "args": [ + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutLineCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Look up a channel by ID.", + "args": [ + { + "name": "id", + "description": "ID of the channel.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Channel", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channels", + "description": "List of all channels.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Channel", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attributes", + "description": "List of the shop's attributes.", + "args": [ + { + "name": "filter", + "description": "Filtering options for attributes.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AttributeFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sorting options for attributes.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AttributeSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AttributeCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "attribute", + "description": "Look up an attribute by ID.", + "args": [ + { + "name": "id", + "description": "ID of the attribute.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "Slug of the attribute.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Attribute", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appsInstallations", + "description": "List of all apps installations", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AppInstallation", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "apps", + "description": "List of the apps.", + "args": [ + { + "name": "filter", + "description": "Filtering options for apps.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AppFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort apps.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AppSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AppCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "app", + "description": "Look up an app by ID. If ID is not provided, return the currently authenticated app.", + "args": [ + { + "name": "id", + "description": "ID of the app.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "App", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appExtensions", + "description": "New in Saleor 3.1. List of all extensions", + "args": [ + { + "name": "filter", + "description": "Filtering options for apps extensions.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AppExtensionFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AppExtensionCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "appExtension", + "description": "New in Saleor 3.1. Look up an app extension by ID.", + "args": [ + { + "name": "id", + "description": "ID of the app extension.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AppExtension", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addressValidationRules", + "description": "Returns address validation rules.", + "args": [ + { + "name": "countryCode", + "description": "Two-letter ISO 3166-1 country code.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countryArea", + "description": "Designation of a region, province or state.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "city", + "description": "City or a town name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cityArea", + "description": "Sublocality like a district.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AddressValidationData", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "address", + "description": "Look up an address by ID.", + "args": [ + { + "name": "id", + "description": "ID of an address.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Address", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "customers", + "description": "List of the shop's customers.", + "args": [ + { + "name": "filter", + "description": "Filtering options for customers.", + "type": { + "kind": "INPUT_OBJECT", + "name": "CustomerFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort customers.", + "type": { + "kind": "INPUT_OBJECT", + "name": "UserSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "UserCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "permissionGroups", + "description": "List of permission groups.", + "args": [ + { + "name": "filter", + "description": "Filtering options for permission groups.", + "type": { + "kind": "INPUT_OBJECT", + "name": "PermissionGroupFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort permission groups.", + "type": { + "kind": "INPUT_OBJECT", + "name": "PermissionGroupSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "GroupCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "permissionGroup", + "description": "Look up permission group by ID.", + "args": [ + { + "name": "id", + "description": "ID of the group.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Group", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "me", + "description": "Return the currently authenticated user.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "staffUsers", + "description": "List of the shop's staff users.", + "args": [ + { + "name": "filter", + "description": "Filtering options for staff users.", + "type": { + "kind": "INPUT_OBJECT", + "name": "StaffUserInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort staff users.", + "type": { + "kind": "INPUT_OBJECT", + "name": "UserSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "UserCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": "Look up a user by ID or email address.", + "args": [ + { + "name": "id", + "description": "ID of the user.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "email", + "description": "Email address of the user.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "_entities", + "description": null, + "args": [ + { + "name": "representations", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "_Any", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "UNION", + "name": "_Entity", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "_service", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "_Service", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReducedRate", + "description": "Represents a reduced VAT rate for a particular type of goods.", + "fields": [ + { + "name": "rate", + "description": "Reduced VAT rate in percent.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "rateType", + "description": "A type of goods.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RefreshToken", + "description": "Refresh JWT token. Mutation tries to take refreshToken from the input.If it fails it will try to take refreshToken from the http-only cookie -refreshToken. csrfToken is required when refreshToken is provided as a cookie.", + "fields": [ + { + "name": "token", + "description": "JWT token, required to authenticate.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": "A user instance.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ReorderInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "id", + "description": "The ID of the item to move.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortOrder", + "description": "The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ReportingPeriod", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "TODAY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "THIS_MONTH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RequestEmailChange", + "description": "Request email change of the logged in user.", + "fields": [ + { + "name": "user", + "description": "A user instance.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RequestPasswordReset", + "description": "Sends an email with the account password modification link.", + "fields": [ + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Sale", + "description": "Sales allow creating discounts for categories, collections or products and are visible to all the customers.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "SaleType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "startDate", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "endDate", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "categories", + "description": "List of categories this sale applies to.", + "args": [ + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CategoryCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collections", + "description": "List of collections this sale applies to.", + "args": [ + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CollectionCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "products", + "description": "List of products this sale applies to.", + "args": [ + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variants", + "description": "New in Saleor 3.1. List of product variants this sale applies to.", + "args": [ + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariantCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translation", + "description": "Returns translated sale fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for sale.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "SaleTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channelListings", + "description": "List of channels available for the sale.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SaleChannelListing", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountValue", + "description": "Sale value.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "currency", + "description": "Currency code for sale.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SaleAddCatalogues", + "description": "Adds products, categories, collections to a voucher.", + "fields": [ + { + "name": "sale", + "description": "Sale of which catalogue IDs will be modified.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Sale", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SaleBulkDelete", + "description": "Deletes sales.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SaleChannelListing", + "description": "Represents sale channel listing.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Channel", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountValue", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "currency", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "SaleChannelListingAddInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "channelId", + "description": "ID of a channel.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountValue", + "description": "The value of the discount.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "SaleChannelListingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "addChannels", + "description": "List of channels to which the sale should be assigned.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "SaleChannelListingAddInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeChannels", + "description": "List of channels from which the sale should be unassigned.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SaleChannelListingUpdate", + "description": "Manage sale's availability in channels.", + "fields": [ + { + "name": "sale", + "description": "An updated sale instance.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Sale", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SaleCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SaleCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SaleCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Sale", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SaleCreate", + "description": "Creates a new sale.", + "fields": [ + { + "name": "discountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sale", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Sale", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SaleDelete", + "description": "Deletes a sale.", + "fields": [ + { + "name": "discountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sale", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Sale", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "SaleFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "status", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "DiscountStatusEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "saleType", + "description": null, + "type": { + "kind": "ENUM", + "name": "DiscountValueTypeEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "started", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateTimeRangeInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "SaleInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "Voucher name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "Fixed or percentage.", + "type": { + "kind": "ENUM", + "name": "DiscountValueTypeEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "value", + "description": "Value of the voucher.", + "type": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "products", + "description": "Products related to the discount.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variants", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "categories", + "description": "Categories related to the discount.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collections", + "description": "Collections related to the discount.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "startDate", + "description": "Start date of the voucher in ISO 8601 format.", + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "endDate", + "description": "End date of the voucher in ISO 8601 format.", + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SaleRemoveCatalogues", + "description": "Removes products, categories, collections from a sale.", + "fields": [ + { + "name": "sale", + "description": "Sale of which catalogue IDs will be modified.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Sale", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "SaleSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NAME", + "description": "Sort sales by name.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "START_DATE", + "description": "Sort sales by start date.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "END_DATE", + "description": "Sort sales by end date.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VALUE", + "description": "Sort sales by value.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TYPE", + "description": "Sort sales by type.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "SaleSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Specifies the channel in which to sort the data. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort sales by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "SaleSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SaleTranslatableContent", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translation", + "description": "Returns translated sale fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for sale.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "SaleTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sale", + "description": "Sales allow creating discounts for categories, collections or products and are visible to all the customers.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Sale", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Get model fields from the root level queries." + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SaleTranslate", + "description": "Creates/updates translations for a sale.", + "fields": [ + { + "name": "translationErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sale", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Sale", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SaleTranslation", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "language", + "description": "Translation language.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LanguageDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "SaleType", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "FIXED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PERCENTAGE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SaleUpdate", + "description": "Updates a sale.", + "fields": [ + { + "name": "discountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sale", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Sale", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SelectedAttribute", + "description": "Represents a custom attribute.", + "fields": [ + { + "name": "attribute", + "description": "Name of an attribute displayed in the interface.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Attribute", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "values", + "description": "Values of an attribute.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AttributeValue", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "SeoInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "title", + "description": "SEO title.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "SEO description.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SetPassword", + "description": "Sets the user's password from the token sent by email using the RequestPasswordReset mutation.", + "fields": [ + { + "name": "token", + "description": "JWT token, required to authenticate.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "refreshToken", + "description": "JWT refresh token, required to re-generate access token.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "csrfToken", + "description": "CSRF token required to re-generate access token.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": "A user instance.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ShippingErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "warehouses", + "description": "List of warehouse IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channels", + "description": "List of channels IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ShippingErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ALREADY_EXISTS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MAX_LESS_THAN_MIN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DUPLICATED_INPUT_ITEM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingMethod", + "description": "('Shipping methods that can be used as means of shippingfor orders and checkouts.',)", + "fields": [ + { + "name": "id", + "description": "Unique ID of ShippingMethod available for Order.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "Type of the shipping method.", + "args": [], + "type": { + "kind": "ENUM", + "name": "ShippingMethodTypeEnum", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0." + }, + { + "name": "name", + "description": "Shipping method name.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "Shipping method description (JSON).", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "maximumDeliveryDays", + "description": "Maximum delivery days for this shipping method.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "minimumDeliveryDays", + "description": "Minimum delivery days for this shipping method.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "maximumOrderWeight", + "description": "Maximum order weight for this shipping method.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Weight", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0." + }, + { + "name": "minimumOrderWeight", + "description": "Minimum order weight for this shipping method.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Weight", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0." + }, + { + "name": "translation", + "description": "Returns translated shipping method fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for shipping method.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShippingMethodTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "price", + "description": "The price of selected shipping method.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "maximumOrderPrice", + "description": "Maximum order price for this shipping method.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "minimumOrderPrice", + "description": "Minimal order price for this shipping method.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "active", + "description": "Describes if this shipping method is active and can be selected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "Message connected to this shipping method.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingMethodChannelListing", + "description": "Represents shipping method channel listing.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Channel", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "maximumOrderPrice", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "minimumOrderPrice", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "price", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ShippingMethodChannelListingAddInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "channelId", + "description": "ID of a channel.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "price", + "description": "Shipping price of the shipping method in this channel.", + "type": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "minimumOrderPrice", + "description": "Minimum order price to use this shipping method.", + "type": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "maximumOrderPrice", + "description": "Maximum order price to use this shipping method.", + "type": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ShippingMethodChannelListingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "addChannels", + "description": "List of channels to which the shipping method should be assigned.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ShippingMethodChannelListingAddInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeChannels", + "description": "List of channels from which the shipping method should be unassigned.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingMethodChannelListingUpdate", + "description": "Manage shipping method's availability in channels.", + "fields": [ + { + "name": "shippingMethod", + "description": "An updated shipping method instance.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ShippingMethodType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingMethodPostalCodeRule", + "description": "Represents shipping method postal code rule.", + "fields": [ + { + "name": "id", + "description": "The ID of the object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "start", + "description": "Start address range.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "end", + "description": "End address range.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "inclusionType", + "description": "Inclusion type of the postal code rule.", + "args": [], + "type": { + "kind": "ENUM", + "name": "PostalCodeRuleInclusionTypeEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingMethodTranslatableContent", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translation", + "description": "Returns translated shipping method fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for shipping method.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShippingMethodTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingMethod", + "description": "Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ShippingMethodType", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Get model fields from the root level queries." + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingMethodTranslation", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "language", + "description": "Translation language.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LanguageDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingMethodType", + "description": "Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers.", + "fields": [ + { + "name": "id", + "description": "Shipping method ID.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Shipping method name.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "Shipping method description.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "Type of the shipping method.", + "args": [], + "type": { + "kind": "ENUM", + "name": "ShippingMethodTypeEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translation", + "description": "Returns translated shipping method fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for shipping method.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShippingMethodTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channelListings", + "description": "List of channels available for the method.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingMethodChannelListing", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "maximumOrderPrice", + "description": "The price of the cheapest variant (including discounts).", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "minimumOrderPrice", + "description": "The price of the cheapest variant (including discounts).", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "postalCodeRules", + "description": "Postal code ranges rule of exclusion or inclusion of the shipping method.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingMethodPostalCodeRule", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "excludedProducts", + "description": "List of excluded products for the shipping method.", + "args": [ + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "minimumOrderWeight", + "description": "Minimum order weight to use this shipping method.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Weight", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "maximumOrderWeight", + "description": "Maximum order weight to use this shipping method.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Weight", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "maximumDeliveryDays", + "description": "Maximum number of days for delivery.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "minimumDeliveryDays", + "description": "Minimal number of days for delivery.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ShippingMethodTypeEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "PRICE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "WEIGHT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ShippingPostalCodeRulesCreateInputRange", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "start", + "description": "Start range of the postal code.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "end", + "description": "End range of the postal code.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingPriceBulkDelete", + "description": "Deletes shipping prices.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingPriceCreate", + "description": "Creates a new shipping price.", + "fields": [ + { + "name": "shippingZone", + "description": "A shipping zone to which the shipping method belongs.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ShippingZone", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingMethod", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ShippingMethodType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingPriceDelete", + "description": "Deletes a shipping price.", + "fields": [ + { + "name": "shippingMethod", + "description": "A shipping method to delete.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ShippingMethodType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingZone", + "description": "A shipping zone to which the shipping method belongs.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ShippingZone", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingPriceExcludeProducts", + "description": "Exclude products from shipping price.", + "fields": [ + { + "name": "shippingMethod", + "description": "A shipping method with new list of excluded products.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ShippingMethodType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ShippingPriceExcludeProductsInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "products", + "description": "List of products which will be excluded.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ShippingPriceInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "Name of the shipping method.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "Shipping method description.", + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "minimumOrderWeight", + "description": "Minimum order weight to use this shipping method.", + "type": { + "kind": "SCALAR", + "name": "WeightScalar", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "maximumOrderWeight", + "description": "Maximum order weight to use this shipping method.", + "type": { + "kind": "SCALAR", + "name": "WeightScalar", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "maximumDeliveryDays", + "description": "Maximum number of days for delivery.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "minimumDeliveryDays", + "description": "Minimal number of days for delivery.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "Shipping type: price or weight based.", + "type": { + "kind": "ENUM", + "name": "ShippingMethodTypeEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingZone", + "description": "Shipping zone this method belongs to.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addPostalCodeRules", + "description": "Postal code rules to add.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ShippingPostalCodeRulesCreateInputRange", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deletePostalCodeRules", + "description": "Postal code rules to delete.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "inclusionType", + "description": "Inclusion type for currently assigned postal code rules.", + "type": { + "kind": "ENUM", + "name": "PostalCodeRuleInclusionTypeEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingPriceRemoveProductFromExclude", + "description": "Remove product from excluded list for shipping price.", + "fields": [ + { + "name": "shippingMethod", + "description": "A shipping method with new list of excluded products.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ShippingMethodType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingPriceTranslate", + "description": "Creates/updates translations for a shipping method.", + "fields": [ + { + "name": "translationErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingMethod", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ShippingMethodType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ShippingPriceTranslationInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "Translated shipping method description (JSON).", + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingPriceUpdate", + "description": "Updates a new shipping price.", + "fields": [ + { + "name": "shippingZone", + "description": "A shipping zone to which the shipping method belongs.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ShippingZone", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingMethod", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ShippingMethodType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingZone", + "description": "Represents a shipping zone in the shop. Zones are the concept used only for grouping shipping methods in the dashboard, and are never exposed to the customers directly.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "default", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "priceRange", + "description": "Lowest and highest prices for the shipping.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "MoneyRange", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countries", + "description": "List of countries available for the method.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CountryDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingMethods", + "description": "List of shipping methods available for orders shipped to countries within this shipping zone.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingMethodType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "warehouses", + "description": "List of warehouses for shipping zone.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Warehouse", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channels", + "description": "List of channels for shipping zone.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Channel", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "Description of a shipping zone.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingZoneBulkDelete", + "description": "Deletes shipping zones.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingZoneCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingZoneCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingZoneCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingZone", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingZoneCreate", + "description": "Creates a new shipping zone.", + "fields": [ + { + "name": "shippingErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingZone", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ShippingZone", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ShippingZoneCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "Shipping zone's name. Visible only to the staff.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "Description of the shipping zone.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countries", + "description": "List of countries in this shipping zone.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "default", + "description": "Default shipping zone will be used for countries not covered by other zones.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addWarehouses", + "description": "List of warehouses to assign to a shipping zone", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addChannels", + "description": "List of channels to assign to the shipping zone.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingZoneDelete", + "description": "Deletes a shipping zone.", + "fields": [ + { + "name": "shippingErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingZone", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ShippingZone", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ShippingZoneFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channels", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingZoneUpdate", + "description": "Updates a new shipping zone.", + "fields": [ + { + "name": "shippingErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingZone", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ShippingZone", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ShippingZoneUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "Shipping zone's name. Visible only to the staff.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "Description of the shipping zone.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countries", + "description": "List of countries in this shipping zone.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "default", + "description": "Default shipping zone will be used for countries not covered by other zones.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addWarehouses", + "description": "List of warehouses to assign to a shipping zone", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addChannels", + "description": "List of channels to assign to the shipping zone.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeWarehouses", + "description": "List of warehouses to unassign from a shipping zone", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeChannels", + "description": "List of channels to unassign from the shipping zone.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Shop", + "description": "Represents a shop resource containing general shop data and configuration.", + "fields": [ + { + "name": "availablePaymentGateways", + "description": "List of available payment gateways.", + "args": [ + { + "name": "currency", + "description": "A currency for which gateways will be returned. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use `channel` argument instead.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PaymentGateway", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "availableExternalAuthentications", + "description": "List of available external authentications.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ExternalAuthentication", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "availableShippingMethods", + "description": "Shipping methods that are available for the shop.", + "args": [ + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "address", + "description": "Address for which available shipping methods should be returned.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingMethod", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channelCurrencies", + "description": "New in Saleor 3.1. List of all currencies supported by shop's channels.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countries", + "description": "List of countries available in the shop.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for. \n\nDEPRECATED: this field will be removed in Saleor 4.0.", + "type": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filter", + "description": "Filtering options for countries", + "type": { + "kind": "INPUT_OBJECT", + "name": "CountryFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CountryDisplay", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultCountry", + "description": "Shop's default country.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "CountryDisplay", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultMailSenderName", + "description": "Default shop's email sender's name.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultMailSenderAddress", + "description": "Default shop's email sender's address.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "Shop's description.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "domain", + "description": "Shop's domain data.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Domain", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languages", + "description": "List of the shops's supported languages.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LanguageDisplay", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Shop's name.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "permissions", + "description": "List of available permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Permission", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "phonePrefixes", + "description": "List of possible phone prefixes.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "headerText", + "description": "Header text.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "includeTaxesInPrices", + "description": "Include taxes in prices.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fulfillmentAutoApprove", + "description": "New in Saleor 3.1. Automatically approve all new fulfillments.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fulfillmentAllowUnpaid", + "description": "New in Saleor 3.1. Allow to approve fulfillments which are unpaid.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "displayGrossPrices", + "description": "Display prices with tax in store.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chargeTaxesOnShipping", + "description": "Charge taxes on shipping.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "trackInventoryByDefault", + "description": "Enable inventory tracking.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultWeightUnit", + "description": "Default weight unit.", + "args": [], + "type": { + "kind": "ENUM", + "name": "WeightUnitsEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translation", + "description": "Returns translated shop fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for shop.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShopTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "automaticFulfillmentDigitalProducts", + "description": "Enable automatic fulfillment for all digital products.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reserveStockDurationAnonymousUser", + "description": "New in Saleor 3.1. Default number of minutes stock will be reserved for anonymous checkout or null when stock reservation is disabled.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reserveStockDurationAuthenticatedUser", + "description": "New in Saleor 3.1. Default number of minutes stock will be reserved for authenticated checkout or null when stock reservation is disabled.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "limitQuantityPerCheckout", + "description": "New in Saleor 3.1. Default number of maximum line quantity in single checkout (per single checkout line).", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultDigitalMaxDownloads", + "description": "Default number of max downloads per digital content URL.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultDigitalUrlValidDays", + "description": "Default number of days which digital content URL will be valid.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "companyAddress", + "description": "Company address.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Address", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "customerSetPasswordUrl", + "description": "URL of a view where customers can set their password.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "staffNotificationRecipients", + "description": "List of staff notification recipients.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "StaffNotificationRecipient", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "limits", + "description": "Resource limitations and current usage if any set for a shop", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LimitInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "version", + "description": "Saleor API version.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShopAddressUpdate", + "description": "Update the shop's address. If the `null` value is passed, the currently selected address will be deleted.", + "fields": [ + { + "name": "shop", + "description": "Updated shop.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Shop", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shopErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShopError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShopError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShopDomainUpdate", + "description": "Updates site domain of the shop.", + "fields": [ + { + "name": "shop", + "description": "Updated shop.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Shop", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shopErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShopError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShopError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShopError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ShopErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ShopErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ALREADY_EXISTS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CANNOT_FETCH_TAX_RATES", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShopFetchTaxRates", + "description": "Fetch tax rates.", + "fields": [ + { + "name": "shop", + "description": "Updated shop.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Shop", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shopErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShopError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShopError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ShopSettingsInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "headerText", + "description": "Header text.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "SEO description.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "includeTaxesInPrices", + "description": "Include taxes in prices.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "displayGrossPrices", + "description": "Display prices with tax in store.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chargeTaxesOnShipping", + "description": "Charge taxes on shipping.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "trackInventoryByDefault", + "description": "Enable inventory tracking.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultWeightUnit", + "description": "Default weight unit.", + "type": { + "kind": "ENUM", + "name": "WeightUnitsEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "automaticFulfillmentDigitalProducts", + "description": "Enable automatic fulfillment for all digital products.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fulfillmentAutoApprove", + "description": "New in Saleor 3.1. Enable automatic approval of all new fulfillments.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fulfillmentAllowUnpaid", + "description": "New in Saleor 3.1. Enable ability to approve fulfillments which are unpaid.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultDigitalMaxDownloads", + "description": "Default number of max downloads per digital content URL.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultDigitalUrlValidDays", + "description": "Default number of days which digital content URL will be valid.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultMailSenderName", + "description": "Default email sender's name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultMailSenderAddress", + "description": "Default email sender's address.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "customerSetPasswordUrl", + "description": "URL of a view where customers can set their password.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reserveStockDurationAnonymousUser", + "description": "New in Saleor 3.1. Default number of minutes stock will be reserved for anonymous checkout. Enter 0 or null to disable.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reserveStockDurationAuthenticatedUser", + "description": "New in Saleor 3.1. Default number of minutes stock will be reserved for authenticated checkout. Enter 0 or null to disable.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "limitQuantityPerCheckout", + "description": "New in Saleor 3.1. Default number of maximum line quantity in single checkout. Minimum possible value is 1, default value is 50.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShopSettingsTranslate", + "description": "Creates/updates translations for shop settings.", + "fields": [ + { + "name": "shop", + "description": "Updated shop settings.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Shop", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translationErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ShopSettingsTranslationInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "headerText", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShopSettingsUpdate", + "description": "Updates shop settings.", + "fields": [ + { + "name": "shop", + "description": "Updated shop.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Shop", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shopErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShopError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShopError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShopTranslation", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "language", + "description": "Translation language.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LanguageDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "headerText", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "SiteDomainInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "domain", + "description": "Domain name for shop.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Shop site name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "StaffBulkDelete", + "description": "Deletes staff users.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "staffErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "StaffError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "StaffError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "StaffCreate", + "description": "Creates a new staff user.", + "fields": [ + { + "name": "staffErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "StaffError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "StaffError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "StaffCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "firstName", + "description": "Given name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastName", + "description": "Family name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "email", + "description": "The unique email address of the user.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isActive", + "description": "User account is active.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "note", + "description": "A note about the user.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addGroups", + "description": "List of permission group IDs to which user should be assigned.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "redirectUrl", + "description": "URL of a view where users should be redirected to set the password. URL in RFC 1808 format.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "StaffDelete", + "description": "Deletes a staff user.", + "fields": [ + { + "name": "staffErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "StaffError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "StaffError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "StaffError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AccountErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addressType", + "description": "A type of address that causes the error.", + "args": [], + "type": { + "kind": "ENUM", + "name": "AddressTypeEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "permissions", + "description": "List of permissions which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PermissionEnum", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "groups", + "description": "List of permission group IDs which cause the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "users", + "description": "List of user IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "StaffMemberStatus", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ACTIVE", + "description": "User account has been activated.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DEACTIVATED", + "description": "User account has not been activated yet.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "StaffNotificationRecipient", + "description": "Represents a recipient of email notifications send by Saleor, such as notifications about new orders. Notifications can be assigned to staff users or arbitrary email addresses.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": "Returns a user subscribed to email notifications.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "email", + "description": "Returns email address of a user subscribed to email notifications.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "active", + "description": "Determines if a notification active.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "StaffNotificationRecipientCreate", + "description": "Creates a new staff notification recipient.", + "fields": [ + { + "name": "shopErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShopError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShopError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "staffNotificationRecipient", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "StaffNotificationRecipient", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "StaffNotificationRecipientDelete", + "description": "Delete staff notification recipient.", + "fields": [ + { + "name": "shopErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShopError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShopError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "staffNotificationRecipient", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "StaffNotificationRecipient", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "StaffNotificationRecipientInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "user", + "description": "The ID of the user subscribed to email notifications..", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "email", + "description": "Email address of a user subscribed to email notifications.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "active", + "description": "Determines if a notification active.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "StaffNotificationRecipientUpdate", + "description": "Updates a staff notification recipient.", + "fields": [ + { + "name": "shopErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShopError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShopError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "staffNotificationRecipient", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "StaffNotificationRecipient", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "StaffUpdate", + "description": "Updates an existing staff user.", + "fields": [ + { + "name": "staffErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "StaffError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "StaffError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "StaffUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "firstName", + "description": "Given name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastName", + "description": "Family name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "email", + "description": "The unique email address of the user.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isActive", + "description": "User account is active.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "note", + "description": "A note about the user.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addGroups", + "description": "List of permission group IDs to which user should be assigned.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeGroups", + "description": "List of permission group IDs from which user should be unassigned.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "StaffUserInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "status", + "description": null, + "type": { + "kind": "ENUM", + "name": "StaffMemberStatus", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ids", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Stock", + "description": "Represents stock.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "warehouse", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Warehouse", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productVariant", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantity", + "description": "Quantity of a product in the warehouse's possession, including the allocated stock that is waiting for shipment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantityAllocated", + "description": "Quantity allocated for orders", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantityReserved", + "description": "Quantity reserved for checkouts", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "StockAvailability", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "IN_STOCK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OUT_OF_STOCK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "StockCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "StockCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "StockCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Stock", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "StockError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "StockErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "StockErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ALREADY_EXISTS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "StockFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "quantity", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "StockInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "warehouse", + "description": "Warehouse in which stock is located.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantity", + "description": "Quantity of items available for sell.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "StorePaymentMethodEnum", + "description": "Enum representing the type of a payment storage in a gateway.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ON_SESSION", + "description": "On session storage type. The payment is stored only to be reused when the customer is present in the checkout flow.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OFF_SESSION", + "description": "Off session storage type. The payment is stored to be reused even if the customer is absent.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NONE", + "description": "Storage is disabled. The payment is not stored.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxType", + "description": "Representation of tax types fetched from tax gateway.", + "fields": [ + { + "name": "description", + "description": "Description of the tax type.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxCode", + "description": "External tax code used to identify given tax group.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxedMoney", + "description": "Represents a monetary value with taxes. In cases where taxes were not applied, net and gross values will be equal.", + "fields": [ + { + "name": "currency", + "description": "Currency code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "gross", + "description": "Amount of money including taxes.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "net", + "description": "Amount of money without taxes.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tax", + "description": "Amount of taxes.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxedMoneyRange", + "description": "Represents a range of monetary values.", + "fields": [ + { + "name": "start", + "description": "Lower bound of a price range.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "stop", + "description": "Upper bound of a price range.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TimePeriod", + "description": null, + "fields": [ + { + "name": "amount", + "description": "The length of the period.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "The type of the period.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TimePeriodTypeEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "TimePeriodInputType", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "amount", + "description": "The length of the period.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "The type of the period.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TimePeriodTypeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TimePeriodTypeEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "DAY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "WEEK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MONTH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "YEAR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Transaction", + "description": "An object representing a single payment.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "created", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "payment", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Payment", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "token", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "kind", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TransactionKind", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isSuccess", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "error", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "gatewayResponse", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "amount", + "description": "Total amount of the transaction.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TransactionKind", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "EXTERNAL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AUTH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PENDING", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ACTION_TO_CONFIRM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REFUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REFUND_ONGOING", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CAPTURE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VOID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CONFIRM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CANCEL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "UNION", + "name": "TranslatableItem", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "ProductTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "CollectionTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "CategoryTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "AttributeTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "AttributeValueTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ProductVariantTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PageTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ShippingMethodTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "SaleTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "VoucherTranslatableContent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "MenuItemTranslatableContent", + "ofType": null + } + ] + }, + { + "kind": "OBJECT", + "name": "TranslatableItemConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslatableItemEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TranslatableItemEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "UNION", + "name": "TranslatableItem", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TranslatableKinds", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ATTRIBUTE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ATTRIBUTE_VALUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CATEGORY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "COLLECTION", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MENU_ITEM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAGE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SALE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHIPPING_METHOD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VARIANT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VOUCHER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TranslationError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TranslationErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TranslationErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "TranslationInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "seoTitle", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "seoDescription", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "type": { + "kind": "SCALAR", + "name": "JSONString", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "UUID", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateInvoiceInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "number", + "description": "Invoice number", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "URL of an invoice to download.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UpdateMetadata", + "description": "Updates metadata of an object.", + "fields": [ + { + "name": "metadataErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "item", + "description": null, + "args": [], + "type": { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UpdatePrivateMetadata", + "description": "Updates private metadata of an object.", + "fields": [ + { + "name": "metadataErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "item", + "description": null, + "args": [], + "type": { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "Upload", + "description": "Variables of this type must be set to null in mutations. They will be replaced with a filename from a following multipart part containing a binary file. See: https://github.com/jaydenseric/graphql-multipart-request-spec.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UploadError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "UploadErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "UploadErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "User", + "description": "Represents user data.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "email", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "firstName", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastName", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isStaff", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isActive", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addresses", + "description": "List of all user's addresses.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Address", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkout", + "description": "Returns the last open checkout of this user.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use the `checkout_tokens` field to fetch the user checkouts." + }, + { + "name": "checkoutTokens", + "description": "Returns the checkout UUID's assigned to this user.", + "args": [ + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "giftCards", + "description": "List of the user gift cards.", + "args": [ + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "GiftCardCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "note", + "description": "A note about the customer.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orders", + "description": "List of user's orders.", + "args": [ + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrderCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "userPermissions", + "description": "List of user's permissions.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "UserPermission", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "permissionGroups", + "description": "List of user's permission groups.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Group", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "editableGroups", + "description": "List of user's permission groups which user can manage.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Group", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "avatar", + "description": null, + "args": [ + { + "name": "size", + "description": "Size of the avatar.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Image", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "events", + "description": "List of events associated with the user.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CustomerEvent", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "storedPaymentSources", + "description": "List of stored payment sources.", + "args": [ + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PaymentSource", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": "User language code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultShippingAddress", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Address", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultBillingAddress", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Address", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastLogin", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "dateJoined", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UserAvatarDelete", + "description": "Deletes a user avatar. Only for staff members.", + "fields": [ + { + "name": "user", + "description": "An updated user instance.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UserAvatarUpdate", + "description": "Create a user avatar. Only for staff members. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec", + "fields": [ + { + "name": "user", + "description": "An updated user instance.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UserBulkSetActive", + "description": "Activate or deactivate users.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UserCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "UserCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UserCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UserCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "defaultBillingAddress", + "description": "Billing address of the customer.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultShippingAddress", + "description": "Shipping address of the customer.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "firstName", + "description": "Given name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastName", + "description": "Family name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "email", + "description": "The unique email address of the user.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isActive", + "description": "User account is active.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "note", + "description": "A note about the user.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languageCode", + "description": "User language code.", + "type": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "redirectUrl", + "description": "URL of a view where users should be redirected to set the password. URL in RFC 1808 format.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Slug of a channel which will be used for notify user. Optional when only one channel exists.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UserPermission", + "description": null, + "fields": [ + { + "name": "code", + "description": "Internal code for permission.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PermissionEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Describe action(s) allowed to do by permission.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sourcePermissionGroups", + "description": "List of user permission groups which contains this permission.", + "args": [ + { + "name": "userId", + "description": "ID of user whose groups should be returned.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Group", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "UserSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "FIRST_NAME", + "description": "Sort users by first name.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LAST_NAME", + "description": "Sort users by last name.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EMAIL", + "description": "Sort users by email.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_COUNT", + "description": "Sort users by order count.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UserSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort users by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "UserSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "VAT", + "description": "Represents a VAT rate for a country.", + "fields": [ + { + "name": "countryCode", + "description": "Country code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "standardRate", + "description": "Standard VAT rate in percent.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reducedRates", + "description": "Country's VAT rate exceptions for specific types of goods.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReducedRate", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "VariantAttributeScope", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ALL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VARIANT_SELECTION", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_VARIANT_SELECTION", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "VariantMediaAssign", + "description": "Assign an media to a product variant.", + "fields": [ + { + "name": "productVariant", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "media", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductMedia", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "VariantMediaUnassign", + "description": "Unassign an media from a product variant.", + "fields": [ + { + "name": "productVariant", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "media", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProductMedia", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "productErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProductError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "VariantPricingInfo", + "description": "Represents availability of a variant in the storefront.", + "fields": [ + { + "name": "onSale", + "description": "Whether it is in sale or not.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discount", + "description": "The discount amount if in sale (null otherwise).", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountLocalCurrency", + "description": "The discount amount in the local currency.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "price", + "description": "The price, with any discount subtracted.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "priceUndiscounted", + "description": "The price without any discount.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "priceLocalCurrency", + "description": "The discounted price in the local currency.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxedMoney", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "VerifyToken", + "description": "Verify JWT token.", + "fields": [ + { + "name": "user", + "description": "User assigned to token.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isValid", + "description": "Determine if token is valid or not.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "payload", + "description": "JWT payload.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "GenericScalar", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "accountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AccountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "VolumeUnitsEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CUBIC_MILLIMETER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUBIC_CENTIMETER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUBIC_DECIMETER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUBIC_METER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LITER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUBIC_FOOT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUBIC_INCH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUBIC_YARD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "QT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PINT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FL_OZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ACRE_IN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ACRE_FT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Voucher", + "description": "Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "usageLimit", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "used", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "startDate", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "endDate", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "applyOncePerOrder", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "applyOncePerCustomer", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "onlyForStaff", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "minCheckoutItemsQuantity", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "categories", + "description": "List of categories this voucher applies to.", + "args": [ + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CategoryCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collections", + "description": "List of collections this voucher applies to.", + "args": [ + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CollectionCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "products", + "description": "List of products this voucher applies to.", + "args": [ + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variants", + "description": "New in Saleor 3.1. List of product variants this voucher applies to.", + "args": [ + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariantCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countries", + "description": "List of countries available for the shipping voucher.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CountryDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translation", + "description": "Returns translated voucher fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for voucher.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "VoucherTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountValueType", + "description": "Determines a type of discount for voucher - value or percentage", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "DiscountValueTypeEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountValue", + "description": "Voucher value.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "currency", + "description": "Currency code for voucher.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "minSpent", + "description": "Minimum order value to apply voucher.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "Determines a type of voucher.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "VoucherTypeEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channelListings", + "description": "List of availability in channels for the voucher.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "VoucherChannelListing", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "VoucherAddCatalogues", + "description": "Adds products, categories, collections to a voucher.", + "fields": [ + { + "name": "voucher", + "description": "Voucher of which catalogue IDs will be modified.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Voucher", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "VoucherBulkDelete", + "description": "Deletes vouchers.", + "fields": [ + { + "name": "count", + "description": "Returns how many objects were affected.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "VoucherChannelListing", + "description": "Represents voucher channel listing.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Channel", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountValue", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "currency", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "minSpent", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "VoucherChannelListingAddInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "channelId", + "description": "ID of a channel.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountValue", + "description": "Value of the voucher.", + "type": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "minAmountSpent", + "description": "Min purchase amount required to apply the voucher.", + "type": { + "kind": "SCALAR", + "name": "PositiveDecimal", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "VoucherChannelListingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "addChannels", + "description": "List of channels to which the voucher should be assigned.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "VoucherChannelListingAddInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeChannels", + "description": "List of channels from which the voucher should be unassigned.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "VoucherChannelListingUpdate", + "description": "Manage voucher's availability in channels.", + "fields": [ + { + "name": "voucher", + "description": "An updated voucher instance.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Voucher", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "VoucherCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "VoucherCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "VoucherCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Voucher", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "VoucherCreate", + "description": "Creates a new voucher.", + "fields": [ + { + "name": "discountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "voucher", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Voucher", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "VoucherDelete", + "description": "Deletes a voucher.", + "fields": [ + { + "name": "discountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "voucher", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Voucher", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "VoucherDiscountType", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "FIXED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PERCENTAGE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHIPPING", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "VoucherFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "status", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "DiscountStatusEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "timesUsed", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IntRangeInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountType", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "VoucherDiscountType", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "started", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateTimeRangeInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "VoucherInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "type", + "description": "Voucher type: PRODUCT, CATEGORY SHIPPING or ENTIRE_ORDER.", + "type": { + "kind": "ENUM", + "name": "VoucherTypeEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Voucher name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "Code to use the voucher.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "startDate", + "description": "Start date of the voucher in ISO 8601 format.", + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "endDate", + "description": "End date of the voucher in ISO 8601 format.", + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountValueType", + "description": "Choices: fixed or percentage.", + "type": { + "kind": "ENUM", + "name": "DiscountValueTypeEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "products", + "description": "Products discounted by the voucher.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variants", + "description": "New in Saleor 3.1. Variants discounted by the voucher.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collections", + "description": "Collections discounted by the voucher.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "categories", + "description": "Categories discounted by the voucher.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "minCheckoutItemsQuantity", + "description": "Minimal quantity of checkout items required to apply the voucher.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countries", + "description": "Country codes that can be used with the shipping voucher.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "applyOncePerOrder", + "description": "Voucher should be applied to the cheapest item or entire order.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "applyOncePerCustomer", + "description": "Voucher should be applied once per customer.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "onlyForStaff", + "description": "Voucher can be used only by staff user.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "usageLimit", + "description": "Limit number of times this voucher can be used in total.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "VoucherRemoveCatalogues", + "description": "Removes products, categories, collections from a voucher.", + "fields": [ + { + "name": "voucher", + "description": "Voucher of which catalogue IDs will be modified.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Voucher", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "discountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "VoucherSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CODE", + "description": "Sort vouchers by code.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "START_DATE", + "description": "Sort vouchers by start date.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "END_DATE", + "description": "Sort vouchers by end date.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VALUE", + "description": "Sort vouchers by value.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TYPE", + "description": "Sort vouchers by type.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "USAGE_LIMIT", + "description": "Sort vouchers by usage limit.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MINIMUM_SPENT_AMOUNT", + "description": "Sort vouchers by minimum spent amount.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "VoucherSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Specifies the channel in which to sort the data. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort vouchers by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "VoucherSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "VoucherTranslatableContent", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "translation", + "description": "Returns translated voucher fields for the given language code.", + "args": [ + { + "name": "languageCode", + "description": "A language code to return the translation for voucher.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageCodeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "VoucherTranslation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "voucher", + "description": "Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Voucher", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Get model fields from the root level queries." + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "VoucherTranslate", + "description": "Creates/updates translations for a voucher.", + "fields": [ + { + "name": "translationErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TranslationError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "voucher", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Voucher", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "VoucherTranslation", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "language", + "description": "Translation language.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LanguageDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "VoucherTypeEnum", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "SHIPPING", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ENTIRE_ORDER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SPECIFIC_PRODUCT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "VoucherUpdate", + "description": "Updates a voucher.", + "fields": [ + { + "name": "discountErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DiscountError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "voucher", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Voucher", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Warehouse", + "description": "Represents warehouse.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items.Requires proper staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "email", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isPrivate", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "address", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Address", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "companyName", + "description": "Warehouse company name.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `Address.companyName` instead." + }, + { + "name": "clickAndCollectOption", + "description": "New in Saleor 3.1. Click and collect options: local, all or disabled", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "WarehouseClickAndCollectOptionEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingZones", + "description": null, + "args": [ + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingZoneCountableConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "WarehouseClickAndCollectOptionEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "DISABLED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LOCAL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ALL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "WarehouseCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WarehouseCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "WarehouseCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Warehouse", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "WarehouseCreate", + "description": "Creates new warehouse.", + "fields": [ + { + "name": "warehouseErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WarehouseError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WarehouseError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "warehouse", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Warehouse", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "WarehouseCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "slug", + "description": "Warehouse slug.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "email", + "description": "The email address of the warehouse.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Warehouse name.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "address", + "description": "Address of the warehouse.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingZones", + "description": "Shipping zones supported by the warehouse.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "WarehouseDelete", + "description": "Deletes selected warehouse.", + "fields": [ + { + "name": "warehouseErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WarehouseError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WarehouseError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "warehouse", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Warehouse", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "WarehouseError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "WarehouseErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "WarehouseErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ALREADY_EXISTS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "WarehouseFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "clickAndCollectOption", + "description": null, + "type": { + "kind": "ENUM", + "name": "WarehouseClickAndCollectOptionEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "search", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ids", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isPrivate", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "WarehouseShippingZoneAssign", + "description": "Add shipping zone to given warehouse.", + "fields": [ + { + "name": "warehouseErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WarehouseError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WarehouseError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "warehouse", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Warehouse", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "WarehouseShippingZoneUnassign", + "description": "Remove shipping zone from given warehouse.", + "fields": [ + { + "name": "warehouseErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WarehouseError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WarehouseError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "warehouse", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Warehouse", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "WarehouseSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NAME", + "description": "Sort warehouses by name.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "WarehouseSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort warehouses by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "WarehouseSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "WarehouseUpdate", + "description": "Updates given warehouse.", + "fields": [ + { + "name": "warehouseErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WarehouseError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WarehouseError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "warehouse", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Warehouse", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "WarehouseUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "slug", + "description": "Warehouse slug.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "email", + "description": "The email address of the warehouse.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Warehouse name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "address", + "description": "Address of the warehouse.", + "type": { + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "clickAndCollectOption", + "description": "New in Saleor 3.1. Click and collect options: local, all or disabled", + "type": { + "kind": "ENUM", + "name": "WarehouseClickAndCollectOptionEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isPrivate", + "description": "New in Saleor 3.1. Visibility of warehouse stocks", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Webhook", + "description": "Webhook.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "events", + "description": "List of webhook events.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WebhookEvent", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `asyncEvents` or `syncEvents` instead." + }, + { + "name": "syncEvents", + "description": "List of synchronous webhook events.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WebhookEventSync", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "asyncEvents", + "description": "List of asynchronous webhook events.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WebhookEventAsync", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "app", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "App", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "eventDeliveries", + "description": "Event deliveries.", + "args": [ + { + "name": "sortBy", + "description": "Event delivery sorter.", + "type": { + "kind": "INPUT_OBJECT", + "name": "EventDeliverySortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filter", + "description": "Event delivery filter options.", + "type": { + "kind": "INPUT_OBJECT", + "name": "EventDeliveryFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "EventDeliveryCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "targetUrl", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isActive", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "secretKey", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "WebhookCreate", + "description": "Creates a new webhook subscription.", + "fields": [ + { + "name": "webhookErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WebhookError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WebhookError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "webhook", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Webhook", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "WebhookCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "The name of the webhook.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "targetUrl", + "description": "The url to receive the payload.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "events", + "description": "The events that webhook wants to subscribe. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use `asyncEvents` or `syncEvents` instead.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "WebhookEventTypeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "asyncEvents", + "description": "The asynchronous events that webhook wants to subscribe.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "WebhookEventTypeAsyncEnum", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "syncEvents", + "description": "The synchronous events that webhook wants to subscribe.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "WebhookEventTypeSyncEnum", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "app", + "description": "ID of the app to which webhook belongs.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isActive", + "description": "Determine if webhook will be set active or not.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "secretKey", + "description": "The secret key used to create a hash signature with each payload.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "WebhookDelete", + "description": "Deletes a webhook subscription.", + "fields": [ + { + "name": "webhookErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WebhookError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WebhookError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "webhook", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Webhook", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "WebhookError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "WebhookErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "WebhookErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "WebhookEvent", + "description": "Webhook event.", + "fields": [ + { + "name": "name", + "description": "Display name of the event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "eventType", + "description": "Internal name of the event type.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "WebhookEventTypeEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "WebhookEventAsync", + "description": "Asynchronous webhook event.", + "fields": [ + { + "name": "name", + "description": "Display name of the event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "eventType", + "description": "Internal name of the event type.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "WebhookEventTypeAsyncEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "WebhookEventSync", + "description": "Synchronous webhook event.", + "fields": [ + { + "name": "name", + "description": "Display name of the event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "eventType", + "description": "Internal name of the event type.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "WebhookEventTypeSyncEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "WebhookEventTypeAsyncEnum", + "description": "Enum determining type of webhook.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ANY_EVENTS", + "description": "All the events.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_CREATED", + "description": "A new order is placed.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_CONFIRMED", + "description": "An order is confirmed (status change unconfirmed -> unfulfilled) by a staff user using the OrderConfirm mutation. It also triggers when the user completes the checkout and the shop setting `automatically_confirm_all_new_orders` is enabled.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_FULLY_PAID", + "description": "Payment is made and an order is fully paid.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_UPDATED", + "description": "An order is updated; triggered for all changes related to an order; covers all other order webhooks, except for ORDER_CREATED.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_CANCELLED", + "description": "An order is cancelled.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_FULFILLED", + "description": "An order is fulfilled.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DRAFT_ORDER_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DRAFT_ORDER_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DRAFT_ORDER_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SALE_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SALE_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SALE_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVOICE_REQUESTED", + "description": "An invoice for order requested.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVOICE_DELETED", + "description": "An invoice is deleted.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVOICE_SENT", + "description": "Invoice has been sent.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUSTOMER_CREATED", + "description": "A new customer account is created.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUSTOMER_UPDATED", + "description": "A customer account is updated.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "COLLECTION_CREATED", + "description": "A new collection is created.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "COLLECTION_UPDATED", + "description": "A collection is updated.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "COLLECTION_DELETED", + "description": "A collection is deleted.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_CREATED", + "description": "A new product is created.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_UPDATED", + "description": "A product is updated.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_DELETED", + "description": "A product is deleted.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_VARIANT_CREATED", + "description": "A new product variant is created.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_VARIANT_UPDATED", + "description": "A product variant is updated.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_VARIANT_DELETED", + "description": "A product variant is deleted.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_VARIANT_OUT_OF_STOCK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_VARIANT_BACK_IN_STOCK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHECKOUT_CREATED", + "description": "A new checkout is created.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHECKOUT_UPDATED", + "description": "A checkout is updated. It also triggers all updates related to the checkout.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FULFILLMENT_CREATED", + "description": "A new fulfillment is created.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FULFILLMENT_CANCELED", + "description": "A fulfillment is cancelled.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOTIFY_USER", + "description": "User notification triggered.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAGE_CREATED", + "description": "A new page is created.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAGE_UPDATED", + "description": "A page is updated.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAGE_DELETED", + "description": "A page is deleted.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TRANSLATION_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TRANSLATION_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "WebhookEventTypeEnum", + "description": "Enum determining type of webhook.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ANY_EVENTS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_CONFIRMED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_FULLY_PAID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_CANCELLED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_FULFILLED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DRAFT_ORDER_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DRAFT_ORDER_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DRAFT_ORDER_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SALE_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SALE_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SALE_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVOICE_REQUESTED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVOICE_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVOICE_SENT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUSTOMER_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUSTOMER_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "COLLECTION_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "COLLECTION_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "COLLECTION_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_VARIANT_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_VARIANT_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_VARIANT_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_VARIANT_OUT_OF_STOCK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_VARIANT_BACK_IN_STOCK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHECKOUT_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHECKOUT_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FULFILLMENT_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FULFILLMENT_CANCELED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOTIFY_USER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAGE_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAGE_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAGE_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TRANSLATION_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TRANSLATION_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_AUTHORIZE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_CAPTURE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_CONFIRM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_LIST_GATEWAYS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_PROCESS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_REFUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_VOID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHIPPING_LIST_METHODS_FOR_CHECKOUT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "WebhookEventTypeSyncEnum", + "description": "Enum determining type of webhook.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "PAYMENT_AUTHORIZE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_CAPTURE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_CONFIRM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_LIST_GATEWAYS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_PROCESS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_REFUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAYMENT_VOID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SHIPPING_LIST_METHODS_FOR_CHECKOUT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "WebhookSampleEventTypeEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ORDER_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_CONFIRMED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_FULLY_PAID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_CANCELLED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_FULFILLED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DRAFT_ORDER_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DRAFT_ORDER_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DRAFT_ORDER_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SALE_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SALE_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SALE_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVOICE_REQUESTED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVOICE_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVOICE_SENT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUSTOMER_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUSTOMER_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "COLLECTION_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "COLLECTION_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "COLLECTION_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_VARIANT_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_VARIANT_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_VARIANT_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_VARIANT_OUT_OF_STOCK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_VARIANT_BACK_IN_STOCK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHECKOUT_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHECKOUT_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FULFILLMENT_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FULFILLMENT_CANCELED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOTIFY_USER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAGE_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAGE_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PAGE_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TRANSLATION_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TRANSLATION_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "WebhookUpdate", + "description": "Updates a webhook subscription.", + "fields": [ + { + "name": "webhookErrors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WebhookError", + "ofType": null + } + } + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `errors` field instead." + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WebhookError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "webhook", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Webhook", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "WebhookUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "The new name of the webhook.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "targetUrl", + "description": "The url to receive the payload.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "events", + "description": "The events that webhook wants to subscribe. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use `asyncEvents` or `syncEvents` instead.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "WebhookEventTypeEnum", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "asyncEvents", + "description": "The asynchronous events that webhook wants to subscribe.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "WebhookEventTypeAsyncEnum", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "syncEvents", + "description": "The synchronous events that webhook wants to subscribe.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "WebhookEventTypeSyncEnum", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "app", + "description": "ID of the app to which webhook belongs.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isActive", + "description": "Determine if webhook will be set active or not.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "secretKey", + "description": "Use to create a hash signature with each payload.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Weight", + "description": "Represents weight value in a specific weight unit.", + "fields": [ + { + "name": "unit", + "description": "Weight unit.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "WeightUnitsEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "value", + "description": "Weight value.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "WeightScalar", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "WeightUnitsEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "G", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LB", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OZ", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KG", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TONNE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "_Any", + "description": "Anything", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "UNION", + "name": "_Entity", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "App", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Address", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Group", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Product", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ProductType", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Collection", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Category", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ProductMedia", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PageType", + "ofType": null + } + ] + }, + { + "kind": "OBJECT", + "name": "_Service", + "description": null, + "fields": [ + { + "name": "sdl", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Schema", + "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", + "fields": [ + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "types", + "description": "A list of all types supported by this server.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "queryType", + "description": "The type that query operations will be rooted at.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "mutationType", + "description": "If this server supports mutation, the type that mutation operations will be rooted at.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subscriptionType", + "description": "If this server support subscription, the type that subscription operations will be rooted at.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "directives", + "description": "A list of all directives supported by this server.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Directive", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Type", + "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", + "fields": [ + { + "name": "kind", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "__TypeKind", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "specifiedByUrl", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fields", + "description": null, + "args": [ + { + "name": "includeDeprecated", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false", + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Field", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "interfaces", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "possibleTypes", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "enumValues", + "description": null, + "args": [ + { + "name": "includeDeprecated", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false", + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__EnumValue", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "inputFields", + "description": null, + "args": [ + { + "name": "includeDeprecated", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false", + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__InputValue", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ofType", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "__TypeKind", + "description": "An enum describing what kind of type a given `__Type` is.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "SCALAR", + "description": "Indicates this type is a scalar.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OBJECT", + "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INTERFACE", + "description": "Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNION", + "description": "Indicates this type is a union. `possibleTypes` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ENUM", + "description": "Indicates this type is an enum. `enumValues` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INPUT_OBJECT", + "description": "Indicates this type is an input object. `inputFields` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LIST", + "description": "Indicates this type is a list. `ofType` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NON_NULL", + "description": "Indicates this type is a non-null. `ofType` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Field", + "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", + "fields": [ + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "args", + "description": null, + "args": [ + { + "name": "includeDeprecated", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false", + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__InputValue", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isDeprecated", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deprecationReason", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__InputValue", + "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", + "fields": [ + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultValue", + "description": "A GraphQL-formatted string representing the default value for this input value.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isDeprecated", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deprecationReason", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__EnumValue", + "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", + "fields": [ + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isDeprecated", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deprecationReason", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Directive", + "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", + "fields": [ + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isRepeatable", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "locations", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "__DirectiveLocation", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "args", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__InputValue", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "__DirectiveLocation", + "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "QUERY", + "description": "Location adjacent to a query operation.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MUTATION", + "description": "Location adjacent to a mutation operation.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SUBSCRIPTION", + "description": "Location adjacent to a subscription operation.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FIELD", + "description": "Location adjacent to a field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FRAGMENT_DEFINITION", + "description": "Location adjacent to a fragment definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FRAGMENT_SPREAD", + "description": "Location adjacent to a fragment spread.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INLINE_FRAGMENT", + "description": "Location adjacent to an inline fragment.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VARIABLE_DEFINITION", + "description": "Location adjacent to a variable definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SCHEMA", + "description": "Location adjacent to a schema definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SCALAR", + "description": "Location adjacent to a scalar definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OBJECT", + "description": "Location adjacent to an object type definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FIELD_DEFINITION", + "description": "Location adjacent to a field definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ARGUMENT_DEFINITION", + "description": "Location adjacent to an argument definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INTERFACE", + "description": "Location adjacent to an interface definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNION", + "description": "Location adjacent to a union definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ENUM", + "description": "Location adjacent to an enum definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ENUM_VALUE", + "description": "Location adjacent to an enum value definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INPUT_OBJECT", + "description": "Location adjacent to an input object type definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INPUT_FIELD_DEFINITION", + "description": "Location adjacent to an input object field definition.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + } + ], + "directives": [ + { + "name": "include", + "description": "Directs the executor to include this field or fragment only when the `if` argument is true.", + "isRepeatable": false, + "locations": [ + "FIELD", + "FRAGMENT_SPREAD", + "INLINE_FRAGMENT" + ], + "args": [ + { + "name": "if", + "description": "Included when true.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ] + }, + { + "name": "skip", + "description": "Directs the executor to skip this field or fragment when the `if` argument is true.", + "isRepeatable": false, + "locations": [ + "FIELD", + "FRAGMENT_SPREAD", + "INLINE_FRAGMENT" + ], + "args": [ + { + "name": "if", + "description": "Skipped when true.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ] + }, + { + "name": "deprecated", + "description": "Marks an element of a GraphQL schema as no longer supported.", + "isRepeatable": false, + "locations": [ + "FIELD_DEFINITION", + "ARGUMENT_DEFINITION", + "INPUT_FIELD_DEFINITION", + "ENUM_VALUE" + ], + "args": [ + { + "name": "reason", + "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": "\"No longer supported\"", + "isDeprecated": false, + "deprecationReason": null + } + ] + }, + { + "name": "specifiedBy", + "description": "Exposes a URL that specifies the behaviour of this scalar.", + "isRepeatable": false, + "locations": [ + "SCALAR" + ], + "args": [ + { + "name": "url", + "description": "The URL that specifies the behaviour of this scalar.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ] + } + ] + } +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 73848f934..408aee99c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2112,6 +2112,59 @@ "integrity": "sha512-KWk80UPIzPmUg+P0rKh6TqspRw0G6eux1PuJr+zz47ftMaZ9QDwbGzHZbtzWkl5hgayM/qrKRutllRC7D/vVXQ==", "dev": true }, + "@graphql-codegen/add": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@graphql-codegen/add/-/add-3.1.1.tgz", + "integrity": "sha512-XkVwcqosa0CVBlL1HaQT0gp+EUfhuQE3LzrEpzMQLwchxaj/NPVYtOJL6MUHaYDsHzLqxWrufjfbeB3y2NQgRw==", + "dev": true, + "requires": { + "@graphql-codegen/plugin-helpers": "^2.3.2", + "tslib": "~2.3.0" + }, + "dependencies": { + "@graphql-codegen/plugin-helpers": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-2.4.0.tgz", + "integrity": "sha512-bQ2EwVU34wkTrWM4/LbXS4t+ROYFM3qzwrRX6aFNYwAPho/fubryBHmNuUTh4evACFMx1ymQ6QLnvOUAoXYZSQ==", + "dev": true, + "requires": { + "@graphql-tools/utils": "^8.5.2", + "change-case-all": "1.0.14", + "common-tags": "1.8.2", + "import-from": "4.0.0", + "lodash": "~4.17.0", + "tslib": "~2.3.0" + } + }, + "@graphql-tools/utils": { + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.1.tgz", + "integrity": "sha512-uxcfHCocp4ENoIiovPxUWZEHOnbXqj3ekWc0rm7fUhW93a1xheARNHcNKhwMTR+UKXVJbTFQdGI1Rl5XdyvDBg==", + "dev": true, + "requires": { + "tslib": "~2.3.0" + } + }, + "common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "dev": true + }, + "import-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-from/-/import-from-4.0.0.tgz", + "integrity": "sha512-P9J71vT5nLlDeV8FHs5nNxaLbrpfAV5cF5srvbZfpwpcJoM/xZR3hiv+q+SAnuSmuGbXMWud063iIMx/V/EWZQ==", + "dev": true + }, + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + } + } + }, "@graphql-codegen/cli": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-2.1.1.tgz", @@ -2420,6 +2473,132 @@ } } }, + "@graphql-codegen/import-types-preset": { + "version": "2.1.12", + "resolved": "https://registry.npmjs.org/@graphql-codegen/import-types-preset/-/import-types-preset-2.1.12.tgz", + "integrity": "sha512-nFipXzsLJnjZY06PKBovg1hxnueB5n/RSlBPYA29ymahEenNR1vMejbq8/+iuRoxexLuYVSVnJAEcqoBriUKrg==", + "dev": true, + "requires": { + "@graphql-codegen/add": "^3.1.1", + "@graphql-codegen/plugin-helpers": "^2.4.0", + "@graphql-codegen/visitor-plugin-common": "2.7.1", + "tslib": "~2.3.0" + }, + "dependencies": { + "@graphql-codegen/plugin-helpers": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-2.4.1.tgz", + "integrity": "sha512-OPMma7aUnES3Dh+M0BfiNBnJLmYuH60EnbULAhufxFDn/Y2OA0Ht/LQok9beX6VN4ASZEMCOAGItJezGJr5DJw==", + "dev": true, + "requires": { + "@graphql-tools/utils": "^8.5.2", + "change-case-all": "1.0.14", + "common-tags": "1.8.2", + "import-from": "4.0.0", + "lodash": "~4.17.0", + "tslib": "~2.3.0" + } + }, + "@graphql-codegen/visitor-plugin-common": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-2.7.1.tgz", + "integrity": "sha512-Ew/+0GwGwL3ZSXS0cYz6lVvE7S5SkbTr7caRpLa4FpAdLGNskCgdA1n6W5tX5c7qsaYstqlxp30hJTfgTsYS6A==", + "dev": true, + "requires": { + "@graphql-codegen/plugin-helpers": "^2.4.0", + "@graphql-tools/optimize": "^1.0.1", + "@graphql-tools/relay-operation-optimizer": "^6.3.7", + "@graphql-tools/utils": "^8.3.0", + "auto-bind": "~4.0.0", + "change-case-all": "1.0.14", + "dependency-graph": "^0.11.0", + "graphql-tag": "^2.11.0", + "parse-filepath": "^1.0.2", + "tslib": "~2.3.0" + } + }, + "@graphql-tools/utils": { + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.1.tgz", + "integrity": "sha512-uxcfHCocp4ENoIiovPxUWZEHOnbXqj3ekWc0rm7fUhW93a1xheARNHcNKhwMTR+UKXVJbTFQdGI1Rl5XdyvDBg==", + "dev": true, + "requires": { + "tslib": "~2.3.0" + } + }, + "common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "dev": true + }, + "import-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-from/-/import-from-4.0.0.tgz", + "integrity": "sha512-P9J71vT5nLlDeV8FHs5nNxaLbrpfAV5cF5srvbZfpwpcJoM/xZR3hiv+q+SAnuSmuGbXMWud063iIMx/V/EWZQ==", + "dev": true + }, + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + } + } + }, + "@graphql-codegen/introspection": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@graphql-codegen/introspection/-/introspection-2.1.1.tgz", + "integrity": "sha512-O9zsy0IoFYDo37pBVF4pSvRMDx/AKdgOxyko4R/O+0DHEw9Nya/pQ3dbn+LDLj2n6X+xOXUBUfFvqhODTqU28w==", + "dev": true, + "requires": { + "@graphql-codegen/plugin-helpers": "^2.3.2", + "tslib": "~2.3.0" + }, + "dependencies": { + "@graphql-codegen/plugin-helpers": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-2.4.1.tgz", + "integrity": "sha512-OPMma7aUnES3Dh+M0BfiNBnJLmYuH60EnbULAhufxFDn/Y2OA0Ht/LQok9beX6VN4ASZEMCOAGItJezGJr5DJw==", + "dev": true, + "requires": { + "@graphql-tools/utils": "^8.5.2", + "change-case-all": "1.0.14", + "common-tags": "1.8.2", + "import-from": "4.0.0", + "lodash": "~4.17.0", + "tslib": "~2.3.0" + } + }, + "@graphql-tools/utils": { + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.1.tgz", + "integrity": "sha512-uxcfHCocp4ENoIiovPxUWZEHOnbXqj3ekWc0rm7fUhW93a1xheARNHcNKhwMTR+UKXVJbTFQdGI1Rl5XdyvDBg==", + "dev": true, + "requires": { + "tslib": "~2.3.0" + } + }, + "common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "dev": true + }, + "import-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-from/-/import-from-4.0.0.tgz", + "integrity": "sha512-P9J71vT5nLlDeV8FHs5nNxaLbrpfAV5cF5srvbZfpwpcJoM/xZR3hiv+q+SAnuSmuGbXMWud063iIMx/V/EWZQ==", + "dev": true + }, + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + } + } + }, "@graphql-codegen/plugin-helpers": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-2.1.0.tgz", @@ -2448,18 +2627,110 @@ } } }, - "@graphql-codegen/typescript": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript/-/typescript-2.1.1.tgz", - "integrity": "sha512-FDTuFIvuP0wbwuEUfMw7PiNVE4qJkjpiAccaZTEm6A69Wcumt774qaHMQC2vIg2t5xi1t69n8lbIggdtgf6Xtw==", + "@graphql-codegen/schema-ast": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@graphql-codegen/schema-ast/-/schema-ast-2.4.1.tgz", + "integrity": "sha512-bIWlKk/ShoVJfghA4Rt1OWnd34/dQmZM/vAe6fu6QKyOh44aAdqPtYQ2dbTyFXoknmu504etKJGEDllYNUJRfg==", "dev": true, "requires": { - "@graphql-codegen/plugin-helpers": "^2.1.0", - "@graphql-codegen/visitor-plugin-common": "2.1.1", + "@graphql-codegen/plugin-helpers": "^2.3.2", + "@graphql-tools/utils": "^8.1.1", + "tslib": "~2.3.0" + }, + "dependencies": { + "@graphql-codegen/plugin-helpers": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-2.4.0.tgz", + "integrity": "sha512-bQ2EwVU34wkTrWM4/LbXS4t+ROYFM3qzwrRX6aFNYwAPho/fubryBHmNuUTh4evACFMx1ymQ6QLnvOUAoXYZSQ==", + "dev": true, + "requires": { + "@graphql-tools/utils": "^8.5.2", + "change-case-all": "1.0.14", + "common-tags": "1.8.2", + "import-from": "4.0.0", + "lodash": "~4.17.0", + "tslib": "~2.3.0" + }, + "dependencies": { + "@graphql-tools/utils": { + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.1.tgz", + "integrity": "sha512-uxcfHCocp4ENoIiovPxUWZEHOnbXqj3ekWc0rm7fUhW93a1xheARNHcNKhwMTR+UKXVJbTFQdGI1Rl5XdyvDBg==", + "dev": true, + "requires": { + "tslib": "~2.3.0" + } + } + } + }, + "common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "dev": true + }, + "import-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-from/-/import-from-4.0.0.tgz", + "integrity": "sha512-P9J71vT5nLlDeV8FHs5nNxaLbrpfAV5cF5srvbZfpwpcJoM/xZR3hiv+q+SAnuSmuGbXMWud063iIMx/V/EWZQ==", + "dev": true + }, + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + } + } + }, + "@graphql-codegen/typescript": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript/-/typescript-2.4.3.tgz", + "integrity": "sha512-5b+4EVA01kiKId6IbBvuvSs0/aGeuSU+Cg2pBbe9VZol49iid982p28k9knEH4Jzgu4tUp4UMQTWNNwkPB4tEQ==", + "dev": true, + "requires": { + "@graphql-codegen/plugin-helpers": "^2.4.0", + "@graphql-codegen/schema-ast": "^2.4.1", + "@graphql-codegen/visitor-plugin-common": "2.6.0", "auto-bind": "~4.0.0", "tslib": "~2.3.0" }, "dependencies": { + "@graphql-codegen/plugin-helpers": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-2.4.0.tgz", + "integrity": "sha512-bQ2EwVU34wkTrWM4/LbXS4t+ROYFM3qzwrRX6aFNYwAPho/fubryBHmNuUTh4evACFMx1ymQ6QLnvOUAoXYZSQ==", + "dev": true, + "requires": { + "@graphql-tools/utils": "^8.5.2", + "change-case-all": "1.0.14", + "common-tags": "1.8.2", + "import-from": "4.0.0", + "lodash": "~4.17.0", + "tslib": "~2.3.0" + } + }, + "@graphql-tools/utils": { + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.1.tgz", + "integrity": "sha512-uxcfHCocp4ENoIiovPxUWZEHOnbXqj3ekWc0rm7fUhW93a1xheARNHcNKhwMTR+UKXVJbTFQdGI1Rl5XdyvDBg==", + "dev": true, + "requires": { + "tslib": "~2.3.0" + } + }, + "common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "dev": true + }, + "import-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-from/-/import-from-4.0.0.tgz", + "integrity": "sha512-P9J71vT5nLlDeV8FHs5nNxaLbrpfAV5cF5srvbZfpwpcJoM/xZR3hiv+q+SAnuSmuGbXMWud063iIMx/V/EWZQ==", + "dev": true + }, "tslib": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", @@ -2542,16 +2813,146 @@ } } }, - "@graphql-codegen/visitor-plugin-common": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-2.1.1.tgz", - "integrity": "sha512-FO8kMDL+Y1yw8DirhIsY97RjVKfmxxhK179njA46Vu85Rg4zCuLpGMyB0mkhl95QGfdfuJjbB1lz34U27Ce9Wg==", + "@graphql-codegen/typescript-operations": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-operations/-/typescript-operations-2.2.4.tgz", + "integrity": "sha512-PAunOSdl4avsaGLTBxZkxOBQNfp9bmobBOX5p6q99NMYwoXsmtyu0mD8jIbzM+LMbxrskNxKJ1sywZ11aYGCMA==", "dev": true, "requires": { - "@graphql-codegen/plugin-helpers": "^2.1.0", + "@graphql-codegen/plugin-helpers": "^2.4.0", + "@graphql-codegen/typescript": "^2.4.3", + "@graphql-codegen/visitor-plugin-common": "2.6.0", + "auto-bind": "~4.0.0", + "tslib": "~2.3.0" + }, + "dependencies": { + "@graphql-codegen/plugin-helpers": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-2.4.0.tgz", + "integrity": "sha512-bQ2EwVU34wkTrWM4/LbXS4t+ROYFM3qzwrRX6aFNYwAPho/fubryBHmNuUTh4evACFMx1ymQ6QLnvOUAoXYZSQ==", + "dev": true, + "requires": { + "@graphql-tools/utils": "^8.5.2", + "change-case-all": "1.0.14", + "common-tags": "1.8.2", + "import-from": "4.0.0", + "lodash": "~4.17.0", + "tslib": "~2.3.0" + } + }, + "@graphql-tools/utils": { + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.1.tgz", + "integrity": "sha512-uxcfHCocp4ENoIiovPxUWZEHOnbXqj3ekWc0rm7fUhW93a1xheARNHcNKhwMTR+UKXVJbTFQdGI1Rl5XdyvDBg==", + "dev": true, + "requires": { + "tslib": "~2.3.0" + } + }, + "common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "dev": true + }, + "import-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-from/-/import-from-4.0.0.tgz", + "integrity": "sha512-P9J71vT5nLlDeV8FHs5nNxaLbrpfAV5cF5srvbZfpwpcJoM/xZR3hiv+q+SAnuSmuGbXMWud063iIMx/V/EWZQ==", + "dev": true + }, + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + } + } + }, + "@graphql-codegen/typescript-react-apollo": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-react-apollo/-/typescript-react-apollo-3.2.5.tgz", + "integrity": "sha512-ODOmONBfZpNpWXrF6TKfeEoaaU/mnQ9lLZ1rv1fu2FusREvpMITaLznYUDo1RsI+iSjsJYm7dmSJmFPv+lxZrg==", + "dev": true, + "requires": { + "@graphql-codegen/plugin-helpers": "^2.4.0", + "@graphql-codegen/visitor-plugin-common": "2.6.0", + "auto-bind": "~4.0.0", + "change-case-all": "1.0.14", + "tslib": "~2.3.0" + }, + "dependencies": { + "@graphql-codegen/plugin-helpers": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-2.4.0.tgz", + "integrity": "sha512-bQ2EwVU34wkTrWM4/LbXS4t+ROYFM3qzwrRX6aFNYwAPho/fubryBHmNuUTh4evACFMx1ymQ6QLnvOUAoXYZSQ==", + "dev": true, + "requires": { + "@graphql-tools/utils": "^8.5.2", + "change-case-all": "1.0.14", + "common-tags": "1.8.2", + "import-from": "4.0.0", + "lodash": "~4.17.0", + "tslib": "~2.3.0" + } + }, + "@graphql-codegen/visitor-plugin-common": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-2.6.0.tgz", + "integrity": "sha512-MysdJ8L/dIn62D+BFbiu6HSVaZfkAt0EI1g5twkpKzLmG7qDJ8P7KemFVFU/sCW3SVuhs7XabkSjnFK9uBquwg==", + "dev": true, + "requires": { + "@graphql-codegen/plugin-helpers": "^2.4.0", + "@graphql-tools/optimize": "^1.0.1", + "@graphql-tools/relay-operation-optimizer": "^6.3.7", + "@graphql-tools/utils": "^8.3.0", + "auto-bind": "~4.0.0", + "change-case-all": "1.0.14", + "dependency-graph": "^0.11.0", + "graphql-tag": "^2.11.0", + "parse-filepath": "^1.0.2", + "tslib": "~2.3.0" + } + }, + "@graphql-tools/utils": { + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.1.tgz", + "integrity": "sha512-uxcfHCocp4ENoIiovPxUWZEHOnbXqj3ekWc0rm7fUhW93a1xheARNHcNKhwMTR+UKXVJbTFQdGI1Rl5XdyvDBg==", + "dev": true, + "requires": { + "tslib": "~2.3.0" + } + }, + "common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "dev": true + }, + "import-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-from/-/import-from-4.0.0.tgz", + "integrity": "sha512-P9J71vT5nLlDeV8FHs5nNxaLbrpfAV5cF5srvbZfpwpcJoM/xZR3hiv+q+SAnuSmuGbXMWud063iIMx/V/EWZQ==", + "dev": true + }, + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + } + } + }, + "@graphql-codegen/visitor-plugin-common": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-2.6.0.tgz", + "integrity": "sha512-MysdJ8L/dIn62D+BFbiu6HSVaZfkAt0EI1g5twkpKzLmG7qDJ8P7KemFVFU/sCW3SVuhs7XabkSjnFK9uBquwg==", + "dev": true, + "requires": { + "@graphql-codegen/plugin-helpers": "^2.4.0", "@graphql-tools/optimize": "^1.0.1", "@graphql-tools/relay-operation-optimizer": "^6.3.7", - "array.prototype.flatmap": "^1.2.4", + "@graphql-tools/utils": "^8.3.0", "auto-bind": "~4.0.0", "change-case-all": "1.0.14", "dependency-graph": "^0.11.0", @@ -2560,6 +2961,41 @@ "tslib": "~2.3.0" }, "dependencies": { + "@graphql-codegen/plugin-helpers": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-2.4.0.tgz", + "integrity": "sha512-bQ2EwVU34wkTrWM4/LbXS4t+ROYFM3qzwrRX6aFNYwAPho/fubryBHmNuUTh4evACFMx1ymQ6QLnvOUAoXYZSQ==", + "dev": true, + "requires": { + "@graphql-tools/utils": "^8.5.2", + "change-case-all": "1.0.14", + "common-tags": "1.8.2", + "import-from": "4.0.0", + "lodash": "~4.17.0", + "tslib": "~2.3.0" + } + }, + "@graphql-tools/utils": { + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.1.tgz", + "integrity": "sha512-uxcfHCocp4ENoIiovPxUWZEHOnbXqj3ekWc0rm7fUhW93a1xheARNHcNKhwMTR+UKXVJbTFQdGI1Rl5XdyvDBg==", + "dev": true, + "requires": { + "tslib": "~2.3.0" + } + }, + "common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "dev": true + }, + "import-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-from/-/import-from-4.0.0.tgz", + "integrity": "sha512-P9J71vT5nLlDeV8FHs5nNxaLbrpfAV5cF5srvbZfpwpcJoM/xZR3hiv+q+SAnuSmuGbXMWud063iIMx/V/EWZQ==", + "dev": true + }, "tslib": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", diff --git a/package.json b/package.json index b7a91b8ee..d455476bd 100644 --- a/package.json +++ b/package.json @@ -93,10 +93,15 @@ "@babel/preset-typescript": "^7.13.0", "@babel/runtime": "^7.7.6", "@editorjs/embed": "^2.4.6", + "@graphql-codegen/add": "^3.1.1", "@graphql-codegen/cli": "^2.1.1", "@graphql-codegen/fragment-matcher": "^3.1.0", - "@graphql-codegen/typescript": "^2.1.1", + "@graphql-codegen/import-types-preset": "^2.1.12", + "@graphql-codegen/introspection": "^2.1.1", + "@graphql-codegen/typescript": "^2.4.3", "@graphql-codegen/typescript-apollo-client-helpers": "^2.1.10", + "@graphql-codegen/typescript-operations": "^2.2.4", + "@graphql-codegen/typescript-react-apollo": "^3.2.5", "@pollyjs/adapter-node-http": "^5.0.0", "@pollyjs/core": "^5.0.0", "@pollyjs/persister-fs": "^5.0.0", @@ -249,16 +254,16 @@ }, "scripts": { "build-storybook": "build-storybook -c src/storybook/ -o build/storybook", - "generate-fragment-types": "graphql-codegen", - "build-types": "npx apollo client:codegen --target=typescript types --globalTypesFile=src/types/globalTypes.ts && npm run generate-fragment-types", - "build": "npm run generate-fragment-types && webpack -p", + "build-types": "graphql-codegen", + "build": "npm run build-types && webpack -p", "check-strict-null-errors": "tsc --noEmit --strictNullChecks | node scripts/count-strict-null-check-errors.js", "check-types": "tsc --noEmit", "extract-json-messages": "rimraf build/locale && cross-env NODE_ENV=extract babel src 'src/**/*.{ts,tsx}' -o build/dashboard.bundle.js", "extract-messages": "npm run extract-json-messages && npm run transpile-messages", + "fetch-schema": "graphql-codegen --config ./fetch-schema.yml", "heroku-postbuild": "npm run build", "serve:lhci": "NODE_ENV=production npm run server", - "start": "npm run generate-fragment-types && webpack-dev-server -d", + "start": "npm run build-types && webpack-dev-server -d", "storybook": "start-storybook -p 3000 -c src/storybook/", "cy:run": "cypress run", "cy:run:report": "cypress run --env tags=all --reporter cypress-mochawesome-reporter --reporter-options reportDir='cypress/reports',overwrite=true,charts=true", diff --git a/schema.graphql b/schema.graphql deleted file mode 100644 index 5dceaa609..000000000 --- a/schema.graphql +++ /dev/null @@ -1,7669 +0,0 @@ -schema { - query: Query - mutation: Mutation -} - -type AccountAddressCreate { - user: User - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! - address: Address -} - -type AccountAddressDelete { - user: User - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! - address: Address -} - -type AccountAddressUpdate { - user: User - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! - address: Address -} - -type AccountDelete { - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! - user: User -} - -type AccountError { - field: String - message: String - code: AccountErrorCode! - addressType: AddressTypeEnum -} - -enum AccountErrorCode { - ACTIVATE_OWN_ACCOUNT - ACTIVATE_SUPERUSER_ACCOUNT - DUPLICATED_INPUT_ITEM - DEACTIVATE_OWN_ACCOUNT - DEACTIVATE_SUPERUSER_ACCOUNT - DELETE_NON_STAFF_USER - DELETE_OWN_ACCOUNT - DELETE_STAFF_ACCOUNT - DELETE_SUPERUSER_ACCOUNT - GRAPHQL_ERROR - INACTIVE - INVALID - INVALID_PASSWORD - LEFT_NOT_MANAGEABLE_PERMISSION - INVALID_CREDENTIALS - NOT_FOUND - OUT_OF_SCOPE_USER - OUT_OF_SCOPE_GROUP - OUT_OF_SCOPE_PERMISSION - PASSWORD_ENTIRELY_NUMERIC - PASSWORD_TOO_COMMON - PASSWORD_TOO_SHORT - PASSWORD_TOO_SIMILAR - REQUIRED - UNIQUE - JWT_SIGNATURE_EXPIRED - JWT_INVALID_TOKEN - JWT_DECODE_ERROR - JWT_MISSING_TOKEN - JWT_INVALID_CSRF_TOKEN - CHANNEL_INACTIVE - MISSING_CHANNEL_SLUG - ACCOUNT_NOT_CONFIRMED -} - -input AccountInput { - firstName: String - lastName: String - languageCode: LanguageCodeEnum - defaultBillingAddress: AddressInput - defaultShippingAddress: AddressInput -} - -type AccountRegister { - requiresConfirmation: Boolean - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! - user: User -} - -input AccountRegisterInput { - firstName: String - lastName: String - languageCode: LanguageCodeEnum - email: String! - password: String! - redirectUrl: String - metadata: [MetadataInput!] - channel: String -} - -type AccountRequestDeletion { - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -type AccountSetDefaultAddress { - user: User - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -type AccountUpdate { - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! - user: User -} - -type Address implements Node { - id: ID! - firstName: String! - lastName: String! - companyName: String! - streetAddress1: String! - streetAddress2: String! - city: String! - cityArea: String! - postalCode: String! - country: CountryDisplay! - countryArea: String! - phone: String - isDefaultShippingAddress: Boolean - isDefaultBillingAddress: Boolean -} - -type AddressCreate { - user: User - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! - address: Address -} - -type AddressDelete { - user: User - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! - address: Address -} - -input AddressInput { - firstName: String - lastName: String - companyName: String - streetAddress1: String - streetAddress2: String - city: String - cityArea: String - postalCode: String - country: CountryCode - countryArea: String - phone: String -} - -type AddressSetDefault { - user: User - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -enum AddressTypeEnum { - BILLING - SHIPPING -} - -type AddressUpdate { - user: User - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! - address: Address -} - -type AddressValidationData { - countryCode: String - countryName: String - addressFormat: String - addressLatinFormat: String - allowedFields: [String] - requiredFields: [String] - upperFields: [String] - countryAreaType: String - countryAreaChoices: [ChoiceValue] - cityType: String - cityChoices: [ChoiceValue] - cityAreaType: String - cityAreaChoices: [ChoiceValue] - postalCodeType: String - postalCodeMatchers: [String] - postalCodeExamples: [String] - postalCodePrefix: String -} - -type Allocation implements Node { - id: ID! - quantity: Int! - warehouse: Warehouse! -} - -type App implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - permissions: [Permission] - created: DateTime - isActive: Boolean - name: String - type: AppTypeEnum - tokens: [AppToken] - webhooks: [Webhook] - aboutApp: String - dataPrivacy: String - dataPrivacyUrl: String - homepageUrl: String - supportUrl: String - configurationUrl: String - appUrl: String - version: String - accessToken: String - extensions: [AppExtension!]! -} - -type AppActivate { - appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AppError!]! - app: App -} - -type AppCountableConnection { - pageInfo: PageInfo! - edges: [AppCountableEdge!]! - totalCount: Int -} - -type AppCountableEdge { - node: App! - cursor: String! -} - -type AppCreate { - authToken: String - appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AppError!]! - app: App -} - -type AppDeactivate { - appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AppError!]! - app: App -} - -type AppDelete { - appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AppError!]! - app: App -} - -type AppDeleteFailedInstallation { - appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AppError!]! - appInstallation: AppInstallation -} - -type AppError { - field: String - message: String - code: AppErrorCode! - permissions: [PermissionEnum!] -} - -enum AppErrorCode { - FORBIDDEN - GRAPHQL_ERROR - INVALID - INVALID_STATUS - INVALID_PERMISSION - INVALID_URL_FORMAT - INVALID_MANIFEST_FORMAT - MANIFEST_URL_CANT_CONNECT - NOT_FOUND - REQUIRED - UNIQUE - OUT_OF_SCOPE_APP - OUT_OF_SCOPE_PERMISSION -} - -type AppExtension implements Node { - id: ID! - permissions: [Permission!]! - label: String! - url: String! - mount: AppExtensionMountEnum! - target: AppExtensionTargetEnum! - app: App! - accessToken: String -} - -type AppExtensionCountableConnection { - pageInfo: PageInfo! - edges: [AppExtensionCountableEdge!]! - totalCount: Int -} - -type AppExtensionCountableEdge { - node: AppExtension! - cursor: String! -} - -input AppExtensionFilterInput { - mount: [AppExtensionMountEnum] - target: AppExtensionTargetEnum -} - -enum AppExtensionMountEnum { - PRODUCT_OVERVIEW_CREATE - PRODUCT_OVERVIEW_MORE_ACTIONS - PRODUCT_DETAILS_MORE_ACTIONS - NAVIGATION_CATALOG - NAVIGATION_ORDERS - NAVIGATION_CUSTOMERS - NAVIGATION_DISCOUNTS - NAVIGATION_TRANSLATIONS - NAVIGATION_PAGES -} - -enum AppExtensionTargetEnum { - POPUP - APP_PAGE -} - -type AppFetchManifest { - manifest: Manifest - appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AppError!]! -} - -input AppFilterInput { - search: String - isActive: Boolean - type: AppTypeEnum -} - -input AppInput { - name: String - permissions: [PermissionEnum] -} - -type AppInstall { - appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AppError!]! - appInstallation: AppInstallation -} - -input AppInstallInput { - appName: String - manifestUrl: String - activateAfterInstallation: Boolean = true - permissions: [PermissionEnum] -} - -type AppInstallation implements Node & Job { - id: ID! - status: JobStatusEnum! - createdAt: DateTime! - updatedAt: DateTime! - message: String - appName: String! - manifestUrl: String! -} - -type AppManifestExtension { - permissions: [Permission!]! - label: String! - url: String! - mount: AppExtensionMountEnum! - target: AppExtensionTargetEnum! -} - -type AppRetryInstall { - appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AppError!]! - appInstallation: AppInstallation -} - -enum AppSortField { - NAME - CREATION_DATE -} - -input AppSortingInput { - direction: OrderDirection! - field: AppSortField! -} - -type AppToken implements Node { - id: ID! - name: String - authToken: String -} - -type AppTokenCreate { - authToken: String - appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AppError!]! - appToken: AppToken -} - -type AppTokenDelete { - appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AppError!]! - appToken: AppToken -} - -input AppTokenInput { - name: String - app: ID! -} - -type AppTokenVerify { - valid: Boolean! - appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AppError!]! -} - -enum AppTypeEnum { - LOCAL - THIRDPARTY -} - -type AppUpdate { - appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AppError!]! - app: App -} - -enum AreaUnitsEnum { - SQ_CM - SQ_M - SQ_KM - SQ_FT - SQ_YD - SQ_INCH -} - -type AssignNavigation { - menu: Menu - menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [MenuError!]! -} - -type AssignedVariantAttribute { - attribute: Attribute! - variantSelection: Boolean! -} - -type Attribute implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - inputType: AttributeInputTypeEnum - entityType: AttributeEntityTypeEnum - name: String - slug: String - type: AttributeTypeEnum - unit: MeasurementUnitsEnum - choices(sortBy: AttributeChoicesSortingInput, filter: AttributeValueFilterInput, before: String, after: String, first: Int, last: Int): AttributeValueCountableConnection - valueRequired: Boolean! - visibleInStorefront: Boolean! - filterableInStorefront: Boolean! - filterableInDashboard: Boolean! - availableInGrid: Boolean! - translation(languageCode: LanguageCodeEnum!): AttributeTranslation - storefrontSearchPosition: Int! - withChoices: Boolean! - productTypes(before: String, after: String, first: Int, last: Int): ProductTypeCountableConnection! - productVariantTypes(before: String, after: String, first: Int, last: Int): ProductTypeCountableConnection! -} - -type AttributeBulkDelete { - count: Int! - attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AttributeError!]! -} - -enum AttributeChoicesSortField { - NAME - SLUG -} - -input AttributeChoicesSortingInput { - direction: OrderDirection! - field: AttributeChoicesSortField! -} - -type AttributeCountableConnection { - pageInfo: PageInfo! - edges: [AttributeCountableEdge!]! - totalCount: Int -} - -type AttributeCountableEdge { - node: Attribute! - cursor: String! -} - -type AttributeCreate { - attribute: Attribute - attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AttributeError!]! -} - -input AttributeCreateInput { - inputType: AttributeInputTypeEnum - entityType: AttributeEntityTypeEnum - name: String! - slug: String - type: AttributeTypeEnum! - unit: MeasurementUnitsEnum - values: [AttributeValueCreateInput] - valueRequired: Boolean - isVariantOnly: Boolean - visibleInStorefront: Boolean - filterableInStorefront: Boolean - filterableInDashboard: Boolean - storefrontSearchPosition: Int - availableInGrid: Boolean -} - -type AttributeDelete { - attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AttributeError!]! - attribute: Attribute -} - -enum AttributeEntityTypeEnum { - PAGE - PRODUCT -} - -type AttributeError { - field: String - message: String - code: AttributeErrorCode! -} - -enum AttributeErrorCode { - ALREADY_EXISTS - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE -} - -input AttributeFilterInput { - valueRequired: Boolean - isVariantOnly: Boolean - visibleInStorefront: Boolean - filterableInStorefront: Boolean - filterableInDashboard: Boolean - availableInGrid: Boolean - metadata: [MetadataFilter] - search: String - ids: [ID] - type: AttributeTypeEnum - inCollection: ID - inCategory: ID - channel: String -} - -input AttributeInput { - slug: String! - values: [String] - valuesRange: IntRangeInput - dateTime: DateTimeRangeInput - date: DateRangeInput - boolean: Boolean -} - -enum AttributeInputTypeEnum { - DROPDOWN - MULTISELECT - FILE - REFERENCE - NUMERIC - RICH_TEXT - SWATCH - BOOLEAN - DATE - DATE_TIME -} - -type AttributeReorderValues { - attribute: Attribute - attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AttributeError!]! -} - -enum AttributeSortField { - NAME - SLUG - VALUE_REQUIRED - IS_VARIANT_ONLY - VISIBLE_IN_STOREFRONT - FILTERABLE_IN_STOREFRONT - FILTERABLE_IN_DASHBOARD - STOREFRONT_SEARCH_POSITION - AVAILABLE_IN_GRID -} - -input AttributeSortingInput { - direction: OrderDirection! - field: AttributeSortField! -} - -type AttributeTranslatableContent implements Node { - id: ID! - name: String! - translation(languageCode: LanguageCodeEnum!): AttributeTranslation - attribute: Attribute @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") -} - -type AttributeTranslate { - translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [TranslationError!]! - attribute: Attribute -} - -type AttributeTranslation implements Node { - id: ID! - language: LanguageDisplay! - name: String! -} - -enum AttributeTypeEnum { - PRODUCT_TYPE - PAGE_TYPE -} - -type AttributeUpdate { - attribute: Attribute - attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AttributeError!]! -} - -input AttributeUpdateInput { - name: String - slug: String - unit: MeasurementUnitsEnum - removeValues: [ID] - addValues: [AttributeValueUpdateInput] - valueRequired: Boolean - isVariantOnly: Boolean - visibleInStorefront: Boolean - filterableInStorefront: Boolean - filterableInDashboard: Boolean - storefrontSearchPosition: Int - availableInGrid: Boolean -} - -type AttributeValue implements Node { - id: ID! - name: String - slug: String - value: String - translation(languageCode: LanguageCodeEnum!): AttributeValueTranslation - inputType: AttributeInputTypeEnum - reference: ID - file: File - richText: JSONString - boolean: Boolean - date: Date - dateTime: DateTime -} - -type AttributeValueBulkDelete { - count: Int! - attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AttributeError!]! -} - -type AttributeValueCountableConnection { - pageInfo: PageInfo! - edges: [AttributeValueCountableEdge!]! - totalCount: Int -} - -type AttributeValueCountableEdge { - node: AttributeValue! - cursor: String! -} - -type AttributeValueCreate { - attribute: Attribute - attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AttributeError!]! - attributeValue: AttributeValue -} - -input AttributeValueCreateInput { - value: String - richText: JSONString - fileUrl: String - contentType: String - name: String! -} - -type AttributeValueDelete { - attribute: Attribute - attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AttributeError!]! - attributeValue: AttributeValue -} - -input AttributeValueFilterInput { - search: String -} - -input AttributeValueInput { - id: ID - values: [String!] - file: String - contentType: String - references: [ID!] - richText: JSONString - boolean: Boolean - date: Date - dateTime: DateTime -} - -type AttributeValueTranslatableContent implements Node { - id: ID! - name: String! - richText: JSONString - translation(languageCode: LanguageCodeEnum!): AttributeValueTranslation - attributeValue: AttributeValue @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") -} - -type AttributeValueTranslate { - translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [TranslationError!]! - attributeValue: AttributeValue -} - -type AttributeValueTranslation implements Node { - id: ID! - language: LanguageDisplay! - name: String! - richText: JSONString -} - -input AttributeValueTranslationInput { - name: String - richText: JSONString -} - -type AttributeValueUpdate { - attribute: Attribute - attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AttributeError!]! - attributeValue: AttributeValue -} - -input AttributeValueUpdateInput { - value: String - richText: JSONString - fileUrl: String - contentType: String - name: String -} - -input BulkAttributeValueInput { - id: ID - values: [String!] - boolean: Boolean -} - -type BulkProductError { - field: String - message: String - code: ProductErrorCode! - attributes: [ID!] - values: [ID!] - index: Int - warehouses: [ID!] - channels: [ID!] -} - -type BulkStockError { - field: String - message: String - code: ProductErrorCode! - attributes: [ID!] - values: [ID!] - index: Int -} - -input CardInput { - code: String! - cvc: String - money: MoneyInput! -} - -input CatalogueInput { - products: [ID] - categories: [ID] - collections: [ID] - variants: [ID] -} - -type Category implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - seoTitle: String - seoDescription: String - name: String! - description: JSONString - slug: String! - parent: Category - level: Int! - descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") - ancestors(before: String, after: String, first: Int, last: Int): CategoryCountableConnection - products(channel: String, before: String, after: String, first: Int, last: Int): ProductCountableConnection - children(before: String, after: String, first: Int, last: Int): CategoryCountableConnection - backgroundImage(size: Int): Image - translation(languageCode: LanguageCodeEnum!): CategoryTranslation -} - -type CategoryBulkDelete { - count: Int! - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -type CategoryCountableConnection { - pageInfo: PageInfo! - edges: [CategoryCountableEdge!]! - totalCount: Int -} - -type CategoryCountableEdge { - node: Category! - cursor: String! -} - -type CategoryCreate { - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! - category: Category -} - -type CategoryDelete { - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! - category: Category -} - -input CategoryFilterInput { - search: String - metadata: [MetadataFilter] - ids: [ID] -} - -input CategoryInput { - description: JSONString - name: String - slug: String - seo: SeoInput - backgroundImage: Upload - backgroundImageAlt: String -} - -enum CategorySortField { - NAME - PRODUCT_COUNT - SUBCATEGORY_COUNT -} - -input CategorySortingInput { - direction: OrderDirection! - channel: String - field: CategorySortField! -} - -type CategoryTranslatableContent implements Node { - id: ID! - seoTitle: String - seoDescription: String - name: String! - description: JSONString - descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") - translation(languageCode: LanguageCodeEnum!): CategoryTranslation - category: Category @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") -} - -type CategoryTranslate { - translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [TranslationError!]! - category: Category -} - -type CategoryTranslation implements Node { - id: ID! - language: LanguageDisplay! - seoTitle: String - seoDescription: String - name: String - description: JSONString - descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") -} - -type CategoryUpdate { - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! - category: Category -} - -type Channel implements Node { - id: ID! - name: String! - isActive: Boolean! - currencyCode: String! - slug: String! - hasOrders: Boolean! - defaultCountry: CountryDisplay! -} - -type ChannelActivate { - channel: Channel - channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ChannelError!]! -} - -type ChannelCreate { - channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ChannelError!]! - channel: Channel -} - -input ChannelCreateInput { - isActive: Boolean - name: String! - slug: String! - currencyCode: String! - defaultCountry: CountryCode! - addShippingZones: [ID!] -} - -type ChannelDeactivate { - channel: Channel - channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ChannelError!]! -} - -type ChannelDelete { - channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ChannelError!]! - channel: Channel -} - -input ChannelDeleteInput { - channelId: ID! -} - -type ChannelError { - field: String - message: String - code: ChannelErrorCode! - shippingZones: [ID!] -} - -enum ChannelErrorCode { - ALREADY_EXISTS - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE - CHANNELS_CURRENCY_MUST_BE_THE_SAME - CHANNEL_WITH_ORDERS - DUPLICATED_INPUT_ITEM -} - -type ChannelUpdate { - channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ChannelError!]! - channel: Channel -} - -input ChannelUpdateInput { - isActive: Boolean - name: String - slug: String - defaultCountry: CountryCode - addShippingZones: [ID!] - removeShippingZones: [ID!] -} - -type Checkout implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - created: DateTime! - lastChange: DateTime! - user: User - channel: Channel! - billingAddress: Address - shippingAddress: Address - note: String! - discount: Money - discountName: String - translatedDiscountName: String - voucherCode: String - availableShippingMethods: [ShippingMethod]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `shippingMethods` instead.") - shippingMethods: [ShippingMethod]! - availableCollectionPoints: [Warehouse!]! - availablePaymentGateways: [PaymentGateway!]! - email: String - giftCards: [GiftCard] - isShippingRequired: Boolean! - quantity: Int! - stockReservationExpires: DateTime - lines: [CheckoutLine] - shippingPrice: TaxedMoney - shippingMethod: ShippingMethod @deprecated(reason: "This field will be removed in Saleor 4.0. Use `deliveryMethod` instead.") - deliveryMethod: DeliveryMethod - subtotalPrice: TaxedMoney - token: UUID! - totalPrice: TaxedMoney - languageCode: LanguageCodeEnum! -} - -type CheckoutAddPromoCode { - checkout: Checkout - checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CheckoutError!]! -} - -type CheckoutBillingAddressUpdate { - checkout: Checkout - checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CheckoutError!]! -} - -type CheckoutComplete { - order: Order - confirmationNeeded: Boolean! - confirmationData: JSONString - checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CheckoutError!]! -} - -type CheckoutCountableConnection { - pageInfo: PageInfo! - edges: [CheckoutCountableEdge!]! - totalCount: Int -} - -type CheckoutCountableEdge { - node: Checkout! - cursor: String! -} - -type CheckoutCreate { - created: Boolean @deprecated(reason: "This field will be removed in Saleor 4.0. Always returns `True`.") - checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CheckoutError!]! - checkout: Checkout -} - -input CheckoutCreateInput { - channel: String - lines: [CheckoutLineInput]! - email: String - shippingAddress: AddressInput - billingAddress: AddressInput - languageCode: LanguageCodeEnum -} - -type CheckoutCustomerAttach { - checkout: Checkout - checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CheckoutError!]! -} - -type CheckoutCustomerDetach { - checkout: Checkout - checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CheckoutError!]! -} - -type CheckoutDeliveryMethodUpdate { - checkout: Checkout - errors: [CheckoutError!]! -} - -type CheckoutEmailUpdate { - checkout: Checkout - checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CheckoutError!]! -} - -type CheckoutError { - field: String - message: String - code: CheckoutErrorCode! - variants: [ID!] - lines: [ID!] - addressType: AddressTypeEnum -} - -enum CheckoutErrorCode { - BILLING_ADDRESS_NOT_SET - CHECKOUT_NOT_FULLY_PAID - GRAPHQL_ERROR - PRODUCT_NOT_PUBLISHED - PRODUCT_UNAVAILABLE_FOR_PURCHASE - INSUFFICIENT_STOCK - INVALID - INVALID_SHIPPING_METHOD - NOT_FOUND - PAYMENT_ERROR - QUANTITY_GREATER_THAN_LIMIT - REQUIRED - SHIPPING_ADDRESS_NOT_SET - SHIPPING_METHOD_NOT_APPLICABLE - DELIVERY_METHOD_NOT_APPLICABLE - SHIPPING_METHOD_NOT_SET - SHIPPING_NOT_REQUIRED - TAX_ERROR - UNIQUE - VOUCHER_NOT_APPLICABLE - GIFT_CARD_NOT_APPLICABLE - ZERO_QUANTITY - MISSING_CHANNEL_SLUG - CHANNEL_INACTIVE - UNAVAILABLE_VARIANT_IN_CHANNEL - EMAIL_NOT_SET -} - -input CheckoutFilterInput { - customer: String - created: DateRangeInput - search: String - metadata: [MetadataFilter] - channels: [ID] -} - -type CheckoutLanguageCodeUpdate { - checkout: Checkout - checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CheckoutError!]! -} - -type CheckoutLine implements Node { - id: ID! - variant: ProductVariant! - quantity: Int! - totalPrice: TaxedMoney - requiresShipping: Boolean -} - -type CheckoutLineCountableConnection { - pageInfo: PageInfo! - edges: [CheckoutLineCountableEdge!]! - totalCount: Int -} - -type CheckoutLineCountableEdge { - node: CheckoutLine! - cursor: String! -} - -type CheckoutLineDelete { - checkout: Checkout - checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CheckoutError!]! -} - -input CheckoutLineInput { - quantity: Int! - variantId: ID! -} - -type CheckoutLinesAdd { - checkout: Checkout - checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CheckoutError!]! -} - -type CheckoutLinesDelete { - checkout: Checkout - errors: [CheckoutError!]! -} - -type CheckoutLinesUpdate { - checkout: Checkout - checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CheckoutError!]! -} - -type CheckoutPaymentCreate { - checkout: Checkout - payment: Payment - paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PaymentError!]! -} - -type CheckoutRemovePromoCode { - checkout: Checkout - checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CheckoutError!]! -} - -type CheckoutShippingAddressUpdate { - checkout: Checkout - checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CheckoutError!]! -} - -type CheckoutShippingMethodUpdate { - checkout: Checkout - checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CheckoutError!]! -} - -enum CheckoutSortField { - CREATION_DATE - CUSTOMER - PAYMENT -} - -input CheckoutSortingInput { - direction: OrderDirection! - field: CheckoutSortField! -} - -type ChoiceValue { - raw: String - verbose: String -} - -type Collection implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - seoTitle: String - seoDescription: String - name: String! - description: JSONString - slug: String! - channel: String - descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") - products(filter: ProductFilterInput, sortBy: ProductOrder, before: String, after: String, first: Int, last: Int): ProductCountableConnection - backgroundImage(size: Int): Image - translation(languageCode: LanguageCodeEnum!): CollectionTranslation - channelListings: [CollectionChannelListing!] -} - -type CollectionAddProducts { - collection: Collection - collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CollectionError!]! -} - -type CollectionBulkDelete { - count: Int! - collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CollectionError!]! -} - -type CollectionChannelListing implements Node { - id: ID! - publicationDate: Date - isPublished: Boolean! - channel: Channel! -} - -type CollectionChannelListingError { - field: String - message: String - code: ProductErrorCode! - attributes: [ID!] - values: [ID!] - channels: [ID!] -} - -type CollectionChannelListingUpdate { - collection: Collection - collectionChannelListingErrors: [CollectionChannelListingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CollectionChannelListingError!]! -} - -input CollectionChannelListingUpdateInput { - addChannels: [PublishableChannelListingInput!] - removeChannels: [ID!] -} - -type CollectionCountableConnection { - pageInfo: PageInfo! - edges: [CollectionCountableEdge!]! - totalCount: Int -} - -type CollectionCountableEdge { - node: Collection! - cursor: String! -} - -type CollectionCreate { - collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CollectionError!]! - collection: Collection -} - -input CollectionCreateInput { - isPublished: Boolean - name: String - slug: String - description: JSONString - backgroundImage: Upload - backgroundImageAlt: String - seo: SeoInput - publicationDate: Date - products: [ID] -} - -type CollectionDelete { - collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CollectionError!]! - collection: Collection -} - -type CollectionError { - field: String - message: String - products: [ID!] - code: CollectionErrorCode! -} - -enum CollectionErrorCode { - DUPLICATED_INPUT_ITEM - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE - CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT -} - -input CollectionFilterInput { - published: CollectionPublished - search: String - metadata: [MetadataFilter] - ids: [ID] - channel: String -} - -input CollectionInput { - isPublished: Boolean - name: String - slug: String - description: JSONString - backgroundImage: Upload - backgroundImageAlt: String - seo: SeoInput - publicationDate: Date -} - -enum CollectionPublished { - PUBLISHED - HIDDEN -} - -type CollectionRemoveProducts { - collection: Collection - collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CollectionError!]! -} - -type CollectionReorderProducts { - collection: Collection - collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CollectionError!]! -} - -enum CollectionSortField { - NAME - AVAILABILITY - PRODUCT_COUNT - PUBLICATION_DATE -} - -input CollectionSortingInput { - direction: OrderDirection! - channel: String - field: CollectionSortField! -} - -type CollectionTranslatableContent implements Node { - id: ID! - seoTitle: String - seoDescription: String - name: String! - description: JSONString - descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") - translation(languageCode: LanguageCodeEnum!): CollectionTranslation - collection: Collection @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") -} - -type CollectionTranslate { - translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [TranslationError!]! - collection: Collection -} - -type CollectionTranslation implements Node { - id: ID! - language: LanguageDisplay! - seoTitle: String - seoDescription: String - name: String - description: JSONString - descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") -} - -type CollectionUpdate { - collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [CollectionError!]! - collection: Collection -} - -type ConfigurationItem { - name: String! - value: String - type: ConfigurationTypeFieldEnum - helpText: String - label: String -} - -input ConfigurationItemInput { - name: String! - value: String -} - -enum ConfigurationTypeFieldEnum { - STRING - MULTILINE - BOOLEAN - SECRET - PASSWORD - SECRETMULTILINE - OUTPUT -} - -type ConfirmAccount { - user: User - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -type ConfirmEmailChange { - user: User - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -enum CountryCode { - AF - AX - AL - DZ - AS - AD - AO - AI - AQ - AG - AR - AM - AW - AU - AT - AZ - BS - BH - BD - BB - BY - BE - BZ - BJ - BM - BT - BO - BQ - BA - BW - BV - BR - IO - BN - BG - BF - BI - CV - KH - CM - CA - KY - CF - TD - CL - CN - CX - CC - CO - KM - CG - CD - CK - CR - CI - HR - CU - CW - CY - CZ - DK - DJ - DM - DO - EC - EG - SV - GQ - ER - EE - SZ - ET - EU - FK - FO - FJ - FI - FR - GF - PF - TF - GA - GM - GE - DE - GH - GI - GR - GL - GD - GP - GU - GT - GG - GN - GW - GY - HT - HM - VA - HN - HK - HU - IS - IN - ID - IR - IQ - IE - IM - IL - IT - JM - JP - JE - JO - KZ - KE - KI - KW - KG - LA - LV - LB - LS - LR - LY - LI - LT - LU - MO - MG - MW - MY - MV - ML - MT - MH - MQ - MR - MU - YT - MX - FM - MD - MC - MN - ME - MS - MA - MZ - MM - NA - NR - NP - NL - NC - NZ - NI - NE - NG - NU - NF - KP - MK - MP - NO - OM - PK - PW - PS - PA - PG - PY - PE - PH - PN - PL - PT - PR - QA - RE - RO - RU - RW - BL - SH - KN - LC - MF - PM - VC - WS - SM - ST - SA - SN - RS - SC - SL - SG - SX - SK - SI - SB - SO - ZA - GS - KR - SS - ES - LK - SD - SR - SJ - SE - CH - SY - TW - TJ - TZ - TH - TL - TG - TK - TO - TT - TN - TR - TM - TC - TV - UG - UA - AE - GB - UM - US - UY - UZ - VU - VE - VN - VG - VI - WF - EH - YE - ZM - ZW -} - -type CountryDisplay { - code: String! - country: String! - vat: VAT -} - -input CountryFilterInput { - attachedToShippingZones: Boolean -} - -type CreateToken { - token: String - refreshToken: String - csrfToken: String - user: User - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -type CreditCard { - brand: String! - firstDigits: String - lastDigits: String! - expMonth: Int - expYear: Int -} - -type CustomerBulkDelete { - count: Int! - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -type CustomerCreate { - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! - user: User -} - -type CustomerDelete { - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! - user: User -} - -type CustomerEvent implements Node { - id: ID! - date: DateTime - type: CustomerEventsEnum - user: User - app: App - message: String - count: Int - order: Order - orderLine: OrderLine -} - -enum CustomerEventsEnum { - ACCOUNT_CREATED - PASSWORD_RESET_LINK_SENT - PASSWORD_RESET - EMAIL_CHANGED_REQUEST - PASSWORD_CHANGED - EMAIL_CHANGED - PLACED_ORDER - NOTE_ADDED_TO_ORDER - DIGITAL_LINK_DOWNLOADED - CUSTOMER_DELETED - NAME_ASSIGNED - EMAIL_ASSIGNED - NOTE_ADDED -} - -input CustomerFilterInput { - dateJoined: DateRangeInput - numberOfOrders: IntRangeInput - placedOrders: DateRangeInput - search: String - metadata: [MetadataFilter] -} - -input CustomerInput { - defaultBillingAddress: AddressInput - defaultShippingAddress: AddressInput - firstName: String - lastName: String - email: String - isActive: Boolean - note: String - languageCode: LanguageCodeEnum -} - -type CustomerUpdate { - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! - user: User -} - -scalar Date - -input DateRangeInput { - gte: Date - lte: Date -} - -scalar DateTime - -input DateTimeRangeInput { - gte: DateTime - lte: DateTime -} - -type DeactivateAllUserTokens { - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -type DeleteMetadata { - metadataErrors: [MetadataError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [MetadataError!]! - item: ObjectWithMetadata -} - -type DeletePrivateMetadata { - metadataErrors: [MetadataError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [MetadataError!]! - item: ObjectWithMetadata -} - -union DeliveryMethod = Warehouse | ShippingMethod - -type DigitalContent implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - useDefaultSettings: Boolean! - automaticFulfillment: Boolean! - contentFile: String! - maxDownloads: Int - urlValidDays: Int - urls: [DigitalContentUrl] - productVariant: ProductVariant! -} - -type DigitalContentCountableConnection { - pageInfo: PageInfo! - edges: [DigitalContentCountableEdge!]! - totalCount: Int -} - -type DigitalContentCountableEdge { - node: DigitalContent! - cursor: String! -} - -type DigitalContentCreate { - variant: ProductVariant - content: DigitalContent - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -type DigitalContentDelete { - variant: ProductVariant - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -input DigitalContentInput { - useDefaultSettings: Boolean! - maxDownloads: Int - urlValidDays: Int - automaticFulfillment: Boolean -} - -type DigitalContentUpdate { - variant: ProductVariant - content: DigitalContent - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -input DigitalContentUploadInput { - useDefaultSettings: Boolean! - maxDownloads: Int - urlValidDays: Int - automaticFulfillment: Boolean - contentFile: Upload! -} - -type DigitalContentUrl implements Node { - id: ID! - content: DigitalContent! - created: DateTime! - downloadNum: Int! - url: String - token: UUID! -} - -type DigitalContentUrlCreate { - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! - digitalContentUrl: DigitalContentUrl -} - -input DigitalContentUrlCreateInput { - content: ID! -} - -type DiscountError { - field: String - message: String - products: [ID!] - code: DiscountErrorCode! - channels: [ID!] -} - -enum DiscountErrorCode { - ALREADY_EXISTS - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE - CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT - DUPLICATED_INPUT_ITEM -} - -enum DiscountStatusEnum { - ACTIVE - EXPIRED - SCHEDULED -} - -enum DiscountValueTypeEnum { - FIXED - PERCENTAGE -} - -enum DistanceUnitsEnum { - CM - M - KM - FT - YD - INCH -} - -type Domain { - host: String! - sslEnabled: Boolean! - url: String! -} - -type DraftOrderBulkDelete { - count: Int! - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -type DraftOrderComplete { - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -type DraftOrderCreate { - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! - order: Order -} - -input DraftOrderCreateInput { - billingAddress: AddressInput - user: ID - userEmail: String - discount: PositiveDecimal - shippingAddress: AddressInput - shippingMethod: ID - voucher: ID - customerNote: String - channelId: ID - redirectUrl: String - lines: [OrderLineCreateInput] -} - -type DraftOrderDelete { - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! - order: Order -} - -input DraftOrderInput { - billingAddress: AddressInput - user: ID - userEmail: String - discount: PositiveDecimal - shippingAddress: AddressInput - shippingMethod: ID - voucher: ID - customerNote: String - channelId: ID - redirectUrl: String -} - -type DraftOrderLinesBulkDelete { - count: Int! - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -type DraftOrderUpdate { - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! - order: Order -} - -type EventDelivery implements Node { - id: ID! - createdAt: DateTime! - status: EventDeliveryStatusEnum! - eventType: WebhookEventTypeEnum! - attempts(sortBy: EventDeliveryAttemptSortingInput, before: String, after: String, first: Int, last: Int): EventDeliveryAttemptCountableConnection - payload: String -} - -type EventDeliveryAttempt implements Node { - id: ID! - createdAt: DateTime! - taskId: String - duration: Float - response: String - responseHeaders: String - requestHeaders: String - status: EventDeliveryStatusEnum! -} - -type EventDeliveryAttemptCountableConnection { - pageInfo: PageInfo! - edges: [EventDeliveryAttemptCountableEdge!]! - totalCount: Int -} - -type EventDeliveryAttemptCountableEdge { - node: EventDeliveryAttempt! - cursor: String! -} - -enum EventDeliveryAttemptSortField { - CREATED_AT -} - -input EventDeliveryAttemptSortingInput { - direction: OrderDirection! - field: EventDeliveryAttemptSortField! -} - -type EventDeliveryCountableConnection { - pageInfo: PageInfo! - edges: [EventDeliveryCountableEdge!]! - totalCount: Int -} - -type EventDeliveryCountableEdge { - node: EventDelivery! - cursor: String! -} - -input EventDeliveryFilterInput { - status: EventDeliveryStatusEnum - eventType: WebhookEventTypeEnum -} - -type EventDeliveryRetry { - delivery: EventDelivery - errors: [WebhookError!]! -} - -enum EventDeliverySortField { - CREATED_AT -} - -input EventDeliverySortingInput { - direction: OrderDirection! - field: EventDeliverySortField! -} - -enum EventDeliveryStatusEnum { - PENDING - SUCCESS - FAILED -} - -type ExportError { - field: String - message: String - code: ExportErrorCode! -} - -enum ExportErrorCode { - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED -} - -type ExportEvent implements Node { - id: ID! - date: DateTime! - type: ExportEventsEnum! - user: User - app: App - message: String! -} - -enum ExportEventsEnum { - EXPORT_PENDING - EXPORT_SUCCESS - EXPORT_FAILED - EXPORT_DELETED - EXPORTED_FILE_SENT - EXPORT_FAILED_INFO_SENT -} - -type ExportFile implements Node & Job { - id: ID! - status: JobStatusEnum! - createdAt: DateTime! - updatedAt: DateTime! - message: String - url: String - events: [ExportEvent!] - user: User - app: App -} - -type ExportFileCountableConnection { - pageInfo: PageInfo! - edges: [ExportFileCountableEdge!]! - totalCount: Int -} - -type ExportFileCountableEdge { - node: ExportFile! - cursor: String! -} - -input ExportFileFilterInput { - createdAt: DateTimeRangeInput - updatedAt: DateTimeRangeInput - status: JobStatusEnum - user: String - app: String -} - -enum ExportFileSortField { - STATUS - CREATED_AT - UPDATED_AT -} - -input ExportFileSortingInput { - direction: OrderDirection! - field: ExportFileSortField! -} - -type ExportGiftCards { - exportFile: ExportFile - errors: [ExportError!]! -} - -input ExportGiftCardsInput { - scope: ExportScope! - filter: GiftCardFilterInput - ids: [ID!] - fileType: FileTypesEnum! -} - -input ExportInfoInput { - attributes: [ID!] - warehouses: [ID!] - channels: [ID!] - fields: [ProductFieldEnum!] -} - -type ExportProducts { - exportFile: ExportFile - exportErrors: [ExportError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ExportError!]! -} - -input ExportProductsInput { - scope: ExportScope! - filter: ProductFilterInput - ids: [ID!] - exportInfo: ExportInfoInput - fileType: FileTypesEnum! -} - -enum ExportScope { - ALL - IDS - FILTER -} - -type ExternalAuthentication { - id: String! - name: String -} - -type ExternalAuthenticationUrl { - authenticationData: JSONString - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -type ExternalLogout { - logoutData: JSONString - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -type ExternalNotificationError { - field: String - message: String - code: ExternalNotificationErrorCodes! -} - -enum ExternalNotificationErrorCodes { - REQUIRED - INVALID_MODEL_TYPE - NOT_FOUND - CHANNEL_INACTIVE -} - -type ExternalNotificationTrigger { - errors: [ExternalNotificationError!]! -} - -input ExternalNotificationTriggerInput { - ids: [ID]! - extraPayload: JSONString - externalEventType: String! -} - -type ExternalObtainAccessTokens { - token: String - refreshToken: String - csrfToken: String - user: User - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -type ExternalRefresh { - token: String - refreshToken: String - csrfToken: String - user: User - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -type ExternalVerify { - user: User - isValid: Boolean! - verifyData: JSONString - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -type File { - url: String! - contentType: String -} - -enum FileTypesEnum { - CSV - XLSX -} - -type FileUpload { - uploadedFile: File - uploadErrors: [UploadError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [UploadError!]! -} - -type Fulfillment implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - fulfillmentOrder: Int! - status: FulfillmentStatus! - trackingNumber: String! - created: DateTime! - lines: [FulfillmentLine] - statusDisplay: String - warehouse: Warehouse -} - -type FulfillmentApprove { - fulfillment: Fulfillment - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -type FulfillmentCancel { - fulfillment: Fulfillment - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -input FulfillmentCancelInput { - warehouseId: ID -} - -type FulfillmentLine implements Node { - id: ID! - quantity: Int! - orderLine: OrderLine -} - -type FulfillmentRefundProducts { - fulfillment: Fulfillment - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -type FulfillmentReturnProducts { - returnFulfillment: Fulfillment - replaceFulfillment: Fulfillment - order: Order - replaceOrder: Order - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -enum FulfillmentStatus { - FULFILLED - REFUNDED - RETURNED - REPLACED - REFUNDED_AND_RETURNED - CANCELED - WAITING_FOR_APPROVAL -} - -type FulfillmentUpdateTracking { - fulfillment: Fulfillment - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -input FulfillmentUpdateTrackingInput { - trackingNumber: String - notifyCustomer: Boolean = false -} - -type GatewayConfigLine { - field: String! - value: String -} - -scalar GenericScalar - -type GiftCard implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - displayCode: String! - last4CodeChars: String! - code: String! - created: DateTime! - createdBy: User - usedBy: User - createdByEmail: String - usedByEmail: String - lastUsedOn: DateTime - expiryDate: Date - app: App - product: Product - events(filter: GiftCardEventFilterInput): [GiftCardEvent!]! - tags: [GiftCardTag!]! - boughtInChannel: String - isActive: Boolean! - initialBalance: Money - currentBalance: Money - user: User @deprecated(reason: "This field will be removed in Saleor 4.0. Use `createdBy` field instead.") - endDate: DateTime @deprecated(reason: "This field will be removed in Saleor 4.0. Use `expiryDate` field instead.") - startDate: DateTime @deprecated(reason: "This field will be removed in Saleor 4.0.") -} - -type GiftCardActivate { - giftCard: GiftCard - giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [GiftCardError!]! -} - -type GiftCardAddNote { - giftCard: GiftCard - event: GiftCardEvent - errors: [GiftCardError!]! -} - -input GiftCardAddNoteInput { - message: String! -} - -type GiftCardBulkActivate { - count: Int! - errors: [GiftCardError!]! -} - -type GiftCardBulkCreate { - count: Int! - giftCards: [GiftCard!]! - errors: [GiftCardError!]! -} - -input GiftCardBulkCreateInput { - count: Int! - balance: PriceInput! - tags: [String!] - expiryDate: Date - isActive: Boolean! -} - -type GiftCardBulkDeactivate { - count: Int! - errors: [GiftCardError!]! -} - -type GiftCardBulkDelete { - count: Int! - errors: [GiftCardError!]! -} - -type GiftCardCountableConnection { - pageInfo: PageInfo! - edges: [GiftCardCountableEdge!]! - totalCount: Int -} - -type GiftCardCountableEdge { - node: GiftCard! - cursor: String! -} - -type GiftCardCreate { - giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [GiftCardError!]! - giftCard: GiftCard -} - -input GiftCardCreateInput { - addTags: [String!] - expiryDate: Date - startDate: Date - endDate: Date - balance: PriceInput! - userEmail: String - channel: String - isActive: Boolean! - code: String - note: String -} - -type GiftCardDeactivate { - giftCard: GiftCard - giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [GiftCardError!]! -} - -type GiftCardDelete { - giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [GiftCardError!]! - giftCard: GiftCard -} - -type GiftCardError { - field: String - message: String - code: GiftCardErrorCode! - tags: [String!] -} - -enum GiftCardErrorCode { - ALREADY_EXISTS - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE - EXPIRED_GIFT_CARD - DUPLICATED_INPUT_ITEM -} - -type GiftCardEvent implements Node { - id: ID! - date: DateTime - type: GiftCardEventsEnum - user: User - app: App - message: String - email: String - orderId: ID - orderNumber: String - tags: [String!] - oldTags: [String!] - balance: GiftCardEventBalance - expiryDate: Date - oldExpiryDate: Date -} - -type GiftCardEventBalance { - initialBalance: Money - currentBalance: Money! - oldInitialBalance: Money - oldCurrentBalance: Money -} - -input GiftCardEventFilterInput { - type: GiftCardEventsEnum - orders: [ID!] -} - -enum GiftCardEventsEnum { - ISSUED - BOUGHT - UPDATED - ACTIVATED - DEACTIVATED - BALANCE_RESET - EXPIRY_DATE_UPDATED - TAGS_UPDATED - SENT_TO_CUSTOMER - RESENT - NOTE_ADDED - USED_IN_ORDER -} - -input GiftCardFilterInput { - isActive: Boolean - metadata: [MetadataFilter] - tags: [String] - products: [ID] - usedBy: [ID] - used: Boolean - currency: String - currentBalance: PriceRangeInput - initialBalance: PriceRangeInput - code: String -} - -type GiftCardResend { - giftCard: GiftCard - errors: [GiftCardError!]! -} - -input GiftCardResendInput { - id: ID! - email: String - channel: String! -} - -type GiftCardSettings { - expiryType: GiftCardSettingsExpiryTypeEnum! - expiryPeriod: TimePeriod -} - -type GiftCardSettingsError { - field: String - message: String - code: GiftCardSettingsErrorCode! -} - -enum GiftCardSettingsErrorCode { - INVALID - REQUIRED - GRAPHQL_ERROR -} - -enum GiftCardSettingsExpiryTypeEnum { - NEVER_EXPIRE - EXPIRY_PERIOD -} - -type GiftCardSettingsUpdate { - giftCardSettings: GiftCardSettings - errors: [GiftCardSettingsError!]! -} - -input GiftCardSettingsUpdateInput { - expiryType: GiftCardSettingsExpiryTypeEnum - expiryPeriod: TimePeriodInputType -} - -enum GiftCardSortField { - PRODUCT - USED_BY - CURRENT_BALANCE -} - -input GiftCardSortingInput { - direction: OrderDirection! - field: GiftCardSortField! -} - -type GiftCardTag implements Node { - id: ID! - name: String! -} - -type GiftCardTagCountableConnection { - pageInfo: PageInfo! - edges: [GiftCardTagCountableEdge!]! - totalCount: Int -} - -type GiftCardTagCountableEdge { - node: GiftCardTag! - cursor: String! -} - -input GiftCardTagFilterInput { - search: String -} - -type GiftCardUpdate { - giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [GiftCardError!]! - giftCard: GiftCard -} - -input GiftCardUpdateInput { - addTags: [String!] - expiryDate: Date - startDate: Date - endDate: Date - removeTags: [String!] - balanceAmount: PositiveDecimal -} - -type Group implements Node { - id: ID! - name: String! - users: [User] - permissions: [Permission] - userCanManage: Boolean! -} - -type GroupCountableConnection { - pageInfo: PageInfo! - edges: [GroupCountableEdge!]! - totalCount: Int -} - -type GroupCountableEdge { - node: Group! - cursor: String! -} - -type Image { - url: String! - alt: String -} - -input IntRangeInput { - gte: Int - lte: Int -} - -type Invoice implements ObjectWithMetadata & Job & Node { - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - status: JobStatusEnum! - createdAt: DateTime! - updatedAt: DateTime! - message: String - id: ID! - number: String - externalUrl: String - url: String -} - -type InvoiceCreate { - invoiceErrors: [InvoiceError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [InvoiceError!]! - invoice: Invoice -} - -input InvoiceCreateInput { - number: String! - url: String! -} - -type InvoiceDelete { - invoiceErrors: [InvoiceError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [InvoiceError!]! - invoice: Invoice -} - -type InvoiceError { - field: String - message: String - code: InvoiceErrorCode! -} - -enum InvoiceErrorCode { - REQUIRED - NOT_READY - URL_NOT_SET - EMAIL_NOT_SET - NUMBER_NOT_SET - NOT_FOUND - INVALID_STATUS - NO_INVOICE_PLUGIN -} - -type InvoiceRequest { - order: Order - invoiceErrors: [InvoiceError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [InvoiceError!]! - invoice: Invoice -} - -type InvoiceRequestDelete { - invoiceErrors: [InvoiceError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [InvoiceError!]! - invoice: Invoice -} - -type InvoiceSendNotification { - invoiceErrors: [InvoiceError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [InvoiceError!]! - invoice: Invoice -} - -type InvoiceUpdate { - invoiceErrors: [InvoiceError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [InvoiceError!]! - invoice: Invoice -} - -scalar JSONString - -interface Job { - status: JobStatusEnum! - createdAt: DateTime! - updatedAt: DateTime! - message: String -} - -enum JobStatusEnum { - PENDING - SUCCESS - FAILED - DELETED -} - -enum LanguageCodeEnum { - AF - AF_NA - AF_ZA - AGQ - AGQ_CM - AK - AK_GH - AM - AM_ET - AR - AR_AE - AR_BH - AR_DJ - AR_DZ - AR_EG - AR_EH - AR_ER - AR_IL - AR_IQ - AR_JO - AR_KM - AR_KW - AR_LB - AR_LY - AR_MA - AR_MR - AR_OM - AR_PS - AR_QA - AR_SA - AR_SD - AR_SO - AR_SS - AR_SY - AR_TD - AR_TN - AR_YE - AS - AS_IN - ASA - ASA_TZ - AST - AST_ES - AZ - AZ_CYRL - AZ_CYRL_AZ - AZ_LATN - AZ_LATN_AZ - BAS - BAS_CM - BE - BE_BY - BEM - BEM_ZM - BEZ - BEZ_TZ - BG - BG_BG - BM - BM_ML - BN - BN_BD - BN_IN - BO - BO_CN - BO_IN - BR - BR_FR - BRX - BRX_IN - BS - BS_CYRL - BS_CYRL_BA - BS_LATN - BS_LATN_BA - CA - CA_AD - CA_ES - CA_ES_VALENCIA - CA_FR - CA_IT - CCP - CCP_BD - CCP_IN - CE - CE_RU - CEB - CEB_PH - CGG - CGG_UG - CHR - CHR_US - CKB - CKB_IQ - CKB_IR - CS - CS_CZ - CU - CU_RU - CY - CY_GB - DA - DA_DK - DA_GL - DAV - DAV_KE - DE - DE_AT - DE_BE - DE_CH - DE_DE - DE_IT - DE_LI - DE_LU - DJE - DJE_NE - DSB - DSB_DE - DUA - DUA_CM - DYO - DYO_SN - DZ - DZ_BT - EBU - EBU_KE - EE - EE_GH - EE_TG - EL - EL_CY - EL_GR - EN - EN_AE - EN_AG - EN_AI - EN_AS - EN_AT - EN_AU - EN_BB - EN_BE - EN_BI - EN_BM - EN_BS - EN_BW - EN_BZ - EN_CA - EN_CC - EN_CH - EN_CK - EN_CM - EN_CX - EN_CY - EN_DE - EN_DG - EN_DK - EN_DM - EN_ER - EN_FI - EN_FJ - EN_FK - EN_FM - EN_GB - EN_GD - EN_GG - EN_GH - EN_GI - EN_GM - EN_GU - EN_GY - EN_HK - EN_IE - EN_IL - EN_IM - EN_IN - EN_IO - EN_JE - EN_JM - EN_KE - EN_KI - EN_KN - EN_KY - EN_LC - EN_LR - EN_LS - EN_MG - EN_MH - EN_MO - EN_MP - EN_MS - EN_MT - EN_MU - EN_MW - EN_MY - EN_NA - EN_NF - EN_NG - EN_NL - EN_NR - EN_NU - EN_NZ - EN_PG - EN_PH - EN_PK - EN_PN - EN_PR - EN_PW - EN_RW - EN_SB - EN_SC - EN_SD - EN_SE - EN_SG - EN_SH - EN_SI - EN_SL - EN_SS - EN_SX - EN_SZ - EN_TC - EN_TK - EN_TO - EN_TT - EN_TV - EN_TZ - EN_UG - EN_UM - EN_US - EN_VC - EN_VG - EN_VI - EN_VU - EN_WS - EN_ZA - EN_ZM - EN_ZW - EO - ES - ES_AR - ES_BO - ES_BR - ES_BZ - ES_CL - ES_CO - ES_CR - ES_CU - ES_DO - ES_EA - ES_EC - ES_ES - ES_GQ - ES_GT - ES_HN - ES_IC - ES_MX - ES_NI - ES_PA - ES_PE - ES_PH - ES_PR - ES_PY - ES_SV - ES_US - ES_UY - ES_VE - ET - ET_EE - EU - EU_ES - EWO - EWO_CM - FA - FA_AF - FA_IR - FF - FF_ADLM - FF_ADLM_BF - FF_ADLM_CM - FF_ADLM_GH - FF_ADLM_GM - FF_ADLM_GN - FF_ADLM_GW - FF_ADLM_LR - FF_ADLM_MR - FF_ADLM_NE - FF_ADLM_NG - FF_ADLM_SL - FF_ADLM_SN - FF_LATN - FF_LATN_BF - FF_LATN_CM - FF_LATN_GH - FF_LATN_GM - FF_LATN_GN - FF_LATN_GW - FF_LATN_LR - FF_LATN_MR - FF_LATN_NE - FF_LATN_NG - FF_LATN_SL - FF_LATN_SN - FI - FI_FI - FIL - FIL_PH - FO - FO_DK - FO_FO - FR - FR_BE - FR_BF - FR_BI - FR_BJ - FR_BL - FR_CA - FR_CD - FR_CF - FR_CG - FR_CH - FR_CI - FR_CM - FR_DJ - FR_DZ - FR_FR - FR_GA - FR_GF - FR_GN - FR_GP - FR_GQ - FR_HT - FR_KM - FR_LU - FR_MA - FR_MC - FR_MF - FR_MG - FR_ML - FR_MQ - FR_MR - FR_MU - FR_NC - FR_NE - FR_PF - FR_PM - FR_RE - FR_RW - FR_SC - FR_SN - FR_SY - FR_TD - FR_TG - FR_TN - FR_VU - FR_WF - FR_YT - FUR - FUR_IT - FY - FY_NL - GA - GA_GB - GA_IE - GD - GD_GB - GL - GL_ES - GSW - GSW_CH - GSW_FR - GSW_LI - GU - GU_IN - GUZ - GUZ_KE - GV - GV_IM - HA - HA_GH - HA_NE - HA_NG - HAW - HAW_US - HE - HE_IL - HI - HI_IN - HR - HR_BA - HR_HR - HSB - HSB_DE - HU - HU_HU - HY - HY_AM - IA - ID - ID_ID - IG - IG_NG - II - II_CN - IS - IS_IS - IT - IT_CH - IT_IT - IT_SM - IT_VA - JA - JA_JP - JGO - JGO_CM - JMC - JMC_TZ - JV - JV_ID - KA - KA_GE - KAB - KAB_DZ - KAM - KAM_KE - KDE - KDE_TZ - KEA - KEA_CV - KHQ - KHQ_ML - KI - KI_KE - KK - KK_KZ - KKJ - KKJ_CM - KL - KL_GL - KLN - KLN_KE - KM - KM_KH - KN - KN_IN - KO - KO_KP - KO_KR - KOK - KOK_IN - KS - KS_ARAB - KS_ARAB_IN - KSB - KSB_TZ - KSF - KSF_CM - KSH - KSH_DE - KU - KU_TR - KW - KW_GB - KY - KY_KG - LAG - LAG_TZ - LB - LB_LU - LG - LG_UG - LKT - LKT_US - LN - LN_AO - LN_CD - LN_CF - LN_CG - LO - LO_LA - LRC - LRC_IQ - LRC_IR - LT - LT_LT - LU - LU_CD - LUO - LUO_KE - LUY - LUY_KE - LV - LV_LV - MAI - MAI_IN - MAS - MAS_KE - MAS_TZ - MER - MER_KE - MFE - MFE_MU - MG - MG_MG - MGH - MGH_MZ - MGO - MGO_CM - MI - MI_NZ - MK - MK_MK - ML - ML_IN - MN - MN_MN - MNI - MNI_BENG - MNI_BENG_IN - MR - MR_IN - MS - MS_BN - MS_ID - MS_MY - MS_SG - MT - MT_MT - MUA - MUA_CM - MY - MY_MM - MZN - MZN_IR - NAQ - NAQ_NA - NB - NB_NO - NB_SJ - ND - ND_ZW - NDS - NDS_DE - NDS_NL - NE - NE_IN - NE_NP - NL - NL_AW - NL_BE - NL_BQ - NL_CW - NL_NL - NL_SR - NL_SX - NMG - NMG_CM - NN - NN_NO - NNH - NNH_CM - NUS - NUS_SS - NYN - NYN_UG - OM - OM_ET - OM_KE - OR - OR_IN - OS - OS_GE - OS_RU - PA - PA_ARAB - PA_ARAB_PK - PA_GURU - PA_GURU_IN - PCM - PCM_NG - PL - PL_PL - PRG - PS - PS_AF - PS_PK - PT - PT_AO - PT_BR - PT_CH - PT_CV - PT_GQ - PT_GW - PT_LU - PT_MO - PT_MZ - PT_PT - PT_ST - PT_TL - QU - QU_BO - QU_EC - QU_PE - RM - RM_CH - RN - RN_BI - RO - RO_MD - RO_RO - ROF - ROF_TZ - RU - RU_BY - RU_KG - RU_KZ - RU_MD - RU_RU - RU_UA - RW - RW_RW - RWK - RWK_TZ - SAH - SAH_RU - SAQ - SAQ_KE - SAT - SAT_OLCK - SAT_OLCK_IN - SBP - SBP_TZ - SD - SD_ARAB - SD_ARAB_PK - SD_DEVA - SD_DEVA_IN - SE - SE_FI - SE_NO - SE_SE - SEH - SEH_MZ - SES - SES_ML - SG - SG_CF - SHI - SHI_LATN - SHI_LATN_MA - SHI_TFNG - SHI_TFNG_MA - SI - SI_LK - SK - SK_SK - SL - SL_SI - SMN - SMN_FI - SN - SN_ZW - SO - SO_DJ - SO_ET - SO_KE - SO_SO - SQ - SQ_AL - SQ_MK - SQ_XK - SR - SR_CYRL - SR_CYRL_BA - SR_CYRL_ME - SR_CYRL_RS - SR_CYRL_XK - SR_LATN - SR_LATN_BA - SR_LATN_ME - SR_LATN_RS - SR_LATN_XK - SU - SU_LATN - SU_LATN_ID - SV - SV_AX - SV_FI - SV_SE - SW - SW_CD - SW_KE - SW_TZ - SW_UG - TA - TA_IN - TA_LK - TA_MY - TA_SG - TE - TE_IN - TEO - TEO_KE - TEO_UG - TG - TG_TJ - TH - TH_TH - TI - TI_ER - TI_ET - TK - TK_TM - TO - TO_TO - TR - TR_CY - TR_TR - TT - TT_RU - TWQ - TWQ_NE - TZM - TZM_MA - UG - UG_CN - UK - UK_UA - UR - UR_IN - UR_PK - UZ - UZ_ARAB - UZ_ARAB_AF - UZ_CYRL - UZ_CYRL_UZ - UZ_LATN - UZ_LATN_UZ - VAI - VAI_LATN - VAI_LATN_LR - VAI_VAII - VAI_VAII_LR - VI - VI_VN - VO - VUN - VUN_TZ - WAE - WAE_CH - WO - WO_SN - XH - XH_ZA - XOG - XOG_UG - YAV - YAV_CM - YI - YO - YO_BJ - YO_NG - YUE - YUE_HANS - YUE_HANS_CN - YUE_HANT - YUE_HANT_HK - ZGH - ZGH_MA - ZH - ZH_HANS - ZH_HANS_CN - ZH_HANS_HK - ZH_HANS_MO - ZH_HANS_SG - ZH_HANT - ZH_HANT_HK - ZH_HANT_MO - ZH_HANT_TW - ZU - ZU_ZA -} - -type LanguageDisplay { - code: LanguageCodeEnum! - language: String! -} - -type LimitInfo { - currentUsage: Limits! - allowedUsage: Limits! -} - -type Limits { - channels: Int - orders: Int - productVariants: Int - staffUsers: Int - warehouses: Int -} - -type Manifest { - identifier: String! - version: String! - name: String! - about: String - permissions: [Permission] - appUrl: String - configurationUrl: String - tokenTargetUrl: String - dataPrivacy: String - dataPrivacyUrl: String - homepageUrl: String - supportUrl: String - extensions: [AppManifestExtension!]! -} - -type Margin { - start: Int - stop: Int -} - -enum MeasurementUnitsEnum { - CM - M - KM - FT - YD - INCH - SQ_CM - SQ_M - SQ_KM - SQ_FT - SQ_YD - SQ_INCH - CUBIC_MILLIMETER - CUBIC_CENTIMETER - CUBIC_DECIMETER - CUBIC_METER - LITER - CUBIC_FOOT - CUBIC_INCH - CUBIC_YARD - QT - PINT - FL_OZ - ACRE_IN - ACRE_FT - G - LB - OZ - KG - TONNE -} - -type Menu implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - name: String! - slug: String! - items: [MenuItem] -} - -type MenuBulkDelete { - count: Int! - menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [MenuError!]! -} - -type MenuCountableConnection { - pageInfo: PageInfo! - edges: [MenuCountableEdge!]! - totalCount: Int -} - -type MenuCountableEdge { - node: Menu! - cursor: String! -} - -type MenuCreate { - menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [MenuError!]! - menu: Menu -} - -input MenuCreateInput { - name: String! - slug: String - items: [MenuItemInput] -} - -type MenuDelete { - menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [MenuError!]! - menu: Menu -} - -type MenuError { - field: String - message: String - code: MenuErrorCode! -} - -enum MenuErrorCode { - CANNOT_ASSIGN_NODE - GRAPHQL_ERROR - INVALID - INVALID_MENU_ITEM - NO_MENU_ITEM_PROVIDED - NOT_FOUND - REQUIRED - TOO_MANY_MENU_ITEMS - UNIQUE -} - -input MenuFilterInput { - search: String - slug: [String] - metadata: [MetadataFilter] -} - -input MenuInput { - name: String - slug: String -} - -type MenuItem implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - name: String! - menu: Menu! - parent: MenuItem - category: Category - collection: Collection - page: Page - level: Int! - children: [MenuItem] - url: String - translation(languageCode: LanguageCodeEnum!): MenuItemTranslation -} - -type MenuItemBulkDelete { - count: Int! - menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [MenuError!]! -} - -type MenuItemCountableConnection { - pageInfo: PageInfo! - edges: [MenuItemCountableEdge!]! - totalCount: Int -} - -type MenuItemCountableEdge { - node: MenuItem! - cursor: String! -} - -type MenuItemCreate { - menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [MenuError!]! - menuItem: MenuItem -} - -input MenuItemCreateInput { - name: String! - url: String - category: ID - collection: ID - page: ID - menu: ID! - parent: ID -} - -type MenuItemDelete { - menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [MenuError!]! - menuItem: MenuItem -} - -input MenuItemFilterInput { - search: String - metadata: [MetadataFilter] -} - -input MenuItemInput { - name: String - url: String - category: ID - collection: ID - page: ID -} - -type MenuItemMove { - menu: Menu - menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [MenuError!]! -} - -input MenuItemMoveInput { - itemId: ID! - parentId: ID - sortOrder: Int -} - -input MenuItemSortingInput { - direction: OrderDirection! - field: MenuItemsSortField! -} - -type MenuItemTranslatableContent implements Node { - id: ID! - name: String! - translation(languageCode: LanguageCodeEnum!): MenuItemTranslation - menuItem: MenuItem @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") -} - -type MenuItemTranslate { - translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [TranslationError!]! - menuItem: MenuItem -} - -type MenuItemTranslation implements Node { - id: ID! - language: LanguageDisplay! - name: String! -} - -type MenuItemUpdate { - menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [MenuError!]! - menuItem: MenuItem -} - -enum MenuItemsSortField { - NAME -} - -enum MenuSortField { - NAME - ITEMS_COUNT -} - -input MenuSortingInput { - direction: OrderDirection! - field: MenuSortField! -} - -type MenuUpdate { - menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [MenuError!]! - menu: Menu -} - -type MetadataError { - field: String - message: String - code: MetadataErrorCode! -} - -enum MetadataErrorCode { - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED -} - -input MetadataFilter { - key: String! - value: String -} - -input MetadataInput { - key: String! - value: String! -} - -type MetadataItem { - key: String! - value: String! -} - -type Money { - currency: String! - amount: Float! -} - -input MoneyInput { - currency: String! - amount: PositiveDecimal! -} - -type MoneyRange { - start: Money - stop: Money -} - -input MoveProductInput { - productId: ID! - sortOrder: Int -} - -type Mutation { - webhookCreate(input: WebhookCreateInput!): WebhookCreate - webhookDelete(id: ID!): WebhookDelete - webhookUpdate(id: ID!, input: WebhookUpdateInput!): WebhookUpdate - eventDeliveryRetry(id: ID!): EventDeliveryRetry - createWarehouse(input: WarehouseCreateInput!): WarehouseCreate - updateWarehouse(id: ID!, input: WarehouseUpdateInput!): WarehouseUpdate - deleteWarehouse(id: ID!): WarehouseDelete - assignWarehouseShippingZone(id: ID!, shippingZoneIds: [ID!]!): WarehouseShippingZoneAssign - unassignWarehouseShippingZone(id: ID!, shippingZoneIds: [ID!]!): WarehouseShippingZoneUnassign - staffNotificationRecipientCreate(input: StaffNotificationRecipientInput!): StaffNotificationRecipientCreate - staffNotificationRecipientUpdate(id: ID!, input: StaffNotificationRecipientInput!): StaffNotificationRecipientUpdate - staffNotificationRecipientDelete(id: ID!): StaffNotificationRecipientDelete - shopDomainUpdate(input: SiteDomainInput): ShopDomainUpdate - shopSettingsUpdate(input: ShopSettingsInput!): ShopSettingsUpdate - shopFetchTaxRates: ShopFetchTaxRates - shopSettingsTranslate(input: ShopSettingsTranslationInput!, languageCode: LanguageCodeEnum!): ShopSettingsTranslate - shopAddressUpdate(input: AddressInput): ShopAddressUpdate - orderSettingsUpdate(input: OrderSettingsUpdateInput!): OrderSettingsUpdate - giftCardSettingsUpdate(input: GiftCardSettingsUpdateInput!): GiftCardSettingsUpdate - shippingMethodChannelListingUpdate(id: ID!, input: ShippingMethodChannelListingInput!): ShippingMethodChannelListingUpdate - shippingPriceCreate(input: ShippingPriceInput!): ShippingPriceCreate - shippingPriceDelete(id: ID!): ShippingPriceDelete - shippingPriceBulkDelete(ids: [ID]!): ShippingPriceBulkDelete - shippingPriceUpdate(id: ID!, input: ShippingPriceInput!): ShippingPriceUpdate - shippingPriceTranslate(id: ID!, input: ShippingPriceTranslationInput!, languageCode: LanguageCodeEnum!): ShippingPriceTranslate - shippingPriceExcludeProducts(id: ID!, input: ShippingPriceExcludeProductsInput!): ShippingPriceExcludeProducts - shippingPriceRemoveProductFromExclude(id: ID!, products: [ID]!): ShippingPriceRemoveProductFromExclude - shippingZoneCreate(input: ShippingZoneCreateInput!): ShippingZoneCreate - shippingZoneDelete(id: ID!): ShippingZoneDelete - shippingZoneBulkDelete(ids: [ID]!): ShippingZoneBulkDelete - shippingZoneUpdate(id: ID!, input: ShippingZoneUpdateInput!): ShippingZoneUpdate - productAttributeAssign(operations: [ProductAttributeAssignInput]!, productTypeId: ID!): ProductAttributeAssign - productAttributeAssignmentUpdate(operations: [ProductAttributeAssignmentUpdateInput]!, productTypeId: ID!): ProductAttributeAssignmentUpdate - productAttributeUnassign(attributeIds: [ID]!, productTypeId: ID!): ProductAttributeUnassign - categoryCreate(input: CategoryInput!, parent: ID): CategoryCreate - categoryDelete(id: ID!): CategoryDelete - categoryBulkDelete(ids: [ID]!): CategoryBulkDelete - categoryUpdate(id: ID!, input: CategoryInput!): CategoryUpdate - categoryTranslate(id: ID!, input: TranslationInput!, languageCode: LanguageCodeEnum!): CategoryTranslate - collectionAddProducts(collectionId: ID!, products: [ID]!): CollectionAddProducts - collectionCreate(input: CollectionCreateInput!): CollectionCreate - collectionDelete(id: ID!): CollectionDelete - collectionReorderProducts(collectionId: ID!, moves: [MoveProductInput]!): CollectionReorderProducts - collectionBulkDelete(ids: [ID]!): CollectionBulkDelete - collectionRemoveProducts(collectionId: ID!, products: [ID]!): CollectionRemoveProducts - collectionUpdate(id: ID!, input: CollectionInput!): CollectionUpdate - collectionTranslate(id: ID!, input: TranslationInput!, languageCode: LanguageCodeEnum!): CollectionTranslate - collectionChannelListingUpdate(id: ID!, input: CollectionChannelListingUpdateInput!): CollectionChannelListingUpdate - productCreate(input: ProductCreateInput!): ProductCreate - productDelete(id: ID!): ProductDelete - productBulkDelete(ids: [ID]!): ProductBulkDelete - productUpdate(id: ID!, input: ProductInput!): ProductUpdate - productTranslate(id: ID!, input: TranslationInput!, languageCode: LanguageCodeEnum!): ProductTranslate - productChannelListingUpdate(id: ID!, input: ProductChannelListingUpdateInput!): ProductChannelListingUpdate - productMediaCreate(input: ProductMediaCreateInput!): ProductMediaCreate - productVariantReorder(moves: [ReorderInput]!, productId: ID!): ProductVariantReorder - productMediaDelete(id: ID!): ProductMediaDelete - productMediaBulkDelete(ids: [ID]!): ProductMediaBulkDelete - productMediaReorder(mediaIds: [ID]!, productId: ID!): ProductMediaReorder - productMediaUpdate(id: ID!, input: ProductMediaUpdateInput!): ProductMediaUpdate - productTypeCreate(input: ProductTypeInput!): ProductTypeCreate - productTypeDelete(id: ID!): ProductTypeDelete - productTypeBulkDelete(ids: [ID]!): ProductTypeBulkDelete - productTypeUpdate(id: ID!, input: ProductTypeInput!): ProductTypeUpdate - productTypeReorderAttributes(moves: [ReorderInput]!, productTypeId: ID!, type: ProductAttributeType!): ProductTypeReorderAttributes - productReorderAttributeValues(attributeId: ID!, moves: [ReorderInput]!, productId: ID!): ProductReorderAttributeValues - digitalContentCreate(input: DigitalContentUploadInput!, variantId: ID!): DigitalContentCreate - digitalContentDelete(variantId: ID!): DigitalContentDelete - digitalContentUpdate(input: DigitalContentInput!, variantId: ID!): DigitalContentUpdate - digitalContentUrlCreate(input: DigitalContentUrlCreateInput!): DigitalContentUrlCreate - productVariantCreate(input: ProductVariantCreateInput!): ProductVariantCreate - productVariantDelete(id: ID!): ProductVariantDelete - productVariantBulkCreate(product: ID!, variants: [ProductVariantBulkCreateInput]!): ProductVariantBulkCreate - productVariantBulkDelete(ids: [ID]!): ProductVariantBulkDelete - productVariantStocksCreate(stocks: [StockInput!]!, variantId: ID!): ProductVariantStocksCreate - productVariantStocksDelete(variantId: ID!, warehouseIds: [ID!]): ProductVariantStocksDelete - productVariantStocksUpdate(stocks: [StockInput!]!, variantId: ID!): ProductVariantStocksUpdate - productVariantUpdate(id: ID!, input: ProductVariantInput!): ProductVariantUpdate - productVariantSetDefault(productId: ID!, variantId: ID!): ProductVariantSetDefault - productVariantTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): ProductVariantTranslate - productVariantChannelListingUpdate(id: ID!, input: [ProductVariantChannelListingAddInput!]!): ProductVariantChannelListingUpdate - productVariantReorderAttributeValues(attributeId: ID!, moves: [ReorderInput]!, variantId: ID!): ProductVariantReorderAttributeValues - productVariantPreorderDeactivate(id: ID!): ProductVariantPreorderDeactivate - variantMediaAssign(mediaId: ID!, variantId: ID!): VariantMediaAssign - variantMediaUnassign(mediaId: ID!, variantId: ID!): VariantMediaUnassign - paymentCapture(amount: PositiveDecimal, paymentId: ID!): PaymentCapture - paymentRefund(amount: PositiveDecimal, paymentId: ID!): PaymentRefund - paymentVoid(paymentId: ID!): PaymentVoid - paymentInitialize(channel: String, gateway: String!, paymentData: JSONString): PaymentInitialize - paymentCheckBalance(input: PaymentCheckBalanceInput!): PaymentCheckBalance - pageCreate(input: PageCreateInput!): PageCreate - pageDelete(id: ID!): PageDelete - pageBulkDelete(ids: [ID]!): PageBulkDelete - pageBulkPublish(ids: [ID]!, isPublished: Boolean!): PageBulkPublish - pageUpdate(id: ID!, input: PageInput!): PageUpdate - pageTranslate(id: ID!, input: PageTranslationInput!, languageCode: LanguageCodeEnum!): PageTranslate - pageTypeCreate(input: PageTypeCreateInput!): PageTypeCreate - pageTypeUpdate(id: ID, input: PageTypeUpdateInput!): PageTypeUpdate - pageTypeDelete(id: ID!): PageTypeDelete - pageTypeBulkDelete(ids: [ID!]!): PageTypeBulkDelete - pageAttributeAssign(attributeIds: [ID!]!, pageTypeId: ID!): PageAttributeAssign - pageAttributeUnassign(attributeIds: [ID!]!, pageTypeId: ID!): PageAttributeUnassign - pageTypeReorderAttributes(moves: [ReorderInput!]!, pageTypeId: ID!): PageTypeReorderAttributes - pageReorderAttributeValues(attributeId: ID!, moves: [ReorderInput]!, pageId: ID!): PageReorderAttributeValues - draftOrderComplete(id: ID!): DraftOrderComplete - draftOrderCreate(input: DraftOrderCreateInput!): DraftOrderCreate - draftOrderDelete(id: ID!): DraftOrderDelete - draftOrderBulkDelete(ids: [ID]!): DraftOrderBulkDelete - draftOrderLinesBulkDelete(ids: [ID]!): DraftOrderLinesBulkDelete @deprecated(reason: "This field will be removed in Saleor 4.0.") - draftOrderUpdate(id: ID!, input: DraftOrderInput!): DraftOrderUpdate - orderAddNote(order: ID!, input: OrderAddNoteInput!): OrderAddNote - orderCancel(id: ID!): OrderCancel - orderCapture(amount: PositiveDecimal!, id: ID!): OrderCapture - orderConfirm(id: ID!): OrderConfirm - orderFulfill(input: OrderFulfillInput!, order: ID): OrderFulfill - orderFulfillmentCancel(id: ID!, input: FulfillmentCancelInput): FulfillmentCancel - orderFulfillmentApprove(allowStockToBeExceeded: Boolean = false, id: ID!, notifyCustomer: Boolean!): FulfillmentApprove - orderFulfillmentUpdateTracking(id: ID!, input: FulfillmentUpdateTrackingInput!): FulfillmentUpdateTracking - orderFulfillmentRefundProducts(input: OrderRefundProductsInput!, order: ID!): FulfillmentRefundProducts - orderFulfillmentReturnProducts(input: OrderReturnProductsInput!, order: ID!): FulfillmentReturnProducts - orderLinesCreate(id: ID!, input: [OrderLineCreateInput]!): OrderLinesCreate - orderLineDelete(id: ID!): OrderLineDelete - orderLineUpdate(id: ID!, input: OrderLineInput!): OrderLineUpdate - orderDiscountAdd(input: OrderDiscountCommonInput!, orderId: ID!): OrderDiscountAdd - orderDiscountUpdate(discountId: ID!, input: OrderDiscountCommonInput!): OrderDiscountUpdate - orderDiscountDelete(discountId: ID!): OrderDiscountDelete - orderLineDiscountUpdate(input: OrderDiscountCommonInput!, orderLineId: ID!): OrderLineDiscountUpdate - orderLineDiscountRemove(orderLineId: ID!): OrderLineDiscountRemove - orderMarkAsPaid(id: ID!, transactionReference: String): OrderMarkAsPaid - orderRefund(amount: PositiveDecimal!, id: ID!): OrderRefund - orderUpdate(id: ID!, input: OrderUpdateInput!): OrderUpdate - orderUpdateShipping(order: ID!, input: OrderUpdateShippingInput!): OrderUpdateShipping - orderVoid(id: ID!): OrderVoid - orderBulkCancel(ids: [ID]!): OrderBulkCancel - deleteMetadata(id: ID!, keys: [String!]!): DeleteMetadata - deletePrivateMetadata(id: ID!, keys: [String!]!): DeletePrivateMetadata - updateMetadata(id: ID!, input: [MetadataInput!]!): UpdateMetadata - updatePrivateMetadata(id: ID!, input: [MetadataInput!]!): UpdatePrivateMetadata - assignNavigation(menu: ID, navigationType: NavigationType!): AssignNavigation - menuCreate(input: MenuCreateInput!): MenuCreate - menuDelete(id: ID!): MenuDelete - menuBulkDelete(ids: [ID]!): MenuBulkDelete - menuUpdate(id: ID!, input: MenuInput!): MenuUpdate - menuItemCreate(input: MenuItemCreateInput!): MenuItemCreate - menuItemDelete(id: ID!): MenuItemDelete - menuItemBulkDelete(ids: [ID]!): MenuItemBulkDelete - menuItemUpdate(id: ID!, input: MenuItemInput!): MenuItemUpdate - menuItemTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): MenuItemTranslate - menuItemMove(menu: ID!, moves: [MenuItemMoveInput]!): MenuItemMove - invoiceRequest(number: String, orderId: ID!): InvoiceRequest - invoiceRequestDelete(id: ID!): InvoiceRequestDelete - invoiceCreate(input: InvoiceCreateInput!, orderId: ID!): InvoiceCreate - invoiceDelete(id: ID!): InvoiceDelete - invoiceUpdate(id: ID!, input: UpdateInvoiceInput!): InvoiceUpdate - invoiceSendNotification(id: ID!): InvoiceSendNotification - giftCardActivate(id: ID!): GiftCardActivate - giftCardCreate(input: GiftCardCreateInput!): GiftCardCreate - giftCardDelete(id: ID!): GiftCardDelete - giftCardDeactivate(id: ID!): GiftCardDeactivate - giftCardUpdate(id: ID!, input: GiftCardUpdateInput!): GiftCardUpdate - giftCardResend(input: GiftCardResendInput!): GiftCardResend - giftCardAddNote(id: ID!, input: GiftCardAddNoteInput!): GiftCardAddNote - giftCardBulkCreate(input: GiftCardBulkCreateInput!): GiftCardBulkCreate - giftCardBulkDelete(ids: [ID]!): GiftCardBulkDelete - giftCardBulkActivate(ids: [ID]!): GiftCardBulkActivate - giftCardBulkDeactivate(ids: [ID]!): GiftCardBulkDeactivate - pluginUpdate(channelId: ID, id: ID!, input: PluginUpdateInput!): PluginUpdate - externalNotificationTrigger(channel: String!, input: ExternalNotificationTriggerInput!, pluginId: String): ExternalNotificationTrigger - saleCreate(input: SaleInput!): SaleCreate - saleDelete(id: ID!): SaleDelete - saleBulkDelete(ids: [ID]!): SaleBulkDelete - saleUpdate(id: ID!, input: SaleInput!): SaleUpdate - saleCataloguesAdd(id: ID!, input: CatalogueInput!): SaleAddCatalogues - saleCataloguesRemove(id: ID!, input: CatalogueInput!): SaleRemoveCatalogues - saleTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): SaleTranslate - saleChannelListingUpdate(id: ID!, input: SaleChannelListingInput!): SaleChannelListingUpdate - voucherCreate(input: VoucherInput!): VoucherCreate - voucherDelete(id: ID!): VoucherDelete - voucherBulkDelete(ids: [ID]!): VoucherBulkDelete - voucherUpdate(id: ID!, input: VoucherInput!): VoucherUpdate - voucherCataloguesAdd(id: ID!, input: CatalogueInput!): VoucherAddCatalogues - voucherCataloguesRemove(id: ID!, input: CatalogueInput!): VoucherRemoveCatalogues - voucherTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): VoucherTranslate - voucherChannelListingUpdate(id: ID!, input: VoucherChannelListingInput!): VoucherChannelListingUpdate - exportProducts(input: ExportProductsInput!): ExportProducts - exportGiftCards(input: ExportGiftCardsInput!): ExportGiftCards - fileUpload(file: Upload!): FileUpload - checkoutAddPromoCode(checkoutId: ID, promoCode: String!, token: UUID): CheckoutAddPromoCode - checkoutBillingAddressUpdate(billingAddress: AddressInput!, checkoutId: ID, token: UUID): CheckoutBillingAddressUpdate - checkoutComplete(checkoutId: ID, paymentData: JSONString, redirectUrl: String, storeSource: Boolean = false, token: UUID): CheckoutComplete - checkoutCreate(input: CheckoutCreateInput!): CheckoutCreate - checkoutCustomerAttach(checkoutId: ID, customerId: ID, token: UUID): CheckoutCustomerAttach - checkoutCustomerDetach(checkoutId: ID, token: UUID): CheckoutCustomerDetach - checkoutEmailUpdate(checkoutId: ID, email: String!, token: UUID): CheckoutEmailUpdate - checkoutLineDelete(checkoutId: ID, lineId: ID, token: UUID): CheckoutLineDelete @deprecated(reason: "DEPRECATED: Will be removed in Saleor 4.0. Use `checkoutLinesDelete` instead.") - checkoutLinesDelete(linesIds: [ID]!, token: UUID!): CheckoutLinesDelete - checkoutLinesAdd(checkoutId: ID, lines: [CheckoutLineInput]!, token: UUID): CheckoutLinesAdd - checkoutLinesUpdate(checkoutId: ID, lines: [CheckoutLineInput]!, token: UUID): CheckoutLinesUpdate - checkoutRemovePromoCode(checkoutId: ID, promoCode: String, promoCodeId: ID, token: UUID): CheckoutRemovePromoCode - checkoutPaymentCreate(checkoutId: ID, input: PaymentInput!, token: UUID): CheckoutPaymentCreate - checkoutShippingAddressUpdate(checkoutId: ID, shippingAddress: AddressInput!, token: UUID): CheckoutShippingAddressUpdate - checkoutShippingMethodUpdate(checkoutId: ID, shippingMethodId: ID!, token: UUID): CheckoutShippingMethodUpdate @deprecated(reason: "This field will be removed in Saleor 4.0. Use `checkoutDeliveryMethodUpdate` instead.") - checkoutDeliveryMethodUpdate(deliveryMethodId: ID, token: UUID): CheckoutDeliveryMethodUpdate - checkoutLanguageCodeUpdate(checkoutId: ID, languageCode: LanguageCodeEnum!, token: UUID): CheckoutLanguageCodeUpdate - channelCreate(input: ChannelCreateInput!): ChannelCreate - channelUpdate(id: ID!, input: ChannelUpdateInput!): ChannelUpdate - channelDelete(id: ID!, input: ChannelDeleteInput): ChannelDelete - channelActivate(id: ID!): ChannelActivate - channelDeactivate(id: ID!): ChannelDeactivate - attributeCreate(input: AttributeCreateInput!): AttributeCreate - attributeDelete(id: ID!): AttributeDelete - attributeUpdate(id: ID!, input: AttributeUpdateInput!): AttributeUpdate - attributeTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): AttributeTranslate - attributeBulkDelete(ids: [ID]!): AttributeBulkDelete - attributeValueBulkDelete(ids: [ID]!): AttributeValueBulkDelete - attributeValueCreate(attribute: ID!, input: AttributeValueCreateInput!): AttributeValueCreate - attributeValueDelete(id: ID!): AttributeValueDelete - attributeValueUpdate(id: ID!, input: AttributeValueUpdateInput!): AttributeValueUpdate - attributeValueTranslate(id: ID!, input: AttributeValueTranslationInput!, languageCode: LanguageCodeEnum!): AttributeValueTranslate - attributeReorderValues(attributeId: ID!, moves: [ReorderInput]!): AttributeReorderValues - appCreate(input: AppInput!): AppCreate - appUpdate(id: ID!, input: AppInput!): AppUpdate - appDelete(id: ID!): AppDelete - appTokenCreate(input: AppTokenInput!): AppTokenCreate - appTokenDelete(id: ID!): AppTokenDelete - appTokenVerify(token: String!): AppTokenVerify - appInstall(input: AppInstallInput!): AppInstall - appRetryInstall(activateAfterInstallation: Boolean = true, id: ID!): AppRetryInstall - appDeleteFailedInstallation(id: ID!): AppDeleteFailedInstallation - appFetchManifest(manifestUrl: String!): AppFetchManifest - appActivate(id: ID!): AppActivate - appDeactivate(id: ID!): AppDeactivate - tokenCreate(email: String!, password: String!): CreateToken - tokenRefresh(csrfToken: String, refreshToken: String): RefreshToken - tokenVerify(token: String!): VerifyToken - tokensDeactivateAll: DeactivateAllUserTokens - externalAuthenticationUrl(input: JSONString!, pluginId: String!): ExternalAuthenticationUrl - externalObtainAccessTokens(input: JSONString!, pluginId: String!): ExternalObtainAccessTokens - externalRefresh(input: JSONString!, pluginId: String!): ExternalRefresh - externalLogout(input: JSONString!, pluginId: String!): ExternalLogout - externalVerify(input: JSONString!, pluginId: String!): ExternalVerify - requestPasswordReset(channel: String, email: String!, redirectUrl: String!): RequestPasswordReset - confirmAccount(email: String!, token: String!): ConfirmAccount - setPassword(email: String!, password: String!, token: String!): SetPassword - passwordChange(newPassword: String!, oldPassword: String!): PasswordChange - requestEmailChange(channel: String, newEmail: String!, password: String!, redirectUrl: String!): RequestEmailChange - confirmEmailChange(channel: String, token: String!): ConfirmEmailChange - accountAddressCreate(input: AddressInput!, type: AddressTypeEnum): AccountAddressCreate - accountAddressUpdate(id: ID!, input: AddressInput!): AccountAddressUpdate - accountAddressDelete(id: ID!): AccountAddressDelete - accountSetDefaultAddress(id: ID!, type: AddressTypeEnum!): AccountSetDefaultAddress - accountRegister(input: AccountRegisterInput!): AccountRegister - accountUpdate(input: AccountInput!): AccountUpdate - accountRequestDeletion(channel: String, redirectUrl: String!): AccountRequestDeletion - accountDelete(token: String!): AccountDelete - addressCreate(input: AddressInput!, userId: ID!): AddressCreate - addressUpdate(id: ID!, input: AddressInput!): AddressUpdate - addressDelete(id: ID!): AddressDelete - addressSetDefault(addressId: ID!, type: AddressTypeEnum!, userId: ID!): AddressSetDefault - customerCreate(input: UserCreateInput!): CustomerCreate - customerUpdate(id: ID!, input: CustomerInput!): CustomerUpdate - customerDelete(id: ID!): CustomerDelete - customerBulkDelete(ids: [ID]!): CustomerBulkDelete - staffCreate(input: StaffCreateInput!): StaffCreate - staffUpdate(id: ID!, input: StaffUpdateInput!): StaffUpdate - staffDelete(id: ID!): StaffDelete - staffBulkDelete(ids: [ID]!): StaffBulkDelete - userAvatarUpdate(image: Upload!): UserAvatarUpdate - userAvatarDelete: UserAvatarDelete - userBulkSetActive(ids: [ID]!, isActive: Boolean!): UserBulkSetActive - permissionGroupCreate(input: PermissionGroupCreateInput!): PermissionGroupCreate - permissionGroupUpdate(id: ID!, input: PermissionGroupUpdateInput!): PermissionGroupUpdate - permissionGroupDelete(id: ID!): PermissionGroupDelete -} - -input NameTranslationInput { - name: String -} - -enum NavigationType { - MAIN - SECONDARY -} - -interface Node { - id: ID! -} - -interface ObjectWithMetadata { - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! -} - -type Order implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - created: DateTime! - status: OrderStatus! - user: User - trackingClientId: String! - billingAddress: Address - shippingAddress: Address - shippingMethodName: String - collectionPointName: String - channel: Channel! - fulfillments: [Fulfillment]! - lines: [OrderLine]! - actions: [OrderAction]! - availableShippingMethods: [ShippingMethod] @deprecated(reason: "Use `shippingMethods`, this field will be removed in 4.0") - shippingMethods: [ShippingMethod] - availableCollectionPoints: [Warehouse!]! - invoices: [Invoice] - number: String - original: ID - origin: OrderOriginEnum! - isPaid: Boolean! - paymentStatus: PaymentChargeStatusEnum! - paymentStatusDisplay: String! - payments: [Payment] - total: TaxedMoney! - undiscountedTotal: TaxedMoney! - shippingMethod: ShippingMethod @deprecated(reason: "This field will be removed in Saleor 4.0. Use `deliveryMethod` instead.") - shippingPrice: TaxedMoney! - shippingTaxRate: Float! - token: String! - voucher: Voucher - giftCards: [GiftCard] - displayGrossPrices: Boolean! - customerNote: String! - weight: Weight - redirectUrl: String - subtotal: TaxedMoney! - statusDisplay: String - canFinalize: Boolean! - totalAuthorized: Money! - totalCaptured: Money! - events: [OrderEvent] - totalBalance: Money! - userEmail: String - isShippingRequired: Boolean! - deliveryMethod: DeliveryMethod - languageCode: String! @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `languageCodeEnum` field to fetch the language code. ") - languageCodeEnum: LanguageCodeEnum! - discount: Money @deprecated(reason: "This field will be removed in Saleor 4.0. Use discounts field.") - discountName: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use discounts field.") - translatedDiscountName: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use discounts field. ") - discounts: [OrderDiscount!] - errors: [OrderError!]! -} - -enum OrderAction { - CAPTURE - MARK_AS_PAID - REFUND - VOID -} - -type OrderAddNote { - order: Order - event: OrderEvent - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -input OrderAddNoteInput { - message: String! -} - -type OrderBulkCancel { - count: Int! - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -type OrderCancel { - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -type OrderCapture { - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -type OrderConfirm { - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -type OrderCountableConnection { - pageInfo: PageInfo! - edges: [OrderCountableEdge!]! - totalCount: Int -} - -type OrderCountableEdge { - node: Order! - cursor: String! -} - -enum OrderDirection { - ASC - DESC -} - -type OrderDiscount implements Node { - id: ID! - type: OrderDiscountType! - name: String - translatedName: String - valueType: DiscountValueTypeEnum! - value: PositiveDecimal! - reason: String - amount: Money! -} - -type OrderDiscountAdd { - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -input OrderDiscountCommonInput { - valueType: DiscountValueTypeEnum! - value: PositiveDecimal! - reason: String -} - -type OrderDiscountDelete { - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -enum OrderDiscountType { - VOUCHER - MANUAL -} - -type OrderDiscountUpdate { - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -input OrderDraftFilterInput { - customer: String - created: DateRangeInput - search: String - metadata: [MetadataFilter] - channels: [ID] -} - -type OrderError { - field: String - message: String - code: OrderErrorCode! - warehouse: ID - orderLines: [ID!] - variants: [ID!] - addressType: AddressTypeEnum -} - -enum OrderErrorCode { - BILLING_ADDRESS_NOT_SET - CANNOT_CANCEL_FULFILLMENT - CANNOT_CANCEL_ORDER - CANNOT_DELETE - CANNOT_DISCOUNT - CANNOT_REFUND - CANNOT_FULFILL_UNPAID_ORDER - CAPTURE_INACTIVE_PAYMENT - GIFT_CARD_LINE - NOT_EDITABLE - FULFILL_ORDER_LINE - GRAPHQL_ERROR - INVALID - PRODUCT_NOT_PUBLISHED - PRODUCT_UNAVAILABLE_FOR_PURCHASE - NOT_FOUND - ORDER_NO_SHIPPING_ADDRESS - PAYMENT_ERROR - PAYMENT_MISSING - REQUIRED - SHIPPING_METHOD_NOT_APPLICABLE - SHIPPING_METHOD_REQUIRED - TAX_ERROR - UNIQUE - VOID_INACTIVE_PAYMENT - ZERO_QUANTITY - INVALID_QUANTITY - INSUFFICIENT_STOCK - DUPLICATED_INPUT_ITEM - NOT_AVAILABLE_IN_CHANNEL - CHANNEL_INACTIVE -} - -type OrderEvent implements Node { - id: ID! - date: DateTime - type: OrderEventsEnum - user: User - app: App - message: String - email: String - emailType: OrderEventsEmailsEnum - amount: Float - paymentId: String - paymentGateway: String - quantity: Int - composedId: String - orderNumber: String - invoiceNumber: String - oversoldItems: [String] - lines: [OrderEventOrderLineObject] - fulfilledItems: [FulfillmentLine] - warehouse: Warehouse - transactionReference: String - shippingCostsIncluded: Boolean - relatedOrder: Order - discount: OrderEventDiscountObject -} - -type OrderEventCountableConnection { - pageInfo: PageInfo! - edges: [OrderEventCountableEdge!]! - totalCount: Int -} - -type OrderEventCountableEdge { - node: OrderEvent! - cursor: String! -} - -type OrderEventDiscountObject { - valueType: DiscountValueTypeEnum! - value: PositiveDecimal! - reason: String - amount: Money - oldValueType: DiscountValueTypeEnum - oldValue: PositiveDecimal - oldAmount: Money -} - -type OrderEventOrderLineObject { - quantity: Int - orderLine: OrderLine - itemName: String - discount: OrderEventDiscountObject -} - -enum OrderEventsEmailsEnum { - PAYMENT_CONFIRMATION - CONFIRMED - SHIPPING_CONFIRMATION - TRACKING_UPDATED - ORDER_CONFIRMATION - ORDER_CANCEL - ORDER_REFUND - FULFILLMENT_CONFIRMATION - DIGITAL_LINKS -} - -enum OrderEventsEnum { - DRAFT_CREATED - DRAFT_CREATED_FROM_REPLACE - ADDED_PRODUCTS - REMOVED_PRODUCTS - PLACED - PLACED_FROM_DRAFT - OVERSOLD_ITEMS - CANCELED - ORDER_MARKED_AS_PAID - ORDER_FULLY_PAID - ORDER_REPLACEMENT_CREATED - ORDER_DISCOUNT_ADDED - ORDER_DISCOUNT_AUTOMATICALLY_UPDATED - ORDER_DISCOUNT_UPDATED - ORDER_DISCOUNT_DELETED - ORDER_LINE_DISCOUNT_UPDATED - ORDER_LINE_DISCOUNT_REMOVED - ORDER_LINE_PRODUCT_DELETED - ORDER_LINE_VARIANT_DELETED - UPDATED_ADDRESS - EMAIL_SENT - CONFIRMED - PAYMENT_AUTHORIZED - PAYMENT_CAPTURED - EXTERNAL_SERVICE_NOTIFICATION - PAYMENT_REFUNDED - PAYMENT_VOIDED - PAYMENT_FAILED - INVOICE_REQUESTED - INVOICE_GENERATED - INVOICE_UPDATED - INVOICE_SENT - FULFILLMENT_CANCELED - FULFILLMENT_RESTOCKED_ITEMS - FULFILLMENT_FULFILLED_ITEMS - FULFILLMENT_REFUNDED - FULFILLMENT_RETURNED - FULFILLMENT_REPLACED - FULFILLMENT_AWAITS_APPROVAL - TRACKING_UPDATED - NOTE_ADDED - OTHER -} - -input OrderFilterInput { - paymentStatus: [PaymentChargeStatusEnum] - status: [OrderStatusFilter] - customer: String - created: DateRangeInput - search: String - metadata: [MetadataFilter] - channels: [ID] - isClickAndCollect: Boolean - isPreorder: Boolean - ids: [ID] - giftCardUsed: Boolean - giftCardBought: Boolean -} - -type OrderFulfill { - fulfillments: [Fulfillment] - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -input OrderFulfillInput { - lines: [OrderFulfillLineInput!]! - notifyCustomer: Boolean - allowStockToBeExceeded: Boolean = false -} - -input OrderFulfillLineInput { - orderLineId: ID - stocks: [OrderFulfillStockInput!]! -} - -input OrderFulfillStockInput { - quantity: Int! - warehouse: ID! -} - -type OrderLine implements Node { - id: ID! - productName: String! - variantName: String! - productSku: String - productVariantId: String - isShippingRequired: Boolean! - quantity: Int! - quantityFulfilled: Int! - unitDiscountReason: String - taxRate: Float! - digitalContentUrl: DigitalContentUrl - thumbnail(size: Int): Image - unitPrice: TaxedMoney! - undiscountedUnitPrice: TaxedMoney! - unitDiscount: Money! - unitDiscountValue: PositiveDecimal! - totalPrice: TaxedMoney! - variant: ProductVariant - translatedProductName: String! - translatedVariantName: String! - allocations: [Allocation!] - quantityToFulfill: Int! - unitDiscountType: DiscountValueTypeEnum -} - -input OrderLineCreateInput { - quantity: Int! - variantId: ID! -} - -type OrderLineDelete { - order: Order - orderLine: OrderLine - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -type OrderLineDiscountRemove { - orderLine: OrderLine - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -type OrderLineDiscountUpdate { - orderLine: OrderLine - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -input OrderLineInput { - quantity: Int! -} - -type OrderLineUpdate { - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! - orderLine: OrderLine -} - -type OrderLinesCreate { - order: Order - orderLines: [OrderLine!] - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -type OrderMarkAsPaid { - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -enum OrderOriginEnum { - CHECKOUT - DRAFT - REISSUE -} - -type OrderRefund { - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -input OrderRefundFulfillmentLineInput { - fulfillmentLineId: ID! - quantity: Int! -} - -input OrderRefundLineInput { - orderLineId: ID! - quantity: Int! -} - -input OrderRefundProductsInput { - orderLines: [OrderRefundLineInput!] - fulfillmentLines: [OrderRefundFulfillmentLineInput!] - amountToRefund: PositiveDecimal - includeShippingCosts: Boolean = false -} - -input OrderReturnFulfillmentLineInput { - fulfillmentLineId: ID! - quantity: Int! - replace: Boolean = false -} - -input OrderReturnLineInput { - orderLineId: ID! - quantity: Int! - replace: Boolean = false -} - -input OrderReturnProductsInput { - orderLines: [OrderReturnLineInput!] - fulfillmentLines: [OrderReturnFulfillmentLineInput!] - amountToRefund: PositiveDecimal - includeShippingCosts: Boolean = false - refund: Boolean = false -} - -type OrderSettings { - automaticallyConfirmAllNewOrders: Boolean! - automaticallyFulfillNonShippableGiftCard: Boolean! -} - -type OrderSettingsError { - field: String - message: String - code: OrderSettingsErrorCode! -} - -enum OrderSettingsErrorCode { - INVALID -} - -type OrderSettingsUpdate { - orderSettings: OrderSettings - orderSettingsErrors: [OrderSettingsError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderSettingsError!]! -} - -input OrderSettingsUpdateInput { - automaticallyConfirmAllNewOrders: Boolean - automaticallyFulfillNonShippableGiftCard: Boolean -} - -enum OrderSortField { - NUMBER - CREATION_DATE - CUSTOMER - PAYMENT - FULFILLMENT_STATUS -} - -input OrderSortingInput { - direction: OrderDirection! - field: OrderSortField! -} - -enum OrderStatus { - DRAFT - UNCONFIRMED - UNFULFILLED - PARTIALLY_FULFILLED - PARTIALLY_RETURNED - RETURNED - FULFILLED - CANCELED -} - -enum OrderStatusFilter { - READY_TO_FULFILL - READY_TO_CAPTURE - UNFULFILLED - UNCONFIRMED - PARTIALLY_FULFILLED - FULFILLED - CANCELED -} - -type OrderUpdate { - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! - order: Order -} - -input OrderUpdateInput { - billingAddress: AddressInput - userEmail: String - shippingAddress: AddressInput -} - -type OrderUpdateShipping { - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -input OrderUpdateShippingInput { - shippingMethod: ID -} - -type OrderVoid { - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! -} - -type Page implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - seoTitle: String - seoDescription: String - title: String! - content: JSONString - publicationDate: Date - isPublished: Boolean! - slug: String! - pageType: PageType! - created: DateTime! - contentJson: JSONString! @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `content` field instead.") - translation(languageCode: LanguageCodeEnum!): PageTranslation - attributes: [SelectedAttribute!]! -} - -type PageAttributeAssign { - pageType: PageType - pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PageError!]! -} - -type PageAttributeUnassign { - pageType: PageType - pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PageError!]! -} - -type PageBulkDelete { - count: Int! - pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PageError!]! -} - -type PageBulkPublish { - count: Int! - pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PageError!]! -} - -type PageCountableConnection { - pageInfo: PageInfo! - edges: [PageCountableEdge!]! - totalCount: Int -} - -type PageCountableEdge { - node: Page! - cursor: String! -} - -type PageCreate { - pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PageError!]! - page: Page -} - -input PageCreateInput { - slug: String - title: String - content: JSONString - attributes: [AttributeValueInput!] - isPublished: Boolean - publicationDate: String - seo: SeoInput - pageType: ID! -} - -type PageDelete { - pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PageError!]! - page: Page -} - -type PageError { - field: String - message: String - code: PageErrorCode! - attributes: [ID!] - values: [ID!] -} - -enum PageErrorCode { - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE - DUPLICATED_INPUT_ITEM - ATTRIBUTE_ALREADY_ASSIGNED -} - -input PageFilterInput { - search: String - metadata: [MetadataFilter] - pageTypes: [ID] - ids: [ID] -} - -type PageInfo { - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - endCursor: String -} - -input PageInput { - slug: String - title: String - content: JSONString - attributes: [AttributeValueInput!] - isPublished: Boolean - publicationDate: String - seo: SeoInput -} - -type PageReorderAttributeValues { - page: Page - pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PageError!]! -} - -enum PageSortField { - TITLE - SLUG - VISIBILITY - CREATION_DATE - PUBLICATION_DATE -} - -input PageSortingInput { - direction: OrderDirection! - field: PageSortField! -} - -type PageTranslatableContent implements Node { - id: ID! - seoTitle: String - seoDescription: String - title: String! - content: JSONString - contentJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `content` field instead.") - translation(languageCode: LanguageCodeEnum!): PageTranslation - page: Page @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") - attributeValues: [AttributeValueTranslatableContent!]! -} - -type PageTranslate { - translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [TranslationError!]! - page: PageTranslatableContent -} - -type PageTranslation implements Node { - id: ID! - language: LanguageDisplay! - seoTitle: String - seoDescription: String - title: String - content: JSONString - contentJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `content` field instead.") -} - -input PageTranslationInput { - seoTitle: String - seoDescription: String - title: String - content: JSONString -} - -type PageType implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - name: String! - slug: String! - attributes: [Attribute] - availableAttributes(filter: AttributeFilterInput, before: String, after: String, first: Int, last: Int): AttributeCountableConnection - hasPages: Boolean -} - -type PageTypeBulkDelete { - count: Int! - pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PageError!]! -} - -type PageTypeCountableConnection { - pageInfo: PageInfo! - edges: [PageTypeCountableEdge!]! - totalCount: Int -} - -type PageTypeCountableEdge { - node: PageType! - cursor: String! -} - -type PageTypeCreate { - pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PageError!]! - pageType: PageType -} - -input PageTypeCreateInput { - name: String - slug: String - addAttributes: [ID!] -} - -type PageTypeDelete { - pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PageError!]! - pageType: PageType -} - -input PageTypeFilterInput { - search: String -} - -type PageTypeReorderAttributes { - pageType: PageType - pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PageError!]! -} - -enum PageTypeSortField { - NAME - SLUG -} - -input PageTypeSortingInput { - direction: OrderDirection! - field: PageTypeSortField! -} - -type PageTypeUpdate { - pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PageError!]! - pageType: PageType -} - -input PageTypeUpdateInput { - name: String - slug: String - addAttributes: [ID!] - removeAttributes: [ID!] -} - -type PageUpdate { - pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PageError!]! - page: Page -} - -type PasswordChange { - user: User - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -type Payment implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - gateway: String! - isActive: Boolean! - created: DateTime! - modified: DateTime! - token: String! - checkout: Checkout - order: Order - paymentMethodType: String! - customerIpAddress: String - chargeStatus: PaymentChargeStatusEnum! - actions: [OrderAction]! - total: Money - capturedAmount: Money - transactions: [Transaction] - availableCaptureAmount: Money - availableRefundAmount: Money - creditCard: CreditCard -} - -type PaymentCapture { - payment: Payment - paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PaymentError!]! -} - -enum PaymentChargeStatusEnum { - NOT_CHARGED - PENDING - PARTIALLY_CHARGED - FULLY_CHARGED - PARTIALLY_REFUNDED - FULLY_REFUNDED - REFUSED - CANCELLED -} - -type PaymentCheckBalance { - data: JSONString - paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PaymentError!]! -} - -input PaymentCheckBalanceInput { - gatewayId: String! - method: String! - channel: String! - card: CardInput! -} - -type PaymentCountableConnection { - pageInfo: PageInfo! - edges: [PaymentCountableEdge!]! - totalCount: Int -} - -type PaymentCountableEdge { - node: Payment! - cursor: String! -} - -type PaymentError { - field: String - message: String - code: PaymentErrorCode! -} - -enum PaymentErrorCode { - BILLING_ADDRESS_NOT_SET - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE - PARTIAL_PAYMENT_NOT_ALLOWED - SHIPPING_ADDRESS_NOT_SET - INVALID_SHIPPING_METHOD - SHIPPING_METHOD_NOT_SET - PAYMENT_ERROR - NOT_SUPPORTED_GATEWAY - CHANNEL_INACTIVE - BALANCE_CHECK_ERROR - CHECKOUT_EMAIL_NOT_SET -} - -input PaymentFilterInput { - checkouts: [ID] -} - -type PaymentGateway { - name: String! - id: ID! - config: [GatewayConfigLine!]! - currencies: [String]! -} - -type PaymentInitialize { - initializedPayment: PaymentInitialized - paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PaymentError!]! -} - -type PaymentInitialized { - gateway: String! - name: String! - data: JSONString -} - -input PaymentInput { - gateway: String! - token: String - amount: PositiveDecimal - returnUrl: String - storePaymentMethod: StorePaymentMethodEnum = none - metadata: [MetadataInput!] -} - -type PaymentRefund { - payment: Payment - paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PaymentError!]! -} - -type PaymentSource { - gateway: String! - paymentMethodId: String - creditCardInfo: CreditCard - metadata: [MetadataItem]! -} - -type PaymentVoid { - payment: Payment - paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PaymentError!]! -} - -type Permission { - code: PermissionEnum! - name: String! -} - -enum PermissionEnum { - MANAGE_USERS - MANAGE_STAFF - IMPERSONATE_USER - MANAGE_APPS - MANAGE_CHANNELS - MANAGE_DISCOUNTS - MANAGE_PLUGINS - MANAGE_GIFT_CARD - MANAGE_MENUS - MANAGE_ORDERS - MANAGE_PAGES - MANAGE_PAGE_TYPES_AND_ATTRIBUTES - HANDLE_PAYMENTS - MANAGE_PRODUCTS - MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES - MANAGE_SHIPPING - MANAGE_SETTINGS - MANAGE_TRANSLATIONS - MANAGE_CHECKOUTS -} - -type PermissionGroupCreate { - permissionGroupErrors: [PermissionGroupError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PermissionGroupError!]! - group: Group -} - -input PermissionGroupCreateInput { - addPermissions: [PermissionEnum!] - addUsers: [ID!] - name: String! -} - -type PermissionGroupDelete { - permissionGroupErrors: [PermissionGroupError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PermissionGroupError!]! - group: Group -} - -type PermissionGroupError { - field: String - message: String - code: PermissionGroupErrorCode! - permissions: [PermissionEnum!] - users: [ID!] -} - -enum PermissionGroupErrorCode { - ASSIGN_NON_STAFF_MEMBER - DUPLICATED_INPUT_ITEM - CANNOT_REMOVE_FROM_LAST_GROUP - LEFT_NOT_MANAGEABLE_PERMISSION - OUT_OF_SCOPE_PERMISSION - OUT_OF_SCOPE_USER - REQUIRED - UNIQUE -} - -input PermissionGroupFilterInput { - search: String -} - -enum PermissionGroupSortField { - NAME -} - -input PermissionGroupSortingInput { - direction: OrderDirection! - field: PermissionGroupSortField! -} - -type PermissionGroupUpdate { - permissionGroupErrors: [PermissionGroupError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PermissionGroupError!]! - group: Group -} - -input PermissionGroupUpdateInput { - addPermissions: [PermissionEnum!] - addUsers: [ID!] - name: String - removePermissions: [PermissionEnum!] - removeUsers: [ID!] -} - -type Plugin { - id: ID! - name: String! - description: String! - globalConfiguration: PluginConfiguration - channelConfigurations: [PluginConfiguration!]! -} - -type PluginConfiguration { - active: Boolean! - channel: Channel - configuration: [ConfigurationItem] -} - -enum PluginConfigurationType { - PER_CHANNEL - GLOBAL -} - -type PluginCountableConnection { - pageInfo: PageInfo! - edges: [PluginCountableEdge!]! - totalCount: Int -} - -type PluginCountableEdge { - node: Plugin! - cursor: String! -} - -type PluginError { - field: String - message: String - code: PluginErrorCode! -} - -enum PluginErrorCode { - GRAPHQL_ERROR - INVALID - PLUGIN_MISCONFIGURED - NOT_FOUND - REQUIRED - UNIQUE -} - -input PluginFilterInput { - statusInChannels: PluginStatusInChannelsInput - search: String - type: PluginConfigurationType -} - -enum PluginSortField { - NAME - IS_ACTIVE -} - -input PluginSortingInput { - direction: OrderDirection! - field: PluginSortField! -} - -input PluginStatusInChannelsInput { - active: Boolean! - channels: [ID!]! -} - -type PluginUpdate { - plugin: Plugin - pluginsErrors: [PluginError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PluginError!]! -} - -input PluginUpdateInput { - active: Boolean - configuration: [ConfigurationItemInput] -} - -scalar PositiveDecimal - -enum PostalCodeRuleInclusionTypeEnum { - INCLUDE - EXCLUDE -} - -type PreorderData { - globalThreshold: Int - globalSoldUnits: Int! - endDate: DateTime -} - -input PreorderSettingsInput { - globalThreshold: Int - endDate: DateTime -} - -type PreorderThreshold { - quantity: Int - soldUnits: Int! -} - -input PriceInput { - currency: String! - amount: PositiveDecimal! -} - -input PriceRangeInput { - gte: Float - lte: Float -} - -type Product implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - seoTitle: String - seoDescription: String - name: String! - description: JSONString - productType: ProductType! - slug: String! - category: Category - updatedAt: DateTime - chargeTaxes: Boolean! - weight: Weight - defaultVariant: ProductVariant - rating: Float - channel: String - descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") - thumbnail(size: Int): Image - pricing(address: AddressInput): ProductPricingInfo - isAvailable(address: AddressInput): Boolean - taxType: TaxType - attributes: [SelectedAttribute!]! - channelListings: [ProductChannelListing!] - mediaById(id: ID): ProductMedia - imageById(id: ID): ProductImage @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `mediaById` field instead.") - variants: [ProductVariant] - media: [ProductMedia!] - images: [ProductImage] @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `media` field instead.") - collections: [Collection] - translation(languageCode: LanguageCodeEnum!): ProductTranslation - availableForPurchase: Date - isAvailableForPurchase: Boolean -} - -type ProductAttributeAssign { - productType: ProductType - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -input ProductAttributeAssignInput { - id: ID! - type: ProductAttributeType! - variantSelection: Boolean -} - -type ProductAttributeAssignmentUpdate { - productType: ProductType - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -input ProductAttributeAssignmentUpdateInput { - id: ID! - variantSelection: Boolean! -} - -enum ProductAttributeType { - PRODUCT - VARIANT -} - -type ProductAttributeUnassign { - productType: ProductType - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -type ProductBulkDelete { - count: Int! - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -type ProductChannelListing implements Node { - id: ID! - publicationDate: Date - isPublished: Boolean! - channel: Channel! - visibleInListings: Boolean! - availableForPurchase: Date - discountedPrice: Money - purchaseCost: MoneyRange - margin: Margin - isAvailableForPurchase: Boolean - pricing(address: AddressInput): ProductPricingInfo -} - -input ProductChannelListingAddInput { - channelId: ID! - isPublished: Boolean - publicationDate: Date - visibleInListings: Boolean - isAvailableForPurchase: Boolean - availableForPurchaseDate: Date - addVariants: [ID!] - removeVariants: [ID!] -} - -type ProductChannelListingError { - field: String - message: String - code: ProductErrorCode! - attributes: [ID!] - values: [ID!] - channels: [ID!] - variants: [ID!] -} - -type ProductChannelListingUpdate { - product: Product - productChannelListingErrors: [ProductChannelListingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductChannelListingError!]! -} - -input ProductChannelListingUpdateInput { - updateChannels: [ProductChannelListingAddInput!] - removeChannels: [ID!] -} - -type ProductCountableConnection { - pageInfo: PageInfo! - edges: [ProductCountableEdge!]! - totalCount: Int -} - -type ProductCountableEdge { - node: Product! - cursor: String! -} - -type ProductCreate { - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! - product: Product -} - -input ProductCreateInput { - attributes: [AttributeValueInput!] - category: ID - chargeTaxes: Boolean - collections: [ID!] - description: JSONString - name: String - slug: String - taxCode: String - seo: SeoInput - weight: WeightScalar - rating: Float - productType: ID! -} - -type ProductDelete { - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! - product: Product -} - -type ProductError { - field: String - message: String - code: ProductErrorCode! - attributes: [ID!] - values: [ID!] -} - -enum ProductErrorCode { - ALREADY_EXISTS - ATTRIBUTE_ALREADY_ASSIGNED - ATTRIBUTE_CANNOT_BE_ASSIGNED - ATTRIBUTE_VARIANTS_DISABLED - DUPLICATED_INPUT_ITEM - GRAPHQL_ERROR - INVALID - PRODUCT_WITHOUT_CATEGORY - NOT_PRODUCTS_IMAGE - NOT_PRODUCTS_VARIANT - NOT_FOUND - REQUIRED - UNIQUE - VARIANT_NO_DIGITAL_CONTENT - CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT - PRODUCT_NOT_ASSIGNED_TO_CHANNEL - UNSUPPORTED_MEDIA_PROVIDER - PREORDER_VARIANT_CANNOT_BE_DEACTIVATED -} - -enum ProductFieldEnum { - NAME - DESCRIPTION - PRODUCT_TYPE - CATEGORY - PRODUCT_WEIGHT - COLLECTIONS - CHARGE_TAXES - PRODUCT_MEDIA - VARIANT_ID - VARIANT_SKU - VARIANT_WEIGHT - VARIANT_MEDIA -} - -input ProductFilterInput { - isPublished: Boolean - collections: [ID] - categories: [ID] - hasCategory: Boolean - attributes: [AttributeInput] - stockAvailability: StockAvailability - stocks: ProductStockFilterInput - search: String - metadata: [MetadataFilter] - price: PriceRangeInput - minimalPrice: PriceRangeInput - productTypes: [ID] - giftCard: Boolean - ids: [ID] - hasPreorderedVariants: Boolean - channel: String -} - -type ProductImage { - id: ID! - alt: String - sortOrder: Int - url(size: Int): String! -} - -input ProductInput { - attributes: [AttributeValueInput!] - category: ID - chargeTaxes: Boolean - collections: [ID!] - description: JSONString - name: String - slug: String - taxCode: String - seo: SeoInput - weight: WeightScalar - rating: Float -} - -type ProductMedia implements Node { - id: ID! - sortOrder: Int - alt: String! - type: ProductMediaType! - oembedData: JSONString! - url(size: Int): String! -} - -type ProductMediaBulkDelete { - count: Int! - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -type ProductMediaCreate { - product: Product - media: ProductMedia - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -input ProductMediaCreateInput { - alt: String - image: Upload - product: ID! - mediaUrl: String -} - -type ProductMediaDelete { - product: Product - media: ProductMedia - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -type ProductMediaReorder { - product: Product - media: [ProductMedia!] - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -enum ProductMediaType { - IMAGE - VIDEO -} - -type ProductMediaUpdate { - product: Product - media: ProductMedia - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -input ProductMediaUpdateInput { - alt: String -} - -input ProductOrder { - direction: OrderDirection! - channel: String - attributeId: ID - field: ProductOrderField -} - -enum ProductOrderField { - NAME - RANK - PRICE - MINIMAL_PRICE - DATE - TYPE - PUBLISHED - PUBLICATION_DATE - COLLECTION - RATING -} - -type ProductPricingInfo { - onSale: Boolean - discount: TaxedMoney - discountLocalCurrency: TaxedMoney - priceRange: TaxedMoneyRange - priceRangeUndiscounted: TaxedMoneyRange - priceRangeLocalCurrency: TaxedMoneyRange -} - -type ProductReorderAttributeValues { - product: Product - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -input ProductStockFilterInput { - warehouseIds: [ID!] - quantity: IntRangeInput -} - -type ProductTranslatableContent implements Node { - id: ID! - seoTitle: String - seoDescription: String - name: String! - description: JSONString - descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") - translation(languageCode: LanguageCodeEnum!): ProductTranslation - product: Product @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") - attributeValues: [AttributeValueTranslatableContent!]! -} - -type ProductTranslate { - translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [TranslationError!]! - product: Product -} - -type ProductTranslation implements Node { - id: ID! - language: LanguageDisplay! - seoTitle: String - seoDescription: String - name: String - description: JSONString - descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") -} - -type ProductType implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - name: String! - slug: String! - hasVariants: Boolean! - isShippingRequired: Boolean! - isDigital: Boolean! - weight: Weight - kind: ProductTypeKindEnum! - products(channel: String, before: String, after: String, first: Int, last: Int): ProductCountableConnection @deprecated(reason: "This field will be removed in Saleor 4.0. Use the top-level `products` query with the `productTypes` filter.") - taxType: TaxType - variantAttributes(variantSelection: VariantAttributeScope): [Attribute] @deprecated(reason: "This field will be removed in Saleor 4.0. Use `assignedVariantAttributes` instead.") - assignedVariantAttributes(variantSelection: VariantAttributeScope): [AssignedVariantAttribute] - productAttributes: [Attribute] - availableAttributes(filter: AttributeFilterInput, before: String, after: String, first: Int, last: Int): AttributeCountableConnection -} - -type ProductTypeBulkDelete { - count: Int! - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -enum ProductTypeConfigurable { - CONFIGURABLE - SIMPLE -} - -type ProductTypeCountableConnection { - pageInfo: PageInfo! - edges: [ProductTypeCountableEdge!]! - totalCount: Int -} - -type ProductTypeCountableEdge { - node: ProductType! - cursor: String! -} - -type ProductTypeCreate { - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! - productType: ProductType -} - -type ProductTypeDelete { - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! - productType: ProductType -} - -enum ProductTypeEnum { - DIGITAL - SHIPPABLE -} - -input ProductTypeFilterInput { - search: String - configurable: ProductTypeConfigurable - productType: ProductTypeEnum - metadata: [MetadataFilter] - kind: ProductTypeKindEnum - ids: [ID] -} - -input ProductTypeInput { - name: String - slug: String - kind: ProductTypeKindEnum - hasVariants: Boolean - productAttributes: [ID] - variantAttributes: [ID] - isShippingRequired: Boolean - isDigital: Boolean - weight: WeightScalar - taxCode: String -} - -enum ProductTypeKindEnum { - NORMAL - GIFT_CARD -} - -type ProductTypeReorderAttributes { - productType: ProductType - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -enum ProductTypeSortField { - NAME - DIGITAL - SHIPPING_REQUIRED -} - -input ProductTypeSortingInput { - direction: OrderDirection! - field: ProductTypeSortField! -} - -type ProductTypeUpdate { - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! - productType: ProductType -} - -type ProductUpdate { - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! - product: Product -} - -type ProductVariant implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - name: String! - sku: String - product: Product! - trackInventory: Boolean! - quantityLimitPerCustomer: Int - weight: Weight - channel: String - channelListings: [ProductVariantChannelListing!] - pricing(address: AddressInput): VariantPricingInfo - attributes(variantSelection: VariantAttributeScope): [SelectedAttribute!]! - margin: Int - quantityOrdered: Int - revenue(period: ReportingPeriod): TaxedMoney - images: [ProductImage] @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `media` field instead.") - media: [ProductMedia!] - translation(languageCode: LanguageCodeEnum!): ProductVariantTranslation - digitalContent: DigitalContent - stocks(address: AddressInput, countryCode: CountryCode): [Stock] - quantityAvailable(address: AddressInput, countryCode: CountryCode): Int - preorder: PreorderData -} - -type ProductVariantBulkCreate { - count: Int! - productVariants: [ProductVariant!]! - bulkProductErrors: [BulkProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [BulkProductError!]! -} - -input ProductVariantBulkCreateInput { - attributes: [BulkAttributeValueInput!]! - sku: String - trackInventory: Boolean - weight: WeightScalar - preorder: PreorderSettingsInput - quantityLimitPerCustomer: Int - stocks: [StockInput!] - channelListings: [ProductVariantChannelListingAddInput!] -} - -type ProductVariantBulkDelete { - count: Int! - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -type ProductVariantChannelListing implements Node { - id: ID! - channel: Channel! - price: Money - costPrice: Money - margin: Int - preorderThreshold: PreorderThreshold -} - -input ProductVariantChannelListingAddInput { - channelId: ID! - price: PositiveDecimal! - costPrice: PositiveDecimal - preorderThreshold: Int -} - -type ProductVariantChannelListingUpdate { - variant: ProductVariant - productChannelListingErrors: [ProductChannelListingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductChannelListingError!]! -} - -type ProductVariantCountableConnection { - pageInfo: PageInfo! - edges: [ProductVariantCountableEdge!]! - totalCount: Int -} - -type ProductVariantCountableEdge { - node: ProductVariant! - cursor: String! -} - -type ProductVariantCreate { - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! - productVariant: ProductVariant -} - -input ProductVariantCreateInput { - attributes: [AttributeValueInput!]! - sku: String - trackInventory: Boolean - weight: WeightScalar - preorder: PreorderSettingsInput - quantityLimitPerCustomer: Int - product: ID! - stocks: [StockInput!] -} - -type ProductVariantDelete { - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! - productVariant: ProductVariant -} - -input ProductVariantFilterInput { - search: String - sku: [String] - metadata: [MetadataFilter] - isPreorder: Boolean -} - -input ProductVariantInput { - attributes: [AttributeValueInput!] - sku: String - trackInventory: Boolean - weight: WeightScalar - preorder: PreorderSettingsInput - quantityLimitPerCustomer: Int -} - -type ProductVariantPreorderDeactivate { - productVariant: ProductVariant - errors: [ProductError!]! -} - -type ProductVariantReorder { - product: Product - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -type ProductVariantReorderAttributeValues { - productVariant: ProductVariant - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -type ProductVariantSetDefault { - product: Product - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -type ProductVariantStocksCreate { - productVariant: ProductVariant - bulkStockErrors: [BulkStockError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [BulkStockError!]! -} - -type ProductVariantStocksDelete { - productVariant: ProductVariant - stockErrors: [StockError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [StockError!]! -} - -type ProductVariantStocksUpdate { - productVariant: ProductVariant - bulkStockErrors: [BulkStockError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [BulkStockError!]! -} - -type ProductVariantTranslatableContent implements Node { - id: ID! - name: String! - translation(languageCode: LanguageCodeEnum!): ProductVariantTranslation - productVariant: ProductVariant @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") - attributeValues: [AttributeValueTranslatableContent!]! -} - -type ProductVariantTranslate { - translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [TranslationError!]! - productVariant: ProductVariant -} - -type ProductVariantTranslation implements Node { - id: ID! - language: LanguageDisplay! - name: String! -} - -type ProductVariantUpdate { - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! - productVariant: ProductVariant -} - -input PublishableChannelListingInput { - channelId: ID! - isPublished: Boolean - publicationDate: Date -} - -type Query { - webhook(id: ID!): Webhook - webhookEvents: [WebhookEvent] @deprecated(reason: "This field will be removed in Saleor 4.0. Use `WebhookEventTypeAsyncEnum` and `WebhookEventTypeSyncEnum` to get available event types.") - webhookSamplePayload(eventType: WebhookSampleEventTypeEnum!): JSONString - warehouse(id: ID!): Warehouse - warehouses(filter: WarehouseFilterInput, sortBy: WarehouseSortingInput, before: String, after: String, first: Int, last: Int): WarehouseCountableConnection - translations(kind: TranslatableKinds!, before: String, after: String, first: Int, last: Int): TranslatableItemConnection - translation(id: ID!, kind: TranslatableKinds!): TranslatableItem - stock(id: ID!): Stock - stocks(filter: StockFilterInput, before: String, after: String, first: Int, last: Int): StockCountableConnection - shop: Shop! - orderSettings: OrderSettings - giftCardSettings: GiftCardSettings! - shippingZone(id: ID!, channel: String): ShippingZone - shippingZones(filter: ShippingZoneFilterInput, channel: String, before: String, after: String, first: Int, last: Int): ShippingZoneCountableConnection - digitalContent(id: ID!): DigitalContent - digitalContents(before: String, after: String, first: Int, last: Int): DigitalContentCountableConnection - categories(filter: CategoryFilterInput, sortBy: CategorySortingInput, level: Int, before: String, after: String, first: Int, last: Int): CategoryCountableConnection - category(id: ID, slug: String): Category - collection(id: ID, slug: String, channel: String): Collection - collections(filter: CollectionFilterInput, sortBy: CollectionSortingInput, channel: String, before: String, after: String, first: Int, last: Int): CollectionCountableConnection - product(id: ID, slug: String, channel: String): Product - products(filter: ProductFilterInput, sortBy: ProductOrder, channel: String, before: String, after: String, first: Int, last: Int): ProductCountableConnection - productType(id: ID!): ProductType - productTypes(filter: ProductTypeFilterInput, sortBy: ProductTypeSortingInput, before: String, after: String, first: Int, last: Int): ProductTypeCountableConnection - productVariant(id: ID, sku: String, channel: String): ProductVariant - productVariants(ids: [ID], channel: String, filter: ProductVariantFilterInput, before: String, after: String, first: Int, last: Int): ProductVariantCountableConnection - reportProductSales(period: ReportingPeriod!, channel: String!, before: String, after: String, first: Int, last: Int): ProductVariantCountableConnection - payment(id: ID!): Payment - payments(filter: PaymentFilterInput, before: String, after: String, first: Int, last: Int): PaymentCountableConnection - page(id: ID, slug: String): Page - pages(sortBy: PageSortingInput, filter: PageFilterInput, before: String, after: String, first: Int, last: Int): PageCountableConnection - pageType(id: ID!): PageType - pageTypes(sortBy: PageTypeSortingInput, filter: PageTypeFilterInput, before: String, after: String, first: Int, last: Int): PageTypeCountableConnection - homepageEvents(before: String, after: String, first: Int, last: Int): OrderEventCountableConnection - order(id: ID!): Order - orders(sortBy: OrderSortingInput, filter: OrderFilterInput, channel: String, before: String, after: String, first: Int, last: Int): OrderCountableConnection - draftOrders(sortBy: OrderSortingInput, filter: OrderDraftFilterInput, before: String, after: String, first: Int, last: Int): OrderCountableConnection - ordersTotal(period: ReportingPeriod, channel: String): TaxedMoney - orderByToken(token: UUID!): Order - menu(channel: String, id: ID, name: String, slug: String): Menu - menus(channel: String, sortBy: MenuSortingInput, filter: MenuFilterInput, before: String, after: String, first: Int, last: Int): MenuCountableConnection - menuItem(id: ID!, channel: String): MenuItem - menuItems(channel: String, sortBy: MenuItemSortingInput, filter: MenuItemFilterInput, before: String, after: String, first: Int, last: Int): MenuItemCountableConnection - giftCard(id: ID!): GiftCard - giftCards(sortBy: GiftCardSortingInput, filter: GiftCardFilterInput, before: String, after: String, first: Int, last: Int): GiftCardCountableConnection - giftCardCurrencies: [String!]! - giftCardTags(filter: GiftCardTagFilterInput, before: String, after: String, first: Int, last: Int): GiftCardTagCountableConnection - plugin(id: ID!): Plugin - plugins(filter: PluginFilterInput, sortBy: PluginSortingInput, before: String, after: String, first: Int, last: Int): PluginCountableConnection - sale(id: ID!, channel: String): Sale - sales(filter: SaleFilterInput, sortBy: SaleSortingInput, query: String, channel: String, before: String, after: String, first: Int, last: Int): SaleCountableConnection - voucher(id: ID!, channel: String): Voucher - vouchers(filter: VoucherFilterInput, sortBy: VoucherSortingInput, query: String, channel: String, before: String, after: String, first: Int, last: Int): VoucherCountableConnection - exportFile(id: ID!): ExportFile - exportFiles(filter: ExportFileFilterInput, sortBy: ExportFileSortingInput, before: String, after: String, first: Int, last: Int): ExportFileCountableConnection - taxTypes: [TaxType] - checkout(token: UUID): Checkout - checkouts(sortBy: CheckoutSortingInput, filter: CheckoutFilterInput, channel: String, before: String, after: String, first: Int, last: Int): CheckoutCountableConnection - checkoutLines(before: String, after: String, first: Int, last: Int): CheckoutLineCountableConnection - channel(id: ID): Channel - channels: [Channel!] - attributes(filter: AttributeFilterInput, sortBy: AttributeSortingInput, channel: String, before: String, after: String, first: Int, last: Int): AttributeCountableConnection - attribute(id: ID, slug: String): Attribute - appsInstallations: [AppInstallation!]! - apps(filter: AppFilterInput, sortBy: AppSortingInput, before: String, after: String, first: Int, last: Int): AppCountableConnection - app(id: ID): App - appExtensions(filter: AppExtensionFilterInput, before: String, after: String, first: Int, last: Int): AppExtensionCountableConnection - appExtension(id: ID!): AppExtension - addressValidationRules(countryCode: CountryCode!, countryArea: String, city: String, cityArea: String): AddressValidationData - address(id: ID!): Address - customers(filter: CustomerFilterInput, sortBy: UserSortingInput, before: String, after: String, first: Int, last: Int): UserCountableConnection - permissionGroups(filter: PermissionGroupFilterInput, sortBy: PermissionGroupSortingInput, before: String, after: String, first: Int, last: Int): GroupCountableConnection - permissionGroup(id: ID!): Group - me: User - staffUsers(filter: StaffUserInput, sortBy: UserSortingInput, before: String, after: String, first: Int, last: Int): UserCountableConnection - user(id: ID, email: String): User - _entities(representations: [_Any]): [_Entity] - _service: _Service -} - -type ReducedRate { - rate: Float! - rateType: String! -} - -type RefreshToken { - token: String - user: User - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -input ReorderInput { - id: ID! - sortOrder: Int -} - -enum ReportingPeriod { - TODAY - THIS_MONTH -} - -type RequestEmailChange { - user: User - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -type RequestPasswordReset { - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -type Sale implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - name: String! - type: SaleType! - startDate: DateTime! - endDate: DateTime - categories(before: String, after: String, first: Int, last: Int): CategoryCountableConnection - collections(before: String, after: String, first: Int, last: Int): CollectionCountableConnection - products(before: String, after: String, first: Int, last: Int): ProductCountableConnection - variants(before: String, after: String, first: Int, last: Int): ProductVariantCountableConnection - translation(languageCode: LanguageCodeEnum!): SaleTranslation - channelListings: [SaleChannelListing!] - discountValue: Float - currency: String -} - -type SaleAddCatalogues { - sale: Sale - discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [DiscountError!]! -} - -type SaleBulkDelete { - count: Int! - discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [DiscountError!]! -} - -type SaleChannelListing implements Node { - id: ID! - channel: Channel! - discountValue: Float! - currency: String! -} - -input SaleChannelListingAddInput { - channelId: ID! - discountValue: PositiveDecimal! -} - -input SaleChannelListingInput { - addChannels: [SaleChannelListingAddInput!] - removeChannels: [ID!] -} - -type SaleChannelListingUpdate { - sale: Sale - discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [DiscountError!]! -} - -type SaleCountableConnection { - pageInfo: PageInfo! - edges: [SaleCountableEdge!]! - totalCount: Int -} - -type SaleCountableEdge { - node: Sale! - cursor: String! -} - -type SaleCreate { - discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [DiscountError!]! - sale: Sale -} - -type SaleDelete { - discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [DiscountError!]! - sale: Sale -} - -input SaleFilterInput { - status: [DiscountStatusEnum] - saleType: DiscountValueTypeEnum - started: DateTimeRangeInput - search: String - metadata: [MetadataFilter] -} - -input SaleInput { - name: String - type: DiscountValueTypeEnum - value: PositiveDecimal - products: [ID] - variants: [ID] - categories: [ID] - collections: [ID] - startDate: DateTime - endDate: DateTime -} - -type SaleRemoveCatalogues { - sale: Sale - discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [DiscountError!]! -} - -enum SaleSortField { - NAME - START_DATE - END_DATE - VALUE - TYPE -} - -input SaleSortingInput { - direction: OrderDirection! - channel: String - field: SaleSortField! -} - -type SaleTranslatableContent implements Node { - id: ID! - name: String! - translation(languageCode: LanguageCodeEnum!): SaleTranslation - sale: Sale @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") -} - -type SaleTranslate { - translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [TranslationError!]! - sale: Sale -} - -type SaleTranslation implements Node { - id: ID! - language: LanguageDisplay! - name: String -} - -enum SaleType { - FIXED - PERCENTAGE -} - -type SaleUpdate { - discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [DiscountError!]! - sale: Sale -} - -type SelectedAttribute { - attribute: Attribute! - values: [AttributeValue]! -} - -input SeoInput { - title: String - description: String -} - -type SetPassword { - token: String - refreshToken: String - csrfToken: String - user: User - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -type ShippingError { - field: String - message: String - code: ShippingErrorCode! - warehouses: [ID!] - channels: [ID!] -} - -enum ShippingErrorCode { - ALREADY_EXISTS - GRAPHQL_ERROR - INVALID - MAX_LESS_THAN_MIN - NOT_FOUND - REQUIRED - UNIQUE - DUPLICATED_INPUT_ITEM -} - -type ShippingMethod implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - type: ShippingMethodTypeEnum @deprecated(reason: "This field will be removed in Saleor 4.0.") - name: String! - description: JSONString - maximumDeliveryDays: Int - minimumDeliveryDays: Int - maximumOrderWeight: Weight @deprecated(reason: "This field will be removed in Saleor 4.0.") - minimumOrderWeight: Weight @deprecated(reason: "This field will be removed in Saleor 4.0.") - translation(languageCode: LanguageCodeEnum!): ShippingMethodTranslation - price: Money! - maximumOrderPrice: Money - minimumOrderPrice: Money - active: Boolean! - message: String -} - -type ShippingMethodChannelListing implements Node { - id: ID! - channel: Channel! - maximumOrderPrice: Money - minimumOrderPrice: Money - price: Money -} - -input ShippingMethodChannelListingAddInput { - channelId: ID! - price: PositiveDecimal - minimumOrderPrice: PositiveDecimal - maximumOrderPrice: PositiveDecimal -} - -input ShippingMethodChannelListingInput { - addChannels: [ShippingMethodChannelListingAddInput!] - removeChannels: [ID!] -} - -type ShippingMethodChannelListingUpdate { - shippingMethod: ShippingMethodType - shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ShippingError!]! -} - -type ShippingMethodPostalCodeRule implements Node { - id: ID! - start: String - end: String - inclusionType: PostalCodeRuleInclusionTypeEnum -} - -type ShippingMethodTranslatableContent implements Node { - id: ID! - name: String! - description: JSONString - translation(languageCode: LanguageCodeEnum!): ShippingMethodTranslation - shippingMethod: ShippingMethodType @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") -} - -type ShippingMethodTranslation implements Node { - id: ID! - language: LanguageDisplay! - name: String - description: JSONString -} - -type ShippingMethodType implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - name: String! - description: JSONString - type: ShippingMethodTypeEnum - translation(languageCode: LanguageCodeEnum!): ShippingMethodTranslation - channelListings: [ShippingMethodChannelListing!] - maximumOrderPrice: Money - minimumOrderPrice: Money - postalCodeRules: [ShippingMethodPostalCodeRule] - excludedProducts(before: String, after: String, first: Int, last: Int): ProductCountableConnection - minimumOrderWeight: Weight - maximumOrderWeight: Weight - maximumDeliveryDays: Int - minimumDeliveryDays: Int -} - -enum ShippingMethodTypeEnum { - PRICE - WEIGHT -} - -input ShippingPostalCodeRulesCreateInputRange { - start: String! - end: String -} - -type ShippingPriceBulkDelete { - count: Int! - shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ShippingError!]! -} - -type ShippingPriceCreate { - shippingZone: ShippingZone - shippingMethod: ShippingMethodType - shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ShippingError!]! -} - -type ShippingPriceDelete { - shippingMethod: ShippingMethodType - shippingZone: ShippingZone - shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ShippingError!]! -} - -type ShippingPriceExcludeProducts { - shippingMethod: ShippingMethodType - shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ShippingError!]! -} - -input ShippingPriceExcludeProductsInput { - products: [ID]! -} - -input ShippingPriceInput { - name: String - description: JSONString - minimumOrderWeight: WeightScalar - maximumOrderWeight: WeightScalar - maximumDeliveryDays: Int - minimumDeliveryDays: Int - type: ShippingMethodTypeEnum - shippingZone: ID - addPostalCodeRules: [ShippingPostalCodeRulesCreateInputRange!] - deletePostalCodeRules: [ID!] - inclusionType: PostalCodeRuleInclusionTypeEnum -} - -type ShippingPriceRemoveProductFromExclude { - shippingMethod: ShippingMethodType - shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ShippingError!]! -} - -type ShippingPriceTranslate { - translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [TranslationError!]! - shippingMethod: ShippingMethodType -} - -input ShippingPriceTranslationInput { - name: String - description: JSONString -} - -type ShippingPriceUpdate { - shippingZone: ShippingZone - shippingMethod: ShippingMethodType - shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ShippingError!]! -} - -type ShippingZone implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - name: String! - default: Boolean! - priceRange: MoneyRange - countries: [CountryDisplay] - shippingMethods: [ShippingMethodType] - warehouses: [Warehouse!]! - channels: [Channel!]! - description: String -} - -type ShippingZoneBulkDelete { - count: Int! - shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ShippingError!]! -} - -type ShippingZoneCountableConnection { - pageInfo: PageInfo! - edges: [ShippingZoneCountableEdge!]! - totalCount: Int -} - -type ShippingZoneCountableEdge { - node: ShippingZone! - cursor: String! -} - -type ShippingZoneCreate { - shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ShippingError!]! - shippingZone: ShippingZone -} - -input ShippingZoneCreateInput { - name: String - description: String - countries: [String] - default: Boolean - addWarehouses: [ID] - addChannels: [ID!] -} - -type ShippingZoneDelete { - shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ShippingError!]! - shippingZone: ShippingZone -} - -input ShippingZoneFilterInput { - search: String - channels: [ID] -} - -type ShippingZoneUpdate { - shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ShippingError!]! - shippingZone: ShippingZone -} - -input ShippingZoneUpdateInput { - name: String - description: String - countries: [String] - default: Boolean - addWarehouses: [ID] - addChannels: [ID!] - removeWarehouses: [ID] - removeChannels: [ID!] -} - -type Shop { - availablePaymentGateways(currency: String, channel: String): [PaymentGateway!]! - availableExternalAuthentications: [ExternalAuthentication!]! - availableShippingMethods(channel: String!, address: AddressInput): [ShippingMethod] - channelCurrencies: [String!]! - countries(languageCode: LanguageCodeEnum, filter: CountryFilterInput): [CountryDisplay!]! - defaultCountry: CountryDisplay - defaultMailSenderName: String - defaultMailSenderAddress: String - description: String - domain: Domain! - languages: [LanguageDisplay]! - name: String! - permissions: [Permission]! - phonePrefixes: [String]! - headerText: String - includeTaxesInPrices: Boolean! - fulfillmentAutoApprove: Boolean! - fulfillmentAllowUnpaid: Boolean! - displayGrossPrices: Boolean! - chargeTaxesOnShipping: Boolean! - trackInventoryByDefault: Boolean - defaultWeightUnit: WeightUnitsEnum - translation(languageCode: LanguageCodeEnum!): ShopTranslation - automaticFulfillmentDigitalProducts: Boolean - reserveStockDurationAnonymousUser: Int - reserveStockDurationAuthenticatedUser: Int - limitQuantityPerCheckout: Int - defaultDigitalMaxDownloads: Int - defaultDigitalUrlValidDays: Int - companyAddress: Address - customerSetPasswordUrl: String - staffNotificationRecipients: [StaffNotificationRecipient] - limits: LimitInfo! - version: String! -} - -type ShopAddressUpdate { - shop: Shop - shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ShopError!]! -} - -type ShopDomainUpdate { - shop: Shop - shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ShopError!]! -} - -type ShopError { - field: String - message: String - code: ShopErrorCode! -} - -enum ShopErrorCode { - ALREADY_EXISTS - CANNOT_FETCH_TAX_RATES - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE -} - -type ShopFetchTaxRates { - shop: Shop - shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ShopError!]! -} - -input ShopSettingsInput { - headerText: String - description: String - includeTaxesInPrices: Boolean - displayGrossPrices: Boolean - chargeTaxesOnShipping: Boolean - trackInventoryByDefault: Boolean - defaultWeightUnit: WeightUnitsEnum - automaticFulfillmentDigitalProducts: Boolean - fulfillmentAutoApprove: Boolean - fulfillmentAllowUnpaid: Boolean - defaultDigitalMaxDownloads: Int - defaultDigitalUrlValidDays: Int - defaultMailSenderName: String - defaultMailSenderAddress: String - customerSetPasswordUrl: String - reserveStockDurationAnonymousUser: Int - reserveStockDurationAuthenticatedUser: Int - limitQuantityPerCheckout: Int -} - -type ShopSettingsTranslate { - shop: Shop - translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [TranslationError!]! -} - -input ShopSettingsTranslationInput { - headerText: String - description: String -} - -type ShopSettingsUpdate { - shop: Shop - shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ShopError!]! -} - -type ShopTranslation implements Node { - id: ID! - language: LanguageDisplay! - headerText: String! - description: String! -} - -input SiteDomainInput { - domain: String - name: String -} - -type StaffBulkDelete { - count: Int! - staffErrors: [StaffError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [StaffError!]! -} - -type StaffCreate { - staffErrors: [StaffError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [StaffError!]! - user: User -} - -input StaffCreateInput { - firstName: String - lastName: String - email: String - isActive: Boolean - note: String - addGroups: [ID!] - redirectUrl: String -} - -type StaffDelete { - staffErrors: [StaffError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [StaffError!]! - user: User -} - -type StaffError { - field: String - message: String - code: AccountErrorCode! - addressType: AddressTypeEnum - permissions: [PermissionEnum!] - groups: [ID!] - users: [ID!] -} - -enum StaffMemberStatus { - ACTIVE - DEACTIVATED -} - -type StaffNotificationRecipient implements Node { - id: ID! - user: User - email: String - active: Boolean -} - -type StaffNotificationRecipientCreate { - shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ShopError!]! - staffNotificationRecipient: StaffNotificationRecipient -} - -type StaffNotificationRecipientDelete { - shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ShopError!]! - staffNotificationRecipient: StaffNotificationRecipient -} - -input StaffNotificationRecipientInput { - user: ID - email: String - active: Boolean -} - -type StaffNotificationRecipientUpdate { - shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ShopError!]! - staffNotificationRecipient: StaffNotificationRecipient -} - -type StaffUpdate { - staffErrors: [StaffError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [StaffError!]! - user: User -} - -input StaffUpdateInput { - firstName: String - lastName: String - email: String - isActive: Boolean - note: String - addGroups: [ID!] - removeGroups: [ID!] -} - -input StaffUserInput { - status: StaffMemberStatus - search: String -} - -type Stock implements Node { - id: ID! - warehouse: Warehouse! - productVariant: ProductVariant! - quantity: Int! - quantityAllocated: Int! - quantityReserved: Int! -} - -enum StockAvailability { - IN_STOCK - OUT_OF_STOCK -} - -type StockCountableConnection { - pageInfo: PageInfo! - edges: [StockCountableEdge!]! - totalCount: Int -} - -type StockCountableEdge { - node: Stock! - cursor: String! -} - -type StockError { - field: String - message: String - code: StockErrorCode! -} - -enum StockErrorCode { - ALREADY_EXISTS - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE -} - -input StockFilterInput { - quantity: Float - search: String -} - -input StockInput { - warehouse: ID! - quantity: Int! -} - -enum StorePaymentMethodEnum { - ON_SESSION - OFF_SESSION - NONE -} - -type TaxType { - description: String - taxCode: String -} - -type TaxedMoney { - currency: String! - gross: Money! - net: Money! - tax: Money! -} - -type TaxedMoneyRange { - start: TaxedMoney - stop: TaxedMoney -} - -type TimePeriod { - amount: Int! - type: TimePeriodTypeEnum! -} - -input TimePeriodInputType { - amount: Int! - type: TimePeriodTypeEnum! -} - -enum TimePeriodTypeEnum { - DAY - WEEK - MONTH - YEAR -} - -type Transaction implements Node { - id: ID! - created: DateTime! - payment: Payment! - token: String! - kind: TransactionKind! - isSuccess: Boolean! - error: String - gatewayResponse: JSONString! - amount: Money -} - -enum TransactionKind { - EXTERNAL - AUTH - PENDING - ACTION_TO_CONFIRM - REFUND - REFUND_ONGOING - CAPTURE - VOID - CONFIRM - CANCEL -} - -union TranslatableItem = ProductTranslatableContent | CollectionTranslatableContent | CategoryTranslatableContent | AttributeTranslatableContent | AttributeValueTranslatableContent | ProductVariantTranslatableContent | PageTranslatableContent | ShippingMethodTranslatableContent | SaleTranslatableContent | VoucherTranslatableContent | MenuItemTranslatableContent - -type TranslatableItemConnection { - pageInfo: PageInfo! - edges: [TranslatableItemEdge!]! - totalCount: Int -} - -type TranslatableItemEdge { - node: TranslatableItem! - cursor: String! -} - -enum TranslatableKinds { - ATTRIBUTE - ATTRIBUTE_VALUE - CATEGORY - COLLECTION - MENU_ITEM - PAGE - PRODUCT - SALE - SHIPPING_METHOD - VARIANT - VOUCHER -} - -type TranslationError { - field: String - message: String - code: TranslationErrorCode! -} - -enum TranslationErrorCode { - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED -} - -input TranslationInput { - seoTitle: String - seoDescription: String - name: String - description: JSONString -} - -scalar UUID - -input UpdateInvoiceInput { - number: String - url: String -} - -type UpdateMetadata { - metadataErrors: [MetadataError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [MetadataError!]! - item: ObjectWithMetadata -} - -type UpdatePrivateMetadata { - metadataErrors: [MetadataError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [MetadataError!]! - item: ObjectWithMetadata -} - -scalar Upload - -type UploadError { - field: String - message: String - code: UploadErrorCode! -} - -enum UploadErrorCode { - GRAPHQL_ERROR -} - -type User implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - email: String! - firstName: String! - lastName: String! - isStaff: Boolean! - isActive: Boolean! - addresses: [Address] - checkout: Checkout @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `checkout_tokens` field to fetch the user checkouts.") - checkoutTokens(channel: String): [UUID!] - giftCards(before: String, after: String, first: Int, last: Int): GiftCardCountableConnection - note: String - orders(before: String, after: String, first: Int, last: Int): OrderCountableConnection - userPermissions: [UserPermission] - permissionGroups: [Group] - editableGroups: [Group] - avatar(size: Int): Image - events: [CustomerEvent] - storedPaymentSources(channel: String): [PaymentSource] - languageCode: LanguageCodeEnum! - defaultShippingAddress: Address - defaultBillingAddress: Address - lastLogin: DateTime - dateJoined: DateTime! -} - -type UserAvatarDelete { - user: User - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -type UserAvatarUpdate { - user: User - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -type UserBulkSetActive { - count: Int! - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -type UserCountableConnection { - pageInfo: PageInfo! - edges: [UserCountableEdge!]! - totalCount: Int -} - -type UserCountableEdge { - node: User! - cursor: String! -} - -input UserCreateInput { - defaultBillingAddress: AddressInput - defaultShippingAddress: AddressInput - firstName: String - lastName: String - email: String - isActive: Boolean - note: String - languageCode: LanguageCodeEnum - redirectUrl: String - channel: String -} - -type UserPermission { - code: PermissionEnum! - name: String! - sourcePermissionGroups(userId: ID!): [Group!] -} - -enum UserSortField { - FIRST_NAME - LAST_NAME - EMAIL - ORDER_COUNT -} - -input UserSortingInput { - direction: OrderDirection! - field: UserSortField! -} - -type VAT { - countryCode: String! - standardRate: Float - reducedRates: [ReducedRate]! -} - -enum VariantAttributeScope { - ALL - VARIANT_SELECTION - NOT_VARIANT_SELECTION -} - -type VariantMediaAssign { - productVariant: ProductVariant - media: ProductMedia - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -type VariantMediaUnassign { - productVariant: ProductVariant - media: ProductMedia - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! -} - -type VariantPricingInfo { - onSale: Boolean - discount: TaxedMoney - discountLocalCurrency: TaxedMoney - price: TaxedMoney - priceUndiscounted: TaxedMoney - priceLocalCurrency: TaxedMoney -} - -type VerifyToken { - user: User - isValid: Boolean! - payload: GenericScalar - accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [AccountError!]! -} - -enum VolumeUnitsEnum { - CUBIC_MILLIMETER - CUBIC_CENTIMETER - CUBIC_DECIMETER - CUBIC_METER - LITER - CUBIC_FOOT - CUBIC_INCH - CUBIC_YARD - QT - PINT - FL_OZ - ACRE_IN - ACRE_FT -} - -type Voucher implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - name: String - code: String! - usageLimit: Int - used: Int! - startDate: DateTime! - endDate: DateTime - applyOncePerOrder: Boolean! - applyOncePerCustomer: Boolean! - onlyForStaff: Boolean! - minCheckoutItemsQuantity: Int - categories(before: String, after: String, first: Int, last: Int): CategoryCountableConnection - collections(before: String, after: String, first: Int, last: Int): CollectionCountableConnection - products(before: String, after: String, first: Int, last: Int): ProductCountableConnection - variants(before: String, after: String, first: Int, last: Int): ProductVariantCountableConnection - countries: [CountryDisplay] - translation(languageCode: LanguageCodeEnum!): VoucherTranslation - discountValueType: DiscountValueTypeEnum! - discountValue: Float - currency: String - minSpent: Money - type: VoucherTypeEnum! - channelListings: [VoucherChannelListing!] -} - -type VoucherAddCatalogues { - voucher: Voucher - discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [DiscountError!]! -} - -type VoucherBulkDelete { - count: Int! - discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [DiscountError!]! -} - -type VoucherChannelListing implements Node { - id: ID! - channel: Channel! - discountValue: Float! - currency: String! - minSpent: Money -} - -input VoucherChannelListingAddInput { - channelId: ID! - discountValue: PositiveDecimal - minAmountSpent: PositiveDecimal -} - -input VoucherChannelListingInput { - addChannels: [VoucherChannelListingAddInput!] - removeChannels: [ID!] -} - -type VoucherChannelListingUpdate { - voucher: Voucher - discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [DiscountError!]! -} - -type VoucherCountableConnection { - pageInfo: PageInfo! - edges: [VoucherCountableEdge!]! - totalCount: Int -} - -type VoucherCountableEdge { - node: Voucher! - cursor: String! -} - -type VoucherCreate { - discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [DiscountError!]! - voucher: Voucher -} - -type VoucherDelete { - discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [DiscountError!]! - voucher: Voucher -} - -enum VoucherDiscountType { - FIXED - PERCENTAGE - SHIPPING -} - -input VoucherFilterInput { - status: [DiscountStatusEnum] - timesUsed: IntRangeInput - discountType: [VoucherDiscountType] - started: DateTimeRangeInput - search: String - metadata: [MetadataFilter] -} - -input VoucherInput { - type: VoucherTypeEnum - name: String - code: String - startDate: DateTime - endDate: DateTime - discountValueType: DiscountValueTypeEnum - products: [ID] - variants: [ID] - collections: [ID] - categories: [ID] - minCheckoutItemsQuantity: Int - countries: [String] - applyOncePerOrder: Boolean - applyOncePerCustomer: Boolean - onlyForStaff: Boolean - usageLimit: Int -} - -type VoucherRemoveCatalogues { - voucher: Voucher - discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [DiscountError!]! -} - -enum VoucherSortField { - CODE - START_DATE - END_DATE - VALUE - TYPE - USAGE_LIMIT - MINIMUM_SPENT_AMOUNT -} - -input VoucherSortingInput { - direction: OrderDirection! - channel: String - field: VoucherSortField! -} - -type VoucherTranslatableContent implements Node { - id: ID! - name: String - translation(languageCode: LanguageCodeEnum!): VoucherTranslation - voucher: Voucher @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") -} - -type VoucherTranslate { - translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [TranslationError!]! - voucher: Voucher -} - -type VoucherTranslation implements Node { - id: ID! - language: LanguageDisplay! - name: String -} - -enum VoucherTypeEnum { - SHIPPING - ENTIRE_ORDER - SPECIFIC_PRODUCT -} - -type VoucherUpdate { - discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [DiscountError!]! - voucher: Voucher -} - -type Warehouse implements Node & ObjectWithMetadata { - id: ID! - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! - name: String! - slug: String! - email: String! - isPrivate: Boolean! - address: Address! - companyName: String! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `Address.companyName` instead.") - clickAndCollectOption: WarehouseClickAndCollectOptionEnum! - shippingZones(before: String, after: String, first: Int, last: Int): ShippingZoneCountableConnection! -} - -enum WarehouseClickAndCollectOptionEnum { - DISABLED - LOCAL - ALL -} - -type WarehouseCountableConnection { - pageInfo: PageInfo! - edges: [WarehouseCountableEdge!]! - totalCount: Int -} - -type WarehouseCountableEdge { - node: Warehouse! - cursor: String! -} - -type WarehouseCreate { - warehouseErrors: [WarehouseError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [WarehouseError!]! - warehouse: Warehouse -} - -input WarehouseCreateInput { - slug: String - email: String - name: String! - address: AddressInput! - shippingZones: [ID] -} - -type WarehouseDelete { - warehouseErrors: [WarehouseError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [WarehouseError!]! - warehouse: Warehouse -} - -type WarehouseError { - field: String - message: String - code: WarehouseErrorCode! -} - -enum WarehouseErrorCode { - ALREADY_EXISTS - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE -} - -input WarehouseFilterInput { - clickAndCollectOption: WarehouseClickAndCollectOptionEnum - search: String - ids: [ID] - isPrivate: Boolean -} - -type WarehouseShippingZoneAssign { - warehouseErrors: [WarehouseError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [WarehouseError!]! - warehouse: Warehouse -} - -type WarehouseShippingZoneUnassign { - warehouseErrors: [WarehouseError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [WarehouseError!]! - warehouse: Warehouse -} - -enum WarehouseSortField { - NAME -} - -input WarehouseSortingInput { - direction: OrderDirection! - field: WarehouseSortField! -} - -type WarehouseUpdate { - warehouseErrors: [WarehouseError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [WarehouseError!]! - warehouse: Warehouse -} - -input WarehouseUpdateInput { - slug: String - email: String - name: String - address: AddressInput - clickAndCollectOption: WarehouseClickAndCollectOptionEnum - isPrivate: Boolean -} - -type Webhook implements Node { - id: ID! - name: String! - events: [WebhookEvent!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `asyncEvents` or `syncEvents` instead.") - syncEvents: [WebhookEventSync!]! - asyncEvents: [WebhookEventAsync!]! - app: App! - eventDeliveries(sortBy: EventDeliverySortingInput, filter: EventDeliveryFilterInput, before: String, after: String, first: Int, last: Int): EventDeliveryCountableConnection - targetUrl: String! - isActive: Boolean! - secretKey: String -} - -type WebhookCreate { - webhookErrors: [WebhookError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [WebhookError!]! - webhook: Webhook -} - -input WebhookCreateInput { - name: String - targetUrl: String - events: [WebhookEventTypeEnum] - asyncEvents: [WebhookEventTypeAsyncEnum!] - syncEvents: [WebhookEventTypeSyncEnum!] - app: ID - isActive: Boolean - secretKey: String -} - -type WebhookDelete { - webhookErrors: [WebhookError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [WebhookError!]! - webhook: Webhook -} - -type WebhookError { - field: String - message: String - code: WebhookErrorCode! -} - -enum WebhookErrorCode { - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE -} - -type WebhookEvent { - name: String! - eventType: WebhookEventTypeEnum! -} - -type WebhookEventAsync { - name: String! - eventType: WebhookEventTypeAsyncEnum! -} - -type WebhookEventSync { - name: String! - eventType: WebhookEventTypeSyncEnum! -} - -enum WebhookEventTypeAsyncEnum { - ANY_EVENTS - ORDER_CREATED - ORDER_CONFIRMED - ORDER_FULLY_PAID - ORDER_UPDATED - ORDER_CANCELLED - ORDER_FULFILLED - DRAFT_ORDER_CREATED - DRAFT_ORDER_UPDATED - DRAFT_ORDER_DELETED - SALE_CREATED - SALE_UPDATED - SALE_DELETED - INVOICE_REQUESTED - INVOICE_DELETED - INVOICE_SENT - CUSTOMER_CREATED - CUSTOMER_UPDATED - COLLECTION_CREATED - COLLECTION_UPDATED - COLLECTION_DELETED - PRODUCT_CREATED - PRODUCT_UPDATED - PRODUCT_DELETED - PRODUCT_VARIANT_CREATED - PRODUCT_VARIANT_UPDATED - PRODUCT_VARIANT_DELETED - PRODUCT_VARIANT_OUT_OF_STOCK - PRODUCT_VARIANT_BACK_IN_STOCK - CHECKOUT_CREATED - CHECKOUT_UPDATED - FULFILLMENT_CREATED - FULFILLMENT_CANCELED - NOTIFY_USER - PAGE_CREATED - PAGE_UPDATED - PAGE_DELETED - TRANSLATION_CREATED - TRANSLATION_UPDATED -} - -enum WebhookEventTypeEnum { - ANY_EVENTS - ORDER_CREATED - ORDER_CONFIRMED - ORDER_FULLY_PAID - ORDER_UPDATED - ORDER_CANCELLED - ORDER_FULFILLED - DRAFT_ORDER_CREATED - DRAFT_ORDER_UPDATED - DRAFT_ORDER_DELETED - SALE_CREATED - SALE_UPDATED - SALE_DELETED - INVOICE_REQUESTED - INVOICE_DELETED - INVOICE_SENT - CUSTOMER_CREATED - CUSTOMER_UPDATED - COLLECTION_CREATED - COLLECTION_UPDATED - COLLECTION_DELETED - PRODUCT_CREATED - PRODUCT_UPDATED - PRODUCT_DELETED - PRODUCT_VARIANT_CREATED - PRODUCT_VARIANT_UPDATED - PRODUCT_VARIANT_DELETED - PRODUCT_VARIANT_OUT_OF_STOCK - PRODUCT_VARIANT_BACK_IN_STOCK - CHECKOUT_CREATED - CHECKOUT_UPDATED - FULFILLMENT_CREATED - FULFILLMENT_CANCELED - NOTIFY_USER - PAGE_CREATED - PAGE_UPDATED - PAGE_DELETED - TRANSLATION_CREATED - TRANSLATION_UPDATED - PAYMENT_AUTHORIZE - PAYMENT_CAPTURE - PAYMENT_CONFIRM - PAYMENT_LIST_GATEWAYS - PAYMENT_PROCESS - PAYMENT_REFUND - PAYMENT_VOID - SHIPPING_LIST_METHODS_FOR_CHECKOUT -} - -enum WebhookEventTypeSyncEnum { - PAYMENT_AUTHORIZE - PAYMENT_CAPTURE - PAYMENT_CONFIRM - PAYMENT_LIST_GATEWAYS - PAYMENT_PROCESS - PAYMENT_REFUND - PAYMENT_VOID - SHIPPING_LIST_METHODS_FOR_CHECKOUT -} - -enum WebhookSampleEventTypeEnum { - ORDER_CREATED - ORDER_CONFIRMED - ORDER_FULLY_PAID - ORDER_UPDATED - ORDER_CANCELLED - ORDER_FULFILLED - DRAFT_ORDER_CREATED - DRAFT_ORDER_UPDATED - DRAFT_ORDER_DELETED - SALE_CREATED - SALE_UPDATED - SALE_DELETED - INVOICE_REQUESTED - INVOICE_DELETED - INVOICE_SENT - CUSTOMER_CREATED - CUSTOMER_UPDATED - COLLECTION_CREATED - COLLECTION_UPDATED - COLLECTION_DELETED - PRODUCT_CREATED - PRODUCT_UPDATED - PRODUCT_DELETED - PRODUCT_VARIANT_CREATED - PRODUCT_VARIANT_UPDATED - PRODUCT_VARIANT_DELETED - PRODUCT_VARIANT_OUT_OF_STOCK - PRODUCT_VARIANT_BACK_IN_STOCK - CHECKOUT_CREATED - CHECKOUT_UPDATED - FULFILLMENT_CREATED - FULFILLMENT_CANCELED - NOTIFY_USER - PAGE_CREATED - PAGE_UPDATED - PAGE_DELETED - TRANSLATION_CREATED - TRANSLATION_UPDATED -} - -type WebhookUpdate { - webhookErrors: [WebhookError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [WebhookError!]! - webhook: Webhook -} - -input WebhookUpdateInput { - name: String - targetUrl: String - events: [WebhookEventTypeEnum] - asyncEvents: [WebhookEventTypeAsyncEnum!] - syncEvents: [WebhookEventTypeSyncEnum!] - app: ID - isActive: Boolean - secretKey: String -} - -type Weight { - unit: WeightUnitsEnum! - value: Float! -} - -scalar WeightScalar - -enum WeightUnitsEnum { - G - LB - OZ - KG - TONNE -} - -scalar _Any - -union _Entity = App | Address | User | Group | ProductVariant | Product | ProductType | Collection | Category | ProductMedia | PageType - -type _Service { - sdl: String -} diff --git a/src/apps/components/AppDetailsPage/AppDetailsPage.tsx b/src/apps/components/AppDetailsPage/AppDetailsPage.tsx index 964991420..2dedbdd59 100644 --- a/src/apps/components/AppDetailsPage/AppDetailsPage.tsx +++ b/src/apps/components/AppDetailsPage/AppDetailsPage.tsx @@ -5,6 +5,7 @@ import Container from "@saleor/components/Container"; import ExternalLink from "@saleor/components/ExternalLink"; import PageHeader from "@saleor/components/PageHeader"; import Skeleton from "@saleor/components/Skeleton"; +import { AppQuery } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { Backlink, Button } from "@saleor/macaw-ui"; import React from "react"; @@ -16,12 +17,11 @@ import activateIcon from "../../../../assets/images/activate-icon.svg"; import settingsIcon from "../../../../assets/images/settings-icon.svg"; import supportIcon from "../../../../assets/images/support-icon.svg"; import { useStyles } from "../../styles"; -import { App_app } from "../../types/App"; import DeactivatedText from "../DeactivatedText"; export interface AppDetailsPageProps { loading: boolean; - data: App_app; + data: AppQuery["app"]; navigateToApp: () => void; navigateToAppSettings: () => void; onAppActivateOpen: () => void; diff --git a/src/apps/components/AppInstallPage/AppInstallPage.tsx b/src/apps/components/AppInstallPage/AppInstallPage.tsx index 5ca3ddea6..92fd2c30f 100644 --- a/src/apps/components/AppInstallPage/AppInstallPage.tsx +++ b/src/apps/components/AppInstallPage/AppInstallPage.tsx @@ -1,12 +1,12 @@ import saleorDarkLogoSmall from "@assets/images/logo-dark-small.svg"; import plusIcon from "@assets/images/plus-icon.svg"; import { Card, CardContent, Grid, Typography } from "@material-ui/core"; -import { AppInstall_appInstall_errors } from "@saleor/apps/types/AppInstall"; import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; import Container from "@saleor/components/Container"; import Hr from "@saleor/components/Hr"; import Skeleton from "@saleor/components/Skeleton"; +import { AppFetchMutation, AppInstallMutation } from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { buttonMessages } from "@saleor/intl"; import { Button } from "@saleor/macaw-ui"; @@ -15,13 +15,12 @@ import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { useStyles } from "../../styles"; -import { AppFetch_appFetchManifest_manifest } from "../../types/AppFetch"; export interface AppInstallPageProps { - data: AppFetch_appFetchManifest_manifest; + data: AppFetchMutation["appFetchManifest"]["manifest"]; loading: boolean; navigateToAppsList: () => void; - onSubmit: () => SubmitPromise; + onSubmit: () => SubmitPromise; } export const AppInstallPage: React.FC = ({ diff --git a/src/apps/components/AppPage/AppPage.tsx b/src/apps/components/AppPage/AppPage.tsx index e929c3fcf..f06ad3a28 100644 --- a/src/apps/components/AppPage/AppPage.tsx +++ b/src/apps/components/AppPage/AppPage.tsx @@ -3,19 +3,19 @@ import CardSpacer from "@saleor/components/CardSpacer"; import Container from "@saleor/components/Container"; import Grid from "@saleor/components/Grid"; import Hr from "@saleor/components/Hr"; +import { AppQuery } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { Backlink, Button } from "@saleor/macaw-ui"; import classNames from "classnames"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { App_app } from "../../types/App"; import { AppFrame } from "../AppFrame"; import { useStyles } from "./styles"; import useSettingsBreadcrumbs from "./useSettingsBreadcrumbs"; export interface AppPageProps { - data: App_app; + data: AppQuery["app"]; url: string; navigateToAbout: () => void; onBack: () => void; diff --git a/src/apps/components/AppsInProgress/AppsInProgress.tsx b/src/apps/components/AppsInProgress/AppsInProgress.tsx index 3c075bdbf..302fcd214 100644 --- a/src/apps/components/AppsInProgress/AppsInProgress.tsx +++ b/src/apps/components/AppsInProgress/AppsInProgress.tsx @@ -9,19 +9,22 @@ import { } from "@material-ui/core"; import ErrorIcon from "@material-ui/icons/Error"; import CardTitle from "@saleor/components/CardTitle"; -import { DeleteIcon, ResponsiveTable } from "@saleor/macaw-ui"; -import { Button, IconButton } from "@saleor/macaw-ui"; +import { AppsInstallationsQuery, JobStatusEnum } from "@saleor/graphql"; +import { + Button, + DeleteIcon, + IconButton, + ResponsiveTable +} from "@saleor/macaw-ui"; import { renderCollection, stopPropagation } from "@saleor/misc"; import classNames from "classnames"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { JobStatusEnum } from "../../../types/globalTypes"; import { useStyles } from "../../styles"; -import { AppsInstallations_appsInstallations } from "../../types/AppsInstallations"; export interface AppsInProgressProps { - appsList: AppsInstallations_appsInstallations[]; + appsList: AppsInstallationsQuery["appsInstallations"]; disabled: boolean; onAppInstallRetry: (id: string) => void; onRemove: (id: string) => void; diff --git a/src/apps/components/AppsListPage/AppListPage.stories.tsx b/src/apps/components/AppsListPage/AppListPage.stories.tsx index 6bd693135..d515211a6 100644 --- a/src/apps/components/AppsListPage/AppListPage.stories.tsx +++ b/src/apps/components/AppsListPage/AppListPage.stories.tsx @@ -18,7 +18,10 @@ const props: AppsListPageProps = { ...searchPageProps, ...sortPageProps, ...tabPageProps, - appsInProgressList: { appsInstallations: appsInProgress }, + appsInProgressList: { + __typename: "Query", + appsInstallations: appsInProgress + }, customAppsList, disabled: false, installedAppsList: appsList, diff --git a/src/apps/components/AppsListPage/AppsListPage.tsx b/src/apps/components/AppsListPage/AppsListPage.tsx index ed4f84868..2c60821d3 100644 --- a/src/apps/components/AppsListPage/AppsListPage.tsx +++ b/src/apps/components/AppsListPage/AppsListPage.tsx @@ -1,22 +1,21 @@ import CardSpacer from "@saleor/components/CardSpacer"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; +import { AppsInstallationsQuery, AppsListQuery } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { ListProps } from "@saleor/types"; import React from "react"; import { useIntl } from "react-intl"; -import { AppsInstallations } from "../../types/AppsInstallations"; -import { AppsList_apps_edges } from "../../types/AppsList"; import AppsInProgress from "../AppsInProgress/AppsInProgress"; import CustomApps from "../CustomApps/CustomApps"; import InstalledApps from "../InstalledApps/InstalledApps"; import Marketplace from "../Marketplace"; export interface AppsListPageProps extends ListProps { - installedAppsList: AppsList_apps_edges[]; - customAppsList: AppsList_apps_edges[]; - appsInProgressList?: AppsInstallations; + installedAppsList: AppsListQuery["apps"]["edges"]; + customAppsList: AppsListQuery["apps"]["edges"]; + appsInProgressList?: AppsInstallationsQuery; loadingAppsInProgress: boolean; navigateToCustomApp: (id: string) => () => void; navigateToCustomAppCreate: () => void; diff --git a/src/apps/components/CustomAppCreatePage/CustomAppCreatePage.tsx b/src/apps/components/CustomAppCreatePage/CustomAppCreatePage.tsx index 1ba4e6a14..21efb7c12 100644 --- a/src/apps/components/CustomAppCreatePage/CustomAppCreatePage.tsx +++ b/src/apps/components/CustomAppCreatePage/CustomAppCreatePage.tsx @@ -4,13 +4,14 @@ import Form from "@saleor/components/Form"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; -import { ShopInfo_shop_permissions } from "@saleor/components/Shop/types/ShopInfo"; -import { AppErrorFragment } from "@saleor/fragments/types/AppErrorFragment"; +import { + AppErrorFragment, + PermissionEnum, + PermissionFragment +} from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; -import { PermissionEnum } from "@saleor/types/globalTypes"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { getFormErrors } from "@saleor/utils/errors"; import getAppErrorMessage from "@saleor/utils/errors/app"; import React from "react"; @@ -26,7 +27,7 @@ export interface CustomAppCreatePageFormData { export interface CustomAppCreatePageProps { disabled: boolean; errors: AppErrorFragment[]; - permissions: ShopInfo_shop_permissions[]; + permissions: PermissionFragment[]; saveButtonBarState: ConfirmButtonTransitionState; onBack: () => void; onSubmit: ( diff --git a/src/apps/components/CustomAppDetailsPage/CustomAppDetailsPage.tsx b/src/apps/components/CustomAppDetailsPage/CustomAppDetailsPage.tsx index 6dafd7e43..2f37e703f 100644 --- a/src/apps/components/CustomAppDetailsPage/CustomAppDetailsPage.tsx +++ b/src/apps/components/CustomAppDetailsPage/CustomAppDetailsPage.tsx @@ -5,13 +5,19 @@ import Form from "@saleor/components/Form"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; -import { ShopInfo_shop_permissions } from "@saleor/components/Shop/types/ShopInfo"; -import { AppErrorFragment } from "@saleor/fragments/types/AppErrorFragment"; +import { + AppErrorFragment, + AppUpdateMutation, + PermissionEnum, + ShopInfoQuery +} from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink, Button } from "@saleor/macaw-ui"; -import { PermissionEnum } from "@saleor/types/globalTypes"; +import { + Backlink, + Button, + ConfirmButtonTransitionState +} from "@saleor/macaw-ui"; import { getFormErrors } from "@saleor/utils/errors"; import getAppErrorMessage from "@saleor/utils/errors/app"; import WebhooksList from "@saleor/webhooks/components/WebhooksList"; @@ -20,7 +26,6 @@ import { FormattedMessage, useIntl } from "react-intl"; import activateIcon from "../../../../assets/images/activate-icon.svg"; import { useStyles } from "../../styles"; -import { AppUpdate_appUpdate_app } from "../../types/AppUpdate"; import CustomAppDefaultToken from "../CustomAppDefaultToken"; import CustomAppInformation from "../CustomAppInformation"; import CustomAppTokens from "../CustomAppTokens"; @@ -35,9 +40,9 @@ export interface CustomAppDetailsPageProps { apiUri: string; disabled: boolean; errors: AppErrorFragment[]; - permissions: ShopInfo_shop_permissions[]; + permissions: ShopInfoQuery["shop"]["permissions"]; saveButtonBarState: ConfirmButtonTransitionState; - app: AppUpdate_appUpdate_app; + app: AppUpdateMutation["appUpdate"]["app"]; token: string; onApiUriClick: () => void; onBack: () => void; diff --git a/src/apps/components/CustomAppInformation/CustomAppInformation.tsx b/src/apps/components/CustomAppInformation/CustomAppInformation.tsx index 44380ce06..6a448ae92 100644 --- a/src/apps/components/CustomAppInformation/CustomAppInformation.tsx +++ b/src/apps/components/CustomAppInformation/CustomAppInformation.tsx @@ -1,6 +1,6 @@ import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; -import { AppErrorFragment } from "@saleor/fragments/types/AppErrorFragment"; +import { AppErrorFragment } from "@saleor/graphql"; import { FormChange } from "@saleor/hooks/useForm"; import { getFormErrors } from "@saleor/utils/errors"; import getAppErrorMessage from "@saleor/utils/errors/app"; diff --git a/src/apps/components/CustomAppTokens/CustomAppTokens.tsx b/src/apps/components/CustomAppTokens/CustomAppTokens.tsx index 7671eefef..dfff65e95 100644 --- a/src/apps/components/CustomAppTokens/CustomAppTokens.tsx +++ b/src/apps/components/CustomAppTokens/CustomAppTokens.tsx @@ -8,16 +8,16 @@ import { import CardTitle from "@saleor/components/CardTitle"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; +import { AppUpdateMutation } from "@saleor/graphql"; import { Button, DeleteIcon, IconButton } from "@saleor/macaw-ui"; import { renderCollection } from "@saleor/misc"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { AppUpdate_appUpdate_app_tokens } from "../../types/AppUpdate"; import { useStyles } from "./styles"; export interface CustomAppTokensProps { - tokens: Array | null; + tokens: AppUpdateMutation["appUpdate"]["app"]["tokens"] | null; onCreate: () => void; onDelete: (id: string) => void; } diff --git a/src/apps/components/CustomApps/CustomApps.tsx b/src/apps/components/CustomApps/CustomApps.tsx index ef4e467ed..c295d107d 100644 --- a/src/apps/components/CustomApps/CustomApps.tsx +++ b/src/apps/components/CustomApps/CustomApps.tsx @@ -6,21 +6,24 @@ import { Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; +import { AppsListQuery } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; -import { DeleteIcon, ResponsiveTable } from "@saleor/macaw-ui"; -import { Button, IconButton } from "@saleor/macaw-ui"; +import { + Button, + DeleteIcon, + IconButton, + ResponsiveTable +} from "@saleor/macaw-ui"; import { renderCollection, stopPropagation } from "@saleor/misc"; import React from "react"; -import { useIntl } from "react-intl"; -import { FormattedMessage } from "react-intl"; +import { FormattedMessage, useIntl } from "react-intl"; import { useStyles } from "../../styles"; -import { AppsList_apps_edges } from "../../types/AppsList"; import AppsSkeleton from "../AppsSkeleton"; import DeactivatedText from "../DeactivatedText"; export interface CustomAppsProps { - appsList: AppsList_apps_edges[]; + appsList: AppsListQuery["apps"]["edges"]; navigateToCustomApp: (id: string) => () => void; navigateToCustomAppCreate?: () => void; onRemove: (id: string) => void; diff --git a/src/apps/components/ExternalAppContext/ExternalAppContext.tsx b/src/apps/components/ExternalAppContext/ExternalAppContext.tsx index 4ec238b25..254baa6c0 100644 --- a/src/apps/components/ExternalAppContext/ExternalAppContext.tsx +++ b/src/apps/components/ExternalAppContext/ExternalAppContext.tsx @@ -1,6 +1,6 @@ import { appDeepUrl } from "@saleor/apps/urls"; +import { AppExtensionTargetEnum } from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; -import { AppExtensionTargetEnum } from "@saleor/types/globalTypes"; import React from "react"; import { AppDialog } from "../AppDialog"; diff --git a/src/apps/components/InstalledApps/InstalledApps.tsx b/src/apps/components/InstalledApps/InstalledApps.tsx index d340caa52..b139ac576 100644 --- a/src/apps/components/InstalledApps/InstalledApps.tsx +++ b/src/apps/components/InstalledApps/InstalledApps.tsx @@ -8,20 +8,24 @@ import { } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import TablePagination from "@saleor/components/TablePagination"; -import { DeleteIcon, ResponsiveTable } from "@saleor/macaw-ui"; -import { Button, IconButton } from "@saleor/macaw-ui"; +import { AppsListQuery } from "@saleor/graphql"; +import { + Button, + DeleteIcon, + IconButton, + ResponsiveTable +} from "@saleor/macaw-ui"; import { renderCollection, stopPropagation } from "@saleor/misc"; import { ListProps } from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { useStyles } from "../../styles"; -import { AppsList_apps_edges } from "../../types/AppsList"; import AppsSkeleton from "../AppsSkeleton"; import DeactivatedText from "../DeactivatedText"; export interface InstalledAppsProps extends ListProps { - appsList: AppsList_apps_edges[]; + appsList: AppsListQuery["apps"]["edges"]; onRemove: (id: string) => void; onRowAboutClick: (id: string) => () => void; } diff --git a/src/apps/fixtures.ts b/src/apps/fixtures.ts index eee4f6c2b..3937c689b 100644 --- a/src/apps/fixtures.ts +++ b/src/apps/fixtures.ts @@ -1,14 +1,14 @@ import { + AppFetchMutation, + AppQuery, + AppsInstallationsQuery, + AppsListQuery, AppTypeEnum, JobStatusEnum, PermissionEnum -} from "../types/globalTypes"; -import { App_app } from "./types/App"; -import { AppFetch_appFetchManifest_manifest } from "./types/AppFetch"; -import { AppsInstallations_appsInstallations } from "./types/AppsInstallations"; -import { AppsList_apps_edges } from "./types/AppsList"; +} from "@saleor/graphql"; -export const appsList: AppsList_apps_edges[] = [ +export const appsList: AppsListQuery["apps"]["edges"] = [ { __typename: "AppCountableEdge", node: { @@ -31,7 +31,7 @@ export const appsList: AppsList_apps_edges[] = [ } ]; -export const customAppsList: AppsList_apps_edges[] = [ +export const customAppsList: AppsListQuery["apps"]["edges"] = [ { __typename: "AppCountableEdge", node: { @@ -44,7 +44,7 @@ export const customAppsList: AppsList_apps_edges[] = [ } ]; -export const appsInProgress: AppsInstallations_appsInstallations[] = [ +export const appsInProgress: AppsInstallationsQuery["appsInstallations"] = [ { __typename: "AppInstallation", appName: "app", @@ -71,7 +71,7 @@ export const appsInProgress: AppsInstallations_appsInstallations[] = [ } ]; -export const appDetails: App_app = { +export const appDetails: AppQuery["app"] = { __typename: "App", aboutApp: "Lorem ipsum", accessToken: "token", @@ -105,9 +105,8 @@ export const appDetails: App_app = { webhooks: [] }; -export const installApp: AppFetch_appFetchManifest_manifest = { +export const installApp: AppFetchMutation["appFetchManifest"]["manifest"] = { __typename: "Manifest", - about: "Lorem ipsum", appUrl: null, configurationUrl: null, diff --git a/src/apps/mutations.ts b/src/apps/mutations.ts index 03d29b453..6e96f8e53 100644 --- a/src/apps/mutations.ts +++ b/src/apps/mutations.ts @@ -1,68 +1,33 @@ import { gql } from "@apollo/client"; -import { appFragment } from "@saleor/fragments/apps"; -import { appErrorFragment } from "@saleor/fragments/errors"; -import { webhooksFragment } from "@saleor/fragments/webhooks"; -import makeMutation from "@saleor/hooks/makeMutation"; - -import { AppActivate, AppActivateVariables } from "./types/AppActivate"; -import { AppCreate, AppCreateVariables } from "./types/AppCreate"; -import { AppDeactivate, AppDeactivateVariables } from "./types/AppDeactivate"; -import { AppDelete, AppDeleteVariables } from "./types/AppDelete"; -import { - AppDeleteFailedInstallation, - AppDeleteFailedInstallationVariables -} from "./types/AppDeleteFailedInstallation"; -import { AppFetch, AppFetchVariables } from "./types/AppFetch"; -import { AppInstall, AppInstallVariables } from "./types/AppInstall"; -import { - AppRetryInstall, - AppRetryInstallVariables -} from "./types/AppRetryInstall"; -import { - AppTokenCreate, - AppTokenCreateVariables -} from "./types/AppTokenCreate"; -import { - AppTokenDelete, - AppTokenDeleteVariables -} from "./types/AppTokenDelete"; -import { AppUpdate, AppUpdateVariables } from "./types/AppUpdate"; export const appCreateMutation = gql` - ${appFragment} - ${webhooksFragment} - ${appErrorFragment} mutation AppCreate($input: AppInput!) { appCreate(input: $input) { authToken app { - ...AppFragment + ...App } errors { - ...AppErrorFragment + ...AppError } } } `; export const appDeleteMutation = gql` - ${appFragment} - ${webhooksFragment} - ${appErrorFragment} mutation AppDelete($id: ID!) { appDelete(id: $id) { app { - ...AppFragment + ...App } errors { - ...AppErrorFragment + ...AppError } } } `; export const appDeleteFailedInstallationMutation = gql` - ${appErrorFragment} mutation AppDeleteFailedInstallation($id: ID!) { appDeleteFailedInstallation(id: $id) { appInstallation { @@ -72,14 +37,13 @@ export const appDeleteFailedInstallationMutation = gql` message } errors { - ...AppErrorFragment + ...AppError } } } `; export const appFetchMutation = gql` - ${appErrorFragment} mutation AppFetch($manifestUrl: String!) { appFetchManifest(manifestUrl: $manifestUrl) { manifest { @@ -100,14 +64,13 @@ export const appFetchMutation = gql` } } errors { - ...AppErrorFragment + ...AppError } } } `; export const appInstallMutation = gql` - ${appErrorFragment} mutation AppInstall($input: AppInstallInput!) { appInstall(input: $input) { appInstallation { @@ -117,14 +80,13 @@ export const appInstallMutation = gql` manifestUrl } errors { - ...AppErrorFragment + ...AppError } } } `; export const appRetryInstallMutation = gql` - ${appErrorFragment} mutation AppRetryInstall($id: ID!) { appRetryInstall(id: $id) { appInstallation { @@ -134,27 +96,24 @@ export const appRetryInstallMutation = gql` manifestUrl } errors { - ...AppErrorFragment + ...AppError } } } `; export const appUpdateMutation = gql` - ${appErrorFragment} - ${appFragment} - ${webhooksFragment} mutation AppUpdate($id: ID!, $input: AppInput!) { appUpdate(id: $id, input: $input) { app { - ...AppFragment + ...App permissions { code name } } errors { - ...AppErrorFragment + ...AppError message permissions } @@ -163,7 +122,6 @@ export const appUpdateMutation = gql` `; export const appTokenCreateMutation = gql` - ${appErrorFragment} mutation AppTokenCreate($input: AppTokenInput!) { appTokenCreate(input: $input) { appToken { @@ -173,14 +131,13 @@ export const appTokenCreateMutation = gql` } authToken errors { - ...AppErrorFragment + ...AppError } } } `; export const appTokenDeleteMutation = gql` - ${appErrorFragment} mutation AppTokenDelete($id: ID!) { appTokenDelete(id: $id) { appToken { @@ -189,82 +146,28 @@ export const appTokenDeleteMutation = gql` id } errors { - ...AppErrorFragment + ...AppError } } } `; export const appActivateMutation = gql` - ${appErrorFragment} mutation AppActivate($id: ID!) { appActivate(id: $id) { errors { - ...AppErrorFragment + ...AppError } } } `; export const appDeactivateMutation = gql` - ${appErrorFragment} mutation AppDeactivate($id: ID!) { appDeactivate(id: $id) { errors { - ...AppErrorFragment + ...AppError } } } `; - -export const useAppCreateMutation = makeMutation( - appCreateMutation -); - -export const useAppDeleteMutation = makeMutation( - appDeleteMutation -); - -export const useAppDeleteFailedInstallationMutation = makeMutation< - AppDeleteFailedInstallation, - AppDeleteFailedInstallationVariables ->(appDeleteFailedInstallationMutation); - -export const useAppInstallMutation = makeMutation< - AppInstall, - AppInstallVariables ->(appInstallMutation); - -export const useAppRetryInstallMutation = makeMutation< - AppRetryInstall, - AppRetryInstallVariables ->(appRetryInstallMutation); - -export const useAppManifestFetchMutation = makeMutation< - AppFetch, - AppFetchVariables ->(appFetchMutation); - -export const useAppActivateMutation = makeMutation< - AppActivate, - AppActivateVariables ->(appActivateMutation); - -export const useAppDeactivateMutation = makeMutation< - AppDeactivate, - AppDeactivateVariables ->(appDeactivateMutation); - -export const useAppUpdateMutation = makeMutation( - appUpdateMutation -); - -export const useAppTokenCreateMutation = makeMutation< - AppTokenCreate, - AppTokenCreateVariables ->(appTokenCreateMutation); - -export const useAppTokenDeleteMutation = makeMutation< - AppTokenDelete, - AppTokenDeleteVariables ->(appTokenDeleteMutation); diff --git a/src/apps/queries.ts b/src/apps/queries.ts index e6be7401d..de0a1c243 100644 --- a/src/apps/queries.ts +++ b/src/apps/queries.ts @@ -1,14 +1,6 @@ import { gql } from "@apollo/client"; -import { appFragment } from "@saleor/fragments/apps"; -import { webhooksFragment } from "@saleor/fragments/webhooks"; -import makeQuery from "@saleor/hooks/makeQuery"; -import { App, AppVariables } from "./types/App"; -import { AppsInstallations } from "./types/AppsInstallations"; -import { AppsList, AppsListVariables } from "./types/AppsList"; -import { ExtensionList, ExtensionListVariables } from "./types/ExtensionList"; - -const appsList = gql` +export const appsList = gql` query AppsList( $before: String $after: String @@ -44,7 +36,7 @@ const appsList = gql` } `; -const appsInProgressList = gql` +export const appsInProgressList = gql` query AppsInstallations { appsInstallations { status @@ -56,12 +48,10 @@ const appsInProgressList = gql` } `; -const appDetails = gql` - ${appFragment} - ${webhooksFragment} +export const appDetails = gql` query App($id: ID!) { app(id: $id) { - ...AppFragment + ...App aboutApp permissions { code @@ -96,18 +86,3 @@ export const extensionList = gql` } } `; - -export const useAppsListQuery = makeQuery( - appsList -); - -export const useAppsInProgressListQuery = makeQuery( - appsInProgressList -); - -export const useAppDetails = makeQuery(appDetails); - -export const useExtensionList = makeQuery< - ExtensionList, - ExtensionListVariables ->(extensionList); diff --git a/src/apps/types/App.ts b/src/apps/types/App.ts deleted file mode 100644 index 6a39786a6..000000000 --- a/src/apps/types/App.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AppTypeEnum, PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: App -// ==================================================== - -export interface App_app_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface App_app_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface App_app_tokens { - __typename: "AppToken"; - authToken: string | null; - id: string; - name: string | null; -} - -export interface App_app_webhooks_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface App_app_webhooks { - __typename: "Webhook"; - id: string; - name: string; - isActive: boolean; - app: App_app_webhooks_app; -} - -export interface App_app_permissions { - __typename: "Permission"; - code: PermissionEnum; - name: string; -} - -export interface App_app { - __typename: "App"; - id: string; - name: string | null; - created: any | null; - isActive: boolean | null; - type: AppTypeEnum | null; - homepageUrl: string | null; - appUrl: string | null; - configurationUrl: string | null; - supportUrl: string | null; - version: string | null; - accessToken: string | null; - privateMetadata: (App_app_privateMetadata | null)[]; - metadata: (App_app_metadata | null)[]; - tokens: (App_app_tokens | null)[] | null; - webhooks: (App_app_webhooks | null)[] | null; - aboutApp: string | null; - permissions: (App_app_permissions | null)[] | null; - dataPrivacy: string | null; - dataPrivacyUrl: string | null; -} - -export interface App { - app: App_app | null; -} - -export interface AppVariables { - id: string; -} diff --git a/src/apps/types/AppActivate.ts b/src/apps/types/AppActivate.ts deleted file mode 100644 index e4bfa8c82..000000000 --- a/src/apps/types/AppActivate.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AppErrorCode, PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AppActivate -// ==================================================== - -export interface AppActivate_appActivate_errors { - __typename: "AppError"; - field: string | null; - message: string | null; - code: AppErrorCode; - permissions: PermissionEnum[] | null; -} - -export interface AppActivate_appActivate { - __typename: "AppActivate"; - errors: AppActivate_appActivate_errors[]; -} - -export interface AppActivate { - appActivate: AppActivate_appActivate | null; -} - -export interface AppActivateVariables { - id: string; -} diff --git a/src/apps/types/AppCreate.ts b/src/apps/types/AppCreate.ts deleted file mode 100644 index 8eb7f4613..000000000 --- a/src/apps/types/AppCreate.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AppInput, AppTypeEnum, AppErrorCode, PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AppCreate -// ==================================================== - -export interface AppCreate_appCreate_app_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface AppCreate_appCreate_app_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface AppCreate_appCreate_app_tokens { - __typename: "AppToken"; - authToken: string | null; - id: string; - name: string | null; -} - -export interface AppCreate_appCreate_app_webhooks_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface AppCreate_appCreate_app_webhooks { - __typename: "Webhook"; - id: string; - name: string; - isActive: boolean; - app: AppCreate_appCreate_app_webhooks_app; -} - -export interface AppCreate_appCreate_app { - __typename: "App"; - id: string; - name: string | null; - created: any | null; - isActive: boolean | null; - type: AppTypeEnum | null; - homepageUrl: string | null; - appUrl: string | null; - configurationUrl: string | null; - supportUrl: string | null; - version: string | null; - accessToken: string | null; - privateMetadata: (AppCreate_appCreate_app_privateMetadata | null)[]; - metadata: (AppCreate_appCreate_app_metadata | null)[]; - tokens: (AppCreate_appCreate_app_tokens | null)[] | null; - webhooks: (AppCreate_appCreate_app_webhooks | null)[] | null; -} - -export interface AppCreate_appCreate_errors { - __typename: "AppError"; - field: string | null; - message: string | null; - code: AppErrorCode; - permissions: PermissionEnum[] | null; -} - -export interface AppCreate_appCreate { - __typename: "AppCreate"; - authToken: string | null; - app: AppCreate_appCreate_app | null; - errors: AppCreate_appCreate_errors[]; -} - -export interface AppCreate { - appCreate: AppCreate_appCreate | null; -} - -export interface AppCreateVariables { - input: AppInput; -} diff --git a/src/apps/types/AppDeactivate.ts b/src/apps/types/AppDeactivate.ts deleted file mode 100644 index 1b6468ffe..000000000 --- a/src/apps/types/AppDeactivate.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AppErrorCode, PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AppDeactivate -// ==================================================== - -export interface AppDeactivate_appDeactivate_errors { - __typename: "AppError"; - field: string | null; - message: string | null; - code: AppErrorCode; - permissions: PermissionEnum[] | null; -} - -export interface AppDeactivate_appDeactivate { - __typename: "AppDeactivate"; - errors: AppDeactivate_appDeactivate_errors[]; -} - -export interface AppDeactivate { - appDeactivate: AppDeactivate_appDeactivate | null; -} - -export interface AppDeactivateVariables { - id: string; -} diff --git a/src/apps/types/AppDelete.ts b/src/apps/types/AppDelete.ts deleted file mode 100644 index 862a0007d..000000000 --- a/src/apps/types/AppDelete.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AppTypeEnum, AppErrorCode, PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AppDelete -// ==================================================== - -export interface AppDelete_appDelete_app_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface AppDelete_appDelete_app_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface AppDelete_appDelete_app_tokens { - __typename: "AppToken"; - authToken: string | null; - id: string; - name: string | null; -} - -export interface AppDelete_appDelete_app_webhooks_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface AppDelete_appDelete_app_webhooks { - __typename: "Webhook"; - id: string; - name: string; - isActive: boolean; - app: AppDelete_appDelete_app_webhooks_app; -} - -export interface AppDelete_appDelete_app { - __typename: "App"; - id: string; - name: string | null; - created: any | null; - isActive: boolean | null; - type: AppTypeEnum | null; - homepageUrl: string | null; - appUrl: string | null; - configurationUrl: string | null; - supportUrl: string | null; - version: string | null; - accessToken: string | null; - privateMetadata: (AppDelete_appDelete_app_privateMetadata | null)[]; - metadata: (AppDelete_appDelete_app_metadata | null)[]; - tokens: (AppDelete_appDelete_app_tokens | null)[] | null; - webhooks: (AppDelete_appDelete_app_webhooks | null)[] | null; -} - -export interface AppDelete_appDelete_errors { - __typename: "AppError"; - field: string | null; - message: string | null; - code: AppErrorCode; - permissions: PermissionEnum[] | null; -} - -export interface AppDelete_appDelete { - __typename: "AppDelete"; - app: AppDelete_appDelete_app | null; - errors: AppDelete_appDelete_errors[]; -} - -export interface AppDelete { - appDelete: AppDelete_appDelete | null; -} - -export interface AppDeleteVariables { - id: string; -} diff --git a/src/apps/types/AppDeleteFailedInstallation.ts b/src/apps/types/AppDeleteFailedInstallation.ts deleted file mode 100644 index 21c442aad..000000000 --- a/src/apps/types/AppDeleteFailedInstallation.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { JobStatusEnum, AppErrorCode, PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AppDeleteFailedInstallation -// ==================================================== - -export interface AppDeleteFailedInstallation_appDeleteFailedInstallation_appInstallation { - __typename: "AppInstallation"; - id: string; - status: JobStatusEnum; - appName: string; - message: string | null; -} - -export interface AppDeleteFailedInstallation_appDeleteFailedInstallation_errors { - __typename: "AppError"; - field: string | null; - message: string | null; - code: AppErrorCode; - permissions: PermissionEnum[] | null; -} - -export interface AppDeleteFailedInstallation_appDeleteFailedInstallation { - __typename: "AppDeleteFailedInstallation"; - appInstallation: AppDeleteFailedInstallation_appDeleteFailedInstallation_appInstallation | null; - errors: AppDeleteFailedInstallation_appDeleteFailedInstallation_errors[]; -} - -export interface AppDeleteFailedInstallation { - appDeleteFailedInstallation: AppDeleteFailedInstallation_appDeleteFailedInstallation | null; -} - -export interface AppDeleteFailedInstallationVariables { - id: string; -} diff --git a/src/apps/types/AppFetch.ts b/src/apps/types/AppFetch.ts deleted file mode 100644 index d9e213975..000000000 --- a/src/apps/types/AppFetch.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PermissionEnum, AppErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AppFetch -// ==================================================== - -export interface AppFetch_appFetchManifest_manifest_permissions { - __typename: "Permission"; - code: PermissionEnum; - name: string; -} - -export interface AppFetch_appFetchManifest_manifest { - __typename: "Manifest"; - identifier: string; - version: string; - about: string | null; - name: string; - appUrl: string | null; - configurationUrl: string | null; - tokenTargetUrl: string | null; - dataPrivacy: string | null; - dataPrivacyUrl: string | null; - homepageUrl: string | null; - supportUrl: string | null; - permissions: (AppFetch_appFetchManifest_manifest_permissions | null)[] | null; -} - -export interface AppFetch_appFetchManifest_errors { - __typename: "AppError"; - field: string | null; - message: string | null; - code: AppErrorCode; - permissions: PermissionEnum[] | null; -} - -export interface AppFetch_appFetchManifest { - __typename: "AppFetchManifest"; - manifest: AppFetch_appFetchManifest_manifest | null; - errors: AppFetch_appFetchManifest_errors[]; -} - -export interface AppFetch { - appFetchManifest: AppFetch_appFetchManifest | null; -} - -export interface AppFetchVariables { - manifestUrl: string; -} diff --git a/src/apps/types/AppInstall.ts b/src/apps/types/AppInstall.ts deleted file mode 100644 index b97e16abf..000000000 --- a/src/apps/types/AppInstall.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AppInstallInput, JobStatusEnum, AppErrorCode, PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AppInstall -// ==================================================== - -export interface AppInstall_appInstall_appInstallation { - __typename: "AppInstallation"; - id: string; - status: JobStatusEnum; - appName: string; - manifestUrl: string; -} - -export interface AppInstall_appInstall_errors { - __typename: "AppError"; - field: string | null; - message: string | null; - code: AppErrorCode; - permissions: PermissionEnum[] | null; -} - -export interface AppInstall_appInstall { - __typename: "AppInstall"; - appInstallation: AppInstall_appInstall_appInstallation | null; - errors: AppInstall_appInstall_errors[]; -} - -export interface AppInstall { - appInstall: AppInstall_appInstall | null; -} - -export interface AppInstallVariables { - input: AppInstallInput; -} diff --git a/src/apps/types/AppRetryInstall.ts b/src/apps/types/AppRetryInstall.ts deleted file mode 100644 index 53244caae..000000000 --- a/src/apps/types/AppRetryInstall.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { JobStatusEnum, AppErrorCode, PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AppRetryInstall -// ==================================================== - -export interface AppRetryInstall_appRetryInstall_appInstallation { - __typename: "AppInstallation"; - id: string; - status: JobStatusEnum; - appName: string; - manifestUrl: string; -} - -export interface AppRetryInstall_appRetryInstall_errors { - __typename: "AppError"; - field: string | null; - message: string | null; - code: AppErrorCode; - permissions: PermissionEnum[] | null; -} - -export interface AppRetryInstall_appRetryInstall { - __typename: "AppRetryInstall"; - appInstallation: AppRetryInstall_appRetryInstall_appInstallation | null; - errors: AppRetryInstall_appRetryInstall_errors[]; -} - -export interface AppRetryInstall { - appRetryInstall: AppRetryInstall_appRetryInstall | null; -} - -export interface AppRetryInstallVariables { - id: string; -} diff --git a/src/apps/types/AppTokenCreate.ts b/src/apps/types/AppTokenCreate.ts deleted file mode 100644 index c673ab54b..000000000 --- a/src/apps/types/AppTokenCreate.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AppTokenInput, AppErrorCode, PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AppTokenCreate -// ==================================================== - -export interface AppTokenCreate_appTokenCreate_appToken { - __typename: "AppToken"; - name: string | null; - authToken: string | null; - id: string; -} - -export interface AppTokenCreate_appTokenCreate_errors { - __typename: "AppError"; - field: string | null; - message: string | null; - code: AppErrorCode; - permissions: PermissionEnum[] | null; -} - -export interface AppTokenCreate_appTokenCreate { - __typename: "AppTokenCreate"; - appToken: AppTokenCreate_appTokenCreate_appToken | null; - authToken: string | null; - errors: AppTokenCreate_appTokenCreate_errors[]; -} - -export interface AppTokenCreate { - appTokenCreate: AppTokenCreate_appTokenCreate | null; -} - -export interface AppTokenCreateVariables { - input: AppTokenInput; -} diff --git a/src/apps/types/AppTokenDelete.ts b/src/apps/types/AppTokenDelete.ts deleted file mode 100644 index 8e69c404e..000000000 --- a/src/apps/types/AppTokenDelete.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AppErrorCode, PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AppTokenDelete -// ==================================================== - -export interface AppTokenDelete_appTokenDelete_appToken { - __typename: "AppToken"; - name: string | null; - authToken: string | null; - id: string; -} - -export interface AppTokenDelete_appTokenDelete_errors { - __typename: "AppError"; - field: string | null; - message: string | null; - code: AppErrorCode; - permissions: PermissionEnum[] | null; -} - -export interface AppTokenDelete_appTokenDelete { - __typename: "AppTokenDelete"; - appToken: AppTokenDelete_appTokenDelete_appToken | null; - errors: AppTokenDelete_appTokenDelete_errors[]; -} - -export interface AppTokenDelete { - appTokenDelete: AppTokenDelete_appTokenDelete | null; -} - -export interface AppTokenDeleteVariables { - id: string; -} diff --git a/src/apps/types/AppUpdate.ts b/src/apps/types/AppUpdate.ts deleted file mode 100644 index 446681c21..000000000 --- a/src/apps/types/AppUpdate.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AppInput, AppTypeEnum, PermissionEnum, AppErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AppUpdate -// ==================================================== - -export interface AppUpdate_appUpdate_app_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface AppUpdate_appUpdate_app_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface AppUpdate_appUpdate_app_tokens { - __typename: "AppToken"; - authToken: string | null; - id: string; - name: string | null; -} - -export interface AppUpdate_appUpdate_app_webhooks_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface AppUpdate_appUpdate_app_webhooks { - __typename: "Webhook"; - id: string; - name: string; - isActive: boolean; - app: AppUpdate_appUpdate_app_webhooks_app; -} - -export interface AppUpdate_appUpdate_app_permissions { - __typename: "Permission"; - code: PermissionEnum; - name: string; -} - -export interface AppUpdate_appUpdate_app { - __typename: "App"; - id: string; - name: string | null; - created: any | null; - isActive: boolean | null; - type: AppTypeEnum | null; - homepageUrl: string | null; - appUrl: string | null; - configurationUrl: string | null; - supportUrl: string | null; - version: string | null; - accessToken: string | null; - privateMetadata: (AppUpdate_appUpdate_app_privateMetadata | null)[]; - metadata: (AppUpdate_appUpdate_app_metadata | null)[]; - tokens: (AppUpdate_appUpdate_app_tokens | null)[] | null; - webhooks: (AppUpdate_appUpdate_app_webhooks | null)[] | null; - permissions: (AppUpdate_appUpdate_app_permissions | null)[] | null; -} - -export interface AppUpdate_appUpdate_errors { - __typename: "AppError"; - field: string | null; - message: string | null; - code: AppErrorCode; - permissions: PermissionEnum[] | null; -} - -export interface AppUpdate_appUpdate { - __typename: "AppUpdate"; - app: AppUpdate_appUpdate_app | null; - errors: AppUpdate_appUpdate_errors[]; -} - -export interface AppUpdate { - appUpdate: AppUpdate_appUpdate | null; -} - -export interface AppUpdateVariables { - id: string; - input: AppInput; -} diff --git a/src/apps/types/AppsInstallations.ts b/src/apps/types/AppsInstallations.ts deleted file mode 100644 index 27e34298c..000000000 --- a/src/apps/types/AppsInstallations.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: AppsInstallations -// ==================================================== - -export interface AppsInstallations_appsInstallations { - __typename: "AppInstallation"; - status: JobStatusEnum; - message: string | null; - appName: string; - manifestUrl: string; - id: string; -} - -export interface AppsInstallations { - appsInstallations: AppsInstallations_appsInstallations[]; -} diff --git a/src/apps/types/AppsList.ts b/src/apps/types/AppsList.ts deleted file mode 100644 index 5c331faf1..000000000 --- a/src/apps/types/AppsList.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AppSortingInput, AppFilterInput, AppTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: AppsList -// ==================================================== - -export interface AppsList_apps_pageInfo { - __typename: "PageInfo"; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; - endCursor: string | null; -} - -export interface AppsList_apps_edges_node { - __typename: "App"; - id: string; - name: string | null; - isActive: boolean | null; - type: AppTypeEnum | null; -} - -export interface AppsList_apps_edges { - __typename: "AppCountableEdge"; - node: AppsList_apps_edges_node; -} - -export interface AppsList_apps { - __typename: "AppCountableConnection"; - pageInfo: AppsList_apps_pageInfo; - totalCount: number | null; - edges: AppsList_apps_edges[]; -} - -export interface AppsList { - apps: AppsList_apps | null; -} - -export interface AppsListVariables { - before?: string | null; - after?: string | null; - first?: number | null; - last?: number | null; - sort?: AppSortingInput | null; - filter?: AppFilterInput | null; -} diff --git a/src/apps/types/ExtensionList.ts b/src/apps/types/ExtensionList.ts deleted file mode 100644 index 0b7112f27..000000000 --- a/src/apps/types/ExtensionList.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AppExtensionFilterInput, AppExtensionMountEnum, AppExtensionTargetEnum, PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ExtensionList -// ==================================================== - -export interface ExtensionList_appExtensions_edges_node_permissions { - __typename: "Permission"; - code: PermissionEnum; -} - -export interface ExtensionList_appExtensions_edges_node_app { - __typename: "App"; - id: string; - appUrl: string | null; -} - -export interface ExtensionList_appExtensions_edges_node { - __typename: "AppExtension"; - id: string; - label: string; - url: string; - mount: AppExtensionMountEnum; - target: AppExtensionTargetEnum; - accessToken: string | null; - permissions: ExtensionList_appExtensions_edges_node_permissions[]; - app: ExtensionList_appExtensions_edges_node_app; -} - -export interface ExtensionList_appExtensions_edges { - __typename: "AppExtensionCountableEdge"; - node: ExtensionList_appExtensions_edges_node; -} - -export interface ExtensionList_appExtensions { - __typename: "AppExtensionCountableConnection"; - edges: ExtensionList_appExtensions_edges[]; -} - -export interface ExtensionList { - appExtensions: ExtensionList_appExtensions | null; -} - -export interface ExtensionListVariables { - filter: AppExtensionFilterInput; -} diff --git a/src/apps/useExtensions.ts b/src/apps/useExtensions.ts index 0e19c1a36..9b1463e3e 100644 --- a/src/apps/useExtensions.ts +++ b/src/apps/useExtensions.ts @@ -1,19 +1,17 @@ import { AppExtensionMountEnum, - PermissionEnum -} from "@saleor/types/globalTypes"; + ExtensionListQuery, + PermissionEnum, + useExtensionListQuery +} from "@saleor/graphql"; +import { RelayToFlat } from "@saleor/types"; import { mapEdgesToItems } from "@saleor/utils/maps"; import { AppData, useExternalApp } from "./components/ExternalAppContext"; -import { useExtensionList } from "./queries"; -import { - ExtensionList_appExtensions_edges_node, - ExtensionList_appExtensions_edges_node_app -} from "./types/ExtensionList"; export interface Extension { id: string; - app: ExtensionList_appExtensions_edges_node_app; + app: RelayToFlat[0]["app"]; accessToken: string; permissions: PermissionEnum[]; label: string; @@ -38,7 +36,7 @@ export const extensionMountPoints = { }; const filterAndMapToTarget = ( - extensions: ExtensionList_appExtensions_edges_node[], + extensions: RelayToFlat, openApp: (appData: AppData) => void ): Extension[] => extensions.map( @@ -67,7 +65,7 @@ export const useExtensions = ( ): Record => { const { openApp } = useExternalApp(); - const { data } = useExtensionList({ + const { data } = useExtensionListQuery({ fetchPolicy: "cache-first", variables: { filter: { diff --git a/src/apps/views/App/App.tsx b/src/apps/views/App/App.tsx index 33c7315ce..6a6353183 100644 --- a/src/apps/views/App/App.tsx +++ b/src/apps/views/App/App.tsx @@ -1,5 +1,6 @@ import { appMessages } from "@saleor/apps/messages"; import NotFoundPage from "@saleor/components/NotFoundPage"; +import { useAppQuery } from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import React from "react"; @@ -7,7 +8,6 @@ import { useIntl } from "react-intl"; import { useLocation } from "react-router"; import AppPage from "../../components/AppPage"; -import { useAppDetails } from "../../queries"; import { appDetailsUrl, appsListPath, @@ -20,7 +20,7 @@ interface AppProps { export const App: React.FC = ({ id }) => { const location = useLocation(); - const { data } = useAppDetails({ + const { data } = useAppQuery({ displayLoader: true, variables: { id } }); diff --git a/src/apps/views/AppDetails/AppDetails.tsx b/src/apps/views/AppDetails/AppDetails.tsx index 449c02999..1460b0e48 100644 --- a/src/apps/views/AppDetails/AppDetails.tsx +++ b/src/apps/views/AppDetails/AppDetails.tsx @@ -1,5 +1,10 @@ import { appMessages } from "@saleor/apps/messages"; import NotFoundPage from "@saleor/components/NotFoundPage"; +import { + useAppActivateMutation, + useAppDeactivateMutation, + useAppQuery +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import getAppErrorMessage from "@saleor/utils/errors/app"; @@ -10,11 +15,6 @@ import { useIntl } from "react-intl"; import AppActivateDialog from "../../components/AppActivateDialog"; import AppDeactivateDialog from "../../components/AppDeactivateDialog"; import AppDetailsPage from "../../components/AppDetailsPage"; -import { - useAppActivateMutation, - useAppDeactivateMutation -} from "../../mutations"; -import { useAppDetails } from "../../queries"; import { AppDetailsUrlDialog, AppDetailsUrlQueryParams, @@ -29,7 +29,7 @@ interface AppDetailsProps { } export const AppDetails: React.FC = ({ id, params }) => { - const { data, loading, refetch } = useAppDetails({ + const { data, loading, refetch } = useAppQuery({ displayLoader: true, variables: { id } }); diff --git a/src/apps/views/AppInstall/AppInstall.tsx b/src/apps/views/AppInstall/AppInstall.tsx index 9ecaff28d..118a8c917 100644 --- a/src/apps/views/AppInstall/AppInstall.tsx +++ b/src/apps/views/AppInstall/AppInstall.tsx @@ -1,4 +1,5 @@ import { WindowTitle } from "@saleor/components/WindowTitle"; +import { useAppFetchMutation, useAppInstallMutation } from "@saleor/graphql"; import useLocalStorage from "@saleor/hooks/useLocalStorage"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; @@ -10,10 +11,6 @@ import { RouteComponentProps } from "react-router-dom"; import AppInstallErrorPage from "../../components/AppInstallErrorPage"; import AppInstallPage from "../../components/AppInstallPage"; -import { - useAppInstallMutation, - useAppManifestFetchMutation -} from "../../mutations"; import { AppInstallUrlQueryParams, appsListUrl, @@ -33,7 +30,7 @@ export const InstallAppCreate: React.FC = ({ const intl = useIntl(); const manifestUrl = params[MANIFEST_ATTR]; - const [fetchManifest, fetchManifestOpts] = useAppManifestFetchMutation({ + const [fetchManifest, fetchManifestOpts] = useAppFetchMutation({ onCompleted: data => { if (data.appFetchManifest.errors.length) { data.appFetchManifest.errors.forEach(error => { diff --git a/src/apps/views/AppSettings/AppSettings.tsx b/src/apps/views/AppSettings/AppSettings.tsx index 389b8d993..a01b7ebd0 100644 --- a/src/apps/views/AppSettings/AppSettings.tsx +++ b/src/apps/views/AppSettings/AppSettings.tsx @@ -1,12 +1,12 @@ import { appMessages } from "@saleor/apps/messages"; import NotFoundPage from "@saleor/components/NotFoundPage"; +import { useAppQuery } from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import React from "react"; import { useIntl } from "react-intl"; import AppPage from "../../components/AppPage"; -import { useAppDetails } from "../../queries"; import { appDetailsUrl, appsListPath } from "../../urls"; interface AppSettingsProps { @@ -14,7 +14,7 @@ interface AppSettingsProps { } export const AppSettings: React.FC = ({ id }) => { - const { data } = useAppDetails({ + const { data } = useAppQuery({ displayLoader: true, variables: { id } }); diff --git a/src/apps/views/AppsList/AppsList.tsx b/src/apps/views/AppsList/AppsList.tsx index 7f97f274c..827ea0b3e 100644 --- a/src/apps/views/AppsList/AppsList.tsx +++ b/src/apps/views/AppsList/AppsList.tsx @@ -1,3 +1,18 @@ +import { + AppDeleteFailedInstallationMutation, + AppDeleteMutation, + AppsInstallationsQuery, + AppsListQuery, + AppSortField, + AppTypeEnum, + JobStatusEnum, + OrderDirection, + useAppDeleteFailedInstallationMutation, + useAppDeleteMutation, + useAppRetryInstallMutation, + useAppsInstallationsQuery, + useAppsListQuery +} from "@saleor/graphql"; import useListSettings from "@saleor/hooks/useListSettings"; import useLocalStorage from "@saleor/hooks/useLocalStorage"; import useNavigator from "@saleor/hooks/useNavigator"; @@ -11,25 +26,9 @@ import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandl import React, { useEffect, useRef } from "react"; import { useIntl } from "react-intl"; -import { - AppSortField, - AppTypeEnum, - JobStatusEnum, - OrderDirection -} from "../../../types/globalTypes"; import AppDeleteDialog from "../../components/AppDeleteDialog"; import AppInProgressDeleteDialog from "../../components/AppInProgressDeleteDialog"; import AppsListPage from "../../components/AppsListPage"; -import { - useAppDeleteFailedInstallationMutation, - useAppDeleteMutation, - useAppRetryInstallMutation -} from "../../mutations"; -import { useAppsInProgressListQuery, useAppsListQuery } from "../../queries"; -import { AppDelete } from "../../types/AppDelete"; -import { AppDeleteFailedInstallation } from "../../types/AppDeleteFailedInstallation"; -import { AppsInstallations_appsInstallations } from "../../types/AppsInstallations"; -import { AppsList_apps_edges } from "../../types/AppsList"; import { appDetailsUrl, AppListUrlDialog, @@ -41,12 +40,14 @@ import { } from "../../urls"; import { messages } from "./messages"; -const getCurrentAppName = (id: string, collection?: AppsList_apps_edges[]) => - collection?.find(edge => edge.node.id === id)?.node?.name; +const getCurrentAppName = ( + id: string, + collection?: AppsListQuery["apps"]["edges"] +) => collection?.find(edge => edge.node.id === id)?.node?.name; const getAppInProgressName = ( id: string, - collection?: AppsInstallations_appsInstallations[] + collection?: AppsInstallationsQuery["appsInstallations"] ) => collection?.find(app => app.id === id)?.appName; interface AppsListProps { params: AppListUrlQueryParams; @@ -80,7 +81,7 @@ export const AppsList: React.FC = ({ params }) => { data: appsInProgressData, loading: loadingAppsInProgress, refetch: appsInProgressRefetch - } = useAppsInProgressListQuery({ + } = useAppsInstallationsQuery({ displayLoader: false }); const { data, loading, refetch } = useAppsListQuery({ @@ -143,7 +144,7 @@ export const AppsList: React.FC = ({ params }) => { AppListUrlQueryParams >(navigate, appsListUrl, params); - const onAppRemove = (data: AppDelete) => { + const onAppRemove = (data: AppDeleteMutation) => { const errors = data.appDelete.errors; if (errors.length === 0) { if (data.appDelete.app.type === AppTypeEnum.LOCAL) { @@ -242,7 +243,7 @@ export const AppsList: React.FC = ({ params }) => { }); }; - const onAppInProgressRemove = (data: AppDeleteFailedInstallation) => { + const onAppInProgressRemove = (data: AppDeleteFailedInstallationMutation) => { const errors = data.appDeleteFailedInstallation.errors; if (errors.length === 0) { removeAppNotify(); diff --git a/src/apps/views/CustomAppCreate/CustomAppCreate.tsx b/src/apps/views/CustomAppCreate/CustomAppCreate.tsx index 5145c3172..1700ebfa1 100644 --- a/src/apps/views/CustomAppCreate/CustomAppCreate.tsx +++ b/src/apps/views/CustomAppCreate/CustomAppCreate.tsx @@ -1,4 +1,5 @@ import { WindowTitle } from "@saleor/components/WindowTitle"; +import { AppCreateMutation, useAppCreateMutation } from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; @@ -10,8 +11,6 @@ import { useIntl } from "react-intl"; import CustomAppCreatePage, { CustomAppCreatePageFormData } from "../../components/CustomAppCreatePage"; -import { useAppCreateMutation } from "../../mutations"; -import { AppCreate } from "../../types/AppCreate"; import { appsListUrl, customAppUrl } from "../../urls"; import { messages } from "./messages"; @@ -26,7 +25,7 @@ export const CustomAppCreate: React.FC = ({ const intl = useIntl(); const shop = useShop(); - const onSubmit = (data: AppCreate) => { + const onSubmit = (data: AppCreateMutation) => { if (data.appCreate.errors.length === 0) { notify({ status: "success", diff --git a/src/apps/views/CustomAppDetails/CustomAppDetails.tsx b/src/apps/views/CustomAppDetails/CustomAppDetails.tsx index 5424e09ac..b93bce8c8 100644 --- a/src/apps/views/CustomAppDetails/CustomAppDetails.tsx +++ b/src/apps/views/CustomAppDetails/CustomAppDetails.tsx @@ -6,6 +6,19 @@ import { appMessages } from "@saleor/apps/messages"; import NotFoundPage from "@saleor/components/NotFoundPage"; import { WindowTitle } from "@saleor/components/WindowTitle"; import { API_URI } from "@saleor/config"; +import { + AppTokenCreateMutation, + AppTokenDeleteMutation, + AppUpdateMutation, + useAppActivateMutation, + useAppDeactivateMutation, + useAppQuery, + useAppTokenCreateMutation, + useAppTokenDeleteMutation, + useAppUpdateMutation, + useWebhookDeleteMutation, + WebhookDeleteMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; @@ -14,8 +27,6 @@ import { extractMutationErrors, getStringOrPlaceholder } from "@saleor/misc"; import getAppErrorMessage from "@saleor/utils/errors/app"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import WebhookDeleteDialog from "@saleor/webhooks/components/WebhookDeleteDialog"; -import { useWebhookDeleteMutation } from "@saleor/webhooks/mutations"; -import { WebhookDelete } from "@saleor/webhooks/types/WebhookDelete"; import { webhookAddPath, webhookPath } from "@saleor/webhooks/urls"; import React from "react"; import { useIntl } from "react-intl"; @@ -23,17 +34,6 @@ import { useIntl } from "react-intl"; import CustomAppDetailsPage, { CustomAppDetailsPageFormData } from "../../components/CustomAppDetailsPage"; -import { - useAppActivateMutation, - useAppDeactivateMutation, - useAppTokenCreateMutation, - useAppTokenDeleteMutation, - useAppUpdateMutation -} from "../../mutations"; -import { useAppDetails } from "../../queries"; -import { AppTokenCreate } from "../../types/AppTokenCreate"; -import { AppTokenDelete } from "../../types/AppTokenDelete"; -import { AppUpdate } from "../../types/AppUpdate"; import { appsListUrl, customAppUrl, @@ -66,7 +66,7 @@ export const CustomAppDetails: React.FC = ({ CustomAppUrlQueryParams >(navigate, params => customAppUrl(id, params), params); - const { data, loading, refetch } = useAppDetails({ + const { data, loading, refetch } = useAppQuery({ displayLoader: true, variables: { id } }); @@ -111,7 +111,7 @@ export const CustomAppDetails: React.FC = ({ } }); - const onWebhookDelete = (data: WebhookDelete) => { + const onWebhookDelete = (data: WebhookDeleteMutation) => { if (data.webhookDelete.errors.length === 0) { notify({ status: "success", @@ -135,7 +135,7 @@ export const CustomAppDetails: React.FC = ({ }); }; - const onAppUpdate = (data: AppUpdate) => { + const onAppUpdate = (data: AppUpdateMutation) => { if (data?.appUpdate?.errors?.length === 0) { notify({ status: "success", @@ -150,12 +150,12 @@ export const CustomAppDetails: React.FC = ({ return ; } - const onTokenCreate = (data: AppTokenCreate) => { + const onTokenCreate = (data: AppTokenCreateMutation) => { if (data?.appTokenCreate?.errors.length === 0) { refetch(); } }; - const onTokenDelete = (data: AppTokenDelete) => { + const onTokenDelete = (data: AppTokenDeleteMutation) => { if (data?.appTokenDelete?.errors.length === 0) { notify({ status: "success", diff --git a/src/attributes/components/AttributeDetails/AttributeDetails.tsx b/src/attributes/components/AttributeDetails/AttributeDetails.tsx index e521d367f..bb5ac7b96 100644 --- a/src/attributes/components/AttributeDetails/AttributeDetails.tsx +++ b/src/attributes/components/AttributeDetails/AttributeDetails.tsx @@ -4,14 +4,14 @@ import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import FormSpacer from "@saleor/components/FormSpacer"; import SingleSelectField from "@saleor/components/SingleSelectField"; -import { AttributeErrorFragment } from "@saleor/fragments/types/AttributeErrorFragment"; +import { + AttributeEntityTypeEnum, + AttributeErrorFragment, + AttributeInputTypeEnum +} from "@saleor/graphql"; import { UseFormResult } from "@saleor/hooks/useForm"; import { commonMessages } from "@saleor/intl"; import { makeStyles } from "@saleor/macaw-ui"; -import { - AttributeEntityTypeEnum, - AttributeInputTypeEnum -} from "@saleor/types/globalTypes"; import { getFormErrors } from "@saleor/utils/errors"; import getAttributeErrorMessage from "@saleor/utils/errors/attribute"; import React from "react"; diff --git a/src/attributes/components/AttributeDetails/NumericUnits.tsx b/src/attributes/components/AttributeDetails/NumericUnits.tsx index da2b1647d..da5fe640a 100644 --- a/src/attributes/components/AttributeDetails/NumericUnits.tsx +++ b/src/attributes/components/AttributeDetails/NumericUnits.tsx @@ -1,10 +1,10 @@ import { AttributePageFormData } from "@saleor/attributes/components/AttributePage"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import SingleSelectField from "@saleor/components/SingleSelectField"; +import { MeasurementUnitsEnum } from "@saleor/graphql"; import { UseFormResult } from "@saleor/hooks/useForm"; import { commonMessages } from "@saleor/intl"; import { makeStyles } from "@saleor/macaw-ui"; -import { MeasurementUnitsEnum } from "@saleor/types/globalTypes"; import React, { useEffect, useMemo, useState } from "react"; import { useIntl } from "react-intl"; diff --git a/src/attributes/components/AttributeDetails/utils.ts b/src/attributes/components/AttributeDetails/utils.ts index 9936a2c4a..13264b5ef 100644 --- a/src/attributes/components/AttributeDetails/utils.ts +++ b/src/attributes/components/AttributeDetails/utils.ts @@ -1,5 +1,5 @@ import { Choice } from "@saleor/components/SingleSelectField"; -import { MeasurementUnitsEnum } from "@saleor/types/globalTypes"; +import { MeasurementUnitsEnum } from "@saleor/graphql"; import React from "react"; import { IntlShape, MessageDescriptor } from "react-intl"; diff --git a/src/attributes/components/AttributeList/AttributeList.tsx b/src/attributes/components/AttributeList/AttributeList.tsx index 760b6e7a6..029f8d686 100644 --- a/src/attributes/components/AttributeList/AttributeList.tsx +++ b/src/attributes/components/AttributeList/AttributeList.tsx @@ -6,6 +6,7 @@ import Skeleton from "@saleor/components/Skeleton"; import TableCellHeader from "@saleor/components/TableCellHeader"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; +import { AttributeFragment } from "@saleor/graphql"; import { translateBoolean } from "@saleor/intl"; import { makeStyles } from "@saleor/macaw-ui"; import { maybe, renderCollection } from "@saleor/misc"; @@ -14,13 +15,11 @@ import { getArrowDirection } from "@saleor/utils/sort"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { AttributeList_attributes_edges_node } from "../../types/AttributeList"; - export interface AttributeListProps extends ListProps, ListActions, SortPage { - attributes: AttributeList_attributes_edges_node[]; + attributes: AttributeFragment[]; } const useStyles = makeStyles( diff --git a/src/attributes/components/AttributeListPage/AttributeListPage.tsx b/src/attributes/components/AttributeListPage/AttributeListPage.tsx index 83d2dbfd6..39bfcffd6 100644 --- a/src/attributes/components/AttributeListPage/AttributeListPage.tsx +++ b/src/attributes/components/AttributeListPage/AttributeListPage.tsx @@ -1,6 +1,7 @@ import { Card } from "@material-ui/core"; import { AttributeListUrlSortField } from "@saleor/attributes/urls"; import FilterBar from "@saleor/components/FilterBar"; +import { AttributeFragment } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { Backlink, Button } from "@saleor/macaw-ui"; import React from "react"; @@ -15,7 +16,6 @@ import { SortPage, TabPageProps } from "../../../types"; -import { AttributeList_attributes_edges_node } from "../../types/AttributeList"; import AttributeList from "../AttributeList/AttributeList"; import { AttributeFilterKeys, @@ -29,7 +29,7 @@ export interface AttributeListPageProps FilterPageProps, SortPage, TabPageProps { - attributes: AttributeList_attributes_edges_node[]; + attributes: AttributeFragment[]; onBack: () => void; } diff --git a/src/attributes/components/AttributeOrganization/AttributeOrganization.tsx b/src/attributes/components/AttributeOrganization/AttributeOrganization.tsx index 5eeca6d0a..ef3ad60ac 100644 --- a/src/attributes/components/AttributeOrganization/AttributeOrganization.tsx +++ b/src/attributes/components/AttributeOrganization/AttributeOrganization.tsx @@ -1,8 +1,8 @@ import { Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import RadioGroupField from "@saleor/components/RadioGroupField"; +import { AttributeTypeEnum } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; -import { AttributeTypeEnum } from "@saleor/types/globalTypes"; import React from "react"; import { defineMessages, FormattedMessage, useIntl } from "react-intl"; diff --git a/src/attributes/components/AttributePage/AttributePage.tsx b/src/attributes/components/AttributePage/AttributePage.tsx index 3e1c1109b..b3f688384 100644 --- a/src/attributes/components/AttributePage/AttributePage.tsx +++ b/src/attributes/components/AttributePage/AttributePage.tsx @@ -1,4 +1,3 @@ -import { AttributeDetails_attribute_choices } from "@saleor/attributes/types/AttributeDetails"; import { ATTRIBUTE_TYPES_WITH_DEDICATED_VALUES } from "@saleor/attributes/utils/data"; import CardSpacer from "@saleor/components/CardSpacer"; import Container from "@saleor/components/Container"; @@ -9,20 +8,20 @@ import { MetadataFormData } from "@saleor/components/Metadata/types"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; import { ListSettingsUpdate } from "@saleor/components/TablePagination"; -import { AttributeDetailsFragment } from "@saleor/fragments/types/AttributeDetailsFragment"; -import { AttributeErrorFragment } from "@saleor/fragments/types/AttributeErrorFragment"; -import { SubmitPromise } from "@saleor/hooks/useForm"; -import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; -import { maybe } from "@saleor/misc"; -import { ListSettings, ReorderAction } from "@saleor/types"; import { + AttributeDetailsFragment, + AttributeDetailsQuery, AttributeEntityTypeEnum, + AttributeErrorFragment, AttributeInputTypeEnum, AttributeTypeEnum, MeasurementUnitsEnum -} from "@saleor/types/globalTypes"; +} from "@saleor/graphql"; +import { SubmitPromise } from "@saleor/hooks/useForm"; +import { sectionNames } from "@saleor/intl"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; +import { maybe } from "@saleor/misc"; +import { ListSettings, ReorderAction } from "@saleor/types"; import { mapEdgesToItems, mapMetadataItemToInput } from "@saleor/utils/maps"; import useMetadataChangeTrigger from "@saleor/utils/metadata/useMetadataChangeTrigger"; import React from "react"; @@ -39,7 +38,7 @@ export interface AttributePageProps { disabled: boolean; errors: AttributeErrorFragment[]; saveButtonBarState: ConfirmButtonTransitionState; - values: AttributeDetails_attribute_choices; + values: AttributeDetailsQuery["attribute"]["choices"]; onBack: () => void; onDelete: () => void; onSubmit: (data: AttributePageFormData) => SubmitPromise; diff --git a/src/attributes/components/AttributeProperties/AttributeProperties.tsx b/src/attributes/components/AttributeProperties/AttributeProperties.tsx index 035583f1f..2db3d8c2f 100644 --- a/src/attributes/components/AttributeProperties/AttributeProperties.tsx +++ b/src/attributes/components/AttributeProperties/AttributeProperties.tsx @@ -6,9 +6,8 @@ import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import ControlledSwitch from "@saleor/components/ControlledSwitch"; import FormSpacer from "@saleor/components/FormSpacer"; import Hr from "@saleor/components/Hr"; -import { AttributeErrorFragment } from "@saleor/fragments/types/AttributeErrorFragment"; +import { AttributeErrorFragment, AttributeTypeEnum } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; -import { AttributeTypeEnum } from "@saleor/types/globalTypes"; import { getFormErrors } from "@saleor/utils/errors"; import getAttributeErrorMessage from "@saleor/utils/errors/attribute"; import React from "react"; diff --git a/src/attributes/components/AttributeSwatchField/AttributeSwatchField.tsx b/src/attributes/components/AttributeSwatchField/AttributeSwatchField.tsx index 68cdbdca8..f0be6c41b 100644 --- a/src/attributes/components/AttributeSwatchField/AttributeSwatchField.tsx +++ b/src/attributes/components/AttributeSwatchField/AttributeSwatchField.tsx @@ -4,7 +4,7 @@ import { AttributeValueEditDialogFormData } from "@saleor/attributes/utils/data" import { ColorPicker } from "@saleor/components/ColorPicker"; import FileUploadField from "@saleor/components/FileUploadField"; import { RadioGroupField } from "@saleor/components/RadioGroupField"; -import { useFileUploadMutation } from "@saleor/files/mutations"; +import { useFileUploadMutation } from "@saleor/graphql"; import { UseFormResult } from "@saleor/hooks/useForm"; import useNotifier from "@saleor/hooks/useNotifier"; import { errorMessages } from "@saleor/intl"; diff --git a/src/attributes/components/AttributeValueEditDialog/AttributeValueEditDialog.tsx b/src/attributes/components/AttributeValueEditDialog/AttributeValueEditDialog.tsx index 9967a4819..c15febb1e 100644 --- a/src/attributes/components/AttributeValueEditDialog/AttributeValueEditDialog.tsx +++ b/src/attributes/components/AttributeValueEditDialog/AttributeValueEditDialog.tsx @@ -9,11 +9,13 @@ import { getAttributeValueErrorMessage } from "@saleor/attributes/errors"; import BackButton from "@saleor/components/BackButton"; import ConfirmButton from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; -import { AttributeErrorFragment } from "@saleor/fragments/types/AttributeErrorFragment"; +import { + AttributeErrorFragment, + AttributeInputTypeEnum +} from "@saleor/graphql"; import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import { buttonMessages } from "@saleor/intl"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { AttributeInputTypeEnum } from "@saleor/types/globalTypes"; import { getFormErrors } from "@saleor/utils/errors"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/attributes/components/AttributeValues/AttributeValues.tsx b/src/attributes/components/AttributeValues/AttributeValues.tsx index a752f3596..cf49b5fb9 100644 --- a/src/attributes/components/AttributeValues/AttributeValues.tsx +++ b/src/attributes/components/AttributeValues/AttributeValues.tsx @@ -13,18 +13,20 @@ import { SortableTableRow } from "@saleor/components/SortableTable"; import TablePagination from "@saleor/components/TablePagination"; -import { AttributeValueListFragment_edges_node } from "@saleor/fragments/types/AttributeValueListFragment"; +import { + AttributeInputTypeEnum, + AttributeValueListFragment +} from "@saleor/graphql"; import { Button, DeleteIcon, IconButton, makeStyles } from "@saleor/macaw-ui"; import { renderCollection, stopPropagation } from "@saleor/misc"; -import { ListProps, ReorderAction } from "@saleor/types"; -import { AttributeInputTypeEnum } from "@saleor/types/globalTypes"; +import { ListProps, RelayToFlat, ReorderAction } from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; export interface AttributeValuesProps extends Pick> { disabled: boolean; - values: AttributeValueListFragment_edges_node[]; + values: RelayToFlat; onValueAdd: () => void; onValueDelete: (id: string) => void; onValueReorder: ReorderAction; diff --git a/src/attributes/errors.ts b/src/attributes/errors.ts index f1f8a8c2b..e289a8617 100644 --- a/src/attributes/errors.ts +++ b/src/attributes/errors.ts @@ -1,5 +1,4 @@ -import { AttributeErrorFragment } from "@saleor/fragments/types/AttributeErrorFragment"; -import { AttributeErrorCode } from "@saleor/types/globalTypes"; +import { AttributeErrorCode, AttributeErrorFragment } from "@saleor/graphql"; import getAttributeErrorMessage from "@saleor/utils/errors/attribute"; import { defineMessages, IntlShape } from "react-intl"; diff --git a/src/attributes/fixtures.ts b/src/attributes/fixtures.ts index 6c342966a..bbfb59591 100644 --- a/src/attributes/fixtures.ts +++ b/src/attributes/fixtures.ts @@ -1,13 +1,13 @@ -import { ProductDetails_product_productType_variantAttributes } from "@saleor/products/types/ProductDetails"; import { + AttributeDetailsQuery, + AttributeEntityTypeEnum, AttributeInputTypeEnum, - AttributeTypeEnum -} from "@saleor/types/globalTypes"; + AttributeListQuery, + AttributeTypeEnum, + ProductDetailsQuery +} from "@saleor/graphql"; -import { AttributeDetails_attribute } from "./types/AttributeDetails"; -import { AttributeList_attributes_edges_node } from "./types/AttributeList"; - -export const attribute: AttributeDetails_attribute = { +export const attribute: AttributeDetailsQuery["attribute"] = { __typename: "Attribute" as "Attribute", availableInGrid: true, entityType: null, @@ -78,960 +78,948 @@ export const attribute: AttributeDetails_attribute = { visibleInStorefront: true }; -export const attributes: Array = [ +export const attributes: Array = [ { - node: { - __typename: "Attribute" as "Attribute", - filterableInDashboard: true, - filterableInStorefront: false, - id: "UHJvZHVjdEF0dHJpYnV0ZTo5", - name: "Author", - slug: "author", - type: AttributeTypeEnum.PRODUCT_TYPE, - inputType: AttributeInputTypeEnum.DROPDOWN, - valueRequired: false, - unit: null, - choices: { - __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", - pageInfo: { - endCursor: "WyI4IiwgIjMiXQ==", - hasNextPage: false, - hasPreviousPage: false, - startCursor: "WyIwIiwgIjQ5Il0=", - __typename: "PageInfo" as "PageInfo" - }, - edges: [ - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjI0", - name: "John Doe", - reference: null, - slug: "john-doe", - sortOrder: 0, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjI1", - name: "Milionare Pirate", - reference: null, - slug: "milionare-pirate", - sortOrder: 1, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - } - ] + __typename: "Attribute" as "Attribute", + entityType: AttributeEntityTypeEnum.PRODUCT, + filterableInDashboard: true, + filterableInStorefront: false, + id: "UHJvZHVjdEF0dHJpYnV0ZTo5", + name: "Author", + slug: "author", + type: AttributeTypeEnum.PRODUCT_TYPE, + inputType: AttributeInputTypeEnum.DROPDOWN, + valueRequired: false, + unit: null, + choices: { + __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", + pageInfo: { + endCursor: "WyI4IiwgIjMiXQ==", + hasNextPage: false, + hasPreviousPage: false, + startCursor: "WyIwIiwgIjQ5Il0=", + __typename: "PageInfo" as "PageInfo" }, - visibleInStorefront: true - } + edges: [ + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjI0", + name: "John Doe", + reference: null, + slug: "john-doe", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjI1", + name: "Milionare Pirate", + reference: null, + slug: "milionare-pirate", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + } + ] + }, + visibleInStorefront: true }, { - node: { - __typename: "Attribute" as "Attribute", - filterableInDashboard: true, - filterableInStorefront: false, - id: "UHJvZHVjdEF0dHJpYnV0ZTo2", - name: "Box Size", - slug: "box-size", - type: AttributeTypeEnum.PRODUCT_TYPE, - inputType: AttributeInputTypeEnum.DROPDOWN, - valueRequired: false, - unit: null, - choices: { - __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", - pageInfo: { - endCursor: "WyI4IiwgIjMiXQ==", - hasNextPage: false, - hasPreviousPage: false, - startCursor: "WyIwIiwgIjQ5Il0=", - __typename: "PageInfo" as "PageInfo" - }, - edges: [ - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjE1", - name: "100g", - reference: null, - slug: "100g", - sortOrder: 0, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjE2", - name: "250g", - reference: null, - slug: "250g", - sortOrder: 1, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjE3", - name: "500g", - reference: null, - slug: "500g", - sortOrder: 2, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjE4", - name: "1kg", - reference: null, - slug: "1kg", - sortOrder: 3, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - } - ] + __typename: "Attribute" as "Attribute", + entityType: AttributeEntityTypeEnum.PAGE, + filterableInDashboard: true, + filterableInStorefront: false, + id: "UHJvZHVjdEF0dHJpYnV0ZTo2", + name: "Box Size", + slug: "box-size", + type: AttributeTypeEnum.PRODUCT_TYPE, + inputType: AttributeInputTypeEnum.DROPDOWN, + valueRequired: false, + unit: null, + choices: { + __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", + pageInfo: { + endCursor: "WyI4IiwgIjMiXQ==", + hasNextPage: false, + hasPreviousPage: false, + startCursor: "WyIwIiwgIjQ5Il0=", + __typename: "PageInfo" as "PageInfo" }, - visibleInStorefront: false - } + edges: [ + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjE1", + name: "100g", + reference: null, + slug: "100g", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjE2", + name: "250g", + reference: null, + slug: "250g", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjE3", + name: "500g", + reference: null, + slug: "500g", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjE4", + name: "1kg", + reference: null, + slug: "1kg", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + } + ] + }, + visibleInStorefront: false }, { - node: { - __typename: "Attribute" as "Attribute", - filterableInDashboard: false, - filterableInStorefront: true, - id: "UHJvZHVjdEF0dHJpYnV0ZToz", - name: "Brand", - slug: "brand", - type: AttributeTypeEnum.PRODUCT_TYPE, - inputType: AttributeInputTypeEnum.DROPDOWN, - valueRequired: false, - unit: null, - choices: { - __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", - pageInfo: { - endCursor: "WyI4IiwgIjMiXQ==", - hasNextPage: false, - hasPreviousPage: false, - startCursor: "WyIwIiwgIjQ5Il0=", - __typename: "PageInfo" as "PageInfo" - }, - edges: [ - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjY=", - name: "Saleor", - reference: null, - slug: "saleor", - sortOrder: 0, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - } - ] + __typename: "Attribute" as "Attribute", + entityType: AttributeEntityTypeEnum.PRODUCT, + filterableInDashboard: false, + filterableInStorefront: true, + id: "UHJvZHVjdEF0dHJpYnV0ZToz", + name: "Brand", + slug: "brand", + type: AttributeTypeEnum.PRODUCT_TYPE, + inputType: AttributeInputTypeEnum.DROPDOWN, + valueRequired: false, + unit: null, + choices: { + __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", + pageInfo: { + endCursor: "WyI4IiwgIjMiXQ==", + hasNextPage: false, + hasPreviousPage: false, + startCursor: "WyIwIiwgIjQ5Il0=", + __typename: "PageInfo" as "PageInfo" }, - visibleInStorefront: false - } + edges: [ + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjY=", + name: "Saleor", + reference: null, + slug: "saleor", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + } + ] + }, + visibleInStorefront: false }, { - node: { - __typename: "Attribute" as "Attribute", - filterableInDashboard: true, - filterableInStorefront: true, - id: "UHJvZHVjdEF0dHJpYnV0ZTo4", - name: "Candy Box Size", - slug: "candy-box-size", - type: AttributeTypeEnum.PRODUCT_TYPE, - inputType: AttributeInputTypeEnum.DROPDOWN, - valueRequired: false, - unit: null, - choices: { - __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", - pageInfo: { - endCursor: "WyI4IiwgIjMiXQ==", - hasNextPage: false, - hasPreviousPage: false, - startCursor: "WyIwIiwgIjQ5Il0=", - __typename: "PageInfo" as "PageInfo" - }, - edges: [ - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjIx", - name: "100g", - reference: null, - slug: "100g", - sortOrder: 0, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjIy", - name: "250g", - reference: null, - slug: "250g", - sortOrder: 1, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjIz", - name: "500g", - reference: null, - slug: "500g", - sortOrder: 2, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - } - ] + __typename: "Attribute" as "Attribute", + entityType: AttributeEntityTypeEnum.PRODUCT, + filterableInDashboard: true, + filterableInStorefront: true, + id: "UHJvZHVjdEF0dHJpYnV0ZTo4", + name: "Candy Box Size", + slug: "candy-box-size", + type: AttributeTypeEnum.PRODUCT_TYPE, + inputType: AttributeInputTypeEnum.DROPDOWN, + valueRequired: false, + unit: null, + choices: { + __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", + pageInfo: { + endCursor: "WyI4IiwgIjMiXQ==", + hasNextPage: false, + hasPreviousPage: false, + startCursor: "WyIwIiwgIjQ5Il0=", + __typename: "PageInfo" as "PageInfo" }, - visibleInStorefront: false - } + edges: [ + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjIx", + name: "100g", + reference: null, + slug: "100g", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjIy", + name: "250g", + reference: null, + slug: "250g", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjIz", + name: "500g", + reference: null, + slug: "500g", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + } + ] + }, + visibleInStorefront: false }, { - node: { - __typename: "Attribute" as "Attribute", - filterableInDashboard: true, - filterableInStorefront: true, - id: "UHJvZHVjdEF0dHJpYnV0ZTo1", - name: "Coffee Genre", - slug: "coffee-genre", - type: AttributeTypeEnum.PRODUCT_TYPE, - inputType: AttributeInputTypeEnum.DROPDOWN, - valueRequired: false, - unit: null, - choices: { - __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", - pageInfo: { - endCursor: "WyI4IiwgIjMiXQ==", - hasNextPage: false, - hasPreviousPage: false, - startCursor: "WyIwIiwgIjQ5Il0=", - __typename: "PageInfo" as "PageInfo" - }, - edges: [ - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjEz", - name: "Arabica", - reference: null, - slug: "arabica", - sortOrder: 0, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjE0", - name: "Robusta", - reference: null, - slug: "robusta", - sortOrder: 1, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - } - ] + __typename: "Attribute" as "Attribute", + entityType: AttributeEntityTypeEnum.PAGE, + filterableInDashboard: true, + filterableInStorefront: true, + id: "UHJvZHVjdEF0dHJpYnV0ZTo1", + name: "Coffee Genre", + slug: "coffee-genre", + type: AttributeTypeEnum.PRODUCT_TYPE, + inputType: AttributeInputTypeEnum.DROPDOWN, + valueRequired: false, + unit: null, + choices: { + __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", + pageInfo: { + endCursor: "WyI4IiwgIjMiXQ==", + hasNextPage: false, + hasPreviousPage: false, + startCursor: "WyIwIiwgIjQ5Il0=", + __typename: "PageInfo" as "PageInfo" }, - visibleInStorefront: true - } + edges: [ + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjEz", + name: "Arabica", + reference: null, + slug: "arabica", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjE0", + name: "Robusta", + reference: null, + slug: "robusta", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + } + ] + }, + visibleInStorefront: true }, { - node: { - __typename: "Attribute" as "Attribute", - filterableInDashboard: false, - filterableInStorefront: true, - id: "UHJvZHVjdEF0dHJpYnV0ZToy", - name: "Collar", - slug: "collar", - type: AttributeTypeEnum.PRODUCT_TYPE, - inputType: AttributeInputTypeEnum.DROPDOWN, - valueRequired: false, - unit: null, - choices: { - __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", - pageInfo: { - endCursor: "WyI4IiwgIjMiXQ==", - hasNextPage: false, - hasPreviousPage: false, - startCursor: "WyIwIiwgIjQ5Il0=", - __typename: "PageInfo" as "PageInfo" - }, - edges: [ - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjM=", - name: "Round", - reference: null, - slug: "round", - sortOrder: 0, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjQ=", - name: "V-Neck", - reference: null, - slug: "v-neck", - sortOrder: 1, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjU=", - name: "Polo", - reference: null, - slug: "polo", - sortOrder: 2, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - } - ] + __typename: "Attribute" as "Attribute", + entityType: AttributeEntityTypeEnum.PRODUCT, + filterableInDashboard: false, + filterableInStorefront: true, + id: "UHJvZHVjdEF0dHJpYnV0ZToy", + name: "Collar", + slug: "collar", + type: AttributeTypeEnum.PRODUCT_TYPE, + inputType: AttributeInputTypeEnum.DROPDOWN, + valueRequired: false, + unit: null, + choices: { + __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", + pageInfo: { + endCursor: "WyI4IiwgIjMiXQ==", + hasNextPage: false, + hasPreviousPage: false, + startCursor: "WyIwIiwgIjQ5Il0=", + __typename: "PageInfo" as "PageInfo" }, - visibleInStorefront: true - } + edges: [ + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjM=", + name: "Round", + reference: null, + slug: "round", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjQ=", + name: "V-Neck", + reference: null, + slug: "v-neck", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjU=", + name: "Polo", + reference: null, + slug: "polo", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + } + ] + }, + visibleInStorefront: true }, { - node: { - __typename: "Attribute" as "Attribute", - filterableInDashboard: false, - filterableInStorefront: false, - id: "UHJvZHVjdEF0dHJpYnV0ZTox", - name: "Color", - slug: "color", - type: AttributeTypeEnum.PRODUCT_TYPE, - inputType: AttributeInputTypeEnum.DROPDOWN, - valueRequired: false, - unit: null, - choices: { - __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", - pageInfo: { - endCursor: "WyI4IiwgIjMiXQ==", - hasNextPage: false, - hasPreviousPage: false, - startCursor: "WyIwIiwgIjQ5Il0=", - __typename: "PageInfo" as "PageInfo" - }, - edges: [ - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjE=", - name: "Blue", - reference: null, - slug: "blue", - sortOrder: 0, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjI=", - name: "White", - reference: null, - slug: "white", - sortOrder: 1, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - } - ] + __typename: "Attribute" as "Attribute", + entityType: AttributeEntityTypeEnum.PAGE, + filterableInDashboard: false, + filterableInStorefront: false, + id: "UHJvZHVjdEF0dHJpYnV0ZTox", + name: "Color", + slug: "color", + type: AttributeTypeEnum.PRODUCT_TYPE, + inputType: AttributeInputTypeEnum.DROPDOWN, + valueRequired: false, + unit: null, + choices: { + __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", + pageInfo: { + endCursor: "WyI4IiwgIjMiXQ==", + hasNextPage: false, + hasPreviousPage: false, + startCursor: "WyIwIiwgIjQ5Il0=", + __typename: "PageInfo" as "PageInfo" }, - visibleInStorefront: true - } + edges: [ + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjE=", + name: "Blue", + reference: null, + slug: "blue", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjI=", + name: "White", + reference: null, + slug: "white", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + } + ] + }, + visibleInStorefront: true }, { - node: { - __typename: "Attribute" as "Attribute", - filterableInDashboard: true, - filterableInStorefront: false, - id: "UHJvZHVjdEF0dHJpYnV0ZToxMg==", - name: "Cover", - slug: "cover", - type: AttributeTypeEnum.PRODUCT_TYPE, - inputType: AttributeInputTypeEnum.DROPDOWN, - valueRequired: false, - unit: null, - choices: { - __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", - pageInfo: { - endCursor: "WyI4IiwgIjMiXQ==", - hasNextPage: false, - hasPreviousPage: false, - startCursor: "WyIwIiwgIjQ5Il0=", - __typename: "PageInfo" as "PageInfo" - }, - edges: [ - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjMw", - name: "Soft", - reference: null, - slug: "soft", - sortOrder: 0, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjMx", - name: "Hard", - reference: null, - slug: "hard", - sortOrder: 1, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjMy", - name: "Middle soft", - reference: null, - slug: "middle-soft", - sortOrder: 2, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjMz", - name: "Middle hard", - reference: null, - slug: "middle-hard", - sortOrder: 3, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjM0", - name: "Middle", - reference: null, - slug: "middle", - sortOrder: 4, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjM1", - name: "Very hard", - reference: null, - slug: "very-hard", - sortOrder: 5, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - } - ] + __typename: "Attribute" as "Attribute", + entityType: AttributeEntityTypeEnum.PRODUCT, + filterableInDashboard: true, + filterableInStorefront: false, + id: "UHJvZHVjdEF0dHJpYnV0ZToxMg==", + name: "Cover", + slug: "cover", + type: AttributeTypeEnum.PRODUCT_TYPE, + inputType: AttributeInputTypeEnum.DROPDOWN, + valueRequired: false, + unit: null, + choices: { + __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", + pageInfo: { + endCursor: "WyI4IiwgIjMiXQ==", + hasNextPage: false, + hasPreviousPage: false, + startCursor: "WyIwIiwgIjQ5Il0=", + __typename: "PageInfo" as "PageInfo" }, - visibleInStorefront: false - } + edges: [ + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjMw", + name: "Soft", + reference: null, + slug: "soft", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjMx", + name: "Hard", + reference: null, + slug: "hard", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjMy", + name: "Middle soft", + reference: null, + slug: "middle-soft", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjMz", + name: "Middle hard", + reference: null, + slug: "middle-hard", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjM0", + name: "Middle", + reference: null, + slug: "middle", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjM1", + name: "Very hard", + reference: null, + slug: "very-hard", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + } + ] + }, + visibleInStorefront: false }, { - node: { - __typename: "Attribute" as "Attribute", - filterableInDashboard: true, - filterableInStorefront: true, - id: "UHJvZHVjdEF0dHJpYnV0ZTo3", - name: "Flavor", - slug: "flavor", - type: AttributeTypeEnum.PRODUCT_TYPE, - inputType: AttributeInputTypeEnum.DROPDOWN, - valueRequired: false, - unit: null, - choices: { - __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", - pageInfo: { - endCursor: "WyI4IiwgIjMiXQ==", - hasNextPage: false, - hasPreviousPage: false, - startCursor: "WyIwIiwgIjQ5Il0=", - __typename: "PageInfo" as "PageInfo" - }, - edges: [ - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjE5", - name: "Sour", - reference: null, - slug: "sour", - sortOrder: 0, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjIw", - name: "Sweet", - reference: null, - slug: "sweet", - sortOrder: 1, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - } - ] + __typename: "Attribute" as "Attribute", + entityType: AttributeEntityTypeEnum.PRODUCT, + filterableInDashboard: true, + filterableInStorefront: true, + id: "UHJvZHVjdEF0dHJpYnV0ZTo3", + name: "Flavor", + slug: "flavor", + type: AttributeTypeEnum.PRODUCT_TYPE, + inputType: AttributeInputTypeEnum.DROPDOWN, + valueRequired: false, + unit: null, + choices: { + __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", + pageInfo: { + endCursor: "WyI4IiwgIjMiXQ==", + hasNextPage: false, + hasPreviousPage: false, + startCursor: "WyIwIiwgIjQ5Il0=", + __typename: "PageInfo" as "PageInfo" }, - visibleInStorefront: true - } + edges: [ + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjE5", + name: "Sour", + reference: null, + slug: "sour", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjIw", + name: "Sweet", + reference: null, + slug: "sweet", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + } + ] + }, + visibleInStorefront: true }, { - node: { - __typename: "Attribute" as "Attribute", - filterableInDashboard: false, - filterableInStorefront: true, - id: "UHJvZHVjdEF0dHJpYnV0ZToxMQ==", - name: "Language", - slug: "language", - type: AttributeTypeEnum.PRODUCT_TYPE, - inputType: AttributeInputTypeEnum.DROPDOWN, - valueRequired: false, - unit: null, - choices: { - __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", - pageInfo: { - endCursor: "WyI4IiwgIjMiXQ==", - hasNextPage: false, - hasPreviousPage: false, - startCursor: "WyIwIiwgIjQ5Il0=", - __typename: "PageInfo" as "PageInfo" - }, - edges: [ - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjI4", - name: "English", - reference: null, - slug: "english", - sortOrder: 0, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjI5", - name: "Pirate", - reference: null, - slug: "pirate", - sortOrder: 1, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - } - ] + __typename: "Attribute" as "Attribute", + entityType: AttributeEntityTypeEnum.PRODUCT, + filterableInDashboard: false, + filterableInStorefront: true, + id: "UHJvZHVjdEF0dHJpYnV0ZToxMQ==", + name: "Language", + slug: "language", + type: AttributeTypeEnum.PRODUCT_TYPE, + inputType: AttributeInputTypeEnum.DROPDOWN, + valueRequired: false, + unit: null, + choices: { + __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", + pageInfo: { + endCursor: "WyI4IiwgIjMiXQ==", + hasNextPage: false, + hasPreviousPage: false, + startCursor: "WyIwIiwgIjQ5Il0=", + __typename: "PageInfo" as "PageInfo" }, - visibleInStorefront: true - } + edges: [ + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjI4", + name: "English", + reference: null, + slug: "english", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjI5", + name: "Pirate", + reference: null, + slug: "pirate", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + } + ] + }, + visibleInStorefront: true }, { - node: { - __typename: "Attribute" as "Attribute", - filterableInDashboard: true, - filterableInStorefront: true, - id: "UHJvZHVjdEF0dHJpYnV0ZToxMA==", - name: "Publisher", - slug: "publisher", - type: AttributeTypeEnum.PRODUCT_TYPE, - inputType: AttributeInputTypeEnum.DROPDOWN, - valueRequired: false, - unit: null, - choices: { - __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", - pageInfo: { - endCursor: "WyI4IiwgIjMiXQ==", - hasNextPage: false, - hasPreviousPage: false, - startCursor: "WyIwIiwgIjQ5Il0=", - __typename: "PageInfo" as "PageInfo" - }, - edges: [ - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjI2", - name: "Mirumee Press", - reference: null, - slug: "mirumee-press", - sortOrder: 0, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjI3", - name: "Saleor Publishing", - reference: null, - slug: "saleor-publishing", - sortOrder: 1, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - } - ] + __typename: "Attribute" as "Attribute", + entityType: AttributeEntityTypeEnum.PAGE, + filterableInDashboard: true, + filterableInStorefront: true, + id: "UHJvZHVjdEF0dHJpYnV0ZToxMA==", + name: "Publisher", + slug: "publisher", + type: AttributeTypeEnum.PRODUCT_TYPE, + inputType: AttributeInputTypeEnum.DROPDOWN, + valueRequired: false, + unit: null, + choices: { + __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", + pageInfo: { + endCursor: "WyI4IiwgIjMiXQ==", + hasNextPage: false, + hasPreviousPage: false, + startCursor: "WyIwIiwgIjQ5Il0=", + __typename: "PageInfo" as "PageInfo" }, - visibleInStorefront: true - } + edges: [ + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjI2", + name: "Mirumee Press", + reference: null, + slug: "mirumee-press", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjI3", + name: "Saleor Publishing", + reference: null, + slug: "saleor-publishing", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + } + ] + }, + visibleInStorefront: true }, { - node: { - __typename: "Attribute" as "Attribute", - filterableInDashboard: true, - filterableInStorefront: true, - id: "UHJvZHVjdEF0dHJpYnV0ZTo0", - name: "Size", - slug: "size", - type: AttributeTypeEnum.PRODUCT_TYPE, - unit: null, - inputType: AttributeInputTypeEnum.DROPDOWN, - valueRequired: false, - choices: { - __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", - pageInfo: { - endCursor: "WyI4IiwgIjMiXQ==", - hasNextPage: false, - hasPreviousPage: false, - startCursor: "WyIwIiwgIjQ5Il0=", - __typename: "PageInfo" as "PageInfo" - }, - edges: [ - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjc=", - name: "XS", - reference: null, - slug: "xs", - sortOrder: 0, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjg=", - name: "S", - reference: null, - slug: "s", - sortOrder: 1, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjk=", - name: "M", - reference: null, - slug: "m", - sortOrder: 2, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjEw", - name: "L", - reference: null, - slug: "l", - sortOrder: 3, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjEx", - name: "XL", - reference: null, - slug: "xl", - sortOrder: 4, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - }, - { - __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", - cursor: "", - node: { - __typename: "AttributeValue" as "AttributeValue", - file: null, - id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjEy", - name: "XXL", - reference: null, - slug: "xxl", - sortOrder: 5, - value: "", - richText: null, - boolean: null, - date: null, - dateTime: null - } - } - ] + __typename: "Attribute" as "Attribute", + entityType: AttributeEntityTypeEnum.PRODUCT, + filterableInDashboard: true, + filterableInStorefront: true, + id: "UHJvZHVjdEF0dHJpYnV0ZTo0", + name: "Size", + slug: "size", + type: AttributeTypeEnum.PRODUCT_TYPE, + unit: null, + inputType: AttributeInputTypeEnum.DROPDOWN, + valueRequired: false, + choices: { + __typename: "AttributeValueCountableConnection" as "AttributeValueCountableConnection", + pageInfo: { + endCursor: "WyI4IiwgIjMiXQ==", + hasNextPage: false, + hasPreviousPage: false, + startCursor: "WyIwIiwgIjQ5Il0=", + __typename: "PageInfo" as "PageInfo" }, - visibleInStorefront: true - } + edges: [ + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjc=", + name: "XS", + reference: null, + slug: "xs", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjg=", + name: "S", + reference: null, + slug: "s", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjk=", + name: "M", + reference: null, + slug: "m", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjEw", + name: "L", + reference: null, + slug: "l", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjEx", + name: "XL", + reference: null, + slug: "xl", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + }, + { + __typename: "AttributeValueCountableEdge" as "AttributeValueCountableEdge", + cursor: "", + node: { + __typename: "AttributeValue" as "AttributeValue", + file: null, + id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjEy", + name: "XXL", + reference: null, + slug: "xxl", + + value: "", + richText: null, + boolean: null, + date: null, + dateTime: null + } + } + ] + }, + visibleInStorefront: true } -].map(edge => edge.node); +]; diff --git a/src/attributes/mutations.ts b/src/attributes/mutations.ts index 7768d5c72..7d2779d50 100644 --- a/src/attributes/mutations.ts +++ b/src/attributes/mutations.ts @@ -1,97 +1,39 @@ import { gql } from "@apollo/client"; -import { - attributeDetailsFragment, - attributeValueListFragment -} from "@saleor/fragments/attributes"; -import { attributeErrorFragment } from "@saleor/fragments/errors"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { - AttributeBulkDelete, - AttributeBulkDeleteVariables -} from "./types/AttributeBulkDelete"; -import { - AttributeCreate, - AttributeCreateVariables -} from "./types/AttributeCreate"; -import { - AttributeDelete, - AttributeDeleteVariables -} from "./types/AttributeDelete"; -import { - AttributeUpdate, - AttributeUpdateVariables -} from "./types/AttributeUpdate"; -import { - AttributeValueCreate, - AttributeValueCreateVariables -} from "./types/AttributeValueCreate"; -import { - AttributeValueDelete, - AttributeValueDeleteVariables -} from "./types/AttributeValueDelete"; -import { - AttributeValueReorder, - AttributeValueReorderVariables -} from "./types/AttributeValueReorder"; -import { - AttributeValueUpdate, - AttributeValueUpdateVariables -} from "./types/AttributeValueUpdate"; - -const attributeBulkDelete = gql` - ${attributeErrorFragment} +export const attributeBulkDelete = gql` mutation AttributeBulkDelete($ids: [ID!]!) { attributeBulkDelete(ids: $ids) { errors { - ...AttributeErrorFragment + ...AttributeError } } } `; -export const useAttributeBulkDeleteMutation = makeMutation< - AttributeBulkDelete, - AttributeBulkDeleteVariables ->(attributeBulkDelete); -const attributeDelete = gql` - ${attributeErrorFragment} +export const attributeDelete = gql` mutation AttributeDelete($id: ID!) { attributeDelete(id: $id) { errors { - ...AttributeErrorFragment + ...AttributeError } } } `; -export const useAttributeDeleteMutation = makeMutation< - AttributeDelete, - AttributeDeleteVariables ->(attributeDelete); export const attributeUpdateMutation = gql` - ${attributeDetailsFragment} - ${attributeErrorFragment} mutation AttributeUpdate($id: ID!, $input: AttributeUpdateInput!) { attributeUpdate(id: $id, input: $input) { attribute { - ...AttributeDetailsFragment + ...AttributeDetails } errors { - ...AttributeErrorFragment + ...AttributeError } } } `; -export const useAttributeUpdateMutation = makeMutation< - AttributeUpdate, - AttributeUpdateVariables ->(attributeUpdateMutation); -const attributeValueDelete = gql` - ${attributeValueListFragment} - ${attributeErrorFragment} +export const attributeValueDelete = gql` mutation AttributeValueDelete( $id: ID! $firstValues: Int @@ -108,23 +50,17 @@ const attributeValueDelete = gql` last: $lastValues before: $beforeValues ) { - ...AttributeValueListFragment + ...AttributeValueList } } errors { - ...AttributeErrorFragment + ...AttributeError } } } `; -export const useAttributeValueDeleteMutation = makeMutation< - AttributeValueDelete, - AttributeValueDeleteVariables ->(attributeValueDelete); export const attributeValueUpdateMutation = gql` - ${attributeValueListFragment} - ${attributeErrorFragment} mutation AttributeValueUpdate( $id: ID! $input: AttributeValueUpdateInput! @@ -142,23 +78,17 @@ export const attributeValueUpdateMutation = gql` last: $lastValues before: $beforeValues ) { - ...AttributeValueListFragment + ...AttributeValueList } } errors { - ...AttributeErrorFragment + ...AttributeError } } } `; -export const useAttributeValueUpdateMutation = makeMutation< - AttributeValueUpdate, - AttributeValueUpdateVariables ->(attributeValueUpdateMutation); export const attributeValueCreateMutation = gql` - ${attributeValueListFragment} - ${attributeErrorFragment} mutation AttributeValueCreate( $id: ID! $input: AttributeValueCreateInput! @@ -176,41 +106,30 @@ export const attributeValueCreateMutation = gql` last: $lastValues before: $beforeValues ) { - ...AttributeValueListFragment + ...AttributeValueList } } errors { - ...AttributeErrorFragment + ...AttributeError } } } `; -export const useAttributeValueCreateMutation = makeMutation< - AttributeValueCreate, - AttributeValueCreateVariables ->(attributeValueCreateMutation); export const attributeCreateMutation = gql` - ${attributeErrorFragment} mutation AttributeCreate($input: AttributeCreateInput!) { attributeCreate(input: $input) { attribute { id } errors { - ...AttributeErrorFragment + ...AttributeError } } } `; -export const useAttributeCreateMutation = makeMutation< - AttributeCreate, - AttributeCreateVariables ->(attributeCreateMutation); -const attributeValueReorderMutation = gql` - ${attributeErrorFragment} - ${pageInfoFragment} +export const attributeValueReorderMutation = gql` mutation AttributeValueReorder( $id: ID! $move: ReorderInput! @@ -229,7 +148,7 @@ const attributeValueReorderMutation = gql` before: $beforeValues ) { pageInfo { - ...PageInfoFragment + ...PageInfo } edges { cursor @@ -240,12 +159,8 @@ const attributeValueReorderMutation = gql` } } errors { - ...AttributeErrorFragment + ...AttributeError } } } `; -export const useAttributeValueReorderMutation = makeMutation< - AttributeValueReorder, - AttributeValueReorderVariables ->(attributeValueReorderMutation); diff --git a/src/attributes/queries.ts b/src/attributes/queries.ts index d57c247b7..6f4101b95 100644 --- a/src/attributes/queries.ts +++ b/src/attributes/queries.ts @@ -1,21 +1,6 @@ import { gql } from "@apollo/client"; -import { - attributeDetailsFragment, - attributeFragment, - attributeValueListFragment -} from "@saleor/fragments/attributes"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; -import makeQuery from "@saleor/hooks/makeQuery"; -import { - AttributeDetails, - AttributeDetailsVariables -} from "./types/AttributeDetails"; -import { AttributeList, AttributeListVariables } from "./types/AttributeList"; - -const attributeDetails = gql` - ${attributeDetailsFragment} - ${attributeValueListFragment} +export const attributeDetails = gql` query AttributeDetails( $id: ID! $firstValues: Int @@ -24,26 +9,20 @@ const attributeDetails = gql` $beforeValues: String ) { attribute(id: $id) { - ...AttributeDetailsFragment + ...AttributeDetails choices( first: $firstValues after: $afterValues last: $lastValues before: $beforeValues ) { - ...AttributeValueListFragment + ...AttributeValueList } } } `; -export const useAttributeDetailsQuery = makeQuery< - AttributeDetails, - AttributeDetailsVariables ->(attributeDetails); -const attributeList = gql` - ${attributeFragment} - ${pageInfoFragment} +export const attributeList = gql` query AttributeList( $filter: AttributeFilterInput $before: String @@ -62,16 +41,12 @@ const attributeList = gql` ) { edges { node { - ...AttributeFragment + ...Attribute } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export const useAttributeListQuery = makeQuery< - AttributeList, - AttributeListVariables ->(attributeList); diff --git a/src/attributes/types/AttributeBulkDelete.ts b/src/attributes/types/AttributeBulkDelete.ts deleted file mode 100644 index 2395909cc..000000000 --- a/src/attributes/types/AttributeBulkDelete.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AttributeBulkDelete -// ==================================================== - -export interface AttributeBulkDelete_attributeBulkDelete_errors { - __typename: "AttributeError"; - code: AttributeErrorCode; - field: string | null; - message: string | null; -} - -export interface AttributeBulkDelete_attributeBulkDelete { - __typename: "AttributeBulkDelete"; - errors: AttributeBulkDelete_attributeBulkDelete_errors[]; -} - -export interface AttributeBulkDelete { - attributeBulkDelete: AttributeBulkDelete_attributeBulkDelete | null; -} - -export interface AttributeBulkDeleteVariables { - ids: string[]; -} diff --git a/src/attributes/types/AttributeCreate.ts b/src/attributes/types/AttributeCreate.ts deleted file mode 100644 index 07501bbf5..000000000 --- a/src/attributes/types/AttributeCreate.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeCreateInput, AttributeErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AttributeCreate -// ==================================================== - -export interface AttributeCreate_attributeCreate_attribute { - __typename: "Attribute"; - id: string; -} - -export interface AttributeCreate_attributeCreate_errors { - __typename: "AttributeError"; - code: AttributeErrorCode; - field: string | null; - message: string | null; -} - -export interface AttributeCreate_attributeCreate { - __typename: "AttributeCreate"; - attribute: AttributeCreate_attributeCreate_attribute | null; - errors: AttributeCreate_attributeCreate_errors[]; -} - -export interface AttributeCreate { - attributeCreate: AttributeCreate_attributeCreate | null; -} - -export interface AttributeCreateVariables { - input: AttributeCreateInput; -} diff --git a/src/attributes/types/AttributeDelete.ts b/src/attributes/types/AttributeDelete.ts deleted file mode 100644 index 3b953347a..000000000 --- a/src/attributes/types/AttributeDelete.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AttributeDelete -// ==================================================== - -export interface AttributeDelete_attributeDelete_errors { - __typename: "AttributeError"; - code: AttributeErrorCode; - field: string | null; - message: string | null; -} - -export interface AttributeDelete_attributeDelete { - __typename: "AttributeDelete"; - errors: AttributeDelete_attributeDelete_errors[]; -} - -export interface AttributeDelete { - attributeDelete: AttributeDelete_attributeDelete | null; -} - -export interface AttributeDeleteVariables { - id: string; -} diff --git a/src/attributes/types/AttributeDetails.ts b/src/attributes/types/AttributeDetails.ts deleted file mode 100644 index 7e8e09182..000000000 --- a/src/attributes/types/AttributeDetails.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeTypeEnum, MeasurementUnitsEnum, AttributeInputTypeEnum, AttributeEntityTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: AttributeDetails -// ==================================================== - -export interface AttributeDetails_attribute_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface AttributeDetails_attribute_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface AttributeDetails_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface AttributeDetails_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface AttributeDetails_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: AttributeDetails_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface AttributeDetails_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: AttributeDetails_attribute_choices_edges_node; -} - -export interface AttributeDetails_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: AttributeDetails_attribute_choices_pageInfo; - edges: AttributeDetails_attribute_choices_edges[]; -} - -export interface AttributeDetails_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; - metadata: (AttributeDetails_attribute_metadata | null)[]; - privateMetadata: (AttributeDetails_attribute_privateMetadata | null)[]; - availableInGrid: boolean; - entityType: AttributeEntityTypeEnum | null; - storefrontSearchPosition: number; - valueRequired: boolean; - choices: AttributeDetails_attribute_choices | null; -} - -export interface AttributeDetails { - attribute: AttributeDetails_attribute | null; -} - -export interface AttributeDetailsVariables { - id: string; - firstValues?: number | null; - afterValues?: string | null; - lastValues?: number | null; - beforeValues?: string | null; -} diff --git a/src/attributes/types/AttributeList.ts b/src/attributes/types/AttributeList.ts deleted file mode 100644 index 18fbe0070..000000000 --- a/src/attributes/types/AttributeList.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeFilterInput, AttributeSortingInput, AttributeTypeEnum, MeasurementUnitsEnum, AttributeInputTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: AttributeList -// ==================================================== - -export interface AttributeList_attributes_edges_node { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface AttributeList_attributes_edges { - __typename: "AttributeCountableEdge"; - node: AttributeList_attributes_edges_node; -} - -export interface AttributeList_attributes_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface AttributeList_attributes { - __typename: "AttributeCountableConnection"; - edges: AttributeList_attributes_edges[]; - pageInfo: AttributeList_attributes_pageInfo; -} - -export interface AttributeList { - attributes: AttributeList_attributes | null; -} - -export interface AttributeListVariables { - filter?: AttributeFilterInput | null; - before?: string | null; - after?: string | null; - first?: number | null; - last?: number | null; - sort?: AttributeSortingInput | null; -} diff --git a/src/attributes/types/AttributeOfUploadedFile.ts b/src/attributes/types/AttributeOfUploadedFile.ts deleted file mode 100644 index 6ef35862d..000000000 --- a/src/attributes/types/AttributeOfUploadedFile.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { AttributeValueInput } from "@saleor/types/globalTypes"; - -export type AtributesOfFiles = Pick diff --git a/src/attributes/types/AttributeUpdate.ts b/src/attributes/types/AttributeUpdate.ts deleted file mode 100644 index 2cfc06f9a..000000000 --- a/src/attributes/types/AttributeUpdate.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeUpdateInput, AttributeTypeEnum, MeasurementUnitsEnum, AttributeInputTypeEnum, AttributeEntityTypeEnum, AttributeErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AttributeUpdate -// ==================================================== - -export interface AttributeUpdate_attributeUpdate_attribute_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface AttributeUpdate_attributeUpdate_attribute_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface AttributeUpdate_attributeUpdate_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; - metadata: (AttributeUpdate_attributeUpdate_attribute_metadata | null)[]; - privateMetadata: (AttributeUpdate_attributeUpdate_attribute_privateMetadata | null)[]; - availableInGrid: boolean; - entityType: AttributeEntityTypeEnum | null; - storefrontSearchPosition: number; - valueRequired: boolean; -} - -export interface AttributeUpdate_attributeUpdate_errors { - __typename: "AttributeError"; - code: AttributeErrorCode; - field: string | null; - message: string | null; -} - -export interface AttributeUpdate_attributeUpdate { - __typename: "AttributeUpdate"; - attribute: AttributeUpdate_attributeUpdate_attribute | null; - errors: AttributeUpdate_attributeUpdate_errors[]; -} - -export interface AttributeUpdate { - attributeUpdate: AttributeUpdate_attributeUpdate | null; -} - -export interface AttributeUpdateVariables { - id: string; - input: AttributeUpdateInput; -} diff --git a/src/attributes/types/AttributeValueCreate.ts b/src/attributes/types/AttributeValueCreate.ts deleted file mode 100644 index a2ab6409a..000000000 --- a/src/attributes/types/AttributeValueCreate.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeValueCreateInput, AttributeErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AttributeValueCreate -// ==================================================== - -export interface AttributeValueCreate_attributeValueCreate_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface AttributeValueCreate_attributeValueCreate_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface AttributeValueCreate_attributeValueCreate_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: AttributeValueCreate_attributeValueCreate_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface AttributeValueCreate_attributeValueCreate_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: AttributeValueCreate_attributeValueCreate_attribute_choices_edges_node; -} - -export interface AttributeValueCreate_attributeValueCreate_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: AttributeValueCreate_attributeValueCreate_attribute_choices_pageInfo; - edges: AttributeValueCreate_attributeValueCreate_attribute_choices_edges[]; -} - -export interface AttributeValueCreate_attributeValueCreate_attribute { - __typename: "Attribute"; - id: string; - choices: AttributeValueCreate_attributeValueCreate_attribute_choices | null; -} - -export interface AttributeValueCreate_attributeValueCreate_errors { - __typename: "AttributeError"; - code: AttributeErrorCode; - field: string | null; - message: string | null; -} - -export interface AttributeValueCreate_attributeValueCreate { - __typename: "AttributeValueCreate"; - attribute: AttributeValueCreate_attributeValueCreate_attribute | null; - errors: AttributeValueCreate_attributeValueCreate_errors[]; -} - -export interface AttributeValueCreate { - attributeValueCreate: AttributeValueCreate_attributeValueCreate | null; -} - -export interface AttributeValueCreateVariables { - id: string; - input: AttributeValueCreateInput; - firstValues?: number | null; - afterValues?: string | null; - lastValues?: number | null; - beforeValues?: string | null; -} diff --git a/src/attributes/types/AttributeValueDelete.ts b/src/attributes/types/AttributeValueDelete.ts deleted file mode 100644 index 11ab9274e..000000000 --- a/src/attributes/types/AttributeValueDelete.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AttributeValueDelete -// ==================================================== - -export interface AttributeValueDelete_attributeValueDelete_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface AttributeValueDelete_attributeValueDelete_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface AttributeValueDelete_attributeValueDelete_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: AttributeValueDelete_attributeValueDelete_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface AttributeValueDelete_attributeValueDelete_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: AttributeValueDelete_attributeValueDelete_attribute_choices_edges_node; -} - -export interface AttributeValueDelete_attributeValueDelete_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: AttributeValueDelete_attributeValueDelete_attribute_choices_pageInfo; - edges: AttributeValueDelete_attributeValueDelete_attribute_choices_edges[]; -} - -export interface AttributeValueDelete_attributeValueDelete_attribute { - __typename: "Attribute"; - id: string; - choices: AttributeValueDelete_attributeValueDelete_attribute_choices | null; -} - -export interface AttributeValueDelete_attributeValueDelete_errors { - __typename: "AttributeError"; - code: AttributeErrorCode; - field: string | null; - message: string | null; -} - -export interface AttributeValueDelete_attributeValueDelete { - __typename: "AttributeValueDelete"; - attribute: AttributeValueDelete_attributeValueDelete_attribute | null; - errors: AttributeValueDelete_attributeValueDelete_errors[]; -} - -export interface AttributeValueDelete { - attributeValueDelete: AttributeValueDelete_attributeValueDelete | null; -} - -export interface AttributeValueDeleteVariables { - id: string; - firstValues?: number | null; - afterValues?: string | null; - lastValues?: number | null; - beforeValues?: string | null; -} diff --git a/src/attributes/types/AttributeValueReorder.ts b/src/attributes/types/AttributeValueReorder.ts deleted file mode 100644 index 5755357e2..000000000 --- a/src/attributes/types/AttributeValueReorder.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ReorderInput, AttributeErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AttributeValueReorder -// ==================================================== - -export interface AttributeValueReorder_attributeReorderValues_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface AttributeValueReorder_attributeReorderValues_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; -} - -export interface AttributeValueReorder_attributeReorderValues_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: AttributeValueReorder_attributeReorderValues_attribute_choices_edges_node; -} - -export interface AttributeValueReorder_attributeReorderValues_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: AttributeValueReorder_attributeReorderValues_attribute_choices_pageInfo; - edges: AttributeValueReorder_attributeReorderValues_attribute_choices_edges[]; -} - -export interface AttributeValueReorder_attributeReorderValues_attribute { - __typename: "Attribute"; - id: string; - choices: AttributeValueReorder_attributeReorderValues_attribute_choices | null; -} - -export interface AttributeValueReorder_attributeReorderValues_errors { - __typename: "AttributeError"; - code: AttributeErrorCode; - field: string | null; - message: string | null; -} - -export interface AttributeValueReorder_attributeReorderValues { - __typename: "AttributeReorderValues"; - attribute: AttributeValueReorder_attributeReorderValues_attribute | null; - errors: AttributeValueReorder_attributeReorderValues_errors[]; -} - -export interface AttributeValueReorder { - attributeReorderValues: AttributeValueReorder_attributeReorderValues | null; -} - -export interface AttributeValueReorderVariables { - id: string; - move: ReorderInput; - firstValues?: number | null; - afterValues?: string | null; - lastValues?: number | null; - beforeValues?: string | null; -} diff --git a/src/attributes/types/AttributeValueUpdate.ts b/src/attributes/types/AttributeValueUpdate.ts deleted file mode 100644 index f562c9586..000000000 --- a/src/attributes/types/AttributeValueUpdate.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeValueUpdateInput, AttributeErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AttributeValueUpdate -// ==================================================== - -export interface AttributeValueUpdate_attributeValueUpdate_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface AttributeValueUpdate_attributeValueUpdate_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface AttributeValueUpdate_attributeValueUpdate_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: AttributeValueUpdate_attributeValueUpdate_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface AttributeValueUpdate_attributeValueUpdate_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: AttributeValueUpdate_attributeValueUpdate_attribute_choices_edges_node; -} - -export interface AttributeValueUpdate_attributeValueUpdate_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: AttributeValueUpdate_attributeValueUpdate_attribute_choices_pageInfo; - edges: AttributeValueUpdate_attributeValueUpdate_attribute_choices_edges[]; -} - -export interface AttributeValueUpdate_attributeValueUpdate_attribute { - __typename: "Attribute"; - id: string; - choices: AttributeValueUpdate_attributeValueUpdate_attribute_choices | null; -} - -export interface AttributeValueUpdate_attributeValueUpdate_errors { - __typename: "AttributeError"; - code: AttributeErrorCode; - field: string | null; - message: string | null; -} - -export interface AttributeValueUpdate_attributeValueUpdate { - __typename: "AttributeValueUpdate"; - attribute: AttributeValueUpdate_attributeValueUpdate_attribute | null; - errors: AttributeValueUpdate_attributeValueUpdate_errors[]; -} - -export interface AttributeValueUpdate { - attributeValueUpdate: AttributeValueUpdate_attributeValueUpdate | null; -} - -export interface AttributeValueUpdateVariables { - id: string; - input: AttributeValueUpdateInput; - firstValues?: number | null; - afterValues?: string | null; - lastValues?: number | null; - beforeValues?: string | null; -} diff --git a/src/attributes/utils/data.ts b/src/attributes/utils/data.ts index c6819f908..c8f2d9def 100644 --- a/src/attributes/utils/data.ts +++ b/src/attributes/utils/data.ts @@ -3,22 +3,25 @@ import { AttributeInput, AttributeInputData } from "@saleor/components/Attributes"; -import { FileUpload } from "@saleor/files/types/FileUpload"; -import { AttributeErrorFragment } from "@saleor/fragments/types/AttributeErrorFragment"; -import { AttributeValueFragment } from "@saleor/fragments/types/AttributeValueFragment"; -import { SelectedVariantAttributeFragment } from "@saleor/fragments/types/SelectedVariantAttributeFragment"; -import { UploadErrorFragment } from "@saleor/fragments/types/UploadErrorFragment"; -import { VariantAttributeFragment } from "@saleor/fragments/types/VariantAttributeFragment"; -import { FormsetData } from "@saleor/hooks/useFormset"; -import { PageDetails_page_attributes } from "@saleor/pages/types/PageDetails"; -import { ProductDetails_product_attributes } from "@saleor/products/types/ProductDetails"; -import { SearchPages_search_edges_node } from "@saleor/searches/types/SearchPages"; -import { SearchProducts_search_edges_node } from "@saleor/searches/types/SearchProducts"; import { AttributeEntityTypeEnum, + AttributeErrorFragment, AttributeInputTypeEnum, - AttributeValueInput -} from "@saleor/types/globalTypes"; + AttributeValueDeleteMutation, + AttributeValueFragment, + AttributeValueInput, + FileUploadMutation, + Node, + PageSelectedAttributeFragment, + ProductFragment, + SearchPagesQuery, + SearchProductsQuery, + SelectedVariantAttributeFragment, + UploadErrorFragment, + VariantAttributeFragment +} from "@saleor/graphql"; +import { FormsetData } from "@saleor/hooks/useFormset"; +import { RelayToFlat } from "@saleor/types"; import { mapEdgesToItems, mapNodeToChoice, @@ -26,8 +29,11 @@ import { } from "@saleor/utils/maps"; import { AttributePageFormData } from "../components/AttributePage"; -import { AtributesOfFiles } from "../types/AttributeOfUploadedFile"; -import { AttributeValueDelete } from "../types/AttributeValueDelete"; + +type AtributesOfFiles = Pick< + AttributeValueInput, + "file" | "id" | "values" | "contentType" +>; export const ATTRIBUTE_TYPES_WITH_DEDICATED_VALUES = [ AttributeInputTypeEnum.DROPDOWN, @@ -145,8 +151,8 @@ export function getDefaultAttributeValues(attribute: VariantAttributeFragment) { export function getSelectedAttributeValues( attribute: - | PageDetails_page_attributes - | ProductDetails_product_attributes + | PageSelectedAttributeFragment + | ProductFragment["attributes"][0] | SelectedVariantAttributeFragment ) { switch (attribute.attribute.inputType) { @@ -176,8 +182,8 @@ export function getSelectedAttributeValues( export const isFileValueUnused = ( attributesWithNewFileValue: FormsetData, existingAttribute: - | PageDetails_page_attributes - | ProductDetails_product_attributes + | PageSelectedAttributeFragment + | ProductFragment["attributes"][0] | SelectedVariantAttributeFragment ) => { if (existingAttribute.attribute.inputType !== AttributeInputTypeEnum.FILE) { @@ -195,7 +201,7 @@ export const isFileValueUnused = ( }; export const mergeFileUploadErrors = ( - uploadFilesResult: Array> + uploadFilesResult: Array> ): UploadErrorFragment[] => uploadFilesResult.reduce((errors, uploadFileResult) => { const uploadErrors = uploadFileResult?.data?.fileUpload?.errors; @@ -206,7 +212,7 @@ export const mergeFileUploadErrors = ( }, []); export const mergeAttributeValueDeleteErrors = ( - deleteAttributeValuesResult: Array> + deleteAttributeValuesResult: Array> ): AttributeErrorFragment[] => deleteAttributeValuesResult.reduce((errors, deleteValueResult) => { const deleteErrors = deleteValueResult?.data?.attributeValueDelete?.errors; @@ -218,8 +224,8 @@ export const mergeAttributeValueDeleteErrors = ( export const mergeChoicesWithValues = ( attribute: - | ProductDetails_product_attributes - | PageDetails_page_attributes + | ProductFragment["attributes"][0] + | PageSelectedAttributeFragment | SelectedVariantAttributeFragment ) => { const choices = mapEdgesToItems(attribute.attribute.choices) || []; @@ -262,7 +268,7 @@ export const getAttributesOfRemovedFiles = ( export const getAttributesOfUploadedFiles = ( fileValuesToUpload: FormsetData, - uploadFilesResult: Array> + uploadFilesResult: Array> ): AtributesOfFiles[] => uploadFilesResult.map((uploadFileResult, index) => { const attribute = fileValuesToUpload[index]; @@ -277,7 +283,7 @@ export const getAttributesOfUploadedFiles = ( export const getAttributesAfterFileAttributesUpdate = ( attributesWithNewFileValue: FormsetData, - uploadFilesResult: Array> + uploadFilesResult: Array> ): AttributeValueInput[] => { const removedFileValues = getFileValuesRemovedFromAttributes( attributesWithNewFileValue @@ -316,7 +322,7 @@ export const getFileAttributeDisplayData = ( export const getPageReferenceAttributeDisplayData = ( attribute: AttributeInput, - referencePages: SearchPages_search_edges_node[] + referencePages: RelayToFlat ) => ({ ...attribute, data: { @@ -337,7 +343,7 @@ export const getPageReferenceAttributeDisplayData = ( export const getProductReferenceAttributeDisplayData = ( attribute: AttributeInput, - referenceProducts: SearchProducts_search_edges_node[] + referenceProducts: RelayToFlat ) => ({ ...attribute, data: { @@ -358,8 +364,8 @@ export const getProductReferenceAttributeDisplayData = ( export const getReferenceAttributeDisplayData = ( attribute: AttributeInput, - referencePages: SearchPages_search_edges_node[], - referenceProducts: SearchProducts_search_edges_node[] + referencePages: RelayToFlat, + referenceProducts: RelayToFlat ) => { if (attribute.data.entityType === AttributeEntityTypeEnum.PAGE) { return getPageReferenceAttributeDisplayData(attribute, referencePages); @@ -374,8 +380,8 @@ export const getReferenceAttributeDisplayData = ( export const getAttributesDisplayData = ( attributes: AttributeInput[], attributesWithNewFileValue: FormsetData, - referencePages: SearchPages_search_edges_node[], - referenceProducts: SearchProducts_search_edges_node[] + referencePages: RelayToFlat, + referenceProducts: RelayToFlat ) => attributes.map(attribute => { if (attribute.data.inputType === AttributeInputTypeEnum.REFERENCE) { @@ -391,11 +397,9 @@ export const getAttributesDisplayData = ( return attribute; }); -export const getSelectedReferencesFromAttribute = < - Node extends SearchPages_search_edges_node | SearchProducts_search_edges_node ->( +export const getSelectedReferencesFromAttribute = ( attribute?: AttributeInput, - references?: Node[] + references?: T[] ) => references?.filter( value => @@ -405,8 +409,8 @@ export const getSelectedReferencesFromAttribute = < export const getAttributeValuesFromReferences = ( attributeId: string, attributes?: AttributeInput[], - referencePages?: SearchPages_search_edges_node[], - referenceProducts?: SearchProducts_search_edges_node[] + referencePages?: RelayToFlat, + referenceProducts?: RelayToFlat ) => { const attribute = attributes?.find(attribute => attribute.id === attributeId); diff --git a/src/attributes/utils/handlers.test.ts b/src/attributes/utils/handlers.test.ts index 2d01dd9c5..f03e0e28a 100644 --- a/src/attributes/utils/handlers.test.ts +++ b/src/attributes/utils/handlers.test.ts @@ -1,7 +1,7 @@ import { createAttributeMultiChangeHandler } from "@saleor/attributes/utils/handlers"; import { AttributeInputData } from "@saleor/components/Attributes"; +import { AttributeInputTypeEnum } from "@saleor/graphql"; import { FormsetData } from "@saleor/hooks/useFormset"; -import { AttributeInputTypeEnum } from "@saleor/types/globalTypes"; const attributes: FormsetData = [ { diff --git a/src/attributes/utils/handlers.ts b/src/attributes/utils/handlers.ts index 9508f164d..7cf629e84 100644 --- a/src/attributes/utils/handlers.ts +++ b/src/attributes/utils/handlers.ts @@ -4,29 +4,25 @@ import { AttributeInputData } from "@saleor/components/Attributes"; import { - FileUpload, - FileUploadVariables -} from "@saleor/files/types/FileUpload"; + AttributeEntityTypeEnum, + AttributeInputTypeEnum, + AttributeValueDeleteMutation, + AttributeValueDeleteMutationVariables, + AttributeValueInput, + FileUploadMutation, + FileUploadMutationVariables, + PageSelectedAttributeFragment, + ProductFragment, + ProductVariantDetailsQuery +} from "@saleor/graphql"; import { FormsetAtomicData, FormsetChange, FormsetData } from "@saleor/hooks/useFormset"; -import { PageDetails_page_attributes } from "@saleor/pages/types/PageDetails"; -import { ProductDetails_product_attributes } from "@saleor/products/types/ProductDetails"; -import { ProductVariantDetails_productVariant_nonSelectionAttributes } from "@saleor/products/types/ProductVariantDetails"; import { FetchMoreProps, ReorderEvent } from "@saleor/types"; -import { - AttributeEntityTypeEnum, - AttributeInputTypeEnum, - AttributeValueInput -} from "@saleor/types/globalTypes"; import { move, toggle } from "@saleor/utils/lists"; -import { - AttributeValueDelete, - AttributeValueDeleteVariables -} from "../types/AttributeValueDelete"; import { getFileValuesToUploadFromAttributes, isFileValueUnused } from "./data"; export function createAttributeChangeHandler( @@ -275,8 +271,8 @@ export const prepareAttributesInput = ({ export const handleUploadMultipleFiles = async ( attributesWithNewFileValue: FormsetData, uploadFile: ( - variables: FileUploadVariables - ) => Promise> + variables: FileUploadMutationVariables + ) => Promise> ) => Promise.all( getFileValuesToUploadFromAttributes(attributesWithNewFileValue).map( @@ -290,13 +286,13 @@ export const handleUploadMultipleFiles = async ( export const handleDeleteMultipleAttributeValues = async ( attributesWithNewFileValue: FormsetData, attributes: Array< - | PageDetails_page_attributes - | ProductDetails_product_attributes - | ProductVariantDetails_productVariant_nonSelectionAttributes + | PageSelectedAttributeFragment + | ProductFragment["attributes"][0] + | ProductVariantDetailsQuery["productVariant"]["nonSelectionAttributes"][0] >, deleteAttributeValue: ( - variables: AttributeValueDeleteVariables - ) => Promise> + variables: AttributeValueDeleteMutationVariables + ) => Promise> ) => Promise.all( attributes.map(existingAttribute => { diff --git a/src/attributes/views/AttributeCreate/AttributeCreate.tsx b/src/attributes/views/AttributeCreate/AttributeCreate.tsx index ae12e7ad0..7eb2de917 100644 --- a/src/attributes/views/AttributeCreate/AttributeCreate.tsx +++ b/src/attributes/views/AttributeCreate/AttributeCreate.tsx @@ -1,11 +1,16 @@ -import { AttributeErrorFragment } from "@saleor/fragments/types/AttributeErrorFragment"; +import { + AttributeErrorCode, + AttributeErrorFragment, + useAttributeCreateMutation, + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation +} from "@saleor/graphql"; import useListSettings from "@saleor/hooks/useListSettings"; import useLocalPageInfo, { getMaxPage } from "@saleor/hooks/useLocalPageInfo"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { getMutationErrors, getStringOrPlaceholder } from "@saleor/misc"; import { ListViews, ReorderEvent } from "@saleor/types"; -import { AttributeErrorCode } from "@saleor/types/globalTypes"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createMetadataCreateHandler from "@saleor/utils/handlers/metadataCreateHandler"; import { @@ -15,10 +20,6 @@ import { remove, updateAtIndex } from "@saleor/utils/lists"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; import React from "react"; import { useIntl } from "react-intl"; import slugify from "slugify"; @@ -28,7 +29,6 @@ import AttributePage, { } from "../../components/AttributePage"; import AttributeValueDeleteDialog from "../../components/AttributeValueDeleteDialog"; import AttributeValueEditDialog from "../../components/AttributeValueEditDialog"; -import { useAttributeCreateMutation } from "../../mutations"; import { attributeAddUrl, AttributeAddUrlDialog, @@ -96,8 +96,8 @@ const AttributeDetails: React.FC = ({ params }) => { } } }); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); const id = params.id ? parseInt(params.id, 0) + pageInfo.startCursor diff --git a/src/attributes/views/AttributeDetails/AttributeDetails.tsx b/src/attributes/views/AttributeDetails/AttributeDetails.tsx index 2ec2894d3..b64297b1e 100644 --- a/src/attributes/views/AttributeDetails/AttributeDetails.tsx +++ b/src/attributes/views/AttributeDetails/AttributeDetails.tsx @@ -1,4 +1,15 @@ import { attributeValueFragmentToFormData } from "@saleor/attributes/utils/data"; +import { + useAttributeDeleteMutation, + useAttributeDetailsQuery, + useAttributeUpdateMutation, + useAttributeValueCreateMutation, + useAttributeValueDeleteMutation, + useAttributeValueReorderMutation, + useAttributeValueUpdateMutation, + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation +} from "@saleor/graphql"; import useListSettings from "@saleor/hooks/useListSettings"; import useLocalPaginator, { useLocalPaginationState @@ -12,10 +23,6 @@ import getAttributeErrorMessage from "@saleor/utils/errors/attribute"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createMetadataUpdateHandler from "@saleor/utils/handlers/metadataUpdateHandler"; import { move } from "@saleor/utils/lists"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; import omit from "lodash/omit"; import React from "react"; import { useIntl } from "react-intl"; @@ -26,15 +33,6 @@ import AttributePage, { } from "../../components/AttributePage"; import AttributeValueDeleteDialog from "../../components/AttributeValueDeleteDialog"; import AttributeValueEditDialog from "../../components/AttributeValueEditDialog"; -import { - useAttributeDeleteMutation, - useAttributeUpdateMutation, - useAttributeValueCreateMutation, - useAttributeValueDeleteMutation, - useAttributeValueReorderMutation, - useAttributeValueUpdateMutation -} from "../../mutations"; -import { useAttributeDetailsQuery } from "../../queries"; import { attributeListUrl, attributeUrl, @@ -51,8 +49,8 @@ const AttributeDetails: React.FC = ({ id, params }) => { const navigate = useNavigator(); const notify = useNotifier(); const intl = useIntl(); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); const [openModal, closeModal] = createDialogActionHandlers< AttributeUrlDialog, @@ -178,6 +176,7 @@ const AttributeDetails: React.FC = ({ id, params }) => { const handleValueReorder = ({ newIndex, oldIndex }: ReorderEvent) => attributeValueReorder({ optimisticResponse: { + __typename: "Mutation", attributeReorderValues: { __typename: "AttributeReorderValues", attribute: { diff --git a/src/attributes/views/AttributeList/AttributeList.tsx b/src/attributes/views/AttributeList/AttributeList.tsx index 6a61dc195..9d1017993 100644 --- a/src/attributes/views/AttributeList/AttributeList.tsx +++ b/src/attributes/views/AttributeList/AttributeList.tsx @@ -12,6 +12,10 @@ import SaveFilterTabDialog, { SaveFilterTabDialogFormData } from "@saleor/components/SaveFilterTabDialog"; import { configurationMenuUrl } from "@saleor/configuration"; +import { + useAttributeBulkDeleteMutation, + useAttributeListQuery +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import usePaginator, { @@ -31,8 +35,6 @@ import useBulkActions from "../../../hooks/useBulkActions"; import { maybe } from "../../../misc"; import AttributeBulkDeleteDialog from "../../components/AttributeBulkDeleteDialog"; import AttributeListPage from "../../components/AttributeListPage"; -import { useAttributeBulkDeleteMutation } from "../../mutations"; -import { useAttributeListQuery } from "../../queries"; import { attributeAddUrl, attributeListUrl, diff --git a/src/attributes/views/AttributeList/filters.ts b/src/attributes/views/AttributeList/filters.ts index f582b964f..2ec9591f7 100644 --- a/src/attributes/views/AttributeList/filters.ts +++ b/src/attributes/views/AttributeList/filters.ts @@ -3,8 +3,8 @@ import { AttributeListFilterOpts } from "@saleor/attributes/components/AttributeListPage"; import { IFilterElement } from "@saleor/components/Filter"; +import { AttributeFilterInput } from "@saleor/graphql"; import { maybe, parseBoolean } from "@saleor/misc"; -import { AttributeFilterInput } from "@saleor/types/globalTypes"; import { createFilterTabUtils, diff --git a/src/attributes/views/AttributeList/sort.ts b/src/attributes/views/AttributeList/sort.ts index 41f3dfbd0..8f070a92d 100644 --- a/src/attributes/views/AttributeList/sort.ts +++ b/src/attributes/views/AttributeList/sort.ts @@ -1,5 +1,5 @@ import { AttributeListUrlSortField } from "@saleor/attributes/urls"; -import { AttributeSortField } from "@saleor/types/globalTypes"; +import { AttributeSortField } from "@saleor/graphql"; import { createGetSortQueryVariables } from "@saleor/utils/sort"; export function getSortQueryField( diff --git a/src/auth/AuthProvider.test.tsx b/src/auth/AuthProvider.test.tsx index 6ada0e4f7..86831e7b0 100644 --- a/src/auth/AuthProvider.test.tsx +++ b/src/auth/AuthProvider.test.tsx @@ -2,6 +2,7 @@ import { createSaleorClient, SaleorProvider } from "@saleor/sdk"; import setupApi from "@test/api"; import { act, renderHook } from "@testing-library/react-hooks"; import React from "react"; +import { IntlProvider } from "react-intl"; import { MemoryRouter as Router } from "react-router-dom"; import { useAuthProvider } from "./hooks/useAuthProvider"; @@ -18,9 +19,11 @@ function renderAuthProvider() { channel: "" }); const wrapper = ({ children }) => ( - - {children} - + + + {children} + + ); const { result } = renderHook( diff --git a/src/auth/components/Layout.tsx b/src/auth/components/Layout.tsx index 686d1b160..7b7750055 100644 --- a/src/auth/components/Layout.tsx +++ b/src/auth/components/Layout.tsx @@ -1,8 +1,7 @@ import backgroundArt from "@assets/images/login-background.svg"; import saleorDarkLogo from "@assets/images/logo-dark.svg"; import saleorLightLogo from "@assets/images/logo-light.svg"; -import { useTheme } from "@saleor/macaw-ui"; -import { makeStyles } from "@saleor/macaw-ui"; +import { makeStyles, useTheme } from "@saleor/macaw-ui"; import React from "react"; import SVG from "react-inlinesvg"; diff --git a/src/auth/components/LoginPage/LoginPage.tsx b/src/auth/components/LoginPage/LoginPage.tsx index fafb7d48a..a5e9f6952 100644 --- a/src/auth/components/LoginPage/LoginPage.tsx +++ b/src/auth/components/LoginPage/LoginPage.tsx @@ -5,8 +5,8 @@ import { Typography } from "@material-ui/core"; import { UserContextError } from "@saleor/auth/types"; -import { AvailableExternalAuthentications_shop_availableExternalAuthentications } from "@saleor/auth/types/AvailableExternalAuthentications"; import { FormSpacer } from "@saleor/components/FormSpacer"; +import { AvailableExternalAuthenticationsQuery } from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { commonMessages } from "@saleor/intl"; import { Button, EyeIcon, IconButton } from "@saleor/macaw-ui"; @@ -21,7 +21,7 @@ export interface LoginCardProps { error?: UserContextError; disabled: boolean; loading: boolean; - externalAuthentications?: AvailableExternalAuthentications_shop_availableExternalAuthentications[]; + externalAuthentications?: AvailableExternalAuthenticationsQuery["shop"]["availableExternalAuthentications"]; onExternalAuthentication: (pluginId: string) => void; onPasswordRecovery: () => void; onSubmit?: (event: LoginFormData) => SubmitPromise; diff --git a/src/auth/components/NewPasswordPage/NewPasswordPage.stories.tsx b/src/auth/components/NewPasswordPage/NewPasswordPage.stories.tsx index a6c6e6d4c..364260135 100644 --- a/src/auth/components/NewPasswordPage/NewPasswordPage.stories.tsx +++ b/src/auth/components/NewPasswordPage/NewPasswordPage.stories.tsx @@ -1,6 +1,6 @@ +import { AccountErrorCode } from "@saleor/graphql"; import CardDecorator from "@saleor/storybook//CardDecorator"; import Decorator from "@saleor/storybook//Decorator"; -import { AccountErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/auth/components/ResetPasswordPage/ResetPasswordPage.tsx b/src/auth/components/ResetPasswordPage/ResetPasswordPage.tsx index c3fafc100..df9bf1126 100644 --- a/src/auth/components/ResetPasswordPage/ResetPasswordPage.tsx +++ b/src/auth/components/ResetPasswordPage/ResetPasswordPage.tsx @@ -1,7 +1,7 @@ import { TextField, Typography } from "@material-ui/core"; -import { RequestPasswordReset_requestPasswordReset_errors } from "@saleor/auth/types/RequestPasswordReset"; import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; +import { RequestPasswordResetMutation } from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { commonMessages } from "@saleor/intl"; import { ArrowRightIcon, Button, IconButton } from "@saleor/macaw-ui"; @@ -19,7 +19,9 @@ export interface ResetPasswordPageProps { onBack: () => void; onSubmit: ( data: ResetPasswordPageFormData - ) => SubmitPromise; + ) => SubmitPromise< + RequestPasswordResetMutation["requestPasswordReset"]["errors"] + >; } const ResetPasswordPage: React.FC = props => { diff --git a/src/auth/components/SectionRoute.tsx b/src/auth/components/SectionRoute.tsx index 91428fe0f..c33e3a671 100644 --- a/src/auth/components/SectionRoute.tsx +++ b/src/auth/components/SectionRoute.tsx @@ -1,9 +1,9 @@ +import { PermissionEnum } from "@saleor/graphql"; import React from "react"; import { Route, RouteProps } from "react-router-dom"; import { useUser } from ".."; import NotFound from "../../NotFound"; -import { PermissionEnum } from "../../types/globalTypes"; import { hasAllPermissions, hasAnyPermissions } from "../misc"; type MatchPermissionType = "all" | "any"; diff --git a/src/auth/hooks/useAuthProvider.ts b/src/auth/hooks/useAuthProvider.ts index 003562cb5..fd3ff8614 100644 --- a/src/auth/hooks/useAuthProvider.ts +++ b/src/auth/hooks/useAuthProvider.ts @@ -1,6 +1,7 @@ -import { ApolloClient, useQuery } from "@apollo/client"; +import { ApolloClient } from "@apollo/client"; import { IMessageContext } from "@saleor/components/messages"; import { APP_DEFAULT_URI, APP_MOUNT_URI, DEMO_MODE } from "@saleor/config"; +import { useUserDetailsQuery } from "@saleor/graphql"; import useLocalStorage from "@saleor/hooks/useLocalStorage"; import useNavigator from "@saleor/hooks/useNavigator"; import { commonMessages } from "@saleor/intl"; @@ -19,7 +20,6 @@ import { useEffect, useRef, useState } from "react"; import { IntlShape } from "react-intl"; import urlJoin from "url-join"; -import { userDetailsQuery } from "../queries"; import { ExternalLoginInput, RequestExternalLoginInput, @@ -27,7 +27,6 @@ import { UserContext, UserContextError } from "../types"; -import { UserDetails } from "../types/UserDetails"; import { displayDemoMessage } from "../utils"; export interface UseAuthProviderOpts { @@ -80,7 +79,7 @@ export function useAuthProvider({ } }, [authenticated, authenticating]); - const userDetails = useQuery(userDetailsQuery, { + const userDetails = useUserDetailsQuery({ client: apolloClient, skip: !authenticated, // Don't change this to 'network-only' - update of intl provider's diff --git a/src/auth/misc.ts b/src/auth/misc.ts index dd964afec..44333ecd6 100644 --- a/src/auth/misc.ts +++ b/src/auth/misc.ts @@ -1,12 +1,14 @@ -import { User } from "@saleor/fragments/types/User"; +import { PermissionEnum, UserFragment } from "@saleor/graphql"; -import { PermissionEnum } from "../types/globalTypes"; - -export const hasPermission = (permission: PermissionEnum, user: User) => +export const hasPermission = (permission: PermissionEnum, user: UserFragment) => user.userPermissions.map(perm => perm.code).includes(permission); -export const hasAnyPermissions = (permissions: PermissionEnum[], user: User) => - permissions?.some(permission => hasPermission(permission, user)) || false; +export const hasAnyPermissions = ( + permissions: PermissionEnum[], + user: UserFragment +) => permissions?.some(permission => hasPermission(permission, user)) || false; -export const hasAllPermissions = (permissions: PermissionEnum[], user: User) => - permissions?.every(permission => hasPermission(permission, user)) || false; +export const hasAllPermissions = ( + permissions: PermissionEnum[], + user: UserFragment +) => permissions?.every(permission => hasPermission(permission, user)) || false; diff --git a/src/auth/mutations.ts b/src/auth/mutations.ts index 0dfaa0f97..ec57ce69e 100644 --- a/src/auth/mutations.ts +++ b/src/auth/mutations.ts @@ -1,23 +1,11 @@ import { gql } from "@apollo/client"; -import { accountErrorFragment } from "@saleor/fragments/errors"; - -import { TypedMutation } from "../mutations"; -import { - RequestPasswordReset, - RequestPasswordResetVariables -} from "./types/RequestPasswordReset"; export const requestPasswordReset = gql` - ${accountErrorFragment} mutation RequestPasswordReset($email: String!, $redirectUrl: String!) { requestPasswordReset(email: $email, redirectUrl: $redirectUrl) { errors { - ...AccountErrorFragment + ...AccountError } } } `; -export const RequestPasswordResetMutation = TypedMutation< - RequestPasswordReset, - RequestPasswordResetVariables ->(requestPasswordReset); diff --git a/src/auth/queries.ts b/src/auth/queries.ts index 320f99286..eca6f8b4b 100644 --- a/src/auth/queries.ts +++ b/src/auth/queries.ts @@ -1,5 +1,4 @@ import { gql } from "@apollo/client"; -import { fragmentUser } from "@saleor/fragments/auth"; export const availableExternalAuthentications = gql` query AvailableExternalAuthentications { @@ -13,7 +12,6 @@ export const availableExternalAuthentications = gql` `; export const userDetailsQuery = gql` - ${fragmentUser} query UserDetails { me { ...User diff --git a/src/auth/types.ts b/src/auth/types.ts index 74c107005..9836e72d1 100644 --- a/src/auth/types.ts +++ b/src/auth/types.ts @@ -1,4 +1,4 @@ -import { User } from "@saleor/fragments/types/User"; +import { UserFragment } from "@saleor/graphql"; import { GetExternalAccessTokenData, GetExternalAuthUrlData, @@ -34,7 +34,7 @@ export interface UserContext { pluginId: string, input: RequestExternalLoginInput ) => Promise; - user?: User; + user?: UserFragment; authenticating: boolean; authenticated: boolean; error?: UserContextError; diff --git a/src/auth/types/AvailableExternalAuthentications.ts b/src/auth/types/AvailableExternalAuthentications.ts deleted file mode 100644 index eecda7c0d..000000000 --- a/src/auth/types/AvailableExternalAuthentications.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: AvailableExternalAuthentications -// ==================================================== - -export interface AvailableExternalAuthentications_shop_availableExternalAuthentications { - __typename: "ExternalAuthentication"; - id: string; - name: string | null; -} - -export interface AvailableExternalAuthentications_shop { - __typename: "Shop"; - availableExternalAuthentications: AvailableExternalAuthentications_shop_availableExternalAuthentications[]; -} - -export interface AvailableExternalAuthentications { - shop: AvailableExternalAuthentications_shop; -} diff --git a/src/auth/types/ExternalAuthenticationUrl.ts b/src/auth/types/ExternalAuthenticationUrl.ts deleted file mode 100644 index fe25b21ec..000000000 --- a/src/auth/types/ExternalAuthenticationUrl.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AccountErrorCode, AddressTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ExternalAuthenticationUrl -// ==================================================== - -export interface ExternalAuthenticationUrl_externalAuthenticationUrl_errors { - __typename: "AccountError"; - code: AccountErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; -} - -export interface ExternalAuthenticationUrl_externalAuthenticationUrl { - __typename: "ExternalAuthenticationUrl"; - authenticationData: any | null; - errors: ExternalAuthenticationUrl_externalAuthenticationUrl_errors[]; -} - -export interface ExternalAuthenticationUrl { - externalAuthenticationUrl: ExternalAuthenticationUrl_externalAuthenticationUrl | null; -} - -export interface ExternalAuthenticationUrlVariables { - pluginId: string; - input: any; -} diff --git a/src/auth/types/ExternalObtainAccessTokens.ts b/src/auth/types/ExternalObtainAccessTokens.ts deleted file mode 100644 index 135236529..000000000 --- a/src/auth/types/ExternalObtainAccessTokens.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PermissionEnum, AccountErrorCode, AddressTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ExternalObtainAccessTokens -// ==================================================== - -export interface ExternalObtainAccessTokens_externalObtainAccessTokens_user_userPermissions { - __typename: "UserPermission"; - code: PermissionEnum; - name: string; -} - -export interface ExternalObtainAccessTokens_externalObtainAccessTokens_user_avatar { - __typename: "Image"; - url: string; -} - -export interface ExternalObtainAccessTokens_externalObtainAccessTokens_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; - isStaff: boolean; - userPermissions: (ExternalObtainAccessTokens_externalObtainAccessTokens_user_userPermissions | null)[] | null; - avatar: ExternalObtainAccessTokens_externalObtainAccessTokens_user_avatar | null; -} - -export interface ExternalObtainAccessTokens_externalObtainAccessTokens_errors { - __typename: "AccountError"; - code: AccountErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; -} - -export interface ExternalObtainAccessTokens_externalObtainAccessTokens { - __typename: "ExternalObtainAccessTokens"; - token: string | null; - csrfToken: string | null; - user: ExternalObtainAccessTokens_externalObtainAccessTokens_user | null; - errors: ExternalObtainAccessTokens_externalObtainAccessTokens_errors[]; -} - -export interface ExternalObtainAccessTokens { - externalObtainAccessTokens: ExternalObtainAccessTokens_externalObtainAccessTokens | null; -} - -export interface ExternalObtainAccessTokensVariables { - pluginId: string; - input: any; -} diff --git a/src/auth/types/ExternalRefreshToken.ts b/src/auth/types/ExternalRefreshToken.ts deleted file mode 100644 index 291f339c6..000000000 --- a/src/auth/types/ExternalRefreshToken.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL mutation operation: ExternalRefreshToken -// ==================================================== - -export interface ExternalRefreshToken_externalRefresh { - __typename: "ExternalRefresh"; - token: string | null; -} - -export interface ExternalRefreshToken { - externalRefresh: ExternalRefreshToken_externalRefresh | null; -} - -export interface ExternalRefreshTokenVariables { - pluginId: string; - input: any; -} diff --git a/src/auth/types/ExternalVerifyToken.ts b/src/auth/types/ExternalVerifyToken.ts deleted file mode 100644 index 7a7ee5d52..000000000 --- a/src/auth/types/ExternalVerifyToken.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ExternalVerifyToken -// ==================================================== - -export interface ExternalVerifyToken_externalVerify_user_userPermissions { - __typename: "UserPermission"; - code: PermissionEnum; - name: string; -} - -export interface ExternalVerifyToken_externalVerify_user_avatar { - __typename: "Image"; - url: string; -} - -export interface ExternalVerifyToken_externalVerify_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; - isStaff: boolean; - userPermissions: (ExternalVerifyToken_externalVerify_user_userPermissions | null)[] | null; - avatar: ExternalVerifyToken_externalVerify_user_avatar | null; -} - -export interface ExternalVerifyToken_externalVerify { - __typename: "ExternalVerify"; - verifyData: any | null; - user: ExternalVerifyToken_externalVerify_user | null; -} - -export interface ExternalVerifyToken { - externalVerify: ExternalVerifyToken_externalVerify | null; -} - -export interface ExternalVerifyTokenVariables { - pluginId: string; - input: any; -} diff --git a/src/auth/types/RefreshToken.ts b/src/auth/types/RefreshToken.ts deleted file mode 100644 index b7af12a9b..000000000 --- a/src/auth/types/RefreshToken.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL mutation operation: RefreshToken -// ==================================================== - -export interface RefreshToken_tokenRefresh { - __typename: "RefreshToken"; - token: string | null; -} - -export interface RefreshToken { - tokenRefresh: RefreshToken_tokenRefresh | null; -} - -export interface RefreshTokenVariables { - token: string; -} diff --git a/src/auth/types/RequestPasswordReset.ts b/src/auth/types/RequestPasswordReset.ts deleted file mode 100644 index c45cfacdc..000000000 --- a/src/auth/types/RequestPasswordReset.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AccountErrorCode, AddressTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: RequestPasswordReset -// ==================================================== - -export interface RequestPasswordReset_requestPasswordReset_errors { - __typename: "AccountError"; - code: AccountErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface RequestPasswordReset_requestPasswordReset { - __typename: "RequestPasswordReset"; - errors: RequestPasswordReset_requestPasswordReset_errors[]; -} - -export interface RequestPasswordReset { - requestPasswordReset: RequestPasswordReset_requestPasswordReset | null; -} - -export interface RequestPasswordResetVariables { - email: string; - redirectUrl: string; -} diff --git a/src/auth/types/SetPassword.ts b/src/auth/types/SetPassword.ts deleted file mode 100644 index 850e2d747..000000000 --- a/src/auth/types/SetPassword.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AccountErrorCode, AddressTypeEnum, PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: SetPassword -// ==================================================== - -export interface SetPassword_setPassword_errors { - __typename: "AccountError"; - code: AccountErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; -} - -export interface SetPassword_setPassword_user_userPermissions { - __typename: "UserPermission"; - code: PermissionEnum; - name: string; -} - -export interface SetPassword_setPassword_user_avatar { - __typename: "Image"; - url: string; -} - -export interface SetPassword_setPassword_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; - isStaff: boolean; - userPermissions: (SetPassword_setPassword_user_userPermissions | null)[] | null; - avatar: SetPassword_setPassword_user_avatar | null; -} - -export interface SetPassword_setPassword { - __typename: "SetPassword"; - errors: SetPassword_setPassword_errors[]; - csrfToken: string | null; - refreshToken: string | null; - token: string | null; - user: SetPassword_setPassword_user | null; -} - -export interface SetPassword { - setPassword: SetPassword_setPassword | null; -} - -export interface SetPasswordVariables { - email: string; - password: string; - token: string; -} diff --git a/src/auth/types/TokenAuth.ts b/src/auth/types/TokenAuth.ts deleted file mode 100644 index e0a4cf1cd..000000000 --- a/src/auth/types/TokenAuth.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: TokenAuth -// ==================================================== - -export interface TokenAuth_tokenCreate_errors { - __typename: "AccountError"; - field: string | null; - message: string | null; -} - -export interface TokenAuth_tokenCreate_user_userPermissions { - __typename: "UserPermission"; - code: PermissionEnum; - name: string; -} - -export interface TokenAuth_tokenCreate_user_avatar { - __typename: "Image"; - url: string; -} - -export interface TokenAuth_tokenCreate_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; - isStaff: boolean; - userPermissions: (TokenAuth_tokenCreate_user_userPermissions | null)[] | null; - avatar: TokenAuth_tokenCreate_user_avatar | null; -} - -export interface TokenAuth_tokenCreate { - __typename: "CreateToken"; - errors: TokenAuth_tokenCreate_errors[]; - csrfToken: string | null; - token: string | null; - user: TokenAuth_tokenCreate_user | null; -} - -export interface TokenAuth { - tokenCreate: TokenAuth_tokenCreate | null; -} - -export interface TokenAuthVariables { - email: string; - password: string; -} diff --git a/src/auth/types/UserDetails.ts b/src/auth/types/UserDetails.ts deleted file mode 100644 index 9ac5b520f..000000000 --- a/src/auth/types/UserDetails.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: UserDetails -// ==================================================== - -export interface UserDetails_me_userPermissions { - __typename: "UserPermission"; - code: PermissionEnum; - name: string; -} - -export interface UserDetails_me_avatar { - __typename: "Image"; - url: string; -} - -export interface UserDetails_me { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; - isStaff: boolean; - userPermissions: (UserDetails_me_userPermissions | null)[] | null; - avatar: UserDetails_me_avatar | null; -} - -export interface UserDetails { - me: UserDetails_me | null; -} diff --git a/src/auth/types/VerifyToken.ts b/src/auth/types/VerifyToken.ts deleted file mode 100644 index 060b470cc..000000000 --- a/src/auth/types/VerifyToken.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: VerifyToken -// ==================================================== - -export interface VerifyToken_tokenVerify_user_userPermissions { - __typename: "UserPermission"; - code: PermissionEnum; - name: string; -} - -export interface VerifyToken_tokenVerify_user_avatar { - __typename: "Image"; - url: string; -} - -export interface VerifyToken_tokenVerify_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; - isStaff: boolean; - userPermissions: (VerifyToken_tokenVerify_user_userPermissions | null)[] | null; - avatar: VerifyToken_tokenVerify_user_avatar | null; -} - -export interface VerifyToken_tokenVerify { - __typename: "VerifyToken"; - payload: any | null; - user: VerifyToken_tokenVerify_user | null; -} - -export interface VerifyToken { - tokenVerify: VerifyToken_tokenVerify | null; -} - -export interface VerifyTokenVariables { - token: string; -} diff --git a/src/auth/views/Login.tsx b/src/auth/views/Login.tsx index 039de4958..a18ae1e6d 100644 --- a/src/auth/views/Login.tsx +++ b/src/auth/views/Login.tsx @@ -1,5 +1,5 @@ -import { useQuery } from "@apollo/client"; import { APP_DEFAULT_URI, APP_MOUNT_URI } from "@saleor/config"; +import { useAvailableExternalAuthenticationsQuery } from "@saleor/graphql"; import useLocalStorage from "@saleor/hooks/useLocalStorage"; import useNavigator from "@saleor/hooks/useNavigator"; import React, { useEffect } from "react"; @@ -9,8 +9,6 @@ import useRouter from "use-react-router"; import { useUser } from ".."; import LoginPage from "../components/LoginPage"; import { LoginFormData } from "../components/LoginPage/types"; -import { availableExternalAuthentications } from "../queries"; -import { AvailableExternalAuthentications } from "../types/AvailableExternalAuthentications"; import { loginCallbackPath, LoginUrlQueryParams, @@ -34,9 +32,7 @@ const LoginView: React.FC = ({ params }) => { const { data: externalAuthentications, loading: externalAuthenticationsLoading - } = useQuery( - availableExternalAuthentications - ); + } = useAvailableExternalAuthenticationsQuery(); const [ requestedExternalPluginId, setRequestedExternalPluginId diff --git a/src/auth/views/ResetPassword.tsx b/src/auth/views/ResetPassword.tsx index d9606f734..dc7cd4f9f 100644 --- a/src/auth/views/ResetPassword.tsx +++ b/src/auth/views/ResetPassword.tsx @@ -1,4 +1,5 @@ import { APP_MOUNT_URI } from "@saleor/config"; +import { useRequestPasswordResetMutation } from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import { commonMessages } from "@saleor/intl"; import { extractMutationErrors } from "@saleor/misc"; @@ -9,8 +10,6 @@ import urlJoin from "url-join"; import ResetPasswordPage, { ResetPasswordPageFormData } from "../components/ResetPasswordPage"; -import { RequestPasswordResetMutation } from "../mutations"; -import { RequestPasswordReset } from "../types/RequestPasswordReset"; import { newPasswordUrl, passwordResetSuccessUrl } from "../urls"; const ResetPasswordView: React.FC = () => { @@ -18,50 +17,51 @@ const ResetPasswordView: React.FC = () => { const navigate = useNavigator(); const intl = useIntl(); - const handleRequestPasswordReset = (data: RequestPasswordReset) => { - if (data.requestPasswordReset.errors.length === 0) { - navigate(passwordResetSuccessUrl); - } else { - if (data.requestPasswordReset.errors.find(err => err.field === "email")) { - setError( - intl.formatMessage({ - defaultMessage: - "Provided email address does not exist in our database." - }) - ); + const [ + requestPasswordReset, + requestPasswordResetOpts + ] = useRequestPasswordResetMutation({ + onCompleted: data => { + if (data.requestPasswordReset.errors.length === 0) { + navigate(passwordResetSuccessUrl); } else { - setError(intl.formatMessage(commonMessages.somethingWentWrong)); - } - } - }; - - return ( - - {(requestPasswordReset, requestPasswordResetOpts) => { - const handleSubmit = (data: ResetPasswordPageFormData) => - extractMutationErrors( - requestPasswordReset({ - variables: { - email: data.email, - redirectUrl: urlJoin( - window.location.origin, - APP_MOUNT_URI === "/" ? "" : APP_MOUNT_URI, - newPasswordUrl().replace(/\?/, "") - ) - } + if ( + data.requestPasswordReset.errors.find(err => err.field === "email") + ) { + setError( + intl.formatMessage({ + defaultMessage: + "Provided email address does not exist in our database." }) ); + } else { + setError(intl.formatMessage(commonMessages.somethingWentWrong)); + } + } + } + }); - return ( - navigate(APP_MOUNT_URI)} - onSubmit={handleSubmit} - /> - ); - }} - + const handleSubmit = (data: ResetPasswordPageFormData) => + extractMutationErrors( + requestPasswordReset({ + variables: { + email: data.email, + redirectUrl: urlJoin( + window.location.origin, + APP_MOUNT_URI === "/" ? "" : APP_MOUNT_URI, + newPasswordUrl().replace(/\?/, "") + ) + } + }) + ); + + return ( + navigate(APP_MOUNT_URI)} + onSubmit={handleSubmit} + /> ); }; ResetPasswordView.displayName = "ResetPasswordView"; diff --git a/src/categories/components/CategoryBackground/CategoryBackground.tsx b/src/categories/components/CategoryBackground/CategoryBackground.tsx index f532e8fb8..f4f44b417 100644 --- a/src/categories/components/CategoryBackground/CategoryBackground.tsx +++ b/src/categories/components/CategoryBackground/CategoryBackground.tsx @@ -4,12 +4,12 @@ import Hr from "@saleor/components/Hr"; import ImageUpload from "@saleor/components/ImageUpload"; import MediaTile from "@saleor/components/MediaTile"; import Skeleton from "@saleor/components/Skeleton"; +import { CategoryDetailsFragment } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { Button, makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { CategoryDetails_category_backgroundImage } from "../../types/CategoryDetails"; import { CategoryUpdateData } from "../CategoryUpdatePage/form"; const useStyles = makeStyles( @@ -40,7 +40,7 @@ const useStyles = makeStyles( export interface CategoryBackgroundProps { data: CategoryUpdateData; - image: CategoryDetails_category_backgroundImage; + image: CategoryDetailsFragment["backgroundImage"]; onChange: (event: React.ChangeEvent) => void; onImageDelete: () => void; onImageUpload: (file: File) => void; diff --git a/src/categories/components/CategoryCreatePage/CategoryCreatePage.tsx b/src/categories/components/CategoryCreatePage/CategoryCreatePage.tsx index 218dbd7a0..e32ade7dd 100644 --- a/src/categories/components/CategoryCreatePage/CategoryCreatePage.tsx +++ b/src/categories/components/CategoryCreatePage/CategoryCreatePage.tsx @@ -4,10 +4,9 @@ import Metadata from "@saleor/components/Metadata"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; import SeoForm from "@saleor/components/SeoForm"; -import { ProductErrorFragment } from "@saleor/fragments/types/ProductErrorFragment"; +import { ProductErrorFragment } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import React from "react"; import { useIntl } from "react-intl"; diff --git a/src/categories/components/CategoryDetailsForm/CategoryDetailsForm.tsx b/src/categories/components/CategoryDetailsForm/CategoryDetailsForm.tsx index 07263b05a..91ab6a416 100644 --- a/src/categories/components/CategoryDetailsForm/CategoryDetailsForm.tsx +++ b/src/categories/components/CategoryDetailsForm/CategoryDetailsForm.tsx @@ -5,7 +5,7 @@ import FormSpacer from "@saleor/components/FormSpacer"; import RichTextEditor, { RichTextEditorChange } from "@saleor/components/RichTextEditor"; -import { ProductErrorFragment } from "@saleor/fragments/types/ProductErrorFragment"; +import { ProductErrorFragment } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { getFormErrors, getProductErrorMessage } from "@saleor/utils/errors"; import React from "react"; diff --git a/src/categories/components/CategoryList/CategoryList.tsx b/src/categories/components/CategoryList/CategoryList.tsx index 7559914c2..4e656079c 100644 --- a/src/categories/components/CategoryList/CategoryList.tsx +++ b/src/categories/components/CategoryList/CategoryList.tsx @@ -6,7 +6,7 @@ import Skeleton from "@saleor/components/Skeleton"; import TableCellHeader from "@saleor/components/TableCellHeader"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; -import { CategoryFragment } from "@saleor/fragments/types/CategoryFragment"; +import { CategoryFragment } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; import { maybe, renderCollection } from "@saleor/misc"; import { ListActions, ListProps, SortPage } from "@saleor/types"; diff --git a/src/categories/components/CategoryListPage/CategoryListPage.tsx b/src/categories/components/CategoryListPage/CategoryListPage.tsx index 04f5fe5bb..6cafbdc89 100644 --- a/src/categories/components/CategoryListPage/CategoryListPage.tsx +++ b/src/categories/components/CategoryListPage/CategoryListPage.tsx @@ -3,7 +3,7 @@ import { CategoryListUrlSortField } from "@saleor/categories/urls"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; import SearchBar from "@saleor/components/SearchBar"; -import { CategoryFragment } from "@saleor/fragments/types/CategoryFragment"; +import { CategoryFragment } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { Button } from "@saleor/macaw-ui"; import { diff --git a/src/categories/components/CategoryProductList/CategoryProductList.tsx b/src/categories/components/CategoryProductList/CategoryProductList.tsx index 9b758c541..c6ff51996 100644 --- a/src/categories/components/CategoryProductList/CategoryProductList.tsx +++ b/src/categories/components/CategoryProductList/CategoryProductList.tsx @@ -6,14 +6,13 @@ import TableCellAvatar from "@saleor/components/TableCellAvatar"; import { AVATAR_MARGIN } from "@saleor/components/TableCellAvatar/Avatar"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; +import { CategoryDetailsQuery } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; import { maybe, renderCollection } from "@saleor/misc"; -import { ListActions, ListProps } from "@saleor/types"; +import { ListActions, ListProps, RelayToFlat } from "@saleor/types"; import React from "react"; import { FormattedMessage } from "react-intl"; -import { CategoryDetails_category_products_edges_node } from "../../types/CategoryDetails"; - const useStyles = makeStyles( theme => ({ [theme.breakpoints.up("lg")]: { @@ -51,7 +50,7 @@ const useStyles = makeStyles( ); interface CategoryProductListProps extends ListProps, ListActions { - products: CategoryDetails_category_products_edges_node[]; + products: RelayToFlat; } export const CategoryProductList: React.FC = props => { diff --git a/src/categories/components/CategoryProducts/CategoryProducts.tsx b/src/categories/components/CategoryProducts/CategoryProducts.tsx index 4c3370676..5ecaca823 100644 --- a/src/categories/components/CategoryProducts/CategoryProducts.tsx +++ b/src/categories/components/CategoryProducts/CategoryProducts.tsx @@ -2,18 +2,18 @@ import { Card } from "@material-ui/core"; import HorizontalSpacer from "@saleor/apps/components/HorizontalSpacer"; import CardTitle from "@saleor/components/CardTitle"; import { InternalLink } from "@saleor/components/InternalLink"; +import { CategoryDetailsQuery } from "@saleor/graphql"; import { Button } from "@saleor/macaw-ui"; import { productListUrl } from "@saleor/products/urls"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { ListActions, PageListProps } from "../../../types"; -import { CategoryDetails_category_products_edges_node } from "../../types/CategoryDetails"; +import { ListActions, PageListProps, RelayToFlat } from "../../../types"; import CategoryProductList from "../CategoryProductList"; import { useStyles } from "./styles"; interface CategoryProductsProps extends PageListProps, ListActions { - products: CategoryDetails_category_products_edges_node[]; + products: RelayToFlat; categoryName: string; categoryId: string; } diff --git a/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx b/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx index 6c1e0bf2e..5f7a69f3b 100644 --- a/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx +++ b/src/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx @@ -7,23 +7,21 @@ import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; import SeoForm from "@saleor/components/SeoForm"; import { Tab, TabContainer } from "@saleor/components/Tab"; -import { ProductErrorFragment } from "@saleor/fragments/types/ProductErrorFragment"; +import { CategoryDetailsQuery, ProductErrorFragment } from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink, Button } from "@saleor/macaw-ui"; +import { + Backlink, + Button, + ConfirmButtonTransitionState +} from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { maybe } from "../../../misc"; -import { TabListActions } from "../../../types"; +import { RelayToFlat, TabListActions } from "../../../types"; import CategoryDetailsForm from "../../components/CategoryDetailsForm"; import CategoryList from "../../components/CategoryList"; -import { - CategoryDetails_category, - CategoryDetails_category_children_edges_node, - CategoryDetails_category_products_edges_node -} from "../../types/CategoryDetails"; import CategoryBackground from "../CategoryBackground"; import CategoryProducts from "../CategoryProducts"; import CategoryUpdateForm, { CategoryUpdateData } from "./form"; @@ -39,9 +37,9 @@ export interface CategoryUpdatePageProps currentTab: CategoryPageTab; errors: ProductErrorFragment[]; disabled: boolean; - category: CategoryDetails_category; - products: CategoryDetails_category_products_edges_node[]; - subcategories: CategoryDetails_category_children_edges_node[]; + category: CategoryDetailsQuery["category"]; + products: RelayToFlat; + subcategories: RelayToFlat; pageInfo: { hasNextPage: boolean; hasPreviousPage: boolean; diff --git a/src/categories/components/CategoryUpdatePage/form.tsx b/src/categories/components/CategoryUpdatePage/form.tsx index a1dd0c6c2..05faf1c0e 100644 --- a/src/categories/components/CategoryUpdatePage/form.tsx +++ b/src/categories/components/CategoryUpdatePage/form.tsx @@ -1,8 +1,8 @@ import { OutputData } from "@editorjs/editorjs"; -import { CategoryDetails_category } from "@saleor/categories/types/CategoryDetails"; import { useExitFormDialog } from "@saleor/components/Form/useExitFormDialog"; import { MetadataFormData } from "@saleor/components/Metadata"; import { RichTextEditorChange } from "@saleor/components/RichTextEditor"; +import { CategoryDetailsFragment } from "@saleor/graphql"; import useForm, { CommonUseFormResult, FormChange @@ -36,11 +36,11 @@ export interface UseCategoryUpdateFormResult export interface CategoryUpdateFormProps { children: (props: UseCategoryUpdateFormResult) => React.ReactNode; - category: CategoryDetails_category; + category: CategoryDetailsFragment; onSubmit: (data: CategoryUpdateData) => Promise; } -const getInitialData = (category?: CategoryDetails_category) => ({ +const getInitialData = (category?: CategoryDetailsFragment) => ({ backgroundImageAlt: category?.backgroundImage?.alt || "", metadata: category?.metadata?.map(mapMetadataItemToInput), name: category?.name || "", @@ -51,7 +51,7 @@ const getInitialData = (category?: CategoryDetails_category) => ({ }); function useCategoryUpdateForm( - category: CategoryDetails_category, + category: CategoryDetailsFragment, onSubmit: (data: CategoryUpdateData) => Promise ): UseCategoryUpdateFormResult { const { diff --git a/src/categories/fixtures.ts b/src/categories/fixtures.ts index f502d89a6..a42f57bb5 100644 --- a/src/categories/fixtures.ts +++ b/src/categories/fixtures.ts @@ -1,7 +1,6 @@ -import { CategoryFragment } from "@saleor/fragments/types/CategoryFragment"; +import { CategoryDetailsQuery, CategoryFragment } from "@saleor/graphql"; import * as richTextEditorFixtures from "../components/RichTextEditor/fixtures.json"; -import { CategoryDetails_category } from "./types/CategoryDetails"; const content = richTextEditorFixtures.richTextEditor; @@ -87,7 +86,7 @@ export const categories: CategoryFragment[] = [ ]; export const category: ( placeholderImage: string -) => CategoryDetails_category = (placeholderImage: string) => ({ +) => CategoryDetailsQuery["category"] = (placeholderImage: string) => ({ __typename: "Category", backgroundImage: { __typename: "Image", diff --git a/src/categories/mutations.ts b/src/categories/mutations.ts index 6e9a7e09c..bc9f95cd1 100644 --- a/src/categories/mutations.ts +++ b/src/categories/mutations.ts @@ -1,89 +1,46 @@ import { gql } from "@apollo/client"; -import { categoryDetailsFragment } from "@saleor/fragments/categories"; -import { productErrorFragment } from "@saleor/fragments/errors"; -import makeMutation from "@saleor/hooks/makeMutation"; - -import { - CategoryBulkDelete, - CategoryBulkDeleteVariables -} from "./types/CategoryBulkDelete"; -import { - CategoryCreate, - CategoryCreateVariables -} from "./types/CategoryCreate"; -import { - CategoryDelete, - CategoryDeleteVariables -} from "./types/CategoryDelete"; -import { - CategoryUpdate, - CategoryUpdateVariables -} from "./types/CategoryUpdate"; export const categoryDeleteMutation = gql` - ${productErrorFragment} mutation CategoryDelete($id: ID!) { categoryDelete(id: $id) { errors { - ...ProductErrorFragment + ...ProductError } } } `; -export const useCategoryDeleteMutation = makeMutation< - CategoryDelete, - CategoryDeleteVariables ->(categoryDeleteMutation); - export const categoryCreateMutation = gql` - ${categoryDetailsFragment} - ${productErrorFragment} mutation CategoryCreate($parent: ID, $input: CategoryInput!) { categoryCreate(parent: $parent, input: $input) { category { - ...CategoryDetailsFragment + ...CategoryDetails } errors { - ...ProductErrorFragment + ...ProductError } } } `; -export const useCategoryCreateMutation = makeMutation< - CategoryCreate, - CategoryCreateVariables ->(categoryCreateMutation); export const categoryUpdateMutation = gql` - ${categoryDetailsFragment} - ${productErrorFragment} mutation CategoryUpdate($id: ID!, $input: CategoryInput!) { categoryUpdate(id: $id, input: $input) { category { - ...CategoryDetailsFragment + ...CategoryDetails } errors { - ...ProductErrorFragment + ...ProductError } } } `; -export const useCategoryUpdateMutation = makeMutation< - CategoryUpdate, - CategoryUpdateVariables ->(categoryUpdateMutation); export const categoryBulkDeleteMutation = gql` - ${productErrorFragment} mutation CategoryBulkDelete($ids: [ID]!) { categoryBulkDelete(ids: $ids) { errors { - ...ProductErrorFragment + ...ProductError } } } `; -export const useCategoryBulkDeleteMutation = makeMutation< - CategoryBulkDelete, - CategoryBulkDeleteVariables ->(categoryBulkDeleteMutation); diff --git a/src/categories/queries.ts b/src/categories/queries.ts index ac0af2d55..e3bde02de 100644 --- a/src/categories/queries.ts +++ b/src/categories/queries.ts @@ -1,20 +1,6 @@ import { gql } from "@apollo/client"; -import { - categoryDetailsFragment, - categoryFragment -} from "@saleor/fragments/categories"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; -import makeQuery from "@saleor/hooks/makeQuery"; - -import { - CategoryDetails, - CategoryDetailsVariables -} from "./types/CategoryDetails"; -import { RootCategories } from "./types/RootCategories"; export const rootCategories = gql` - ${categoryFragment} - ${pageInfoFragment} query RootCategories( $first: Int $after: String @@ -34,23 +20,17 @@ export const rootCategories = gql` ) { edges { node { - ...CategoryFragment + ...Category } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export const useRootCategoriesQuery = makeQuery( - rootCategories -); export const categoryDetails = gql` - ${categoryFragment} - ${categoryDetailsFragment} - ${pageInfoFragment} query CategoryDetails( $id: ID! $first: Int @@ -59,20 +39,20 @@ export const categoryDetails = gql` $before: String ) { category(id: $id) { - ...CategoryDetailsFragment + ...CategoryDetails children(first: $first, after: $after, last: $last, before: $before) { edges { node { - ...CategoryFragment + ...Category } } pageInfo { - ...PageInfoFragment + ...PageInfo } } products(first: $first, after: $after, last: $last, before: $before) { pageInfo { - ...PageInfoFragment + ...PageInfo } edges { cursor @@ -88,7 +68,3 @@ export const categoryDetails = gql` } } `; -export const useCategoryDetailsQuery = makeQuery< - CategoryDetails, - CategoryDetailsVariables ->(categoryDetails); diff --git a/src/categories/types/CategoryBulkDelete.ts b/src/categories/types/CategoryBulkDelete.ts deleted file mode 100644 index 441b36397..000000000 --- a/src/categories/types/CategoryBulkDelete.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: CategoryBulkDelete -// ==================================================== - -export interface CategoryBulkDelete_categoryBulkDelete_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface CategoryBulkDelete_categoryBulkDelete { - __typename: "CategoryBulkDelete"; - errors: CategoryBulkDelete_categoryBulkDelete_errors[]; -} - -export interface CategoryBulkDelete { - categoryBulkDelete: CategoryBulkDelete_categoryBulkDelete | null; -} - -export interface CategoryBulkDeleteVariables { - ids: (string | null)[]; -} diff --git a/src/categories/types/CategoryCreate.ts b/src/categories/types/CategoryCreate.ts deleted file mode 100644 index 5fbc6f9e2..000000000 --- a/src/categories/types/CategoryCreate.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { CategoryInput, ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: CategoryCreate -// ==================================================== - -export interface CategoryCreate_categoryCreate_category_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CategoryCreate_categoryCreate_category_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CategoryCreate_categoryCreate_category_backgroundImage { - __typename: "Image"; - alt: string | null; - url: string; -} - -export interface CategoryCreate_categoryCreate_category_parent { - __typename: "Category"; - id: string; -} - -export interface CategoryCreate_categoryCreate_category { - __typename: "Category"; - id: string; - metadata: (CategoryCreate_categoryCreate_category_metadata | null)[]; - privateMetadata: (CategoryCreate_categoryCreate_category_privateMetadata | null)[]; - backgroundImage: CategoryCreate_categoryCreate_category_backgroundImage | null; - name: string; - slug: string; - description: any | null; - seoDescription: string | null; - seoTitle: string | null; - parent: CategoryCreate_categoryCreate_category_parent | null; -} - -export interface CategoryCreate_categoryCreate_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface CategoryCreate_categoryCreate { - __typename: "CategoryCreate"; - category: CategoryCreate_categoryCreate_category | null; - errors: CategoryCreate_categoryCreate_errors[]; -} - -export interface CategoryCreate { - categoryCreate: CategoryCreate_categoryCreate | null; -} - -export interface CategoryCreateVariables { - parent?: string | null; - input: CategoryInput; -} diff --git a/src/categories/types/CategoryDelete.ts b/src/categories/types/CategoryDelete.ts deleted file mode 100644 index f50e06cff..000000000 --- a/src/categories/types/CategoryDelete.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: CategoryDelete -// ==================================================== - -export interface CategoryDelete_categoryDelete_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface CategoryDelete_categoryDelete { - __typename: "CategoryDelete"; - errors: CategoryDelete_categoryDelete_errors[]; -} - -export interface CategoryDelete { - categoryDelete: CategoryDelete_categoryDelete | null; -} - -export interface CategoryDeleteVariables { - id: string; -} diff --git a/src/categories/types/CategoryDetails.ts b/src/categories/types/CategoryDetails.ts deleted file mode 100644 index c66484dd3..000000000 --- a/src/categories/types/CategoryDetails.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: CategoryDetails -// ==================================================== - -export interface CategoryDetails_category_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CategoryDetails_category_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CategoryDetails_category_backgroundImage { - __typename: "Image"; - alt: string | null; - url: string; -} - -export interface CategoryDetails_category_parent { - __typename: "Category"; - id: string; -} - -export interface CategoryDetails_category_children_edges_node_children { - __typename: "CategoryCountableConnection"; - totalCount: number | null; -} - -export interface CategoryDetails_category_children_edges_node_products { - __typename: "ProductCountableConnection"; - totalCount: number | null; -} - -export interface CategoryDetails_category_children_edges_node { - __typename: "Category"; - id: string; - name: string; - children: CategoryDetails_category_children_edges_node_children | null; - products: CategoryDetails_category_children_edges_node_products | null; -} - -export interface CategoryDetails_category_children_edges { - __typename: "CategoryCountableEdge"; - node: CategoryDetails_category_children_edges_node; -} - -export interface CategoryDetails_category_children_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface CategoryDetails_category_children { - __typename: "CategoryCountableConnection"; - edges: CategoryDetails_category_children_edges[]; - pageInfo: CategoryDetails_category_children_pageInfo; -} - -export interface CategoryDetails_category_products_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface CategoryDetails_category_products_edges_node_thumbnail { - __typename: "Image"; - url: string; -} - -export interface CategoryDetails_category_products_edges_node { - __typename: "Product"; - id: string; - name: string; - thumbnail: CategoryDetails_category_products_edges_node_thumbnail | null; -} - -export interface CategoryDetails_category_products_edges { - __typename: "ProductCountableEdge"; - cursor: string; - node: CategoryDetails_category_products_edges_node; -} - -export interface CategoryDetails_category_products { - __typename: "ProductCountableConnection"; - pageInfo: CategoryDetails_category_products_pageInfo; - edges: CategoryDetails_category_products_edges[]; -} - -export interface CategoryDetails_category { - __typename: "Category"; - id: string; - metadata: (CategoryDetails_category_metadata | null)[]; - privateMetadata: (CategoryDetails_category_privateMetadata | null)[]; - backgroundImage: CategoryDetails_category_backgroundImage | null; - name: string; - slug: string; - description: any | null; - seoDescription: string | null; - seoTitle: string | null; - parent: CategoryDetails_category_parent | null; - children: CategoryDetails_category_children | null; - products: CategoryDetails_category_products | null; -} - -export interface CategoryDetails { - category: CategoryDetails_category | null; -} - -export interface CategoryDetailsVariables { - id: string; - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; -} diff --git a/src/categories/types/CategoryUpdate.ts b/src/categories/types/CategoryUpdate.ts deleted file mode 100644 index 276627176..000000000 --- a/src/categories/types/CategoryUpdate.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { CategoryInput, ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: CategoryUpdate -// ==================================================== - -export interface CategoryUpdate_categoryUpdate_category_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CategoryUpdate_categoryUpdate_category_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CategoryUpdate_categoryUpdate_category_backgroundImage { - __typename: "Image"; - alt: string | null; - url: string; -} - -export interface CategoryUpdate_categoryUpdate_category_parent { - __typename: "Category"; - id: string; -} - -export interface CategoryUpdate_categoryUpdate_category { - __typename: "Category"; - id: string; - metadata: (CategoryUpdate_categoryUpdate_category_metadata | null)[]; - privateMetadata: (CategoryUpdate_categoryUpdate_category_privateMetadata | null)[]; - backgroundImage: CategoryUpdate_categoryUpdate_category_backgroundImage | null; - name: string; - slug: string; - description: any | null; - seoDescription: string | null; - seoTitle: string | null; - parent: CategoryUpdate_categoryUpdate_category_parent | null; -} - -export interface CategoryUpdate_categoryUpdate_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface CategoryUpdate_categoryUpdate { - __typename: "CategoryUpdate"; - category: CategoryUpdate_categoryUpdate_category | null; - errors: CategoryUpdate_categoryUpdate_errors[]; -} - -export interface CategoryUpdate { - categoryUpdate: CategoryUpdate_categoryUpdate | null; -} - -export interface CategoryUpdateVariables { - id: string; - input: CategoryInput; -} diff --git a/src/categories/types/RootCategories.ts b/src/categories/types/RootCategories.ts deleted file mode 100644 index 4aa272adc..000000000 --- a/src/categories/types/RootCategories.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { CategoryFilterInput, CategorySortingInput } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: RootCategories -// ==================================================== - -export interface RootCategories_categories_edges_node_children { - __typename: "CategoryCountableConnection"; - totalCount: number | null; -} - -export interface RootCategories_categories_edges_node_products { - __typename: "ProductCountableConnection"; - totalCount: number | null; -} - -export interface RootCategories_categories_edges_node { - __typename: "Category"; - id: string; - name: string; - children: RootCategories_categories_edges_node_children | null; - products: RootCategories_categories_edges_node_products | null; -} - -export interface RootCategories_categories_edges { - __typename: "CategoryCountableEdge"; - node: RootCategories_categories_edges_node; -} - -export interface RootCategories_categories_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface RootCategories_categories { - __typename: "CategoryCountableConnection"; - edges: RootCategories_categories_edges[]; - pageInfo: RootCategories_categories_pageInfo; -} - -export interface RootCategories { - categories: RootCategories_categories | null; -} - -export interface RootCategoriesVariables { - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; - filter?: CategoryFilterInput | null; - sort?: CategorySortingInput | null; -} diff --git a/src/categories/views/CategoryCreate.tsx b/src/categories/views/CategoryCreate.tsx index e4cbdfb52..ab742e196 100644 --- a/src/categories/views/CategoryCreate.tsx +++ b/src/categories/views/CategoryCreate.tsx @@ -1,20 +1,20 @@ import { WindowTitle } from "@saleor/components/WindowTitle"; +import { + CategoryCreateMutation, + useCategoryCreateMutation, + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { getMutationErrors } from "@saleor/misc"; import createMetadataCreateHandler from "@saleor/utils/handlers/metadataCreateHandler"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; import { getParsedDataForJsonStringField } from "@saleor/utils/richText/misc"; import React from "react"; import { useIntl } from "react-intl"; import CategoryCreatePage from "../components/CategoryCreatePage"; import { CategoryCreateData } from "../components/CategoryCreatePage/form"; -import { useCategoryCreateMutation } from "../mutations"; -import { CategoryCreate } from "../types/CategoryCreate"; import { categoryListUrl, categoryUrl } from "../urls"; interface CategoryCreateViewProps { @@ -27,10 +27,10 @@ export const CategoryCreateView: React.FC = ({ const navigate = useNavigator(); const notify = useNotifier(); const intl = useIntl(); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); - const handleSuccess = (data: CategoryCreate) => { + const handleSuccess = (data: CategoryCreateMutation) => { if (data.categoryCreate.errors.length === 0) { notify({ status: "success", diff --git a/src/categories/views/CategoryDetails.tsx b/src/categories/views/CategoryDetails.tsx index 6b2b3e7e2..ab640eaf3 100644 --- a/src/categories/views/CategoryDetails.tsx +++ b/src/categories/views/CategoryDetails.tsx @@ -2,6 +2,19 @@ import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import NotFoundPage from "@saleor/components/NotFoundPage"; import { WindowTitle } from "@saleor/components/WindowTitle"; +import { + CategoryBulkDeleteMutation, + CategoryDeleteMutation, + CategoryInput, + CategoryUpdateMutation, + useCategoryBulkDeleteMutation, + useCategoryDeleteMutation, + useCategoryDetailsQuery, + useCategoryUpdateMutation, + useProductBulkDeleteMutation, + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation +} from "@saleor/graphql"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useLocalPaginator, { useSectionLocalPaginationState @@ -13,33 +26,18 @@ import { DeleteIcon, IconButton } from "@saleor/macaw-ui"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createMetadataUpdateHandler from "@saleor/utils/handlers/metadataUpdateHandler"; import { mapEdgesToItems } from "@saleor/utils/maps"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; import { getParsedDataForJsonStringField } from "@saleor/utils/richText/misc"; import React, { useState } from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { PAGINATE_BY } from "../../config"; import { extractMutationErrors, maybe } from "../../misc"; -import { useProductBulkDeleteMutation } from "../../products/mutations"; import { productAddUrl, productUrl } from "../../products/urls"; -import { CategoryInput } from "../../types/globalTypes"; import { CategoryPageTab, CategoryUpdatePage } from "../components/CategoryUpdatePage/CategoryUpdatePage"; import { CategoryUpdateData } from "../components/CategoryUpdatePage/form"; -import { - useCategoryBulkDeleteMutation, - useCategoryDeleteMutation, - useCategoryUpdateMutation -} from "../mutations"; -import { useCategoryDetailsQuery } from "../queries"; -import { CategoryBulkDelete } from "../types/CategoryBulkDelete"; -import { CategoryDelete } from "../types/CategoryDelete"; -import { CategoryUpdate } from "../types/CategoryUpdate"; import { categoryAddUrl, categoryListUrl, @@ -69,8 +67,8 @@ export const CategoryDetails: React.FC = ({ params.ids ); const intl = useIntl(); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); const [activeTab, setActiveTab] = useState( CategoryPageTab.categories @@ -96,7 +94,7 @@ export const CategoryDetails: React.FC = ({ return navigate(categoryListUrl())} />; } - const handleCategoryDelete = (data: CategoryDelete) => { + const handleCategoryDelete = (data: CategoryDeleteMutation) => { if (data.categoryDelete.errors.length === 0) { notify({ status: "success", @@ -112,7 +110,7 @@ export const CategoryDetails: React.FC = ({ onCompleted: handleCategoryDelete }); - const handleCategoryUpdate = (data: CategoryUpdate) => { + const handleCategoryUpdate = (data: CategoryUpdateMutation) => { if (data.categoryUpdate.errors.length > 0) { const backgroundImageError = data.categoryUpdate.errors.find( error => error.field === ("backgroundImage" as keyof CategoryInput) @@ -131,7 +129,7 @@ export const CategoryDetails: React.FC = ({ onCompleted: handleCategoryUpdate }); - const handleBulkCategoryDelete = (data: CategoryBulkDelete) => { + const handleBulkCategoryDelete = (data: CategoryBulkDeleteMutation) => { if (data.categoryBulkDelete.errors.length === 0) { closeModal(); notify({ diff --git a/src/categories/views/CategoryList/CategoryList.tsx b/src/categories/views/CategoryList/CategoryList.tsx index 97a10c0e3..96855f2bb 100644 --- a/src/categories/views/CategoryList/CategoryList.tsx +++ b/src/categories/views/CategoryList/CategoryList.tsx @@ -4,6 +4,11 @@ import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { SaveFilterTabDialogFormData } from "@saleor/components/SaveFilterTabDialog"; +import { + CategoryBulkDeleteMutation, + useCategoryBulkDeleteMutation, + useRootCategoriesQuery +} from "@saleor/graphql"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useListSettings from "@saleor/hooks/useListSettings"; import useNavigator from "@saleor/hooks/useNavigator"; @@ -22,9 +27,6 @@ import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { CategoryListPage } from "../../components/CategoryListPage/CategoryListPage"; -import { useCategoryBulkDeleteMutation } from "../../mutations"; -import { useRootCategoriesQuery } from "../../queries"; -import { CategoryBulkDelete } from "../../types/CategoryBulkDelete"; import { categoryAddUrl, categoryListUrl, @@ -123,7 +125,7 @@ export const CategoryList: React.FC = ({ params }) => { params ); - const handleCategoryBulkDelete = (data: CategoryBulkDelete) => { + const handleCategoryBulkDelete = (data: CategoryBulkDeleteMutation) => { if (data.categoryBulkDelete.errors.length === 0) { navigate(categoryListUrl(), { replace: true }); refetch(); diff --git a/src/categories/views/CategoryList/filter.ts b/src/categories/views/CategoryList/filter.ts index abe5fd453..a8a52d74f 100644 --- a/src/categories/views/CategoryList/filter.ts +++ b/src/categories/views/CategoryList/filter.ts @@ -1,4 +1,4 @@ -import { CategoryFilterInput } from "@saleor/types/globalTypes"; +import { CategoryFilterInput } from "@saleor/graphql"; import { createFilterTabUtils, diff --git a/src/categories/views/CategoryList/sort.ts b/src/categories/views/CategoryList/sort.ts index d7462b009..068dca994 100644 --- a/src/categories/views/CategoryList/sort.ts +++ b/src/categories/views/CategoryList/sort.ts @@ -1,5 +1,5 @@ import { CategoryListUrlSortField } from "@saleor/categories/urls"; -import { CategorySortField } from "@saleor/types/globalTypes"; +import { CategorySortField } from "@saleor/graphql"; import { createGetSortQueryVariables } from "@saleor/utils/sort"; export function getSortQueryField( diff --git a/src/channels/ChannelsWithVariantsAvailabilityCard/ChannelWithVariantAvailabilityItemWrapper.tsx b/src/channels/ChannelsWithVariantsAvailabilityCard/ChannelWithVariantAvailabilityItemWrapper.tsx index 6c07b60c0..57b6e6c9e 100644 --- a/src/channels/ChannelsWithVariantsAvailabilityCard/ChannelWithVariantAvailabilityItemWrapper.tsx +++ b/src/channels/ChannelsWithVariantsAvailabilityCard/ChannelWithVariantAvailabilityItemWrapper.tsx @@ -1,16 +1,15 @@ import { Accordion, AccordionSummary, Typography } from "@material-ui/core"; import { ChannelData } from "@saleor/channels/utils"; import { Messages } from "@saleor/components/ChannelsAvailabilityCard/types"; +import { ProductDetailsVariantFragment } from "@saleor/graphql"; import IconChevronDown from "@saleor/icons/ChevronDown"; import { makeStyles } from "@saleor/macaw-ui"; import Label from "@saleor/orders/components/OrderHistory/Label"; import { getById } from "@saleor/orders/components/OrderReturnPage/utils"; -import { ProductDetails_product_variants } from "@saleor/products/types/ProductDetails"; import { ChannelsWithVariantsData } from "@saleor/products/views/ProductUpdate/types"; import { areAllChannelVariantsSelected } from "@saleor/products/views/ProductUpdate/utils"; import React from "react"; -import { useIntl } from "react-intl"; -import { defineMessages } from "react-intl"; +import { defineMessages, useIntl } from "react-intl"; const useExpanderStyles = makeStyles( theme => ({ @@ -82,7 +81,7 @@ const messages = defineMessages({ }); interface ChannelAvailabilityItemWrapperProps { - variants: ProductDetails_product_variants[]; + variants: ProductDetailsVariantFragment[]; channelId: string; channels: ChannelData[]; channelsWithVariantsData: ChannelsWithVariantsData; diff --git a/src/channels/ChannelsWithVariantsAvailabilityCard/ChannelsWithVariantsAvailabilityCard.stories.tsx b/src/channels/ChannelsWithVariantsAvailabilityCard/ChannelsWithVariantsAvailabilityCard.stories.tsx index e8ede0ddb..04314b5c9 100644 --- a/src/channels/ChannelsWithVariantsAvailabilityCard/ChannelsWithVariantsAvailabilityCard.stories.tsx +++ b/src/channels/ChannelsWithVariantsAvailabilityCard/ChannelsWithVariantsAvailabilityCard.stories.tsx @@ -1,4 +1,4 @@ -import { ProductDetails_product_variants } from "@saleor/products/types/ProductDetails"; +import { ProductDetailsVariantFragment } from "@saleor/graphql"; import CentralPlacementDecorator from "@saleor/storybook/CentralPlacementDecorator"; import CommonDecorator from "@saleor/storybook/Decorator"; import { storiesOf } from "@storybook/react"; @@ -76,7 +76,7 @@ const props: ChannelsWithVariantsAvailabilityCardProps = { name: "Variant C", media: [] } - ] as ProductDetails_product_variants[], + ] as ProductDetailsVariantFragment[], channelsWithVariantsData: { ["1"]: { selectedVariantsIds: ["variantA", "variantB"], diff --git a/src/channels/ChannelsWithVariantsAvailabilityCard/ChannelsWithVariantsAvailabilityCard.tsx b/src/channels/ChannelsWithVariantsAvailabilityCard/ChannelsWithVariantsAvailabilityCard.tsx index 71ac41491..f08686907 100644 --- a/src/channels/ChannelsWithVariantsAvailabilityCard/ChannelsWithVariantsAvailabilityCard.tsx +++ b/src/channels/ChannelsWithVariantsAvailabilityCard/ChannelsWithVariantsAvailabilityCard.tsx @@ -10,15 +10,14 @@ import { Messages } from "@saleor/components/ChannelsAvailabilityCard/types"; import { getChannelsAvailabilityMessages } from "@saleor/components/ChannelsAvailabilityCard/utils"; +import { PermissionEnum, ProductDetailsVariantFragment } from "@saleor/graphql"; import useDateLocalize from "@saleor/hooks/useDateLocalize"; import { getById } from "@saleor/orders/components/OrderReturnPage/utils"; -import { ProductDetails_product_variants } from "@saleor/products/types/ProductDetails"; import { ChannelsWithVariantsData } from "@saleor/products/views/ProductUpdate/types"; import { areAnyChannelVariantsSelected, getTotalSelectedChannelsCount } from "@saleor/products/views/ProductUpdate/utils"; -import { PermissionEnum } from "@saleor/types/globalTypes"; import React from "react"; import { useIntl } from "react-intl"; @@ -36,7 +35,7 @@ export interface ChannelsWithVariantsAvailabilityCardProps extends CommonChannelsAvailabilityProps { channelsWithVariantsData: ChannelsWithVariantsData; channels: ChannelData[]; - variants: ProductDetails_product_variants[]; + variants: ProductDetailsVariantFragment[]; errors?: ChannelsAvailabilityError[]; messages: Messages; onChange: (id: string, data: ChannelOpts) => void; diff --git a/src/channels/components/ChannelForm/ChannelForm.stories.tsx b/src/channels/components/ChannelForm/ChannelForm.stories.tsx index ded569546..0977e1bbf 100644 --- a/src/channels/components/ChannelForm/ChannelForm.stories.tsx +++ b/src/channels/components/ChannelForm/ChannelForm.stories.tsx @@ -1,6 +1,6 @@ import { countries } from "@saleor/fixtures"; +import { CountryCode } from "@saleor/graphql"; import Decorator from "@saleor/storybook/Decorator"; -import { CountryCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/channels/components/ChannelForm/ChannelForm.tsx b/src/channels/components/ChannelForm/ChannelForm.tsx index b10c04213..a37e55e42 100644 --- a/src/channels/components/ChannelForm/ChannelForm.tsx +++ b/src/channels/components/ChannelForm/ChannelForm.tsx @@ -11,12 +11,10 @@ import FormSpacer from "@saleor/components/FormSpacer"; import SingleAutocompleteSelectField, { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; -import { ChannelErrorFragment } from "@saleor/fragments/types/ChannelErrorFragment"; +import { ChannelErrorFragment, CountryCode } from "@saleor/graphql"; import useClipboard from "@saleor/hooks/useClipboard"; -import { ChangeEvent } from "@saleor/hooks/useForm"; -import { FormChange } from "@saleor/hooks/useForm"; +import { ChangeEvent, FormChange } from "@saleor/hooks/useForm"; import { commonMessages } from "@saleor/intl"; -import { CountryCode } from "@saleor/types/globalTypes"; import { getFormErrors } from "@saleor/utils/errors"; import getChannelsErrorMessage from "@saleor/utils/errors/channels"; import React from "react"; diff --git a/src/channels/components/ChannelsWithVariantsAvailabilityDialog/ChannelsWithVariantsAvailabilityDialog.stories.tsx b/src/channels/components/ChannelsWithVariantsAvailabilityDialog/ChannelsWithVariantsAvailabilityDialog.stories.tsx index 18f754ed4..9ea251201 100644 --- a/src/channels/components/ChannelsWithVariantsAvailabilityDialog/ChannelsWithVariantsAvailabilityDialog.stories.tsx +++ b/src/channels/components/ChannelsWithVariantsAvailabilityDialog/ChannelsWithVariantsAvailabilityDialog.stories.tsx @@ -1,4 +1,4 @@ -import { ProductDetails_product_variants } from "@saleor/products/types/ProductDetails"; +import { ProductDetailsVariantFragment } from "@saleor/graphql"; import CommonDecorator from "@saleor/storybook/Decorator"; import { storiesOf } from "@storybook/react"; import React from "react"; @@ -51,7 +51,7 @@ const props: ChannelsAvailabilityDialogProps = { name: "Variant C", media: [] } - ] as ProductDetails_product_variants[], + ] as ProductDetailsVariantFragment[], onClose: () => undefined, onConfirm: () => undefined, open: true diff --git a/src/channels/components/ChannelsWithVariantsAvailabilityDialog/ChannelsWithVariantsAvailabilityDialog.tsx b/src/channels/components/ChannelsWithVariantsAvailabilityDialog/ChannelsWithVariantsAvailabilityDialog.tsx index c9b551fa7..2d06da6b7 100644 --- a/src/channels/components/ChannelsWithVariantsAvailabilityDialog/ChannelsWithVariantsAvailabilityDialog.tsx +++ b/src/channels/components/ChannelsWithVariantsAvailabilityDialog/ChannelsWithVariantsAvailabilityDialog.tsx @@ -1,7 +1,7 @@ import { ChannelData } from "@saleor/channels/utils"; import ActionDialog from "@saleor/components/ActionDialog"; +import { ProductDetailsVariantFragment } from "@saleor/graphql"; import useModalDialogOpen from "@saleor/hooks/useModalDialogOpen"; -import { ProductDetails_product_variants } from "@saleor/products/types/ProductDetails"; import { ChannelVariantListing } from "@saleor/products/views/ProductUpdate/types"; import useChannelsWithProductVariants from "@saleor/products/views/ProductUpdate/useChannelsWithProductVariants"; import { @@ -11,8 +11,7 @@ import { } from "@saleor/products/views/ProductUpdate/utils"; import { DialogProps } from "@saleor/types"; import React from "react"; -import { useIntl } from "react-intl"; -import { defineMessages } from "react-intl"; +import { defineMessages, useIntl } from "react-intl"; import { useChannelsSearch } from "../../../components/ChannelsAvailabilityDialog/utils"; import ChannelsAvailabilityContentWrapper from "../../../components/ChannelsAvailabilityDialogWrapper/ChannelsAvailabilityDialogWrapper"; @@ -28,7 +27,7 @@ const messages = defineMessages({ export interface ChannelsAvailabilityDialogProps extends DialogProps { channels: ChannelData[]; contentType?: string; - variants: ProductDetails_product_variants[]; + variants: ProductDetailsVariantFragment[]; onConfirm: (listings: ChannelVariantListing) => void; } diff --git a/src/channels/components/ChannelsWithVariantsAvailabilityDialog/ChannelsWithVariantsAvailabilityDialogContent.tsx b/src/channels/components/ChannelsWithVariantsAvailabilityDialog/ChannelsWithVariantsAvailabilityDialogContent.tsx index aa3bff53c..f4257b1d4 100644 --- a/src/channels/components/ChannelsWithVariantsAvailabilityDialog/ChannelsWithVariantsAvailabilityDialogContent.tsx +++ b/src/channels/components/ChannelsWithVariantsAvailabilityDialog/ChannelsWithVariantsAvailabilityDialogContent.tsx @@ -6,11 +6,11 @@ import { Typography } from "@material-ui/core"; import { ChannelData } from "@saleor/channels/utils"; +import { ProductDetailsVariantFragment } from "@saleor/graphql"; import IconChevronDown from "@saleor/icons/ChevronDown"; import { makeStyles } from "@saleor/macaw-ui"; import Label from "@saleor/orders/components/OrderHistory/Label"; import { getById } from "@saleor/orders/components/OrderReturnPage/utils"; -import { ProductDetails_product_variants } from "@saleor/products/types/ProductDetails"; import { ChannelsWithVariantsData } from "@saleor/products/views/ProductUpdate/types"; import { areAllChannelVariantsSelected, @@ -100,7 +100,7 @@ interface ChannelsWithVariantsAvailabilityDialogContentProps { toggleAllChannelVariants: (channelId: string) => void; isChannelSelected: (channelId: string) => boolean; channels: ChannelData[]; - allVariants: ProductDetails_product_variants[]; + allVariants: ProductDetailsVariantFragment[]; } const ChannelsWithVariantsAvailabilityDialogContent: React.FC = ({ diff --git a/src/channels/components/ShippingZonesCard/types.ts b/src/channels/components/ShippingZonesCard/types.ts index 347141fbb..6b330f3fa 100644 --- a/src/channels/components/ShippingZonesCard/types.ts +++ b/src/channels/components/ShippingZonesCard/types.ts @@ -1,6 +1,6 @@ import { ChannelShippingZones } from "@saleor/channels/pages/ChannelDetailsPage/types"; -import { SearchShippingZones_search_edges_node } from "@saleor/searches/types/SearchShippingZones"; -import { FetchMoreProps } from "@saleor/types"; +import { SearchShippingZonesQuery } from "@saleor/graphql"; +import { FetchMoreProps, RelayToFlat } from "@saleor/types"; export interface ShippingZonesProps { addShippingZone: (id: string) => void; @@ -8,5 +8,5 @@ export interface ShippingZonesProps { searchShippingZones: (searchPhrase: string) => void; fetchMoreShippingZones: FetchMoreProps; shippingZones: ChannelShippingZones; - shippingZonesChoices: SearchShippingZones_search_edges_node[]; + shippingZonesChoices: RelayToFlat; } diff --git a/src/channels/fixtures.ts b/src/channels/fixtures.ts index 52737f859..465d4321f 100644 --- a/src/channels/fixtures.ts +++ b/src/channels/fixtures.ts @@ -1,10 +1,10 @@ -import { ChannelErrorFragment } from "@saleor/fragments/types/ChannelErrorFragment"; -import { ProductDetails_product_channelListings } from "@saleor/products/types/ProductDetails"; +import { + ChannelDetailsFragment, + ChannelErrorCode, + ChannelErrorFragment, + ProductFragment +} from "@saleor/graphql"; import { Money } from "@saleor/sdk/dist/apollo/types"; -import { ChannelErrorCode } from "@saleor/types/globalTypes"; - -import { Channel_channel } from "./types/Channel"; -import { Channels_channels } from "./types/Channels"; export const channelCreateErrors: ChannelErrorFragment[] = [ { @@ -15,7 +15,7 @@ export const channelCreateErrors: ChannelErrorFragment[] = [ } ]; -export const channelsList: Channels_channels[] = [ +export const channelsList: ChannelDetailsFragment[] = [ { __typename: "Channel", currencyCode: "euro", @@ -116,7 +116,7 @@ export const channelsList: Channels_channels[] = [ } ]; -export const channel: Channel_channel = { +export const channel: ChannelDetailsFragment = { __typename: "Channel", currencyCode: "zl", hasOrders: false, @@ -131,8 +131,7 @@ export const channel: Channel_channel = { } }; -interface ProductDetails_product_channelListingsWithPricing - extends ProductDetails_product_channelListings { +type ProductChannelsWithPricing = ProductFragment["channelListings"][0] & { pricing: { priceRange: { start: { @@ -143,9 +142,9 @@ interface ProductDetails_product_channelListingsWithPricing }; }; }; -} +}; -export const productChannels: ProductDetails_product_channelListingsWithPricing[] = [ +export const productChannels: ProductChannelsWithPricing[] = [ { __typename: "ProductChannelListing", availableForPurchase: null, diff --git a/src/channels/mutations.ts b/src/channels/mutations.ts index 073d53f46..20d539297 100644 --- a/src/channels/mutations.ts +++ b/src/channels/mutations.ts @@ -1,113 +1,63 @@ import { gql } from "@apollo/client"; -import { - channelDetailsFragment, - channelErrorFragment -} from "@saleor/fragments/channels"; -import makeMutation from "@saleor/hooks/makeMutation"; - -import { - ChannelActivate, - ChannelActivateVariables -} from "./types/ChannelActivate"; -import { ChannelCreate, ChannelCreateVariables } from "./types/ChannelCreate"; -import { - ChannelDeactivate, - ChannelDeactivateVariables -} from "./types/ChannelDeactivate"; -import { ChannelDelete, ChannelDeleteVariables } from "./types/ChannelDelete"; -import { ChannelUpdate, ChannelUpdateVariables } from "./types/ChannelUpdate"; export const channelCreateMutation = gql` - ${channelErrorFragment} - ${channelDetailsFragment} mutation ChannelCreate($input: ChannelCreateInput!) { channelCreate(input: $input) { channel { - ...ChannelDetailsFragment + ...ChannelDetails } errors { - ...ChannelErrorFragment + ...ChannelError } } } `; export const channelUpdateMutation = gql` - ${channelErrorFragment} - ${channelDetailsFragment} mutation ChannelUpdate($id: ID!, $input: ChannelUpdateInput!) { channelUpdate(id: $id, input: $input) { channel { - ...ChannelDetailsFragment + ...ChannelDetails } errors { - ...ChannelErrorFragment + ...ChannelError } } } `; export const channelDeleteMutation = gql` - ${channelErrorFragment} mutation ChannelDelete($id: ID!, $input: ChannelDeleteInput) { channelDelete(id: $id, input: $input) { errors { - ...ChannelErrorFragment + ...ChannelError } } } `; export const channelActivateMutation = gql` - ${channelErrorFragment} - ${channelDetailsFragment} mutation ChannelActivate($id: ID!) { channelActivate(id: $id) { channel { - ...ChannelDetailsFragment + ...ChannelDetails } errors { - ...ChannelErrorFragment + ...ChannelError } } } `; export const channelDeactivateMutation = gql` - ${channelErrorFragment} - ${channelDetailsFragment} mutation ChannelDeactivate($id: ID!) { channelDeactivate(id: $id) { channel { - ...ChannelDetailsFragment + ...ChannelDetails } errors { - ...ChannelErrorFragment + ...ChannelError } } } `; - -export const useChannelCreateMutation = makeMutation< - ChannelCreate, - ChannelCreateVariables ->(channelCreateMutation); - -export const useChannelUpdateMutation = makeMutation< - ChannelUpdate, - ChannelUpdateVariables ->(channelUpdateMutation); - -export const useChannelDeleteMutation = makeMutation< - ChannelDelete, - ChannelDeleteVariables ->(channelDeleteMutation); - -export const useChannelActivateMutation = makeMutation< - ChannelActivate, - ChannelActivateVariables ->(channelActivateMutation); -export const useChannelDeactivateMutation = makeMutation< - ChannelDeactivate, - ChannelDeactivateVariables ->(channelDeactivateMutation); diff --git a/src/channels/pages/ChannelDetailsPage/ChannelDetailsPage.stories.tsx b/src/channels/pages/ChannelDetailsPage/ChannelDetailsPage.stories.tsx index 02db72c4d..09f9ec37e 100644 --- a/src/channels/pages/ChannelDetailsPage/ChannelDetailsPage.stories.tsx +++ b/src/channels/pages/ChannelDetailsPage/ChannelDetailsPage.stories.tsx @@ -1,5 +1,5 @@ import { countries } from "@saleor/fixtures"; -import { ChannelErrorFragment } from "@saleor/fragments/types/ChannelErrorFragment"; +import { ChannelErrorFragment } from "@saleor/graphql"; import Decorator from "@saleor/storybook/Decorator"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/channels/pages/ChannelDetailsPage/ChannelDetailsPage.tsx b/src/channels/pages/ChannelDetailsPage/ChannelDetailsPage.tsx index 8221a39a8..07ec39000 100644 --- a/src/channels/pages/ChannelDetailsPage/ChannelDetailsPage.tsx +++ b/src/channels/pages/ChannelDetailsPage/ChannelDetailsPage.tsx @@ -4,8 +4,13 @@ import Form from "@saleor/components/Form"; import Grid from "@saleor/components/Grid"; import Savebar from "@saleor/components/Savebar"; import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; -import { ChannelErrorFragment } from "@saleor/fragments/types/ChannelErrorFragment"; -import { CountryFragment } from "@saleor/fragments/types/CountryFragment"; +import { + ChannelDetailsFragment, + ChannelErrorFragment, + CountryCode, + CountryFragment, + SearchShippingZonesQuery +} from "@saleor/graphql"; import { SearchData } from "@saleor/hooks/makeTopLevelSearch"; import { getParsedSearchData } from "@saleor/hooks/makeTopLevelSearch/utils"; import { SubmitPromise } from "@saleor/hooks/useForm"; @@ -15,21 +20,18 @@ import { getById, getByUnmatchingId } from "@saleor/orders/components/OrderReturnPage/utils"; -import { SearchShippingZones_search_edges_node } from "@saleor/searches/types/SearchShippingZones"; -import { FetchMoreProps } from "@saleor/types"; -import { CountryCode } from "@saleor/types/globalTypes"; +import { FetchMoreProps, RelayToFlat } from "@saleor/types"; import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; import { mapCountriesToChoices } from "@saleor/utils/maps"; import React, { useState } from "react"; import { ChannelForm, FormData } from "../../components/ChannelForm"; import { ChannelStatus } from "../../components/ChannelStatus/ChannelStatus"; -import { Channel_channel } from "../../types/Channel"; import { ChannelShippingZones } from "./types"; import { getUpdatedIdsWithNewId, getUpdatedIdsWithoutNewId } from "./utils"; export interface ChannelDetailsPageProps { - channel?: Channel_channel; + channel?: ChannelDetailsFragment; currencyCodes?: SingleAutocompleteChoiceType[]; disabled: boolean; disabledStatus?: boolean; @@ -86,7 +88,7 @@ const ChannelDetailsPage = function({ ...formData }; - const getFilteredShippingZonesChoices = (): SearchShippingZones_search_edges_node[] => + const getFilteredShippingZonesChoices = (): RelayToFlat => getParsedSearchData({ data: searchShippingZonesData }).filter( ({ id: searchedZoneId }) => !shippingZonesToDisplay.some(({ id }) => id === searchedZoneId) diff --git a/src/channels/pages/ChannelDetailsPage/types.ts b/src/channels/pages/ChannelDetailsPage/types.ts index f4f49c316..0a3571e51 100644 --- a/src/channels/pages/ChannelDetailsPage/types.ts +++ b/src/channels/pages/ChannelDetailsPage/types.ts @@ -1,5 +1,8 @@ -import { ChannelShippingZones_shippingZones_edges_node } from "@saleor/shipping/types/ChannelShippingZones"; +import { ChannelShippingZonesQuery } from "@saleor/graphql"; +import { RelayToFlat } from "@saleor/types"; -export type ChannelShippingZone = ChannelShippingZones_shippingZones_edges_node; +export type ChannelShippingZones = RelayToFlat< + ChannelShippingZonesQuery["shippingZones"] +>; -export type ChannelShippingZones = ChannelShippingZone[]; +export type ChannelShippingZone = ChannelShippingZones[0]; diff --git a/src/channels/pages/ChannelsListPage/ChannelsListPage.tsx b/src/channels/pages/ChannelsListPage/ChannelsListPage.tsx index 929ad469e..5a18c0125 100644 --- a/src/channels/pages/ChannelsListPage/ChannelsListPage.tsx +++ b/src/channels/pages/ChannelsListPage/ChannelsListPage.tsx @@ -9,9 +9,9 @@ import Container from "@saleor/components/Container"; import LimitReachedAlert from "@saleor/components/LimitReachedAlert"; import PageHeader from "@saleor/components/PageHeader"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; -import { RefreshLimits_shop_limits } from "@saleor/components/Shop/types/RefreshLimits"; import Skeleton from "@saleor/components/Skeleton"; import TableCellHeader from "@saleor/components/TableCellHeader"; +import { ChannelDetailsFragment, RefreshLimitsQuery } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { Backlink, Button, DeleteIcon, IconButton } from "@saleor/macaw-ui"; import { renderCollection, stopPropagation } from "@saleor/misc"; @@ -19,12 +19,11 @@ import { hasLimits, isLimitReached } from "@saleor/utils/limits"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { Channels_channels } from "../../types/Channels"; import { useStyles } from "./styles"; export interface ChannelsListPageProps { - channelsList: Channels_channels[] | undefined; - limits: RefreshLimits_shop_limits; + channelsList: ChannelDetailsFragment[] | undefined; + limits: RefreshLimitsQuery["shop"]["limits"]; navigateToChannelCreate: () => void; onBack: () => void; onRowClick: (id: string) => () => void; diff --git a/src/channels/queries.ts b/src/channels/queries.ts index 64036b407..b5ce2d1cb 100644 --- a/src/channels/queries.ts +++ b/src/channels/queries.ts @@ -1,45 +1,25 @@ import { gql } from "@apollo/client"; -import { - channelDetailsFragment, - channelFragment -} from "@saleor/fragments/channels"; -import makeQuery from "@saleor/hooks/makeQuery"; - -import { BaseChannels } from "./types/BaseChannels"; -import { Channel, ChannelVariables } from "./types/Channel"; -import { Channels } from "./types/Channels"; export const channelsListBase = gql` - ${channelFragment} query BaseChannels { channels { - ...ChannelFragment + ...Channel } } `; export const channelsList = gql` - ${channelDetailsFragment} query Channels { channels { - ...ChannelDetailsFragment + ...ChannelDetails } } `; export const channelDetails = gql` - ${channelDetailsFragment} query Channel($id: ID!) { channel(id: $id) { - ...ChannelDetailsFragment + ...ChannelDetails } } `; - -export const useBaseChannelsList = makeQuery( - channelsListBase -); -export const useChannelsList = makeQuery(channelsList); -export const useChannelDetails = makeQuery( - channelDetails -); diff --git a/src/channels/types/BaseChannels.ts b/src/channels/types/BaseChannels.ts deleted file mode 100644 index cd2ff7e8a..000000000 --- a/src/channels/types/BaseChannels.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: BaseChannels -// ==================================================== - -export interface BaseChannels_channels_defaultCountry { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface BaseChannels_channels { - __typename: "Channel"; - id: string; - isActive: boolean; - name: string; - slug: string; - currencyCode: string; - defaultCountry: BaseChannels_channels_defaultCountry; -} - -export interface BaseChannels { - channels: BaseChannels_channels[] | null; -} diff --git a/src/channels/types/Channel.ts b/src/channels/types/Channel.ts deleted file mode 100644 index 21e41917a..000000000 --- a/src/channels/types/Channel.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: Channel -// ==================================================== - -export interface Channel_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface Channel_channel { - __typename: "Channel"; - id: string; - isActive: boolean; - name: string; - slug: string; - currencyCode: string; - defaultCountry: Channel_channel_defaultCountry; - hasOrders: boolean; -} - -export interface Channel { - channel: Channel_channel | null; -} - -export interface ChannelVariables { - id: string; -} diff --git a/src/channels/types/ChannelActivate.ts b/src/channels/types/ChannelActivate.ts deleted file mode 100644 index 72aa425d4..000000000 --- a/src/channels/types/ChannelActivate.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ChannelErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ChannelActivate -// ==================================================== - -export interface ChannelActivate_channelActivate_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface ChannelActivate_channelActivate_channel { - __typename: "Channel"; - id: string; - isActive: boolean; - name: string; - slug: string; - currencyCode: string; - defaultCountry: ChannelActivate_channelActivate_channel_defaultCountry; - hasOrders: boolean; -} - -export interface ChannelActivate_channelActivate_errors { - __typename: "ChannelError"; - code: ChannelErrorCode; - field: string | null; - message: string | null; -} - -export interface ChannelActivate_channelActivate { - __typename: "ChannelActivate"; - channel: ChannelActivate_channelActivate_channel | null; - errors: ChannelActivate_channelActivate_errors[]; -} - -export interface ChannelActivate { - channelActivate: ChannelActivate_channelActivate | null; -} - -export interface ChannelActivateVariables { - id: string; -} diff --git a/src/channels/types/ChannelCreate.ts b/src/channels/types/ChannelCreate.ts deleted file mode 100644 index aade69d44..000000000 --- a/src/channels/types/ChannelCreate.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ChannelCreateInput, ChannelErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ChannelCreate -// ==================================================== - -export interface ChannelCreate_channelCreate_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface ChannelCreate_channelCreate_channel { - __typename: "Channel"; - id: string; - isActive: boolean; - name: string; - slug: string; - currencyCode: string; - defaultCountry: ChannelCreate_channelCreate_channel_defaultCountry; - hasOrders: boolean; -} - -export interface ChannelCreate_channelCreate_errors { - __typename: "ChannelError"; - code: ChannelErrorCode; - field: string | null; - message: string | null; -} - -export interface ChannelCreate_channelCreate { - __typename: "ChannelCreate"; - channel: ChannelCreate_channelCreate_channel | null; - errors: ChannelCreate_channelCreate_errors[]; -} - -export interface ChannelCreate { - channelCreate: ChannelCreate_channelCreate | null; -} - -export interface ChannelCreateVariables { - input: ChannelCreateInput; -} diff --git a/src/channels/types/ChannelDeactivate.ts b/src/channels/types/ChannelDeactivate.ts deleted file mode 100644 index 2621d5e0e..000000000 --- a/src/channels/types/ChannelDeactivate.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ChannelErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ChannelDeactivate -// ==================================================== - -export interface ChannelDeactivate_channelDeactivate_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface ChannelDeactivate_channelDeactivate_channel { - __typename: "Channel"; - id: string; - isActive: boolean; - name: string; - slug: string; - currencyCode: string; - defaultCountry: ChannelDeactivate_channelDeactivate_channel_defaultCountry; - hasOrders: boolean; -} - -export interface ChannelDeactivate_channelDeactivate_errors { - __typename: "ChannelError"; - code: ChannelErrorCode; - field: string | null; - message: string | null; -} - -export interface ChannelDeactivate_channelDeactivate { - __typename: "ChannelDeactivate"; - channel: ChannelDeactivate_channelDeactivate_channel | null; - errors: ChannelDeactivate_channelDeactivate_errors[]; -} - -export interface ChannelDeactivate { - channelDeactivate: ChannelDeactivate_channelDeactivate | null; -} - -export interface ChannelDeactivateVariables { - id: string; -} diff --git a/src/channels/types/ChannelDelete.ts b/src/channels/types/ChannelDelete.ts deleted file mode 100644 index 541ca5186..000000000 --- a/src/channels/types/ChannelDelete.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ChannelDeleteInput, ChannelErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ChannelDelete -// ==================================================== - -export interface ChannelDelete_channelDelete_errors { - __typename: "ChannelError"; - code: ChannelErrorCode; - field: string | null; - message: string | null; -} - -export interface ChannelDelete_channelDelete { - __typename: "ChannelDelete"; - errors: ChannelDelete_channelDelete_errors[]; -} - -export interface ChannelDelete { - channelDelete: ChannelDelete_channelDelete | null; -} - -export interface ChannelDeleteVariables { - id: string; - input?: ChannelDeleteInput | null; -} diff --git a/src/channels/types/ChannelUpdate.ts b/src/channels/types/ChannelUpdate.ts deleted file mode 100644 index 1d9b53367..000000000 --- a/src/channels/types/ChannelUpdate.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ChannelUpdateInput, ChannelErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ChannelUpdate -// ==================================================== - -export interface ChannelUpdate_channelUpdate_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface ChannelUpdate_channelUpdate_channel { - __typename: "Channel"; - id: string; - isActive: boolean; - name: string; - slug: string; - currencyCode: string; - defaultCountry: ChannelUpdate_channelUpdate_channel_defaultCountry; - hasOrders: boolean; -} - -export interface ChannelUpdate_channelUpdate_errors { - __typename: "ChannelError"; - code: ChannelErrorCode; - field: string | null; - message: string | null; -} - -export interface ChannelUpdate_channelUpdate { - __typename: "ChannelUpdate"; - channel: ChannelUpdate_channelUpdate_channel | null; - errors: ChannelUpdate_channelUpdate_errors[]; -} - -export interface ChannelUpdate { - channelUpdate: ChannelUpdate_channelUpdate | null; -} - -export interface ChannelUpdateVariables { - id: string; - input: ChannelUpdateInput; -} diff --git a/src/channels/types/Channels.ts b/src/channels/types/Channels.ts deleted file mode 100644 index 7698a7343..000000000 --- a/src/channels/types/Channels.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: Channels -// ==================================================== - -export interface Channels_channels_defaultCountry { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface Channels_channels { - __typename: "Channel"; - id: string; - isActive: boolean; - name: string; - slug: string; - currencyCode: string; - defaultCountry: Channels_channels_defaultCountry; - hasOrders: boolean; -} - -export interface Channels { - channels: Channels_channels[] | null; -} diff --git a/src/channels/utils.ts b/src/channels/utils.ts index ee09ab8bf..2dea7d0b3 100644 --- a/src/channels/utils.ts +++ b/src/channels/utils.ts @@ -1,28 +1,24 @@ -import { Channels_channels } from "@saleor/channels/types/Channels"; -import { CollectionDetails_collection } from "@saleor/collections/types/CollectionDetails"; import { ChannelSaleFormData, SaleDetailsPageFormData } from "@saleor/discounts/components/SaleDetailsPage"; -import { SaleDetails_sale } from "@saleor/discounts/types/SaleDetails"; -import { VoucherDetails_voucher } from "@saleor/discounts/types/VoucherDetails"; +import { + ChannelDetailsFragment, + ChannelFragment, + CollectionDetailsFragment, + ProductDetailsVariantFragment, + ProductFragment, + ProductVariantDetailsQuery, + SaleDetailsFragment, + SaleType, + ShippingZoneQuery, + VoucherDetailsFragment +} from "@saleor/graphql"; import { RequireOnlyOne } from "@saleor/misc"; -import { - ProductDetails_product, - ProductDetails_product_variants -} from "@saleor/products/types/ProductDetails"; -import { ProductVariantDetails_productVariant } from "@saleor/products/types/ProductVariantDetails"; import { validatePrice } from "@saleor/products/utils/validation"; -import { - ShippingZone_shippingZone_channels, - ShippingZone_shippingZone_shippingMethods_channelListings -} from "@saleor/shipping/types/ShippingZone"; -import { SaleType } from "@saleor/types/globalTypes"; import { mapNodeToChoice } from "@saleor/utils/maps"; import uniqBy from "lodash/uniqBy"; -import { BaseChannels_channels } from "./types/BaseChannels"; - export interface Channel { id: string; name: string; @@ -111,7 +107,7 @@ export interface ChannelCollectionData { publicationDate: string | null; } -export const createCollectionChannels = (data?: BaseChannels_channels[]) => +export const createCollectionChannels = (data?: ChannelFragment[]) => data?.map(channel => ({ id: channel.id, isPublished: false, @@ -119,7 +115,7 @@ export const createCollectionChannels = (data?: BaseChannels_channels[]) => publicationDate: null })); -export const createVoucherChannels = (data?: BaseChannels_channels[]) => +export const createVoucherChannels = (data?: ChannelFragment[]) => data?.map(channel => ({ currency: channel.currencyCode, discountValue: "", @@ -128,7 +124,7 @@ export const createVoucherChannels = (data?: BaseChannels_channels[]) => name: channel.name })); -export const createSaleChannels = (data?: BaseChannels_channels[]) => +export const createSaleChannels = (data?: ChannelFragment[]) => data?.map(channel => ({ currency: channel.currencyCode, discountValue: "", @@ -139,7 +135,7 @@ export const createSaleChannels = (data?: BaseChannels_channels[]) => })); export const createVariantChannels = ( - data?: ProductVariantDetails_productVariant + data?: ProductVariantDetailsQuery["productVariant"] ): ChannelPriceData[] => { if (data) { return data?.channelListings.map(listing => ({ @@ -154,8 +150,8 @@ export const createVariantChannels = ( }; export const createChannelsDataWithSaleDiscountPrice = ( - saleData?: SaleDetails_sale, - data?: BaseChannels_channels[] + saleData?: SaleDetailsFragment, + data?: ChannelFragment[] ): ChannelSaleData[] => { if (data && saleData?.channelListings) { const dataArr = createSaleChannels(data); @@ -167,8 +163,8 @@ export const createChannelsDataWithSaleDiscountPrice = ( }; export const createChannelsDataWithDiscountPrice = ( - voucherData?: VoucherDetails_voucher, - data?: BaseChannels_channels[] + voucherData?: VoucherDetailsFragment, + data?: ChannelFragment[] ): ChannelVoucherData[] => { if (data && voucherData?.channelListings) { const dataArr = createVoucherChannels(data); @@ -179,9 +175,7 @@ export const createChannelsDataWithDiscountPrice = ( return []; }; -export const createChannelsData = ( - data?: BaseChannels_channels[] -): ChannelData[] => +export const createChannelsData = (data?: ChannelFragment[]): ChannelData[] => data?.map(channel => ({ availableForPurchase: null, costPrice: "", @@ -197,8 +191,8 @@ export const createChannelsData = ( })) || []; export const createChannelsDataWithPrice = ( - productData?: ProductDetails_product, - data?: BaseChannels_channels[] + productData?: ProductFragment, + data?: ChannelFragment[] ): ChannelData[] => { if (data && productData?.channelListings) { const dataArr = createChannelsData(data); @@ -210,7 +204,7 @@ export const createChannelsDataWithPrice = ( }; export const createShippingChannels = ( - data?: ShippingZone_shippingZone_channels[] + data?: ShippingZoneQuery["shippingZone"]["channels"] ): ChannelShippingData[] => data?.map(channel => ({ currency: channel.currencyCode, @@ -222,7 +216,7 @@ export const createShippingChannels = ( })) || []; export const createShippingChannelsFromRate = ( - data?: ShippingZone_shippingZone_shippingMethods_channelListings[] + data?: ShippingZoneQuery["shippingZone"]["shippingMethods"][0]["channelListings"] ): ChannelShippingData[] => data?.map(channelData => ({ currency: channelData.channel.currencyCode, @@ -238,7 +232,7 @@ export const createShippingChannelsFromRate = ( })) || []; export const createCollectionChannelsData = ( - collectionData?: CollectionDetails_collection + collectionData?: CollectionDetailsFragment ) => { if (collectionData?.channelListings) { const collectionDataArr = collectionData?.channelListings.map(listing => ({ @@ -261,7 +255,7 @@ export interface ChannelShippingData { } export const createChannelsDataFromVoucher = ( - voucherData?: VoucherDetails_voucher + voucherData?: VoucherDetailsFragment ) => voucherData?.channelListings?.map(option => ({ currency: option.channel.currencyCode || option?.minSpent?.currency || "", @@ -272,7 +266,7 @@ export const createChannelsDataFromVoucher = ( })) || []; export const createChannelsDataFromSale = ( - saleData?: SaleDetails_sale + saleData?: SaleDetailsFragment ): ChannelSaleFormData[] => saleData?.channelListings?.map(option => ({ currency: option.channel.currencyCode || "", @@ -287,9 +281,7 @@ export const createChannelsDataFromSale = ( saleData.type === SaleType.FIXED ? option.discountValue.toString() : "" })) || []; -export const createChannelsDataFromProduct = ( - productData?: ProductDetails_product -) => +export const createChannelsDataFromProduct = (productData?: ProductFragment) => productData?.channelListings?.map( ({ channel, @@ -330,7 +322,7 @@ export const createChannelsDataFromProduct = ( ) || []; export const extractVariantsIdsForChannel = ( - productVariants: ProductDetails_product_variants[], + productVariants: ProductDetailsVariantFragment[], channelId: string ) => productVariants @@ -340,50 +332,50 @@ export const extractVariantsIdsForChannel = ( .map(({ id }) => id) || []; export const createSortedChannelsDataFromProduct = ( - productData?: ProductDetails_product + productData?: ProductFragment ): ChannelData[] => createChannelsDataFromProduct(productData).sort((channel, nextChannel) => channel.name.localeCompare(nextChannel.name) ); -export const createSortedChannelsData = (data?: BaseChannels_channels[]) => +export const createSortedChannelsData = (data?: ChannelFragment[]) => createChannelsData(data)?.sort((channel, nextChannel) => channel.name.localeCompare(nextChannel.name) ); export const createSortedShippingChannels = ( - data?: ShippingZone_shippingZone_channels[] + data?: ShippingZoneQuery["shippingZone"]["channels"] ) => createShippingChannels(data)?.sort((channel, nextChannel) => channel.name.localeCompare(nextChannel.name) ); export const createSortedShippingChannelsFromRate = ( - data?: ShippingZone_shippingZone_shippingMethods_channelListings[] + data?: ShippingZoneQuery["shippingZone"]["shippingMethods"][0]["channelListings"] ) => createShippingChannelsFromRate(data)?.sort((channel, nextChannel) => channel.name.localeCompare(nextChannel.name) ); -export const createSortedVoucherData = (data?: BaseChannels_channels[]) => +export const createSortedVoucherData = (data?: ChannelFragment[]) => createVoucherChannels(data)?.sort((channel, nextChannel) => channel.name.localeCompare(nextChannel.name) ); -export const createSortedSaleData = (data?: BaseChannels_channels[]) => +export const createSortedSaleData = (data?: ChannelFragment[]) => createSaleChannels(data)?.sort((channel, nextChannel) => channel.name.localeCompare(nextChannel.name) ); export const createSortedChannelsDataFromVoucher = ( - data?: VoucherDetails_voucher + data?: VoucherDetailsFragment ) => createChannelsDataFromVoucher(data)?.sort((channel, nextChannel) => channel.name.localeCompare(nextChannel.name) ); export const createSortedChannelsDataFromSale = ( - data?: SaleDetails_sale + data?: SaleDetailsFragment ): ChannelSaleFormData[] => createChannelsDataFromSale(data)?.sort((channel, nextChannel) => channel.name.localeCompare(nextChannel.name) @@ -391,8 +383,8 @@ export const createSortedChannelsDataFromSale = ( export const getChannelsCurrencyChoices = ( id: string, - selectedChannel: Channels_channels, - channelsList: Channels_channels[] + selectedChannel: ChannelDetailsFragment, + channelsList: ChannelDetailsFragment[] ) => id ? mapNodeToChoice( diff --git a/src/channels/views/ChannelCreate/ChannelCreate.tsx b/src/channels/views/ChannelCreate/ChannelCreate.tsx index 633cf96c4..22cf13642 100644 --- a/src/channels/views/ChannelCreate/ChannelCreate.tsx +++ b/src/channels/views/ChannelCreate/ChannelCreate.tsx @@ -1,9 +1,12 @@ import { FormData } from "@saleor/channels/components/ChannelForm/ChannelForm"; -import { ChannelCreate } from "@saleor/channels/types/ChannelCreate"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; import { WindowTitle } from "@saleor/components/WindowTitle"; import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; +import { + ChannelCreateMutation, + useChannelCreateMutation +} from "@saleor/graphql"; import { getSearchFetchMoreProps } from "@saleor/hooks/makeTopLevelSearch/utils"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; @@ -17,7 +20,6 @@ import currencyCodes from "currency-codes"; import React from "react"; import { useIntl } from "react-intl"; -import { useChannelCreateMutation } from "../../mutations"; import ChannelDetailsPage from "../../pages/ChannelDetailsPage"; import { channelPath, channelsListUrl } from "../../urls"; @@ -30,7 +32,9 @@ export const ChannelCreateView = ({}) => { const handleBack = () => navigate(channelsListUrl()); const [createChannel, createChannelOpts] = useChannelCreateMutation({ - onCompleted: ({ channelCreate: { errors, channel } }: ChannelCreate) => { + onCompleted: ({ + channelCreate: { errors, channel } + }: ChannelCreateMutation) => { notify(getDefaultNotifierSuccessErrorData(errors, intl)); if (!errors.length) { diff --git a/src/channels/views/ChannelDetails/ChannelDetails.tsx b/src/channels/views/ChannelDetails/ChannelDetails.tsx index 1c4b2edbd..d5cdf1859 100644 --- a/src/channels/views/ChannelDetails/ChannelDetails.tsx +++ b/src/channels/views/ChannelDetails/ChannelDetails.tsx @@ -1,12 +1,22 @@ import ChannelDeleteDialog from "@saleor/channels/components/ChannelDeleteDialog"; import { FormData } from "@saleor/channels/components/ChannelForm/ChannelForm"; -import { ChannelDelete } from "@saleor/channels/types/ChannelDelete"; import { getChannelsCurrencyChoices } from "@saleor/channels/utils"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; import { WindowTitle } from "@saleor/components/WindowTitle"; import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; -import { ChannelErrorFragment } from "@saleor/fragments/types/ChannelErrorFragment"; +import { + ChannelDeleteMutation, + ChannelErrorFragment, + ChannelUpdateMutation, + useChannelActivateMutation, + useChannelDeactivateMutation, + useChannelDeleteMutation, + useChannelQuery, + useChannelShippingZonesQuery, + useChannelsQuery, + useChannelUpdateMutation +} from "@saleor/graphql"; import { getSearchFetchMoreProps } from "@saleor/hooks/makeTopLevelSearch/utils"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; @@ -16,21 +26,12 @@ import { sectionNames } from "@saleor/intl"; import { Backlink } from "@saleor/macaw-ui"; import { extractMutationErrors } from "@saleor/misc"; import useShippingZonesSearch from "@saleor/searches/useShippingZonesSearch"; -import { useChannelShippingZones } from "@saleor/shipping/queries"; import getChannelsErrorMessage from "@saleor/utils/errors/channels"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import React from "react"; import { useIntl } from "react-intl"; -import { - useChannelActivateMutation, - useChannelDeactivateMutation, - useChannelDeleteMutation, - useChannelUpdateMutation -} from "../../mutations"; import ChannelDetailsPage from "../../pages/ChannelDetailsPage"; -import { useChannelDetails, useChannelsList } from "../../queries"; -import { ChannelUpdate } from "../../types/ChannelUpdate"; import { channelsListUrl, channelUrl, @@ -54,7 +55,7 @@ export const ChannelDetails: React.FC = ({ const handleBack = () => navigate(channelsListUrl()); - const channelsListData = useChannelsList({ displayLoader: true }); + const channelsListData = useChannelsQuery({ displayLoader: true }); const [openModal, closeModal] = createDialogActionHandlers< ChannelUrlDialog, @@ -62,11 +63,11 @@ export const ChannelDetails: React.FC = ({ >(navigate, params => channelUrl(id, params), params); const [updateChannel, updateChannelOpts] = useChannelUpdateMutation({ - onCompleted: ({ channelUpdate: { errors } }: ChannelUpdate) => + onCompleted: ({ channelUpdate: { errors } }: ChannelUpdateMutation) => notify(getDefaultNotifierSuccessErrorData(errors, intl)) }); - const { data, loading } = useChannelDetails({ + const { data, loading } = useChannelQuery({ displayLoader: true, variables: { id } }); @@ -121,7 +122,7 @@ export const ChannelDetails: React.FC = ({ }) ); - const onDeleteCompleted = (data: ChannelDelete) => { + const onDeleteCompleted = (data: ChannelDeleteMutation) => { const errors = data.channelDelete.errors; if (errors.length === 0) { notify({ @@ -160,7 +161,7 @@ export const ChannelDetails: React.FC = ({ const { data: channelShippingZonesData, loading: channelsShippingZonesLoading - } = useChannelShippingZones({ + } = useChannelShippingZonesQuery({ variables: { filter: { channels: [id] diff --git a/src/channels/views/ChannelsList/ChannelsList.tsx b/src/channels/views/ChannelsList/ChannelsList.tsx index 1ef5ad354..ade88b01b 100644 --- a/src/channels/views/ChannelsList/ChannelsList.tsx +++ b/src/channels/views/ChannelsList/ChannelsList.tsx @@ -1,6 +1,11 @@ import { getChannelsCurrencyChoices } from "@saleor/channels/utils"; -import { useShopLimitsQuery } from "@saleor/components/Shop/query"; +import { useShopLimitsQuery } from "@saleor/components/Shop/queries"; import { configurationMenuUrl } from "@saleor/configuration"; +import { + ChannelDeleteMutation, + useChannelDeleteMutation, + useChannelsQuery +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import getChannelsErrorMessage from "@saleor/utils/errors/channels"; @@ -9,10 +14,7 @@ import React from "react"; import { useIntl } from "react-intl"; import ChannelDeleteDialog from "../../components/ChannelDeleteDialog"; -import { useChannelDeleteMutation } from "../../mutations"; import ChannelsListPage from "../../pages/ChannelsListPage"; -import { useChannelsList } from "../../queries"; -import { ChannelDelete } from "../../types/ChannelDelete"; import { channelAddUrl, channelsListUrl, @@ -30,7 +32,7 @@ export const ChannelsList: React.FC = ({ params }) => { const notify = useNotifier(); const intl = useIntl(); - const { data, refetch } = useChannelsList({ displayLoader: true }); + const { data, refetch } = useChannelsQuery({ displayLoader: true }); const limitOpts = useShopLimitsQuery({ variables: { channels: true @@ -46,7 +48,7 @@ export const ChannelsList: React.FC = ({ params }) => { ChannelsListUrlQueryParams >(navigate, channelsListUrl, params); - const onCompleted = (data: ChannelDelete) => { + const onCompleted = (data: ChannelDeleteMutation) => { const errors = data.channelDelete.errors; if (errors.length === 0) { notify({ diff --git a/src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx b/src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx index f4ab9df58..c4e1f0ab7 100644 --- a/src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx +++ b/src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx @@ -7,13 +7,14 @@ import Metadata from "@saleor/components/Metadata"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; import SeoForm from "@saleor/components/SeoForm"; -import { CollectionChannelListingErrorFragment } from "@saleor/fragments/types/CollectionChannelListingErrorFragment"; -import { CollectionErrorFragment } from "@saleor/fragments/types/CollectionErrorFragment"; +import { + CollectionChannelListingErrorFragment, + CollectionErrorFragment, + PermissionEnum +} from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; -import { PermissionEnum } from "@saleor/types/globalTypes"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import React from "react"; import { useIntl } from "react-intl"; diff --git a/src/collections/components/CollectionDetails/CollectionDetails.tsx b/src/collections/components/CollectionDetails/CollectionDetails.tsx index 248e86630..aaa58a30d 100644 --- a/src/collections/components/CollectionDetails/CollectionDetails.tsx +++ b/src/collections/components/CollectionDetails/CollectionDetails.tsx @@ -5,7 +5,7 @@ import FormSpacer from "@saleor/components/FormSpacer"; import RichTextEditor, { RichTextEditorChange } from "@saleor/components/RichTextEditor"; -import { CollectionErrorFragment } from "@saleor/fragments/types/CollectionErrorFragment"; +import { CollectionErrorFragment } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { getFormErrors, getProductErrorMessage } from "@saleor/utils/errors"; import React from "react"; diff --git a/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx b/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx index da5227c40..e7a515a5e 100644 --- a/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx +++ b/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx @@ -7,18 +7,19 @@ import Metadata from "@saleor/components/Metadata/Metadata"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; import SeoForm from "@saleor/components/SeoForm"; -import { CollectionChannelListingErrorFragment } from "@saleor/fragments/types/CollectionChannelListingErrorFragment"; -import { CollectionErrorFragment } from "@saleor/fragments/types/CollectionErrorFragment"; +import { + CollectionChannelListingErrorFragment, + CollectionDetailsQuery, + CollectionErrorFragment, + PermissionEnum +} from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; -import { PermissionEnum } from "@saleor/types/globalTypes"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import React from "react"; import { useIntl } from "react-intl"; import { ChannelProps, ListActions, PageListProps } from "../../../types"; -import { CollectionDetails_collection } from "../../types/CollectionDetails"; import CollectionDetails from "../CollectionDetails/CollectionDetails"; import { CollectionImage } from "../CollectionImage/CollectionImage"; import CollectionProducts from "../CollectionProducts/CollectionProducts"; @@ -30,7 +31,7 @@ export interface CollectionDetailsPageProps ChannelProps { channelsCount: number; channelsErrors: CollectionChannelListingErrorFragment[]; - collection: CollectionDetails_collection; + collection: CollectionDetailsQuery["collection"]; currentChannels: ChannelCollectionData[]; errors: CollectionErrorFragment[]; hasChannelChanged: boolean; diff --git a/src/collections/components/CollectionDetailsPage/form.tsx b/src/collections/components/CollectionDetailsPage/form.tsx index 6d909062b..59d5c12a8 100644 --- a/src/collections/components/CollectionDetailsPage/form.tsx +++ b/src/collections/components/CollectionDetailsPage/form.tsx @@ -1,11 +1,11 @@ import { OutputData } from "@editorjs/editorjs"; import { ChannelCollectionData } from "@saleor/channels/utils"; -import { CollectionDetails_collection } from "@saleor/collections/types/CollectionDetails"; import { createChannelsChangeHandler } from "@saleor/collections/utils"; import { COLLECTION_DETAILS_FORM_ID } from "@saleor/collections/views/consts"; import { useExitFormDialog } from "@saleor/components/Form/useExitFormDialog"; import { MetadataFormData } from "@saleor/components/Metadata"; import { RichTextEditorChange } from "@saleor/components/RichTextEditor"; +import { CollectionDetailsFragment } from "@saleor/graphql"; import useForm, { CommonUseFormResultWithHandlers, FormChange @@ -44,14 +44,14 @@ export type UseCollectionUpdateFormResult = CommonUseFormResultWithHandlers< export interface CollectionUpdateFormProps { children: (props: UseCollectionUpdateFormResult) => React.ReactNode; - collection: CollectionDetails_collection; + collection: CollectionDetailsFragment; currentChannels: ChannelCollectionData[]; setChannels: (data: ChannelCollectionData[]) => void; onSubmit: (data: CollectionUpdateData) => Promise; } const getInitialData = ( - collection: CollectionDetails_collection, + collection: CollectionDetailsFragment, currentChannels: ChannelCollectionData[] ): CollectionUpdateFormData => ({ backgroundImageAlt: collection?.backgroundImage?.alt || "", @@ -65,7 +65,7 @@ const getInitialData = ( }); function useCollectionUpdateForm( - collection: CollectionDetails_collection, + collection: CollectionDetailsFragment, currentChannels: ChannelCollectionData[], setChannels: (data: ChannelCollectionData[]) => void, onSubmit: (data: CollectionUpdateData) => Promise diff --git a/src/collections/components/CollectionImage/CollectionImage.tsx b/src/collections/components/CollectionImage/CollectionImage.tsx index cef54fed9..9a95d61b3 100644 --- a/src/collections/components/CollectionImage/CollectionImage.tsx +++ b/src/collections/components/CollectionImage/CollectionImage.tsx @@ -4,13 +4,12 @@ import Hr from "@saleor/components/Hr"; import ImageUpload from "@saleor/components/ImageUpload"; import MediaTile from "@saleor/components/MediaTile"; import Skeleton from "@saleor/components/Skeleton"; +import { CollectionDetailsFragment } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { Button, makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { CollectionDetails_collection_backgroundImage } from "../../types/CollectionDetails"; - const useStyles = makeStyles( theme => ({ PhotosIcon: { @@ -52,7 +51,7 @@ export interface CollectionImageProps { data: { backgroundImageAlt: string; }; - image: CollectionDetails_collection_backgroundImage; + image: CollectionDetailsFragment["backgroundImage"]; onChange: (event: React.ChangeEvent) => void; onImageDelete: () => void; onImageUpload: (file: File) => void; diff --git a/src/collections/components/CollectionList/CollectionList.tsx b/src/collections/components/CollectionList/CollectionList.tsx index ee3f2ae5b..4b874be80 100644 --- a/src/collections/components/CollectionList/CollectionList.tsx +++ b/src/collections/components/CollectionList/CollectionList.tsx @@ -14,15 +14,20 @@ import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; import TooltipTableCellHeader from "@saleor/components/TooltipTableCellHeader"; import { commonTooltipMessages } from "@saleor/components/TooltipTableCellHeader/messages"; +import { CollectionListQuery } from "@saleor/graphql"; import { makeStyles, Pill } from "@saleor/macaw-ui"; import { maybe, renderCollection } from "@saleor/misc"; -import { ChannelProps, ListActions, ListProps, SortPage } from "@saleor/types"; +import { + ChannelProps, + ListActions, + ListProps, + RelayToFlat, + SortPage +} from "@saleor/types"; import { getArrowDirection } from "@saleor/utils/sort"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { CollectionList_collections_edges_node } from "../../types/CollectionList"; - const useStyles = makeStyles( theme => ({ [theme.breakpoints.up("lg")]: { @@ -48,12 +53,12 @@ const useStyles = makeStyles( { name: "CollectionList" } ); -interface CollectionListProps +export interface CollectionListProps extends ListProps, ListActions, SortPage, ChannelProps { - collections: CollectionList_collections_edges_node[]; + collections: RelayToFlat; } const numberOfColumns = 4; diff --git a/src/collections/components/CollectionListPage/CollectionListPage.tsx b/src/collections/components/CollectionListPage/CollectionListPage.tsx index e6b0ff287..83614feaa 100644 --- a/src/collections/components/CollectionListPage/CollectionListPage.tsx +++ b/src/collections/components/CollectionListPage/CollectionListPage.tsx @@ -1,5 +1,4 @@ import { Card } from "@material-ui/core"; -import { CollectionListUrlSortField } from "@saleor/collections/urls"; import { Container } from "@saleor/components/Container"; import { getByName } from "@saleor/components/Filter/utils"; import FilterBar from "@saleor/components/FilterBar"; @@ -7,19 +6,17 @@ import PageHeader from "@saleor/components/PageHeader"; import { sectionNames } from "@saleor/intl"; import { Button } from "@saleor/macaw-ui"; import { - ChannelProps, FilterPageProps, - ListActions, PageListProps, SearchPageProps, - SortPage, TabPageProps } from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { CollectionList_collections_edges_node } from "../../types/CollectionList"; -import CollectionList from "../CollectionList/CollectionList"; +import CollectionList, { + CollectionListProps +} from "../CollectionList/CollectionList"; import { CollectionFilterKeys, CollectionListFilterOpts, @@ -27,13 +24,10 @@ import { } from "./filters"; export interface CollectionListPageProps extends PageListProps, - ListActions, SearchPageProps, - SortPage, TabPageProps, FilterPageProps, - ChannelProps { - collections: CollectionList_collections_edges_node[]; + CollectionListProps { channelsCount: number; } diff --git a/src/collections/components/CollectionListPage/filters.ts b/src/collections/components/CollectionListPage/filters.ts index dd1cf5172..e1c33fa38 100644 --- a/src/collections/components/CollectionListPage/filters.ts +++ b/src/collections/components/CollectionListPage/filters.ts @@ -1,8 +1,8 @@ import { IFilter } from "@saleor/components/Filter"; import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; +import { CollectionPublished } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { FilterOpts } from "@saleor/types"; -import { CollectionPublished } from "@saleor/types/globalTypes"; import { createOptionsField } from "@saleor/utils/filters/fields"; import { defineMessages, IntlShape } from "react-intl"; diff --git a/src/collections/components/CollectionProducts/CollectionProducts.tsx b/src/collections/components/CollectionProducts/CollectionProducts.tsx index f02e14702..7837713e0 100644 --- a/src/collections/components/CollectionProducts/CollectionProducts.tsx +++ b/src/collections/components/CollectionProducts/CollectionProducts.tsx @@ -14,6 +14,7 @@ import TableCellAvatar from "@saleor/components/TableCellAvatar"; import { AVATAR_MARGIN } from "@saleor/components/TableCellAvatar/Avatar"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; +import { CollectionDetailsQuery } from "@saleor/graphql"; import { Button, DeleteIcon, IconButton, makeStyles } from "@saleor/macaw-ui"; import { mapEdgesToItems } from "@saleor/utils/maps"; import React from "react"; @@ -21,7 +22,6 @@ import { FormattedMessage, useIntl } from "react-intl"; import { maybe, renderCollection } from "../../../misc"; import { ListActions, PageListProps } from "../../../types"; -import { CollectionDetails_collection } from "../../types/CollectionDetails"; const useStyles = makeStyles( theme => ({ @@ -53,7 +53,7 @@ const useStyles = makeStyles( ); export interface CollectionProductsProps extends PageListProps, ListActions { - collection: CollectionDetails_collection; + collection: CollectionDetailsQuery["collection"]; onProductUnassign: (id: string, event: React.MouseEvent) => void; } diff --git a/src/collections/fixtures.ts b/src/collections/fixtures.ts index 4f99198d6..50af7514e 100644 --- a/src/collections/fixtures.ts +++ b/src/collections/fixtures.ts @@ -1,9 +1,12 @@ -import { CollectionPublished } from "@saleor/types/globalTypes"; +import { + CollectionDetailsQuery, + CollectionListQuery, + CollectionPublished +} from "@saleor/graphql"; +import { RelayToFlat } from "@saleor/types"; import * as richTextEditorFixtures from "../components/RichTextEditor/fixtures.json"; import { CollectionListFilterOpts } from "./components/CollectionListPage"; -import { CollectionDetails_collection } from "./types/CollectionDetails"; -import { CollectionList_collections_edges_node } from "./types/CollectionList"; const content = richTextEditorFixtures.richTextEditor; @@ -24,7 +27,7 @@ export const collectionListFilterOpts: CollectionListFilterOpts = { } }; -export const collections: CollectionList_collections_edges_node[] = [ +export const collections: RelayToFlat = [ { __typename: "Collection", channelListings: [ @@ -155,7 +158,7 @@ export const collections: CollectionList_collections_edges_node[] = [ export const collection: ( placeholderCollectionImage: string, placeholderProductImage: string -) => CollectionDetails_collection = ( +) => CollectionDetailsQuery["collection"] = ( placeholderCollectionImage, placeholderImage ) => ({ diff --git a/src/collections/mutations.ts b/src/collections/mutations.ts index f33dbe882..2a2cabcec 100644 --- a/src/collections/mutations.ts +++ b/src/collections/mutations.ts @@ -1,65 +1,19 @@ import { gql } from "@apollo/client"; -import { - CollectionChannelListingUpdate, - CollectionChannelListingUpdateVariables -} from "@saleor/collections/types/CollectionChannelListingUpdate"; -import { - collectionDetailsFragment, - collectionProductFragment -} from "@saleor/fragments/collections"; -import { - collectionChannelListingErrorFragment, - collectionsErrorFragment -} from "@saleor/fragments/errors"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { - CollectionAssignProduct, - CollectionAssignProductVariables -} from "./types/CollectionAssignProduct"; -import { - CollectionBulkDelete, - CollectionBulkDeleteVariables -} from "./types/CollectionBulkDelete"; -import { - CollectionUpdate, - CollectionUpdateVariables -} from "./types/CollectionUpdate"; -import { - CreateCollection, - CreateCollectionVariables -} from "./types/CreateCollection"; -import { - RemoveCollection, - RemoveCollectionVariables -} from "./types/RemoveCollection"; -import { - UnassignCollectionProduct, - UnassignCollectionProductVariables -} from "./types/UnassignCollectionProduct"; - -const collectionUpdate = gql` - ${collectionDetailsFragment} - ${collectionsErrorFragment} +export const collectionUpdate = gql` mutation CollectionUpdate($id: ID!, $input: CollectionInput!) { collectionUpdate(id: $id, input: $input) { collection { - ...CollectionDetailsFragment + ...CollectionDetails } errors { - ...CollectionErrorFragment + ...CollectionError } } } `; -export const useCollectionUpdateMutation = makeMutation< - CollectionUpdate, - CollectionUpdateVariables ->(collectionUpdate); -const assignCollectionProduct = gql` - ${collectionProductFragment} - ${collectionsErrorFragment} +export const assignCollectionProduct = gql` mutation CollectionAssignProduct( $collectionId: ID! $productIds: [ID!]! @@ -74,7 +28,7 @@ const assignCollectionProduct = gql` products(first: $first, after: $after, before: $before, last: $last) { edges { node { - ...CollectionProductFragment + ...CollectionProduct } } pageInfo { @@ -86,52 +40,36 @@ const assignCollectionProduct = gql` } } errors { - ...CollectionErrorFragment + ...CollectionError } } } `; -export const useCollectionAssignProductMutation = makeMutation< - CollectionAssignProduct, - CollectionAssignProductVariables ->(assignCollectionProduct); -const createCollection = gql` - ${collectionDetailsFragment} - ${collectionsErrorFragment} +export const createCollection = gql` mutation CreateCollection($input: CollectionCreateInput!) { collectionCreate(input: $input) { collection { - ...CollectionDetailsFragment + ...CollectionDetails } errors { - ...CollectionErrorFragment + ...CollectionError } } } `; -export const useCollectionCreateMutation = makeMutation< - CreateCollection, - CreateCollectionVariables ->(createCollection); -const removeCollection = gql` - ${collectionsErrorFragment} +export const removeCollection = gql` mutation RemoveCollection($id: ID!) { collectionDelete(id: $id) { errors { - ...CollectionErrorFragment + ...CollectionError } } } `; -export const useCollectionRemoveMutation = makeMutation< - RemoveCollection, - RemoveCollectionVariables ->(removeCollection); -const unassignCollectionProduct = gql` - ${collectionsErrorFragment} +export const unassignCollectionProduct = gql` mutation UnassignCollectionProduct( $collectionId: ID! $productIds: [ID]! @@ -169,45 +107,31 @@ const unassignCollectionProduct = gql` } } errors { - ...CollectionErrorFragment + ...CollectionError } } } `; -export const useUnassignCollectionProductMutation = makeMutation< - UnassignCollectionProduct, - UnassignCollectionProductVariables ->(unassignCollectionProduct); -const collectionBulkDelete = gql` - ${collectionsErrorFragment} +export const collectionBulkDelete = gql` mutation CollectionBulkDelete($ids: [ID]!) { collectionBulkDelete(ids: $ids) { errors { - ...CollectionErrorFragment + ...CollectionError } } } `; -export const useCollectionBulkDelete = makeMutation< - CollectionBulkDelete, - CollectionBulkDeleteVariables ->(collectionBulkDelete); -const collectionChannelListingUpdate = gql` - ${collectionChannelListingErrorFragment} +export const collectionChannelListingUpdate = gql` mutation CollectionChannelListingUpdate( $id: ID! $input: CollectionChannelListingUpdateInput! ) { collectionChannelListingUpdate(id: $id, input: $input) { errors { - ...CollectionChannelListingErrorFragment + ...CollectionChannelListingError } } } `; -export const useCollectionChannelListingUpdate = makeMutation< - CollectionChannelListingUpdate, - CollectionChannelListingUpdateVariables ->(collectionChannelListingUpdate); diff --git a/src/collections/queries.ts b/src/collections/queries.ts index 6507e580e..ecc51a2a7 100644 --- a/src/collections/queries.ts +++ b/src/collections/queries.ts @@ -1,23 +1,6 @@ import { gql } from "@apollo/client"; -import { - collectionDetailsFragment, - collectionFragment, - collectionProductFragment -} from "@saleor/fragments/collections"; -import makeQuery from "@saleor/hooks/makeQuery"; - -import { TypedQuery } from "../queries"; -import { - CollectionDetails, - CollectionDetailsVariables -} from "./types/CollectionDetails"; -import { - CollectionList, - CollectionListVariables -} from "./types/CollectionList"; export const collectionList = gql` - ${collectionFragment} query CollectionList( $first: Int $after: String @@ -38,7 +21,7 @@ export const collectionList = gql` ) { edges { node { - ...CollectionFragment + ...Collection products { totalCount } @@ -53,14 +36,8 @@ export const collectionList = gql` } } `; -export const useCollectionListQuery = makeQuery< - CollectionList, - CollectionListVariables ->(collectionList); export const collectionDetails = gql` - ${collectionDetailsFragment} - ${collectionProductFragment} query CollectionDetails( $id: ID! $first: Int @@ -69,11 +46,11 @@ export const collectionDetails = gql` $before: String ) { collection(id: $id) { - ...CollectionDetailsFragment + ...CollectionDetails products(first: $first, after: $after, before: $before, last: $last) { edges { node { - ...CollectionProductFragment + ...CollectionProduct } } pageInfo { @@ -86,7 +63,3 @@ export const collectionDetails = gql` } } `; -export const TypedCollectionDetailsQuery = TypedQuery< - CollectionDetails, - CollectionDetailsVariables ->(collectionDetails); diff --git a/src/collections/types/CollectionAssignProduct.ts b/src/collections/types/CollectionAssignProduct.ts deleted file mode 100644 index 1ed3210a2..000000000 --- a/src/collections/types/CollectionAssignProduct.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { CollectionErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: CollectionAssignProduct -// ==================================================== - -export interface CollectionAssignProduct_collectionAddProducts_collection_products_edges_node_productType { - __typename: "ProductType"; - id: string; - name: string; -} - -export interface CollectionAssignProduct_collectionAddProducts_collection_products_edges_node_thumbnail { - __typename: "Image"; - url: string; -} - -export interface CollectionAssignProduct_collectionAddProducts_collection_products_edges_node_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface CollectionAssignProduct_collectionAddProducts_collection_products_edges_node_channelListings { - __typename: "ProductChannelListing"; - isPublished: boolean; - publicationDate: any | null; - isAvailableForPurchase: boolean | null; - availableForPurchase: any | null; - visibleInListings: boolean; - channel: CollectionAssignProduct_collectionAddProducts_collection_products_edges_node_channelListings_channel; -} - -export interface CollectionAssignProduct_collectionAddProducts_collection_products_edges_node { - __typename: "Product"; - id: string; - name: string; - productType: CollectionAssignProduct_collectionAddProducts_collection_products_edges_node_productType; - thumbnail: CollectionAssignProduct_collectionAddProducts_collection_products_edges_node_thumbnail | null; - channelListings: CollectionAssignProduct_collectionAddProducts_collection_products_edges_node_channelListings[] | null; -} - -export interface CollectionAssignProduct_collectionAddProducts_collection_products_edges { - __typename: "ProductCountableEdge"; - node: CollectionAssignProduct_collectionAddProducts_collection_products_edges_node; -} - -export interface CollectionAssignProduct_collectionAddProducts_collection_products_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface CollectionAssignProduct_collectionAddProducts_collection_products { - __typename: "ProductCountableConnection"; - edges: CollectionAssignProduct_collectionAddProducts_collection_products_edges[]; - pageInfo: CollectionAssignProduct_collectionAddProducts_collection_products_pageInfo; -} - -export interface CollectionAssignProduct_collectionAddProducts_collection { - __typename: "Collection"; - id: string; - products: CollectionAssignProduct_collectionAddProducts_collection_products | null; -} - -export interface CollectionAssignProduct_collectionAddProducts_errors { - __typename: "CollectionError"; - code: CollectionErrorCode; - field: string | null; - message: string | null; -} - -export interface CollectionAssignProduct_collectionAddProducts { - __typename: "CollectionAddProducts"; - collection: CollectionAssignProduct_collectionAddProducts_collection | null; - errors: CollectionAssignProduct_collectionAddProducts_errors[]; -} - -export interface CollectionAssignProduct { - collectionAddProducts: CollectionAssignProduct_collectionAddProducts | null; -} - -export interface CollectionAssignProductVariables { - collectionId: string; - productIds: string[]; - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; -} diff --git a/src/collections/types/CollectionBulkDelete.ts b/src/collections/types/CollectionBulkDelete.ts deleted file mode 100644 index db3c5b296..000000000 --- a/src/collections/types/CollectionBulkDelete.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { CollectionErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: CollectionBulkDelete -// ==================================================== - -export interface CollectionBulkDelete_collectionBulkDelete_errors { - __typename: "CollectionError"; - code: CollectionErrorCode; - field: string | null; - message: string | null; -} - -export interface CollectionBulkDelete_collectionBulkDelete { - __typename: "CollectionBulkDelete"; - errors: CollectionBulkDelete_collectionBulkDelete_errors[]; -} - -export interface CollectionBulkDelete { - collectionBulkDelete: CollectionBulkDelete_collectionBulkDelete | null; -} - -export interface CollectionBulkDeleteVariables { - ids: (string | null)[]; -} diff --git a/src/collections/types/CollectionChannelListingUpdate.ts b/src/collections/types/CollectionChannelListingUpdate.ts deleted file mode 100644 index aa2993e5d..000000000 --- a/src/collections/types/CollectionChannelListingUpdate.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { CollectionChannelListingUpdateInput, ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: CollectionChannelListingUpdate -// ==================================================== - -export interface CollectionChannelListingUpdate_collectionChannelListingUpdate_errors { - __typename: "CollectionChannelListingError"; - code: ProductErrorCode; - field: string | null; - message: string | null; - channels: string[] | null; -} - -export interface CollectionChannelListingUpdate_collectionChannelListingUpdate { - __typename: "CollectionChannelListingUpdate"; - errors: CollectionChannelListingUpdate_collectionChannelListingUpdate_errors[]; -} - -export interface CollectionChannelListingUpdate { - collectionChannelListingUpdate: CollectionChannelListingUpdate_collectionChannelListingUpdate | null; -} - -export interface CollectionChannelListingUpdateVariables { - id: string; - input: CollectionChannelListingUpdateInput; -} diff --git a/src/collections/types/CollectionDetails.ts b/src/collections/types/CollectionDetails.ts deleted file mode 100644 index 0804a66ca..000000000 --- a/src/collections/types/CollectionDetails.ts +++ /dev/null @@ -1,122 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: CollectionDetails -// ==================================================== - -export interface CollectionDetails_collection_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; -} - -export interface CollectionDetails_collection_channelListings { - __typename: "CollectionChannelListing"; - isPublished: boolean; - publicationDate: any | null; - channel: CollectionDetails_collection_channelListings_channel; -} - -export interface CollectionDetails_collection_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CollectionDetails_collection_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CollectionDetails_collection_backgroundImage { - __typename: "Image"; - alt: string | null; - url: string; -} - -export interface CollectionDetails_collection_products_edges_node_productType { - __typename: "ProductType"; - id: string; - name: string; -} - -export interface CollectionDetails_collection_products_edges_node_thumbnail { - __typename: "Image"; - url: string; -} - -export interface CollectionDetails_collection_products_edges_node_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface CollectionDetails_collection_products_edges_node_channelListings { - __typename: "ProductChannelListing"; - isPublished: boolean; - publicationDate: any | null; - isAvailableForPurchase: boolean | null; - availableForPurchase: any | null; - visibleInListings: boolean; - channel: CollectionDetails_collection_products_edges_node_channelListings_channel; -} - -export interface CollectionDetails_collection_products_edges_node { - __typename: "Product"; - id: string; - name: string; - productType: CollectionDetails_collection_products_edges_node_productType; - thumbnail: CollectionDetails_collection_products_edges_node_thumbnail | null; - channelListings: CollectionDetails_collection_products_edges_node_channelListings[] | null; -} - -export interface CollectionDetails_collection_products_edges { - __typename: "ProductCountableEdge"; - node: CollectionDetails_collection_products_edges_node; -} - -export interface CollectionDetails_collection_products_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface CollectionDetails_collection_products { - __typename: "ProductCountableConnection"; - edges: CollectionDetails_collection_products_edges[]; - pageInfo: CollectionDetails_collection_products_pageInfo; -} - -export interface CollectionDetails_collection { - __typename: "Collection"; - id: string; - name: string; - channelListings: CollectionDetails_collection_channelListings[] | null; - metadata: (CollectionDetails_collection_metadata | null)[]; - privateMetadata: (CollectionDetails_collection_privateMetadata | null)[]; - backgroundImage: CollectionDetails_collection_backgroundImage | null; - slug: string; - description: any | null; - seoDescription: string | null; - seoTitle: string | null; - products: CollectionDetails_collection_products | null; -} - -export interface CollectionDetails { - collection: CollectionDetails_collection | null; -} - -export interface CollectionDetailsVariables { - id: string; - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; -} diff --git a/src/collections/types/CollectionList.ts b/src/collections/types/CollectionList.ts deleted file mode 100644 index f0eed9dcd..000000000 --- a/src/collections/types/CollectionList.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { CollectionFilterInput, CollectionSortingInput } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: CollectionList -// ==================================================== - -export interface CollectionList_collections_edges_node_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; -} - -export interface CollectionList_collections_edges_node_channelListings { - __typename: "CollectionChannelListing"; - isPublished: boolean; - publicationDate: any | null; - channel: CollectionList_collections_edges_node_channelListings_channel; -} - -export interface CollectionList_collections_edges_node_products { - __typename: "ProductCountableConnection"; - totalCount: number | null; -} - -export interface CollectionList_collections_edges_node { - __typename: "Collection"; - id: string; - name: string; - channelListings: CollectionList_collections_edges_node_channelListings[] | null; - products: CollectionList_collections_edges_node_products | null; -} - -export interface CollectionList_collections_edges { - __typename: "CollectionCountableEdge"; - node: CollectionList_collections_edges_node; -} - -export interface CollectionList_collections_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface CollectionList_collections { - __typename: "CollectionCountableConnection"; - edges: CollectionList_collections_edges[]; - pageInfo: CollectionList_collections_pageInfo; -} - -export interface CollectionList { - collections: CollectionList_collections | null; -} - -export interface CollectionListVariables { - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; - filter?: CollectionFilterInput | null; - sort?: CollectionSortingInput | null; - channel?: string | null; -} diff --git a/src/collections/types/CollectionUpdate.ts b/src/collections/types/CollectionUpdate.ts deleted file mode 100644 index 8214996da..000000000 --- a/src/collections/types/CollectionUpdate.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { CollectionInput, CollectionErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: CollectionUpdate -// ==================================================== - -export interface CollectionUpdate_collectionUpdate_collection_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; -} - -export interface CollectionUpdate_collectionUpdate_collection_channelListings { - __typename: "CollectionChannelListing"; - isPublished: boolean; - publicationDate: any | null; - channel: CollectionUpdate_collectionUpdate_collection_channelListings_channel; -} - -export interface CollectionUpdate_collectionUpdate_collection_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CollectionUpdate_collectionUpdate_collection_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CollectionUpdate_collectionUpdate_collection_backgroundImage { - __typename: "Image"; - alt: string | null; - url: string; -} - -export interface CollectionUpdate_collectionUpdate_collection { - __typename: "Collection"; - id: string; - name: string; - channelListings: CollectionUpdate_collectionUpdate_collection_channelListings[] | null; - metadata: (CollectionUpdate_collectionUpdate_collection_metadata | null)[]; - privateMetadata: (CollectionUpdate_collectionUpdate_collection_privateMetadata | null)[]; - backgroundImage: CollectionUpdate_collectionUpdate_collection_backgroundImage | null; - slug: string; - description: any | null; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface CollectionUpdate_collectionUpdate_errors { - __typename: "CollectionError"; - code: CollectionErrorCode; - field: string | null; - message: string | null; -} - -export interface CollectionUpdate_collectionUpdate { - __typename: "CollectionUpdate"; - collection: CollectionUpdate_collectionUpdate_collection | null; - errors: CollectionUpdate_collectionUpdate_errors[]; -} - -export interface CollectionUpdate { - collectionUpdate: CollectionUpdate_collectionUpdate | null; -} - -export interface CollectionUpdateVariables { - id: string; - input: CollectionInput; -} diff --git a/src/collections/types/CreateCollection.ts b/src/collections/types/CreateCollection.ts deleted file mode 100644 index 05bf343fd..000000000 --- a/src/collections/types/CreateCollection.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { CollectionCreateInput, CollectionErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: CreateCollection -// ==================================================== - -export interface CreateCollection_collectionCreate_collection_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; -} - -export interface CreateCollection_collectionCreate_collection_channelListings { - __typename: "CollectionChannelListing"; - isPublished: boolean; - publicationDate: any | null; - channel: CreateCollection_collectionCreate_collection_channelListings_channel; -} - -export interface CreateCollection_collectionCreate_collection_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CreateCollection_collectionCreate_collection_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CreateCollection_collectionCreate_collection_backgroundImage { - __typename: "Image"; - alt: string | null; - url: string; -} - -export interface CreateCollection_collectionCreate_collection { - __typename: "Collection"; - id: string; - name: string; - channelListings: CreateCollection_collectionCreate_collection_channelListings[] | null; - metadata: (CreateCollection_collectionCreate_collection_metadata | null)[]; - privateMetadata: (CreateCollection_collectionCreate_collection_privateMetadata | null)[]; - backgroundImage: CreateCollection_collectionCreate_collection_backgroundImage | null; - slug: string; - description: any | null; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface CreateCollection_collectionCreate_errors { - __typename: "CollectionError"; - code: CollectionErrorCode; - field: string | null; - message: string | null; -} - -export interface CreateCollection_collectionCreate { - __typename: "CollectionCreate"; - collection: CreateCollection_collectionCreate_collection | null; - errors: CreateCollection_collectionCreate_errors[]; -} - -export interface CreateCollection { - collectionCreate: CreateCollection_collectionCreate | null; -} - -export interface CreateCollectionVariables { - input: CollectionCreateInput; -} diff --git a/src/collections/types/RemoveCollection.ts b/src/collections/types/RemoveCollection.ts deleted file mode 100644 index 3721c6c4e..000000000 --- a/src/collections/types/RemoveCollection.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { CollectionErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: RemoveCollection -// ==================================================== - -export interface RemoveCollection_collectionDelete_errors { - __typename: "CollectionError"; - code: CollectionErrorCode; - field: string | null; - message: string | null; -} - -export interface RemoveCollection_collectionDelete { - __typename: "CollectionDelete"; - errors: RemoveCollection_collectionDelete_errors[]; -} - -export interface RemoveCollection { - collectionDelete: RemoveCollection_collectionDelete | null; -} - -export interface RemoveCollectionVariables { - id: string; -} diff --git a/src/collections/types/UnassignCollectionProduct.ts b/src/collections/types/UnassignCollectionProduct.ts deleted file mode 100644 index 9ebc172c6..000000000 --- a/src/collections/types/UnassignCollectionProduct.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { CollectionErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: UnassignCollectionProduct -// ==================================================== - -export interface UnassignCollectionProduct_collectionRemoveProducts_collection_products_edges_node_productType { - __typename: "ProductType"; - id: string; - name: string; -} - -export interface UnassignCollectionProduct_collectionRemoveProducts_collection_products_edges_node_thumbnail { - __typename: "Image"; - url: string; -} - -export interface UnassignCollectionProduct_collectionRemoveProducts_collection_products_edges_node { - __typename: "Product"; - id: string; - name: string; - productType: UnassignCollectionProduct_collectionRemoveProducts_collection_products_edges_node_productType; - thumbnail: UnassignCollectionProduct_collectionRemoveProducts_collection_products_edges_node_thumbnail | null; -} - -export interface UnassignCollectionProduct_collectionRemoveProducts_collection_products_edges { - __typename: "ProductCountableEdge"; - node: UnassignCollectionProduct_collectionRemoveProducts_collection_products_edges_node; -} - -export interface UnassignCollectionProduct_collectionRemoveProducts_collection_products_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface UnassignCollectionProduct_collectionRemoveProducts_collection_products { - __typename: "ProductCountableConnection"; - edges: UnassignCollectionProduct_collectionRemoveProducts_collection_products_edges[]; - pageInfo: UnassignCollectionProduct_collectionRemoveProducts_collection_products_pageInfo; -} - -export interface UnassignCollectionProduct_collectionRemoveProducts_collection { - __typename: "Collection"; - id: string; - products: UnassignCollectionProduct_collectionRemoveProducts_collection_products | null; -} - -export interface UnassignCollectionProduct_collectionRemoveProducts_errors { - __typename: "CollectionError"; - code: CollectionErrorCode; - field: string | null; - message: string | null; -} - -export interface UnassignCollectionProduct_collectionRemoveProducts { - __typename: "CollectionRemoveProducts"; - collection: UnassignCollectionProduct_collectionRemoveProducts_collection | null; - errors: UnassignCollectionProduct_collectionRemoveProducts_errors[]; -} - -export interface UnassignCollectionProduct { - collectionRemoveProducts: UnassignCollectionProduct_collectionRemoveProducts | null; -} - -export interface UnassignCollectionProductVariables { - collectionId: string; - productIds: (string | null)[]; - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; -} diff --git a/src/collections/views/CollectionCreate.tsx b/src/collections/views/CollectionCreate.tsx index 3356bb583..01987c146 100644 --- a/src/collections/views/CollectionCreate.tsx +++ b/src/collections/views/CollectionCreate.tsx @@ -3,6 +3,13 @@ import { createCollectionChannels } from "@saleor/channels/utils"; import useAppChannel from "@saleor/components/AppLayout/AppChannelContext"; import ChannelsAvailabilityDialog from "@saleor/components/ChannelsAvailabilityDialog"; import { WindowTitle } from "@saleor/components/WindowTitle"; +import { + CollectionCreateInput, + useCollectionChannelListingUpdateMutation, + useCreateCollectionMutation, + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation +} from "@saleor/graphql"; import useChannels from "@saleor/hooks/useChannels"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; @@ -10,21 +17,12 @@ import { commonMessages } from "@saleor/intl"; import { getMutationErrors } from "@saleor/misc"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createMetadataCreateHandler from "@saleor/utils/handlers/metadataCreateHandler"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; import { getParsedDataForJsonStringField } from "@saleor/utils/richText/misc"; import React from "react"; import { useIntl } from "react-intl"; -import { CollectionCreateInput } from "../../types/globalTypes"; import CollectionCreatePage from "../components/CollectionCreatePage/CollectionCreatePage"; import { CollectionCreateData } from "../components/CollectionCreatePage/form"; -import { - useCollectionChannelListingUpdate, - useCollectionCreateMutation -} from "../mutations"; import { collectionAddUrl, CollectionCreateUrlQueryParams, @@ -43,8 +41,8 @@ export const CollectionCreate: React.FC = ({ const navigate = useNavigator(); const notify = useNotifier(); const intl = useIntl(); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); const [openModal, closeModal] = createDialogActionHandlers< ChannelsAction, @@ -54,7 +52,7 @@ export const CollectionCreate: React.FC = ({ const [ updateChannels, updateChannelsOpts - ] = useCollectionChannelListingUpdate({}); + ] = useCollectionChannelListingUpdateMutation({}); const { availableChannels } = useAppChannel(false); const allChannels = createCollectionChannels( @@ -81,7 +79,7 @@ export const CollectionCreate: React.FC = ({ { formId: COLLECTION_CREATE_FORM_ID } ); - const [createCollection, createCollectionOpts] = useCollectionCreateMutation({ + const [createCollection, createCollectionOpts] = useCreateCollectionMutation({ onCompleted: data => { if (data.collectionCreate.errors.length === 0) { notify({ diff --git a/src/collections/views/CollectionDetails.tsx b/src/collections/views/CollectionDetails.tsx index 027c1cfa1..da10b58a7 100644 --- a/src/collections/views/CollectionDetails.tsx +++ b/src/collections/views/CollectionDetails.tsx @@ -10,6 +10,18 @@ import ChannelsAvailabilityDialog from "@saleor/components/ChannelsAvailabilityD import NotFoundPage from "@saleor/components/NotFoundPage"; import { WindowTitle } from "@saleor/components/WindowTitle"; import { DEFAULT_INITIAL_SEARCH_DATA, PAGINATE_BY } from "@saleor/config"; +import { + CollectionInput, + CollectionUpdateMutation, + useCollectionAssignProductMutation, + useCollectionChannelListingUpdateMutation, + useCollectionDetailsQuery, + useCollectionUpdateMutation, + useRemoveCollectionMutation, + useUnassignCollectionProductMutation, + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation +} from "@saleor/graphql"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useChannels from "@saleor/hooks/useChannels"; import useLocalPaginator, { @@ -25,28 +37,14 @@ import { arrayDiff } from "@saleor/utils/arrays"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createMetadataUpdateHandler from "@saleor/utils/handlers/metadataUpdateHandler"; import { mapEdgesToItems } from "@saleor/utils/maps"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; import { getParsedDataForJsonStringField } from "@saleor/utils/richText/misc"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { getMutationErrors, getMutationState, maybe } from "../../misc"; import { productUrl } from "../../products/urls"; -import { CollectionInput } from "../../types/globalTypes"; import CollectionDetailsPage from "../components/CollectionDetailsPage/CollectionDetailsPage"; import { CollectionUpdateData } from "../components/CollectionDetailsPage/form"; -import { - useCollectionAssignProductMutation, - useCollectionChannelListingUpdate, - useCollectionRemoveMutation, - useCollectionUpdateMutation, - useUnassignCollectionProductMutation -} from "../mutations"; -import { TypedCollectionDetailsQuery } from "../queries"; -import { CollectionUpdate } from "../types/CollectionUpdate"; import { collectionListUrl, collectionUrl, @@ -78,16 +76,16 @@ export const CollectionDetails: React.FC = ({ CollectionUrlQueryParams >(navigate, params => collectionUrl(id, params), params); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); const [ updateChannels, updateChannelsOpts - ] = useCollectionChannelListingUpdate({}); + ] = useCollectionChannelListingUpdateMutation({}); const { availableChannels } = useAppChannel(false); - const handleCollectionUpdate = (data: CollectionUpdate) => { + const handleCollectionUpdate = (data: CollectionUpdateMutation) => { if (data.collectionUpdate.errors.length === 0) { notify({ status: "success", @@ -145,7 +143,7 @@ export const CollectionDetails: React.FC = ({ } }); - const [removeCollection, removeCollectionOpts] = useCollectionRemoveMutation({ + const [removeCollection, removeCollectionOpts] = useRemoveCollectionMutation({ onCompleted: data => { if (data.collectionDelete.errors.length === 0) { notify({ @@ -168,299 +166,284 @@ export const CollectionDetails: React.FC = ({ const [selectedChannel] = useLocalStorage("collectionListChannel", ""); - return ( - - {({ data, loading }) => { - const collection = data?.collection; - if (collection === null) { - return ; + const { data, loading } = useCollectionDetailsQuery({ + displayLoader: true, + variables: { id, ...paginationState } + }); + + const collection = data?.collection; + if (collection === null) { + return ; + } + const allChannels = createCollectionChannels( + availableChannels + )?.sort((channel, nextChannel) => + channel.name.localeCompare(nextChannel.name) + ); + const collectionChannelsChoices = createCollectionChannelsData(collection); + const { + channelListElements, + channelsToggle, + currentChannels, + handleChannelsConfirm, + handleChannelsModalClose, + handleChannelsModalOpen, + isChannelSelected, + isChannelsModalOpen, + setCurrentChannels, + toggleAllChannels + } = useChannels( + collectionChannelsChoices, + params?.action, + { + closeModal, + openModal + }, + { formId: COLLECTION_DETAILS_FORM_ID } + ); + + const handleUpdate = async (formData: CollectionUpdateData) => { + const input: CollectionInput = { + backgroundImageAlt: formData.backgroundImageAlt, + description: getParsedDataForJsonStringField(formData.description), + name: formData.name, + seo: { + description: formData.seoDescription, + title: formData.seoTitle + }, + slug: formData.slug + }; + + const result = await updateCollection({ + variables: { + id, + input + } + }); + const initialIds = collectionChannelsChoices.map(channel => channel.id); + const modifiedIds = formData.channelListings.map(channel => channel.id); + + const idsDiff = arrayDiff(initialIds, modifiedIds); + + updateChannels({ + variables: { + id: collection.id, + input: { + addChannels: formData.channelListings.map(channel => ({ + channelId: channel.id, + isPublished: channel.isPublished, + publicationDate: channel.publicationDate + })), + removeChannels: idsDiff.removed } - const allChannels = createCollectionChannels( - availableChannels - )?.sort((channel, nextChannel) => - channel.name.localeCompare(nextChannel.name) - ); - const collectionChannelsChoices = createCollectionChannelsData( - collection - ); - const { - channelListElements, - channelsToggle, - currentChannels, - handleChannelsConfirm, - handleChannelsModalClose, - handleChannelsModalOpen, - isChannelSelected, - isChannelsModalOpen, - setCurrentChannels, - toggleAllChannels - } = useChannels( - collectionChannelsChoices, - params?.action, - { - closeModal, - openModal - }, - { formId: COLLECTION_DETAILS_FORM_ID } - ); + } + }); - const handleUpdate = async (formData: CollectionUpdateData) => { - const input: CollectionInput = { - backgroundImageAlt: formData.backgroundImageAlt, - description: getParsedDataForJsonStringField(formData.description), - name: formData.name, - seo: { - description: formData.seoDescription, - title: formData.seoTitle - }, - slug: formData.slug - }; + return getMutationErrors(result); + }; - const result = await updateCollection({ + const handleSubmit = createMetadataUpdateHandler( + data?.collection, + handleUpdate, + variables => updateMetadata({ variables }), + variables => updatePrivateMetadata({ variables }) + ); + + const formTransitionState = getMutationState( + updateCollectionOpts.called, + updateCollectionOpts.loading, + updateCollectionOpts.data?.collectionUpdate.errors + ); + + const { loadNextPage, loadPreviousPage, pageInfo } = paginate( + data?.collection?.products?.pageInfo, + paginationState + ); + + return ( + <> + + {!!allChannels?.length && ( + + )} + openModal("assign")} + onBack={handleBack} + disabled={loading || updateChannelsOpts.loading} + collection={data?.collection} + channelsErrors={ + updateChannelsOpts?.data?.collectionChannelListingUpdate.errors || [] + } + errors={updateCollectionOpts?.data?.collectionUpdate.errors || []} + onCollectionRemove={() => openModal("remove")} + onImageDelete={() => openModal("removeImage")} + onImageUpload={file => + updateCollection({ variables: { id, - input - } - }); - const initialIds = collectionChannelsChoices.map( - channel => channel.id - ); - const modifiedIds = formData.channelListings.map( - channel => channel.id - ); - - const idsDiff = arrayDiff(initialIds, modifiedIds); - - updateChannels({ - variables: { - id: collection.id, input: { - addChannels: formData.channelListings.map(channel => ({ - channelId: channel.id, - isPublished: channel.isPublished, - publicationDate: channel.publicationDate - })), - removeChannels: idsDiff.removed + backgroundImage: file } } + }) + } + onSubmit={handleSubmit} + onNextPage={loadNextPage} + onPreviousPage={loadPreviousPage} + pageInfo={pageInfo} + onProductUnassign={(productId, event) => { + event.stopPropagation(); + unassignProduct({ + variables: { + collectionId: id, + productIds: [productId], + ...paginationState + } }); - - return getMutationErrors(result); - }; - - const handleSubmit = createMetadataUpdateHandler( - data?.collection, - handleUpdate, - variables => updateMetadata({ variables }), - variables => updatePrivateMetadata({ variables }) - ); - - const formTransitionState = getMutationState( - updateCollectionOpts.called, - updateCollectionOpts.loading, - updateCollectionOpts.data?.collectionUpdate.errors - ); - - const { loadNextPage, loadPreviousPage, pageInfo } = paginate( - data?.collection?.products?.pageInfo, - paginationState - ); - - return ( - <> - - {!!allChannels?.length && ( - - )} - openModal("assign")} - onBack={handleBack} - disabled={loading || updateChannelsOpts.loading} - collection={data?.collection} - channelsErrors={ - updateChannelsOpts?.data?.collectionChannelListingUpdate - .errors || [] - } - errors={updateCollectionOpts?.data?.collectionUpdate.errors || []} - onCollectionRemove={() => openModal("remove")} - onImageDelete={() => openModal("removeImage")} - onImageUpload={file => - updateCollection({ - variables: { - id, - input: { - backgroundImage: file - } - } - }) - } - onSubmit={handleSubmit} - onNextPage={loadNextPage} - onPreviousPage={loadPreviousPage} - pageInfo={pageInfo} - onProductUnassign={(productId, event) => { - event.stopPropagation(); - unassignProduct({ - variables: { - collectionId: id, - productIds: [productId], - ...paginationState - } - }); - }} - onRowClick={id => () => navigate(productUrl(id))} - saveButtonBarState={formTransitionState} - toolbar={ - - } - isChecked={isSelected} - selected={listElements.length} - toggle={toggle} - toggleAll={toggleAll} - currentChannels={currentChannels} - hasChannelChanged={ - collectionChannelsChoices?.length !== currentChannels?.length - } - channelsCount={availableChannels.length} - selectedChannelId={selectedChannel} - openChannelsModal={handleChannelsModalOpen} - onChannelsChange={setCurrentChannels} + }} + onRowClick={id => () => navigate(productUrl(id))} + saveButtonBarState={formTransitionState} + toolbar={ + + } + isChecked={isSelected} + selected={listElements.length} + toggle={toggle} + toggleAll={toggleAll} + currentChannels={currentChannels} + hasChannelChanged={ + collectionChannelsChoices?.length !== currentChannels?.length + } + channelsCount={availableChannels.length} + selectedChannelId={selectedChannel} + openChannelsModal={handleChannelsModalOpen} + onChannelsChange={setCurrentChannels} + /> + + assignProduct({ + variables: { + ...paginationState, + collectionId: id, + productIds: products + } + }) + } + products={mapEdgesToItems(result?.data?.search)?.filter( + suggestedProduct => suggestedProduct.id + )} + /> + + removeCollection({ + variables: { id } + }) + } + open={params.action === "remove"} + title={intl.formatMessage({ + defaultMessage: "Delete Collection", + description: "dialog title" + })} + variant="delete" + > + + {maybe(() => data.collection.name, "...")} + ) + }} + /> + + + + unassignProduct({ + variables: { + ...paginationState, + collectionId: id, + productIds: params.ids + } + }) + } + open={params.action === "unassign"} + title={intl.formatMessage({ + defaultMessage: "Unassign products from collection", + description: "dialog title" + })} + > + + params.ids.length), + displayQuantity: {maybe(() => params.ids.length)} + }} + /> + + + + updateCollection({ + variables: { + id, + input: { + backgroundImage: null } - products={mapEdgesToItems(result?.data?.search)?.filter( - suggestedProduct => suggestedProduct.id - )} - /> - - removeCollection({ - variables: { id } - }) - } - open={params.action === "remove"} - title={intl.formatMessage({ - defaultMessage: "Delete Collection", - description: "dialog title" - })} - variant="delete" - > - - - {maybe(() => data.collection.name, "...")} - - ) - }} - /> - - - - unassignProduct({ - variables: { - ...paginationState, - collectionId: id, - productIds: params.ids - } - }) - } - open={params.action === "unassign"} - title={intl.formatMessage({ - defaultMessage: "Unassign products from collection", - description: "dialog title" - })} - > - - params.ids.length), - displayQuantity: ( - {maybe(() => params.ids.length)} - ) - }} - /> - - - - updateCollection({ - variables: { - id, - input: { - backgroundImage: null - } - } - }) - } - open={params.action === "removeImage"} - title={intl.formatMessage({ - defaultMessage: "Delete image", - description: "dialog title" - })} - variant="delete" - > - - - - - - ); - }} - + } + }) + } + open={params.action === "removeImage"} + title={intl.formatMessage({ + defaultMessage: "Delete image", + description: "dialog title" + })} + variant="delete" + > + + + + + ); }; export default CollectionDetails; diff --git a/src/collections/views/CollectionList/CollectionList.tsx b/src/collections/views/CollectionList/CollectionList.tsx index 0cca89448..59ed14d7f 100644 --- a/src/collections/views/CollectionList/CollectionList.tsx +++ b/src/collections/views/CollectionList/CollectionList.tsx @@ -5,6 +5,10 @@ import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { SaveFilterTabDialogFormData } from "@saleor/components/SaveFilterTabDialog"; +import { + useCollectionBulkDeleteMutation, + useCollectionListQuery +} from "@saleor/graphql"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useListSettings from "@saleor/hooks/useListSettings"; import useNavigator from "@saleor/hooks/useNavigator"; @@ -22,13 +26,10 @@ import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; import createSortHandler from "@saleor/utils/handlers/sortHandler"; import { mapEdgesToItems, mapNodeToChoice } from "@saleor/utils/maps"; import { getSortParams } from "@saleor/utils/sort"; -import React from "react"; -import { useEffect } from "react"; +import React, { useEffect } from "react"; import { FormattedMessage, useIntl } from "react-intl"; import CollectionListPage from "../../components/CollectionListPage/CollectionListPage"; -import { useCollectionBulkDelete } from "../../mutations"; -import { useCollectionListQuery } from "../../queries"; import { collectionAddUrl, collectionListUrl, @@ -104,7 +105,7 @@ export const CollectionList: React.FC = ({ params }) => { const [ collectionBulkDelete, collectionBulkDeleteOpts - ] = useCollectionBulkDelete({ + ] = useCollectionBulkDeleteMutation({ onCompleted: data => { if (data.collectionBulkDelete.errors.length === 0) { notify({ diff --git a/src/collections/views/CollectionList/filters.test.ts b/src/collections/views/CollectionList/filters.test.ts index 623c7fbf6..5dc036a20 100644 --- a/src/collections/views/CollectionList/filters.test.ts +++ b/src/collections/views/CollectionList/filters.test.ts @@ -1,6 +1,6 @@ import { createFilterStructure } from "@saleor/collections/components/CollectionListPage"; import { CollectionListUrlFilters } from "@saleor/collections/urls"; -import { CollectionPublished } from "@saleor/types/globalTypes"; +import { CollectionPublished } from "@saleor/graphql"; import { getFilterQueryParams } from "@saleor/utils/filters"; import { stringifyQs } from "@saleor/utils/urls"; import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; diff --git a/src/collections/views/CollectionList/filters.ts b/src/collections/views/CollectionList/filters.ts index 07a6ee9fb..d5c02ef74 100644 --- a/src/collections/views/CollectionList/filters.ts +++ b/src/collections/views/CollectionList/filters.ts @@ -4,11 +4,8 @@ import { } from "@saleor/collections/components/CollectionListPage"; import { IFilterElement } from "@saleor/components/Filter"; import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; +import { CollectionFilterInput, CollectionPublished } from "@saleor/graphql"; import { findValueInEnum, maybe } from "@saleor/misc"; -import { - CollectionFilterInput, - CollectionPublished -} from "@saleor/types/globalTypes"; import { createFilterTabUtils, diff --git a/src/collections/views/CollectionList/sort.ts b/src/collections/views/CollectionList/sort.ts index 000858f53..e0f4d30e7 100644 --- a/src/collections/views/CollectionList/sort.ts +++ b/src/collections/views/CollectionList/sort.ts @@ -1,5 +1,5 @@ import { CollectionListUrlSortField } from "@saleor/collections/urls"; -import { CollectionSortField } from "@saleor/types/globalTypes"; +import { CollectionSortField } from "@saleor/graphql"; import { createGetSortQueryVariables } from "@saleor/utils/sort"; export const DEFAULT_SORT_KEY = CollectionListUrlSortField.name; diff --git a/src/components/AccountPermissionGroups/AccountPermissionGroups.stories.tsx b/src/components/AccountPermissionGroups/AccountPermissionGroups.stories.tsx index 97f9fffe4..01fdd1f87 100644 --- a/src/components/AccountPermissionGroups/AccountPermissionGroups.stories.tsx +++ b/src/components/AccountPermissionGroups/AccountPermissionGroups.stories.tsx @@ -1,14 +1,17 @@ -import { StaffErrorFragment } from "@saleor/fragments/types/StaffErrorFragment"; -import { SearchPermissionGroups_search_edges_node } from "@saleor/searches/types/SearchPermissionGroups"; +import { + AccountErrorCode, + SearchPermissionGroupsQuery, + StaffErrorFragment +} from "@saleor/graphql"; import Decorator from "@saleor/storybook/Decorator"; -import { AccountErrorCode } from "@saleor/types/globalTypes"; +import { RelayToFlat } from "@saleor/types"; import { storiesOf } from "@storybook/react"; import React from "react"; import { MultiAutocompleteChoiceType } from "../MultiAutocompleteSelectField"; import AccountPermissionGroups, { AccountPermissionGroupsProps } from "."; -const availablePermissionGroups: SearchPermissionGroups_search_edges_node[] = [ +const availablePermissionGroups: RelayToFlat = [ { __typename: "Group", id: "R3JvdXA6MQ==", diff --git a/src/components/AccountPermissionGroups/AccountPermissionGroups.tsx b/src/components/AccountPermissionGroups/AccountPermissionGroups.tsx index 51e424b38..16430ff6f 100644 --- a/src/components/AccountPermissionGroups/AccountPermissionGroups.tsx +++ b/src/components/AccountPermissionGroups/AccountPermissionGroups.tsx @@ -1,8 +1,10 @@ import { Typography } from "@material-ui/core"; -import { StaffErrorFragment } from "@saleor/fragments/types/StaffErrorFragment"; +import { + SearchPermissionGroupsQuery, + StaffErrorFragment +} from "@saleor/graphql"; import { FormChange } from "@saleor/hooks/useForm"; -import { SearchPermissionGroups_search_edges_node } from "@saleor/searches/types/SearchPermissionGroups"; -import { FetchMoreProps, SearchPageProps } from "@saleor/types"; +import { FetchMoreProps, RelayToFlat, SearchPageProps } from "@saleor/types"; import { getFormErrors } from "@saleor/utils/errors"; import getStaffErrorMessage from "@saleor/utils/errors/staff"; import React from "react"; @@ -20,7 +22,7 @@ export interface AccountPermissionGroupsProps }; disabled: boolean; errors: StaffErrorFragment[]; - availablePermissionGroups: SearchPermissionGroups_search_edges_node[]; + availablePermissionGroups: RelayToFlat; onChange: FormChange; displayValues: MultiAutocompleteChoiceType[]; } diff --git a/src/components/AccountPermissions/utils.ts b/src/components/AccountPermissions/utils.ts index 4a790da52..970bab65a 100644 --- a/src/components/AccountPermissions/utils.ts +++ b/src/components/AccountPermissions/utils.ts @@ -1,10 +1,12 @@ -import { ShopInfo_shop_permissions } from "@saleor/components/Shop/types/ShopInfo"; -import { User_userPermissions } from "@saleor/fragments/types/User"; -import { PermissionGroupDetails_user_userPermissions } from "@saleor/permissionGroups/types/PermissionGroupDetails"; +import { + PermissionGroupDetailsQuery, + ShopInfoQuery, + UserDetailsQuery +} from "@saleor/graphql"; export const getLastSourcesOfPermission = ( groupId: string, - userPermissions: PermissionGroupDetails_user_userPermissions[] + userPermissions: PermissionGroupDetailsQuery["user"]["userPermissions"] ) => userPermissions .filter( @@ -15,8 +17,8 @@ export const getLastSourcesOfPermission = ( .map(perm => perm.code); export const getPermissionsComponentChoices = ( - userPermissions: User_userPermissions[], - shopPermissions: ShopInfo_shop_permissions[], + userPermissions: UserDetailsQuery["me"]["userPermissions"], + shopPermissions: ShopInfoQuery["shop"]["permissions"], lastSourcesOfPermissionIds: string[] ) => { const userCodes = userPermissions.map(p => p.code) || []; diff --git a/src/components/AddressEdit/AddressEdit.tsx b/src/components/AddressEdit/AddressEdit.tsx index bda6b69f2..bf41d66d3 100644 --- a/src/components/AddressEdit/AddressEdit.tsx +++ b/src/components/AddressEdit/AddressEdit.tsx @@ -1,7 +1,6 @@ import { TextField } from "@material-ui/core"; import { AddressTypeInput } from "@saleor/customers/types"; -import { AccountErrorFragment } from "@saleor/fragments/types/AccountErrorFragment"; -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; +import { AccountErrorFragment, OrderErrorFragment } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { makeStyles } from "@saleor/macaw-ui"; import { getFormErrors } from "@saleor/utils/errors"; diff --git a/src/components/AppLayout/AppChannelContext.tsx b/src/components/AppLayout/AppChannelContext.tsx index bccef5e1d..6eb0b061a 100644 --- a/src/components/AppLayout/AppChannelContext.tsx +++ b/src/components/AppLayout/AppChannelContext.tsx @@ -1,7 +1,5 @@ import { useUser } from "@saleor/auth"; -import { useBaseChannelsList } from "@saleor/channels/queries"; -import { BaseChannels_channels } from "@saleor/channels/types/BaseChannels"; -import { ChannelFragment } from "@saleor/fragments/types/ChannelFragment"; +import { ChannelFragment, useBaseChannelsQuery } from "@saleor/graphql"; import useLocalStorage from "@saleor/hooks/useLocalStorage"; import { getById } from "@saleor/orders/components/OrderReturnPage/utils"; import { useSaleorConfig } from "@saleor/sdk"; @@ -27,10 +25,7 @@ const AppChannelContext = React.createContext({ setPickerActive: () => undefined }); -const isValidChannel = ( - channelId: string, - channelList?: BaseChannels_channels[] -) => { +const isValidChannel = (channelId: string, channelList?: ChannelFragment[]) => { if (!channelId) { return false; } @@ -42,7 +37,7 @@ export const AppChannelProvider: React.FC = ({ children }) => { const { setChannel } = useSaleorConfig(); const { authenticated } = useUser(); const [selectedChannel, setSelectedChannel] = useLocalStorage("channel", ""); - const { data: channelData, refetch } = useBaseChannelsList({ + const { data: channelData, refetch } = useBaseChannelsQuery({ skip: !authenticated }); diff --git a/src/components/AppLayout/AppChannelSelect.tsx b/src/components/AppLayout/AppChannelSelect.tsx index 9942438ba..52f1584a0 100644 --- a/src/components/AppLayout/AppChannelSelect.tsx +++ b/src/components/AppLayout/AppChannelSelect.tsx @@ -1,4 +1,4 @@ -import { ChannelFragment } from "@saleor/fragments/types/ChannelFragment"; +import { ChannelFragment } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; import { ChannelProps } from "@saleor/types"; import { mapNodeToChoice } from "@saleor/utils/maps"; diff --git a/src/components/AppLayout/menuStructure.ts b/src/components/AppLayout/menuStructure.ts index adf3832e3..a56d650d1 100644 --- a/src/components/AppLayout/menuStructure.ts +++ b/src/components/AppLayout/menuStructure.ts @@ -13,8 +13,8 @@ import { } from "@saleor/apps/useExtensions"; import { configurationMenuUrl } from "@saleor/configuration"; import { getConfigMenuItemsPermissions } from "@saleor/configuration/utils"; -import { User } from "@saleor/fragments/types/User"; import { giftCardListUrl } from "@saleor/giftCards/urls"; +import { PermissionEnum, UserFragment } from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import { commonMessages, sectionNames } from "@saleor/intl"; import { SidebarMenuItem } from "@saleor/macaw-ui"; @@ -29,7 +29,6 @@ import { saleListUrl, voucherListUrl } from "../../discounts/urls"; import { orderDraftListUrl, orderListUrl } from "../../orders/urls"; import { productListUrl } from "../../products/urls"; import { languageListUrl } from "../../translations/urls"; -import { PermissionEnum } from "../../types/globalTypes"; import { getMenuItemExtension, mapToExtensionsItems } from "./utils"; export interface FilterableMenuItem extends Omit { @@ -39,7 +38,7 @@ export interface FilterableMenuItem extends Omit { function useMenuStructure( intl: IntlShape, - user: User + user: UserFragment ): [SidebarMenuItem[], (menuItem: SidebarMenuItem) => void] { const navigate = useNavigator(); const extensions = useExtensions(extensionMountPoints.NAVIGATION_SIDEBAR); diff --git a/src/components/AppLayout/utils.ts b/src/components/AppLayout/utils.ts index 053f3791d..9c33465fb 100644 --- a/src/components/AppLayout/utils.ts +++ b/src/components/AppLayout/utils.ts @@ -1,8 +1,8 @@ import { getDashboardUrFromAppCompleteUrl } from "@saleor/apps/urls"; import { Extension } from "@saleor/apps/useExtensions"; +import { AppExtensionMountEnum } from "@saleor/graphql"; import { SidebarMenuItem } from "@saleor/macaw-ui"; import { orderDraftListUrl, orderListUrl } from "@saleor/orders/urls"; -import { AppExtensionMountEnum } from "@saleor/types/globalTypes"; import { matchPath } from "react-router"; import { FilterableMenuItem } from "./menuStructure"; diff --git a/src/components/AssignAttributeDialog/AssignAttributeDialog.tsx b/src/components/AssignAttributeDialog/AssignAttributeDialog.tsx index 7c4815d9d..b225900cf 100644 --- a/src/components/AssignAttributeDialog/AssignAttributeDialog.tsx +++ b/src/components/AssignAttributeDialog/AssignAttributeDialog.tsx @@ -14,7 +14,7 @@ import { import Checkbox from "@saleor/components/Checkbox"; import ConfirmButton from "@saleor/components/ConfirmButton"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; -import { AvailableAttributeFragment } from "@saleor/fragments/types/AvailableAttributeFragment"; +import { AvailableAttributeFragment } from "@saleor/graphql"; import useElementScroll, { isScrolledToBottom } from "@saleor/hooks/useElementScroll"; diff --git a/src/components/AssignCategoryDialog/AssignCategoryDialog.tsx b/src/components/AssignCategoryDialog/AssignCategoryDialog.tsx index 994cc02b4..cc6d0b3d0 100644 --- a/src/components/AssignCategoryDialog/AssignCategoryDialog.tsx +++ b/src/components/AssignCategoryDialog/AssignCategoryDialog.tsx @@ -1,4 +1,5 @@ -import { SearchCategories_search_edges_node } from "@saleor/searches/types/SearchCategories"; +import { SearchCategoriesQuery } from "@saleor/graphql"; +import { RelayToFlat } from "@saleor/types"; import React from "react"; import { useIntl } from "react-intl"; @@ -9,7 +10,7 @@ import { messages } from "./messages"; interface AssignCategoryDialogProps extends Omit { - categories: SearchCategories_search_edges_node[]; + categories: RelayToFlat; } const AssignCategoryDialog: React.FC = ({ diff --git a/src/components/AssignCollectionDialog/AssignCollectionDialog.tsx b/src/components/AssignCollectionDialog/AssignCollectionDialog.tsx index 503acefcb..f097549ae 100644 --- a/src/components/AssignCollectionDialog/AssignCollectionDialog.tsx +++ b/src/components/AssignCollectionDialog/AssignCollectionDialog.tsx @@ -1,4 +1,5 @@ -import { SearchCollections_search_edges_node } from "@saleor/searches/types/SearchCollections"; +import { SearchCollectionsQuery } from "@saleor/graphql"; +import { RelayToFlat } from "@saleor/types"; import React from "react"; import { useIntl } from "react-intl"; @@ -9,7 +10,7 @@ import { messages } from "./messages"; interface AssignCollectionDialogProps extends Omit { - collections: SearchCollections_search_edges_node[]; + collections: RelayToFlat; } const AssignCollectionDialog: React.FC = ({ diff --git a/src/components/AssignProductDialog/AssignProductDialog.tsx b/src/components/AssignProductDialog/AssignProductDialog.tsx index dd967f4aa..1ae211072 100644 --- a/src/components/AssignProductDialog/AssignProductDialog.tsx +++ b/src/components/AssignProductDialog/AssignProductDialog.tsx @@ -12,12 +12,12 @@ import { import ConfirmButton from "@saleor/components/ConfirmButton"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import TableCellAvatar from "@saleor/components/TableCellAvatar"; +import { SearchProductsQuery } from "@saleor/graphql"; import useSearchQuery from "@saleor/hooks/useSearchQuery"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { maybe } from "@saleor/misc"; -import { SearchProducts_search_edges_node } from "@saleor/searches/types/SearchProducts"; import useScrollableDialogStyle from "@saleor/styles/useScrollableDialogStyle"; -import { DialogProps, FetchMoreProps } from "@saleor/types"; +import { DialogProps, FetchMoreProps, RelayToFlat } from "@saleor/types"; import React from "react"; import InfiniteScroll from "react-infinite-scroll-component"; import { FormattedMessage, useIntl } from "react-intl"; @@ -28,13 +28,13 @@ import { messages } from "./messages"; import { useStyles } from "./styles"; export interface AssignProductDialogFormData { - products: SearchProducts_search_edges_node[]; + products: RelayToFlat; query: string; } export interface AssignProductDialogProps extends FetchMoreProps, DialogProps { confirmButtonState: ConfirmButtonTransitionState; - products: SearchProducts_search_edges_node[]; + products: RelayToFlat; loading: boolean; onFetch: (value: string) => void; onSubmit: (data: string[]) => void; diff --git a/src/components/AssignVariantDialog/AssignVariantDialog.tsx b/src/components/AssignVariantDialog/AssignVariantDialog.tsx index c3b6b18d4..d84a8fe45 100644 --- a/src/components/AssignVariantDialog/AssignVariantDialog.tsx +++ b/src/components/AssignVariantDialog/AssignVariantDialog.tsx @@ -13,6 +13,7 @@ import ConfirmButton from "@saleor/components/ConfirmButton"; import Money from "@saleor/components/Money"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import TableCellAvatar from "@saleor/components/TableCellAvatar"; +import { SearchProductsQuery } from "@saleor/graphql"; import useSearchQuery from "@saleor/hooks/useSearchQuery"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { maybe, renderCollection } from "@saleor/misc"; @@ -20,12 +21,8 @@ import { getById, getByUnmatchingId } from "@saleor/orders/components/OrderReturnPage/utils"; -import { - SearchProducts_search_edges_node, - SearchProducts_search_edges_node_variants -} from "@saleor/searches/types/SearchProducts"; import useScrollableDialogStyle from "@saleor/styles/useScrollableDialogStyle"; -import { DialogProps, FetchMoreProps } from "@saleor/types"; +import { DialogProps, FetchMoreProps, RelayToFlat } from "@saleor/types"; import React from "react"; import InfiniteScroll from "react-infinite-scroll-component"; import { FormattedMessage, useIntl } from "react-intl"; @@ -35,33 +32,35 @@ import Checkbox from "../Checkbox"; import { messages } from "./messages"; import { useStyles } from "./styles"; -type SetVariantsAction = ( - data: SearchProducts_search_edges_node_variants[] -) => void; +type SearchVariant = RelayToFlat< + SearchProductsQuery["search"] +>[0]["variants"][0]; + +type SetVariantsAction = (data: SearchVariant[]) => void; export interface AssignVariantDialogFormData { - products: SearchProducts_search_edges_node[]; + products: RelayToFlat; query: string; } export interface AssignVariantDialogProps extends FetchMoreProps, DialogProps { confirmButtonState: ConfirmButtonTransitionState; - products: SearchProducts_search_edges_node[]; + products: RelayToFlat; loading: boolean; onFetch: (value: string) => void; - onSubmit: (data: SearchProducts_search_edges_node_variants[]) => void; + onSubmit: (data: SearchVariant[]) => void; } function isVariantSelected( - variant: SearchProducts_search_edges_node_variants, - selectedVariantsToProductsMap: SearchProducts_search_edges_node_variants[] + variant: SearchVariant, + selectedVariantsToProductsMap: SearchVariant[] ): boolean { return !!selectedVariantsToProductsMap.find(getById(variant.id)); } const handleProductAssign = ( - product: SearchProducts_search_edges_node, + product: RelayToFlat[0], productIndex: number, productsWithAllVariantsSelected: boolean[], - variants: SearchProducts_search_edges_node_variants[], + variants: SearchVariant[], setVariants: SetVariantsAction ) => productsWithAllVariantsSelected[productIndex] @@ -78,10 +77,10 @@ const handleProductAssign = ( ]); const handleVariantAssign = ( - variant: SearchProducts_search_edges_node_variants, + variant: SearchVariant, variantIndex: number, productIndex: number, - variants: SearchProducts_search_edges_node_variants[], + variants: SearchVariant[], selectedVariantsToProductsMap: boolean[][], setVariants: SetVariantsAction ) => @@ -90,8 +89,8 @@ const handleVariantAssign = ( : setVariants([...variants, variant]); function hasAllVariantsSelected( - productVariants: SearchProducts_search_edges_node_variants[], - selectedVariantsToProductsMap: SearchProducts_search_edges_node_variants[] + productVariants: SearchVariant[], + selectedVariantsToProductsMap: SearchVariant[] ): boolean { return productVariants.reduce( (acc, productVariant) => @@ -119,9 +118,7 @@ const AssignVariantDialog: React.FC = props => { const intl = useIntl(); const [query, onQueryChange] = useSearchQuery(onFetch); - const [variants, setVariants] = React.useState< - SearchProducts_search_edges_node_variants[] - >([]); + const [variants, setVariants] = React.useState([]); const productChoices = products?.filter(product => product?.variants?.length > 0) || []; diff --git a/src/components/Attributes/AttributeRow.tsx b/src/components/Attributes/AttributeRow.tsx index e44037738..0c85cca9a 100644 --- a/src/components/Attributes/AttributeRow.tsx +++ b/src/components/Attributes/AttributeRow.tsx @@ -21,8 +21,8 @@ import MultiAutocompleteSelectField from "@saleor/components/MultiAutocompleteSe import RichTextEditor from "@saleor/components/RichTextEditor"; import SingleAutocompleteSelectField from "@saleor/components/SingleAutocompleteSelectField"; import SortableChipsField from "@saleor/components/SortableChipsField"; +import { AttributeInputTypeEnum } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; -import { AttributeInputTypeEnum } from "@saleor/types/globalTypes"; import React from "react"; import { useIntl } from "react-intl"; diff --git a/src/components/Attributes/Attributes.tsx b/src/components/Attributes/Attributes.tsx index 0f2d14cba..362952db7 100644 --- a/src/components/Attributes/Attributes.tsx +++ b/src/components/Attributes/Attributes.tsx @@ -3,18 +3,18 @@ import ArrowDropDownIcon from "@material-ui/icons/ArrowDropDown"; import { AttributeReference } from "@saleor/attributes/utils/data"; import CardTitle from "@saleor/components/CardTitle"; import Hr from "@saleor/components/Hr"; -import { AttributeValueDetailsFragment } from "@saleor/fragments/types/AttributeValueDetailsFragment"; -import { AttributeValueFragment } from "@saleor/fragments/types/AttributeValueFragment"; -import { PageErrorWithAttributesFragment } from "@saleor/fragments/types/PageErrorWithAttributesFragment"; -import { ProductErrorWithAttributesFragment } from "@saleor/fragments/types/ProductErrorWithAttributesFragment"; -import { FormsetAtomicData } from "@saleor/hooks/useFormset"; -import { IconButton, makeStyles } from "@saleor/macaw-ui"; -import { FetchMoreProps } from "@saleor/types"; import { AttributeEntityTypeEnum, AttributeInputTypeEnum, - MeasurementUnitsEnum -} from "@saleor/types/globalTypes"; + AttributeValueDetailsFragment, + AttributeValueFragment, + MeasurementUnitsEnum, + PageErrorWithAttributesFragment, + ProductErrorWithAttributesFragment +} from "@saleor/graphql"; +import { FormsetAtomicData } from "@saleor/hooks/useFormset"; +import { IconButton, makeStyles } from "@saleor/macaw-ui"; +import { FetchMoreProps } from "@saleor/types"; import classNames from "classnames"; import React from "react"; import { defineMessages, FormattedMessage, useIntl } from "react-intl"; diff --git a/src/components/Attributes/fixtures.ts b/src/components/Attributes/fixtures.ts index 807bfa23a..539cc5c77 100644 --- a/src/components/Attributes/fixtures.ts +++ b/src/components/Attributes/fixtures.ts @@ -2,7 +2,7 @@ import { AttributeEntityTypeEnum, AttributeInputTypeEnum, MeasurementUnitsEnum -} from "@saleor/types/globalTypes"; +} from "@saleor/graphql"; import { AttributeInput } from "./Attributes"; diff --git a/src/components/Attributes/types.ts b/src/components/Attributes/types.ts index 09288e592..dfcd14863 100644 --- a/src/components/Attributes/types.ts +++ b/src/components/Attributes/types.ts @@ -1,6 +1,8 @@ -import { AttributeValueFragment } from "@saleor/fragments/types/AttributeValueFragment"; -import { PageErrorWithAttributesFragment } from "@saleor/fragments/types/PageErrorWithAttributesFragment"; -import { ProductErrorWithAttributesFragment } from "@saleor/fragments/types/ProductErrorWithAttributesFragment"; +import { + AttributeValueFragment, + PageErrorWithAttributesFragment, + ProductErrorWithAttributesFragment +} from "@saleor/graphql"; import { FormsetChange } from "@saleor/hooks/useFormset"; import { FetchMoreProps, ReorderEvent } from "@saleor/types"; diff --git a/src/components/Attributes/utils.ts b/src/components/Attributes/utils.ts index 793684a7b..0f34ba2d7 100644 --- a/src/components/Attributes/utils.ts +++ b/src/components/Attributes/utils.ts @@ -4,9 +4,11 @@ import { FileChoiceType } from "@saleor/components/FileUploadField"; import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; import { SortableChipsFieldValueType } from "@saleor/components/SortableChipsField"; -import { AttributeValueFragment } from "@saleor/fragments/types/AttributeValueFragment"; -import { PageErrorWithAttributesFragment } from "@saleor/fragments/types/PageErrorWithAttributesFragment"; -import { ProductErrorWithAttributesFragment } from "@saleor/fragments/types/ProductErrorWithAttributesFragment"; +import { + AttributeValueFragment, + PageErrorWithAttributesFragment, + ProductErrorWithAttributesFragment +} from "@saleor/graphql"; import { getProductErrorMessage } from "@saleor/utils/errors"; import getPageErrorMessage from "@saleor/utils/errors/page"; import { IntlShape } from "react-intl"; diff --git a/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCard.stories.tsx b/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCard.stories.tsx index 976a6907e..587ed2e5b 100644 --- a/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCard.stories.tsx +++ b/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCard.stories.tsx @@ -1,9 +1,8 @@ import { createChannelsDataFromProduct } from "@saleor/channels/utils"; -import { User } from "@saleor/fragments/types/User"; +import { PermissionEnum, UserFragment } from "@saleor/graphql"; import { product } from "@saleor/products/fixtures"; import Decorator from "@saleor/storybook/Decorator"; import UserDecorator from "@saleor/storybook/UserDecorator"; -import { PermissionEnum } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; @@ -11,7 +10,7 @@ import ChannelsAvailabilityCard, { ChannelsAvailabilityCardProps } from "./ChannelsAvailabilityCard"; -const user: User = { +const user: UserFragment = { __typename: "User", avatar: null, email: "email@example.com", diff --git a/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCard.tsx b/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCard.tsx index 431412dba..ebda38e9d 100644 --- a/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCard.tsx +++ b/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCard.tsx @@ -1,9 +1,9 @@ import { Typography } from "@material-ui/core"; import { Channel as ChannelList, ChannelData } from "@saleor/channels/utils"; import Hr from "@saleor/components/Hr"; +import { PermissionEnum } from "@saleor/graphql"; import useDateLocalize from "@saleor/hooks/useDateLocalize"; import { RequireOnlyOne } from "@saleor/misc"; -import { PermissionEnum } from "@saleor/types/globalTypes"; import React from "react"; import { useIntl } from "react-intl"; diff --git a/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCardWrapper.tsx b/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCardWrapper.tsx index 26c88ea73..e63cc8e78 100644 --- a/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCardWrapper.tsx +++ b/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCardWrapper.tsx @@ -2,8 +2,8 @@ import { Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Hr from "@saleor/components/Hr"; import RequirePermissions from "@saleor/components/RequirePermissions"; +import { PermissionEnum } from "@saleor/graphql"; import { Button } from "@saleor/macaw-ui"; -import { PermissionEnum } from "@saleor/types/globalTypes"; import React from "react"; import { useIntl } from "react-intl"; diff --git a/src/components/ChannelsAvailabilityCard/types.tsx b/src/components/ChannelsAvailabilityCard/types.tsx index dc82443a2..433e11b23 100644 --- a/src/components/ChannelsAvailabilityCard/types.tsx +++ b/src/components/ChannelsAvailabilityCard/types.tsx @@ -1,5 +1,7 @@ -import { CollectionChannelListingErrorFragment } from "@saleor/fragments/types/CollectionChannelListingErrorFragment"; -import { ProductChannelListingErrorFragment } from "@saleor/fragments/types/ProductChannelListingErrorFragment"; +import { + CollectionChannelListingErrorFragment, + ProductChannelListingErrorFragment +} from "@saleor/graphql"; export interface ChannelOpts { availableForPurchase?: string; diff --git a/src/components/ChannelsAvailabilityDialogWrapper/ChannelsAvailabilityDialogWrapper.tsx b/src/components/ChannelsAvailabilityDialogWrapper/ChannelsAvailabilityDialogWrapper.tsx index 1cda4c8bc..858d5f480 100644 --- a/src/components/ChannelsAvailabilityDialogWrapper/ChannelsAvailabilityDialogWrapper.tsx +++ b/src/components/ChannelsAvailabilityDialogWrapper/ChannelsAvailabilityDialogWrapper.tsx @@ -4,8 +4,7 @@ import Hr from "@saleor/components/Hr"; import { makeStyles } from "@saleor/macaw-ui"; import Label from "@saleor/orders/components/OrderHistory/Label"; import React from "react"; -import { useIntl } from "react-intl"; -import { defineMessages, FormattedMessage } from "react-intl"; +import { defineMessages, FormattedMessage, useIntl } from "react-intl"; export const useStyles = makeStyles( theme => ({ diff --git a/src/components/ChannelsAvailabilityDropdown/utils.ts b/src/components/ChannelsAvailabilityDropdown/utils.ts index 92fa913ee..aab9a951e 100644 --- a/src/components/ChannelsAvailabilityDropdown/utils.ts +++ b/src/components/ChannelsAvailabilityDropdown/utils.ts @@ -1,4 +1,4 @@ -import { CollectionList_collections_edges_node_channelListings } from "@saleor/collections/types/CollectionList"; +import { CollectionFragment } from "@saleor/graphql"; import { PillColor } from "@saleor/macaw-ui"; import { MessageDescriptor } from "react-intl"; @@ -6,11 +6,11 @@ import { Pill } from "../ChannelsAvailabilityMenuContent"; import { channelStatusMessages } from "./messages"; export type CollectionChannels = Pick< - CollectionList_collections_edges_node_channelListings, + CollectionFragment["channelListings"][0], "isPublished" | "publicationDate" | "channel" >; export type Channels = Pick< - CollectionList_collections_edges_node_channelListings, + CollectionFragment["channelListings"][0], "channel" >; diff --git a/src/components/ChannelsAvailabilityMenuContent/ChannelsAvailabilityMenuContent.tsx b/src/components/ChannelsAvailabilityMenuContent/ChannelsAvailabilityMenuContent.tsx index 4d8ea6a02..64b1051af 100644 --- a/src/components/ChannelsAvailabilityMenuContent/ChannelsAvailabilityMenuContent.tsx +++ b/src/components/ChannelsAvailabilityMenuContent/ChannelsAvailabilityMenuContent.tsx @@ -1,11 +1,10 @@ import { Typography } from "@material-ui/core"; import HorizontalSpacer from "@saleor/apps/components/HorizontalSpacer"; -import { CollectionList_collections_edges_node_channelListings_channel } from "@saleor/collections/types/CollectionList"; +import { CollectionFragment } from "@saleor/graphql"; import { Pill, PillColor } from "@saleor/macaw-ui"; import ScrollableContent from "@saleor/plugins/components/PluginsList/PluginAvailabilityStatusPopup/ScrollableContent"; import React from "react"; -import { MessageDescriptor } from "react-intl"; -import { useIntl } from "react-intl"; +import { MessageDescriptor, useIntl } from "react-intl"; import { messages } from "../ChannelsAvailabilityDropdown/messages"; import { useStyles } from "./styles"; @@ -14,7 +13,7 @@ export interface ChannelsAvailabilityMenuContentProps { pills: Pill[]; } export interface Pill { - channel: CollectionList_collections_edges_node_channelListings_channel; + channel: CollectionFragment["channelListings"][0]["channel"]; color: PillColor; label: MessageDescriptor; } diff --git a/src/components/CompanyAddressInput/CompanyAddressForm.tsx b/src/components/CompanyAddressInput/CompanyAddressForm.tsx index d721c9725..932518e54 100644 --- a/src/components/CompanyAddressInput/CompanyAddressForm.tsx +++ b/src/components/CompanyAddressInput/CompanyAddressForm.tsx @@ -5,9 +5,11 @@ import SingleAutocompleteSelectField, { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; import { AddressTypeInput } from "@saleor/customers/types"; -import { AccountErrorFragment } from "@saleor/fragments/types/AccountErrorFragment"; -import { ShopErrorFragment } from "@saleor/fragments/types/ShopErrorFragment"; -import { WarehouseErrorFragment } from "@saleor/fragments/types/WarehouseErrorFragment"; +import { + AccountErrorFragment, + ShopErrorFragment, + WarehouseErrorFragment +} from "@saleor/graphql"; import { ChangeEvent } from "@saleor/hooks/useForm"; import { makeStyles } from "@saleor/macaw-ui"; import { getFormErrors } from "@saleor/utils/errors"; diff --git a/src/components/CountryList/CountryList.tsx b/src/components/CountryList/CountryList.tsx index a7e3d6557..f5c359271 100644 --- a/src/components/CountryList/CountryList.tsx +++ b/src/components/CountryList/CountryList.tsx @@ -3,7 +3,7 @@ import ArrowDropDownIcon from "@material-ui/icons/ArrowDropDown"; import CardTitle from "@saleor/components/CardTitle"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; -import { CountryFragment } from "@saleor/fragments/types/CountryFragment"; +import { CountryFragment } from "@saleor/graphql"; import { Button, DeleteIcon, IconButton, makeStyles } from "@saleor/macaw-ui"; import classNames from "classnames"; import React from "react"; diff --git a/src/components/DateTimeField.tsx b/src/components/DateTimeField.tsx index 6aa0930b3..b8c091805 100644 --- a/src/components/DateTimeField.tsx +++ b/src/components/DateTimeField.tsx @@ -1,8 +1,10 @@ import { TextField } from "@material-ui/core"; import { TextFieldProps } from "@material-ui/core/TextField"; import { getErrorMessage } from "@saleor/components/Attributes/utils"; -import { PageErrorWithAttributesFragment } from "@saleor/fragments/types/PageErrorWithAttributesFragment"; -import { ProductErrorWithAttributesFragment } from "@saleor/fragments/types/ProductErrorWithAttributesFragment"; +import { + PageErrorWithAttributesFragment, + ProductErrorWithAttributesFragment +} from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { DateTime, joinDateTime, splitDateTime } from "@saleor/misc"; import React, { useEffect, useState } from "react"; diff --git a/src/components/DeleteButton/DeleteButton.tsx b/src/components/DeleteButton/DeleteButton.tsx index f02d1ad74..ad8b2195b 100644 --- a/src/components/DeleteButton/DeleteButton.tsx +++ b/src/components/DeleteButton/DeleteButton.tsx @@ -1,21 +1,8 @@ import { buttonMessages } from "@saleor/intl"; -import { Button, makeStyles } from "@saleor/macaw-ui"; +import { Button } from "@saleor/macaw-ui"; import React from "react"; import { useIntl } from "react-intl"; -const useStyles = makeStyles( - theme => ({ - button: { - "&:hover": { - backgroundColor: theme.palette.error.dark - }, - backgroundColor: theme.palette.error.main, - color: theme.palette.error.contrastText - } - }), - { name: "DeleteButton" } -); - interface DeleteButtonProps { onClick: () => void; label?: string | React.ReactNode; @@ -29,14 +16,13 @@ const DeleteButton: React.FC = ({ testId, disabled = false }) => { - const classes = useStyles({}); const intl = useIntl(); return ( - } - collectionListToolbar={ - - } - productListToolbar={ - - } - variantListToolbar={ - - } - isChecked={isSelected} - selected={listElements.length} - toggle={toggle} - toggleAll={toggleAll} - /> - - saleCataloguesAdd({ - variables: { - ...paginationState, - id, - input: { - variants: variants.map( - variant => variant.id - ) - } - } - }) - } - products={mapEdgesToItems( - searchProductsOpts?.data?.search - )?.filter(suggestedProduct => suggestedProduct.id)} - /> - - saleCataloguesAdd({ - variables: { - ...paginationState, - id, - input: { - products - } - } - }) - } - products={mapEdgesToItems( - searchProductsOpts?.data?.search - )?.filter(suggestedProduct => suggestedProduct.id)} - /> - suggestedCategory.id - )} - confirmButtonState={saleCataloguesAddOpts.status} - hasMore={ - searchCategoriesOpts.data?.search.pageInfo - .hasNextPage - } - open={params.action === "assign-category"} - onFetch={searchCategories} - onFetchMore={loadMoreCategories} - loading={searchCategoriesOpts.loading} - onClose={closeModal} - onSubmit={categories => - saleCataloguesAdd({ - variables: { - ...paginationState, - id, - input: { - categories - } - } - }) - } - /> - suggestedCategory.id - )} - confirmButtonState={saleCataloguesAddOpts.status} - hasMore={ - searchCollectionsOpts.data?.search.pageInfo - .hasNextPage - } - open={params.action === "assign-collection"} - onFetch={searchCollections} - onFetchMore={loadMoreCollections} - loading={searchCollectionsOpts.loading} - onClose={closeModal} - onSubmit={collections => - saleCataloguesAdd({ - variables: { - ...paginationState, - id, - input: { - collections - } - } - }) - } - /> - - handleCategoriesUnassign(params.ids) - } - > - {canOpenBulkActionDialog && ( - - {params.ids.length} - ) - }} - /> - - )} - - - handleCollectionsUnassign(params.ids) - } - > - {canOpenBulkActionDialog && ( - - {params.ids.length} - ) - }} - /> - - )} - - handleProductsUnassign(params.ids)} - > - {canOpenBulkActionDialog && ( - - {params.ids.length} - ) - }} - /> - - )} - - handleVariantsUnassign(params.ids)} - > - {canOpenBulkActionDialog && ( - - {params.ids.length} - ) - }} - /> - - )} - - - saleDelete({ - variables: { id } - }) - } - > - - - {maybe(() => data.sale.name, "...")} - - ) - }} - /> - - - - ); - }} - - )} - - )} - + data.sale)} + allChannelsCount={allChannels?.length} + channelListings={currentChannels} + hasChannelChanged={ + saleChannelsChoices?.length !== currentChannels?.length + } + disabled={loading || saleCataloguesRemoveOpts.loading} + errors={saleUpdateOpts.data?.saleUpdate.errors || []} + selectedChannelId={selectedChannel} + pageInfo={pageInfo} + openChannelsModal={handleChannelsModalOpen} + onChannelsChange={setCurrentChannels} + onNextPage={loadNextPage} + onPreviousPage={loadPreviousPage} + onCategoryAssign={() => openModal("assign-category")} + onCategoryClick={id => () => navigate(categoryUrl(id))} + onCollectionAssign={() => openModal("assign-collection")} + onCollectionUnassign={collectionId => + handleCollectionsUnassign([collectionId]) + } + onCategoryUnassign={categoryId => + handleCategoriesUnassign([categoryId]) + } + onCollectionClick={id => () => navigate(collectionUrl(id))} + onProductAssign={() => openModal("assign-product")} + onProductUnassign={productId => handleProductsUnassign([productId])} + onProductClick={id => () => navigate(productUrl(id))} + onVariantAssign={() => openModal("assign-variant")} + onVariantUnassign={variantId => handleVariantsUnassign([variantId])} + onVariantClick={(productId, variantId) => () => + navigate(productVariantEditPath(productId, variantId))} + activeTab={activeTab} + onBack={() => navigate(saleListUrl())} + onTabClick={changeTab} + onSubmit={handleSubmit} + onRemove={() => openModal("remove")} + saveButtonBarState={saleUpdateOpts.status} + categoryListToolbar={ + + } + collectionListToolbar={ + + } + productListToolbar={ + + } + variantListToolbar={ + + } + isChecked={isSelected} + selected={listElements.length} + toggle={toggle} + toggleAll={toggleAll} + /> + + saleCataloguesAdd({ + variables: { + ...paginationState, + id, + input: { + variants: variants.map(variant => variant.id) + } + } + }) + } + products={mapEdgesToItems(searchProductsOpts?.data?.search)?.filter( + suggestedProduct => suggestedProduct.id )} - + /> + + saleCataloguesAdd({ + variables: { + ...paginationState, + id, + input: { + products + } + } + }) + } + products={mapEdgesToItems(searchProductsOpts?.data?.search)?.filter( + suggestedProduct => suggestedProduct.id + )} + /> + suggestedCategory.id + )} + confirmButtonState={saleCataloguesAddOpts.status} + hasMore={searchCategoriesOpts.data?.search.pageInfo.hasNextPage} + open={params.action === "assign-category"} + onFetch={searchCategories} + onFetchMore={loadMoreCategories} + loading={searchCategoriesOpts.loading} + onClose={closeModal} + onSubmit={categories => + saleCataloguesAdd({ + variables: { + ...paginationState, + id, + input: { + categories + } + } + }) + } + /> + suggestedCategory.id)} + confirmButtonState={saleCataloguesAddOpts.status} + hasMore={searchCollectionsOpts.data?.search.pageInfo.hasNextPage} + open={params.action === "assign-collection"} + onFetch={searchCollections} + onFetchMore={loadMoreCollections} + loading={searchCollectionsOpts.loading} + onClose={closeModal} + onSubmit={collections => + saleCataloguesAdd({ + variables: { + ...paginationState, + id, + input: { + collections + } + } + }) + } + /> + handleCategoriesUnassign(params.ids)} + > + {canOpenBulkActionDialog && ( + + {params.ids.length} + }} + /> + + )} + + handleCollectionsUnassign(params.ids)} + > + {canOpenBulkActionDialog && ( + + {params.ids.length} + }} + /> + + )} + + handleProductsUnassign(params.ids)} + > + {canOpenBulkActionDialog && ( + + {params.ids.length} + }} + /> + + )} + + handleVariantsUnassign(params.ids)} + > + {canOpenBulkActionDialog && ( + + {params.ids.length} + }} + /> + + )} + + + saleDelete({ + variables: { id } + }) + } + > + + {maybe(() => data.sale.name, "...")} + }} + /> + + ); }; diff --git a/src/discounts/views/SaleDetails/handlers.ts b/src/discounts/views/SaleDetails/handlers.ts index ed98ccf6b..f0faab97c 100644 --- a/src/discounts/views/SaleDetails/handlers.ts +++ b/src/discounts/views/SaleDetails/handlers.ts @@ -4,13 +4,14 @@ import { SaleDetailsPageFormData } from "@saleor/discounts/components/SaleDetailsPage"; import { getSaleChannelsVariables } from "@saleor/discounts/handlers"; -import { SaleDetails_sale } from "@saleor/discounts/types/SaleDetails"; import { - SaleUpdate, - SaleUpdateVariables -} from "@saleor/discounts/types/SaleUpdate"; + DiscountValueTypeEnum, + SaleDetailsFragment, + SaleType, + SaleUpdateMutation, + SaleUpdateMutationVariables +} from "@saleor/graphql"; import { joinDateTime } from "@saleor/misc"; -import { DiscountValueTypeEnum, SaleType } from "@saleor/types/globalTypes"; function discountValueTypeEnum(type: SaleType): DiscountValueTypeEnum { return type.toString() === DiscountValueTypeEnum.FIXED @@ -19,11 +20,11 @@ function discountValueTypeEnum(type: SaleType): DiscountValueTypeEnum { } export function createUpdateHandler( - sale: SaleDetails_sale, + sale: SaleDetailsFragment, saleChannelsChoices: ChannelSaleFormData[], updateSale: ( - variables: SaleUpdateVariables - ) => Promise> + variables: SaleUpdateMutationVariables + ) => Promise> ) { return async (formData: SaleDetailsPageFormData) => { const { id } = sale; diff --git a/src/discounts/views/SaleList/SaleList.tsx b/src/discounts/views/SaleList/SaleList.tsx index 93b7d0c23..2c2c16b77 100644 --- a/src/discounts/views/SaleList/SaleList.tsx +++ b/src/discounts/views/SaleList/SaleList.tsx @@ -6,6 +6,7 @@ import SaveFilterTabDialog, { SaveFilterTabDialogFormData } from "@saleor/components/SaveFilterTabDialog"; import { WindowTitle } from "@saleor/components/WindowTitle"; +import { useSaleBulkDeleteMutation, useSaleListQuery } from "@saleor/graphql"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useListSettings from "@saleor/hooks/useListSettings"; import useNavigator from "@saleor/hooks/useNavigator"; @@ -27,9 +28,6 @@ import React, { useEffect } from "react"; import { FormattedMessage, useIntl } from "react-intl"; import SaleListPage from "../../components/SaleListPage"; -import { TypedSaleBulkDelete } from "../../mutations"; -import { useSaleListQuery } from "../../queries"; -import { SaleBulkDelete } from "../../types/SaleBulkDelete"; import { saleAddUrl, saleListUrl, @@ -151,115 +149,111 @@ export const SaleList: React.FC = ({ params }) => { params ); - const handleSaleBulkDelete = (data: SaleBulkDelete) => { - if (data.saleBulkDelete.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - reset(); - closeModal(); - refetch(); + const [saleBulkDelete, saleBulkDeleteOpts] = useSaleBulkDeleteMutation({ + onCompleted: data => { + if (data.saleBulkDelete.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + reset(); + closeModal(); + refetch(); + } } - }; + }); const handleSort = createSortHandler(navigate, saleListUrl, params); - return ( - - {(saleBulkDelete, saleBulkDeleteOpts) => { - const onSaleBulkDelete = () => - saleBulkDelete({ - variables: { - ids: params.ids - } - }); + const onSaleBulkDelete = () => + saleBulkDelete({ + variables: { + ids: params.ids + } + }); - return ( - <> - - changeFilters(filter)} - onAll={resetFilters} - onTabChange={handleTabChange} - onTabDelete={() => openModal("delete-search")} - onTabSave={() => openModal("save-search")} - tabs={tabs.map(tab => tab.name)} - sales={mapEdgesToItems(data?.sales)} - settings={settings} - disabled={loading} - pageInfo={pageInfo} - onAdd={() => navigate(saleAddUrl())} - onNextPage={loadNextPage} - onPreviousPage={loadPreviousPage} - onSort={handleSort} - onUpdateListSettings={updateListSettings} - onRowClick={id => () => navigate(saleUrl(id))} - isChecked={isSelected} - selected={listElements.length} - sort={getSortParams(params)} - toggle={toggle} - toggleAll={toggleAll} - toolbar={ - - openModal("remove", { - ids: listElements - }) - } - > - - - } - selectedChannelId={selectedChannel?.id} + return ( + <> + + changeFilters(filter)} + onAll={resetFilters} + onTabChange={handleTabChange} + onTabDelete={() => openModal("delete-search")} + onTabSave={() => openModal("save-search")} + tabs={tabs.map(tab => tab.name)} + sales={mapEdgesToItems(data?.sales)} + settings={settings} + disabled={loading} + pageInfo={pageInfo} + onAdd={() => navigate(saleAddUrl())} + onNextPage={loadNextPage} + onPreviousPage={loadPreviousPage} + onSort={handleSort} + onUpdateListSettings={updateListSettings} + onRowClick={id => () => navigate(saleUrl(id))} + isChecked={isSelected} + selected={listElements.length} + sort={getSortParams(params)} + toggle={toggle} + toggleAll={toggleAll} + toolbar={ + + openModal("remove", { + ids: listElements + }) + } + > + + + } + selectedChannelId={selectedChannel?.id} + /> + + {canOpenBulkActionDialog && ( + + {params.ids.length} + }} /> - - {canOpenBulkActionDialog && ( - - {params.ids.length} - }} - /> - - )} - - - tabs[currentTab - 1].name, "...")} - /> - - ); - }} - + + )} + + + tabs[currentTab - 1].name, "...")} + /> + ); }; export default SaleList; diff --git a/src/discounts/views/SaleList/filters.test.ts b/src/discounts/views/SaleList/filters.test.ts index ce1662206..d0a695d75 100644 --- a/src/discounts/views/SaleList/filters.test.ts +++ b/src/discounts/views/SaleList/filters.test.ts @@ -1,10 +1,7 @@ import { createFilterStructure } from "@saleor/discounts/components/SaleListPage"; import { SaleListUrlFilters } from "@saleor/discounts/urls"; import { date } from "@saleor/fixtures"; -import { - DiscountStatusEnum, - DiscountValueTypeEnum -} from "@saleor/types/globalTypes"; +import { DiscountStatusEnum, DiscountValueTypeEnum } from "@saleor/graphql"; import { getFilterQueryParams } from "@saleor/utils/filters"; import { stringifyQs } from "@saleor/utils/urls"; import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; diff --git a/src/discounts/views/SaleList/filters.ts b/src/discounts/views/SaleList/filters.ts index 09896ebc9..93e7bd16c 100644 --- a/src/discounts/views/SaleList/filters.ts +++ b/src/discounts/views/SaleList/filters.ts @@ -4,12 +4,12 @@ import { SaleFilterKeys, SaleListFilterOpts } from "@saleor/discounts/components/SaleListPage"; -import { findValueInEnum, joinDateTime, maybe } from "@saleor/misc"; import { DiscountStatusEnum, DiscountValueTypeEnum, SaleFilterInput -} from "@saleor/types/globalTypes"; +} from "@saleor/graphql"; +import { findValueInEnum, joinDateTime, maybe } from "@saleor/misc"; import { createFilterTabUtils, diff --git a/src/discounts/views/SaleList/sort.ts b/src/discounts/views/SaleList/sort.ts index 6b93172df..73164b91e 100644 --- a/src/discounts/views/SaleList/sort.ts +++ b/src/discounts/views/SaleList/sort.ts @@ -1,5 +1,5 @@ import { SaleListUrlSortField } from "@saleor/discounts/urls"; -import { SaleSortField } from "@saleor/types/globalTypes"; +import { SaleSortField } from "@saleor/graphql"; import { createGetSortQueryVariables } from "@saleor/utils/sort"; export const DEFAULT_SORT_KEY = SaleListUrlSortField.name; diff --git a/src/discounts/views/VoucherCreate/VoucherCreate.tsx b/src/discounts/views/VoucherCreate/VoucherCreate.tsx index 0f2ca9d87..8a43c75ce 100644 --- a/src/discounts/views/VoucherCreate/VoucherCreate.tsx +++ b/src/discounts/views/VoucherCreate/VoucherCreate.tsx @@ -6,25 +6,22 @@ import { import useAppChannel from "@saleor/components/AppLayout/AppChannelContext"; import ChannelsAvailabilityDialog from "@saleor/components/ChannelsAvailabilityDialog"; import { WindowTitle } from "@saleor/components/WindowTitle"; +import { + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation, + useVoucherChannelListingUpdateMutation, + useVoucherCreateMutation +} from "@saleor/graphql"; import useChannels from "@saleor/hooks/useChannels"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { sectionNames } from "@saleor/intl"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createMetadataCreateHandler from "@saleor/utils/handlers/metadataCreateHandler"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; import React from "react"; import { useIntl } from "react-intl"; import VoucherCreatePage from "../../components/VoucherCreatePage"; -import { - TypedVoucherCreate, - useVoucherChannelListingUpdate -} from "../../mutations"; -import { VoucherCreate } from "../../types/VoucherCreate"; import { voucherAddUrl, VoucherCreateUrlQueryParams, @@ -43,8 +40,8 @@ export const VoucherCreateView: React.FC = ({ params }) => { const notify = useNotifier(); const intl = useIntl(); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); const [openModal, closeModal] = createDialogActionHandlers< ChannelsAction, VoucherCreateUrlQueryParams @@ -73,77 +70,71 @@ export const VoucherCreateView: React.FC = ({ params }) => { { formId: VOUCHER_CREATE_FORM_ID } ); - const [updateChannels, updateChannelsOpts] = useVoucherChannelListingUpdate( - {} + const [ + updateChannels, + updateChannelsOpts + ] = useVoucherChannelListingUpdateMutation({}); + + const [voucherCreate, voucherCreateOpts] = useVoucherCreateMutation({ + onCompleted: data => { + if (data.voucherCreate.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage({ + defaultMessage: "Successfully created voucher" + }) + }); + navigate(voucherUrl(data.voucherCreate.voucher.id), { replace: true }); + } + } + }); + + const handleCreate = createHandler( + variables => voucherCreate({ variables }), + updateChannels + ); + const handleSubmit = createMetadataCreateHandler( + handleCreate, + updateMetadata, + updatePrivateMetadata ); - const handleVoucherCreate = (data: VoucherCreate) => { - if (data.voucherCreate.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage({ - defaultMessage: "Successfully created voucher" - }) - }); - navigate(voucherUrl(data.voucherCreate.voucher.id), { replace: true }); - } - }; - return ( - - {(voucherCreate, voucherCreateOpts) => { - const handleCreate = createHandler( - variables => voucherCreate({ variables }), - updateChannels - ); - const handleSubmit = createMetadataCreateHandler( - handleCreate, - updateMetadata, - updatePrivateMetadata - ); - - return ( - <> - {!!allChannels?.length && ( - - )} - - navigate(voucherListUrl())} - onSubmit={handleSubmit} - saveButtonBarState={voucherCreateOpts.status} - openChannelsModal={handleChannelsModalOpen} - onChannelsChange={setCurrentChannels} - /> - - ); - }} - + <> + {!!allChannels?.length && ( + + )} + + navigate(voucherListUrl())} + onSubmit={handleSubmit} + saveButtonBarState={voucherCreateOpts.status} + openChannelsModal={handleChannelsModalOpen} + onChannelsChange={setCurrentChannels} + /> + ); }; export default VoucherCreateView; diff --git a/src/discounts/views/VoucherCreate/handlers.ts b/src/discounts/views/VoucherCreate/handlers.ts index 13d3e7b01..6b5a51233 100644 --- a/src/discounts/views/VoucherCreate/handlers.ts +++ b/src/discounts/views/VoucherCreate/handlers.ts @@ -3,30 +3,26 @@ import { VoucherDetailsPageFormData } from "@saleor/discounts/components/Voucher import { getChannelsVariables } from "@saleor/discounts/handlers"; import { DiscountTypeEnum, RequirementsPicker } from "@saleor/discounts/types"; import { - VoucherChannelListingUpdate, - VoucherChannelListingUpdateVariables -} from "@saleor/discounts/types/VoucherChannelListingUpdate"; -import { - VoucherCreate, - VoucherCreateVariables -} from "@saleor/discounts/types/VoucherCreate"; + DiscountValueTypeEnum, + VoucherChannelListingUpdateMutation, + VoucherChannelListingUpdateMutationVariables, + VoucherCreateMutation, + VoucherCreateMutationVariables, + VoucherTypeEnum +} from "@saleor/graphql"; import { extractMutationErrors, getMutationErrors, joinDateTime } from "@saleor/misc"; -import { - DiscountValueTypeEnum, - VoucherTypeEnum -} from "@saleor/types/globalTypes"; export function createHandler( voucherCreate: ( - variables: VoucherCreateVariables - ) => Promise>, + variables: VoucherCreateMutationVariables + ) => Promise>, updateChannels: (options: { - variables: VoucherChannelListingUpdateVariables; - }) => Promise> + variables: VoucherChannelListingUpdateMutationVariables; + }) => Promise> ) { return async (formData: VoucherDetailsPageFormData) => { const response = await voucherCreate({ diff --git a/src/discounts/views/VoucherDetails/VoucherDetails.tsx b/src/discounts/views/VoucherDetails/VoucherDetails.tsx index ca8cfc280..81d68fb54 100644 --- a/src/discounts/views/VoucherDetails/VoucherDetails.tsx +++ b/src/discounts/views/VoucherDetails/VoucherDetails.tsx @@ -16,24 +16,22 @@ import DiscountCountrySelectDialog from "@saleor/discounts/components/DiscountCo import VoucherDetailsPage, { VoucherDetailsPageTab } from "@saleor/discounts/components/VoucherDetailsPage"; -import { - TypedVoucherCataloguesAdd, - TypedVoucherCataloguesRemove, - TypedVoucherDelete, - TypedVoucherUpdate, - useVoucherChannelListingUpdate -} from "@saleor/discounts/mutations"; -import { useVoucherDetails } from "@saleor/discounts/queries"; -import { VoucherCataloguesAdd } from "@saleor/discounts/types/VoucherCataloguesAdd"; -import { VoucherCataloguesRemove } from "@saleor/discounts/types/VoucherCataloguesRemove"; -import { VoucherDelete } from "@saleor/discounts/types/VoucherDelete"; -import { VoucherUpdate } from "@saleor/discounts/types/VoucherUpdate"; import { voucherListUrl, voucherUrl, VoucherUrlDialog, VoucherUrlQueryParams } from "@saleor/discounts/urls"; +import { + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation, + useVoucherCataloguesAddMutation, + useVoucherCataloguesRemoveMutation, + useVoucherChannelListingUpdateMutation, + useVoucherDeleteMutation, + useVoucherDetailsQuery, + useVoucherUpdateMutation +} from "@saleor/graphql"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useChannels from "@saleor/hooks/useChannels"; import useLocalPaginator, { @@ -51,10 +49,6 @@ import { arrayDiff } from "@saleor/utils/arrays"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createMetadataUpdateHandler from "@saleor/utils/handlers/metadataUpdateHandler"; import { mapEdgesToItems } from "@saleor/utils/maps"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; import React, { useMemo, useState } from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -102,8 +96,8 @@ export const VoucherDetails: React.FC = ({ } = useProductSearch({ variables: DEFAULT_INITIAL_SEARCH_DATA }); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); const [activeTab, setActiveTab] = useState( VoucherDetailsPageTab.categories @@ -118,7 +112,7 @@ export const VoucherDetails: React.FC = ({ setActiveTab(tab); }; - const { data, loading } = useVoucherDetails({ + const { data, loading } = useVoucherDetailsQuery({ displayLoader: true, variables: { id, @@ -163,44 +157,59 @@ export const VoucherDetails: React.FC = ({ { formId: VOUCHER_UPDATE_FORM_ID } ); - const [updateChannels, updateChannelsOpts] = useVoucherChannelListingUpdate( - {} - ); + const [ + updateChannels, + updateChannelsOpts + ] = useVoucherChannelListingUpdateMutation({}); - const handleVoucherDelete = (data: VoucherDelete) => { - if (data.voucherDelete.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage({ - defaultMessage: "Deleted voucher" - }) - }); - navigate(voucherListUrl(), { replace: true }); + const [voucherUpdate, voucherUpdateOpts] = useVoucherUpdateMutation({ + onCompleted: data => { + if (data.voucherUpdate.errors.length === 0) { + closeModal(); + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + } } - }; + }); - const handleVoucherUpdate = (data: VoucherUpdate) => { - if (data.voucherUpdate.errors.length === 0) { - closeModal(); - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); + const [voucherDelete, voucherDeleteOpts] = useVoucherDeleteMutation({ + onCompleted: data => { + if (data.voucherDelete.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage({ + defaultMessage: "Deleted voucher" + }) + }); + navigate(voucherListUrl(), { replace: true }); + } } - }; + }); - const handleCatalogueAdd = (data: VoucherCataloguesAdd) => { - if (data.voucherCataloguesAdd.errors.length === 0) { - closeModal(); + const [ + voucherCataloguesRemove, + voucherCataloguesRemoveOpts + ] = useVoucherCataloguesRemoveMutation({ + onCompleted: data => { + if (data.voucherCataloguesRemove.errors.length === 0) { + closeModal(); + reset(); + } } - }; + }); - const handleCatalogueRemove = (data: VoucherCataloguesRemove) => { - if (data.voucherCataloguesRemove.errors.length === 0) { - closeModal(); - reset(); + const [ + voucherCataloguesAdd, + voucherCataloguesAddOpts + ] = useVoucherCataloguesAddMutation({ + onCompleted: data => { + if (data.voucherCataloguesAdd.errors.length === 0) { + closeModal(); + } } - }; + }); const canOpenBulkActionDialog = maybe(() => params.ids.length > 0); @@ -213,8 +222,68 @@ export const VoucherDetails: React.FC = ({ return added.length !== 0 || removed.length !== 0; }; + const handleUpdate = createUpdateHandler( + data?.voucher, + voucherChannelsChoices, + variables => voucherUpdate({ variables }), + updateChannels + ); + + const handleSubmit = createMetadataUpdateHandler( + data?.voucher, + handleUpdate, + variables => updateMetadata({ variables }), + variables => updatePrivateMetadata({ variables }) + ); + + const tabPageInfo = + activeTab === VoucherDetailsPageTab.categories + ? maybe(() => data.voucher.categories.pageInfo) + : activeTab === VoucherDetailsPageTab.collections + ? maybe(() => data.voucher.collections.pageInfo) + : maybe(() => data.voucher.products.pageInfo); + + const handleCategoriesUnassign = (ids: string[]) => + voucherCataloguesRemove({ + variables: { + ...paginationState, + id, + input: { + categories: ids + } + } + }); + + const handleCollectionsUnassign = (ids: string[]) => + voucherCataloguesRemove({ + variables: { + ...paginationState, + id, + input: { + collections: ids + } + } + }); + + const handleProductsUnassign = (ids: string[]) => + voucherCataloguesRemove({ + variables: { + ...paginationState, + id, + input: { + products: ids + } + } + }); + + const { loadNextPage, loadPreviousPage, pageInfo } = paginate( + tabPageInfo, + paginationState + ); + return ( <> + {!!allChannels?.length && ( = ({ toggleAll={toggleAllChannels} /> )} - - {(voucherCataloguesRemove, voucherCataloguesRemoveOpts) => ( - - {(voucherCataloguesAdd, voucherCataloguesAddOpts) => ( - - {(voucherUpdate, voucherUpdateOpts) => ( - - {(voucherDelete, voucherDeleteOpts) => { - const handleUpdate = createUpdateHandler( - data?.voucher, - voucherChannelsChoices, - variables => voucherUpdate({ variables }), - updateChannels - ); - - const handleSubmit = createMetadataUpdateHandler( - data?.voucher, - handleUpdate, - variables => updateMetadata({ variables }), - variables => updatePrivateMetadata({ variables }) - ); - - const tabPageInfo = - activeTab === VoucherDetailsPageTab.categories - ? maybe(() => data.voucher.categories.pageInfo) - : activeTab === VoucherDetailsPageTab.collections - ? maybe(() => data.voucher.collections.pageInfo) - : maybe(() => data.voucher.products.pageInfo); - - const handleCategoriesUnassign = (ids: string[]) => - voucherCataloguesRemove({ - variables: { - ...paginationState, - id, - input: { - categories: ids - } - } - }); - - const handleCollectionsUnassign = (ids: string[]) => - voucherCataloguesRemove({ - variables: { - ...paginationState, - id, - input: { - collections: ids - } - } - }); - - const handleProductsUnassign = (ids: string[]) => - voucherCataloguesRemove({ - variables: { - ...paginationState, - id, - input: { - products: ids - } - } - }); - - const { - loadNextPage, - loadPreviousPage, - pageInfo - } = paginate(tabPageInfo, paginationState); - - return ( - <> - - - openModal("assign-category") - } - onCategoryClick={id => () => - navigate(categoryUrl(id))} - onCollectionAssign={() => - openModal("assign-collection") - } - onCollectionUnassign={collectionId => - voucherCataloguesRemove({ - variables: { - ...paginationState, - id, - input: { - collections: [collectionId] - } - } - }) - } - onCountryAssign={() => openModal("assign-country")} - onCountryUnassign={countryCode => - voucherUpdate({ - variables: { - ...paginationState, - id, - input: { - countries: data.voucher.countries - .filter( - country => country.code !== countryCode - ) - .map(country => country.code) - } - } - }) - } - onCategoryUnassign={categoryId => - voucherCataloguesRemove({ - variables: { - ...paginationState, - id, - input: { - categories: [categoryId] - } - } - }) - } - onCollectionClick={id => () => - navigate(collectionUrl(id))} - onProductAssign={() => openModal("assign-product")} - onProductUnassign={productId => - voucherCataloguesRemove({ - variables: { - ...paginationState, - id, - input: { - products: [productId] - } - } - }) - } - onProductClick={id => () => - navigate(productUrl(id))} - activeTab={activeTab} - onBack={() => navigate(voucherListUrl())} - onTabClick={changeTab} - onSubmit={handleSubmit} - onRemove={() => openModal("remove")} - openChannelsModal={handleChannelsModalOpen} - onChannelsChange={setCurrentChannels} - saveButtonBarState={voucherUpdateOpts.status} - categoryListToolbar={ - - } - collectionListToolbar={ - - } - productListToolbar={ - - } - isChecked={isSelected} - selected={listElements.length} - toggle={toggle} - toggleAll={toggleAll} - /> - suggestedCategory.id - )} - confirmButtonState={voucherCataloguesAddOpts.status} - hasMore={ - searchCategoriesOpts.data?.search.pageInfo - .hasNextPage - } - open={params.action === "assign-category"} - onFetch={searchCategories} - onFetchMore={loadMoreCategories} - loading={searchCategoriesOpts.loading} - onClose={closeModal} - onSubmit={categories => - voucherCataloguesAdd({ - variables: { - ...paginationState, - id, - input: { - categories - } - } - }) - } - /> - suggestedCategory.id - )} - confirmButtonState={voucherCataloguesAddOpts.status} - hasMore={ - searchCollectionsOpts.data?.search.pageInfo - .hasNextPage - } - open={params.action === "assign-collection"} - onFetch={searchCollections} - onFetchMore={loadMoreCollections} - loading={searchCollectionsOpts.loading} - onClose={closeModal} - onSubmit={collections => - voucherCataloguesAdd({ - variables: { - ...paginationState, - id, - input: { - collections - } - } - }) - } - /> - shop.countries, [])} - onClose={() => navigate(voucherUrl(id))} - onConfirm={formData => - voucherUpdate({ - variables: { - id, - input: { - countries: formData.countries - } - } - }) - } - open={params.action === "assign-country"} - initial={maybe( - () => - data.voucher.countries.map( - country => country.code - ), - [] - )} - /> - - voucherCataloguesAdd({ - variables: { - ...paginationState, - id, - input: { - products - } - } - }) - } - products={mapEdgesToItems( - searchProductsOpts?.data?.search - )?.filter(suggestedProduct => suggestedProduct.id)} - /> - - handleCategoriesUnassign(params.ids) - } - > - {canOpenBulkActionDialog && ( - - {params.ids.length} - ) - }} - /> - - )} - - - handleCollectionsUnassign(params.ids) - } - > - {canOpenBulkActionDialog && ( - - {params.ids.length} - ) - }} - /> - - )} - - handleProductsUnassign(params.ids)} - > - {canOpenBulkActionDialog && ( - - {params.ids.length} - ) - }} - /> - - )} - - - voucherDelete({ - variables: { id } - }) - } - > - - - {maybe(() => data.voucher.code, "...")} - - ) - }} - /> - - - - ); - }} - - )} - - )} - + openModal("assign-category")} + onCategoryClick={id => () => navigate(categoryUrl(id))} + onCollectionAssign={() => openModal("assign-collection")} + onCollectionUnassign={collectionId => + voucherCataloguesRemove({ + variables: { + ...paginationState, + id, + input: { + collections: [collectionId] + } + } + }) + } + onCountryAssign={() => openModal("assign-country")} + onCountryUnassign={countryCode => + voucherUpdate({ + variables: { + ...paginationState, + id, + input: { + countries: data.voucher.countries + .filter(country => country.code !== countryCode) + .map(country => country.code) + } + } + }) + } + onCategoryUnassign={categoryId => + voucherCataloguesRemove({ + variables: { + ...paginationState, + id, + input: { + categories: [categoryId] + } + } + }) + } + onCollectionClick={id => () => navigate(collectionUrl(id))} + onProductAssign={() => openModal("assign-product")} + onProductUnassign={productId => + voucherCataloguesRemove({ + variables: { + ...paginationState, + id, + input: { + products: [productId] + } + } + }) + } + onProductClick={id => () => navigate(productUrl(id))} + activeTab={activeTab} + onBack={() => navigate(voucherListUrl())} + onTabClick={changeTab} + onSubmit={handleSubmit} + onRemove={() => openModal("remove")} + openChannelsModal={handleChannelsModalOpen} + onChannelsChange={setCurrentChannels} + saveButtonBarState={voucherUpdateOpts.status} + categoryListToolbar={ + + } + collectionListToolbar={ + + } + productListToolbar={ + + } + isChecked={isSelected} + selected={listElements.length} + toggle={toggle} + toggleAll={toggleAll} + /> + suggestedCategory.id )} - + confirmButtonState={voucherCataloguesAddOpts.status} + hasMore={searchCategoriesOpts.data?.search.pageInfo.hasNextPage} + open={params.action === "assign-category"} + onFetch={searchCategories} + onFetchMore={loadMoreCategories} + loading={searchCategoriesOpts.loading} + onClose={closeModal} + onSubmit={categories => + voucherCataloguesAdd({ + variables: { + ...paginationState, + id, + input: { + categories + } + } + }) + } + /> + suggestedCategory.id)} + confirmButtonState={voucherCataloguesAddOpts.status} + hasMore={searchCollectionsOpts.data?.search.pageInfo.hasNextPage} + open={params.action === "assign-collection"} + onFetch={searchCollections} + onFetchMore={loadMoreCollections} + loading={searchCollectionsOpts.loading} + onClose={closeModal} + onSubmit={collections => + voucherCataloguesAdd({ + variables: { + ...paginationState, + id, + input: { + collections + } + } + }) + } + /> + shop.countries, [])} + onClose={() => navigate(voucherUrl(id))} + onConfirm={formData => + voucherUpdate({ + variables: { + id, + input: { + countries: formData.countries + } + } + }) + } + open={params.action === "assign-country"} + initial={maybe( + () => data.voucher.countries.map(country => country.code), + [] + )} + /> + + voucherCataloguesAdd({ + variables: { + ...paginationState, + id, + input: { + products + } + } + }) + } + products={mapEdgesToItems(searchProductsOpts?.data?.search)?.filter( + suggestedProduct => suggestedProduct.id + )} + /> + handleCategoriesUnassign(params.ids)} + > + {canOpenBulkActionDialog && ( + + {params.ids.length} + }} + /> + + )} + + handleCollectionsUnassign(params.ids)} + > + {canOpenBulkActionDialog && ( + + {params.ids.length} + }} + /> + + )} + + handleProductsUnassign(params.ids)} + > + {canOpenBulkActionDialog && ( + + {params.ids.length} + }} + /> + + )} + + + voucherDelete({ + variables: { id } + }) + } + > + + {maybe(() => data.voucher.code, "...")} + ) + }} + /> + + ); }; diff --git a/src/discounts/views/VoucherDetails/handlers.ts b/src/discounts/views/VoucherDetails/handlers.ts index 4583f403d..db4a7351d 100644 --- a/src/discounts/views/VoucherDetails/handlers.ts +++ b/src/discounts/views/VoucherDetails/handlers.ts @@ -3,30 +3,26 @@ import { ChannelVoucherData } from "@saleor/channels/utils"; import { VoucherDetailsPageFormData } from "@saleor/discounts/components/VoucherDetailsPage"; import { getChannelsVariables } from "@saleor/discounts/handlers"; import { DiscountTypeEnum, RequirementsPicker } from "@saleor/discounts/types"; -import { - VoucherChannelListingUpdate, - VoucherChannelListingUpdateVariables -} from "@saleor/discounts/types/VoucherChannelListingUpdate"; -import { VoucherDetails_voucher } from "@saleor/discounts/types/VoucherDetails"; -import { - VoucherUpdate, - VoucherUpdateVariables -} from "@saleor/discounts/types/VoucherUpdate"; -import { joinDateTime } from "@saleor/misc"; import { DiscountValueTypeEnum, - VoucherTypeEnum -} from "@saleor/types/globalTypes"; + VoucherChannelListingUpdateMutation, + VoucherChannelListingUpdateMutationVariables, + VoucherDetailsFragment, + VoucherTypeEnum, + VoucherUpdateMutation, + VoucherUpdateMutationVariables +} from "@saleor/graphql"; +import { joinDateTime } from "@saleor/misc"; export function createUpdateHandler( - voucher: VoucherDetails_voucher, + voucher: VoucherDetailsFragment, voucherChannelsChoices: ChannelVoucherData[], updateVoucher: ( - variables: VoucherUpdateVariables - ) => Promise>, + variables: VoucherUpdateMutationVariables + ) => Promise>, updateChannels: (options: { - variables: VoucherChannelListingUpdateVariables; - }) => Promise> + variables: VoucherChannelListingUpdateMutationVariables; + }) => Promise> ) { return async (formData: VoucherDetailsPageFormData) => { const { id } = voucher; diff --git a/src/discounts/views/VoucherList/VoucherList.tsx b/src/discounts/views/VoucherList/VoucherList.tsx index d585120a6..52d0a2a65 100644 --- a/src/discounts/views/VoucherList/VoucherList.tsx +++ b/src/discounts/views/VoucherList/VoucherList.tsx @@ -6,6 +6,10 @@ import SaveFilterTabDialog, { SaveFilterTabDialogFormData } from "@saleor/components/SaveFilterTabDialog"; import { WindowTitle } from "@saleor/components/WindowTitle"; +import { + useVoucherBulkDeleteMutation, + useVoucherListQuery +} from "@saleor/graphql"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useListSettings from "@saleor/hooks/useListSettings"; import useNavigator from "@saleor/hooks/useNavigator"; @@ -27,9 +31,6 @@ import React, { useEffect } from "react"; import { FormattedMessage, useIntl } from "react-intl"; import VoucherListPage from "../../components/VoucherListPage"; -import { TypedVoucherBulkDelete } from "../../mutations"; -import { useVoucherListQuery } from "../../queries"; -import { VoucherBulkDelete } from "../../types/VoucherBulkDelete"; import { voucherAddUrl, voucherListUrl, @@ -152,115 +153,114 @@ export const VoucherList: React.FC = ({ params }) => { params ); - const handleVoucherBulkDelete = (data: VoucherBulkDelete) => { - if (data.voucherBulkDelete.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - reset(); - closeModal(); - refetch(); + const [ + voucherBulkDelete, + voucherBulkDeleteOpts + ] = useVoucherBulkDeleteMutation({ + onCompleted: data => { + if (data.voucherBulkDelete.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + reset(); + closeModal(); + refetch(); + } } - }; + }); + + const onVoucherBulkDelete = () => + voucherBulkDelete({ + variables: { + ids: params.ids + } + }); const handleSort = createSortHandler(navigate, voucherListUrl, params); return ( - - {(voucherBulkDelete, voucherBulkDeleteOpts) => { - const onVoucherBulkDelete = () => - voucherBulkDelete({ - variables: { - ids: params.ids + <> + + changeFilters(filter)} + onAll={resetFilters} + onTabChange={handleTabChange} + onTabDelete={() => openModal("delete-search")} + onTabSave={() => openModal("save-search")} + tabs={tabs.map(tab => tab.name)} + settings={settings} + vouchers={mapEdgesToItems(data?.vouchers)} + disabled={loading} + pageInfo={pageInfo} + onAdd={() => navigate(voucherAddUrl())} + onNextPage={loadNextPage} + onPreviousPage={loadPreviousPage} + onUpdateListSettings={updateListSettings} + onRowClick={id => () => navigate(voucherUrl(id))} + onSort={handleSort} + isChecked={isSelected} + selected={listElements.length} + sort={getSortParams(params)} + toggle={toggle} + toggleAll={toggleAll} + toolbar={ + + openModal("remove", { + ids: listElements + }) } - }); - - return ( - <> - - changeFilters(filter)} - onAll={resetFilters} - onTabChange={handleTabChange} - onTabDelete={() => openModal("delete-search")} - onTabSave={() => openModal("save-search")} - tabs={tabs.map(tab => tab.name)} - settings={settings} - vouchers={mapEdgesToItems(data?.vouchers)} - disabled={loading} - pageInfo={pageInfo} - onAdd={() => navigate(voucherAddUrl())} - onNextPage={loadNextPage} - onPreviousPage={loadPreviousPage} - onUpdateListSettings={updateListSettings} - onRowClick={id => () => navigate(voucherUrl(id))} - onSort={handleSort} - isChecked={isSelected} - selected={listElements.length} - sort={getSortParams(params)} - toggle={toggle} - toggleAll={toggleAll} - toolbar={ - - openModal("remove", { - ids: listElements - }) - } - > - - - } - selectedChannelId={selectedChannel?.id} + > + + + } + selectedChannelId={selectedChannel?.id} + /> + + {canOpenBulkActionDialog && ( + + {params.ids.length} + }} /> - - {canOpenBulkActionDialog && ( - - {params.ids.length} - }} - /> - - )} - - - tabs[currentTab - 1].name, "...")} - /> - - ); - }} - + + )} + + + tabs[currentTab - 1].name, "...")} + /> + ); }; export default VoucherList; diff --git a/src/discounts/views/VoucherList/filters.test.ts b/src/discounts/views/VoucherList/filters.test.ts index 553b3d3ab..da282c82f 100644 --- a/src/discounts/views/VoucherList/filters.test.ts +++ b/src/discounts/views/VoucherList/filters.test.ts @@ -1,10 +1,7 @@ import { createFilterStructure } from "@saleor/discounts/components/VoucherListPage"; import { VoucherListUrlFilters } from "@saleor/discounts/urls"; import { date } from "@saleor/fixtures"; -import { - DiscountStatusEnum, - VoucherDiscountType -} from "@saleor/types/globalTypes"; +import { DiscountStatusEnum, VoucherDiscountType } from "@saleor/graphql"; import { getFilterQueryParams } from "@saleor/utils/filters"; import { stringifyQs } from "@saleor/utils/urls"; import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; diff --git a/src/discounts/views/VoucherList/filters.ts b/src/discounts/views/VoucherList/filters.ts index 379359973..ce5fa8bb6 100644 --- a/src/discounts/views/VoucherList/filters.ts +++ b/src/discounts/views/VoucherList/filters.ts @@ -4,12 +4,12 @@ import { VoucherFilterKeys, VoucherListFilterOpts } from "@saleor/discounts/components/VoucherListPage"; -import { findValueInEnum, joinDateTime, maybe } from "@saleor/misc"; import { DiscountStatusEnum, VoucherDiscountType, VoucherFilterInput -} from "@saleor/types/globalTypes"; +} from "@saleor/graphql"; +import { findValueInEnum, joinDateTime, maybe } from "@saleor/misc"; import { createFilterTabUtils, diff --git a/src/discounts/views/VoucherList/sort.ts b/src/discounts/views/VoucherList/sort.ts index d7603f07e..19064a45e 100644 --- a/src/discounts/views/VoucherList/sort.ts +++ b/src/discounts/views/VoucherList/sort.ts @@ -1,5 +1,5 @@ import { VoucherListUrlSortField } from "@saleor/discounts/urls"; -import { VoucherSortField } from "@saleor/types/globalTypes"; +import { VoucherSortField } from "@saleor/graphql"; import { createGetSortQueryVariables } from "@saleor/utils/sort"; export const DEFAULT_SORT_KEY = VoucherListUrlSortField.code; diff --git a/src/files/mutations.ts b/src/files/mutations.ts index 1aabeb00e..dbe8cc987 100644 --- a/src/files/mutations.ts +++ b/src/files/mutations.ts @@ -1,25 +1,14 @@ import { gql } from "@apollo/client"; -import { uploadErrorFragment } from "@saleor/fragments/errors"; -import { fileFragment } from "@saleor/fragments/file"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { FileUpload, FileUploadVariables } from "./types/FileUpload"; - -const fileUploadMutation = gql` - ${fileFragment} - ${uploadErrorFragment} +export const fileUploadMutation = gql` mutation FileUpload($file: Upload!) { fileUpload(file: $file) { uploadedFile { - ...FileFragment + ...File } errors { - ...UploadErrorFragment + ...UploadError } } } `; -export const useFileUploadMutation = makeMutation< - FileUpload, - FileUploadVariables ->(fileUploadMutation); diff --git a/src/files/types/FileUpload.ts b/src/files/types/FileUpload.ts deleted file mode 100644 index f9a3540f7..000000000 --- a/src/files/types/FileUpload.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { UploadErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: FileUpload -// ==================================================== - -export interface FileUpload_fileUpload_uploadedFile { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface FileUpload_fileUpload_errors { - __typename: "UploadError"; - code: UploadErrorCode; - field: string | null; - message: string | null; -} - -export interface FileUpload_fileUpload { - __typename: "FileUpload"; - uploadedFile: FileUpload_fileUpload_uploadedFile | null; - errors: FileUpload_fileUpload_errors[]; -} - -export interface FileUpload { - fileUpload: FileUpload_fileUpload | null; -} - -export interface FileUploadVariables { - file: any; -} diff --git a/src/fixtures.ts b/src/fixtures.ts index 28c3539e3..8644c044b 100644 --- a/src/fixtures.ts +++ b/src/fixtures.ts @@ -1,6 +1,10 @@ -import { ShopInfo_shop_permissions } from "./components/Shop/types/ShopInfo"; -import { ShopLimitFragment_limits } from "./fragments/types/ShopLimitFragment"; -import { User_userPermissions } from "./fragments/types/User"; +import { + PermissionEnum, + ShopInfoQuery, + ShopLimitFragment, + UserDetailsQuery +} from "@saleor/graphql"; + import { FetchMoreProps, FilterPageProps, @@ -10,7 +14,6 @@ import { SortPage, TabPageProps } from "./types"; -import { PermissionEnum } from "./types/globalTypes"; const pageInfo = { hasNextPage: true, @@ -327,7 +330,7 @@ export const sortPageProps: SortPage = { } }; -export const permissions: ShopInfo_shop_permissions[] = [ +export const permissions: ShopInfoQuery["shop"]["permissions"] = [ { code: PermissionEnum.MANAGE_DISCOUNTS, name: "Manage sales and vouchers." @@ -390,7 +393,7 @@ export const date = { to: "2019-12-38" }; -export const adminUserPermissions: User_userPermissions[] = [ +export const adminUserPermissions: UserDetailsQuery["me"]["userPermissions"] = [ { __typename: "UserPermission", code: PermissionEnum.MANAGE_CHECKOUTS, @@ -508,7 +511,7 @@ export const address = { streetAddress2: "0238 Cremin Freeway" }; -export const limits: ShopLimitFragment_limits = { +export const limits: ShopLimitFragment["limits"] = { __typename: "LimitInfo", allowedUsage: { __typename: "Limits", @@ -527,7 +530,7 @@ export const limits: ShopLimitFragment_limits = { warehouses: 1 } }; -export const limitsReached: ShopLimitFragment_limits = { +export const limitsReached: ShopLimitFragment["limits"] = { __typename: "LimitInfo", allowedUsage: { __typename: "Limits", diff --git a/src/fragments/address.ts b/src/fragments/address.ts index 82c463448..08e97eb41 100644 --- a/src/fragments/address.ts +++ b/src/fragments/address.ts @@ -1,7 +1,7 @@ import { gql } from "@apollo/client"; export const fragmentAddress = gql` - fragment AddressFragment on Address { + fragment Address on Address { city cityArea companyName diff --git a/src/fragments/apps.ts b/src/fragments/apps.ts index 64be5ade2..a686abab2 100644 --- a/src/fragments/apps.ts +++ b/src/fragments/apps.ts @@ -1,7 +1,7 @@ import { gql } from "@apollo/client"; export const appFragment = gql` - fragment AppFragment on App { + fragment App on App { id name created @@ -27,7 +27,7 @@ export const appFragment = gql` name } webhooks { - ...WebhookFragment + ...Webhook } } `; diff --git a/src/fragments/attributes.ts b/src/fragments/attributes.ts index a925e0a63..38b7e14fd 100644 --- a/src/fragments/attributes.ts +++ b/src/fragments/attributes.ts @@ -1,17 +1,12 @@ import { gql } from "@apollo/client"; -import { fileFragment } from "./file"; -import { metadataFragment } from "./metadata"; -import { pageInfoFragment } from "./pageInfo"; - export const attributeValueFragment = gql` - ${fileFragment} - fragment AttributeValueFragment on AttributeValue { + fragment AttributeValue on AttributeValue { id name slug file { - ...FileFragment + ...File } reference boolean @@ -23,14 +18,14 @@ export const attributeValueFragment = gql` export const attributeValueDetailsFragment = gql` ${attributeValueFragment} - fragment AttributeValueDetailsFragment on AttributeValue { - ...AttributeValueFragment + fragment AttributeValueDetails on AttributeValue { + ...AttributeValue richText } `; export const attributeFragment = gql` - fragment AttributeFragment on Attribute { + fragment Attribute on Attribute { id name slug @@ -44,11 +39,9 @@ export const attributeFragment = gql` `; export const attributeDetailsFragment = gql` - ${attributeFragment} - ${metadataFragment} - fragment AttributeDetailsFragment on Attribute { - ...AttributeFragment - ...MetadataFragment + fragment AttributeDetails on Attribute { + ...Attribute + ...Metadata availableInGrid inputType entityType @@ -59,23 +52,21 @@ export const attributeDetailsFragment = gql` `; export const attributeValueListFragment = gql` - ${attributeValueDetailsFragment} - ${pageInfoFragment} - fragment AttributeValueListFragment on AttributeValueCountableConnection { + fragment AttributeValueList on AttributeValueCountableConnection { pageInfo { - ...PageInfoFragment + ...PageInfo } edges { cursor node { - ...AttributeValueDetailsFragment + ...AttributeValueDetails } } } `; export const availableAttributeFragment = gql` - fragment AvailableAttributeFragment on Attribute { + fragment AvailableAttribute on Attribute { id name slug diff --git a/src/fragments/auth.ts b/src/fragments/auth.ts index 60e599503..f8cd6bba2 100644 --- a/src/fragments/auth.ts +++ b/src/fragments/auth.ts @@ -1,5 +1,12 @@ import { gql } from "@apollo/client"; +export const userUserPermissionFragment = gql` + fragment UserPermission on UserPermission { + code + name + } +`; + export const fragmentUser = gql` fragment User on User { id @@ -8,8 +15,7 @@ export const fragmentUser = gql` lastName isStaff userPermissions { - code - name + ...UserPermission } avatar { url diff --git a/src/fragments/categories.ts b/src/fragments/categories.ts index 55bfd387b..019581e7f 100644 --- a/src/fragments/categories.ts +++ b/src/fragments/categories.ts @@ -1,9 +1,7 @@ import { gql } from "@apollo/client"; -import { metadataFragment } from "./metadata"; - export const categoryFragment = gql` - fragment CategoryFragment on Category { + fragment Category on Category { id name children { @@ -15,10 +13,9 @@ export const categoryFragment = gql` } `; export const categoryDetailsFragment = gql` - ${metadataFragment} - fragment CategoryDetailsFragment on Category { + fragment CategoryDetails on Category { id - ...MetadataFragment + ...Metadata backgroundImage { alt url diff --git a/src/fragments/channels.ts b/src/fragments/channels.ts index 3f47878a5..0393c93d4 100644 --- a/src/fragments/channels.ts +++ b/src/fragments/channels.ts @@ -1,7 +1,7 @@ import { gql } from "@apollo/client"; export const channelErrorFragment = gql` - fragment ChannelErrorFragment on ChannelError { + fragment ChannelError on ChannelError { code field message @@ -9,7 +9,7 @@ export const channelErrorFragment = gql` `; export const channelFragment = gql` - fragment ChannelFragment on Channel { + fragment Channel on Channel { id isActive name @@ -23,9 +23,8 @@ export const channelFragment = gql` `; export const channelDetailsFragment = gql` - ${channelFragment} - fragment ChannelDetailsFragment on Channel { - ...ChannelFragment + fragment ChannelDetails on Channel { + ...Channel hasOrders } `; diff --git a/src/fragments/collections.ts b/src/fragments/collections.ts index 9da745470..f486a812f 100644 --- a/src/fragments/collections.ts +++ b/src/fragments/collections.ts @@ -1,10 +1,7 @@ import { gql } from "@apollo/client"; -import { channelListingProductWithoutPricingFragment } from "@saleor/fragments/products"; - -import { metadataFragment } from "./metadata"; export const collectionFragment = gql` - fragment CollectionFragment on Collection { + fragment Collection on Collection { id name channelListings { @@ -19,11 +16,9 @@ export const collectionFragment = gql` `; export const collectionDetailsFragment = gql` - ${collectionFragment} - ${metadataFragment} - fragment CollectionDetailsFragment on Collection { - ...CollectionFragment - ...MetadataFragment + fragment CollectionDetails on Collection { + ...Collection + ...Metadata backgroundImage { alt url @@ -35,13 +30,8 @@ export const collectionDetailsFragment = gql` } `; -// This fragment is used to make sure that product's fields that are returned -// are always the same - fixes apollo cache -// https://github.com/apollographql/apollo-client/issues/2496 -// https://github.com/apollographql/apollo-client/issues/3468 export const collectionProductFragment = gql` - ${channelListingProductWithoutPricingFragment} - fragment CollectionProductFragment on Product { + fragment CollectionProduct on Product { id name productType { @@ -52,7 +42,7 @@ export const collectionProductFragment = gql` url } channelListings { - ...ChannelListingProductWithoutPricingFragment + ...ChannelListingProductWithoutPricing } } `; diff --git a/src/fragments/customers.ts b/src/fragments/customers.ts index a7cddff9a..4705070b1 100644 --- a/src/fragments/customers.ts +++ b/src/fragments/customers.ts @@ -1,10 +1,7 @@ import { gql } from "@apollo/client"; -import { fragmentAddress } from "./address"; -import { metadataFragment } from "./metadata"; - export const customerFragment = gql` - fragment CustomerFragment on User { + fragment Customer on User { id email firstName @@ -13,19 +10,16 @@ export const customerFragment = gql` `; export const customerDetailsFragment = gql` - ${metadataFragment} - ${customerFragment} - ${fragmentAddress} - fragment CustomerDetailsFragment on User { - ...CustomerFragment - ...MetadataFragment + fragment CustomerDetails on User { + ...Customer + ...Metadata dateJoined lastLogin defaultShippingAddress { - ...AddressFragment + ...Address } defaultBillingAddress { - ...AddressFragment + ...Address } note isActive @@ -33,12 +27,10 @@ export const customerDetailsFragment = gql` `; export const customerAddressesFragment = gql` - ${customerFragment} - ${fragmentAddress} - fragment CustomerAddressesFragment on User { - ...CustomerFragment + fragment CustomerAddresses on User { + ...Customer addresses { - ...AddressFragment + ...Address } defaultBillingAddress { id diff --git a/src/fragments/discounts.ts b/src/fragments/discounts.ts index 5189708f7..5d976f31a 100644 --- a/src/fragments/discounts.ts +++ b/src/fragments/discounts.ts @@ -1,13 +1,8 @@ import { gql } from "@apollo/client"; -import { metadataFragment } from "@saleor/fragments/metadata"; -import { channelListingProductWithoutPricingFragment } from "@saleor/fragments/products"; - -import { pageInfoFragment } from "./pageInfo"; export const saleFragment = gql` - ${metadataFragment} - fragment SaleFragment on Sale { - ...MetadataFragment + fragment Sale on Sale { + ...Metadata id name type @@ -27,11 +22,8 @@ export const saleFragment = gql` `; export const saleDetailsFragment = gql` - ${channelListingProductWithoutPricingFragment} - ${pageInfoFragment} - ${saleFragment} - fragment SaleDetailsFragment on Sale { - ...SaleFragment + fragment SaleDetails on Sale { + ...Sale variants(after: $after, before: $before, first: $first, last: $last) { edges { node { @@ -48,13 +40,13 @@ export const saleDetailsFragment = gql` name } channelListings { - ...ChannelListingProductWithoutPricingFragment + ...ChannelListingProductWithoutPricing } } } } pageInfo { - ...PageInfoFragment + ...PageInfo } totalCount } @@ -71,12 +63,12 @@ export const saleDetailsFragment = gql` url } channelListings { - ...ChannelListingProductWithoutPricingFragment + ...ChannelListingProductWithoutPricing } } } pageInfo { - ...PageInfoFragment + ...PageInfo } totalCount } @@ -91,7 +83,7 @@ export const saleDetailsFragment = gql` } } pageInfo { - ...PageInfoFragment + ...PageInfo } totalCount } @@ -106,7 +98,7 @@ export const saleDetailsFragment = gql` } } pageInfo { - ...PageInfoFragment + ...PageInfo } totalCount } @@ -114,9 +106,8 @@ export const saleDetailsFragment = gql` `; export const voucherFragment = gql` - ${metadataFragment} - fragment VoucherFragment on Voucher { - ...MetadataFragment + fragment Voucher on Voucher { + ...Metadata id code startDate @@ -147,11 +138,8 @@ export const voucherFragment = gql` `; export const voucherDetailsFragment = gql` - ${pageInfoFragment} - ${voucherFragment} - ${channelListingProductWithoutPricingFragment} - fragment VoucherDetailsFragment on Voucher { - ...VoucherFragment + fragment VoucherDetails on Voucher { + ...Voucher code usageLimit used @@ -171,13 +159,13 @@ export const voucherDetailsFragment = gql` url } channelListings { - ...ChannelListingProductWithoutPricingFragment + ...ChannelListingProductWithoutPricing } } } totalCount pageInfo { - ...PageInfoFragment + ...PageInfo } } collections(after: $after, before: $before, first: $first, last: $last) { @@ -192,7 +180,7 @@ export const voucherDetailsFragment = gql` } totalCount pageInfo { - ...PageInfoFragment + ...PageInfo } } categories(after: $after, before: $before, first: $first, last: $last) { @@ -207,7 +195,7 @@ export const voucherDetailsFragment = gql` } totalCount pageInfo { - ...PageInfoFragment + ...PageInfo } } } diff --git a/src/fragments/errors.ts b/src/fragments/errors.ts index fcfcad28e..dd1420587 100644 --- a/src/fragments/errors.ts +++ b/src/fragments/errors.ts @@ -1,7 +1,7 @@ import { gql } from "@apollo/client"; export const attributeErrorFragment = gql` - fragment AttributeErrorFragment on AttributeError { + fragment AttributeError on AttributeError { code field message @@ -9,7 +9,7 @@ export const attributeErrorFragment = gql` `; export const productErrorFragment = gql` - fragment ProductErrorFragment on ProductError { + fragment ProductError on ProductError { code field message @@ -17,15 +17,14 @@ export const productErrorFragment = gql` `; export const productErrorWithAttributesFragment = gql` - ${productErrorFragment} - fragment ProductErrorWithAttributesFragment on ProductError { - ...ProductErrorFragment + fragment ProductErrorWithAttributes on ProductError { + ...ProductError attributes } `; export const productChannelListingErrorFragment = gql` - fragment ProductChannelListingErrorFragment on ProductChannelListingError { + fragment ProductChannelListingError on ProductChannelListingError { code field message @@ -34,7 +33,7 @@ export const productChannelListingErrorFragment = gql` `; export const collectionChannelListingErrorFragment = gql` - fragment CollectionChannelListingErrorFragment on CollectionChannelListingError { + fragment CollectionChannelListingError on CollectionChannelListingError { code field message @@ -43,7 +42,7 @@ export const collectionChannelListingErrorFragment = gql` `; export const accountErrorFragment = gql` - fragment AccountErrorFragment on AccountError { + fragment AccountError on AccountError { code field addressType @@ -52,7 +51,7 @@ export const accountErrorFragment = gql` `; export const discountErrorFragment = gql` - fragment DiscountErrorFragment on DiscountError { + fragment DiscountError on DiscountError { code field channels @@ -61,7 +60,7 @@ export const discountErrorFragment = gql` `; export const menuErrorFragment = gql` - fragment MenuErrorFragment on MenuError { + fragment MenuError on MenuError { code field message @@ -69,7 +68,7 @@ export const menuErrorFragment = gql` `; export const orderErrorFragment = gql` - fragment OrderErrorFragment on OrderError { + fragment OrderError on OrderError { code field addressType @@ -78,7 +77,7 @@ export const orderErrorFragment = gql` `; export const orderSettingsErrorFragment = gql` - fragment OrderSettingsErrorFragment on OrderSettingsError { + fragment OrderSettingsError on OrderSettingsError { code field message @@ -86,7 +85,7 @@ export const orderSettingsErrorFragment = gql` `; export const pageErrorFragment = gql` - fragment PageErrorFragment on PageError { + fragment PageError on PageError { code field message @@ -94,15 +93,14 @@ export const pageErrorFragment = gql` `; export const pageErrorWithAttributesFragment = gql` - ${pageErrorFragment} - fragment PageErrorWithAttributesFragment on PageError { - ...PageErrorFragment + fragment PageErrorWithAttributes on PageError { + ...PageError attributes } `; export const permissionGroupErrorFragment = gql` - fragment PermissionGroupErrorFragment on PermissionGroupError { + fragment PermissionGroupError on PermissionGroupError { code field message @@ -110,7 +108,7 @@ export const permissionGroupErrorFragment = gql` `; export const bulkProductErrorFragment = gql` - fragment BulkProductErrorFragment on BulkProductError { + fragment BulkProductError on BulkProductError { field code index @@ -119,7 +117,7 @@ export const bulkProductErrorFragment = gql` } `; export const bulkStockErrorFragment = gql` - fragment BulkStockErrorFragment on BulkStockError { + fragment BulkStockError on BulkStockError { code field index @@ -127,7 +125,7 @@ export const bulkStockErrorFragment = gql` } `; export const stockErrorFragment = gql` - fragment StockErrorFragment on StockError { + fragment StockError on StockError { code field message @@ -135,7 +133,7 @@ export const stockErrorFragment = gql` `; export const shippingChannelsErrorFragment = gql` - fragment ShippingChannelsErrorFragment on ShippingError { + fragment ShippingChannelsError on ShippingError { code field channels @@ -144,7 +142,7 @@ export const shippingChannelsErrorFragment = gql` `; export const shippingErrorFragment = gql` - fragment ShippingErrorFragment on ShippingError { + fragment ShippingError on ShippingError { code field message @@ -152,7 +150,7 @@ export const shippingErrorFragment = gql` `; export const shopErrorFragment = gql` - fragment ShopErrorFragment on ShopError { + fragment ShopError on ShopError { code field message @@ -160,7 +158,7 @@ export const shopErrorFragment = gql` `; export const staffErrorFragment = gql` - fragment StaffErrorFragment on StaffError { + fragment StaffError on StaffError { code field message @@ -168,7 +166,7 @@ export const staffErrorFragment = gql` `; export const warehouseErrorFragment = gql` - fragment WarehouseErrorFragment on WarehouseError { + fragment WarehouseError on WarehouseError { code field message @@ -176,7 +174,7 @@ export const warehouseErrorFragment = gql` `; export const webhookErrorFragment = gql` - fragment WebhookErrorFragment on WebhookError { + fragment WebhookError on WebhookError { code field message @@ -184,7 +182,7 @@ export const webhookErrorFragment = gql` `; export const invoiceErrorFragment = gql` - fragment InvoiceErrorFragment on InvoiceError { + fragment InvoiceError on InvoiceError { code field message @@ -192,7 +190,7 @@ export const invoiceErrorFragment = gql` `; export const appErrorFragment = gql` - fragment AppErrorFragment on AppError { + fragment AppError on AppError { field message code @@ -201,7 +199,7 @@ export const appErrorFragment = gql` `; export const exportErrorFragment = gql` - fragment ExportErrorFragment on ExportError { + fragment ExportError on ExportError { code field message @@ -209,7 +207,7 @@ export const exportErrorFragment = gql` `; export const pluginErrorFragment = gql` - fragment PluginErrorFragment on PluginError { + fragment PluginError on PluginError { code field message @@ -217,7 +215,7 @@ export const pluginErrorFragment = gql` `; export const metadataErrorFragment = gql` - fragment MetadataErrorFragment on MetadataError { + fragment MetadataError on MetadataError { code field message @@ -225,7 +223,7 @@ export const metadataErrorFragment = gql` `; export const collectionsErrorFragment = gql` - fragment CollectionErrorFragment on CollectionError { + fragment CollectionError on CollectionError { code field message @@ -233,7 +231,7 @@ export const collectionsErrorFragment = gql` `; export const uploadErrorFragment = gql` - fragment UploadErrorFragment on UploadError { + fragment UploadError on UploadError { code field message @@ -249,7 +247,7 @@ export const giftCardErrorFragment = gql` `; export const giftCardSettingsErrorFragment = gql` - fragment GiftCardSettingsErrorFragment on GiftCardSettingsError { + fragment GiftCardSettingsError on GiftCardSettingsError { code field message @@ -321,7 +319,7 @@ export const pageTypeBulkDeleteErrorFragment = gql` `; export const productVariantStocksDeleteErrorFragment = gql` - fragment ProductVariantStocksDeleteErrorFragment on StockError { + fragment ProductVariantStocksDeleteError on StockError { code field message diff --git a/src/fragments/file.ts b/src/fragments/file.ts index 309b8c5bc..d5bf87518 100644 --- a/src/fragments/file.ts +++ b/src/fragments/file.ts @@ -1,7 +1,7 @@ import { gql } from "@apollo/client"; export const fileFragment = gql` - fragment FileFragment on File { + fragment File on File { url contentType } diff --git a/src/fragments/giftCards.ts b/src/fragments/giftCards.ts index 941b1c481..c7c4502ef 100644 --- a/src/fragments/giftCards.ts +++ b/src/fragments/giftCards.ts @@ -1,7 +1,7 @@ import { gql } from "@apollo/client"; export const fragmentGiftCardsSettings = gql` - fragment GiftCardsSettingsFragment on GiftCardSettings { + fragment GiftCardsSettings on GiftCardSettings { expiryType expiryPeriod { type @@ -9,3 +9,95 @@ export const fragmentGiftCardsSettings = gql` } } `; + +export const giftCardEventsFragment = gql` + fragment GiftCardEvent on GiftCardEvent { + expiryDate + oldExpiryDate + id + date + type + user { + ...UserBase + email + } + app { + id + name + } + message + email + orderId + orderNumber + tags + oldTags + balance { + initialBalance { + ...Money + } + currentBalance { + ...Money + } + oldInitialBalance { + ...Money + } + oldCurrentBalance { + ...Money + } + } + } +`; + +export const giftCardDataFragment = gql` + fragment GiftCardData on GiftCard { + ...Metadata + last4CodeChars + boughtInChannel + createdBy { + ...UserBase + } + product { + id + name + } + createdBy { + ...UserBase + } + usedBy { + ...UserBase + } + usedByEmail + createdByEmail + app { + id + name + } + created + expiryDate + lastUsedOn + isActive + initialBalance { + ...Money + } + currentBalance { + ...Money + } + + id + tags { + name + } + } +`; + +export const customerGiftCardFragment = gql` + fragment CustomerGiftCard on GiftCard { + id + last4CodeChars + expiryDate + isActive + currentBalance { + ...Money + } + } +`; diff --git a/src/fragments/metadata.ts b/src/fragments/metadata.ts index 4b1fa1245..0752ff931 100644 --- a/src/fragments/metadata.ts +++ b/src/fragments/metadata.ts @@ -5,7 +5,7 @@ export const metadataFragment = gql` key value } - fragment MetadataFragment on ObjectWithMetadata { + fragment Metadata on ObjectWithMetadata { metadata { ...MetadataItem } diff --git a/src/fragments/navigation.ts b/src/fragments/navigation.ts index e9641843f..8abaa7314 100644 --- a/src/fragments/navigation.ts +++ b/src/fragments/navigation.ts @@ -1,7 +1,7 @@ import { gql } from "@apollo/client"; export const menuFragment = gql` - fragment MenuFragment on Menu { + fragment Menu on Menu { id name items { @@ -11,7 +11,7 @@ export const menuFragment = gql` `; export const menuItemFragment = gql` - fragment MenuItemFragment on MenuItem { + fragment MenuItem on MenuItem { category { id name @@ -33,21 +33,20 @@ export const menuItemFragment = gql` // GraphQL does not support recurive fragments export const menuItemNestedFragment = gql` - ${menuItemFragment} - fragment MenuItemNestedFragment on MenuItem { - ...MenuItemFragment + fragment MenuItemNested on MenuItem { + ...MenuItem children { - ...MenuItemFragment + ...MenuItem children { - ...MenuItemFragment + ...MenuItem children { - ...MenuItemFragment + ...MenuItem children { - ...MenuItemFragment + ...MenuItem children { - ...MenuItemFragment + ...MenuItem children { - ...MenuItemFragment + ...MenuItem } } } @@ -58,11 +57,10 @@ export const menuItemNestedFragment = gql` `; export const menuDetailsFragment = gql` - ${menuItemNestedFragment} - fragment MenuDetailsFragment on Menu { + fragment MenuDetails on Menu { id items { - ...MenuItemNestedFragment + ...MenuItemNested } name } diff --git a/src/fragments/orders.ts b/src/fragments/orders.ts index 906618d2c..b8434e62e 100644 --- a/src/fragments/orders.ts +++ b/src/fragments/orders.ts @@ -1,11 +1,7 @@ import { gql } from "@apollo/client"; -import { fragmentAddress } from "./address"; -import { metadataFragment } from "./metadata"; -import { fragmentMoney } from "./products"; - export const fragmentOrderEvent = gql` - fragment OrderEventFragment on OrderEvent { + fragment OrderEvent on OrderEvent { id amount shippingCostsIncluded @@ -75,7 +71,7 @@ export const fragmentOrderEvent = gql` `; export const fragmentOrderLine = gql` - fragment OrderLineFragment on OrderLine { + fragment OrderLine on OrderLine { id isShippingRequired variant { @@ -125,7 +121,7 @@ export const fragmentOrderLine = gql` `; export const fragmentRefundOrderLine = gql` - fragment RefundOrderLineFragment on OrderLine { + fragment RefundOrderLine on OrderLine { id productName quantity @@ -141,14 +137,13 @@ export const fragmentRefundOrderLine = gql` `; export const fulfillmentFragment = gql` - ${fragmentOrderLine} - fragment FulfillmentFragment on Fulfillment { + fragment Fulfillment on Fulfillment { id lines { id quantity orderLine { - ...OrderLineFragment + ...OrderLine } } fulfillmentOrder @@ -162,7 +157,7 @@ export const fulfillmentFragment = gql` `; export const invoiceFragment = gql` - fragment InvoiceFragment on Invoice { + fragment Invoice on Invoice { id number createdAt @@ -172,19 +167,12 @@ export const invoiceFragment = gql` `; export const fragmentOrderDetails = gql` - ${fragmentAddress} - ${fragmentOrderEvent} - ${fragmentOrderLine} - ${fulfillmentFragment} - ${invoiceFragment} - ${metadataFragment} - ${fragmentMoney} - fragment OrderDetailsFragment on Order { + fragment OrderDetails on Order { id token - ...MetadataFragment + ...Metadata billingAddress { - ...AddressFragment + ...Address } giftCards { events { @@ -222,19 +210,19 @@ export const fragmentOrderDetails = gql` } } events { - ...OrderEventFragment + ...OrderEvent } fulfillments { - ...FulfillmentFragment + ...Fulfillment } lines { - ...OrderLineFragment + ...OrderLine } number isPaid paymentStatus shippingAddress { - ...AddressFragment + ...Address } deliveryMethod { __typename @@ -307,7 +295,7 @@ export const fragmentOrderDetails = gql` message } invoices { - ...InvoiceFragment + ...Invoice } channel { isActive @@ -324,14 +312,14 @@ export const fragmentOrderDetails = gql` `; export const fragmentOrderSettings = gql` - fragment OrderSettingsFragment on OrderSettings { + fragment OrderSettings on OrderSettings { automaticallyConfirmAllNewOrders automaticallyFulfillNonShippableGiftCard } `; export const fragmentShopOrderSettings = gql` - fragment ShopOrderSettingsFragment on Shop { + fragment ShopOrderSettings on Shop { fulfillmentAutoApprove fulfillmentAllowUnpaid } diff --git a/src/fragments/pageInfo.ts b/src/fragments/pageInfo.ts index 105b1d338..ac721a93d 100644 --- a/src/fragments/pageInfo.ts +++ b/src/fragments/pageInfo.ts @@ -1,7 +1,7 @@ import { gql } from "@apollo/client"; export const pageInfoFragment = gql` - fragment PageInfoFragment on PageInfo { + fragment PageInfo on PageInfo { endCursor hasNextPage hasPreviousPage diff --git a/src/fragments/pageTypes.ts b/src/fragments/pageTypes.ts index 55de56f98..066a54c59 100644 --- a/src/fragments/pageTypes.ts +++ b/src/fragments/pageTypes.ts @@ -1,24 +1,19 @@ import { gql } from "@apollo/client"; -import { attributeFragment } from "./attributes"; -import { metadataFragment } from "./metadata"; - export const pageTypeFragment = gql` - fragment PageTypeFragment on PageType { + fragment PageType on PageType { id name + hasPages } `; export const pageTypeDetailsFragment = gql` - ${attributeFragment} - ${pageTypeFragment} - ${metadataFragment} - fragment PageTypeDetailsFragment on PageType { - ...PageTypeFragment - ...MetadataFragment + fragment PageTypeDetails on PageType { + ...PageType + ...Metadata attributes { - ...AttributeFragment + ...Attribute } } `; diff --git a/src/fragments/pages.ts b/src/fragments/pages.ts index b9d11f8d4..bbc23830b 100644 --- a/src/fragments/pages.ts +++ b/src/fragments/pages.ts @@ -1,13 +1,7 @@ import { gql } from "@apollo/client"; -import { - attributeValueDetailsFragment, - attributeValueListFragment -} from "./attributes"; -import { metadataFragment } from "./metadata"; - export const pageFragment = gql` - fragment PageFragment on Page { + fragment Page on Page { id title slug @@ -15,31 +9,35 @@ export const pageFragment = gql` } `; +export const pageSelectedAttribute = gql` + fragment PageSelectedAttribute on SelectedAttribute { + attribute { + id + slug + name + inputType + entityType + valueRequired + unit + choices( + first: $firstValues + after: $afterValues + last: $lastValues + before: $beforeValues + ) { + ...AttributeValueList + } + } + values { + ...AttributeValueDetails + } + } +`; + export const pageAttributesFragment = gql` - ${attributeValueDetailsFragment} - ${attributeValueListFragment} - fragment PageAttributesFragment on Page { + fragment PageAttributes on Page { attributes { - attribute { - id - slug - name - inputType - entityType - valueRequired - unit - choices( - first: $firstValues - after: $afterValues - last: $lastValues - before: $beforeValues - ) { - ...AttributeValueListFragment - } - } - values { - ...AttributeValueDetailsFragment - } + ...PageSelectedAttribute } pageType { id @@ -56,7 +54,7 @@ export const pageAttributesFragment = gql` last: $lastValues before: $beforeValues ) { - ...AttributeValueListFragment + ...AttributeValueList } } } @@ -64,13 +62,10 @@ export const pageAttributesFragment = gql` `; export const pageDetailsFragment = gql` - ${pageFragment} - ${pageAttributesFragment} - ${metadataFragment} - fragment PageDetailsFragment on Page { - ...PageFragment - ...PageAttributesFragment - ...MetadataFragment + fragment PageDetails on Page { + ...Page + ...PageAttributes + ...Metadata content seoTitle seoDescription diff --git a/src/fragments/permissionGroups.ts b/src/fragments/permissionGroups.ts index 104d8575f..1eac0b406 100644 --- a/src/fragments/permissionGroups.ts +++ b/src/fragments/permissionGroups.ts @@ -1,9 +1,7 @@ import { gql } from "@apollo/client"; -import { staffMemberFragment } from "./staff"; - export const permissionGroupFragment = gql` - fragment PermissionGroupFragment on Group { + fragment PermissionGroup on Group { id name userCanManage @@ -16,26 +14,29 @@ export const permissionGroupFragment = gql` `; export const permissionFragment = gql` - fragment PermissionFragment on Permission { + fragment Permission on Permission { code name } `; -export const permissionGroupDetailsFragment = gql` - ${permissionGroupFragment} - ${permissionFragment} - ${staffMemberFragment} - fragment PermissionGroupDetailsFragment on Group { - ...PermissionGroupFragment - permissions { - ...PermissionFragment - } - users { - ...StaffMemberFragment - avatar(size: 48) { - url - } +export const permissionGroupMember = gql` + fragment PermissionGroupMember on User { + ...StaffMember + avatar(size: 48) { + url + } + } +`; + +export const permissionGroupDetailsFragment = gql` + fragment PermissionGroupDetails on Group { + ...PermissionGroup + permissions { + ...Permission + } + users { + ...PermissionGroupMember } } `; diff --git a/src/fragments/plugins.ts b/src/fragments/plugins.ts index 05f3ccca5..c8a7ebeb8 100644 --- a/src/fragments/plugins.ts +++ b/src/fragments/plugins.ts @@ -1,7 +1,7 @@ import { gql } from "@apollo/client"; export const configurationItemFragment = gql` - fragment ConfigurationItemFragment on ConfigurationItem { + fragment ConfigurationItem on ConfigurationItem { name value type @@ -11,7 +11,7 @@ export const configurationItemFragment = gql` `; export const pluginConfigurationBaseFragment = gql` - fragment PluginConfigurationBaseFragment on PluginConfiguration { + fragment PluginConfigurationBase on PluginConfiguration { active channel { id @@ -22,42 +22,38 @@ export const pluginConfigurationBaseFragment = gql` `; export const pluginConfigurationExtendedFragment = gql` - ${configurationItemFragment} - ${pluginConfigurationBaseFragment} - fragment PluginConfigurationExtendedFragment on PluginConfiguration { - ...PluginConfigurationBaseFragment + fragment PluginConfigurationExtended on PluginConfiguration { + ...PluginConfigurationBase configuration { - ...ConfigurationItemFragment + ...ConfigurationItem } } `; export const pluginBaseFragment = gql` - ${pluginConfigurationBaseFragment} - fragment PluginBaseFragment on Plugin { + fragment PluginBase on Plugin { id name description channelConfigurations { - ...PluginConfigurationBaseFragment + ...PluginConfigurationBase } globalConfiguration { - ...PluginConfigurationBaseFragment + ...PluginConfigurationBase } } `; export const pluginsDetailsFragment = gql` - ${pluginConfigurationExtendedFragment} - fragment PluginsDetailsFragment on Plugin { + fragment PluginsDetails on Plugin { id name description globalConfiguration { - ...PluginConfigurationExtendedFragment + ...PluginConfigurationExtended } channelConfigurations { - ...PluginConfigurationExtendedFragment + ...PluginConfigurationExtended } } `; diff --git a/src/fragments/productTypes.ts b/src/fragments/productTypes.ts index c73428bbc..e56d1575f 100644 --- a/src/fragments/productTypes.ts +++ b/src/fragments/productTypes.ts @@ -1,10 +1,7 @@ import { gql } from "@apollo/client"; -import { attributeFragment } from "./attributes"; -import { metadataFragment } from "./metadata"; - export const productTypeFragment = gql` - fragment ProductTypeFragment on ProductType { + fragment ProductType on ProductType { id name kind @@ -18,21 +15,18 @@ export const productTypeFragment = gql` `; export const productTypeDetailsFragment = gql` - ${attributeFragment} - ${productTypeFragment} - ${metadataFragment} - fragment ProductTypeDetailsFragment on ProductType { - ...ProductTypeFragment - ...MetadataFragment + fragment ProductTypeDetails on ProductType { + ...ProductType + ...Metadata productAttributes { - ...AttributeFragment + ...Attribute } variantAttributes { - ...AttributeFragment + ...Attribute } assignedVariantAttributes { attribute { - ...AttributeFragment + ...Attribute } variantSelection } diff --git a/src/fragments/products.ts b/src/fragments/products.ts index a570d094d..4b719f70b 100644 --- a/src/fragments/products.ts +++ b/src/fragments/products.ts @@ -1,15 +1,7 @@ import { gql } from "@apollo/client"; -import { - attributeValueDetailsFragment, - attributeValueListFragment -} from "./attributes"; -import { metadataFragment } from "./metadata"; -import { taxTypeFragment } from "./taxes"; -import { weightFragment } from "./weight"; - export const stockFragment = gql` - fragment StockFragment on Stock { + fragment Stock on Stock { id quantity quantityAllocated @@ -28,7 +20,7 @@ export const fragmentMoney = gql` `; export const fragmentPreorder = gql` - fragment PreorderFragment on PreorderData { + fragment Preorder on PreorderData { globalThreshold globalSoldUnits endDate @@ -36,8 +28,7 @@ export const fragmentPreorder = gql` `; export const priceRangeFragment = gql` - ${fragmentMoney} - fragment PriceRangeFragment on TaxedMoneyRange { + fragment PriceRange on TaxedMoneyRange { start { net { ...Money @@ -52,7 +43,7 @@ export const priceRangeFragment = gql` `; export const fragmentProductMedia = gql` - fragment ProductMediaFragment on ProductMedia { + fragment ProductMedia on ProductMedia { id alt sortOrder @@ -63,7 +54,7 @@ export const fragmentProductMedia = gql` `; export const channelListingProductWithoutPricingFragment = gql` - fragment ChannelListingProductWithoutPricingFragment on ProductChannelListing { + fragment ChannelListingProductWithoutPricing on ProductChannelListing { isPublished publicationDate isAvailableForPurchase @@ -76,10 +67,19 @@ export const channelListingProductWithoutPricingFragment = gql` } } `; +export const channelListingProductFragment = gql` + fragment ChannelListingProduct on ProductChannelListing { + ...ChannelListingProductWithoutPricing + pricing { + priceRange { + ...PriceRange + } + } + } +`; export const channelListingProductVariantFragment = gql` - ${fragmentMoney} - fragment ChannelListingProductVariantFragment on ProductVariantChannelListing { + fragment ChannelListingProductVariant on ProductVariantChannelListing { channel { id name @@ -99,9 +99,7 @@ export const channelListingProductVariantFragment = gql` `; export const productFragment = gql` - ${channelListingProductWithoutPricingFragment} - ${priceRangeFragment} - fragment ProductFragment on Product { + fragment ProductWithChannelListings on Product { id name thumbnail { @@ -113,10 +111,10 @@ export const productFragment = gql` hasVariants } channelListings { - ...ChannelListingProductWithoutPricingFragment + ...ChannelListingProductWithoutPricing pricing @include(if: $hasChannel) { priceRange { - ...PriceRangeFragment + ...PriceRange } } } @@ -124,9 +122,7 @@ export const productFragment = gql` `; export const productVariantAttributesFragment = gql` - ${attributeValueDetailsFragment} - ${attributeValueListFragment} - fragment ProductVariantAttributesFragment on Product { + fragment ProductVariantAttributes on Product { id attributes { attribute { @@ -143,11 +139,11 @@ export const productVariantAttributesFragment = gql` last: $lastValues before: $beforeValues ) { - ...AttributeValueListFragment + ...AttributeValueList } } values { - ...AttributeValueDetailsFragment + ...AttributeValueDetails } } productType { @@ -164,7 +160,7 @@ export const productVariantAttributesFragment = gql` last: $lastValues before: $beforeValues ) { - ...AttributeValueListFragment + ...AttributeValueList } } } @@ -178,19 +174,33 @@ export const productVariantAttributesFragment = gql` } `; +export const productDetailsVariant = gql` + fragment ProductDetailsVariant on ProductVariant { + id + sku + name + margin + media { + url(size: 200) + } + stocks { + ...Stock + } + trackInventory + preorder { + ...Preorder + } + channelListings { + ...ChannelListingProductVariant + } + quantityLimitPerCustomer + } +`; + export const productFragmentDetails = gql` - ${fragmentPreorder} - ${fragmentProductMedia} - ${productVariantAttributesFragment} - ${stockFragment} - ${weightFragment} - ${metadataFragment} - ${taxTypeFragment} - ${channelListingProductWithoutPricingFragment} - ${channelListingProductVariantFragment} fragment Product on Product { - ...ProductVariantAttributesFragment - ...MetadataFragment + ...ProductVariantAttributes + ...Metadata name slug description @@ -210,52 +220,34 @@ export const productFragmentDetails = gql` } chargeTaxes channelListings { - ...ChannelListingProductWithoutPricingFragment + ...ChannelListingProductWithoutPricing } media { - ...ProductMediaFragment + ...ProductMedia } isAvailable variants { - id - sku - name - margin - media { - url(size: 200) - } - stocks { - ...StockFragment - } - trackInventory - preorder { - ...PreorderFragment - } - channelListings { - ...ChannelListingProductVariantFragment - } - quantityLimitPerCustomer + ...ProductDetailsVariant } productType { id name hasVariants taxType { - ...TaxTypeFragment + ...TaxType } } weight { - ...WeightFragment + ...Weight } taxType { - ...TaxTypeFragment + ...TaxType } } `; export const variantAttributeFragment = gql` - ${attributeValueListFragment} - fragment VariantAttributeFragment on Attribute { + fragment VariantAttribute on Attribute { id name slug @@ -269,43 +261,33 @@ export const variantAttributeFragment = gql` last: $lastValues before: $beforeValues ) { - ...AttributeValueListFragment + ...AttributeValueList } } `; export const selectedVariantAttributeFragment = gql` - ${attributeValueDetailsFragment} - ${variantAttributeFragment} - fragment SelectedVariantAttributeFragment on SelectedAttribute { + fragment SelectedVariantAttribute on SelectedAttribute { attribute { - ...VariantAttributeFragment + ...VariantAttribute } values { - ...AttributeValueDetailsFragment + ...AttributeValueDetails } } `; export const fragmentVariant = gql` - ${fragmentPreorder} - ${fragmentProductMedia} - ${selectedVariantAttributeFragment} - ${fragmentProductMedia} - ${stockFragment} - ${weightFragment} - ${metadataFragment} - ${channelListingProductVariantFragment} fragment ProductVariant on ProductVariant { id - ...MetadataFragment + ...Metadata selectionAttributes: attributes(variantSelection: VARIANT_SELECTION) { - ...SelectedVariantAttributeFragment + ...SelectedVariantAttribute } nonSelectionAttributes: attributes( variantSelection: NOT_VARIANT_SELECTION ) { - ...SelectedVariantAttributeFragment + ...SelectedVariantAttribute } media { id @@ -320,7 +302,7 @@ export const fragmentVariant = gql` id } media { - ...ProductMediaFragment + ...ProductMedia } name thumbnail { @@ -351,25 +333,25 @@ export const fragmentVariant = gql` } } channelListings { - ...ChannelListingProductVariantFragment + ...ChannelListingProductVariant } sku stocks { - ...StockFragment + ...Stock } trackInventory preorder { - ...PreorderFragment + ...Preorder } weight { - ...WeightFragment + ...Weight } quantityLimitPerCustomer } `; export const exportFileFragment = gql` - fragment ExportFileFragment on ExportFile { + fragment ExportFile on ExportFile { id status url diff --git a/src/fragments/shipping.ts b/src/fragments/shipping.ts index 755e81f02..5fd4dff4a 100644 --- a/src/fragments/shipping.ts +++ b/src/fragments/shipping.ts @@ -1,12 +1,8 @@ import { gql } from "@apollo/client"; -import { fragmentMoney } from "@saleor/fragments/products"; - -import { metadataFragment } from "./metadata"; export const shippingZoneFragment = gql` - ${metadataFragment} - fragment ShippingZoneFragment on ShippingZone { - ...MetadataFragment + fragment ShippingZone on ShippingZone { + ...Metadata id countries { code @@ -18,7 +14,7 @@ export const shippingZoneFragment = gql` `; export const shippingMethodWithPostalCodesFragment = gql` - fragment ShippingMethodWithPostalCodesFragment on ShippingMethodType { + fragment ShippingMethodWithPostalCodes on ShippingMethodType { id postalCodeRules { id @@ -29,12 +25,9 @@ export const shippingMethodWithPostalCodesFragment = gql` } `; export const shippingMethodTypeFragment = gql` - ${metadataFragment} - ${fragmentMoney} - ${shippingMethodWithPostalCodesFragment} - fragment ShippingMethodTypeFragment on ShippingMethodType { - ...ShippingMethodWithPostalCodesFragment - ...MetadataFragment + fragment ShippingMethodType on ShippingMethodType { + ...ShippingMethodWithPostalCodes + ...Metadata minimumOrderWeight { unit value @@ -68,10 +61,8 @@ export const shippingMethodTypeFragment = gql` } `; export const shippingMethodWithExcludedProductsFragment = gql` - ${fragmentMoney} - ${shippingMethodTypeFragment} - fragment ShippingMethodWithExcludedProductsFragment on ShippingMethodType { - ...ShippingMethodTypeFragment + fragment ShippingMethodWithExcludedProducts on ShippingMethodType { + ...ShippingMethodType excludedProducts( before: $before after: $after @@ -98,12 +89,10 @@ export const shippingMethodWithExcludedProductsFragment = gql` `; export const shippingZoneDetailsFragment = gql` - ${shippingZoneFragment} - ${shippingMethodTypeFragment} - fragment ShippingZoneDetailsFragment on ShippingZone { - ...ShippingZoneFragment + fragment ShippingZoneDetails on ShippingZone { + ...ShippingZone shippingMethods { - ...ShippingMethodTypeFragment + ...ShippingMethodType } warehouses { id diff --git a/src/fragments/shop.ts b/src/fragments/shop.ts index 73f08e13f..96c2618c5 100644 --- a/src/fragments/shop.ts +++ b/src/fragments/shop.ts @@ -1,9 +1,21 @@ import { gql } from "@apollo/client"; -import { fragmentAddress } from "./address"; +export const countryFragment = gql` + fragment CountryWithCode on CountryDisplay { + country + code + } +`; + +export const languageFragment = gql` + fragment Language on LanguageDisplay { + code + language + } +`; export const limitFragment = gql` - fragment LimitInfoFragment on Limits { + fragment LimitInfo on Limits { channels @include(if: $channels) orders @include(if: $orders) productVariants @include(if: $productVariants) @@ -11,23 +23,22 @@ export const limitFragment = gql` warehouses @include(if: $warehouses) } - fragment ShopLimitFragment on Shop { + fragment ShopLimit on Shop { limits { currentUsage { - ...LimitInfoFragment + ...LimitInfo } allowedUsage { - ...LimitInfoFragment + ...LimitInfo } } } `; export const shopFragment = gql` - ${fragmentAddress} - fragment ShopFragment on Shop { + fragment Shop on Shop { companyAddress { - ...AddressFragment + ...Address } countries { code diff --git a/src/fragments/staff.ts b/src/fragments/staff.ts index 96c5e7aff..caa93a3c5 100644 --- a/src/fragments/staff.ts +++ b/src/fragments/staff.ts @@ -1,7 +1,7 @@ import { gql } from "@apollo/client"; export const staffMemberFragment = gql` - fragment StaffMemberFragment on User { + fragment StaffMember on User { id email firstName @@ -10,9 +10,8 @@ export const staffMemberFragment = gql` } `; export const staffMemberDetailsFragment = gql` - ${staffMemberFragment} - fragment StaffMemberDetailsFragment on User { - ...StaffMemberFragment + fragment StaffMemberDetails on User { + ...StaffMember permissionGroups { id name diff --git a/src/fragments/taxes.ts b/src/fragments/taxes.ts index e841c3591..285b59e2e 100644 --- a/src/fragments/taxes.ts +++ b/src/fragments/taxes.ts @@ -1,15 +1,24 @@ import { gql } from "@apollo/client"; +export const taxedMoneyFragment = gql` + fragment TaxedMoney on TaxedMoney { + net { + ...Money + } + gross { + ...Money + } + } +`; export const countryFragment = gql` - fragment CountryFragment on CountryDisplay { + fragment Country on CountryDisplay { country code } `; export const countryWithTaxesFragment = gql` - ${countryFragment} - fragment CountryWithTaxesFragment on CountryDisplay { - ...CountryFragment + fragment CountryWithTaxes on CountryDisplay { + ...Country vat { standardRate reducedRates { @@ -20,14 +29,14 @@ export const countryWithTaxesFragment = gql` } `; export const shopTaxesFragment = gql` - fragment ShopTaxesFragment on Shop { + fragment ShopTaxes on Shop { chargeTaxesOnShipping includeTaxesInPrices displayGrossPrices } `; export const taxTypeFragment = gql` - fragment TaxTypeFragment on TaxType { + fragment TaxType on TaxType { description taxCode } diff --git a/src/fragments/translations.ts b/src/fragments/translations.ts index 7e96392b9..c3104e37b 100644 --- a/src/fragments/translations.ts +++ b/src/fragments/translations.ts @@ -1,9 +1,7 @@ import { gql } from "@apollo/client"; -import { pageInfoFragment } from "./pageInfo"; - export const categoryTranslationFragment = gql` - fragment CategoryTranslationFragment on CategoryTranslatableContent { + fragment CategoryTranslation on CategoryTranslatableContent { translation(languageCode: $language) { id description @@ -24,7 +22,7 @@ export const categoryTranslationFragment = gql` } `; export const collectionTranslationFragment = gql` - fragment CollectionTranslationFragment on CollectionTranslatableContent { + fragment CollectionTranslation on CollectionTranslatableContent { collection { id name @@ -46,7 +44,7 @@ export const collectionTranslationFragment = gql` `; export const productTranslationFragment = gql` - fragment ProductTranslationFragment on ProductTranslatableContent { + fragment ProductTranslation on ProductTranslatableContent { product { id name @@ -86,7 +84,7 @@ export const productTranslationFragment = gql` `; export const productVariantTranslationFragment = gql` - fragment ProductVariantTranslationFragment on ProductVariantTranslatableContent { + fragment ProductVariantTranslation on ProductVariantTranslatableContent { productVariant { id } @@ -120,7 +118,7 @@ export const productVariantTranslationFragment = gql` `; export const saleTranslationFragment = gql` - fragment SaleTranslationFragment on SaleTranslatableContent { + fragment SaleTranslation on SaleTranslatableContent { sale { id name @@ -136,7 +134,7 @@ export const saleTranslationFragment = gql` } `; export const voucherTranslationFragment = gql` - fragment VoucherTranslationFragment on VoucherTranslatableContent { + fragment VoucherTranslation on VoucherTranslatableContent { name voucher { id @@ -153,7 +151,7 @@ export const voucherTranslationFragment = gql` } `; export const shippingMethodTranslationFragment = gql` - fragment ShippingMethodTranslationFragment on ShippingMethodTranslatableContent { + fragment ShippingMethodTranslation on ShippingMethodTranslatableContent { id name description @@ -173,7 +171,7 @@ export const shippingMethodTranslationFragment = gql` `; export const pageTranslationFragment = gql` - fragment PageTranslationFragment on PageTranslatableContent { + fragment PageTranslation on PageTranslatableContent { page { id content @@ -212,7 +210,7 @@ export const pageTranslationFragment = gql` } `; export const pageTranslatableFragment = gql` - fragment PageTranslatableFragment on PageTranslatableContent { + fragment PageTranslatable on PageTranslatableContent { id content seoDescription @@ -233,10 +231,9 @@ export const pageTranslatableFragment = gql` `; export const attributeChoicesTranslationFragment = gql` - ${pageInfoFragment} - fragment AttributeChoicesTranslationFragment on AttributeValueCountableConnection { + fragment AttributeChoicesTranslation on AttributeValueCountableConnection { pageInfo { - ...PageInfoFragment + ...PageInfo } edges { cursor @@ -256,7 +253,7 @@ export const attributeChoicesTranslationFragment = gql` `; export const attributeTranslationFragment = gql` - fragment AttributeTranslationFragment on AttributeTranslatableContent { + fragment AttributeTranslation on AttributeTranslatableContent { id name translation(languageCode: $language) { @@ -272,8 +269,7 @@ export const attributeTranslationFragment = gql` `; export const attributeTranslationDetailsFragment = gql` - ${attributeChoicesTranslationFragment} - fragment AttributeTranslationDetailsFragment on AttributeTranslatableContent { + fragment AttributeTranslationDetails on AttributeTranslatableContent { translation(languageCode: $language) { id name @@ -289,15 +285,14 @@ export const attributeTranslationDetailsFragment = gql` last: $lastValues before: $beforeValues ) { - ...AttributeChoicesTranslationFragment + ...AttributeChoicesTranslation } } } `; export const attributeValueTranslatableContentFragment = gql` - ${attributeChoicesTranslationFragment} - fragment AttributeValueTranslatableContentFragment on AttributeTranslatableContent { + fragment AttributeValueTranslatableContent on AttributeTranslatableContent { translation(languageCode: $language) { id name @@ -312,7 +307,7 @@ export const attributeValueTranslatableContentFragment = gql` last: $lastValues before: $beforeValues ) { - ...AttributeChoicesTranslationFragment + ...AttributeChoicesTranslation } } } diff --git a/src/fragments/types/AccountErrorFragment.ts b/src/fragments/types/AccountErrorFragment.ts deleted file mode 100644 index 4539934c4..000000000 --- a/src/fragments/types/AccountErrorFragment.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AccountErrorCode, AddressTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: AccountErrorFragment -// ==================================================== - -export interface AccountErrorFragment { - __typename: "AccountError"; - code: AccountErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} diff --git a/src/fragments/types/AddressFragment.ts b/src/fragments/types/AddressFragment.ts deleted file mode 100644 index 5014ba263..000000000 --- a/src/fragments/types/AddressFragment.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: AddressFragment -// ==================================================== - -export interface AddressFragment_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface AddressFragment { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: AddressFragment_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} diff --git a/src/fragments/types/AppErrorFragment.ts b/src/fragments/types/AppErrorFragment.ts deleted file mode 100644 index 8e17cbc60..000000000 --- a/src/fragments/types/AppErrorFragment.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AppErrorCode, PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: AppErrorFragment -// ==================================================== - -export interface AppErrorFragment { - __typename: "AppError"; - field: string | null; - message: string | null; - code: AppErrorCode; - permissions: PermissionEnum[] | null; -} diff --git a/src/fragments/types/AppFragment.ts b/src/fragments/types/AppFragment.ts deleted file mode 100644 index 4c2ab15c1..000000000 --- a/src/fragments/types/AppFragment.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AppTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: AppFragment -// ==================================================== - -export interface AppFragment_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface AppFragment_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface AppFragment_tokens { - __typename: "AppToken"; - authToken: string | null; - id: string; - name: string | null; -} - -export interface AppFragment_webhooks_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface AppFragment_webhooks { - __typename: "Webhook"; - id: string; - name: string; - isActive: boolean; - app: AppFragment_webhooks_app; -} - -export interface AppFragment { - __typename: "App"; - id: string; - name: string | null; - created: any | null; - isActive: boolean | null; - type: AppTypeEnum | null; - homepageUrl: string | null; - appUrl: string | null; - configurationUrl: string | null; - supportUrl: string | null; - version: string | null; - accessToken: string | null; - privateMetadata: (AppFragment_privateMetadata | null)[]; - metadata: (AppFragment_metadata | null)[]; - tokens: (AppFragment_tokens | null)[] | null; - webhooks: (AppFragment_webhooks | null)[] | null; -} diff --git a/src/fragments/types/AttributeChoicesTranslationFragment.ts b/src/fragments/types/AttributeChoicesTranslationFragment.ts deleted file mode 100644 index ccef5fbb1..000000000 --- a/src/fragments/types/AttributeChoicesTranslationFragment.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: AttributeChoicesTranslationFragment -// ==================================================== - -export interface AttributeChoicesTranslationFragment_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface AttributeChoicesTranslationFragment_edges_node_translation { - __typename: "AttributeValueTranslation"; - id: string; - name: string; - richText: any | null; -} - -export interface AttributeChoicesTranslationFragment_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - richText: any | null; - inputType: AttributeInputTypeEnum | null; - translation: AttributeChoicesTranslationFragment_edges_node_translation | null; -} - -export interface AttributeChoicesTranslationFragment_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: AttributeChoicesTranslationFragment_edges_node; -} - -export interface AttributeChoicesTranslationFragment { - __typename: "AttributeValueCountableConnection"; - pageInfo: AttributeChoicesTranslationFragment_pageInfo; - edges: AttributeChoicesTranslationFragment_edges[]; -} diff --git a/src/fragments/types/AttributeDetailsFragment.ts b/src/fragments/types/AttributeDetailsFragment.ts deleted file mode 100644 index 552af80ac..000000000 --- a/src/fragments/types/AttributeDetailsFragment.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeTypeEnum, MeasurementUnitsEnum, AttributeInputTypeEnum, AttributeEntityTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: AttributeDetailsFragment -// ==================================================== - -export interface AttributeDetailsFragment_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface AttributeDetailsFragment_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface AttributeDetailsFragment { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; - metadata: (AttributeDetailsFragment_metadata | null)[]; - privateMetadata: (AttributeDetailsFragment_privateMetadata | null)[]; - availableInGrid: boolean; - entityType: AttributeEntityTypeEnum | null; - storefrontSearchPosition: number; - valueRequired: boolean; -} diff --git a/src/fragments/types/AttributeErrorFragment.ts b/src/fragments/types/AttributeErrorFragment.ts deleted file mode 100644 index 6e645a96d..000000000 --- a/src/fragments/types/AttributeErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: AttributeErrorFragment -// ==================================================== - -export interface AttributeErrorFragment { - __typename: "AttributeError"; - code: AttributeErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/AttributeFragment.ts b/src/fragments/types/AttributeFragment.ts deleted file mode 100644 index 8e34a9dad..000000000 --- a/src/fragments/types/AttributeFragment.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeTypeEnum, MeasurementUnitsEnum, AttributeInputTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: AttributeFragment -// ==================================================== - -export interface AttributeFragment { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} diff --git a/src/fragments/types/AttributeTranslateErrorFragment.ts b/src/fragments/types/AttributeTranslateErrorFragment.ts deleted file mode 100644 index 1ca1cccfd..000000000 --- a/src/fragments/types/AttributeTranslateErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { TranslationErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: AttributeTranslateErrorFragment -// ==================================================== - -export interface AttributeTranslateErrorFragment { - __typename: "TranslationError"; - code: TranslationErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/AttributeTranslationDetailsFragment.ts b/src/fragments/types/AttributeTranslationDetailsFragment.ts deleted file mode 100644 index 4a560a186..000000000 --- a/src/fragments/types/AttributeTranslationDetailsFragment.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: AttributeTranslationDetailsFragment -// ==================================================== - -export interface AttributeTranslationDetailsFragment_translation { - __typename: "AttributeTranslation"; - id: string; - name: string; -} - -export interface AttributeTranslationDetailsFragment_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface AttributeTranslationDetailsFragment_attribute_choices_edges_node_translation { - __typename: "AttributeValueTranslation"; - id: string; - name: string; - richText: any | null; -} - -export interface AttributeTranslationDetailsFragment_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - richText: any | null; - inputType: AttributeInputTypeEnum | null; - translation: AttributeTranslationDetailsFragment_attribute_choices_edges_node_translation | null; -} - -export interface AttributeTranslationDetailsFragment_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: AttributeTranslationDetailsFragment_attribute_choices_edges_node; -} - -export interface AttributeTranslationDetailsFragment_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: AttributeTranslationDetailsFragment_attribute_choices_pageInfo; - edges: AttributeTranslationDetailsFragment_attribute_choices_edges[]; -} - -export interface AttributeTranslationDetailsFragment_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - inputType: AttributeInputTypeEnum | null; - withChoices: boolean; - choices: AttributeTranslationDetailsFragment_attribute_choices | null; -} - -export interface AttributeTranslationDetailsFragment { - __typename: "AttributeTranslatableContent"; - translation: AttributeTranslationDetailsFragment_translation | null; - attribute: AttributeTranslationDetailsFragment_attribute | null; -} diff --git a/src/fragments/types/AttributeTranslationFragment.ts b/src/fragments/types/AttributeTranslationFragment.ts deleted file mode 100644 index b1b5b2dd2..000000000 --- a/src/fragments/types/AttributeTranslationFragment.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: AttributeTranslationFragment -// ==================================================== - -export interface AttributeTranslationFragment_translation { - __typename: "AttributeTranslation"; - id: string; - name: string; -} - -export interface AttributeTranslationFragment_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface AttributeTranslationFragment { - __typename: "AttributeTranslatableContent"; - id: string; - name: string; - translation: AttributeTranslationFragment_translation | null; - attribute: AttributeTranslationFragment_attribute | null; -} diff --git a/src/fragments/types/AttributeValueDetailsFragment.ts b/src/fragments/types/AttributeValueDetailsFragment.ts deleted file mode 100644 index ef47408ac..000000000 --- a/src/fragments/types/AttributeValueDetailsFragment.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: AttributeValueDetailsFragment -// ==================================================== - -export interface AttributeValueDetailsFragment_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface AttributeValueDetailsFragment { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: AttributeValueDetailsFragment_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} diff --git a/src/fragments/types/AttributeValueFragment.ts b/src/fragments/types/AttributeValueFragment.ts deleted file mode 100644 index 7fa8a1812..000000000 --- a/src/fragments/types/AttributeValueFragment.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: AttributeValueFragment -// ==================================================== - -export interface AttributeValueFragment_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface AttributeValueFragment { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: AttributeValueFragment_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; -} diff --git a/src/fragments/types/AttributeValueListFragment.ts b/src/fragments/types/AttributeValueListFragment.ts deleted file mode 100644 index c6be162d1..000000000 --- a/src/fragments/types/AttributeValueListFragment.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: AttributeValueListFragment -// ==================================================== - -export interface AttributeValueListFragment_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface AttributeValueListFragment_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface AttributeValueListFragment_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: AttributeValueListFragment_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface AttributeValueListFragment_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: AttributeValueListFragment_edges_node; -} - -export interface AttributeValueListFragment { - __typename: "AttributeValueCountableConnection"; - pageInfo: AttributeValueListFragment_pageInfo; - edges: AttributeValueListFragment_edges[]; -} diff --git a/src/fragments/types/AttributeValueTranslatableContentFragment.ts b/src/fragments/types/AttributeValueTranslatableContentFragment.ts deleted file mode 100644 index 9a1b4460a..000000000 --- a/src/fragments/types/AttributeValueTranslatableContentFragment.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: AttributeValueTranslatableContentFragment -// ==================================================== - -export interface AttributeValueTranslatableContentFragment_translation { - __typename: "AttributeTranslation"; - id: string; - name: string; -} - -export interface AttributeValueTranslatableContentFragment_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface AttributeValueTranslatableContentFragment_attribute_choices_edges_node_translation { - __typename: "AttributeValueTranslation"; - id: string; - name: string; - richText: any | null; -} - -export interface AttributeValueTranslatableContentFragment_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - richText: any | null; - inputType: AttributeInputTypeEnum | null; - translation: AttributeValueTranslatableContentFragment_attribute_choices_edges_node_translation | null; -} - -export interface AttributeValueTranslatableContentFragment_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: AttributeValueTranslatableContentFragment_attribute_choices_edges_node; -} - -export interface AttributeValueTranslatableContentFragment_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: AttributeValueTranslatableContentFragment_attribute_choices_pageInfo; - edges: AttributeValueTranslatableContentFragment_attribute_choices_edges[]; -} - -export interface AttributeValueTranslatableContentFragment_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - inputType: AttributeInputTypeEnum | null; - choices: AttributeValueTranslatableContentFragment_attribute_choices | null; -} - -export interface AttributeValueTranslatableContentFragment { - __typename: "AttributeTranslatableContent"; - translation: AttributeValueTranslatableContentFragment_translation | null; - attribute: AttributeValueTranslatableContentFragment_attribute | null; -} diff --git a/src/fragments/types/AttributeValueTranslateErrorFragment.ts b/src/fragments/types/AttributeValueTranslateErrorFragment.ts deleted file mode 100644 index 3054ff7de..000000000 --- a/src/fragments/types/AttributeValueTranslateErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { TranslationErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: AttributeValueTranslateErrorFragment -// ==================================================== - -export interface AttributeValueTranslateErrorFragment { - __typename: "TranslationError"; - code: TranslationErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/AvailableAttributeFragment.ts b/src/fragments/types/AvailableAttributeFragment.ts deleted file mode 100644 index 05c7fabc8..000000000 --- a/src/fragments/types/AvailableAttributeFragment.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: AvailableAttributeFragment -// ==================================================== - -export interface AvailableAttributeFragment { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; -} diff --git a/src/fragments/types/BulkProductErrorFragment.ts b/src/fragments/types/BulkProductErrorFragment.ts deleted file mode 100644 index 8bf6a3cdd..000000000 --- a/src/fragments/types/BulkProductErrorFragment.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: BulkProductErrorFragment -// ==================================================== - -export interface BulkProductErrorFragment { - __typename: "BulkProductError"; - field: string | null; - code: ProductErrorCode; - index: number | null; - channels: string[] | null; - message: string | null; -} diff --git a/src/fragments/types/BulkStockErrorFragment.ts b/src/fragments/types/BulkStockErrorFragment.ts deleted file mode 100644 index 2245238b0..000000000 --- a/src/fragments/types/BulkStockErrorFragment.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: BulkStockErrorFragment -// ==================================================== - -export interface BulkStockErrorFragment { - __typename: "BulkStockError"; - code: ProductErrorCode; - field: string | null; - index: number | null; - message: string | null; -} diff --git a/src/fragments/types/CategoryDetailsFragment.ts b/src/fragments/types/CategoryDetailsFragment.ts deleted file mode 100644 index 4be960ef7..000000000 --- a/src/fragments/types/CategoryDetailsFragment.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: CategoryDetailsFragment -// ==================================================== - -export interface CategoryDetailsFragment_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CategoryDetailsFragment_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CategoryDetailsFragment_backgroundImage { - __typename: "Image"; - alt: string | null; - url: string; -} - -export interface CategoryDetailsFragment_parent { - __typename: "Category"; - id: string; -} - -export interface CategoryDetailsFragment { - __typename: "Category"; - id: string; - metadata: (CategoryDetailsFragment_metadata | null)[]; - privateMetadata: (CategoryDetailsFragment_privateMetadata | null)[]; - backgroundImage: CategoryDetailsFragment_backgroundImage | null; - name: string; - slug: string; - description: any | null; - seoDescription: string | null; - seoTitle: string | null; - parent: CategoryDetailsFragment_parent | null; -} diff --git a/src/fragments/types/CategoryFragment.ts b/src/fragments/types/CategoryFragment.ts deleted file mode 100644 index bf59235ea..000000000 --- a/src/fragments/types/CategoryFragment.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: CategoryFragment -// ==================================================== - -export interface CategoryFragment_children { - __typename: "CategoryCountableConnection"; - totalCount: number | null; -} - -export interface CategoryFragment_products { - __typename: "ProductCountableConnection"; - totalCount: number | null; -} - -export interface CategoryFragment { - __typename: "Category"; - id: string; - name: string; - children: CategoryFragment_children | null; - products: CategoryFragment_products | null; -} diff --git a/src/fragments/types/CategoryTranslateErrorFragment.ts b/src/fragments/types/CategoryTranslateErrorFragment.ts deleted file mode 100644 index d3776133e..000000000 --- a/src/fragments/types/CategoryTranslateErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { TranslationErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: CategoryTranslateErrorFragment -// ==================================================== - -export interface CategoryTranslateErrorFragment { - __typename: "TranslationError"; - code: TranslationErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/CategoryTranslationFragment.ts b/src/fragments/types/CategoryTranslationFragment.ts deleted file mode 100644 index def811a3a..000000000 --- a/src/fragments/types/CategoryTranslationFragment.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: CategoryTranslationFragment -// ==================================================== - -export interface CategoryTranslationFragment_translation_language { - __typename: "LanguageDisplay"; - language: string; -} - -export interface CategoryTranslationFragment_translation { - __typename: "CategoryTranslation"; - id: string; - description: any | null; - language: CategoryTranslationFragment_translation_language; - name: string | null; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface CategoryTranslationFragment_category { - __typename: "Category"; - id: string; - name: string; - description: any | null; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface CategoryTranslationFragment { - __typename: "CategoryTranslatableContent"; - translation: CategoryTranslationFragment_translation | null; - category: CategoryTranslationFragment_category | null; -} diff --git a/src/fragments/types/ChannelDetailsFragment.ts b/src/fragments/types/ChannelDetailsFragment.ts deleted file mode 100644 index bcce20b11..000000000 --- a/src/fragments/types/ChannelDetailsFragment.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: ChannelDetailsFragment -// ==================================================== - -export interface ChannelDetailsFragment_defaultCountry { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface ChannelDetailsFragment { - __typename: "Channel"; - id: string; - isActive: boolean; - name: string; - slug: string; - currencyCode: string; - defaultCountry: ChannelDetailsFragment_defaultCountry; - hasOrders: boolean; -} diff --git a/src/fragments/types/ChannelErrorFragment.ts b/src/fragments/types/ChannelErrorFragment.ts deleted file mode 100644 index b8a02a085..000000000 --- a/src/fragments/types/ChannelErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ChannelErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ChannelErrorFragment -// ==================================================== - -export interface ChannelErrorFragment { - __typename: "ChannelError"; - code: ChannelErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/ChannelFragment.ts b/src/fragments/types/ChannelFragment.ts deleted file mode 100644 index 547e50fc8..000000000 --- a/src/fragments/types/ChannelFragment.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: ChannelFragment -// ==================================================== - -export interface ChannelFragment_defaultCountry { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface ChannelFragment { - __typename: "Channel"; - id: string; - isActive: boolean; - name: string; - slug: string; - currencyCode: string; - defaultCountry: ChannelFragment_defaultCountry; -} diff --git a/src/fragments/types/ChannelListingProductVariantFragment.ts b/src/fragments/types/ChannelListingProductVariantFragment.ts deleted file mode 100644 index c98a063a1..000000000 --- a/src/fragments/types/ChannelListingProductVariantFragment.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: ChannelListingProductVariantFragment -// ==================================================== - -export interface ChannelListingProductVariantFragment_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ChannelListingProductVariantFragment_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ChannelListingProductVariantFragment_costPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ChannelListingProductVariantFragment_preorderThreshold { - __typename: "PreorderThreshold"; - quantity: number | null; - soldUnits: number; -} - -export interface ChannelListingProductVariantFragment { - __typename: "ProductVariantChannelListing"; - channel: ChannelListingProductVariantFragment_channel; - price: ChannelListingProductVariantFragment_price | null; - costPrice: ChannelListingProductVariantFragment_costPrice | null; - preorderThreshold: ChannelListingProductVariantFragment_preorderThreshold | null; -} diff --git a/src/fragments/types/ChannelListingProductWithoutPricingFragment.ts b/src/fragments/types/ChannelListingProductWithoutPricingFragment.ts deleted file mode 100644 index 9772de3b8..000000000 --- a/src/fragments/types/ChannelListingProductWithoutPricingFragment.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: ChannelListingProductWithoutPricingFragment -// ==================================================== - -export interface ChannelListingProductWithoutPricingFragment_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ChannelListingProductWithoutPricingFragment { - __typename: "ProductChannelListing"; - isPublished: boolean; - publicationDate: any | null; - isAvailableForPurchase: boolean | null; - availableForPurchase: any | null; - visibleInListings: boolean; - channel: ChannelListingProductWithoutPricingFragment_channel; -} diff --git a/src/fragments/types/CollectionChannelListingErrorFragment.ts b/src/fragments/types/CollectionChannelListingErrorFragment.ts deleted file mode 100644 index fab224f28..000000000 --- a/src/fragments/types/CollectionChannelListingErrorFragment.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: CollectionChannelListingErrorFragment -// ==================================================== - -export interface CollectionChannelListingErrorFragment { - __typename: "CollectionChannelListingError"; - code: ProductErrorCode; - field: string | null; - message: string | null; - channels: string[] | null; -} diff --git a/src/fragments/types/CollectionDetailsFragment.ts b/src/fragments/types/CollectionDetailsFragment.ts deleted file mode 100644 index c13f3979e..000000000 --- a/src/fragments/types/CollectionDetailsFragment.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: CollectionDetailsFragment -// ==================================================== - -export interface CollectionDetailsFragment_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; -} - -export interface CollectionDetailsFragment_channelListings { - __typename: "CollectionChannelListing"; - isPublished: boolean; - publicationDate: any | null; - channel: CollectionDetailsFragment_channelListings_channel; -} - -export interface CollectionDetailsFragment_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CollectionDetailsFragment_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CollectionDetailsFragment_backgroundImage { - __typename: "Image"; - alt: string | null; - url: string; -} - -export interface CollectionDetailsFragment { - __typename: "Collection"; - id: string; - name: string; - channelListings: CollectionDetailsFragment_channelListings[] | null; - metadata: (CollectionDetailsFragment_metadata | null)[]; - privateMetadata: (CollectionDetailsFragment_privateMetadata | null)[]; - backgroundImage: CollectionDetailsFragment_backgroundImage | null; - slug: string; - description: any | null; - seoDescription: string | null; - seoTitle: string | null; -} diff --git a/src/fragments/types/CollectionErrorFragment.ts b/src/fragments/types/CollectionErrorFragment.ts deleted file mode 100644 index cb86e3862..000000000 --- a/src/fragments/types/CollectionErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { CollectionErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: CollectionErrorFragment -// ==================================================== - -export interface CollectionErrorFragment { - __typename: "CollectionError"; - code: CollectionErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/CollectionFragment.ts b/src/fragments/types/CollectionFragment.ts deleted file mode 100644 index 3b862853a..000000000 --- a/src/fragments/types/CollectionFragment.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: CollectionFragment -// ==================================================== - -export interface CollectionFragment_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; -} - -export interface CollectionFragment_channelListings { - __typename: "CollectionChannelListing"; - isPublished: boolean; - publicationDate: any | null; - channel: CollectionFragment_channelListings_channel; -} - -export interface CollectionFragment { - __typename: "Collection"; - id: string; - name: string; - channelListings: CollectionFragment_channelListings[] | null; -} diff --git a/src/fragments/types/CollectionProductFragment.ts b/src/fragments/types/CollectionProductFragment.ts deleted file mode 100644 index 192e7e86c..000000000 --- a/src/fragments/types/CollectionProductFragment.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: CollectionProductFragment -// ==================================================== - -export interface CollectionProductFragment_productType { - __typename: "ProductType"; - id: string; - name: string; -} - -export interface CollectionProductFragment_thumbnail { - __typename: "Image"; - url: string; -} - -export interface CollectionProductFragment_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface CollectionProductFragment_channelListings { - __typename: "ProductChannelListing"; - isPublished: boolean; - publicationDate: any | null; - isAvailableForPurchase: boolean | null; - availableForPurchase: any | null; - visibleInListings: boolean; - channel: CollectionProductFragment_channelListings_channel; -} - -export interface CollectionProductFragment { - __typename: "Product"; - id: string; - name: string; - productType: CollectionProductFragment_productType; - thumbnail: CollectionProductFragment_thumbnail | null; - channelListings: CollectionProductFragment_channelListings[] | null; -} diff --git a/src/fragments/types/CollectionTranslateErrorFragment.ts b/src/fragments/types/CollectionTranslateErrorFragment.ts deleted file mode 100644 index 4e9128ec4..000000000 --- a/src/fragments/types/CollectionTranslateErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { TranslationErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: CollectionTranslateErrorFragment -// ==================================================== - -export interface CollectionTranslateErrorFragment { - __typename: "TranslationError"; - code: TranslationErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/CollectionTranslationFragment.ts b/src/fragments/types/CollectionTranslationFragment.ts deleted file mode 100644 index 4e88bef0f..000000000 --- a/src/fragments/types/CollectionTranslationFragment.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: CollectionTranslationFragment -// ==================================================== - -export interface CollectionTranslationFragment_collection { - __typename: "Collection"; - id: string; - name: string; - description: any | null; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface CollectionTranslationFragment_translation_language { - __typename: "LanguageDisplay"; - language: string; -} - -export interface CollectionTranslationFragment_translation { - __typename: "CollectionTranslation"; - id: string; - description: any | null; - language: CollectionTranslationFragment_translation_language; - name: string | null; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface CollectionTranslationFragment { - __typename: "CollectionTranslatableContent"; - collection: CollectionTranslationFragment_collection | null; - translation: CollectionTranslationFragment_translation | null; -} diff --git a/src/fragments/types/ConfigurationItemFragment.ts b/src/fragments/types/ConfigurationItemFragment.ts deleted file mode 100644 index 81de8d0c1..000000000 --- a/src/fragments/types/ConfigurationItemFragment.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ConfigurationTypeFieldEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ConfigurationItemFragment -// ==================================================== - -export interface ConfigurationItemFragment { - __typename: "ConfigurationItem"; - name: string; - value: string | null; - type: ConfigurationTypeFieldEnum | null; - helpText: string | null; - label: string | null; -} diff --git a/src/fragments/types/CountryFragment.ts b/src/fragments/types/CountryFragment.ts deleted file mode 100644 index 1a4b87d8d..000000000 --- a/src/fragments/types/CountryFragment.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: CountryFragment -// ==================================================== - -export interface CountryFragment { - __typename: "CountryDisplay"; - country: string; - code: string; -} diff --git a/src/fragments/types/CountryWithTaxesFragment.ts b/src/fragments/types/CountryWithTaxesFragment.ts deleted file mode 100644 index c9679f512..000000000 --- a/src/fragments/types/CountryWithTaxesFragment.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: CountryWithTaxesFragment -// ==================================================== - -export interface CountryWithTaxesFragment_vat_reducedRates { - __typename: "ReducedRate"; - rateType: string; - rate: number; -} - -export interface CountryWithTaxesFragment_vat { - __typename: "VAT"; - standardRate: number | null; - reducedRates: (CountryWithTaxesFragment_vat_reducedRates | null)[]; -} - -export interface CountryWithTaxesFragment { - __typename: "CountryDisplay"; - country: string; - code: string; - vat: CountryWithTaxesFragment_vat | null; -} diff --git a/src/fragments/types/CustomerAddressesFragment.ts b/src/fragments/types/CustomerAddressesFragment.ts deleted file mode 100644 index 86eec18da..000000000 --- a/src/fragments/types/CustomerAddressesFragment.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: CustomerAddressesFragment -// ==================================================== - -export interface CustomerAddressesFragment_addresses_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface CustomerAddressesFragment_addresses { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: CustomerAddressesFragment_addresses_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface CustomerAddressesFragment_defaultBillingAddress { - __typename: "Address"; - id: string; -} - -export interface CustomerAddressesFragment_defaultShippingAddress { - __typename: "Address"; - id: string; -} - -export interface CustomerAddressesFragment { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; - addresses: (CustomerAddressesFragment_addresses | null)[] | null; - defaultBillingAddress: CustomerAddressesFragment_defaultBillingAddress | null; - defaultShippingAddress: CustomerAddressesFragment_defaultShippingAddress | null; -} diff --git a/src/fragments/types/CustomerDetailsFragment.ts b/src/fragments/types/CustomerDetailsFragment.ts deleted file mode 100644 index dc3d32bd3..000000000 --- a/src/fragments/types/CustomerDetailsFragment.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: CustomerDetailsFragment -// ==================================================== - -export interface CustomerDetailsFragment_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CustomerDetailsFragment_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CustomerDetailsFragment_defaultShippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface CustomerDetailsFragment_defaultShippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: CustomerDetailsFragment_defaultShippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface CustomerDetailsFragment_defaultBillingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface CustomerDetailsFragment_defaultBillingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: CustomerDetailsFragment_defaultBillingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface CustomerDetailsFragment { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; - metadata: (CustomerDetailsFragment_metadata | null)[]; - privateMetadata: (CustomerDetailsFragment_privateMetadata | null)[]; - dateJoined: any; - lastLogin: any | null; - defaultShippingAddress: CustomerDetailsFragment_defaultShippingAddress | null; - defaultBillingAddress: CustomerDetailsFragment_defaultBillingAddress | null; - note: string | null; - isActive: boolean; -} diff --git a/src/fragments/types/CustomerFragment.ts b/src/fragments/types/CustomerFragment.ts deleted file mode 100644 index 0884f596a..000000000 --- a/src/fragments/types/CustomerFragment.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: CustomerFragment -// ==================================================== - -export interface CustomerFragment { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} diff --git a/src/fragments/types/DiscountErrorFragment.ts b/src/fragments/types/DiscountErrorFragment.ts deleted file mode 100644 index 438a504c6..000000000 --- a/src/fragments/types/DiscountErrorFragment.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { DiscountErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: DiscountErrorFragment -// ==================================================== - -export interface DiscountErrorFragment { - __typename: "DiscountError"; - code: DiscountErrorCode; - field: string | null; - channels: string[] | null; - message: string | null; -} diff --git a/src/fragments/types/ExportErrorFragment.ts b/src/fragments/types/ExportErrorFragment.ts deleted file mode 100644 index 50437eef5..000000000 --- a/src/fragments/types/ExportErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ExportErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ExportErrorFragment -// ==================================================== - -export interface ExportErrorFragment { - __typename: "ExportError"; - code: ExportErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/ExportFileFragment.ts b/src/fragments/types/ExportFileFragment.ts deleted file mode 100644 index 57acacce1..000000000 --- a/src/fragments/types/ExportFileFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ExportFileFragment -// ==================================================== - -export interface ExportFileFragment { - __typename: "ExportFile"; - id: string; - status: JobStatusEnum; - url: string | null; -} diff --git a/src/fragments/types/FileFragment.ts b/src/fragments/types/FileFragment.ts deleted file mode 100644 index 44264300d..000000000 --- a/src/fragments/types/FileFragment.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: FileFragment -// ==================================================== - -export interface FileFragment { - __typename: "File"; - url: string; - contentType: string | null; -} diff --git a/src/fragments/types/FulfillmentFragment.ts b/src/fragments/types/FulfillmentFragment.ts deleted file mode 100644 index 59b419027..000000000 --- a/src/fragments/types/FulfillmentFragment.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { DiscountValueTypeEnum, FulfillmentStatus } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: FulfillmentFragment -// ==================================================== - -export interface FulfillmentFragment_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface FulfillmentFragment_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: FulfillmentFragment_lines_orderLine_variant_preorder | null; -} - -export interface FulfillmentFragment_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillmentFragment_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillmentFragment_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillmentFragment_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: FulfillmentFragment_lines_orderLine_undiscountedUnitPrice_gross; - net: FulfillmentFragment_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface FulfillmentFragment_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillmentFragment_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillmentFragment_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: FulfillmentFragment_lines_orderLine_unitPrice_gross; - net: FulfillmentFragment_lines_orderLine_unitPrice_net; -} - -export interface FulfillmentFragment_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface FulfillmentFragment_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: FulfillmentFragment_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: FulfillmentFragment_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: FulfillmentFragment_lines_orderLine_undiscountedUnitPrice; - unitPrice: FulfillmentFragment_lines_orderLine_unitPrice; - thumbnail: FulfillmentFragment_lines_orderLine_thumbnail | null; -} - -export interface FulfillmentFragment_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: FulfillmentFragment_lines_orderLine | null; -} - -export interface FulfillmentFragment_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface FulfillmentFragment { - __typename: "Fulfillment"; - id: string; - lines: (FulfillmentFragment_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: FulfillmentFragment_warehouse | null; -} diff --git a/src/fragments/types/GiftCardBulkCreateErrorFragment.ts b/src/fragments/types/GiftCardBulkCreateErrorFragment.ts deleted file mode 100644 index 23b15be3d..000000000 --- a/src/fragments/types/GiftCardBulkCreateErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: GiftCardBulkCreateErrorFragment -// ==================================================== - -export interface GiftCardBulkCreateErrorFragment { - __typename: "GiftCardError"; - code: GiftCardErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/GiftCardCreateErrorFragment.ts b/src/fragments/types/GiftCardCreateErrorFragment.ts deleted file mode 100644 index c767cca66..000000000 --- a/src/fragments/types/GiftCardCreateErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: GiftCardCreateErrorFragment -// ==================================================== - -export interface GiftCardCreateErrorFragment { - __typename: "GiftCardError"; - code: GiftCardErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/GiftCardError.ts b/src/fragments/types/GiftCardError.ts deleted file mode 100644 index c0f6b2a41..000000000 --- a/src/fragments/types/GiftCardError.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: GiftCardError -// ==================================================== - -export interface GiftCardError { - __typename: "GiftCardError"; - code: GiftCardErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/GiftCardSettingsErrorFragment.ts b/src/fragments/types/GiftCardSettingsErrorFragment.ts deleted file mode 100644 index c25fd664e..000000000 --- a/src/fragments/types/GiftCardSettingsErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardSettingsErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: GiftCardSettingsErrorFragment -// ==================================================== - -export interface GiftCardSettingsErrorFragment { - __typename: "GiftCardSettingsError"; - code: GiftCardSettingsErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/GiftCardsSettingsFragment.ts b/src/fragments/types/GiftCardsSettingsFragment.ts deleted file mode 100644 index 8db830c45..000000000 --- a/src/fragments/types/GiftCardsSettingsFragment.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardSettingsExpiryTypeEnum, TimePeriodTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: GiftCardsSettingsFragment -// ==================================================== - -export interface GiftCardsSettingsFragment_expiryPeriod { - __typename: "TimePeriod"; - type: TimePeriodTypeEnum; - amount: number; -} - -export interface GiftCardsSettingsFragment { - __typename: "GiftCardSettings"; - expiryType: GiftCardSettingsExpiryTypeEnum; - expiryPeriod: GiftCardsSettingsFragment_expiryPeriod | null; -} diff --git a/src/fragments/types/InvoiceErrorFragment.ts b/src/fragments/types/InvoiceErrorFragment.ts deleted file mode 100644 index fbd463993..000000000 --- a/src/fragments/types/InvoiceErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { InvoiceErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: InvoiceErrorFragment -// ==================================================== - -export interface InvoiceErrorFragment { - __typename: "InvoiceError"; - code: InvoiceErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/InvoiceFragment.ts b/src/fragments/types/InvoiceFragment.ts deleted file mode 100644 index 9de9fb4f4..000000000 --- a/src/fragments/types/InvoiceFragment.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: InvoiceFragment -// ==================================================== - -export interface InvoiceFragment { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} diff --git a/src/fragments/types/LimitInfoFragment.ts b/src/fragments/types/LimitInfoFragment.ts deleted file mode 100644 index 5113b4bc1..000000000 --- a/src/fragments/types/LimitInfoFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: LimitInfoFragment -// ==================================================== - -export interface LimitInfoFragment { - __typename: "Limits"; - channels: number | null; - orders: number | null; - productVariants: number | null; - staffUsers: number | null; - warehouses: number | null; -} diff --git a/src/fragments/types/MenuDetailsFragment.ts b/src/fragments/types/MenuDetailsFragment.ts deleted file mode 100644 index a1ca723f8..000000000 --- a/src/fragments/types/MenuDetailsFragment.ts +++ /dev/null @@ -1,224 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: MenuDetailsFragment -// ==================================================== - -export interface MenuDetailsFragment_items_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuDetailsFragment_items_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuDetailsFragment_items_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuDetailsFragment_items_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuDetailsFragment_items_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuDetailsFragment_items_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuDetailsFragment_items_children_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuDetailsFragment_items_children_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuDetailsFragment_items_children_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuDetailsFragment_items_children_children_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuDetailsFragment_items_children_children_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuDetailsFragment_items_children_children_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuDetailsFragment_items_children_children_children_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuDetailsFragment_items_children_children_children_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuDetailsFragment_items_children_children_children_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuDetailsFragment_items_children_children_children_children_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuDetailsFragment_items_children_children_children_children_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuDetailsFragment_items_children_children_children_children_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuDetailsFragment_items_children_children_children_children_children_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuDetailsFragment_items_children_children_children_children_children_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuDetailsFragment_items_children_children_children_children_children_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuDetailsFragment_items_children_children_children_children_children_children { - __typename: "MenuItem"; - category: MenuDetailsFragment_items_children_children_children_children_children_children_category | null; - collection: MenuDetailsFragment_items_children_children_children_children_children_children_collection | null; - id: string; - level: number; - name: string; - page: MenuDetailsFragment_items_children_children_children_children_children_children_page | null; - url: string | null; -} - -export interface MenuDetailsFragment_items_children_children_children_children_children { - __typename: "MenuItem"; - category: MenuDetailsFragment_items_children_children_children_children_children_category | null; - collection: MenuDetailsFragment_items_children_children_children_children_children_collection | null; - id: string; - level: number; - name: string; - page: MenuDetailsFragment_items_children_children_children_children_children_page | null; - url: string | null; - children: (MenuDetailsFragment_items_children_children_children_children_children_children | null)[] | null; -} - -export interface MenuDetailsFragment_items_children_children_children_children { - __typename: "MenuItem"; - category: MenuDetailsFragment_items_children_children_children_children_category | null; - collection: MenuDetailsFragment_items_children_children_children_children_collection | null; - id: string; - level: number; - name: string; - page: MenuDetailsFragment_items_children_children_children_children_page | null; - url: string | null; - children: (MenuDetailsFragment_items_children_children_children_children_children | null)[] | null; -} - -export interface MenuDetailsFragment_items_children_children_children { - __typename: "MenuItem"; - category: MenuDetailsFragment_items_children_children_children_category | null; - collection: MenuDetailsFragment_items_children_children_children_collection | null; - id: string; - level: number; - name: string; - page: MenuDetailsFragment_items_children_children_children_page | null; - url: string | null; - children: (MenuDetailsFragment_items_children_children_children_children | null)[] | null; -} - -export interface MenuDetailsFragment_items_children_children { - __typename: "MenuItem"; - category: MenuDetailsFragment_items_children_children_category | null; - collection: MenuDetailsFragment_items_children_children_collection | null; - id: string; - level: number; - name: string; - page: MenuDetailsFragment_items_children_children_page | null; - url: string | null; - children: (MenuDetailsFragment_items_children_children_children | null)[] | null; -} - -export interface MenuDetailsFragment_items_children { - __typename: "MenuItem"; - category: MenuDetailsFragment_items_children_category | null; - collection: MenuDetailsFragment_items_children_collection | null; - id: string; - level: number; - name: string; - page: MenuDetailsFragment_items_children_page | null; - url: string | null; - children: (MenuDetailsFragment_items_children_children | null)[] | null; -} - -export interface MenuDetailsFragment_items { - __typename: "MenuItem"; - category: MenuDetailsFragment_items_category | null; - collection: MenuDetailsFragment_items_collection | null; - id: string; - level: number; - name: string; - page: MenuDetailsFragment_items_page | null; - url: string | null; - children: (MenuDetailsFragment_items_children | null)[] | null; -} - -export interface MenuDetailsFragment { - __typename: "Menu"; - id: string; - items: (MenuDetailsFragment_items | null)[] | null; - name: string; -} diff --git a/src/fragments/types/MenuErrorFragment.ts b/src/fragments/types/MenuErrorFragment.ts deleted file mode 100644 index 3738b3240..000000000 --- a/src/fragments/types/MenuErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { MenuErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: MenuErrorFragment -// ==================================================== - -export interface MenuErrorFragment { - __typename: "MenuError"; - code: MenuErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/MenuFragment.ts b/src/fragments/types/MenuFragment.ts deleted file mode 100644 index 5919b9542..000000000 --- a/src/fragments/types/MenuFragment.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: MenuFragment -// ==================================================== - -export interface MenuFragment_items { - __typename: "MenuItem"; - id: string; -} - -export interface MenuFragment { - __typename: "Menu"; - id: string; - name: string; - items: (MenuFragment_items | null)[] | null; -} diff --git a/src/fragments/types/MenuItemFragment.ts b/src/fragments/types/MenuItemFragment.ts deleted file mode 100644 index 3370c001b..000000000 --- a/src/fragments/types/MenuItemFragment.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: MenuItemFragment -// ==================================================== - -export interface MenuItemFragment_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuItemFragment_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuItemFragment_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuItemFragment { - __typename: "MenuItem"; - category: MenuItemFragment_category | null; - collection: MenuItemFragment_collection | null; - id: string; - level: number; - name: string; - page: MenuItemFragment_page | null; - url: string | null; -} diff --git a/src/fragments/types/MenuItemNestedFragment.ts b/src/fragments/types/MenuItemNestedFragment.ts deleted file mode 100644 index 1d16c2b4e..000000000 --- a/src/fragments/types/MenuItemNestedFragment.ts +++ /dev/null @@ -1,217 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: MenuItemNestedFragment -// ==================================================== - -export interface MenuItemNestedFragment_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuItemNestedFragment_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuItemNestedFragment_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuItemNestedFragment_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuItemNestedFragment_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuItemNestedFragment_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuItemNestedFragment_children_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuItemNestedFragment_children_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuItemNestedFragment_children_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuItemNestedFragment_children_children_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuItemNestedFragment_children_children_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuItemNestedFragment_children_children_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuItemNestedFragment_children_children_children_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuItemNestedFragment_children_children_children_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuItemNestedFragment_children_children_children_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuItemNestedFragment_children_children_children_children_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuItemNestedFragment_children_children_children_children_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuItemNestedFragment_children_children_children_children_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuItemNestedFragment_children_children_children_children_children_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuItemNestedFragment_children_children_children_children_children_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuItemNestedFragment_children_children_children_children_children_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuItemNestedFragment_children_children_children_children_children_children { - __typename: "MenuItem"; - category: MenuItemNestedFragment_children_children_children_children_children_children_category | null; - collection: MenuItemNestedFragment_children_children_children_children_children_children_collection | null; - id: string; - level: number; - name: string; - page: MenuItemNestedFragment_children_children_children_children_children_children_page | null; - url: string | null; -} - -export interface MenuItemNestedFragment_children_children_children_children_children { - __typename: "MenuItem"; - category: MenuItemNestedFragment_children_children_children_children_children_category | null; - collection: MenuItemNestedFragment_children_children_children_children_children_collection | null; - id: string; - level: number; - name: string; - page: MenuItemNestedFragment_children_children_children_children_children_page | null; - url: string | null; - children: (MenuItemNestedFragment_children_children_children_children_children_children | null)[] | null; -} - -export interface MenuItemNestedFragment_children_children_children_children { - __typename: "MenuItem"; - category: MenuItemNestedFragment_children_children_children_children_category | null; - collection: MenuItemNestedFragment_children_children_children_children_collection | null; - id: string; - level: number; - name: string; - page: MenuItemNestedFragment_children_children_children_children_page | null; - url: string | null; - children: (MenuItemNestedFragment_children_children_children_children_children | null)[] | null; -} - -export interface MenuItemNestedFragment_children_children_children { - __typename: "MenuItem"; - category: MenuItemNestedFragment_children_children_children_category | null; - collection: MenuItemNestedFragment_children_children_children_collection | null; - id: string; - level: number; - name: string; - page: MenuItemNestedFragment_children_children_children_page | null; - url: string | null; - children: (MenuItemNestedFragment_children_children_children_children | null)[] | null; -} - -export interface MenuItemNestedFragment_children_children { - __typename: "MenuItem"; - category: MenuItemNestedFragment_children_children_category | null; - collection: MenuItemNestedFragment_children_children_collection | null; - id: string; - level: number; - name: string; - page: MenuItemNestedFragment_children_children_page | null; - url: string | null; - children: (MenuItemNestedFragment_children_children_children | null)[] | null; -} - -export interface MenuItemNestedFragment_children { - __typename: "MenuItem"; - category: MenuItemNestedFragment_children_category | null; - collection: MenuItemNestedFragment_children_collection | null; - id: string; - level: number; - name: string; - page: MenuItemNestedFragment_children_page | null; - url: string | null; - children: (MenuItemNestedFragment_children_children | null)[] | null; -} - -export interface MenuItemNestedFragment { - __typename: "MenuItem"; - category: MenuItemNestedFragment_category | null; - collection: MenuItemNestedFragment_collection | null; - id: string; - level: number; - name: string; - page: MenuItemNestedFragment_page | null; - url: string | null; - children: (MenuItemNestedFragment_children | null)[] | null; -} diff --git a/src/fragments/types/MetadataErrorFragment.ts b/src/fragments/types/MetadataErrorFragment.ts deleted file mode 100644 index de476fe68..000000000 --- a/src/fragments/types/MetadataErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { MetadataErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: MetadataErrorFragment -// ==================================================== - -export interface MetadataErrorFragment { - __typename: "MetadataError"; - code: MetadataErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/MetadataFragment.ts b/src/fragments/types/MetadataFragment.ts deleted file mode 100644 index 881621d22..000000000 --- a/src/fragments/types/MetadataFragment.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: MetadataFragment -// ==================================================== - -export interface MetadataFragment_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface MetadataFragment_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface MetadataFragment { - __typename: "App" | "Attribute" | "Category" | "Checkout" | "Collection" | "DigitalContent" | "Fulfillment" | "GiftCard" | "Invoice" | "Menu" | "MenuItem" | "Order" | "Page" | "PageType" | "Payment" | "Product" | "ProductType" | "ProductVariant" | "Sale" | "ShippingMethod" | "ShippingMethodType" | "ShippingZone" | "User" | "Voucher" | "Warehouse"; - metadata: (MetadataFragment_metadata | null)[]; - privateMetadata: (MetadataFragment_privateMetadata | null)[]; -} diff --git a/src/fragments/types/MetadataItem.ts b/src/fragments/types/MetadataItem.ts deleted file mode 100644 index 5170d3b74..000000000 --- a/src/fragments/types/MetadataItem.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: MetadataItem -// ==================================================== - -export interface MetadataItem { - __typename: "MetadataItem"; - key: string; - value: string; -} diff --git a/src/fragments/types/Money.ts b/src/fragments/types/Money.ts deleted file mode 100644 index 44b0a0e21..000000000 --- a/src/fragments/types/Money.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: Money -// ==================================================== - -export interface Money { - __typename: "Money"; - amount: number; - currency: string; -} diff --git a/src/fragments/types/OrderDetailsFragment.ts b/src/fragments/types/OrderDetailsFragment.ts deleted file mode 100644 index aed8aaa4c..000000000 --- a/src/fragments/types/OrderDetailsFragment.ts +++ /dev/null @@ -1,596 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: OrderDetailsFragment -// ==================================================== - -export interface OrderDetailsFragment_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderDetailsFragment_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderDetailsFragment_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderDetailsFragment_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderDetailsFragment_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderDetailsFragment_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderDetailsFragment_giftCards_events_balance_initialBalance | null; - currentBalance: OrderDetailsFragment_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderDetailsFragment_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderDetailsFragment_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderDetailsFragment_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderDetailsFragment_giftCards_events_balance | null; -} - -export interface OrderDetailsFragment_giftCards { - __typename: "GiftCard"; - events: OrderDetailsFragment_giftCards_events[]; -} - -export interface OrderDetailsFragment_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDetailsFragment_discounts_amount; -} - -export interface OrderDetailsFragment_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDetailsFragment_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderDetailsFragment_events_discount_oldAmount | null; -} - -export interface OrderDetailsFragment_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderDetailsFragment_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderDetailsFragment_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderDetailsFragment_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDetailsFragment_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderDetailsFragment_events_lines_discount_oldAmount | null; -} - -export interface OrderDetailsFragment_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderDetailsFragment_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderDetailsFragment_events_lines_discount | null; - orderLine: OrderDetailsFragment_events_lines_orderLine | null; -} - -export interface OrderDetailsFragment_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderDetailsFragment_events_discount | null; - relatedOrder: OrderDetailsFragment_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderDetailsFragment_events_user | null; - app: OrderDetailsFragment_events_app | null; - lines: (OrderDetailsFragment_events_lines | null)[] | null; -} - -export interface OrderDetailsFragment_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderDetailsFragment_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderDetailsFragment_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderDetailsFragment_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderDetailsFragment_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderDetailsFragment_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderDetailsFragment_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderDetailsFragment_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderDetailsFragment_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderDetailsFragment_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderDetailsFragment_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderDetailsFragment_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderDetailsFragment_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderDetailsFragment_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderDetailsFragment_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderDetailsFragment_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderDetailsFragment_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderDetailsFragment_fulfillments_lines_orderLine | null; -} - -export interface OrderDetailsFragment_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderDetailsFragment_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderDetailsFragment_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderDetailsFragment_fulfillments_warehouse | null; -} - -export interface OrderDetailsFragment_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderDetailsFragment_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderDetailsFragment_lines_variant_preorder | null; -} - -export interface OrderDetailsFragment_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderDetailsFragment_lines_undiscountedUnitPrice_gross; - net: OrderDetailsFragment_lines_undiscountedUnitPrice_net; -} - -export interface OrderDetailsFragment_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderDetailsFragment_lines_unitPrice_gross; - net: OrderDetailsFragment_lines_unitPrice_net; -} - -export interface OrderDetailsFragment_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderDetailsFragment_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderDetailsFragment_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderDetailsFragment_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderDetailsFragment_lines_undiscountedUnitPrice; - unitPrice: OrderDetailsFragment_lines_unitPrice; - thumbnail: OrderDetailsFragment_lines_thumbnail | null; -} - -export interface OrderDetailsFragment_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderDetailsFragment_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderDetailsFragment_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderDetailsFragment_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderDetailsFragment_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderDetailsFragment_deliveryMethod = OrderDetailsFragment_deliveryMethod_ShippingMethod | OrderDetailsFragment_deliveryMethod_Warehouse; - -export interface OrderDetailsFragment_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderDetailsFragment_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderDetailsFragment_shippingPrice_gross; -} - -export interface OrderDetailsFragment_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_subtotal { - __typename: "TaxedMoney"; - gross: OrderDetailsFragment_subtotal_gross; - net: OrderDetailsFragment_subtotal_net; -} - -export interface OrderDetailsFragment_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_total { - __typename: "TaxedMoney"; - gross: OrderDetailsFragment_total_gross; - net: OrderDetailsFragment_total_net; - tax: OrderDetailsFragment_total_tax; -} - -export interface OrderDetailsFragment_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderDetailsFragment_undiscountedTotal_net; - gross: OrderDetailsFragment_undiscountedTotal_gross; -} - -export interface OrderDetailsFragment_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderDetailsFragment_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetailsFragment_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderDetailsFragment_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderDetailsFragment_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderDetailsFragment_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderDetailsFragment_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderDetailsFragment_channel_defaultCountry; -} - -export interface OrderDetailsFragment { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderDetailsFragment_metadata | null)[]; - privateMetadata: (OrderDetailsFragment_privateMetadata | null)[]; - billingAddress: OrderDetailsFragment_billingAddress | null; - giftCards: (OrderDetailsFragment_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderDetailsFragment_discounts[] | null; - events: (OrderDetailsFragment_events | null)[] | null; - fulfillments: (OrderDetailsFragment_fulfillments | null)[]; - lines: (OrderDetailsFragment_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderDetailsFragment_shippingAddress | null; - deliveryMethod: OrderDetailsFragment_deliveryMethod | null; - shippingMethod: OrderDetailsFragment_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderDetailsFragment_shippingPrice; - status: OrderStatus; - subtotal: OrderDetailsFragment_subtotal; - total: OrderDetailsFragment_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderDetailsFragment_totalAuthorized; - totalCaptured: OrderDetailsFragment_totalCaptured; - undiscountedTotal: OrderDetailsFragment_undiscountedTotal; - user: OrderDetailsFragment_user | null; - userEmail: string | null; - shippingMethods: (OrderDetailsFragment_shippingMethods | null)[] | null; - invoices: (OrderDetailsFragment_invoices | null)[] | null; - channel: OrderDetailsFragment_channel; -} diff --git a/src/fragments/types/OrderErrorFragment.ts b/src/fragments/types/OrderErrorFragment.ts deleted file mode 100644 index 48c8a88fd..000000000 --- a/src/fragments/types/OrderErrorFragment.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderErrorCode, AddressTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: OrderErrorFragment -// ==================================================== - -export interface OrderErrorFragment { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} diff --git a/src/fragments/types/OrderEventFragment.ts b/src/fragments/types/OrderEventFragment.ts deleted file mode 100644 index b9b15fb02..000000000 --- a/src/fragments/types/OrderEventFragment.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderEventsEmailsEnum, DiscountValueTypeEnum, OrderEventsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: OrderEventFragment -// ==================================================== - -export interface OrderEventFragment_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderEventFragment_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderEventFragment_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderEventFragment_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderEventFragment_discount_oldAmount | null; -} - -export interface OrderEventFragment_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderEventFragment_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderEventFragment_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderEventFragment_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderEventFragment_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderEventFragment_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderEventFragment_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderEventFragment_lines_discount_oldAmount | null; -} - -export interface OrderEventFragment_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderEventFragment_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderEventFragment_lines_discount | null; - orderLine: OrderEventFragment_lines_orderLine | null; -} - -export interface OrderEventFragment { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderEventFragment_discount | null; - relatedOrder: OrderEventFragment_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderEventFragment_user | null; - app: OrderEventFragment_app | null; - lines: (OrderEventFragment_lines | null)[] | null; -} diff --git a/src/fragments/types/OrderLineFragment.ts b/src/fragments/types/OrderLineFragment.ts deleted file mode 100644 index c090da65b..000000000 --- a/src/fragments/types/OrderLineFragment.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { DiscountValueTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: OrderLineFragment -// ==================================================== - -export interface OrderLineFragment_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderLineFragment_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderLineFragment_variant_preorder | null; -} - -export interface OrderLineFragment_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineFragment_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineFragment_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineFragment_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderLineFragment_undiscountedUnitPrice_gross; - net: OrderLineFragment_undiscountedUnitPrice_net; -} - -export interface OrderLineFragment_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineFragment_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineFragment_unitPrice { - __typename: "TaxedMoney"; - gross: OrderLineFragment_unitPrice_gross; - net: OrderLineFragment_unitPrice_net; -} - -export interface OrderLineFragment_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderLineFragment { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderLineFragment_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderLineFragment_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderLineFragment_undiscountedUnitPrice; - unitPrice: OrderLineFragment_unitPrice; - thumbnail: OrderLineFragment_thumbnail | null; -} diff --git a/src/fragments/types/OrderSettingsErrorFragment.ts b/src/fragments/types/OrderSettingsErrorFragment.ts deleted file mode 100644 index 130f49279..000000000 --- a/src/fragments/types/OrderSettingsErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderSettingsErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: OrderSettingsErrorFragment -// ==================================================== - -export interface OrderSettingsErrorFragment { - __typename: "OrderSettingsError"; - code: OrderSettingsErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/OrderSettingsFragment.ts b/src/fragments/types/OrderSettingsFragment.ts deleted file mode 100644 index dcc3309b3..000000000 --- a/src/fragments/types/OrderSettingsFragment.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: OrderSettingsFragment -// ==================================================== - -export interface OrderSettingsFragment { - __typename: "OrderSettings"; - automaticallyConfirmAllNewOrders: boolean; - automaticallyFulfillNonShippableGiftCard: boolean; -} diff --git a/src/fragments/types/PageAttributesFragment.ts b/src/fragments/types/PageAttributesFragment.ts deleted file mode 100644 index 298a22af9..000000000 --- a/src/fragments/types/PageAttributesFragment.ts +++ /dev/null @@ -1,151 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PageAttributesFragment -// ==================================================== - -export interface PageAttributesFragment_attributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface PageAttributesFragment_attributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface PageAttributesFragment_attributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: PageAttributesFragment_attributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface PageAttributesFragment_attributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: PageAttributesFragment_attributes_attribute_choices_edges_node; -} - -export interface PageAttributesFragment_attributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: PageAttributesFragment_attributes_attribute_choices_pageInfo; - edges: PageAttributesFragment_attributes_attribute_choices_edges[]; -} - -export interface PageAttributesFragment_attributes_attribute { - __typename: "Attribute"; - id: string; - slug: string | null; - name: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: PageAttributesFragment_attributes_attribute_choices | null; -} - -export interface PageAttributesFragment_attributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface PageAttributesFragment_attributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: PageAttributesFragment_attributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface PageAttributesFragment_attributes { - __typename: "SelectedAttribute"; - attribute: PageAttributesFragment_attributes_attribute; - values: (PageAttributesFragment_attributes_values | null)[]; -} - -export interface PageAttributesFragment_pageType_attributes_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface PageAttributesFragment_pageType_attributes_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface PageAttributesFragment_pageType_attributes_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: PageAttributesFragment_pageType_attributes_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface PageAttributesFragment_pageType_attributes_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: PageAttributesFragment_pageType_attributes_choices_edges_node; -} - -export interface PageAttributesFragment_pageType_attributes_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: PageAttributesFragment_pageType_attributes_choices_pageInfo; - edges: PageAttributesFragment_pageType_attributes_choices_edges[]; -} - -export interface PageAttributesFragment_pageType_attributes { - __typename: "Attribute"; - id: string; - name: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - choices: PageAttributesFragment_pageType_attributes_choices | null; -} - -export interface PageAttributesFragment_pageType { - __typename: "PageType"; - id: string; - name: string; - attributes: (PageAttributesFragment_pageType_attributes | null)[] | null; -} - -export interface PageAttributesFragment { - __typename: "Page"; - attributes: PageAttributesFragment_attributes[]; - pageType: PageAttributesFragment_pageType; -} diff --git a/src/fragments/types/PageBulkPublishErrorFragment.ts b/src/fragments/types/PageBulkPublishErrorFragment.ts deleted file mode 100644 index a4242a6dd..000000000 --- a/src/fragments/types/PageBulkPublishErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PageErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PageBulkPublishErrorFragment -// ==================================================== - -export interface PageBulkPublishErrorFragment { - __typename: "PageError"; - code: PageErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/PageBulkRemoveErrorFragment.ts b/src/fragments/types/PageBulkRemoveErrorFragment.ts deleted file mode 100644 index 1a7a72871..000000000 --- a/src/fragments/types/PageBulkRemoveErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PageErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PageBulkRemoveErrorFragment -// ==================================================== - -export interface PageBulkRemoveErrorFragment { - __typename: "PageError"; - code: PageErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/PageDetailsFragment.ts b/src/fragments/types/PageDetailsFragment.ts deleted file mode 100644 index e954295cf..000000000 --- a/src/fragments/types/PageDetailsFragment.ts +++ /dev/null @@ -1,173 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PageDetailsFragment -// ==================================================== - -export interface PageDetailsFragment_attributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface PageDetailsFragment_attributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface PageDetailsFragment_attributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: PageDetailsFragment_attributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface PageDetailsFragment_attributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: PageDetailsFragment_attributes_attribute_choices_edges_node; -} - -export interface PageDetailsFragment_attributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: PageDetailsFragment_attributes_attribute_choices_pageInfo; - edges: PageDetailsFragment_attributes_attribute_choices_edges[]; -} - -export interface PageDetailsFragment_attributes_attribute { - __typename: "Attribute"; - id: string; - slug: string | null; - name: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: PageDetailsFragment_attributes_attribute_choices | null; -} - -export interface PageDetailsFragment_attributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface PageDetailsFragment_attributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: PageDetailsFragment_attributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface PageDetailsFragment_attributes { - __typename: "SelectedAttribute"; - attribute: PageDetailsFragment_attributes_attribute; - values: (PageDetailsFragment_attributes_values | null)[]; -} - -export interface PageDetailsFragment_pageType_attributes_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface PageDetailsFragment_pageType_attributes_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface PageDetailsFragment_pageType_attributes_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: PageDetailsFragment_pageType_attributes_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface PageDetailsFragment_pageType_attributes_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: PageDetailsFragment_pageType_attributes_choices_edges_node; -} - -export interface PageDetailsFragment_pageType_attributes_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: PageDetailsFragment_pageType_attributes_choices_pageInfo; - edges: PageDetailsFragment_pageType_attributes_choices_edges[]; -} - -export interface PageDetailsFragment_pageType_attributes { - __typename: "Attribute"; - id: string; - name: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - choices: PageDetailsFragment_pageType_attributes_choices | null; -} - -export interface PageDetailsFragment_pageType { - __typename: "PageType"; - id: string; - name: string; - attributes: (PageDetailsFragment_pageType_attributes | null)[] | null; -} - -export interface PageDetailsFragment_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface PageDetailsFragment_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface PageDetailsFragment { - __typename: "Page"; - id: string; - title: string; - slug: string; - isPublished: boolean; - attributes: PageDetailsFragment_attributes[]; - pageType: PageDetailsFragment_pageType; - metadata: (PageDetailsFragment_metadata | null)[]; - privateMetadata: (PageDetailsFragment_privateMetadata | null)[]; - content: any | null; - seoTitle: string | null; - seoDescription: string | null; - publicationDate: any | null; -} diff --git a/src/fragments/types/PageErrorFragment.ts b/src/fragments/types/PageErrorFragment.ts deleted file mode 100644 index f0a115af5..000000000 --- a/src/fragments/types/PageErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PageErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PageErrorFragment -// ==================================================== - -export interface PageErrorFragment { - __typename: "PageError"; - code: PageErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/PageErrorWithAttributesFragment.ts b/src/fragments/types/PageErrorWithAttributesFragment.ts deleted file mode 100644 index 0bd6102e4..000000000 --- a/src/fragments/types/PageErrorWithAttributesFragment.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PageErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PageErrorWithAttributesFragment -// ==================================================== - -export interface PageErrorWithAttributesFragment { - __typename: "PageError"; - code: PageErrorCode; - field: string | null; - message: string | null; - attributes: string[] | null; -} diff --git a/src/fragments/types/PageFragment.ts b/src/fragments/types/PageFragment.ts deleted file mode 100644 index 246303fcc..000000000 --- a/src/fragments/types/PageFragment.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: PageFragment -// ==================================================== - -export interface PageFragment { - __typename: "Page"; - id: string; - title: string; - slug: string; - isPublished: boolean; -} diff --git a/src/fragments/types/PageInfoFragment.ts b/src/fragments/types/PageInfoFragment.ts deleted file mode 100644 index d7682c0e8..000000000 --- a/src/fragments/types/PageInfoFragment.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: PageInfoFragment -// ==================================================== - -export interface PageInfoFragment { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} diff --git a/src/fragments/types/PageTranslatableFragment.ts b/src/fragments/types/PageTranslatableFragment.ts deleted file mode 100644 index ca775a935..000000000 --- a/src/fragments/types/PageTranslatableFragment.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PageTranslatableFragment -// ==================================================== - -export interface PageTranslatableFragment_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface PageTranslatableFragment_translation { - __typename: "PageTranslation"; - id: string; - content: any | null; - seoDescription: string | null; - seoTitle: string | null; - title: string | null; - language: PageTranslatableFragment_translation_language; -} - -export interface PageTranslatableFragment { - __typename: "PageTranslatableContent"; - id: string; - content: any | null; - seoDescription: string | null; - seoTitle: string | null; - title: string; - translation: PageTranslatableFragment_translation | null; -} diff --git a/src/fragments/types/PageTranslateErrorFragment.ts b/src/fragments/types/PageTranslateErrorFragment.ts deleted file mode 100644 index c4f3699dd..000000000 --- a/src/fragments/types/PageTranslateErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { TranslationErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PageTranslateErrorFragment -// ==================================================== - -export interface PageTranslateErrorFragment { - __typename: "TranslationError"; - code: TranslationErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/PageTranslationFragment.ts b/src/fragments/types/PageTranslationFragment.ts deleted file mode 100644 index c6e0b18bd..000000000 --- a/src/fragments/types/PageTranslationFragment.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PageTranslationFragment -// ==================================================== - -export interface PageTranslationFragment_page { - __typename: "Page"; - id: string; - content: any | null; - seoDescription: string | null; - seoTitle: string | null; - title: string; -} - -export interface PageTranslationFragment_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface PageTranslationFragment_translation { - __typename: "PageTranslation"; - id: string; - content: any | null; - seoDescription: string | null; - seoTitle: string | null; - title: string | null; - language: PageTranslationFragment_translation_language; -} - -export interface PageTranslationFragment_attributeValues_attributeValue { - __typename: "AttributeValue"; - id: string; -} - -export interface PageTranslationFragment_attributeValues_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface PageTranslationFragment_attributeValues_translation { - __typename: "AttributeValueTranslation"; - id: string; - name: string; - richText: any | null; - language: PageTranslationFragment_attributeValues_translation_language; -} - -export interface PageTranslationFragment_attributeValues { - __typename: "AttributeValueTranslatableContent"; - id: string; - name: string; - richText: any | null; - attributeValue: PageTranslationFragment_attributeValues_attributeValue | null; - translation: PageTranslationFragment_attributeValues_translation | null; -} - -export interface PageTranslationFragment { - __typename: "PageTranslatableContent"; - page: PageTranslationFragment_page | null; - translation: PageTranslationFragment_translation | null; - attributeValues: PageTranslationFragment_attributeValues[]; -} diff --git a/src/fragments/types/PageTypeDeleteErrorFragment.ts b/src/fragments/types/PageTypeDeleteErrorFragment.ts deleted file mode 100644 index 932da4eb8..000000000 --- a/src/fragments/types/PageTypeDeleteErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PageErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PageTypeDeleteErrorFragment -// ==================================================== - -export interface PageTypeDeleteErrorFragment { - __typename: "PageError"; - code: PageErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/PageTypeDetailsFragment.ts b/src/fragments/types/PageTypeDetailsFragment.ts deleted file mode 100644 index 5d0f13879..000000000 --- a/src/fragments/types/PageTypeDetailsFragment.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeTypeEnum, MeasurementUnitsEnum, AttributeInputTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PageTypeDetailsFragment -// ==================================================== - -export interface PageTypeDetailsFragment_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface PageTypeDetailsFragment_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface PageTypeDetailsFragment_attributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface PageTypeDetailsFragment { - __typename: "PageType"; - id: string; - name: string; - metadata: (PageTypeDetailsFragment_metadata | null)[]; - privateMetadata: (PageTypeDetailsFragment_privateMetadata | null)[]; - attributes: (PageTypeDetailsFragment_attributes | null)[] | null; -} diff --git a/src/fragments/types/PageTypeFragment.ts b/src/fragments/types/PageTypeFragment.ts deleted file mode 100644 index 0fb99601f..000000000 --- a/src/fragments/types/PageTypeFragment.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: PageTypeFragment -// ==================================================== - -export interface PageTypeFragment { - __typename: "PageType"; - id: string; - name: string; -} diff --git a/src/fragments/types/PermissionFragment.ts b/src/fragments/types/PermissionFragment.ts deleted file mode 100644 index 7cb24768c..000000000 --- a/src/fragments/types/PermissionFragment.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PermissionFragment -// ==================================================== - -export interface PermissionFragment { - __typename: "Permission"; - code: PermissionEnum; - name: string; -} diff --git a/src/fragments/types/PermissionGroupDetailsFragment.ts b/src/fragments/types/PermissionGroupDetailsFragment.ts deleted file mode 100644 index 1da58d230..000000000 --- a/src/fragments/types/PermissionGroupDetailsFragment.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PermissionGroupDetailsFragment -// ==================================================== - -export interface PermissionGroupDetailsFragment_users_avatar { - __typename: "Image"; - url: string; -} - -export interface PermissionGroupDetailsFragment_users { - __typename: "User"; - id: string; - firstName: string; - lastName: string; - email: string; - isActive: boolean; - avatar: PermissionGroupDetailsFragment_users_avatar | null; -} - -export interface PermissionGroupDetailsFragment_permissions { - __typename: "Permission"; - code: PermissionEnum; - name: string; -} - -export interface PermissionGroupDetailsFragment { - __typename: "Group"; - id: string; - name: string; - userCanManage: boolean; - users: (PermissionGroupDetailsFragment_users | null)[] | null; - permissions: (PermissionGroupDetailsFragment_permissions | null)[] | null; -} diff --git a/src/fragments/types/PermissionGroupErrorFragment.ts b/src/fragments/types/PermissionGroupErrorFragment.ts deleted file mode 100644 index ff4165a5f..000000000 --- a/src/fragments/types/PermissionGroupErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PermissionGroupErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PermissionGroupErrorFragment -// ==================================================== - -export interface PermissionGroupErrorFragment { - __typename: "PermissionGroupError"; - code: PermissionGroupErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/PermissionGroupFragment.ts b/src/fragments/types/PermissionGroupFragment.ts deleted file mode 100644 index 09be84e73..000000000 --- a/src/fragments/types/PermissionGroupFragment.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: PermissionGroupFragment -// ==================================================== - -export interface PermissionGroupFragment_users { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} - -export interface PermissionGroupFragment { - __typename: "Group"; - id: string; - name: string; - userCanManage: boolean; - users: (PermissionGroupFragment_users | null)[] | null; -} diff --git a/src/fragments/types/PluginBaseFragment.ts b/src/fragments/types/PluginBaseFragment.ts deleted file mode 100644 index 1686183de..000000000 --- a/src/fragments/types/PluginBaseFragment.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: PluginBaseFragment -// ==================================================== - -export interface PluginBaseFragment_channelConfigurations_channel { - __typename: "Channel"; - id: string; - name: string; - slug: string; -} - -export interface PluginBaseFragment_channelConfigurations { - __typename: "PluginConfiguration"; - active: boolean; - channel: PluginBaseFragment_channelConfigurations_channel | null; -} - -export interface PluginBaseFragment_globalConfiguration_channel { - __typename: "Channel"; - id: string; - name: string; - slug: string; -} - -export interface PluginBaseFragment_globalConfiguration { - __typename: "PluginConfiguration"; - active: boolean; - channel: PluginBaseFragment_globalConfiguration_channel | null; -} - -export interface PluginBaseFragment { - __typename: "Plugin"; - id: string; - name: string; - description: string; - channelConfigurations: PluginBaseFragment_channelConfigurations[]; - globalConfiguration: PluginBaseFragment_globalConfiguration | null; -} diff --git a/src/fragments/types/PluginConfiguarionFragment.ts b/src/fragments/types/PluginConfiguarionFragment.ts deleted file mode 100644 index 1a16e94dd..000000000 --- a/src/fragments/types/PluginConfiguarionFragment.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ConfigurationTypeFieldEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PluginConfiguarionFragment -// ==================================================== - -export interface PluginConfiguarionFragment_channel { - __typename: "Channel"; - id: string; - name: string; - slug: string; -} - -export interface PluginConfiguarionFragment_configuration { - __typename: "ConfigurationItem"; - name: string; - value: string | null; - type: ConfigurationTypeFieldEnum | null; - helpText: string | null; - label: string | null; -} - -export interface PluginConfiguarionFragment { - __typename: "PluginConfiguration"; - active: boolean; - channel: PluginConfiguarionFragment_channel | null; - configuration: (PluginConfiguarionFragment_configuration | null)[] | null; -} diff --git a/src/fragments/types/PluginConfigurationBaseFragment.ts b/src/fragments/types/PluginConfigurationBaseFragment.ts deleted file mode 100644 index 10df0cac6..000000000 --- a/src/fragments/types/PluginConfigurationBaseFragment.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: PluginConfigurationBaseFragment -// ==================================================== - -export interface PluginConfigurationBaseFragment_channel { - __typename: "Channel"; - id: string; - name: string; - slug: string; -} - -export interface PluginConfigurationBaseFragment { - __typename: "PluginConfiguration"; - active: boolean; - channel: PluginConfigurationBaseFragment_channel | null; -} diff --git a/src/fragments/types/PluginConfigurationExtendedFragment.ts b/src/fragments/types/PluginConfigurationExtendedFragment.ts deleted file mode 100644 index 15604dd6e..000000000 --- a/src/fragments/types/PluginConfigurationExtendedFragment.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ConfigurationTypeFieldEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PluginConfigurationExtendedFragment -// ==================================================== - -export interface PluginConfigurationExtendedFragment_channel { - __typename: "Channel"; - id: string; - name: string; - slug: string; -} - -export interface PluginConfigurationExtendedFragment_configuration { - __typename: "ConfigurationItem"; - name: string; - value: string | null; - type: ConfigurationTypeFieldEnum | null; - helpText: string | null; - label: string | null; -} - -export interface PluginConfigurationExtendedFragment { - __typename: "PluginConfiguration"; - active: boolean; - channel: PluginConfigurationExtendedFragment_channel | null; - configuration: (PluginConfigurationExtendedFragment_configuration | null)[] | null; -} diff --git a/src/fragments/types/PluginConfigurationFragment.ts b/src/fragments/types/PluginConfigurationFragment.ts deleted file mode 100644 index 6f75ac9a2..000000000 --- a/src/fragments/types/PluginConfigurationFragment.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ConfigurationTypeFieldEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PluginConfigurationFragment -// ==================================================== - -export interface PluginConfigurationFragment_channel { - __typename: "Channel"; - id: string; - name: string; - slug: string; -} - -export interface PluginConfigurationFragment_configuration { - __typename: "ConfigurationItem"; - name: string; - value: string | null; - type: ConfigurationTypeFieldEnum | null; - helpText: string | null; - label: string | null; -} - -export interface PluginConfigurationFragment { - __typename: "PluginConfiguration"; - active: boolean; - channel: PluginConfigurationFragment_channel | null; - configuration: (PluginConfigurationFragment_configuration | null)[] | null; -} diff --git a/src/fragments/types/PluginErrorFragment.ts b/src/fragments/types/PluginErrorFragment.ts deleted file mode 100644 index 51db01e19..000000000 --- a/src/fragments/types/PluginErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PluginErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PluginErrorFragment -// ==================================================== - -export interface PluginErrorFragment { - __typename: "PluginError"; - code: PluginErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/PluginFragment.ts b/src/fragments/types/PluginFragment.ts deleted file mode 100644 index d546aed49..000000000 --- a/src/fragments/types/PluginFragment.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ConfigurationTypeFieldEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PluginFragment -// ==================================================== - -export interface PluginFragment_globalConfiguration_channel { - __typename: "Channel"; - id: string; - name: string; - slug: string; -} - -export interface PluginFragment_globalConfiguration_configuration { - __typename: "ConfigurationItem"; - name: string; - value: string | null; - type: ConfigurationTypeFieldEnum | null; - helpText: string | null; - label: string | null; -} - -export interface PluginFragment_globalConfiguration { - __typename: "PluginConfiguration"; - active: boolean; - channel: PluginFragment_globalConfiguration_channel | null; - configuration: (PluginFragment_globalConfiguration_configuration | null)[] | null; -} - -export interface PluginFragment_channelConfigurations_channel { - __typename: "Channel"; - id: string; - name: string; - slug: string; -} - -export interface PluginFragment_channelConfigurations_configuration { - __typename: "ConfigurationItem"; - name: string; - value: string | null; - type: ConfigurationTypeFieldEnum | null; - helpText: string | null; - label: string | null; -} - -export interface PluginFragment_channelConfigurations { - __typename: "PluginConfiguration"; - active: boolean; - channel: PluginFragment_channelConfigurations_channel | null; - configuration: (PluginFragment_channelConfigurations_configuration | null)[] | null; -} - -export interface PluginFragment { - __typename: "Plugin"; - id: string; - name: string; - description: string; - globalConfiguration: PluginFragment_globalConfiguration | null; - channelConfigurations: PluginFragment_channelConfigurations[]; -} diff --git a/src/fragments/types/PluginsDetailsFragment.ts b/src/fragments/types/PluginsDetailsFragment.ts deleted file mode 100644 index 2e4b15f59..000000000 --- a/src/fragments/types/PluginsDetailsFragment.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ConfigurationTypeFieldEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PluginsDetailsFragment -// ==================================================== - -export interface PluginsDetailsFragment_globalConfiguration_channel { - __typename: "Channel"; - id: string; - name: string; - slug: string; -} - -export interface PluginsDetailsFragment_globalConfiguration_configuration { - __typename: "ConfigurationItem"; - name: string; - value: string | null; - type: ConfigurationTypeFieldEnum | null; - helpText: string | null; - label: string | null; -} - -export interface PluginsDetailsFragment_globalConfiguration { - __typename: "PluginConfiguration"; - active: boolean; - channel: PluginsDetailsFragment_globalConfiguration_channel | null; - configuration: (PluginsDetailsFragment_globalConfiguration_configuration | null)[] | null; -} - -export interface PluginsDetailsFragment_channelConfigurations_channel { - __typename: "Channel"; - id: string; - name: string; - slug: string; -} - -export interface PluginsDetailsFragment_channelConfigurations_configuration { - __typename: "ConfigurationItem"; - name: string; - value: string | null; - type: ConfigurationTypeFieldEnum | null; - helpText: string | null; - label: string | null; -} - -export interface PluginsDetailsFragment_channelConfigurations { - __typename: "PluginConfiguration"; - active: boolean; - channel: PluginsDetailsFragment_channelConfigurations_channel | null; - configuration: (PluginsDetailsFragment_channelConfigurations_configuration | null)[] | null; -} - -export interface PluginsDetailsFragment { - __typename: "Plugin"; - id: string; - name: string; - description: string; - globalConfiguration: PluginsDetailsFragment_globalConfiguration | null; - channelConfigurations: PluginsDetailsFragment_channelConfigurations[]; -} diff --git a/src/fragments/types/PreorderFragment.ts b/src/fragments/types/PreorderFragment.ts deleted file mode 100644 index 23cd59b75..000000000 --- a/src/fragments/types/PreorderFragment.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: PreorderFragment -// ==================================================== - -export interface PreorderFragment { - __typename: "PreorderData"; - globalThreshold: number | null; - globalSoldUnits: number; - endDate: any | null; -} diff --git a/src/fragments/types/PriceRangeFragment.ts b/src/fragments/types/PriceRangeFragment.ts deleted file mode 100644 index dbb5451b4..000000000 --- a/src/fragments/types/PriceRangeFragment.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: PriceRangeFragment -// ==================================================== - -export interface PriceRangeFragment_start_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface PriceRangeFragment_start { - __typename: "TaxedMoney"; - net: PriceRangeFragment_start_net; -} - -export interface PriceRangeFragment_stop_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface PriceRangeFragment_stop { - __typename: "TaxedMoney"; - net: PriceRangeFragment_stop_net; -} - -export interface PriceRangeFragment { - __typename: "TaxedMoneyRange"; - start: PriceRangeFragment_start | null; - stop: PriceRangeFragment_stop | null; -} diff --git a/src/fragments/types/Product.ts b/src/fragments/types/Product.ts deleted file mode 100644 index 6e7292fe3..000000000 --- a/src/fragments/types/Product.ts +++ /dev/null @@ -1,319 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: Product -// ==================================================== - -export interface Product_attributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface Product_attributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface Product_attributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: Product_attributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface Product_attributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: Product_attributes_attribute_choices_edges_node; -} - -export interface Product_attributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: Product_attributes_attribute_choices_pageInfo; - edges: Product_attributes_attribute_choices_edges[]; -} - -export interface Product_attributes_attribute { - __typename: "Attribute"; - id: string; - slug: string | null; - name: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: Product_attributes_attribute_choices | null; -} - -export interface Product_attributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface Product_attributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: Product_attributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface Product_attributes { - __typename: "SelectedAttribute"; - attribute: Product_attributes_attribute; - values: (Product_attributes_values | null)[]; -} - -export interface Product_productType_variantAttributes_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface Product_productType_variantAttributes_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface Product_productType_variantAttributes_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: Product_productType_variantAttributes_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface Product_productType_variantAttributes_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: Product_productType_variantAttributes_choices_edges_node; -} - -export interface Product_productType_variantAttributes_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: Product_productType_variantAttributes_choices_pageInfo; - edges: Product_productType_variantAttributes_choices_edges[]; -} - -export interface Product_productType_variantAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - inputType: AttributeInputTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: Product_productType_variantAttributes_choices | null; -} - -export interface Product_productType_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface Product_productType { - __typename: "ProductType"; - id: string; - variantAttributes: (Product_productType_variantAttributes | null)[] | null; - name: string; - hasVariants: boolean; - taxType: Product_productType_taxType | null; -} - -export interface Product_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface Product_channelListings { - __typename: "ProductChannelListing"; - channel: Product_channelListings_channel; - isPublished: boolean; - publicationDate: any | null; - isAvailableForPurchase: boolean | null; - availableForPurchase: any | null; - visibleInListings: boolean; -} - -export interface Product_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface Product_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface Product_defaultVariant { - __typename: "ProductVariant"; - id: string; -} - -export interface Product_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface Product_collections { - __typename: "Collection"; - id: string; - name: string; -} - -export interface Product_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface Product_variants_media { - __typename: "ProductMedia"; - url: string; -} - -export interface Product_variants_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface Product_variants_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: Product_variants_stocks_warehouse; -} - -export interface Product_variants_preorder { - __typename: "PreorderData"; - globalThreshold: number | null; - globalSoldUnits: number; - endDate: any | null; -} - -export interface Product_variants_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface Product_variants_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface Product_variants_channelListings_costPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface Product_variants_channelListings_preorderThreshold { - __typename: "PreorderThreshold"; - quantity: number | null; - soldUnits: number; -} - -export interface Product_variants_channelListings { - __typename: "ProductVariantChannelListing"; - channel: Product_variants_channelListings_channel; - price: Product_variants_channelListings_price | null; - costPrice: Product_variants_channelListings_costPrice | null; - preorderThreshold: Product_variants_channelListings_preorderThreshold | null; -} - -export interface Product_variants { - __typename: "ProductVariant"; - id: string; - sku: string | null; - name: string; - margin: number | null; - media: Product_variants_media[] | null; - stocks: (Product_variants_stocks | null)[] | null; - trackInventory: boolean; - preorder: Product_variants_preorder | null; - channelListings: Product_variants_channelListings[] | null; - quantityLimitPerCustomer: number | null; -} - -export interface Product_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface Product_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface Product { - __typename: "Product"; - id: string; - attributes: Product_attributes[]; - productType: Product_productType; - channelListings: Product_channelListings[] | null; - metadata: (Product_metadata | null)[]; - privateMetadata: (Product_privateMetadata | null)[]; - name: string; - slug: string; - description: any | null; - seoTitle: string | null; - seoDescription: string | null; - rating: number | null; - defaultVariant: Product_defaultVariant | null; - category: Product_category | null; - collections: (Product_collections | null)[] | null; - chargeTaxes: boolean; - media: Product_media[] | null; - isAvailable: boolean | null; - variants: (Product_variants | null)[] | null; - weight: Product_weight | null; - taxType: Product_taxType | null; -} diff --git a/src/fragments/types/ProductAttributeAssignErrorFragment.ts b/src/fragments/types/ProductAttributeAssignErrorFragment.ts deleted file mode 100644 index b64554333..000000000 --- a/src/fragments/types/ProductAttributeAssignErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductAttributeAssignErrorFragment -// ==================================================== - -export interface ProductAttributeAssignErrorFragment { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/ProductAttributeAssignmentUpdateErrorFragment.ts b/src/fragments/types/ProductAttributeAssignmentUpdateErrorFragment.ts deleted file mode 100644 index 65ed60dfd..000000000 --- a/src/fragments/types/ProductAttributeAssignmentUpdateErrorFragment.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductAttributeAssignmentUpdateErrorFragment -// ==================================================== - -export interface ProductAttributeAssignmentUpdateErrorFragment { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; - attributes: string[] | null; -} diff --git a/src/fragments/types/ProductAttributeUnassignErrorFragment.ts b/src/fragments/types/ProductAttributeUnassignErrorFragment.ts deleted file mode 100644 index 3d7cd87ae..000000000 --- a/src/fragments/types/ProductAttributeUnassignErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductAttributeUnassignErrorFragment -// ==================================================== - -export interface ProductAttributeUnassignErrorFragment { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/ProductChannelListingErrorFragment.ts b/src/fragments/types/ProductChannelListingErrorFragment.ts deleted file mode 100644 index 4949a3003..000000000 --- a/src/fragments/types/ProductChannelListingErrorFragment.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductChannelListingErrorFragment -// ==================================================== - -export interface ProductChannelListingErrorFragment { - __typename: "ProductChannelListingError"; - code: ProductErrorCode; - field: string | null; - message: string | null; - channels: string[] | null; -} diff --git a/src/fragments/types/ProductErrorFragment.ts b/src/fragments/types/ProductErrorFragment.ts deleted file mode 100644 index 99525ee0c..000000000 --- a/src/fragments/types/ProductErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductErrorFragment -// ==================================================== - -export interface ProductErrorFragment { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/ProductErrorWithAttributesFragment.ts b/src/fragments/types/ProductErrorWithAttributesFragment.ts deleted file mode 100644 index 9d10e8cab..000000000 --- a/src/fragments/types/ProductErrorWithAttributesFragment.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductErrorWithAttributesFragment -// ==================================================== - -export interface ProductErrorWithAttributesFragment { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; - attributes: string[] | null; -} diff --git a/src/fragments/types/ProductFragment.ts b/src/fragments/types/ProductFragment.ts deleted file mode 100644 index 3b5714df2..000000000 --- a/src/fragments/types/ProductFragment.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: ProductFragment -// ==================================================== - -export interface ProductFragment_thumbnail { - __typename: "Image"; - url: string; -} - -export interface ProductFragment_productType { - __typename: "ProductType"; - id: string; - name: string; - hasVariants: boolean; -} - -export interface ProductFragment_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ProductFragment_channelListings_pricing_priceRange_start_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductFragment_channelListings_pricing_priceRange_start { - __typename: "TaxedMoney"; - net: ProductFragment_channelListings_pricing_priceRange_start_net; -} - -export interface ProductFragment_channelListings_pricing_priceRange_stop_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductFragment_channelListings_pricing_priceRange_stop { - __typename: "TaxedMoney"; - net: ProductFragment_channelListings_pricing_priceRange_stop_net; -} - -export interface ProductFragment_channelListings_pricing_priceRange { - __typename: "TaxedMoneyRange"; - start: ProductFragment_channelListings_pricing_priceRange_start | null; - stop: ProductFragment_channelListings_pricing_priceRange_stop | null; -} - -export interface ProductFragment_channelListings_pricing { - __typename: "ProductPricingInfo"; - priceRange: ProductFragment_channelListings_pricing_priceRange | null; -} - -export interface ProductFragment_channelListings { - __typename: "ProductChannelListing"; - isPublished: boolean; - publicationDate: any | null; - isAvailableForPurchase: boolean | null; - availableForPurchase: any | null; - visibleInListings: boolean; - channel: ProductFragment_channelListings_channel; - pricing: ProductFragment_channelListings_pricing | null; -} - -export interface ProductFragment { - __typename: "Product"; - id: string; - name: string; - thumbnail: ProductFragment_thumbnail | null; - productType: ProductFragment_productType; - channelListings: ProductFragment_channelListings[] | null; -} diff --git a/src/fragments/types/ProductMediaFragment.ts b/src/fragments/types/ProductMediaFragment.ts deleted file mode 100644 index 485cf6d08..000000000 --- a/src/fragments/types/ProductMediaFragment.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductMediaType } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductMediaFragment -// ==================================================== - -export interface ProductMediaFragment { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} diff --git a/src/fragments/types/ProductTranslateErrorFragment.ts b/src/fragments/types/ProductTranslateErrorFragment.ts deleted file mode 100644 index b848743d7..000000000 --- a/src/fragments/types/ProductTranslateErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { TranslationErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductTranslateErrorFragment -// ==================================================== - -export interface ProductTranslateErrorFragment { - __typename: "TranslationError"; - code: TranslationErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/ProductTranslationFragment.ts b/src/fragments/types/ProductTranslationFragment.ts deleted file mode 100644 index f8f8147e8..000000000 --- a/src/fragments/types/ProductTranslationFragment.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductTranslationFragment -// ==================================================== - -export interface ProductTranslationFragment_product { - __typename: "Product"; - id: string; - name: string; - description: any | null; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface ProductTranslationFragment_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface ProductTranslationFragment_translation { - __typename: "ProductTranslation"; - id: string; - seoTitle: string | null; - seoDescription: string | null; - name: string | null; - description: any | null; - language: ProductTranslationFragment_translation_language; -} - -export interface ProductTranslationFragment_attributeValues_attributeValue { - __typename: "AttributeValue"; - id: string; -} - -export interface ProductTranslationFragment_attributeValues_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface ProductTranslationFragment_attributeValues_translation { - __typename: "AttributeValueTranslation"; - id: string; - name: string; - richText: any | null; - language: ProductTranslationFragment_attributeValues_translation_language; -} - -export interface ProductTranslationFragment_attributeValues { - __typename: "AttributeValueTranslatableContent"; - id: string; - name: string; - richText: any | null; - attributeValue: ProductTranslationFragment_attributeValues_attributeValue | null; - translation: ProductTranslationFragment_attributeValues_translation | null; -} - -export interface ProductTranslationFragment { - __typename: "ProductTranslatableContent"; - product: ProductTranslationFragment_product | null; - translation: ProductTranslationFragment_translation | null; - attributeValues: ProductTranslationFragment_attributeValues[]; -} diff --git a/src/fragments/types/ProductTypeBulkDeleteErrorFragment.ts b/src/fragments/types/ProductTypeBulkDeleteErrorFragment.ts deleted file mode 100644 index f7f37fbb6..000000000 --- a/src/fragments/types/ProductTypeBulkDeleteErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductTypeBulkDeleteErrorFragment -// ==================================================== - -export interface ProductTypeBulkDeleteErrorFragment { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/ProductTypeBulkUpdateErrorFragment.ts b/src/fragments/types/ProductTypeBulkUpdateErrorFragment.ts deleted file mode 100644 index 5aeeb3473..000000000 --- a/src/fragments/types/ProductTypeBulkUpdateErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductTypeBulkUpdateErrorFragment -// ==================================================== - -export interface ProductTypeBulkUpdateErrorFragment { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/ProductTypeCreateErrorFragment.ts b/src/fragments/types/ProductTypeCreateErrorFragment.ts deleted file mode 100644 index 3010e7bd9..000000000 --- a/src/fragments/types/ProductTypeCreateErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductTypeCreateErrorFragment -// ==================================================== - -export interface ProductTypeCreateErrorFragment { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/ProductTypeDeleteErrorFragment.ts b/src/fragments/types/ProductTypeDeleteErrorFragment.ts deleted file mode 100644 index d9fe185a6..000000000 --- a/src/fragments/types/ProductTypeDeleteErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductTypeDeleteErrorFragment -// ==================================================== - -export interface ProductTypeDeleteErrorFragment { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/ProductTypeDetailsFragment.ts b/src/fragments/types/ProductTypeDetailsFragment.ts deleted file mode 100644 index 6f81a58b7..000000000 --- a/src/fragments/types/ProductTypeDetailsFragment.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductTypeKindEnum, AttributeTypeEnum, MeasurementUnitsEnum, AttributeInputTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductTypeDetailsFragment -// ==================================================== - -export interface ProductTypeDetailsFragment_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface ProductTypeDetailsFragment_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductTypeDetailsFragment_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductTypeDetailsFragment_productAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface ProductTypeDetailsFragment_variantAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface ProductTypeDetailsFragment_assignedVariantAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface ProductTypeDetailsFragment_assignedVariantAttributes { - __typename: "AssignedVariantAttribute"; - attribute: ProductTypeDetailsFragment_assignedVariantAttributes_attribute; - variantSelection: boolean; -} - -export interface ProductTypeDetailsFragment_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ProductTypeDetailsFragment { - __typename: "ProductType"; - id: string; - name: string; - kind: ProductTypeKindEnum; - hasVariants: boolean; - isShippingRequired: boolean; - taxType: ProductTypeDetailsFragment_taxType | null; - metadata: (ProductTypeDetailsFragment_metadata | null)[]; - privateMetadata: (ProductTypeDetailsFragment_privateMetadata | null)[]; - productAttributes: (ProductTypeDetailsFragment_productAttributes | null)[] | null; - variantAttributes: (ProductTypeDetailsFragment_variantAttributes | null)[] | null; - assignedVariantAttributes: (ProductTypeDetailsFragment_assignedVariantAttributes | null)[] | null; - weight: ProductTypeDetailsFragment_weight | null; -} diff --git a/src/fragments/types/ProductTypeFragment.ts b/src/fragments/types/ProductTypeFragment.ts deleted file mode 100644 index 46f0d4a6f..000000000 --- a/src/fragments/types/ProductTypeFragment.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductTypeKindEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductTypeFragment -// ==================================================== - -export interface ProductTypeFragment_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface ProductTypeFragment { - __typename: "ProductType"; - id: string; - name: string; - kind: ProductTypeKindEnum; - hasVariants: boolean; - isShippingRequired: boolean; - taxType: ProductTypeFragment_taxType | null; -} diff --git a/src/fragments/types/ProductTypeReorderAttributesErrorFragment.ts b/src/fragments/types/ProductTypeReorderAttributesErrorFragment.ts deleted file mode 100644 index e9db3b71c..000000000 --- a/src/fragments/types/ProductTypeReorderAttributesErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductTypeReorderAttributesErrorFragment -// ==================================================== - -export interface ProductTypeReorderAttributesErrorFragment { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/ProductVariant.ts b/src/fragments/types/ProductVariant.ts deleted file mode 100644 index 4669708cc..000000000 --- a/src/fragments/types/ProductVariant.ts +++ /dev/null @@ -1,326 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductVariant -// ==================================================== - -export interface ProductVariant_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductVariant_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductVariant_selectionAttributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface ProductVariant_selectionAttributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductVariant_selectionAttributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductVariant_selectionAttributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface ProductVariant_selectionAttributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: ProductVariant_selectionAttributes_attribute_choices_edges_node; -} - -export interface ProductVariant_selectionAttributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: ProductVariant_selectionAttributes_attribute_choices_pageInfo; - edges: ProductVariant_selectionAttributes_attribute_choices_edges[]; -} - -export interface ProductVariant_selectionAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: ProductVariant_selectionAttributes_attribute_choices | null; -} - -export interface ProductVariant_selectionAttributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductVariant_selectionAttributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductVariant_selectionAttributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface ProductVariant_selectionAttributes { - __typename: "SelectedAttribute"; - attribute: ProductVariant_selectionAttributes_attribute; - values: (ProductVariant_selectionAttributes_values | null)[]; -} - -export interface ProductVariant_nonSelectionAttributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface ProductVariant_nonSelectionAttributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductVariant_nonSelectionAttributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductVariant_nonSelectionAttributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface ProductVariant_nonSelectionAttributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: ProductVariant_nonSelectionAttributes_attribute_choices_edges_node; -} - -export interface ProductVariant_nonSelectionAttributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: ProductVariant_nonSelectionAttributes_attribute_choices_pageInfo; - edges: ProductVariant_nonSelectionAttributes_attribute_choices_edges[]; -} - -export interface ProductVariant_nonSelectionAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: ProductVariant_nonSelectionAttributes_attribute_choices | null; -} - -export interface ProductVariant_nonSelectionAttributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductVariant_nonSelectionAttributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductVariant_nonSelectionAttributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface ProductVariant_nonSelectionAttributes { - __typename: "SelectedAttribute"; - attribute: ProductVariant_nonSelectionAttributes_attribute; - values: (ProductVariant_nonSelectionAttributes_values | null)[]; -} - -export interface ProductVariant_media { - __typename: "ProductMedia"; - id: string; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface ProductVariant_product_defaultVariant { - __typename: "ProductVariant"; - id: string; -} - -export interface ProductVariant_product_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface ProductVariant_product_thumbnail { - __typename: "Image"; - url: string; -} - -export interface ProductVariant_product_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ProductVariant_product_channelListings { - __typename: "ProductChannelListing"; - publicationDate: any | null; - isPublished: boolean; - channel: ProductVariant_product_channelListings_channel; -} - -export interface ProductVariant_product_variants_media { - __typename: "ProductMedia"; - id: string; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface ProductVariant_product_variants { - __typename: "ProductVariant"; - id: string; - name: string; - sku: string | null; - media: ProductVariant_product_variants_media[] | null; -} - -export interface ProductVariant_product { - __typename: "Product"; - id: string; - defaultVariant: ProductVariant_product_defaultVariant | null; - media: ProductVariant_product_media[] | null; - name: string; - thumbnail: ProductVariant_product_thumbnail | null; - channelListings: ProductVariant_product_channelListings[] | null; - variants: (ProductVariant_product_variants | null)[] | null; -} - -export interface ProductVariant_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ProductVariant_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductVariant_channelListings_costPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductVariant_channelListings_preorderThreshold { - __typename: "PreorderThreshold"; - quantity: number | null; - soldUnits: number; -} - -export interface ProductVariant_channelListings { - __typename: "ProductVariantChannelListing"; - channel: ProductVariant_channelListings_channel; - price: ProductVariant_channelListings_price | null; - costPrice: ProductVariant_channelListings_costPrice | null; - preorderThreshold: ProductVariant_channelListings_preorderThreshold | null; -} - -export interface ProductVariant_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface ProductVariant_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: ProductVariant_stocks_warehouse; -} - -export interface ProductVariant_preorder { - __typename: "PreorderData"; - globalThreshold: number | null; - globalSoldUnits: number; - endDate: any | null; -} - -export interface ProductVariant_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ProductVariant { - __typename: "ProductVariant"; - id: string; - metadata: (ProductVariant_metadata | null)[]; - privateMetadata: (ProductVariant_privateMetadata | null)[]; - selectionAttributes: ProductVariant_selectionAttributes[]; - nonSelectionAttributes: ProductVariant_nonSelectionAttributes[]; - media: ProductVariant_media[] | null; - name: string; - product: ProductVariant_product; - channelListings: ProductVariant_channelListings[] | null; - sku: string | null; - stocks: (ProductVariant_stocks | null)[] | null; - trackInventory: boolean; - preorder: ProductVariant_preorder | null; - weight: ProductVariant_weight | null; - quantityLimitPerCustomer: number | null; -} diff --git a/src/fragments/types/ProductVariantAttributesFragment.ts b/src/fragments/types/ProductVariantAttributesFragment.ts deleted file mode 100644 index d02514c6a..000000000 --- a/src/fragments/types/ProductVariantAttributesFragment.ts +++ /dev/null @@ -1,164 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductVariantAttributesFragment -// ==================================================== - -export interface ProductVariantAttributesFragment_attributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface ProductVariantAttributesFragment_attributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductVariantAttributesFragment_attributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductVariantAttributesFragment_attributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface ProductVariantAttributesFragment_attributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: ProductVariantAttributesFragment_attributes_attribute_choices_edges_node; -} - -export interface ProductVariantAttributesFragment_attributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: ProductVariantAttributesFragment_attributes_attribute_choices_pageInfo; - edges: ProductVariantAttributesFragment_attributes_attribute_choices_edges[]; -} - -export interface ProductVariantAttributesFragment_attributes_attribute { - __typename: "Attribute"; - id: string; - slug: string | null; - name: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: ProductVariantAttributesFragment_attributes_attribute_choices | null; -} - -export interface ProductVariantAttributesFragment_attributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductVariantAttributesFragment_attributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductVariantAttributesFragment_attributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface ProductVariantAttributesFragment_attributes { - __typename: "SelectedAttribute"; - attribute: ProductVariantAttributesFragment_attributes_attribute; - values: (ProductVariantAttributesFragment_attributes_values | null)[]; -} - -export interface ProductVariantAttributesFragment_productType_variantAttributes_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface ProductVariantAttributesFragment_productType_variantAttributes_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductVariantAttributesFragment_productType_variantAttributes_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductVariantAttributesFragment_productType_variantAttributes_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface ProductVariantAttributesFragment_productType_variantAttributes_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: ProductVariantAttributesFragment_productType_variantAttributes_choices_edges_node; -} - -export interface ProductVariantAttributesFragment_productType_variantAttributes_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: ProductVariantAttributesFragment_productType_variantAttributes_choices_pageInfo; - edges: ProductVariantAttributesFragment_productType_variantAttributes_choices_edges[]; -} - -export interface ProductVariantAttributesFragment_productType_variantAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - inputType: AttributeInputTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: ProductVariantAttributesFragment_productType_variantAttributes_choices | null; -} - -export interface ProductVariantAttributesFragment_productType { - __typename: "ProductType"; - id: string; - variantAttributes: (ProductVariantAttributesFragment_productType_variantAttributes | null)[] | null; -} - -export interface ProductVariantAttributesFragment_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ProductVariantAttributesFragment_channelListings { - __typename: "ProductChannelListing"; - channel: ProductVariantAttributesFragment_channelListings_channel; -} - -export interface ProductVariantAttributesFragment { - __typename: "Product"; - id: string; - attributes: ProductVariantAttributesFragment_attributes[]; - productType: ProductVariantAttributesFragment_productType; - channelListings: ProductVariantAttributesFragment_channelListings[] | null; -} diff --git a/src/fragments/types/ProductVariantStocksDeleteErrorFragment.ts b/src/fragments/types/ProductVariantStocksDeleteErrorFragment.ts deleted file mode 100644 index a284e6561..000000000 --- a/src/fragments/types/ProductVariantStocksDeleteErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { StockErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductVariantStocksDeleteErrorFragment -// ==================================================== - -export interface ProductVariantStocksDeleteErrorFragment { - __typename: "StockError"; - code: StockErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/ProductVariantTranslateErrorFragment.ts b/src/fragments/types/ProductVariantTranslateErrorFragment.ts deleted file mode 100644 index 96f73fa20..000000000 --- a/src/fragments/types/ProductVariantTranslateErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { TranslationErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductVariantTranslateErrorFragment -// ==================================================== - -export interface ProductVariantTranslateErrorFragment { - __typename: "TranslationError"; - code: TranslationErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/ProductVariantTranslationFragment.ts b/src/fragments/types/ProductVariantTranslationFragment.ts deleted file mode 100644 index 686986bb3..000000000 --- a/src/fragments/types/ProductVariantTranslationFragment.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductVariantTranslationFragment -// ==================================================== - -export interface ProductVariantTranslationFragment_productVariant { - __typename: "ProductVariant"; - id: string; -} - -export interface ProductVariantTranslationFragment_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface ProductVariantTranslationFragment_translation { - __typename: "ProductVariantTranslation"; - id: string; - name: string; - language: ProductVariantTranslationFragment_translation_language; -} - -export interface ProductVariantTranslationFragment_attributeValues_attributeValue { - __typename: "AttributeValue"; - id: string; -} - -export interface ProductVariantTranslationFragment_attributeValues_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface ProductVariantTranslationFragment_attributeValues_translation { - __typename: "AttributeValueTranslation"; - id: string; - name: string; - richText: any | null; - language: ProductVariantTranslationFragment_attributeValues_translation_language; -} - -export interface ProductVariantTranslationFragment_attributeValues { - __typename: "AttributeValueTranslatableContent"; - id: string; - name: string; - richText: any | null; - attributeValue: ProductVariantTranslationFragment_attributeValues_attributeValue | null; - translation: ProductVariantTranslationFragment_attributeValues_translation | null; -} - -export interface ProductVariantTranslationFragment { - __typename: "ProductVariantTranslatableContent"; - productVariant: ProductVariantTranslationFragment_productVariant | null; - name: string; - translation: ProductVariantTranslationFragment_translation | null; - attributeValues: ProductVariantTranslationFragment_attributeValues[]; -} diff --git a/src/fragments/types/RefundOrderLineFragment.ts b/src/fragments/types/RefundOrderLineFragment.ts deleted file mode 100644 index a54d1149c..000000000 --- a/src/fragments/types/RefundOrderLineFragment.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: RefundOrderLineFragment -// ==================================================== - -export interface RefundOrderLineFragment_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface RefundOrderLineFragment_unitPrice { - __typename: "TaxedMoney"; - gross: RefundOrderLineFragment_unitPrice_gross; -} - -export interface RefundOrderLineFragment_thumbnail { - __typename: "Image"; - url: string; -} - -export interface RefundOrderLineFragment { - __typename: "OrderLine"; - id: string; - productName: string; - quantity: number; - unitPrice: RefundOrderLineFragment_unitPrice; - thumbnail: RefundOrderLineFragment_thumbnail | null; -} diff --git a/src/fragments/types/SaleBulkDeleteError.ts b/src/fragments/types/SaleBulkDeleteError.ts deleted file mode 100644 index 35209f7c6..000000000 --- a/src/fragments/types/SaleBulkDeleteError.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { DiscountErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: SaleBulkDeleteError -// ==================================================== - -export interface SaleBulkDeleteError { - __typename: "DiscountError"; - code: DiscountErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/SaleDetailsFragment.ts b/src/fragments/types/SaleDetailsFragment.ts deleted file mode 100644 index 78827b11c..000000000 --- a/src/fragments/types/SaleDetailsFragment.ts +++ /dev/null @@ -1,238 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { SaleType } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: SaleDetailsFragment -// ==================================================== - -export interface SaleDetailsFragment_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface SaleDetailsFragment_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface SaleDetailsFragment_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface SaleDetailsFragment_channelListings { - __typename: "SaleChannelListing"; - id: string; - channel: SaleDetailsFragment_channelListings_channel; - discountValue: number; - currency: string; -} - -export interface SaleDetailsFragment_variants_edges_node_product_thumbnail { - __typename: "Image"; - url: string; -} - -export interface SaleDetailsFragment_variants_edges_node_product_productType { - __typename: "ProductType"; - id: string; - name: string; -} - -export interface SaleDetailsFragment_variants_edges_node_product_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface SaleDetailsFragment_variants_edges_node_product_channelListings { - __typename: "ProductChannelListing"; - isPublished: boolean; - publicationDate: any | null; - isAvailableForPurchase: boolean | null; - availableForPurchase: any | null; - visibleInListings: boolean; - channel: SaleDetailsFragment_variants_edges_node_product_channelListings_channel; -} - -export interface SaleDetailsFragment_variants_edges_node_product { - __typename: "Product"; - id: string; - name: string; - thumbnail: SaleDetailsFragment_variants_edges_node_product_thumbnail | null; - productType: SaleDetailsFragment_variants_edges_node_product_productType; - channelListings: SaleDetailsFragment_variants_edges_node_product_channelListings[] | null; -} - -export interface SaleDetailsFragment_variants_edges_node { - __typename: "ProductVariant"; - id: string; - name: string; - product: SaleDetailsFragment_variants_edges_node_product; -} - -export interface SaleDetailsFragment_variants_edges { - __typename: "ProductVariantCountableEdge"; - node: SaleDetailsFragment_variants_edges_node; -} - -export interface SaleDetailsFragment_variants_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SaleDetailsFragment_variants { - __typename: "ProductVariantCountableConnection"; - edges: SaleDetailsFragment_variants_edges[]; - pageInfo: SaleDetailsFragment_variants_pageInfo; - totalCount: number | null; -} - -export interface SaleDetailsFragment_products_edges_node_productType { - __typename: "ProductType"; - id: string; - name: string; -} - -export interface SaleDetailsFragment_products_edges_node_thumbnail { - __typename: "Image"; - url: string; -} - -export interface SaleDetailsFragment_products_edges_node_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface SaleDetailsFragment_products_edges_node_channelListings { - __typename: "ProductChannelListing"; - isPublished: boolean; - publicationDate: any | null; - isAvailableForPurchase: boolean | null; - availableForPurchase: any | null; - visibleInListings: boolean; - channel: SaleDetailsFragment_products_edges_node_channelListings_channel; -} - -export interface SaleDetailsFragment_products_edges_node { - __typename: "Product"; - id: string; - name: string; - productType: SaleDetailsFragment_products_edges_node_productType; - thumbnail: SaleDetailsFragment_products_edges_node_thumbnail | null; - channelListings: SaleDetailsFragment_products_edges_node_channelListings[] | null; -} - -export interface SaleDetailsFragment_products_edges { - __typename: "ProductCountableEdge"; - node: SaleDetailsFragment_products_edges_node; -} - -export interface SaleDetailsFragment_products_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SaleDetailsFragment_products { - __typename: "ProductCountableConnection"; - edges: SaleDetailsFragment_products_edges[]; - pageInfo: SaleDetailsFragment_products_pageInfo; - totalCount: number | null; -} - -export interface SaleDetailsFragment_categories_edges_node_products { - __typename: "ProductCountableConnection"; - totalCount: number | null; -} - -export interface SaleDetailsFragment_categories_edges_node { - __typename: "Category"; - id: string; - name: string; - products: SaleDetailsFragment_categories_edges_node_products | null; -} - -export interface SaleDetailsFragment_categories_edges { - __typename: "CategoryCountableEdge"; - node: SaleDetailsFragment_categories_edges_node; -} - -export interface SaleDetailsFragment_categories_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SaleDetailsFragment_categories { - __typename: "CategoryCountableConnection"; - edges: SaleDetailsFragment_categories_edges[]; - pageInfo: SaleDetailsFragment_categories_pageInfo; - totalCount: number | null; -} - -export interface SaleDetailsFragment_collections_edges_node_products { - __typename: "ProductCountableConnection"; - totalCount: number | null; -} - -export interface SaleDetailsFragment_collections_edges_node { - __typename: "Collection"; - id: string; - name: string; - products: SaleDetailsFragment_collections_edges_node_products | null; -} - -export interface SaleDetailsFragment_collections_edges { - __typename: "CollectionCountableEdge"; - node: SaleDetailsFragment_collections_edges_node; -} - -export interface SaleDetailsFragment_collections_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SaleDetailsFragment_collections { - __typename: "CollectionCountableConnection"; - edges: SaleDetailsFragment_collections_edges[]; - pageInfo: SaleDetailsFragment_collections_pageInfo; - totalCount: number | null; -} - -export interface SaleDetailsFragment { - __typename: "Sale"; - metadata: (SaleDetailsFragment_metadata | null)[]; - privateMetadata: (SaleDetailsFragment_privateMetadata | null)[]; - id: string; - name: string; - type: SaleType; - startDate: any; - endDate: any | null; - channelListings: SaleDetailsFragment_channelListings[] | null; - variants: SaleDetailsFragment_variants | null; - products: SaleDetailsFragment_products | null; - categories: SaleDetailsFragment_categories | null; - collections: SaleDetailsFragment_collections | null; -} diff --git a/src/fragments/types/SaleFragment.ts b/src/fragments/types/SaleFragment.ts deleted file mode 100644 index 474ffb0be..000000000 --- a/src/fragments/types/SaleFragment.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { SaleType } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: SaleFragment -// ==================================================== - -export interface SaleFragment_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface SaleFragment_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface SaleFragment_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface SaleFragment_channelListings { - __typename: "SaleChannelListing"; - id: string; - channel: SaleFragment_channelListings_channel; - discountValue: number; - currency: string; -} - -export interface SaleFragment { - __typename: "Sale"; - metadata: (SaleFragment_metadata | null)[]; - privateMetadata: (SaleFragment_privateMetadata | null)[]; - id: string; - name: string; - type: SaleType; - startDate: any; - endDate: any | null; - channelListings: SaleFragment_channelListings[] | null; -} diff --git a/src/fragments/types/SaleTranslateErrorFragment.ts b/src/fragments/types/SaleTranslateErrorFragment.ts deleted file mode 100644 index 5cce92e80..000000000 --- a/src/fragments/types/SaleTranslateErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { TranslationErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: SaleTranslateErrorFragment -// ==================================================== - -export interface SaleTranslateErrorFragment { - __typename: "TranslationError"; - code: TranslationErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/SaleTranslationFragment.ts b/src/fragments/types/SaleTranslationFragment.ts deleted file mode 100644 index e04108908..000000000 --- a/src/fragments/types/SaleTranslationFragment.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: SaleTranslationFragment -// ==================================================== - -export interface SaleTranslationFragment_sale { - __typename: "Sale"; - id: string; - name: string; -} - -export interface SaleTranslationFragment_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface SaleTranslationFragment_translation { - __typename: "SaleTranslation"; - id: string; - language: SaleTranslationFragment_translation_language; - name: string | null; -} - -export interface SaleTranslationFragment { - __typename: "SaleTranslatableContent"; - sale: SaleTranslationFragment_sale | null; - translation: SaleTranslationFragment_translation | null; -} diff --git a/src/fragments/types/SelectedProductTypeVariantAttributeFragment.ts b/src/fragments/types/SelectedProductTypeVariantAttributeFragment.ts deleted file mode 100644 index bafacf0ff..000000000 --- a/src/fragments/types/SelectedProductTypeVariantAttributeFragment.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: SelectedProductTypeVariantAttributeFragment -// ==================================================== - -export interface SelectedProductTypeVariantAttributeFragment_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SelectedProductTypeVariantAttributeFragment_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SelectedProductTypeVariantAttributeFragment_values_file | null; -} - -export interface SelectedProductTypeVariantAttributeFragment { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - valueRequired: boolean; - values: (SelectedProductTypeVariantAttributeFragment_values | null)[] | null; -} diff --git a/src/fragments/types/SelectedProductVariantAttributeFragment.ts b/src/fragments/types/SelectedProductVariantAttributeFragment.ts deleted file mode 100644 index 022e8e277..000000000 --- a/src/fragments/types/SelectedProductVariantAttributeFragment.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: SelectedProductVariantAttributeFragment -// ==================================================== - -export interface SelectedProductVariantAttributeFragment_attribute_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SelectedProductVariantAttributeFragment_attribute_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SelectedProductVariantAttributeFragment_attribute_values_file | null; -} - -export interface SelectedProductVariantAttributeFragment_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - valueRequired: boolean; - values: (SelectedProductVariantAttributeFragment_attribute_values | null)[] | null; -} - -export interface SelectedProductVariantAttributeFragment_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SelectedProductVariantAttributeFragment_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SelectedProductVariantAttributeFragment_values_file | null; -} - -export interface SelectedProductVariantAttributeFragment { - __typename: "SelectedAttribute"; - attribute: SelectedProductVariantAttributeFragment_attribute; - values: (SelectedProductVariantAttributeFragment_values | null)[]; -} diff --git a/src/fragments/types/SelectedVariantAttributeFragment.ts b/src/fragments/types/SelectedVariantAttributeFragment.ts deleted file mode 100644 index 0e2f6df20..000000000 --- a/src/fragments/types/SelectedVariantAttributeFragment.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: SelectedVariantAttributeFragment -// ==================================================== - -export interface SelectedVariantAttributeFragment_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SelectedVariantAttributeFragment_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SelectedVariantAttributeFragment_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SelectedVariantAttributeFragment_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SelectedVariantAttributeFragment_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: SelectedVariantAttributeFragment_attribute_choices_edges_node; -} - -export interface SelectedVariantAttributeFragment_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: SelectedVariantAttributeFragment_attribute_choices_pageInfo; - edges: SelectedVariantAttributeFragment_attribute_choices_edges[]; -} - -export interface SelectedVariantAttributeFragment_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: SelectedVariantAttributeFragment_attribute_choices | null; -} - -export interface SelectedVariantAttributeFragment_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SelectedVariantAttributeFragment_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SelectedVariantAttributeFragment_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SelectedVariantAttributeFragment { - __typename: "SelectedAttribute"; - attribute: SelectedVariantAttributeFragment_attribute; - values: (SelectedVariantAttributeFragment_values | null)[]; -} diff --git a/src/fragments/types/ShippingChannelsErrorFragment.ts b/src/fragments/types/ShippingChannelsErrorFragment.ts deleted file mode 100644 index 6396f09eb..000000000 --- a/src/fragments/types/ShippingChannelsErrorFragment.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ShippingErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ShippingChannelsErrorFragment -// ==================================================== - -export interface ShippingChannelsErrorFragment { - __typename: "ShippingError"; - code: ShippingErrorCode; - field: string | null; - channels: string[] | null; - message: string | null; -} diff --git a/src/fragments/types/ShippingErrorFragment.ts b/src/fragments/types/ShippingErrorFragment.ts deleted file mode 100644 index a86b12767..000000000 --- a/src/fragments/types/ShippingErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ShippingErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ShippingErrorFragment -// ==================================================== - -export interface ShippingErrorFragment { - __typename: "ShippingError"; - code: ShippingErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/ShippingMethodTranslationFragment.ts b/src/fragments/types/ShippingMethodTranslationFragment.ts deleted file mode 100644 index e99f4a435..000000000 --- a/src/fragments/types/ShippingMethodTranslationFragment.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ShippingMethodTranslationFragment -// ==================================================== - -export interface ShippingMethodTranslationFragment_shippingMethod { - __typename: "ShippingMethodType"; - id: string; -} - -export interface ShippingMethodTranslationFragment_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface ShippingMethodTranslationFragment_translation { - __typename: "ShippingMethodTranslation"; - id: string; - language: ShippingMethodTranslationFragment_translation_language; - name: string | null; - description: any | null; -} - -export interface ShippingMethodTranslationFragment { - __typename: "ShippingMethodTranslatableContent"; - id: string; - name: string; - description: any | null; - shippingMethod: ShippingMethodTranslationFragment_shippingMethod | null; - translation: ShippingMethodTranslationFragment_translation | null; -} diff --git a/src/fragments/types/ShippingMethodTypeFragment.ts b/src/fragments/types/ShippingMethodTypeFragment.ts deleted file mode 100644 index b87cad6f2..000000000 --- a/src/fragments/types/ShippingMethodTypeFragment.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PostalCodeRuleInclusionTypeEnum, WeightUnitsEnum, ShippingMethodTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ShippingMethodTypeFragment -// ==================================================== - -export interface ShippingMethodTypeFragment_postalCodeRules { - __typename: "ShippingMethodPostalCodeRule"; - id: string; - inclusionType: PostalCodeRuleInclusionTypeEnum | null; - start: string | null; - end: string | null; -} - -export interface ShippingMethodTypeFragment_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingMethodTypeFragment_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingMethodTypeFragment_minimumOrderWeight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ShippingMethodTypeFragment_maximumOrderWeight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ShippingMethodTypeFragment_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ShippingMethodTypeFragment_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ShippingMethodTypeFragment_channelListings_minimumOrderPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ShippingMethodTypeFragment_channelListings_maximumOrderPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ShippingMethodTypeFragment_channelListings { - __typename: "ShippingMethodChannelListing"; - id: string; - channel: ShippingMethodTypeFragment_channelListings_channel; - price: ShippingMethodTypeFragment_channelListings_price | null; - minimumOrderPrice: ShippingMethodTypeFragment_channelListings_minimumOrderPrice | null; - maximumOrderPrice: ShippingMethodTypeFragment_channelListings_maximumOrderPrice | null; -} - -export interface ShippingMethodTypeFragment { - __typename: "ShippingMethodType"; - id: string; - postalCodeRules: (ShippingMethodTypeFragment_postalCodeRules | null)[] | null; - metadata: (ShippingMethodTypeFragment_metadata | null)[]; - privateMetadata: (ShippingMethodTypeFragment_privateMetadata | null)[]; - minimumOrderWeight: ShippingMethodTypeFragment_minimumOrderWeight | null; - maximumOrderWeight: ShippingMethodTypeFragment_maximumOrderWeight | null; - minimumDeliveryDays: number | null; - maximumDeliveryDays: number | null; - name: string; - description: any | null; - type: ShippingMethodTypeEnum | null; - channelListings: ShippingMethodTypeFragment_channelListings[] | null; -} diff --git a/src/fragments/types/ShippingMethodWithExcludedProductsFragment.ts b/src/fragments/types/ShippingMethodWithExcludedProductsFragment.ts deleted file mode 100644 index 07bd43b98..000000000 --- a/src/fragments/types/ShippingMethodWithExcludedProductsFragment.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PostalCodeRuleInclusionTypeEnum, WeightUnitsEnum, ShippingMethodTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ShippingMethodWithExcludedProductsFragment -// ==================================================== - -export interface ShippingMethodWithExcludedProductsFragment_postalCodeRules { - __typename: "ShippingMethodPostalCodeRule"; - id: string; - inclusionType: PostalCodeRuleInclusionTypeEnum | null; - start: string | null; - end: string | null; -} - -export interface ShippingMethodWithExcludedProductsFragment_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingMethodWithExcludedProductsFragment_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingMethodWithExcludedProductsFragment_minimumOrderWeight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ShippingMethodWithExcludedProductsFragment_maximumOrderWeight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ShippingMethodWithExcludedProductsFragment_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ShippingMethodWithExcludedProductsFragment_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ShippingMethodWithExcludedProductsFragment_channelListings_minimumOrderPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ShippingMethodWithExcludedProductsFragment_channelListings_maximumOrderPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ShippingMethodWithExcludedProductsFragment_channelListings { - __typename: "ShippingMethodChannelListing"; - id: string; - channel: ShippingMethodWithExcludedProductsFragment_channelListings_channel; - price: ShippingMethodWithExcludedProductsFragment_channelListings_price | null; - minimumOrderPrice: ShippingMethodWithExcludedProductsFragment_channelListings_minimumOrderPrice | null; - maximumOrderPrice: ShippingMethodWithExcludedProductsFragment_channelListings_maximumOrderPrice | null; -} - -export interface ShippingMethodWithExcludedProductsFragment_excludedProducts_pageInfo { - __typename: "PageInfo"; - hasNextPage: boolean; - hasPreviousPage: boolean; - endCursor: string | null; - startCursor: string | null; -} - -export interface ShippingMethodWithExcludedProductsFragment_excludedProducts_edges_node_thumbnail { - __typename: "Image"; - url: string; -} - -export interface ShippingMethodWithExcludedProductsFragment_excludedProducts_edges_node { - __typename: "Product"; - id: string; - name: string; - thumbnail: ShippingMethodWithExcludedProductsFragment_excludedProducts_edges_node_thumbnail | null; -} - -export interface ShippingMethodWithExcludedProductsFragment_excludedProducts_edges { - __typename: "ProductCountableEdge"; - node: ShippingMethodWithExcludedProductsFragment_excludedProducts_edges_node; -} - -export interface ShippingMethodWithExcludedProductsFragment_excludedProducts { - __typename: "ProductCountableConnection"; - pageInfo: ShippingMethodWithExcludedProductsFragment_excludedProducts_pageInfo; - edges: ShippingMethodWithExcludedProductsFragment_excludedProducts_edges[]; -} - -export interface ShippingMethodWithExcludedProductsFragment { - __typename: "ShippingMethodType"; - id: string; - postalCodeRules: (ShippingMethodWithExcludedProductsFragment_postalCodeRules | null)[] | null; - metadata: (ShippingMethodWithExcludedProductsFragment_metadata | null)[]; - privateMetadata: (ShippingMethodWithExcludedProductsFragment_privateMetadata | null)[]; - minimumOrderWeight: ShippingMethodWithExcludedProductsFragment_minimumOrderWeight | null; - maximumOrderWeight: ShippingMethodWithExcludedProductsFragment_maximumOrderWeight | null; - minimumDeliveryDays: number | null; - maximumDeliveryDays: number | null; - name: string; - description: any | null; - type: ShippingMethodTypeEnum | null; - channelListings: ShippingMethodWithExcludedProductsFragment_channelListings[] | null; - excludedProducts: ShippingMethodWithExcludedProductsFragment_excludedProducts | null; -} diff --git a/src/fragments/types/ShippingMethodWithPostalCodesFragment.ts b/src/fragments/types/ShippingMethodWithPostalCodesFragment.ts deleted file mode 100644 index f414451a5..000000000 --- a/src/fragments/types/ShippingMethodWithPostalCodesFragment.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PostalCodeRuleInclusionTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ShippingMethodWithPostalCodesFragment -// ==================================================== - -export interface ShippingMethodWithPostalCodesFragment_postalCodeRules { - __typename: "ShippingMethodPostalCodeRule"; - id: string; - inclusionType: PostalCodeRuleInclusionTypeEnum | null; - start: string | null; - end: string | null; -} - -export interface ShippingMethodWithPostalCodesFragment { - __typename: "ShippingMethodType"; - id: string; - postalCodeRules: (ShippingMethodWithPostalCodesFragment_postalCodeRules | null)[] | null; -} diff --git a/src/fragments/types/ShippingMethodWithZipCodesFragment.ts b/src/fragments/types/ShippingMethodWithZipCodesFragment.ts deleted file mode 100644 index 87fab4dcf..000000000 --- a/src/fragments/types/ShippingMethodWithZipCodesFragment.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -import { PostalCodeRuleInclusionTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ShippingMethodWithZipCodesFragment -// ==================================================== - -export interface ShippingMethodWithZipCodesFragment_postalCodeRules { - __typename: "ShippingMethodPostalCodeRule"; - id: string; - inclusionType: PostalCodeRuleInclusionTypeEnum | null; - start: string | null; - end: string | null; -} - -export interface ShippingMethodWithZipCodesFragment { - __typename: "ShippingMethod"; - id: string; - postalCodeRules: (ShippingMethodWithZipCodesFragment_postalCodeRules | null)[] | null; -} diff --git a/src/fragments/types/ShippingPriceTranslateErrorFragment.ts b/src/fragments/types/ShippingPriceTranslateErrorFragment.ts deleted file mode 100644 index f74c0b46f..000000000 --- a/src/fragments/types/ShippingPriceTranslateErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { TranslationErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ShippingPriceTranslateErrorFragment -// ==================================================== - -export interface ShippingPriceTranslateErrorFragment { - __typename: "TranslationError"; - code: TranslationErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/ShippingZoneDetailsFragment.ts b/src/fragments/types/ShippingZoneDetailsFragment.ts deleted file mode 100644 index da4bd314e..000000000 --- a/src/fragments/types/ShippingZoneDetailsFragment.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PostalCodeRuleInclusionTypeEnum, WeightUnitsEnum, ShippingMethodTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ShippingZoneDetailsFragment -// ==================================================== - -export interface ShippingZoneDetailsFragment_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingZoneDetailsFragment_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingZoneDetailsFragment_countries { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface ShippingZoneDetailsFragment_shippingMethods_postalCodeRules { - __typename: "ShippingMethodPostalCodeRule"; - id: string; - inclusionType: PostalCodeRuleInclusionTypeEnum | null; - start: string | null; - end: string | null; -} - -export interface ShippingZoneDetailsFragment_shippingMethods_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingZoneDetailsFragment_shippingMethods_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingZoneDetailsFragment_shippingMethods_minimumOrderWeight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ShippingZoneDetailsFragment_shippingMethods_maximumOrderWeight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ShippingZoneDetailsFragment_shippingMethods_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ShippingZoneDetailsFragment_shippingMethods_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ShippingZoneDetailsFragment_shippingMethods_channelListings_minimumOrderPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ShippingZoneDetailsFragment_shippingMethods_channelListings_maximumOrderPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ShippingZoneDetailsFragment_shippingMethods_channelListings { - __typename: "ShippingMethodChannelListing"; - id: string; - channel: ShippingZoneDetailsFragment_shippingMethods_channelListings_channel; - price: ShippingZoneDetailsFragment_shippingMethods_channelListings_price | null; - minimumOrderPrice: ShippingZoneDetailsFragment_shippingMethods_channelListings_minimumOrderPrice | null; - maximumOrderPrice: ShippingZoneDetailsFragment_shippingMethods_channelListings_maximumOrderPrice | null; -} - -export interface ShippingZoneDetailsFragment_shippingMethods { - __typename: "ShippingMethodType"; - id: string; - postalCodeRules: (ShippingZoneDetailsFragment_shippingMethods_postalCodeRules | null)[] | null; - metadata: (ShippingZoneDetailsFragment_shippingMethods_metadata | null)[]; - privateMetadata: (ShippingZoneDetailsFragment_shippingMethods_privateMetadata | null)[]; - minimumOrderWeight: ShippingZoneDetailsFragment_shippingMethods_minimumOrderWeight | null; - maximumOrderWeight: ShippingZoneDetailsFragment_shippingMethods_maximumOrderWeight | null; - minimumDeliveryDays: number | null; - maximumDeliveryDays: number | null; - name: string; - description: any | null; - type: ShippingMethodTypeEnum | null; - channelListings: ShippingZoneDetailsFragment_shippingMethods_channelListings[] | null; -} - -export interface ShippingZoneDetailsFragment_warehouses { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface ShippingZoneDetailsFragment { - __typename: "ShippingZone"; - metadata: (ShippingZoneDetailsFragment_metadata | null)[]; - privateMetadata: (ShippingZoneDetailsFragment_privateMetadata | null)[]; - id: string; - countries: (ShippingZoneDetailsFragment_countries | null)[] | null; - name: string; - description: string | null; - shippingMethods: (ShippingZoneDetailsFragment_shippingMethods | null)[] | null; - warehouses: ShippingZoneDetailsFragment_warehouses[]; -} diff --git a/src/fragments/types/ShippingZoneFragment.ts b/src/fragments/types/ShippingZoneFragment.ts deleted file mode 100644 index 42326f239..000000000 --- a/src/fragments/types/ShippingZoneFragment.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: ShippingZoneFragment -// ==================================================== - -export interface ShippingZoneFragment_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingZoneFragment_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingZoneFragment_countries { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface ShippingZoneFragment { - __typename: "ShippingZone"; - metadata: (ShippingZoneFragment_metadata | null)[]; - privateMetadata: (ShippingZoneFragment_privateMetadata | null)[]; - id: string; - countries: (ShippingZoneFragment_countries | null)[] | null; - name: string; - description: string | null; -} diff --git a/src/fragments/types/ShopErrorFragment.ts b/src/fragments/types/ShopErrorFragment.ts deleted file mode 100644 index 40137a2ae..000000000 --- a/src/fragments/types/ShopErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ShopErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ShopErrorFragment -// ==================================================== - -export interface ShopErrorFragment { - __typename: "ShopError"; - code: ShopErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/ShopFetchTaxRatesErrorFragment.ts b/src/fragments/types/ShopFetchTaxRatesErrorFragment.ts deleted file mode 100644 index 0ea876e08..000000000 --- a/src/fragments/types/ShopFetchTaxRatesErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ShopErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ShopFetchTaxRatesErrorFragment -// ==================================================== - -export interface ShopFetchTaxRatesErrorFragment { - __typename: "ShopError"; - code: ShopErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/ShopFragment.ts b/src/fragments/types/ShopFragment.ts deleted file mode 100644 index b6a3e83a5..000000000 --- a/src/fragments/types/ShopFragment.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: ShopFragment -// ==================================================== - -export interface ShopFragment_companyAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface ShopFragment_companyAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: ShopFragment_companyAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface ShopFragment_countries { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface ShopFragment_domain { - __typename: "Domain"; - host: string; -} - -export interface ShopFragment { - __typename: "Shop"; - companyAddress: ShopFragment_companyAddress | null; - countries: ShopFragment_countries[]; - customerSetPasswordUrl: string | null; - defaultMailSenderAddress: string | null; - defaultMailSenderName: string | null; - description: string | null; - domain: ShopFragment_domain; - name: string; - reserveStockDurationAnonymousUser: number | null; - reserveStockDurationAuthenticatedUser: number | null; - limitQuantityPerCheckout: number | null; -} diff --git a/src/fragments/types/ShopLimitFragment.ts b/src/fragments/types/ShopLimitFragment.ts deleted file mode 100644 index 50861cc92..000000000 --- a/src/fragments/types/ShopLimitFragment.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: ShopLimitFragment -// ==================================================== - -export interface ShopLimitFragment_limits_currentUsage { - __typename: "Limits"; - channels: number | null; - orders: number | null; - productVariants: number | null; - staffUsers: number | null; - warehouses: number | null; -} - -export interface ShopLimitFragment_limits_allowedUsage { - __typename: "Limits"; - channels: number | null; - orders: number | null; - productVariants: number | null; - staffUsers: number | null; - warehouses: number | null; -} - -export interface ShopLimitFragment_limits { - __typename: "LimitInfo"; - currentUsage: ShopLimitFragment_limits_currentUsage; - allowedUsage: ShopLimitFragment_limits_allowedUsage; -} - -export interface ShopLimitFragment { - __typename: "Shop"; - limits: ShopLimitFragment_limits; -} diff --git a/src/fragments/types/ShopOrderSettingsFragment.ts b/src/fragments/types/ShopOrderSettingsFragment.ts deleted file mode 100644 index dcb75a453..000000000 --- a/src/fragments/types/ShopOrderSettingsFragment.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: ShopOrderSettingsFragment -// ==================================================== - -export interface ShopOrderSettingsFragment { - __typename: "Shop"; - fulfillmentAutoApprove: boolean; - fulfillmentAllowUnpaid: boolean; -} diff --git a/src/fragments/types/ShopSettingsUpdateErrorFragment.ts b/src/fragments/types/ShopSettingsUpdateErrorFragment.ts deleted file mode 100644 index 1657e5b49..000000000 --- a/src/fragments/types/ShopSettingsUpdateErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ShopErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ShopSettingsUpdateErrorFragment -// ==================================================== - -export interface ShopSettingsUpdateErrorFragment { - __typename: "ShopError"; - code: ShopErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/ShopTaxesFragment.ts b/src/fragments/types/ShopTaxesFragment.ts deleted file mode 100644 index e09de94ff..000000000 --- a/src/fragments/types/ShopTaxesFragment.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: ShopTaxesFragment -// ==================================================== - -export interface ShopTaxesFragment { - __typename: "Shop"; - chargeTaxesOnShipping: boolean; - includeTaxesInPrices: boolean; - displayGrossPrices: boolean; -} diff --git a/src/fragments/types/StaffErrorFragment.ts b/src/fragments/types/StaffErrorFragment.ts deleted file mode 100644 index 00a830980..000000000 --- a/src/fragments/types/StaffErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AccountErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: StaffErrorFragment -// ==================================================== - -export interface StaffErrorFragment { - __typename: "StaffError"; - code: AccountErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/StaffMemberDetailsFragment.ts b/src/fragments/types/StaffMemberDetailsFragment.ts deleted file mode 100644 index 243e775c2..000000000 --- a/src/fragments/types/StaffMemberDetailsFragment.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: StaffMemberDetailsFragment -// ==================================================== - -export interface StaffMemberDetailsFragment_permissionGroups { - __typename: "Group"; - id: string; - name: string; - userCanManage: boolean; -} - -export interface StaffMemberDetailsFragment_userPermissions { - __typename: "UserPermission"; - code: PermissionEnum; - name: string; -} - -export interface StaffMemberDetailsFragment_avatar { - __typename: "Image"; - url: string; -} - -export interface StaffMemberDetailsFragment { - __typename: "User"; - id: string; - email: string; - firstName: string; - isActive: boolean; - lastName: string; - permissionGroups: (StaffMemberDetailsFragment_permissionGroups | null)[] | null; - userPermissions: (StaffMemberDetailsFragment_userPermissions | null)[] | null; - avatar: StaffMemberDetailsFragment_avatar | null; -} diff --git a/src/fragments/types/StaffMemberFragment.ts b/src/fragments/types/StaffMemberFragment.ts deleted file mode 100644 index 49f56b599..000000000 --- a/src/fragments/types/StaffMemberFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: StaffMemberFragment -// ==================================================== - -export interface StaffMemberFragment { - __typename: "User"; - id: string; - email: string; - firstName: string; - isActive: boolean; - lastName: string; -} diff --git a/src/fragments/types/StockErrorFragment.ts b/src/fragments/types/StockErrorFragment.ts deleted file mode 100644 index 1803bfc79..000000000 --- a/src/fragments/types/StockErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { StockErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: StockErrorFragment -// ==================================================== - -export interface StockErrorFragment { - __typename: "StockError"; - code: StockErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/StockFragment.ts b/src/fragments/types/StockFragment.ts deleted file mode 100644 index d69bf867a..000000000 --- a/src/fragments/types/StockFragment.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: StockFragment -// ==================================================== - -export interface StockFragment_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface StockFragment { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: StockFragment_warehouse; -} diff --git a/src/fragments/types/TaxTypeFragment.ts b/src/fragments/types/TaxTypeFragment.ts deleted file mode 100644 index a8d4dbf39..000000000 --- a/src/fragments/types/TaxTypeFragment.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: TaxTypeFragment -// ==================================================== - -export interface TaxTypeFragment { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} diff --git a/src/fragments/types/TimePeriod.ts b/src/fragments/types/TimePeriod.ts deleted file mode 100644 index c0cc74742..000000000 --- a/src/fragments/types/TimePeriod.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { TimePeriodTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: TimePeriod -// ==================================================== - -export interface TimePeriod { - __typename: "TimePeriod"; - amount: number; - type: TimePeriodTypeEnum; -} diff --git a/src/fragments/types/UploadErrorFragment.ts b/src/fragments/types/UploadErrorFragment.ts deleted file mode 100644 index 70895a2cf..000000000 --- a/src/fragments/types/UploadErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { UploadErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: UploadErrorFragment -// ==================================================== - -export interface UploadErrorFragment { - __typename: "UploadError"; - code: UploadErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/User.ts b/src/fragments/types/User.ts deleted file mode 100644 index 10c371bf4..000000000 --- a/src/fragments/types/User.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: User -// ==================================================== - -export interface User_userPermissions { - __typename: "UserPermission"; - code: PermissionEnum; - name: string; -} - -export interface User_avatar { - __typename: "Image"; - url: string; -} - -export interface User { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; - isStaff: boolean; - userPermissions: (User_userPermissions | null)[] | null; - avatar: User_avatar | null; -} diff --git a/src/fragments/types/UserBase.ts b/src/fragments/types/UserBase.ts deleted file mode 100644 index ffc053621..000000000 --- a/src/fragments/types/UserBase.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: UserBase -// ==================================================== - -export interface UserBase { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} diff --git a/src/fragments/types/VariantAttributeFragment.ts b/src/fragments/types/VariantAttributeFragment.ts deleted file mode 100644 index e9e347fdf..000000000 --- a/src/fragments/types/VariantAttributeFragment.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: VariantAttributeFragment -// ==================================================== - -export interface VariantAttributeFragment_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface VariantAttributeFragment_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface VariantAttributeFragment_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: VariantAttributeFragment_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface VariantAttributeFragment_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: VariantAttributeFragment_choices_edges_node; -} - -export interface VariantAttributeFragment_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: VariantAttributeFragment_choices_pageInfo; - edges: VariantAttributeFragment_choices_edges[]; -} - -export interface VariantAttributeFragment { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: VariantAttributeFragment_choices | null; -} diff --git a/src/fragments/types/VoucherBulkDeleteError.ts b/src/fragments/types/VoucherBulkDeleteError.ts deleted file mode 100644 index 6b01d1623..000000000 --- a/src/fragments/types/VoucherBulkDeleteError.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { DiscountErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: VoucherBulkDeleteError -// ==================================================== - -export interface VoucherBulkDeleteError { - __typename: "DiscountError"; - code: DiscountErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/VoucherDetailsFragment.ts b/src/fragments/types/VoucherDetailsFragment.ts deleted file mode 100644 index 5442a40e1..000000000 --- a/src/fragments/types/VoucherDetailsFragment.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { VoucherTypeEnum, DiscountValueTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: VoucherDetailsFragment -// ==================================================== - -export interface VoucherDetailsFragment_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface VoucherDetailsFragment_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface VoucherDetailsFragment_countries { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface VoucherDetailsFragment_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface VoucherDetailsFragment_channelListings_minSpent { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface VoucherDetailsFragment_channelListings { - __typename: "VoucherChannelListing"; - id: string; - channel: VoucherDetailsFragment_channelListings_channel; - discountValue: number; - currency: string; - minSpent: VoucherDetailsFragment_channelListings_minSpent | null; -} - -export interface VoucherDetailsFragment_products_edges_node_productType { - __typename: "ProductType"; - id: string; - name: string; -} - -export interface VoucherDetailsFragment_products_edges_node_thumbnail { - __typename: "Image"; - url: string; -} - -export interface VoucherDetailsFragment_products_edges_node_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface VoucherDetailsFragment_products_edges_node_channelListings { - __typename: "ProductChannelListing"; - isPublished: boolean; - publicationDate: any | null; - isAvailableForPurchase: boolean | null; - availableForPurchase: any | null; - visibleInListings: boolean; - channel: VoucherDetailsFragment_products_edges_node_channelListings_channel; -} - -export interface VoucherDetailsFragment_products_edges_node { - __typename: "Product"; - id: string; - name: string; - productType: VoucherDetailsFragment_products_edges_node_productType; - thumbnail: VoucherDetailsFragment_products_edges_node_thumbnail | null; - channelListings: VoucherDetailsFragment_products_edges_node_channelListings[] | null; -} - -export interface VoucherDetailsFragment_products_edges { - __typename: "ProductCountableEdge"; - node: VoucherDetailsFragment_products_edges_node; -} - -export interface VoucherDetailsFragment_products_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface VoucherDetailsFragment_products { - __typename: "ProductCountableConnection"; - edges: VoucherDetailsFragment_products_edges[]; - totalCount: number | null; - pageInfo: VoucherDetailsFragment_products_pageInfo; -} - -export interface VoucherDetailsFragment_collections_edges_node_products { - __typename: "ProductCountableConnection"; - totalCount: number | null; -} - -export interface VoucherDetailsFragment_collections_edges_node { - __typename: "Collection"; - id: string; - name: string; - products: VoucherDetailsFragment_collections_edges_node_products | null; -} - -export interface VoucherDetailsFragment_collections_edges { - __typename: "CollectionCountableEdge"; - node: VoucherDetailsFragment_collections_edges_node; -} - -export interface VoucherDetailsFragment_collections_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface VoucherDetailsFragment_collections { - __typename: "CollectionCountableConnection"; - edges: VoucherDetailsFragment_collections_edges[]; - totalCount: number | null; - pageInfo: VoucherDetailsFragment_collections_pageInfo; -} - -export interface VoucherDetailsFragment_categories_edges_node_products { - __typename: "ProductCountableConnection"; - totalCount: number | null; -} - -export interface VoucherDetailsFragment_categories_edges_node { - __typename: "Category"; - id: string; - name: string; - products: VoucherDetailsFragment_categories_edges_node_products | null; -} - -export interface VoucherDetailsFragment_categories_edges { - __typename: "CategoryCountableEdge"; - node: VoucherDetailsFragment_categories_edges_node; -} - -export interface VoucherDetailsFragment_categories_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface VoucherDetailsFragment_categories { - __typename: "CategoryCountableConnection"; - edges: VoucherDetailsFragment_categories_edges[]; - totalCount: number | null; - pageInfo: VoucherDetailsFragment_categories_pageInfo; -} - -export interface VoucherDetailsFragment { - __typename: "Voucher"; - metadata: (VoucherDetailsFragment_metadata | null)[]; - privateMetadata: (VoucherDetailsFragment_privateMetadata | null)[]; - id: string; - code: string; - startDate: any; - endDate: any | null; - usageLimit: number | null; - type: VoucherTypeEnum; - discountValueType: DiscountValueTypeEnum; - countries: (VoucherDetailsFragment_countries | null)[] | null; - minCheckoutItemsQuantity: number | null; - channelListings: VoucherDetailsFragment_channelListings[] | null; - used: number; - applyOncePerOrder: boolean; - applyOncePerCustomer: boolean; - onlyForStaff: boolean; - products: VoucherDetailsFragment_products | null; - collections: VoucherDetailsFragment_collections | null; - categories: VoucherDetailsFragment_categories | null; -} diff --git a/src/fragments/types/VoucherFragment.ts b/src/fragments/types/VoucherFragment.ts deleted file mode 100644 index 52b680e5b..000000000 --- a/src/fragments/types/VoucherFragment.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { VoucherTypeEnum, DiscountValueTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: VoucherFragment -// ==================================================== - -export interface VoucherFragment_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface VoucherFragment_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface VoucherFragment_countries { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface VoucherFragment_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface VoucherFragment_channelListings_minSpent { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface VoucherFragment_channelListings { - __typename: "VoucherChannelListing"; - id: string; - channel: VoucherFragment_channelListings_channel; - discountValue: number; - currency: string; - minSpent: VoucherFragment_channelListings_minSpent | null; -} - -export interface VoucherFragment { - __typename: "Voucher"; - metadata: (VoucherFragment_metadata | null)[]; - privateMetadata: (VoucherFragment_privateMetadata | null)[]; - id: string; - code: string; - startDate: any; - endDate: any | null; - usageLimit: number | null; - type: VoucherTypeEnum; - discountValueType: DiscountValueTypeEnum; - countries: (VoucherFragment_countries | null)[] | null; - minCheckoutItemsQuantity: number | null; - channelListings: VoucherFragment_channelListings[] | null; -} diff --git a/src/fragments/types/VoucherTranslateErrorFragment.ts b/src/fragments/types/VoucherTranslateErrorFragment.ts deleted file mode 100644 index e521fad49..000000000 --- a/src/fragments/types/VoucherTranslateErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { TranslationErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: VoucherTranslateErrorFragment -// ==================================================== - -export interface VoucherTranslateErrorFragment { - __typename: "TranslationError"; - code: TranslationErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/VoucherTranslationFragment.ts b/src/fragments/types/VoucherTranslationFragment.ts deleted file mode 100644 index 391836cf6..000000000 --- a/src/fragments/types/VoucherTranslationFragment.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: VoucherTranslationFragment -// ==================================================== - -export interface VoucherTranslationFragment_voucher { - __typename: "Voucher"; - id: string; - name: string | null; -} - -export interface VoucherTranslationFragment_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface VoucherTranslationFragment_translation { - __typename: "VoucherTranslation"; - id: string; - language: VoucherTranslationFragment_translation_language; - name: string | null; -} - -export interface VoucherTranslationFragment { - __typename: "VoucherTranslatableContent"; - name: string | null; - voucher: VoucherTranslationFragment_voucher | null; - translation: VoucherTranslationFragment_translation | null; -} diff --git a/src/fragments/types/WarehouseDetailsFragment.ts b/src/fragments/types/WarehouseDetailsFragment.ts deleted file mode 100644 index 331f2d2c0..000000000 --- a/src/fragments/types/WarehouseDetailsFragment.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { WarehouseClickAndCollectOptionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: WarehouseDetailsFragment -// ==================================================== - -export interface WarehouseDetailsFragment_shippingZones_edges_node { - __typename: "ShippingZone"; - id: string; - name: string; -} - -export interface WarehouseDetailsFragment_shippingZones_edges { - __typename: "ShippingZoneCountableEdge"; - node: WarehouseDetailsFragment_shippingZones_edges_node; -} - -export interface WarehouseDetailsFragment_shippingZones { - __typename: "ShippingZoneCountableConnection"; - edges: WarehouseDetailsFragment_shippingZones_edges[]; -} - -export interface WarehouseDetailsFragment_address_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface WarehouseDetailsFragment_address { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: WarehouseDetailsFragment_address_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface WarehouseDetailsFragment { - __typename: "Warehouse"; - isPrivate: boolean; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; - id: string; - name: string; - shippingZones: WarehouseDetailsFragment_shippingZones; - address: WarehouseDetailsFragment_address; -} diff --git a/src/fragments/types/WarehouseErrorFragment.ts b/src/fragments/types/WarehouseErrorFragment.ts deleted file mode 100644 index 10af38d7d..000000000 --- a/src/fragments/types/WarehouseErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { WarehouseErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: WarehouseErrorFragment -// ==================================================== - -export interface WarehouseErrorFragment { - __typename: "WarehouseError"; - code: WarehouseErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/WarehouseFragment.ts b/src/fragments/types/WarehouseFragment.ts deleted file mode 100644 index 0942744bc..000000000 --- a/src/fragments/types/WarehouseFragment.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: WarehouseFragment -// ==================================================== - -export interface WarehouseFragment { - __typename: "Warehouse"; - id: string; - name: string; -} diff --git a/src/fragments/types/WarehouseWithShippingFragment.ts b/src/fragments/types/WarehouseWithShippingFragment.ts deleted file mode 100644 index 81bd96900..000000000 --- a/src/fragments/types/WarehouseWithShippingFragment.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: WarehouseWithShippingFragment -// ==================================================== - -export interface WarehouseWithShippingFragment_shippingZones_edges_node { - __typename: "ShippingZone"; - id: string; - name: string; -} - -export interface WarehouseWithShippingFragment_shippingZones_edges { - __typename: "ShippingZoneCountableEdge"; - node: WarehouseWithShippingFragment_shippingZones_edges_node; -} - -export interface WarehouseWithShippingFragment_shippingZones { - __typename: "ShippingZoneCountableConnection"; - edges: WarehouseWithShippingFragment_shippingZones_edges[]; -} - -export interface WarehouseWithShippingFragment { - __typename: "Warehouse"; - id: string; - name: string; - shippingZones: WarehouseWithShippingFragment_shippingZones; -} diff --git a/src/fragments/types/WebhookErrorFragment.ts b/src/fragments/types/WebhookErrorFragment.ts deleted file mode 100644 index 37a039ded..000000000 --- a/src/fragments/types/WebhookErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { WebhookErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: WebhookErrorFragment -// ==================================================== - -export interface WebhookErrorFragment { - __typename: "WebhookError"; - code: WebhookErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/fragments/types/WebhookFragment.ts b/src/fragments/types/WebhookFragment.ts deleted file mode 100644 index be95aea2e..000000000 --- a/src/fragments/types/WebhookFragment.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: WebhookFragment -// ==================================================== - -export interface WebhookFragment_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface WebhookFragment { - __typename: "Webhook"; - id: string; - name: string; - isActive: boolean; - app: WebhookFragment_app; -} diff --git a/src/fragments/types/WebhooksDetailsFragment.ts b/src/fragments/types/WebhooksDetailsFragment.ts deleted file mode 100644 index e0576d1a1..000000000 --- a/src/fragments/types/WebhooksDetailsFragment.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: WebhooksDetailsFragment -// ==================================================== - -export interface WebhooksDetailsFragment_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface WebhooksDetailsFragment { - __typename: "Webhook"; - id: string; - name: string; - isActive: boolean; - app: WebhooksDetailsFragment_app; -} diff --git a/src/fragments/types/WeightFragment.ts b/src/fragments/types/WeightFragment.ts deleted file mode 100644 index f8ef06a03..000000000 --- a/src/fragments/types/WeightFragment.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { WeightUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: WeightFragment -// ==================================================== - -export interface WeightFragment { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} diff --git a/src/fragments/warehouses.ts b/src/fragments/warehouses.ts index 0cdd964b7..cf9d64ee3 100644 --- a/src/fragments/warehouses.ts +++ b/src/fragments/warehouses.ts @@ -1,17 +1,14 @@ import { gql } from "@apollo/client"; -import { fragmentAddress } from "./address"; - export const warehouseFragment = gql` - fragment WarehouseFragment on Warehouse { + fragment Warehouse on Warehouse { id name } `; export const warehouseWithShippingFragment = gql` - ${warehouseFragment} - fragment WarehouseWithShippingFragment on Warehouse { - ...WarehouseFragment + fragment WarehouseWithShipping on Warehouse { + ...Warehouse shippingZones(first: 100) { edges { node { @@ -24,14 +21,12 @@ export const warehouseWithShippingFragment = gql` `; export const warehouseDetailsFragment = gql` - ${fragmentAddress} - ${warehouseWithShippingFragment} - fragment WarehouseDetailsFragment on Warehouse { + fragment WarehouseDetails on Warehouse { isPrivate clickAndCollectOption - ...WarehouseWithShippingFragment + ...WarehouseWithShipping address { - ...AddressFragment + ...Address } } `; diff --git a/src/fragments/webhooks.ts b/src/fragments/webhooks.ts index 98cd2346b..d004644b1 100644 --- a/src/fragments/webhooks.ts +++ b/src/fragments/webhooks.ts @@ -1,7 +1,7 @@ import { gql } from "@apollo/client"; export const webhooksFragment = gql` - fragment WebhookFragment on Webhook { + fragment Webhook on Webhook { id name isActive @@ -13,8 +13,7 @@ export const webhooksFragment = gql` `; export const webhooksDetailsFragment = gql` - ${webhooksFragment} - fragment WebhooksDetailsFragment on Webhook { - ...WebhookFragment + fragment WebhooksDetails on Webhook { + ...Webhook } `; diff --git a/src/fragments/weight.ts b/src/fragments/weight.ts index 9305d6556..ddde6907c 100644 --- a/src/fragments/weight.ts +++ b/src/fragments/weight.ts @@ -1,7 +1,7 @@ import { gql } from "@apollo/client"; export const weightFragment = gql` - fragment WeightFragment on Weight { + fragment Weight on Weight { unit value } diff --git a/src/giftCards/GiftCardBulkCreateDialog/GiftCardBulkCreateDialog.tsx b/src/giftCards/GiftCardBulkCreateDialog/GiftCardBulkCreateDialog.tsx index f19e5f77c..fe076f4eb 100644 --- a/src/giftCards/GiftCardBulkCreateDialog/GiftCardBulkCreateDialog.tsx +++ b/src/giftCards/GiftCardBulkCreateDialog/GiftCardBulkCreateDialog.tsx @@ -1,30 +1,31 @@ import { Dialog, DialogTitle } from "@material-ui/core"; import { IMessage } from "@saleor/components/messages"; +import { + GiftCardBulkCreateInput, + useChannelCurrenciesQuery, + useGiftCardBulkCreateMutation +} from "@saleor/graphql"; import useCurrentDate from "@saleor/hooks/useCurrentDate"; import useNotifier from "@saleor/hooks/useNotifier"; import { DialogProps } from "@saleor/types"; -import { GiftCardBulkCreateInput } from "@saleor/types/globalTypes"; import { getFormErrors } from "@saleor/utils/errors"; import React, { useEffect, useState } from "react"; import { useIntl } from "react-intl"; import ContentWithProgress from "../GiftCardCreateDialog/ContentWithProgress"; import GiftCardBulkCreateSuccessDialog from "../GiftCardCreateDialog/GiftCardBulkCreateSuccessDialog"; -import { useChannelCurrencies } from "../GiftCardCreateDialog/queries"; import { getGiftCardCreateOnCompletedMessage, getGiftCardExpiryInputData } from "../GiftCardCreateDialog/utils"; -import { GIFT_CARD_LIST_QUERY } from "../GiftCardsList/types"; +import { GIFT_CARD_LIST_QUERY } from "../GiftCardsList/queries"; import GiftCardBulkCreateDialogForm from "./GiftCardBulkCreateDialogForm"; import { giftCardBulkCreateDialogMessages as messages } from "./messages"; -import { useGiftCardBulkCreateMutation } from "./mutations"; import { giftCardBulkCreateErrorKeys, GiftCardBulkCreateFormData, GiftCardBulkCreateFormErrors } from "./types"; -import { GiftCardBulkCreate } from "./types/GiftCardBulkCreate"; import { validateForm } from "./utils"; const GiftCardBulkCreateDialog: React.FC = ({ onClose, open }) => { @@ -40,38 +41,7 @@ const GiftCardBulkCreateDialog: React.FC = ({ onClose, open }) => { const onIssueSuccessDialogClose = () => setOpenIssueSuccessDialog(false); - const { loading: loadingChannelCurrencies } = useChannelCurrencies({}); - - const onCompleted = (data: GiftCardBulkCreate) => { - const errors = data?.giftCardBulkCreate?.errors; - const cardsAmount = data?.giftCardBulkCreate?.giftCards?.length || 0; - - const giftCardsBulkIssueSuccessMessage: IMessage = { - status: "success", - title: intl.formatMessage(messages.createdSuccessAlertTitle), - text: intl.formatMessage(messages.createdSuccessAlertDescription, { - cardsAmount - }) - }; - - notify( - getGiftCardCreateOnCompletedMessage( - errors, - intl, - giftCardsBulkIssueSuccessMessage - ) - ); - - setFormErrors(getFormErrors(giftCardBulkCreateErrorKeys, errors)); - - if (!errors.length) { - setIssuedIds( - data?.giftCardBulkCreate?.giftCards?.map(giftCard => giftCard.id) - ); - setOpenIssueSuccessDialog(true); - onClose(); - } - }; + const { loading: loadingChannelCurrencies } = useChannelCurrenciesQuery({}); const currentDate = useCurrentDate(); @@ -102,7 +72,36 @@ const GiftCardBulkCreateDialog: React.FC = ({ onClose, open }) => { bulkCreateGiftCard, bulkCreateGiftCardOpts ] = useGiftCardBulkCreateMutation({ - onCompleted, + onCompleted: data => { + const errors = data?.giftCardBulkCreate?.errors; + const cardsAmount = data?.giftCardBulkCreate?.giftCards?.length || 0; + + const giftCardsBulkIssueSuccessMessage: IMessage = { + status: "success", + title: intl.formatMessage(messages.createdSuccessAlertTitle), + text: intl.formatMessage(messages.createdSuccessAlertDescription, { + cardsAmount + }) + }; + + notify( + getGiftCardCreateOnCompletedMessage( + errors, + intl, + giftCardsBulkIssueSuccessMessage + ) + ); + + setFormErrors(getFormErrors(giftCardBulkCreateErrorKeys, errors)); + + if (!errors.length) { + setIssuedIds( + data?.giftCardBulkCreate?.giftCards?.map(giftCard => giftCard.id) + ); + setOpenIssueSuccessDialog(true); + onClose(); + } + }, refetchQueries: [GIFT_CARD_LIST_QUERY] }); diff --git a/src/giftCards/GiftCardBulkCreateDialog/GiftCardBulkCreateDialogForm.tsx b/src/giftCards/GiftCardBulkCreateDialog/GiftCardBulkCreateDialogForm.tsx index 92e25bbe4..5f5ba0f54 100644 --- a/src/giftCards/GiftCardBulkCreateDialog/GiftCardBulkCreateDialogForm.tsx +++ b/src/giftCards/GiftCardBulkCreateDialog/GiftCardBulkCreateDialogForm.tsx @@ -8,12 +8,13 @@ import VerticalSpacer from "@saleor/apps/components/VerticalSpacer"; import DialogButtons from "@saleor/components/ActionDialog/DialogButtons"; import CardSpacer from "@saleor/components/CardSpacer"; import GiftCardTagInput from "@saleor/giftCards/components/GiftCardTagInput"; -import useForm from "@saleor/hooks/useForm"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { GiftCardSettingsExpiryTypeEnum, - TimePeriodTypeEnum -} from "@saleor/types/globalTypes"; + TimePeriodTypeEnum, + useGiftCardSettingsQuery +} from "@saleor/graphql"; +import useForm from "@saleor/hooks/useForm"; +import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import React from "react"; import { useIntl } from "react-intl"; @@ -22,7 +23,6 @@ import GiftCardCreateMoneyInput from "../GiftCardCreateDialog/GiftCardCreateMone import GiftCardCreateRequiresActivationSection from "../GiftCardCreateDialog/GiftCardCreateRequiresActivationSection"; import { giftCardCreateMessages as messages } from "../GiftCardCreateDialog/messages"; import { useGiftCardCreateFormStyles as useStyles } from "../GiftCardCreateDialog/styles"; -import { useGiftCardSettingsQuery } from "../GiftCardSettings/queries"; import { getGiftCardErrorMessage } from "../GiftCardUpdate/messages"; import { GiftCardBulkCreateFormCommonProps, diff --git a/src/giftCards/GiftCardBulkCreateDialog/mutations.ts b/src/giftCards/GiftCardBulkCreateDialog/mutations.ts index 29dd0d601..39c375f4c 100644 --- a/src/giftCards/GiftCardBulkCreateDialog/mutations.ts +++ b/src/giftCards/GiftCardBulkCreateDialog/mutations.ts @@ -1,14 +1,6 @@ import { gql } from "@apollo/client"; -import { giftCardBulkCreateErrorFragment } from "@saleor/fragments/errors"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { - GiftCardBulkCreate, - GiftCardBulkCreateVariables -} from "./types/GiftCardBulkCreate"; - -const giftCardBulkCreate = gql` - ${giftCardBulkCreateErrorFragment} +export const giftCardBulkCreate = gql` mutation GiftCardBulkCreate($input: GiftCardBulkCreateInput!) { giftCardBulkCreate(input: $input) { giftCards { @@ -20,8 +12,3 @@ const giftCardBulkCreate = gql` } } `; - -export const useGiftCardBulkCreateMutation = makeMutation< - GiftCardBulkCreate, - GiftCardBulkCreateVariables ->(giftCardBulkCreate); diff --git a/src/giftCards/GiftCardBulkCreateDialog/types.ts b/src/giftCards/GiftCardBulkCreateDialog/types.ts index ece21f9be..5baa67d6a 100644 --- a/src/giftCards/GiftCardBulkCreateDialog/types.ts +++ b/src/giftCards/GiftCardBulkCreateDialog/types.ts @@ -1,6 +1,5 @@ -import { GiftCardError } from "@saleor/fragments/types/GiftCardError"; +import { GiftCardErrorFragment, TimePeriodTypeEnum } from "@saleor/graphql"; import { FormChange } from "@saleor/hooks/useForm"; -import { TimePeriodTypeEnum } from "@saleor/types/globalTypes"; import { GiftCardExpiryType } from "../GiftCardCreateDialog/types"; @@ -27,7 +26,10 @@ export interface GiftCardBulkCreateFormData cardsAmount: number; } -export type GiftCardBulkCreateFormError = Pick; +export type GiftCardBulkCreateFormError = Pick< + GiftCardErrorFragment, + "code" | "field" +>; export type GiftCardBulkCreateFormErrors = Partial< Record diff --git a/src/giftCards/GiftCardBulkCreateDialog/types/GiftCardBulkCreate.ts b/src/giftCards/GiftCardBulkCreateDialog/types/GiftCardBulkCreate.ts deleted file mode 100644 index edfe45bfc..000000000 --- a/src/giftCards/GiftCardBulkCreateDialog/types/GiftCardBulkCreate.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardBulkCreateInput, GiftCardErrorCode } from "./../../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: GiftCardBulkCreate -// ==================================================== - -export interface GiftCardBulkCreate_giftCardBulkCreate_giftCards { - __typename: "GiftCard"; - id: string; -} - -export interface GiftCardBulkCreate_giftCardBulkCreate_errors { - __typename: "GiftCardError"; - code: GiftCardErrorCode; - field: string | null; - message: string | null; -} - -export interface GiftCardBulkCreate_giftCardBulkCreate { - __typename: "GiftCardBulkCreate"; - giftCards: GiftCardBulkCreate_giftCardBulkCreate_giftCards[]; - errors: GiftCardBulkCreate_giftCardBulkCreate_errors[]; -} - -export interface GiftCardBulkCreate { - giftCardBulkCreate: GiftCardBulkCreate_giftCardBulkCreate | null; -} - -export interface GiftCardBulkCreateVariables { - input: GiftCardBulkCreateInput; -} diff --git a/src/giftCards/GiftCardBulkCreateDialog/utils.ts b/src/giftCards/GiftCardBulkCreateDialog/utils.ts index 3e64d4d38..6c546d82c 100644 --- a/src/giftCards/GiftCardBulkCreateDialog/utils.ts +++ b/src/giftCards/GiftCardBulkCreateDialog/utils.ts @@ -1,5 +1,4 @@ -import { GiftCardError } from "@saleor/fragments/types/GiftCardError"; -import { GiftCardErrorCode } from "@saleor/types/globalTypes"; +import { GiftCardErrorCode, GiftCardErrorFragment } from "@saleor/graphql"; import reduce from "lodash/reduce"; import { @@ -17,7 +16,7 @@ export const validateField = ( }: GiftCardBulkCreateFormData, value, key: keyof GiftCardBulkCreateFormData -): Pick | null => { +): Pick | null => { const error = { code: GiftCardErrorCode.INVALID, field: key }; const expiryDateSelected = expirySelected && expiryType === "EXPIRY_DATE"; const expiryPeriodSelected = expirySelected && expiryType === "EXPIRY_PERIOD"; diff --git a/src/giftCards/GiftCardCreateDialog/GiftCardBulkCreateSuccessDialog.tsx b/src/giftCards/GiftCardCreateDialog/GiftCardBulkCreateSuccessDialog.tsx index 403184934..cbfaf4d8c 100644 --- a/src/giftCards/GiftCardCreateDialog/GiftCardBulkCreateSuccessDialog.tsx +++ b/src/giftCards/GiftCardCreateDialog/GiftCardBulkCreateSuccessDialog.tsx @@ -7,10 +7,8 @@ import { } from "@material-ui/core"; import { Button } from "@saleor/macaw-ui"; import { DialogProps } from "@saleor/types"; -import React from "react"; -import { useState } from "react"; -import { FormattedMessage } from "react-intl"; -import { useIntl } from "react-intl"; +import React, { useState } from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import GiftCardExportDialogContent from "../GiftCardExportDialogContent"; import { giftCardCreateMessages as messages } from "./messages"; diff --git a/src/giftCards/GiftCardCreateDialog/GiftCardCreateDialogContent.tsx b/src/giftCards/GiftCardCreateDialog/GiftCardCreateDialogContent.tsx index c48d97972..680f0ed66 100644 --- a/src/giftCards/GiftCardCreateDialog/GiftCardCreateDialogContent.tsx +++ b/src/giftCards/GiftCardCreateDialog/GiftCardCreateDialogContent.tsx @@ -1,8 +1,12 @@ import { DialogTitle } from "@material-ui/core"; +import { + GiftCardCreateInput, + useChannelCurrenciesQuery, + useGiftCardCreateMutation +} from "@saleor/graphql"; import useCurrentDate from "@saleor/hooks/useCurrentDate"; import useNotifier from "@saleor/hooks/useNotifier"; import { DialogProps } from "@saleor/types"; -import { GiftCardCreateInput } from "@saleor/types/globalTypes"; import React, { useState } from "react"; import { useIntl } from "react-intl"; @@ -12,10 +16,7 @@ import GiftCardCreateDialogForm, { GiftCardCreateFormData } from "./GiftCardCreateDialogForm"; import { giftCardCreateMessages as messages } from "./messages"; -import { useGiftCardCreateMutation } from "./mutations"; -import { useChannelCurrencies } from "./queries"; import { GiftCardCreateFormCustomer } from "./types"; -import { GiftCardCreate } from "./types/GiftCardCreate"; import { getGiftCardCreateOnCompletedMessage, getGiftCardExpiryInputData @@ -35,20 +36,10 @@ const GiftCardCreateDialogContent: React.FC = const intl = useIntl(); const notify = useNotifier(); - const { loading: loadingChannelCurrencies } = useChannelCurrencies({}); + const { loading: loadingChannelCurrencies } = useChannelCurrenciesQuery({}); const [cardCode, setCardCode] = useState(null); - const onCompleted = (data: GiftCardCreate) => { - const errors = data?.giftCardCreate?.errors; - - notify(getGiftCardCreateOnCompletedMessage(errors, intl)); - - if (!errors?.length) { - setCardCode(data?.giftCardCreate?.giftCard?.code); - } - }; - const currentDate = useCurrentDate(); const getParsedSubmitInputData = ( @@ -80,7 +71,15 @@ const GiftCardCreateDialogContent: React.FC = }; const [createGiftCard, createGiftCardOpts] = useGiftCardCreateMutation({ - onCompleted, + onCompleted: data => { + const errors = data?.giftCardCreate?.errors; + + notify(getGiftCardCreateOnCompletedMessage(errors, intl)); + + if (!errors?.length) { + setCardCode(data?.giftCardCreate?.giftCard?.code); + } + }, refetchQueries }); diff --git a/src/giftCards/GiftCardCreateDialog/GiftCardCreateDialogForm.tsx b/src/giftCards/GiftCardCreateDialog/GiftCardCreateDialogForm.tsx index a2cffb76f..b1b0ef3ee 100644 --- a/src/giftCards/GiftCardCreateDialog/GiftCardCreateDialogForm.tsx +++ b/src/giftCards/GiftCardCreateDialog/GiftCardCreateDialogForm.tsx @@ -2,23 +2,23 @@ import { DialogContent, Divider, TextField } from "@material-ui/core"; import VerticalSpacer from "@saleor/apps/components/VerticalSpacer"; import DialogButtons from "@saleor/components/ActionDialog/DialogButtons"; import CardSpacer from "@saleor/components/CardSpacer"; -import { GiftCardError } from "@saleor/fragments/types/GiftCardError"; import GiftCardTagInput from "@saleor/giftCards/components/GiftCardTagInput"; +import { + GiftCardErrorFragment, + GiftCardSettingsExpiryTypeEnum, + TimePeriodTypeEnum, + useGiftCardSettingsQuery +} from "@saleor/graphql"; import useForm from "@saleor/hooks/useForm"; import { commonMessages } from "@saleor/intl"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import Label from "@saleor/orders/components/OrderHistory/Label"; -import { - GiftCardSettingsExpiryTypeEnum, - TimePeriodTypeEnum -} from "@saleor/types/globalTypes"; import { getFormErrors } from "@saleor/utils/errors"; import React, { useState } from "react"; import { useIntl } from "react-intl"; import GiftCardSendToCustomer from "../components/GiftCardSendToCustomer/GiftCardSendToCustomer"; import { GiftCardCreateCommonFormData } from "../GiftCardBulkCreateDialog/types"; -import { useGiftCardSettingsQuery } from "../GiftCardSettings/queries"; import GiftCardCreateExpirySelect from "./GiftCardCreateExpirySelect"; import GiftCardCreateMoneyInput from "./GiftCardCreateMoneyInput"; import GiftCardCreateRequiresActivationSection from "./GiftCardCreateRequiresActivationSection"; @@ -51,7 +51,7 @@ export const initialData: GiftCardCreateFormData = { }; interface GiftCardCreateDialogFormProps { opts: { status: ConfirmButtonTransitionState }; - apiErrors: GiftCardError[]; + apiErrors: GiftCardErrorFragment[]; onSubmit: (data: GiftCardCreateFormData) => void; onClose: () => void; initialCustomer?: GiftCardCreateFormCustomer | null; diff --git a/src/giftCards/GiftCardCreateDialog/GiftCardCreateExpirySelect/GiftCardCreateExpirySelect.tsx b/src/giftCards/GiftCardCreateDialog/GiftCardCreateExpirySelect/GiftCardCreateExpirySelect.tsx index 1483a72dd..3cbfda6d0 100644 --- a/src/giftCards/GiftCardCreateDialog/GiftCardCreateExpirySelect/GiftCardCreateExpirySelect.tsx +++ b/src/giftCards/GiftCardCreateDialog/GiftCardCreateExpirySelect/GiftCardCreateExpirySelect.tsx @@ -13,8 +13,7 @@ import { getGiftCardErrorMessage } from "@saleor/giftCards/GiftCardUpdate/messag import useCurrentDate from "@saleor/hooks/useCurrentDate"; import { FormChange } from "@saleor/hooks/useForm"; import React from "react"; -import { FormattedMessage } from "react-intl"; -import { MessageDescriptor, useIntl } from "react-intl"; +import { FormattedMessage, MessageDescriptor, useIntl } from "react-intl"; import { giftCardCreateExpirySelectMessages as messages } from "./messages"; import { useGiftCardCreateExpirySelectStyles as useStyles } from "./styles"; diff --git a/src/giftCards/GiftCardCreateDialog/GiftCardCreateMoneyInput.tsx b/src/giftCards/GiftCardCreateDialog/GiftCardCreateMoneyInput.tsx index 3bfbed36e..27bd5970c 100644 --- a/src/giftCards/GiftCardCreateDialog/GiftCardCreateMoneyInput.tsx +++ b/src/giftCards/GiftCardCreateDialog/GiftCardCreateMoneyInput.tsx @@ -1,4 +1,5 @@ import TextWithSelectField from "@saleor/components/TextWithSelectField"; +import { useChannelCurrenciesQuery } from "@saleor/graphql"; import { ChangeEvent, FormChange } from "@saleor/hooks/useForm"; import useLocalStorage from "@saleor/hooks/useLocalStorage"; import { mapSingleValueNodeToChoice } from "@saleor/utils/maps"; @@ -12,7 +13,6 @@ import { } from "../GiftCardBulkCreateDialog/types"; import { getGiftCardErrorMessage } from "../GiftCardUpdate/messages"; import { giftCardCreateMessages as messages } from "./messages"; -import { useChannelCurrencies } from "./queries"; import { useGiftCardCreateFormStyles as useStyles } from "./styles"; interface GiftCardCreateMoneyInputProps { @@ -31,7 +31,7 @@ const GiftCardCreateMoneyInput: React.FC = ({ const intl = useIntl(); const classes = useStyles({}); - const { data: channelCurrenciesData } = useChannelCurrencies({}); + const { data: channelCurrenciesData } = useChannelCurrenciesQuery({}); const { channelCurrencies } = channelCurrenciesData?.shop; diff --git a/src/giftCards/GiftCardCreateDialog/mutations.ts b/src/giftCards/GiftCardCreateDialog/mutations.ts index 187cfd19a..620b31602 100644 --- a/src/giftCards/GiftCardCreateDialog/mutations.ts +++ b/src/giftCards/GiftCardCreateDialog/mutations.ts @@ -1,14 +1,6 @@ import { gql } from "@apollo/client"; -import { giftCardCreateErrorFragment } from "@saleor/fragments/errors"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { - GiftCardCreate, - GiftCardCreateVariables -} from "./types/GiftCardCreate"; - -const giftCardCreate = gql` - ${giftCardCreateErrorFragment} +export const giftCardCreate = gql` mutation GiftCardCreate($input: GiftCardCreateInput!) { giftCardCreate(input: $input) { giftCard { @@ -20,8 +12,3 @@ const giftCardCreate = gql` } } `; - -export const useGiftCardCreateMutation = makeMutation< - GiftCardCreate, - GiftCardCreateVariables ->(giftCardCreate); diff --git a/src/giftCards/GiftCardCreateDialog/queries.ts b/src/giftCards/GiftCardCreateDialog/queries.ts index 0c77824b2..3ed9bdce9 100644 --- a/src/giftCards/GiftCardCreateDialog/queries.ts +++ b/src/giftCards/GiftCardCreateDialog/queries.ts @@ -1,15 +1,9 @@ import { gql } from "@apollo/client"; -import makeQuery from "@saleor/hooks/makeQuery"; -import { ChannelCurrencies } from "./types/ChannelCurrencies"; - -const channelCurrencies = gql` +export const channelCurrencies = gql` query ChannelCurrencies { shop { channelCurrencies } } `; -export const useChannelCurrencies = makeQuery( - channelCurrencies -); diff --git a/src/giftCards/GiftCardCreateDialog/types.ts b/src/giftCards/GiftCardCreateDialog/types.ts index c7b13711a..e10bf197a 100644 --- a/src/giftCards/GiftCardCreateDialog/types.ts +++ b/src/giftCards/GiftCardCreateDialog/types.ts @@ -1,4 +1,4 @@ -import { GiftCardError } from "@saleor/fragments/types/GiftCardError"; +import { GiftCardErrorFragment } from "@saleor/graphql"; import { FormChange } from "@saleor/hooks/useForm"; import { GiftCardCreateFormData } from "./GiftCardCreateDialogForm"; @@ -12,11 +12,11 @@ export interface GiftCardCreateFormCustomer { export type GiftCardCreateCommonFormErrors = Record< "tags" | "expiryDate" | "currency" | "amount" | "balance", - GiftCardError + GiftCardErrorFragment >; export type GiftCardCreateFormErrors = GiftCardCreateCommonFormErrors & - Record<"customer", GiftCardError>; + Record<"customer", GiftCardErrorFragment>; export interface GiftCardCreateFormCommonProps { change: FormChange; diff --git a/src/giftCards/GiftCardCreateDialog/types/ChannelCurrencies.ts b/src/giftCards/GiftCardCreateDialog/types/ChannelCurrencies.ts deleted file mode 100644 index 2b44c7d9d..000000000 --- a/src/giftCards/GiftCardCreateDialog/types/ChannelCurrencies.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: ChannelCurrencies -// ==================================================== - -export interface ChannelCurrencies_shop { - __typename: "Shop"; - channelCurrencies: string[]; -} - -export interface ChannelCurrencies { - shop: ChannelCurrencies_shop; -} diff --git a/src/giftCards/GiftCardCreateDialog/types/GiftCardCreate.ts b/src/giftCards/GiftCardCreateDialog/types/GiftCardCreate.ts deleted file mode 100644 index cc1d3f66c..000000000 --- a/src/giftCards/GiftCardCreateDialog/types/GiftCardCreate.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardCreateInput, GiftCardErrorCode } from "./../../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: GiftCardCreate -// ==================================================== - -export interface GiftCardCreate_giftCardCreate_giftCard { - __typename: "GiftCard"; - code: string; -} - -export interface GiftCardCreate_giftCardCreate_errors { - __typename: "GiftCardError"; - code: GiftCardErrorCode; - field: string | null; - message: string | null; -} - -export interface GiftCardCreate_giftCardCreate { - __typename: "GiftCardCreate"; - giftCard: GiftCardCreate_giftCardCreate_giftCard | null; - errors: GiftCardCreate_giftCardCreate_errors[]; -} - -export interface GiftCardCreate { - giftCardCreate: GiftCardCreate_giftCardCreate | null; -} - -export interface GiftCardCreateVariables { - input: GiftCardCreateInput; -} diff --git a/src/giftCards/GiftCardCreateDialog/utils.ts b/src/giftCards/GiftCardCreateDialog/utils.ts index 3bb2f15ef..568aa7ec4 100644 --- a/src/giftCards/GiftCardCreateDialog/utils.ts +++ b/src/giftCards/GiftCardCreateDialog/utils.ts @@ -1,5 +1,5 @@ import { IMessage } from "@saleor/components/messages"; -import { TimePeriodTypeEnum } from "@saleor/types/globalTypes"; +import { GiftCardCreateMutation, TimePeriodTypeEnum } from "@saleor/graphql"; import commonErrorMessages from "@saleor/utils/errors/common"; import moment from "moment-timezone"; import { IntlShape } from "react-intl"; @@ -7,7 +7,6 @@ import { IntlShape } from "react-intl"; import { GiftCardCreateCommonFormData } from "../GiftCardBulkCreateDialog/types"; import { giftCardUpdateFormMessages } from "../GiftCardsList/messages"; import { giftCardCreateMessages as messages } from "./messages"; -import { GiftCardCreate_giftCardCreate_errors } from "./types/GiftCardCreate"; const addToCurrentDate = ( currentDate: number, @@ -45,7 +44,7 @@ export const getGiftCardExpiryError = (intl: IntlShape): IMessage => ({ }); export const getGiftCardCreateOnCompletedMessage = ( - errors: GiftCardCreate_giftCardCreate_errors[], + errors: GiftCardCreateMutation["giftCardCreate"]["errors"], intl: IntlShape, successMessage?: IMessage ): IMessage => { diff --git a/src/giftCards/GiftCardExportDialogContent/GiftCardExportDialogContent.tsx b/src/giftCards/GiftCardExportDialogContent/GiftCardExportDialogContent.tsx index 6dd0d5e11..d9525eb89 100644 --- a/src/giftCards/GiftCardExportDialogContent/GiftCardExportDialogContent.tsx +++ b/src/giftCards/GiftCardExportDialogContent/GiftCardExportDialogContent.tsx @@ -6,6 +6,10 @@ import { } from "@material-ui/core"; import ConfirmButton from "@saleor/components/ConfirmButton"; import { Task } from "@saleor/containers/BackgroundTasks/types"; +import { + useExportGiftCardsMutation, + useGiftCardTotalCountQuery +} from "@saleor/graphql"; import useBackgroundTask from "@saleor/hooks/useBackgroundTask"; import useForm from "@saleor/hooks/useForm"; import useNotifier from "@saleor/hooks/useNotifier"; @@ -20,13 +24,9 @@ import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import ContentWithProgress from "../GiftCardCreateDialog/ContentWithProgress"; -import useGiftCardList from "../GiftCardsList/providers/GiftCardListProvider/hooks/useGiftCardList"; -import useGiftCardListBulkActions from "../GiftCardsList/providers/GiftCardListProvider/hooks/useGiftCardListBulkActions"; -import { useGiftCardTotalCountQuery } from "../GiftCardsList/queries"; +import { useGiftCardList } from "../GiftCardsList/providers/GiftCardListProvider"; import { giftCardExportDialogMessages as messages } from "./messages"; -import { useGiftCardExportMutation } from "./mutations"; import useStyles from "./styles"; -import { ExportGiftCards } from "./types/ExportGiftCards"; import { getExportGiftCardsInput } from "./utils"; const GiftCardExportDialog: React.FC & { @@ -41,11 +41,10 @@ const GiftCardExportDialog: React.FC & { const { loading: loadingGiftCardList, - totalCount: filteredGiftCardsCount + totalCount: filteredGiftCardsCount, + listElements } = useGiftCardList(); - const { listElements } = useGiftCardListBulkActions(); - const selectedIds = idsToExport ?? listElements; const { @@ -55,25 +54,23 @@ const GiftCardExportDialog: React.FC & { const loading = loadingGiftCardList || loadingGiftCardCount; - const handleSubmitComplete = (data: ExportGiftCards) => { - const errors = data?.exportGiftCards?.errors; + const [exportGiftCards, exportGiftCardsOpts] = useExportGiftCardsMutation({ + onCompleted: data => { + const errors = data?.exportGiftCards?.errors; - if (!errors.length) { - notify({ - text: intl.formatMessage(messages.successAlertDescription), - title: intl.formatMessage(messages.successAlertTitle) - }); + if (!errors.length) { + notify({ + text: intl.formatMessage(messages.successAlertDescription), + title: intl.formatMessage(messages.successAlertTitle) + }); - queue(Task.EXPORT, { - id: data.exportGiftCards.exportFile.id - }); + queue(Task.EXPORT, { + id: data.exportGiftCards.exportFile.id + }); - onClose(); + onClose(); + } } - }; - - const [exportGiftCards, exportGiftCardsOpts] = useGiftCardExportMutation({ - onCompleted: handleSubmitComplete }); const handleSubmit = (data: ExportSettingsFormData) => { diff --git a/src/giftCards/GiftCardExportDialogContent/mutations.ts b/src/giftCards/GiftCardExportDialogContent/mutations.ts index 039fccc0f..32d11f6fb 100644 --- a/src/giftCards/GiftCardExportDialogContent/mutations.ts +++ b/src/giftCards/GiftCardExportDialogContent/mutations.ts @@ -1,18 +1,10 @@ import { gql } from "@apollo/client"; -import { exportErrorFragment } from "@saleor/fragments/errors"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { - ExportGiftCards, - ExportGiftCardsVariables -} from "./types/ExportGiftCards"; - -const exportGiftCards = gql` - ${exportErrorFragment} +export const exportGiftCards = gql` mutation ExportGiftCards($input: ExportGiftCardsInput!) { exportGiftCards(input: $input) { errors { - ...ExportErrorFragment + ...ExportError } exportFile { id @@ -20,8 +12,3 @@ const exportGiftCards = gql` } } `; - -export const useGiftCardExportMutation = makeMutation< - ExportGiftCards, - ExportGiftCardsVariables ->(exportGiftCards); diff --git a/src/giftCards/GiftCardExportDialogContent/types/ExportGiftCards.ts b/src/giftCards/GiftCardExportDialogContent/types/ExportGiftCards.ts deleted file mode 100644 index a633969ec..000000000 --- a/src/giftCards/GiftCardExportDialogContent/types/ExportGiftCards.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ExportGiftCardsInput, ExportErrorCode } from "./../../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ExportGiftCards -// ==================================================== - -export interface ExportGiftCards_exportGiftCards_errors { - __typename: "ExportError"; - code: ExportErrorCode; - field: string | null; - message: string | null; -} - -export interface ExportGiftCards_exportGiftCards_exportFile { - __typename: "ExportFile"; - id: string; -} - -export interface ExportGiftCards_exportGiftCards { - __typename: "ExportGiftCards"; - errors: ExportGiftCards_exportGiftCards_errors[]; - exportFile: ExportGiftCards_exportGiftCards_exportFile | null; -} - -export interface ExportGiftCards { - exportGiftCards: ExportGiftCards_exportGiftCards | null; -} - -export interface ExportGiftCardsVariables { - input: ExportGiftCardsInput; -} diff --git a/src/giftCards/GiftCardExportDialogContent/utils.ts b/src/giftCards/GiftCardExportDialogContent/utils.ts index 8aee64d94..43eeaade0 100644 --- a/src/giftCards/GiftCardExportDialogContent/utils.ts +++ b/src/giftCards/GiftCardExportDialogContent/utils.ts @@ -1,5 +1,5 @@ +import { ExportScope } from "@saleor/graphql"; import { ExportSettingsFormData } from "@saleor/products/components/ProductExportDialog/types"; -import { ExportScope } from "@saleor/types/globalTypes"; interface ExportGiftCardsInputProps { ids: string[] | null; diff --git a/src/giftCards/GiftCardSettings/GiftCardSettingsPage.tsx b/src/giftCards/GiftCardSettings/GiftCardSettingsPage.tsx index 32856502b..7578c4531 100644 --- a/src/giftCards/GiftCardSettings/GiftCardSettingsPage.tsx +++ b/src/giftCards/GiftCardSettings/GiftCardSettingsPage.tsx @@ -4,13 +4,15 @@ import Form from "@saleor/components/Form"; import { Grid } from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; +import { + GiftCardSettingsExpiryTypeEnum, + TimePeriodTypeEnum, + useGiftCardSettingsQuery, + useGiftCardSettingsUpdateMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import { sectionNames } from "@saleor/intl"; import { Backlink } from "@saleor/macaw-ui"; -import { - GiftCardSettingsExpiryTypeEnum, - TimePeriodTypeEnum -} from "@saleor/types/globalTypes"; import { getFormErrors } from "@saleor/utils/errors"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -19,8 +21,6 @@ import { giftCardsListPath } from "../urls"; import GiftCardExpirySettingsCard from "./GiftCardExpirySettingsCard"; import { giftCardExpirySettingsCard as expirySettingsMessages } from "./GiftCardExpirySettingsCard/messages"; import { giftCardSettingsPageMessages as messages } from "./messages"; -import { useGiftCardSettingsUpdateMutation } from "./mutations"; -import { useGiftCardSettingsQuery } from "./queries"; import { GiftCardSettingsFormData } from "./types"; import { getGiftCardSettingsInputData } from "./utils"; diff --git a/src/giftCards/GiftCardSettings/messages.ts b/src/giftCards/GiftCardSettings/messages.ts index e11ba49c1..7603db390 100644 --- a/src/giftCards/GiftCardSettings/messages.ts +++ b/src/giftCards/GiftCardSettings/messages.ts @@ -1,4 +1,4 @@ -import { GiftCardSettingsErrorFragment } from "@saleor/fragments/types/GiftCardSettingsErrorFragment"; +import { GiftCardSettingsErrorFragment } from "@saleor/graphql"; import { getCommonFormFieldErrorMessage } from "@saleor/utils/errors/common"; import { defineMessages, IntlShape } from "react-intl"; diff --git a/src/giftCards/GiftCardSettings/mutations.ts b/src/giftCards/GiftCardSettings/mutations.ts index a18469e41..c456d0fec 100644 --- a/src/giftCards/GiftCardSettings/mutations.ts +++ b/src/giftCards/GiftCardSettings/mutations.ts @@ -1,29 +1,14 @@ import { gql } from "@apollo/client"; -import { giftCardSettingsErrorFragment } from "@saleor/fragments/errors"; -import { fragmentGiftCardsSettings } from "@saleor/fragments/giftCards"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { - GiftCardSettingsUpdate, - GiftCardSettingsUpdateVariables -} from "./types/GiftCardSettingsUpdate"; - -const giftCardSettingsUpdate = gql` - ${giftCardSettingsErrorFragment} - ${fragmentGiftCardsSettings} +export const giftCardSettingsUpdate = gql` mutation GiftCardSettingsUpdate($input: GiftCardSettingsUpdateInput!) { giftCardSettingsUpdate(input: $input) { errors { - ...GiftCardSettingsErrorFragment + ...GiftCardSettingsError } giftCardSettings { - ...GiftCardsSettingsFragment + ...GiftCardsSettings } } } `; - -export const useGiftCardSettingsUpdateMutation = makeMutation< - GiftCardSettingsUpdate, - GiftCardSettingsUpdateVariables ->(giftCardSettingsUpdate); diff --git a/src/giftCards/GiftCardSettings/queries.ts b/src/giftCards/GiftCardSettings/queries.ts index 9abbb77be..0e0ebfe12 100644 --- a/src/giftCards/GiftCardSettings/queries.ts +++ b/src/giftCards/GiftCardSettings/queries.ts @@ -1,18 +1,9 @@ import { gql } from "@apollo/client"; -import { fragmentGiftCardsSettings } from "@saleor/fragments/giftCards"; -import makeQuery from "@saleor/hooks/makeQuery"; - -import { GiftCardSettings } from "./types/GiftCardSettings"; export const giftCardSettings = gql` - ${fragmentGiftCardsSettings} query GiftCardSettings { giftCardSettings { - ...GiftCardsSettingsFragment + ...GiftCardsSettings } } `; - -export const useGiftCardSettingsQuery = makeQuery( - giftCardSettings -); diff --git a/src/giftCards/GiftCardSettings/types.ts b/src/giftCards/GiftCardSettings/types.ts index 093eb6f41..9768dcafb 100644 --- a/src/giftCards/GiftCardSettings/types.ts +++ b/src/giftCards/GiftCardSettings/types.ts @@ -1,4 +1,4 @@ -import { TimePeriodTypeEnum } from "@saleor/types/globalTypes"; +import { TimePeriodTypeEnum } from "@saleor/graphql"; export interface GiftCardSettingsFormData { expiryPeriodActive: boolean; diff --git a/src/giftCards/GiftCardSettings/types/GiftCardSettings.ts b/src/giftCards/GiftCardSettings/types/GiftCardSettings.ts deleted file mode 100644 index 846982a85..000000000 --- a/src/giftCards/GiftCardSettings/types/GiftCardSettings.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardSettingsExpiryTypeEnum, TimePeriodTypeEnum } from "./../../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: GiftCardSettings -// ==================================================== - -export interface GiftCardSettings_giftCardSettings_expiryPeriod { - __typename: "TimePeriod"; - type: TimePeriodTypeEnum; - amount: number; -} - -export interface GiftCardSettings_giftCardSettings { - __typename: "GiftCardSettings"; - expiryType: GiftCardSettingsExpiryTypeEnum; - expiryPeriod: GiftCardSettings_giftCardSettings_expiryPeriod | null; -} - -export interface GiftCardSettings { - giftCardSettings: GiftCardSettings_giftCardSettings; -} diff --git a/src/giftCards/GiftCardSettings/types/GiftCardSettingsUpdate.ts b/src/giftCards/GiftCardSettings/types/GiftCardSettingsUpdate.ts deleted file mode 100644 index 64753329d..000000000 --- a/src/giftCards/GiftCardSettings/types/GiftCardSettingsUpdate.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardSettingsUpdateInput, GiftCardSettingsErrorCode, GiftCardSettingsExpiryTypeEnum, TimePeriodTypeEnum } from "./../../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: GiftCardSettingsUpdate -// ==================================================== - -export interface GiftCardSettingsUpdate_giftCardSettingsUpdate_errors { - __typename: "GiftCardSettingsError"; - code: GiftCardSettingsErrorCode; - field: string | null; - message: string | null; -} - -export interface GiftCardSettingsUpdate_giftCardSettingsUpdate_giftCardSettings_expiryPeriod { - __typename: "TimePeriod"; - type: TimePeriodTypeEnum; - amount: number; -} - -export interface GiftCardSettingsUpdate_giftCardSettingsUpdate_giftCardSettings { - __typename: "GiftCardSettings"; - expiryType: GiftCardSettingsExpiryTypeEnum; - expiryPeriod: GiftCardSettingsUpdate_giftCardSettingsUpdate_giftCardSettings_expiryPeriod | null; -} - -export interface GiftCardSettingsUpdate_giftCardSettingsUpdate { - __typename: "GiftCardSettingsUpdate"; - errors: GiftCardSettingsUpdate_giftCardSettingsUpdate_errors[]; - giftCardSettings: GiftCardSettingsUpdate_giftCardSettingsUpdate_giftCardSettings | null; -} - -export interface GiftCardSettingsUpdate { - giftCardSettingsUpdate: GiftCardSettingsUpdate_giftCardSettingsUpdate | null; -} - -export interface GiftCardSettingsUpdateVariables { - input: GiftCardSettingsUpdateInput; -} diff --git a/src/giftCards/GiftCardSettings/utils.ts b/src/giftCards/GiftCardSettings/utils.ts index c58c3d54e..e85aa925a 100644 --- a/src/giftCards/GiftCardSettings/utils.ts +++ b/src/giftCards/GiftCardSettings/utils.ts @@ -1,7 +1,7 @@ import { GiftCardSettingsExpiryTypeEnum, GiftCardSettingsUpdateInput -} from "@saleor/types/globalTypes"; +} from "@saleor/graphql"; import { GiftCardSettingsFormData } from "./types"; diff --git a/src/giftCards/GiftCardUpdate/GiftCardHistory/GiftCardHistory.tsx b/src/giftCards/GiftCardUpdate/GiftCardHistory/GiftCardHistory.tsx index c837a4903..87b9f5f0a 100644 --- a/src/giftCards/GiftCardUpdate/GiftCardHistory/GiftCardHistory.tsx +++ b/src/giftCards/GiftCardUpdate/GiftCardHistory/GiftCardHistory.tsx @@ -6,14 +6,15 @@ import Timeline, { TimelineAddNote, TimelineNote } from "@saleor/components/Timeline"; +import { + GiftCardEventsEnum, + useGiftCardAddNoteMutation +} from "@saleor/graphql"; import useNotifier from "@saleor/hooks/useNotifier"; -import { GiftCardEventsEnum } from "@saleor/types/globalTypes"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { useGiftCardTimelineNoteAddMutation } from "../mutations"; import { GIFT_CARD_DETAILS_QUERY } from "../queries"; -import { GiftCardAddNote } from "../types/GiftCardAddNote"; import GiftCardTimelineEvent from "./GiftCardTimelineEvent"; import useGiftCardHistoryEvents from "./hooks/useGiftCardHistoryEvents"; import { giftCardHistoryMessages as messages } from "./messages"; @@ -29,25 +30,23 @@ const GiftCardHistory: React.FC = () => { const { id, events } = useGiftCardHistoryEvents(); const classes = useStyles(); - const onTimelineNoteAddCompleted = ({ giftCardAddNote }: GiftCardAddNote) => { - const { errors } = giftCardAddNote; - - if (errors.length > 0) { - notify({ - status: "error", - text: intl.formatMessage(messages.noteAddError) - }); - } else { - notify({ - status: "success", - text: intl.formatMessage(messages.noteAddedSuccessfully) - }); - } - }; - - const [addTimelineNote, { loading }] = useGiftCardTimelineNoteAddMutation({ + const [addTimelineNote, { loading }] = useGiftCardAddNoteMutation({ refetchQueries: [GIFT_CARD_DETAILS_QUERY], - onCompleted: onTimelineNoteAddCompleted + onCompleted: ({ giftCardAddNote }) => { + const { errors } = giftCardAddNote; + + if (errors.length > 0) { + notify({ + status: "error", + text: intl.formatMessage(messages.noteAddError) + }); + } else { + notify({ + status: "success", + text: intl.formatMessage(messages.noteAddedSuccessfully) + }); + } + } }); const onNoteAdd = (data: FormData) => { diff --git a/src/giftCards/GiftCardUpdate/GiftCardHistory/GiftCardTimelineEvent.tsx b/src/giftCards/GiftCardUpdate/GiftCardHistory/GiftCardTimelineEvent.tsx index 8932ab247..8c7c95aab 100644 --- a/src/giftCards/GiftCardUpdate/GiftCardHistory/GiftCardTimelineEvent.tsx +++ b/src/giftCards/GiftCardUpdate/GiftCardHistory/GiftCardTimelineEvent.tsx @@ -2,19 +2,15 @@ import { appPath } from "@saleor/apps/urls"; import Link from "@saleor/components/Link"; import { TimelineEvent } from "@saleor/components/Timeline"; import { customerPath } from "@saleor/customers/urls"; +import { GiftCardEventFragment, GiftCardEventsEnum } from "@saleor/graphql"; import { orderUrl } from "@saleor/orders/urls"; import { staffMemberDetailsUrl } from "@saleor/staff/urls"; -import { GiftCardEventsEnum } from "@saleor/types/globalTypes"; import React from "react"; -import { useIntl } from "react-intl"; -import { IntlShape } from "react-intl"; +import { IntlShape, useIntl } from "react-intl"; -import { GiftCardDetails_giftCard_events } from "../types/GiftCardDetails"; import { giftCardHistoryTimelineMessages as timelineMessages } from "./messages"; -const getUserOrApp = ( - event: GiftCardDetails_giftCard_events -): string | null => { +const getUserOrApp = (event: GiftCardEventFragment): string | null => { if (event.user) { const { firstName, lastName, email } = event.user; @@ -32,10 +28,7 @@ const getUserOrApp = ( return null; }; -const getEventMessage = ( - event: GiftCardDetails_giftCard_events, - intl: IntlShape -) => { +const getEventMessage = (event: GiftCardEventFragment, intl: IntlShape) => { const user = getUserOrApp(event); switch (event.type) { @@ -120,7 +113,7 @@ const getEventMessage = ( export interface GiftCardTimelineEventProps { date: string; - event: GiftCardDetails_giftCard_events; + event: GiftCardEventFragment; } const GiftCardTimelineEvent: React.FC = ({ diff --git a/src/giftCards/GiftCardUpdate/GiftCardResendCodeDialog/GiftCardResendCodeDialog.tsx b/src/giftCards/GiftCardUpdate/GiftCardResendCodeDialog/GiftCardResendCodeDialog.tsx index 04cb00fed..4f3bb2101 100644 --- a/src/giftCards/GiftCardUpdate/GiftCardResendCodeDialog/GiftCardResendCodeDialog.tsx +++ b/src/giftCards/GiftCardUpdate/GiftCardResendCodeDialog/GiftCardResendCodeDialog.tsx @@ -1,11 +1,11 @@ import { CircularProgress, TextField, Typography } from "@material-ui/core"; import VerticalSpacer from "@saleor/apps/components/VerticalSpacer"; -import { useChannelsList } from "@saleor/channels/queries"; import ActionDialog from "@saleor/components/ActionDialog"; import { useChannelsSearch } from "@saleor/components/ChannelsAvailabilityDialog/utils"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import { IMessage } from "@saleor/components/messages"; import SingleAutocompleteSelectField from "@saleor/components/SingleAutocompleteSelectField"; +import { useChannelsQuery, useGiftCardResendMutation } from "@saleor/graphql"; import useForm from "@saleor/hooks/useForm"; import useNotifier from "@saleor/hooks/useNotifier"; import { getBySlug } from "@saleor/products/components/ProductVariantCreatorPage/utils"; @@ -20,8 +20,6 @@ import { useUpdateBalanceDialogStyles as useStyles } from "../GiftCardUpdateBala import { getGiftCardErrorMessage } from "../messages"; import useGiftCardDetails from "../providers/GiftCardDetailsProvider/hooks/useGiftCardDetails"; import { giftCardResendCodeDialogMessages as messages } from "./messages"; -import { useGiftCardResendCodeMutation } from "./mutations"; -import { GiftCardResend } from "./types/GiftCardResend"; import { useDialogFormReset } from "./utils"; export interface GiftCardResendCodeFormData { @@ -41,7 +39,7 @@ const GiftCardResendCodeDialog: React.FC = ({ open, onClose }) => { const [consentSelected, setConsentSelected] = useState(false); - const { data: channelsData, loading: loadingChannels } = useChannelsList({}); + const { data: channelsData, loading: loadingChannels } = useChannelsQuery({}); const channels = channelsData?.channels; @@ -80,32 +78,30 @@ const GiftCardResendCodeDialog: React.FC = ({ open, onClose }) => { handleSubmit ); - const onCompleted = (data: GiftCardResend) => { - const errors = data?.giftCardResend?.errors; - - const notifierData: IMessage = !!errors?.length - ? { - status: "error", - text: intl.formatMessage(commonErrorMessages.unknownError) - } - : { - status: "success", - text: intl.formatMessage(messages.successResendAlertText) - }; - - notify(notifierData); - - if (!errors.length) { - onClose(); - reset(); - } - }; - const [ resendGiftCardCode, resendGiftCardCodeOpts - ] = useGiftCardResendCodeMutation({ - onCompleted + ] = useGiftCardResendMutation({ + onCompleted: data => { + const errors = data?.giftCardResend?.errors; + + const notifierData: IMessage = !!errors?.length + ? { + status: "error", + text: intl.formatMessage(commonErrorMessages.unknownError) + } + : { + status: "success", + text: intl.formatMessage(messages.successResendAlertText) + }; + + notify(notifierData); + + if (!errors.length) { + onClose(); + reset(); + } + } }); const { loading, status, data: submitData } = resendGiftCardCodeOpts; diff --git a/src/giftCards/GiftCardUpdate/GiftCardResendCodeDialog/mutations.ts b/src/giftCards/GiftCardUpdate/GiftCardResendCodeDialog/mutations.ts index 8d7ae64b9..d58526599 100644 --- a/src/giftCards/GiftCardUpdate/GiftCardResendCodeDialog/mutations.ts +++ b/src/giftCards/GiftCardUpdate/GiftCardResendCodeDialog/mutations.ts @@ -1,16 +1,6 @@ import { gql } from "@apollo/client"; -import { giftCardErrorFragment } from "@saleor/fragments/errors"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { giftCardDataFragment } from "../queries"; -import { - GiftCardResend, - GiftCardResendVariables -} from "./types/GiftCardResend"; - -const giftCardResend = gql` - ${giftCardDataFragment} - ${giftCardErrorFragment} +export const giftCardResend = gql` mutation GiftCardResend($input: GiftCardResendInput!) { giftCardResend(input: $input) { errors { @@ -22,8 +12,3 @@ const giftCardResend = gql` } } `; - -export const useGiftCardResendCodeMutation = makeMutation< - GiftCardResend, - GiftCardResendVariables ->(giftCardResend); diff --git a/src/giftCards/GiftCardUpdate/GiftCardResendCodeDialog/types/GiftCardResend.ts b/src/giftCards/GiftCardUpdate/GiftCardResendCodeDialog/types/GiftCardResend.ts deleted file mode 100644 index 05f54fc7d..000000000 --- a/src/giftCards/GiftCardUpdate/GiftCardResendCodeDialog/types/GiftCardResend.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardResendInput, GiftCardErrorCode } from "./../../../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: GiftCardResend -// ==================================================== - -export interface GiftCardResend_giftCardResend_errors { - __typename: "GiftCardError"; - code: GiftCardErrorCode; - field: string | null; - message: string | null; -} - -export interface GiftCardResend_giftCardResend_giftCard_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface GiftCardResend_giftCardResend_giftCard_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface GiftCardResend_giftCardResend_giftCard_createdBy { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} - -export interface GiftCardResend_giftCardResend_giftCard_product { - __typename: "Product"; - id: string; - name: string; -} - -export interface GiftCardResend_giftCardResend_giftCard_usedBy { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} - -export interface GiftCardResend_giftCardResend_giftCard_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface GiftCardResend_giftCardResend_giftCard_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardResend_giftCardResend_giftCard_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardResend_giftCardResend_giftCard_tags { - __typename: "GiftCardTag"; - name: string; -} - -export interface GiftCardResend_giftCardResend_giftCard { - __typename: "GiftCard"; - metadata: (GiftCardResend_giftCardResend_giftCard_metadata | null)[]; - privateMetadata: (GiftCardResend_giftCardResend_giftCard_privateMetadata | null)[]; - last4CodeChars: string; - boughtInChannel: string | null; - createdBy: GiftCardResend_giftCardResend_giftCard_createdBy | null; - product: GiftCardResend_giftCardResend_giftCard_product | null; - usedBy: GiftCardResend_giftCardResend_giftCard_usedBy | null; - usedByEmail: string | null; - createdByEmail: string | null; - app: GiftCardResend_giftCardResend_giftCard_app | null; - created: any; - expiryDate: any | null; - lastUsedOn: any | null; - isActive: boolean; - initialBalance: GiftCardResend_giftCardResend_giftCard_initialBalance | null; - currentBalance: GiftCardResend_giftCardResend_giftCard_currentBalance | null; - id: string; - tags: GiftCardResend_giftCardResend_giftCard_tags[]; -} - -export interface GiftCardResend_giftCardResend { - __typename: "GiftCardResend"; - errors: GiftCardResend_giftCardResend_errors[]; - giftCard: GiftCardResend_giftCardResend_giftCard | null; -} - -export interface GiftCardResend { - giftCardResend: GiftCardResend_giftCardResend | null; -} - -export interface GiftCardResendVariables { - input: GiftCardResendInput; -} diff --git a/src/giftCards/GiftCardUpdate/GiftCardUpdateBalanceDialog/GiftCardUpdateBalanceDialog.tsx b/src/giftCards/GiftCardUpdate/GiftCardUpdateBalanceDialog/GiftCardUpdateBalanceDialog.tsx index d18d79324..e95c01f39 100644 --- a/src/giftCards/GiftCardUpdate/GiftCardUpdateBalanceDialog/GiftCardUpdateBalanceDialog.tsx +++ b/src/giftCards/GiftCardUpdate/GiftCardUpdateBalanceDialog/GiftCardUpdateBalanceDialog.tsx @@ -2,6 +2,7 @@ import { TextField, Typography } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import CardSpacer from "@saleor/components/CardSpacer"; import { IMessage } from "@saleor/components/messages"; +import { useGiftCardUpdateMutation } from "@saleor/graphql"; import useForm from "@saleor/hooks/useForm"; import useNotifier from "@saleor/hooks/useNotifier"; import { DialogProps } from "@saleor/types"; @@ -12,9 +13,7 @@ import { useIntl } from "react-intl"; import { giftCardsListTableMessages as tableMessages } from "../../GiftCardsList/messages"; import { useDialogFormReset } from "../GiftCardResendCodeDialog/utils"; import { getGiftCardErrorMessage } from "../messages"; -import { useGiftCardUpdateMutation } from "../mutations"; import useGiftCardDetails from "../providers/GiftCardDetailsProvider/hooks/useGiftCardDetails"; -import { GiftCardUpdate } from "../types/GiftCardUpdate"; import { giftCardUpdateBalanceDialogMessages as messages } from "./messages"; import { useUpdateBalanceDialogStyles as useStyles } from "./styles"; @@ -41,31 +40,29 @@ const GiftCardUpdateBalanceDialog: React.FC = ({ balanceAmount: amount }; - const onCompleted = (data: GiftCardUpdate) => { - const errors = data?.giftCardUpdate?.errors; - - const notifierData: IMessage = !!errors?.length - ? { - status: "error", - text: intl.formatMessage(commonErrorMessages.unknownError) - } - : { - status: "success", - text: intl.formatMessage(messages.updatedSuccessAlertTitle) - }; - - notify(notifierData); - - if (!errors.length) { - onClose(); - } - }; - const [ updateGiftCardBalance, updateGiftCardBalanceOpts ] = useGiftCardUpdateMutation({ - onCompleted + onCompleted: data => { + const errors = data?.giftCardUpdate?.errors; + + const notifierData: IMessage = !!errors?.length + ? { + status: "error", + text: intl.formatMessage(commonErrorMessages.unknownError) + } + : { + status: "success", + text: intl.formatMessage(messages.updatedSuccessAlertTitle) + }; + + notify(notifierData); + + if (!errors.length) { + onClose(); + } + } }); const handleSubmit = async ({ diff --git a/src/giftCards/GiftCardUpdate/GiftCardUpdateInfoCard/GiftCardUpdateInfoCardContent.tsx b/src/giftCards/GiftCardUpdate/GiftCardUpdateInfoCard/GiftCardUpdateInfoCardContent.tsx index 00cb18f94..0b5fca8b8 100644 --- a/src/giftCards/GiftCardUpdate/GiftCardUpdateInfoCard/GiftCardUpdateInfoCardContent.tsx +++ b/src/giftCards/GiftCardUpdate/GiftCardUpdateInfoCard/GiftCardUpdateInfoCardContent.tsx @@ -3,6 +3,7 @@ import { appUrl } from "@saleor/apps/urls"; import CardSpacer from "@saleor/components/CardSpacer"; import Link from "@saleor/components/Link"; import { customerUrl } from "@saleor/customers/urls"; +import { GiftCardEventsEnum } from "@saleor/graphql"; import useDateLocalize from "@saleor/hooks/useDateLocalize"; import { getFullName, getStringOrPlaceholder } from "@saleor/misc"; import Label from "@saleor/orders/components/OrderHistory/Label"; @@ -10,7 +11,6 @@ import { getOrderNumberLinkObject } from "@saleor/orders/components/OrderHistory import { getByType } from "@saleor/orders/components/OrderReturnPage/utils"; import { productUrl } from "@saleor/products/urls"; import { staffMemberDetailsUrl } from "@saleor/staff/urls"; -import { GiftCardEventsEnum } from "@saleor/types/globalTypes"; import React from "react"; import { MessageDescriptor, useIntl } from "react-intl"; diff --git a/src/giftCards/GiftCardUpdate/GiftCardUpdatePageHeader/hooks/useGiftCardActivateToggle.ts b/src/giftCards/GiftCardUpdate/GiftCardUpdatePageHeader/hooks/useGiftCardActivateToggle.ts index 0c01c9fb8..a81e7607d 100644 --- a/src/giftCards/GiftCardUpdate/GiftCardUpdatePageHeader/hooks/useGiftCardActivateToggle.ts +++ b/src/giftCards/GiftCardUpdate/GiftCardUpdatePageHeader/hooks/useGiftCardActivateToggle.ts @@ -1,15 +1,13 @@ +import { + useGiftCardActivateMutation, + useGiftCardDeactivateMutation +} from "@saleor/graphql"; import useNotifier from "@saleor/hooks/useNotifier"; import commonErrorMessages from "@saleor/utils/errors/common"; import { useIntl } from "react-intl"; import { GIFT_CARD_DETAILS_QUERY } from "../../queries"; import { giftCardEnableDisableSectionMessages as messages } from "../messages"; -import { - useGiftCardActivateMutation, - useGiftCardDeactivateMutation -} from "../mutations"; -import { GiftCardActivate } from "../types/GiftCardActivate"; -import { GiftCardDeactivate } from "../types/GiftCardDeactivate"; interface useGiftCardActivateToggleProps { onActivateActionComplete?: () => void | undefined; @@ -25,51 +23,28 @@ const useGiftCardActivateToggle = ({ const intl = useIntl(); const notify = useNotifier(); - const onActivateCompleted = (data: GiftCardActivate) => { - const errors = data?.giftCardActivate?.errors; - - if (!!errors?.length) { - notify({ - status: "error", - text: intl.formatMessage(commonErrorMessages.unknownError) - }); - - return; - } - - notify({ - status: "success", - text: intl.formatMessage(messages.successfullyEnabledTitle) - }); - - if (!!onActivateActionComplete) { - onActivateActionComplete(); - } - }; - - const onDeactivateCompleted = (data: GiftCardDeactivate) => { - const errors = data?.giftCardDeactivate?.errors; - - if (!!errors?.length) { - notify({ - status: "error", - text: intl.formatMessage(commonErrorMessages.unknownError) - }); - return; - } - - notify({ - status: "success", - text: intl.formatMessage(messages.successfullyDisabledTitle) - }); - - if (!!onDeactivateActionComplete) { - onDeactivateActionComplete(); - } - }; - const [giftCardActivate, giftCardActivateOpts] = useGiftCardActivateMutation({ - onCompleted: onActivateCompleted, + onCompleted: data => { + const errors = data?.giftCardActivate?.errors; + + if (!!errors?.length) { + notify({ + status: "error", + text: intl.formatMessage(commonErrorMessages.unknownError) + }); + + return; + } + + notify({ + status: "success", + text: intl.formatMessage(messages.successfullyEnabledTitle) + }); + + if (!!onActivateActionComplete) { + onActivateActionComplete(); + } + }, refetchQueries: [GIFT_CARD_DETAILS_QUERY] }); @@ -77,7 +52,26 @@ const useGiftCardActivateToggle = ({ giftCardDeactivate, giftCardDeactivateOpts ] = useGiftCardDeactivateMutation({ - onCompleted: onDeactivateCompleted, + onCompleted: data => { + const errors = data?.giftCardDeactivate?.errors; + + if (!!errors?.length) { + notify({ + status: "error", + text: intl.formatMessage(commonErrorMessages.unknownError) + }); + return; + } + + notify({ + status: "success", + text: intl.formatMessage(messages.successfullyDisabledTitle) + }); + + if (!!onDeactivateActionComplete) { + onDeactivateActionComplete(); + } + }, refetchQueries: [GIFT_CARD_DETAILS_QUERY] }); diff --git a/src/giftCards/GiftCardUpdate/GiftCardUpdatePageHeader/mutations.ts b/src/giftCards/GiftCardUpdate/GiftCardUpdatePageHeader/mutations.ts index 009fdc3c4..dc54ff4c9 100644 --- a/src/giftCards/GiftCardUpdate/GiftCardUpdatePageHeader/mutations.ts +++ b/src/giftCards/GiftCardUpdate/GiftCardUpdatePageHeader/mutations.ts @@ -1,20 +1,6 @@ import { gql } from "@apollo/client"; -import { giftCardErrorFragment } from "@saleor/fragments/errors"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { giftCardDataFragment } from "../queries"; -import { - GiftCardActivate, - GiftCardActivateVariables -} from "./types/GiftCardActivate"; -import { - GiftCardDeactivate, - GiftCardDeactivateVariables -} from "./types/GiftCardDeactivate"; - -const giftCardActivate = gql` - ${giftCardDataFragment} - ${giftCardErrorFragment} +export const giftCardActivate = gql` mutation GiftCardActivate($id: ID!) { giftCardActivate(id: $id) { errors { @@ -27,14 +13,7 @@ const giftCardActivate = gql` } `; -export const useGiftCardActivateMutation = makeMutation< - GiftCardActivate, - GiftCardActivateVariables ->(giftCardActivate); - -const giftCardDeactivate = gql` - ${giftCardDataFragment} - ${giftCardErrorFragment} +export const giftCardDeactivate = gql` mutation GiftCardDeactivate($id: ID!) { giftCardDeactivate(id: $id) { errors { @@ -46,8 +25,3 @@ const giftCardDeactivate = gql` } } `; - -export const useGiftCardDeactivateMutation = makeMutation< - GiftCardDeactivate, - GiftCardDeactivateVariables ->(giftCardDeactivate); diff --git a/src/giftCards/GiftCardUpdate/GiftCardUpdatePageHeader/types/GiftCardActivate.ts b/src/giftCards/GiftCardUpdate/GiftCardUpdatePageHeader/types/GiftCardActivate.ts deleted file mode 100644 index 5fb67fdb4..000000000 --- a/src/giftCards/GiftCardUpdate/GiftCardUpdatePageHeader/types/GiftCardActivate.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardErrorCode } from "./../../../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: GiftCardActivate -// ==================================================== - -export interface GiftCardActivate_giftCardActivate_errors { - __typename: "GiftCardError"; - code: GiftCardErrorCode; - field: string | null; - message: string | null; -} - -export interface GiftCardActivate_giftCardActivate_giftCard_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface GiftCardActivate_giftCardActivate_giftCard_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface GiftCardActivate_giftCardActivate_giftCard_createdBy { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} - -export interface GiftCardActivate_giftCardActivate_giftCard_product { - __typename: "Product"; - id: string; - name: string; -} - -export interface GiftCardActivate_giftCardActivate_giftCard_usedBy { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} - -export interface GiftCardActivate_giftCardActivate_giftCard_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface GiftCardActivate_giftCardActivate_giftCard_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardActivate_giftCardActivate_giftCard_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardActivate_giftCardActivate_giftCard_tags { - __typename: "GiftCardTag"; - name: string; -} - -export interface GiftCardActivate_giftCardActivate_giftCard { - __typename: "GiftCard"; - metadata: (GiftCardActivate_giftCardActivate_giftCard_metadata | null)[]; - privateMetadata: (GiftCardActivate_giftCardActivate_giftCard_privateMetadata | null)[]; - last4CodeChars: string; - boughtInChannel: string | null; - createdBy: GiftCardActivate_giftCardActivate_giftCard_createdBy | null; - product: GiftCardActivate_giftCardActivate_giftCard_product | null; - usedBy: GiftCardActivate_giftCardActivate_giftCard_usedBy | null; - usedByEmail: string | null; - createdByEmail: string | null; - app: GiftCardActivate_giftCardActivate_giftCard_app | null; - created: any; - expiryDate: any | null; - lastUsedOn: any | null; - isActive: boolean; - initialBalance: GiftCardActivate_giftCardActivate_giftCard_initialBalance | null; - currentBalance: GiftCardActivate_giftCardActivate_giftCard_currentBalance | null; - id: string; - tags: GiftCardActivate_giftCardActivate_giftCard_tags[]; -} - -export interface GiftCardActivate_giftCardActivate { - __typename: "GiftCardActivate"; - errors: GiftCardActivate_giftCardActivate_errors[]; - giftCard: GiftCardActivate_giftCardActivate_giftCard | null; -} - -export interface GiftCardActivate { - giftCardActivate: GiftCardActivate_giftCardActivate | null; -} - -export interface GiftCardActivateVariables { - id: string; -} diff --git a/src/giftCards/GiftCardUpdate/GiftCardUpdatePageHeader/types/GiftCardDeactivate.ts b/src/giftCards/GiftCardUpdate/GiftCardUpdatePageHeader/types/GiftCardDeactivate.ts deleted file mode 100644 index 41f76d104..000000000 --- a/src/giftCards/GiftCardUpdate/GiftCardUpdatePageHeader/types/GiftCardDeactivate.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardErrorCode } from "./../../../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: GiftCardDeactivate -// ==================================================== - -export interface GiftCardDeactivate_giftCardDeactivate_errors { - __typename: "GiftCardError"; - code: GiftCardErrorCode; - field: string | null; - message: string | null; -} - -export interface GiftCardDeactivate_giftCardDeactivate_giftCard_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface GiftCardDeactivate_giftCardDeactivate_giftCard_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface GiftCardDeactivate_giftCardDeactivate_giftCard_createdBy { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} - -export interface GiftCardDeactivate_giftCardDeactivate_giftCard_product { - __typename: "Product"; - id: string; - name: string; -} - -export interface GiftCardDeactivate_giftCardDeactivate_giftCard_usedBy { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} - -export interface GiftCardDeactivate_giftCardDeactivate_giftCard_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface GiftCardDeactivate_giftCardDeactivate_giftCard_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardDeactivate_giftCardDeactivate_giftCard_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardDeactivate_giftCardDeactivate_giftCard_tags { - __typename: "GiftCardTag"; - name: string; -} - -export interface GiftCardDeactivate_giftCardDeactivate_giftCard { - __typename: "GiftCard"; - metadata: (GiftCardDeactivate_giftCardDeactivate_giftCard_metadata | null)[]; - privateMetadata: (GiftCardDeactivate_giftCardDeactivate_giftCard_privateMetadata | null)[]; - last4CodeChars: string; - boughtInChannel: string | null; - createdBy: GiftCardDeactivate_giftCardDeactivate_giftCard_createdBy | null; - product: GiftCardDeactivate_giftCardDeactivate_giftCard_product | null; - usedBy: GiftCardDeactivate_giftCardDeactivate_giftCard_usedBy | null; - usedByEmail: string | null; - createdByEmail: string | null; - app: GiftCardDeactivate_giftCardDeactivate_giftCard_app | null; - created: any; - expiryDate: any | null; - lastUsedOn: any | null; - isActive: boolean; - initialBalance: GiftCardDeactivate_giftCardDeactivate_giftCard_initialBalance | null; - currentBalance: GiftCardDeactivate_giftCardDeactivate_giftCard_currentBalance | null; - id: string; - tags: GiftCardDeactivate_giftCardDeactivate_giftCard_tags[]; -} - -export interface GiftCardDeactivate_giftCardDeactivate { - __typename: "GiftCardDeactivate"; - errors: GiftCardDeactivate_giftCardDeactivate_errors[]; - giftCard: GiftCardDeactivate_giftCardDeactivate_giftCard | null; -} - -export interface GiftCardDeactivate { - giftCardDeactivate: GiftCardDeactivate_giftCardDeactivate | null; -} - -export interface GiftCardDeactivateVariables { - id: string; -} diff --git a/src/giftCards/GiftCardUpdate/messages.ts b/src/giftCards/GiftCardUpdate/messages.ts index 3ed00a726..1fd4e1959 100644 --- a/src/giftCards/GiftCardUpdate/messages.ts +++ b/src/giftCards/GiftCardUpdate/messages.ts @@ -1,5 +1,4 @@ -import { GiftCardError } from "@saleor/fragments/types/GiftCardError"; -import { GiftCardErrorCode } from "@saleor/types/globalTypes"; +import { GiftCardErrorCode, GiftCardErrorFragment } from "@saleor/graphql"; import commonErrorMessages, { getCommonFormFieldErrorMessage } from "@saleor/utils/errors/common"; @@ -20,7 +19,7 @@ const giftCardErrorMessages = defineMessages({ }); export function getGiftCardErrorMessage( - error: Omit | undefined, + error: Omit | undefined, intl: IntlShape ): string { if (error) { diff --git a/src/giftCards/GiftCardUpdate/mutations.ts b/src/giftCards/GiftCardUpdate/mutations.ts index 41c2fc11e..547cf6a2a 100644 --- a/src/giftCards/GiftCardUpdate/mutations.ts +++ b/src/giftCards/GiftCardUpdate/mutations.ts @@ -1,21 +1,6 @@ import { gql } from "@apollo/client"; -import { giftCardErrorFragment } from "@saleor/fragments/errors"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { giftCardDataFragment, giftCardEventsFragment } from "./queries"; -import { - GiftCardAddNote, - GiftCardAddNoteVariables -} from "./types/GiftCardAddNote"; -import { - GiftCardUpdate, - GiftCardUpdateVariables -} from "./types/GiftCardUpdate"; - -const giftCardUpdate = gql` - ${giftCardDataFragment} - ${giftCardErrorFragment} - ${giftCardEventsFragment} +export const giftCardUpdate = gql` mutation GiftCardUpdate($id: ID!, $input: GiftCardUpdateInput!) { giftCardUpdate(id: $id, input: $input) { errors { @@ -31,15 +16,7 @@ const giftCardUpdate = gql` } `; -export const useGiftCardUpdateMutation = makeMutation< - GiftCardUpdate, - GiftCardUpdateVariables ->(giftCardUpdate); - export const giftCardTimelineNoteAdd = gql` - ${giftCardDataFragment} - ${giftCardErrorFragment} - ${giftCardEventsFragment} mutation GiftCardAddNote($id: ID!, $input: GiftCardAddNoteInput!) { giftCardAddNote(id: $id, input: $input) { errors { @@ -54,8 +31,3 @@ export const giftCardTimelineNoteAdd = gql` } } `; - -export const useGiftCardTimelineNoteAddMutation = makeMutation< - GiftCardAddNote, - GiftCardAddNoteVariables ->(giftCardTimelineNoteAdd); diff --git a/src/giftCards/GiftCardUpdate/providers/GiftCardDetailsProvider/GiftCardDetailsProvider.tsx b/src/giftCards/GiftCardUpdate/providers/GiftCardDetailsProvider/GiftCardDetailsProvider.tsx index 6aa8ea2f3..2c84562b1 100644 --- a/src/giftCards/GiftCardUpdate/providers/GiftCardDetailsProvider/GiftCardDetailsProvider.tsx +++ b/src/giftCards/GiftCardUpdate/providers/GiftCardDetailsProvider/GiftCardDetailsProvider.tsx @@ -1,7 +1,6 @@ +import { GiftCardDetailsQuery, useGiftCardDetailsQuery } from "@saleor/graphql"; import React, { createContext } from "react"; -import { useGiftCardDetailsQuery } from "../../queries"; -import { GiftCardDetails_giftCard } from "../../types/GiftCardDetails"; import { ExtendedGiftCard } from "./types"; import { getExtendedGiftCard } from "./utils"; @@ -11,7 +10,7 @@ interface GiftCardDetailsProviderProps { } export interface GiftCardDetailsConsumerProps { - giftCard: ExtendedGiftCard | undefined; + giftCard: ExtendedGiftCard | undefined; loading: boolean; } diff --git a/src/giftCards/GiftCardUpdate/providers/GiftCardUpdateFormProvider/GiftCardUpdateFormProvider.tsx b/src/giftCards/GiftCardUpdate/providers/GiftCardUpdateFormProvider/GiftCardUpdateFormProvider.tsx index 9103ad7ed..06b8c5cf5 100644 --- a/src/giftCards/GiftCardUpdate/providers/GiftCardUpdateFormProvider/GiftCardUpdateFormProvider.tsx +++ b/src/giftCards/GiftCardUpdate/providers/GiftCardUpdateFormProvider/GiftCardUpdateFormProvider.tsx @@ -1,6 +1,12 @@ import { MetadataFormData } from "@saleor/components/Metadata"; -import { GiftCardError } from "@saleor/fragments/types/GiftCardError"; import { giftCardUpdateFormMessages } from "@saleor/giftCards/GiftCardsList/messages"; +import { + GiftCardErrorFragment, + GiftCardUpdateMutation, + useGiftCardUpdateMutation, + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation +} from "@saleor/graphql"; import { MutationResultWithOpts } from "@saleor/hooks/makeMutation"; import useForm, { FormChange, UseFormResult } from "@saleor/hooks/useForm"; import useHandleFormSubmit from "@saleor/hooks/useHandleFormSubmit"; @@ -10,10 +16,6 @@ import { getFormErrors } from "@saleor/utils/errors"; import createMetadataUpdateHandler from "@saleor/utils/handlers/metadataUpdateHandler"; import { mapMetadataItemToInput } from "@saleor/utils/maps"; import getMetadata from "@saleor/utils/metadata/getMetadata"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; import useMetadataChangeTrigger from "@saleor/utils/metadata/useMetadataChangeTrigger"; import difference from "lodash/difference"; import React, { createContext } from "react"; @@ -23,8 +25,6 @@ import { GiftCardCreateFormData, initialData as emptyFormData } from "../../../GiftCardCreateDialog/GiftCardCreateDialogForm"; -import { useGiftCardUpdateMutation } from "../../mutations"; -import { GiftCardUpdate } from "../../types/GiftCardUpdate"; import useGiftCardDetails from "../GiftCardDetailsProvider/hooks/useGiftCardDetails"; interface GiftCardUpdateFormProviderProps { @@ -36,11 +36,11 @@ export type GiftCardUpdateFormData = MetadataFormData & export interface GiftCardUpdateFormConsumerData extends GiftCardUpdateFormErrors { - opts: MutationResultWithOpts; + opts: MutationResultWithOpts; } export interface GiftCardUpdateFormErrors { - formErrors: Record<"tags" | "expiryDate", GiftCardError>; + formErrors: Record<"tags" | "expiryDate", GiftCardErrorFragment>; handlers: { changeMetadata: FormChange }; } @@ -71,8 +71,8 @@ const GiftCardUpdateFormProvider: React.FC = ({ }) => { const notify = useNotifier(); const intl = useIntl(); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); const { loading: loadingGiftCard, giftCard } = useGiftCardDetails(); @@ -91,27 +91,25 @@ const GiftCardUpdateFormProvider: React.FC = ({ }; }; - const onSubmit = (data: GiftCardUpdate) => { - const errors = data.giftCardUpdate.errors; - const hasExpiryError = errors.some(error => error.field === "expiryDate"); - - notify( - hasExpiryError - ? { - title: intl.formatMessage( - giftCardUpdateFormMessages.giftCardInvalidExpiryDateHeader - ), - text: intl.formatMessage( - giftCardUpdateFormMessages.giftCardInvalidExpiryDateContent - ), - status: "error" - } - : getDefaultNotifierSuccessErrorData(errors, intl) - ); - }; - const [updateGiftCard, updateGiftCardOpts] = useGiftCardUpdateMutation({ - onCompleted: onSubmit + onCompleted: data => { + const errors = data.giftCardUpdate.errors; + const hasExpiryError = errors.some(error => error.field === "expiryDate"); + + notify( + hasExpiryError + ? { + title: intl.formatMessage( + giftCardUpdateFormMessages.giftCardInvalidExpiryDateHeader + ), + text: intl.formatMessage( + giftCardUpdateFormMessages.giftCardInvalidExpiryDateContent + ), + status: "error" + } + : getDefaultNotifierSuccessErrorData(errors, intl) + ); + } }); const submit = async ({ tags, expiryDate }: GiftCardUpdateFormData) => { diff --git a/src/giftCards/GiftCardUpdate/queries.ts b/src/giftCards/GiftCardUpdate/queries.ts index ccdf0eabf..fb9d5ad36 100644 --- a/src/giftCards/GiftCardUpdate/queries.ts +++ b/src/giftCards/GiftCardUpdate/queries.ts @@ -1,142 +1,16 @@ import { gql } from "@apollo/client"; -import { fragmentUserBase } from "@saleor/fragments/auth"; -import { metadataFragment } from "@saleor/fragments/metadata"; -import { fragmentMoney } from "@saleor/fragments/products"; -import makeQuery from "@saleor/hooks/makeQuery"; - -import { - GiftCardDetails, - GiftCardDetailsVariables -} from "./types/GiftCardDetails"; - -export const giftCardDataFragment = gql` - ${fragmentMoney} - ${metadataFragment} - ${fragmentUserBase} - fragment GiftCardData on GiftCard { - ...MetadataFragment - last4CodeChars - boughtInChannel - createdBy { - ...UserBase - } - product { - id - name - } - createdBy { - ...UserBase - } - usedBy { - ...UserBase - } - usedByEmail - createdByEmail - app { - id - name - } - created - expiryDate - lastUsedOn - isActive - initialBalance { - ...Money - } - currentBalance { - ...Money - } - - id - tags { - name - } - } -`; +import { getOperationAST } from "graphql"; export const giftCardDetails = gql` - ${giftCardDataFragment} query GiftCardDetails($id: ID!) { giftCard(id: $id) { ...GiftCardData events { - expiryDate - oldExpiryDate - id - date - type - user { - ...UserBase - email - } - app { - id - name - } - message - orderId - orderNumber - tags - oldTags - balance { - initialBalance { - ...Money - } - currentBalance { - ...Money - } - oldInitialBalance { - ...Money - } - oldCurrentBalance { - ...Money - } - } + ...GiftCardEvent } } } `; -export const giftCardEventsFragment = gql` - fragment GiftCardEvent on GiftCardEvent { - expiryDate - oldExpiryDate - id - date - type - user { - ...UserBase - } - app { - id - name - } - message - email - orderId - orderNumber - tags - oldTags - balance { - initialBalance { - ...Money - } - currentBalance { - ...Money - } - oldInitialBalance { - ...Money - } - oldCurrentBalance { - ...Money - } - } - } -`; - -export const useGiftCardDetailsQuery = makeQuery< - GiftCardDetails, - GiftCardDetailsVariables ->(giftCardDetails); - -export const GIFT_CARD_DETAILS_QUERY = "GiftCardDetails"; +export const GIFT_CARD_DETAILS_QUERY = getOperationAST(giftCardDetails).name + .value; diff --git a/src/giftCards/GiftCardUpdate/types/GiftCardAddNote.ts b/src/giftCards/GiftCardUpdate/types/GiftCardAddNote.ts deleted file mode 100644 index 1f21ae6ca..000000000 --- a/src/giftCards/GiftCardUpdate/types/GiftCardAddNote.ts +++ /dev/null @@ -1,173 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardAddNoteInput, GiftCardErrorCode, GiftCardEventsEnum } from "./../../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: GiftCardAddNote -// ==================================================== - -export interface GiftCardAddNote_giftCardAddNote_errors { - __typename: "GiftCardError"; - code: GiftCardErrorCode; - field: string | null; - message: string | null; -} - -export interface GiftCardAddNote_giftCardAddNote_giftCard_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface GiftCardAddNote_giftCardAddNote_giftCard_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface GiftCardAddNote_giftCardAddNote_giftCard_createdBy { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} - -export interface GiftCardAddNote_giftCardAddNote_giftCard_product { - __typename: "Product"; - id: string; - name: string; -} - -export interface GiftCardAddNote_giftCardAddNote_giftCard_usedBy { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} - -export interface GiftCardAddNote_giftCardAddNote_giftCard_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface GiftCardAddNote_giftCardAddNote_giftCard_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardAddNote_giftCardAddNote_giftCard_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardAddNote_giftCardAddNote_giftCard_tags { - __typename: "GiftCardTag"; - name: string; -} - -export interface GiftCardAddNote_giftCardAddNote_giftCard { - __typename: "GiftCard"; - metadata: (GiftCardAddNote_giftCardAddNote_giftCard_metadata | null)[]; - privateMetadata: (GiftCardAddNote_giftCardAddNote_giftCard_privateMetadata | null)[]; - last4CodeChars: string; - boughtInChannel: string | null; - createdBy: GiftCardAddNote_giftCardAddNote_giftCard_createdBy | null; - product: GiftCardAddNote_giftCardAddNote_giftCard_product | null; - usedBy: GiftCardAddNote_giftCardAddNote_giftCard_usedBy | null; - usedByEmail: string | null; - createdByEmail: string | null; - app: GiftCardAddNote_giftCardAddNote_giftCard_app | null; - created: any; - expiryDate: any | null; - lastUsedOn: any | null; - isActive: boolean; - initialBalance: GiftCardAddNote_giftCardAddNote_giftCard_initialBalance | null; - currentBalance: GiftCardAddNote_giftCardAddNote_giftCard_currentBalance | null; - id: string; - tags: GiftCardAddNote_giftCardAddNote_giftCard_tags[]; -} - -export interface GiftCardAddNote_giftCardAddNote_event_user { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} - -export interface GiftCardAddNote_giftCardAddNote_event_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface GiftCardAddNote_giftCardAddNote_event_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardAddNote_giftCardAddNote_event_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardAddNote_giftCardAddNote_event_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardAddNote_giftCardAddNote_event_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardAddNote_giftCardAddNote_event_balance { - __typename: "GiftCardEventBalance"; - initialBalance: GiftCardAddNote_giftCardAddNote_event_balance_initialBalance | null; - currentBalance: GiftCardAddNote_giftCardAddNote_event_balance_currentBalance; - oldInitialBalance: GiftCardAddNote_giftCardAddNote_event_balance_oldInitialBalance | null; - oldCurrentBalance: GiftCardAddNote_giftCardAddNote_event_balance_oldCurrentBalance | null; -} - -export interface GiftCardAddNote_giftCardAddNote_event { - __typename: "GiftCardEvent"; - expiryDate: any | null; - oldExpiryDate: any | null; - id: string; - date: any | null; - type: GiftCardEventsEnum | null; - user: GiftCardAddNote_giftCardAddNote_event_user | null; - app: GiftCardAddNote_giftCardAddNote_event_app | null; - message: string | null; - email: string | null; - orderId: string | null; - orderNumber: string | null; - tags: string[] | null; - oldTags: string[] | null; - balance: GiftCardAddNote_giftCardAddNote_event_balance | null; -} - -export interface GiftCardAddNote_giftCardAddNote { - __typename: "GiftCardAddNote"; - errors: GiftCardAddNote_giftCardAddNote_errors[]; - giftCard: GiftCardAddNote_giftCardAddNote_giftCard | null; - event: GiftCardAddNote_giftCardAddNote_event | null; -} - -export interface GiftCardAddNote { - giftCardAddNote: GiftCardAddNote_giftCardAddNote | null; -} - -export interface GiftCardAddNoteVariables { - id: string; - input: GiftCardAddNoteInput; -} diff --git a/src/giftCards/GiftCardUpdate/types/GiftCardData.ts b/src/giftCards/GiftCardUpdate/types/GiftCardData.ts deleted file mode 100644 index ccf6829ad..000000000 --- a/src/giftCards/GiftCardUpdate/types/GiftCardData.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: GiftCardData -// ==================================================== - -export interface GiftCardData_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface GiftCardData_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface GiftCardData_createdBy { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} - -export interface GiftCardData_product { - __typename: "Product"; - id: string; - name: string; -} - -export interface GiftCardData_usedBy { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} - -export interface GiftCardData_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface GiftCardData_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardData_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardData_tags { - __typename: "GiftCardTag"; - name: string; -} - -export interface GiftCardData { - __typename: "GiftCard"; - metadata: (GiftCardData_metadata | null)[]; - privateMetadata: (GiftCardData_privateMetadata | null)[]; - last4CodeChars: string; - boughtInChannel: string | null; - createdBy: GiftCardData_createdBy | null; - product: GiftCardData_product | null; - usedBy: GiftCardData_usedBy | null; - usedByEmail: string | null; - createdByEmail: string | null; - app: GiftCardData_app | null; - created: any; - expiryDate: any | null; - lastUsedOn: any | null; - isActive: boolean; - initialBalance: GiftCardData_initialBalance | null; - currentBalance: GiftCardData_currentBalance | null; - id: string; - tags: GiftCardData_tags[]; -} diff --git a/src/giftCards/GiftCardUpdate/types/GiftCardDetails.ts b/src/giftCards/GiftCardUpdate/types/GiftCardDetails.ts deleted file mode 100644 index c06617d08..000000000 --- a/src/giftCards/GiftCardUpdate/types/GiftCardDetails.ts +++ /dev/null @@ -1,159 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardEventsEnum } from "./../../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: GiftCardDetails -// ==================================================== - -export interface GiftCardDetails_giftCard_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface GiftCardDetails_giftCard_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface GiftCardDetails_giftCard_createdBy { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} - -export interface GiftCardDetails_giftCard_product { - __typename: "Product"; - id: string; - name: string; -} - -export interface GiftCardDetails_giftCard_usedBy { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} - -export interface GiftCardDetails_giftCard_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface GiftCardDetails_giftCard_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardDetails_giftCard_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardDetails_giftCard_tags { - __typename: "GiftCardTag"; - name: string; -} - -export interface GiftCardDetails_giftCard_events_user { - __typename: "User"; - id: string; - firstName: string; - lastName: string; - email: string; -} - -export interface GiftCardDetails_giftCard_events_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface GiftCardDetails_giftCard_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardDetails_giftCard_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardDetails_giftCard_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardDetails_giftCard_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardDetails_giftCard_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: GiftCardDetails_giftCard_events_balance_initialBalance | null; - currentBalance: GiftCardDetails_giftCard_events_balance_currentBalance; - oldInitialBalance: GiftCardDetails_giftCard_events_balance_oldInitialBalance | null; - oldCurrentBalance: GiftCardDetails_giftCard_events_balance_oldCurrentBalance | null; -} - -export interface GiftCardDetails_giftCard_events { - __typename: "GiftCardEvent"; - expiryDate: any | null; - oldExpiryDate: any | null; - id: string; - date: any | null; - type: GiftCardEventsEnum | null; - user: GiftCardDetails_giftCard_events_user | null; - app: GiftCardDetails_giftCard_events_app | null; - message: string | null; - orderId: string | null; - orderNumber: string | null; - tags: string[] | null; - oldTags: string[] | null; - balance: GiftCardDetails_giftCard_events_balance | null; -} - -export interface GiftCardDetails_giftCard { - __typename: "GiftCard"; - metadata: (GiftCardDetails_giftCard_metadata | null)[]; - privateMetadata: (GiftCardDetails_giftCard_privateMetadata | null)[]; - last4CodeChars: string; - boughtInChannel: string | null; - createdBy: GiftCardDetails_giftCard_createdBy | null; - product: GiftCardDetails_giftCard_product | null; - usedBy: GiftCardDetails_giftCard_usedBy | null; - usedByEmail: string | null; - createdByEmail: string | null; - app: GiftCardDetails_giftCard_app | null; - created: any; - expiryDate: any | null; - lastUsedOn: any | null; - isActive: boolean; - initialBalance: GiftCardDetails_giftCard_initialBalance | null; - currentBalance: GiftCardDetails_giftCard_currentBalance | null; - id: string; - tags: GiftCardDetails_giftCard_tags[]; - events: GiftCardDetails_giftCard_events[]; -} - -export interface GiftCardDetails { - giftCard: GiftCardDetails_giftCard | null; -} - -export interface GiftCardDetailsVariables { - id: string; -} diff --git a/src/giftCards/GiftCardUpdate/types/GiftCardEvent.ts b/src/giftCards/GiftCardUpdate/types/GiftCardEvent.ts deleted file mode 100644 index a8245ae7c..000000000 --- a/src/giftCards/GiftCardUpdate/types/GiftCardEvent.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardEventsEnum } from "./../../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: GiftCardEvent -// ==================================================== - -export interface GiftCardEvent_user { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} - -export interface GiftCardEvent_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface GiftCardEvent_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardEvent_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardEvent_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardEvent_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardEvent_balance { - __typename: "GiftCardEventBalance"; - initialBalance: GiftCardEvent_balance_initialBalance | null; - currentBalance: GiftCardEvent_balance_currentBalance; - oldInitialBalance: GiftCardEvent_balance_oldInitialBalance | null; - oldCurrentBalance: GiftCardEvent_balance_oldCurrentBalance | null; -} - -export interface GiftCardEvent { - __typename: "GiftCardEvent"; - expiryDate: any | null; - oldExpiryDate: any | null; - id: string; - date: any | null; - type: GiftCardEventsEnum | null; - user: GiftCardEvent_user | null; - app: GiftCardEvent_app | null; - message: string | null; - email: string | null; - orderId: string | null; - orderNumber: string | null; - tags: string[] | null; - oldTags: string[] | null; - balance: GiftCardEvent_balance | null; -} diff --git a/src/giftCards/GiftCardUpdate/types/GiftCardUpdate.ts b/src/giftCards/GiftCardUpdate/types/GiftCardUpdate.ts deleted file mode 100644 index bf08f49bf..000000000 --- a/src/giftCards/GiftCardUpdate/types/GiftCardUpdate.ts +++ /dev/null @@ -1,173 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardUpdateInput, GiftCardErrorCode, GiftCardEventsEnum } from "./../../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: GiftCardUpdate -// ==================================================== - -export interface GiftCardUpdate_giftCardUpdate_errors { - __typename: "GiftCardError"; - code: GiftCardErrorCode; - field: string | null; - message: string | null; -} - -export interface GiftCardUpdate_giftCardUpdate_giftCard_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface GiftCardUpdate_giftCardUpdate_giftCard_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface GiftCardUpdate_giftCardUpdate_giftCard_createdBy { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} - -export interface GiftCardUpdate_giftCardUpdate_giftCard_product { - __typename: "Product"; - id: string; - name: string; -} - -export interface GiftCardUpdate_giftCardUpdate_giftCard_usedBy { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} - -export interface GiftCardUpdate_giftCardUpdate_giftCard_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface GiftCardUpdate_giftCardUpdate_giftCard_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardUpdate_giftCardUpdate_giftCard_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardUpdate_giftCardUpdate_giftCard_tags { - __typename: "GiftCardTag"; - name: string; -} - -export interface GiftCardUpdate_giftCardUpdate_giftCard_events_user { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} - -export interface GiftCardUpdate_giftCardUpdate_giftCard_events_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface GiftCardUpdate_giftCardUpdate_giftCard_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardUpdate_giftCardUpdate_giftCard_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardUpdate_giftCardUpdate_giftCard_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardUpdate_giftCardUpdate_giftCard_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardUpdate_giftCardUpdate_giftCard_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: GiftCardUpdate_giftCardUpdate_giftCard_events_balance_initialBalance | null; - currentBalance: GiftCardUpdate_giftCardUpdate_giftCard_events_balance_currentBalance; - oldInitialBalance: GiftCardUpdate_giftCardUpdate_giftCard_events_balance_oldInitialBalance | null; - oldCurrentBalance: GiftCardUpdate_giftCardUpdate_giftCard_events_balance_oldCurrentBalance | null; -} - -export interface GiftCardUpdate_giftCardUpdate_giftCard_events { - __typename: "GiftCardEvent"; - expiryDate: any | null; - oldExpiryDate: any | null; - id: string; - date: any | null; - type: GiftCardEventsEnum | null; - user: GiftCardUpdate_giftCardUpdate_giftCard_events_user | null; - app: GiftCardUpdate_giftCardUpdate_giftCard_events_app | null; - message: string | null; - email: string | null; - orderId: string | null; - orderNumber: string | null; - tags: string[] | null; - oldTags: string[] | null; - balance: GiftCardUpdate_giftCardUpdate_giftCard_events_balance | null; -} - -export interface GiftCardUpdate_giftCardUpdate_giftCard { - __typename: "GiftCard"; - metadata: (GiftCardUpdate_giftCardUpdate_giftCard_metadata | null)[]; - privateMetadata: (GiftCardUpdate_giftCardUpdate_giftCard_privateMetadata | null)[]; - last4CodeChars: string; - boughtInChannel: string | null; - createdBy: GiftCardUpdate_giftCardUpdate_giftCard_createdBy | null; - product: GiftCardUpdate_giftCardUpdate_giftCard_product | null; - usedBy: GiftCardUpdate_giftCardUpdate_giftCard_usedBy | null; - usedByEmail: string | null; - createdByEmail: string | null; - app: GiftCardUpdate_giftCardUpdate_giftCard_app | null; - created: any; - expiryDate: any | null; - lastUsedOn: any | null; - isActive: boolean; - initialBalance: GiftCardUpdate_giftCardUpdate_giftCard_initialBalance | null; - currentBalance: GiftCardUpdate_giftCardUpdate_giftCard_currentBalance | null; - id: string; - tags: GiftCardUpdate_giftCardUpdate_giftCard_tags[]; - events: GiftCardUpdate_giftCardUpdate_giftCard_events[]; -} - -export interface GiftCardUpdate_giftCardUpdate { - __typename: "GiftCardUpdate"; - errors: GiftCardUpdate_giftCardUpdate_errors[]; - giftCard: GiftCardUpdate_giftCardUpdate_giftCard | null; -} - -export interface GiftCardUpdate { - giftCardUpdate: GiftCardUpdate_giftCardUpdate | null; -} - -export interface GiftCardUpdateVariables { - id: string; - input: GiftCardUpdateInput; -} diff --git a/src/giftCards/GiftCardsList/GiftCardListSearchAndFilters/GiftCardListSearchAndFilters.tsx b/src/giftCards/GiftCardsList/GiftCardListSearchAndFilters/GiftCardListSearchAndFilters.tsx index 081598476..5e1000b12 100644 --- a/src/giftCards/GiftCardsList/GiftCardListSearchAndFilters/GiftCardListSearchAndFilters.tsx +++ b/src/giftCards/GiftCardsList/GiftCardListSearchAndFilters/GiftCardListSearchAndFilters.tsx @@ -4,12 +4,13 @@ import SaveFilterTabDialog, { SaveFilterTabDialogFormData } from "@saleor/components/SaveFilterTabDialog"; import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; -import useGiftCardTagsSearch from "@saleor/giftCards/components/GiftCardTagInput/useGiftCardTagsSearch"; import { giftCardListUrl } from "@saleor/giftCards/urls"; +import { useGiftCardCurrenciesQuery } from "@saleor/graphql"; import { getSearchFetchMoreProps } from "@saleor/hooks/makeTopLevelSearch/utils"; import useNavigator from "@saleor/hooks/useNavigator"; import { maybe } from "@saleor/misc"; import useCustomerSearch from "@saleor/searches/useCustomerSearch"; +import useGiftCardTagsSearch from "@saleor/searches/useGiftCardTagsSearch"; import useProductSearch from "@saleor/searches/useProductSearch"; import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; import { mapEdgesToItems } from "@saleor/utils/maps"; @@ -17,9 +18,8 @@ import compact from "lodash/compact"; import React from "react"; import { useIntl } from "react-intl"; -import useGiftCardListDialogs from "../providers/GiftCardListDialogsProvider/hooks/useGiftCardListDialogs"; -import useGiftCardList from "../providers/GiftCardListProvider/hooks/useGiftCardList"; -import useGiftCardListBulkActions from "../providers/GiftCardListProvider/hooks/useGiftCardListBulkActions"; +import { useGiftCardListDialogs } from "../providers/GiftCardListDialogsProvider"; +import { useGiftCardList } from "../providers/GiftCardListProvider"; import { GiftCardListActionParamsEnum } from "../types"; import { createFilterStructure, @@ -31,16 +31,16 @@ import { getFilterTabs, saveFilterTab } from "./filters"; -import { giftCardListFilterErrorMessages as errorMessages } from "./messages"; -import { giftCardListSearchAndFiltersMessages as messages } from "./messages"; -import { useGiftCardCurrenciesQuery } from "./queries"; +import { + giftCardListFilterErrorMessages as errorMessages, + giftCardListSearchAndFiltersMessages as messages +} from "./messages"; const GiftCardListSearchAndFilters: React.FC = () => { const navigate = useNavigator(); const intl = useIntl(); - const { params } = useGiftCardList(); - const { reset } = useGiftCardListBulkActions(); + const { reset, params } = useGiftCardList(); const { onClose, diff --git a/src/giftCards/GiftCardsList/GiftCardListSearchAndFilters/filters.ts b/src/giftCards/GiftCardsList/GiftCardListSearchAndFilters/filters.ts index aa4c3c4be..ac88f586d 100644 --- a/src/giftCards/GiftCardsList/GiftCardListSearchAndFilters/filters.ts +++ b/src/giftCards/GiftCardsList/GiftCardListSearchAndFilters/filters.ts @@ -1,7 +1,10 @@ import { IFilter, IFilterElement } from "@saleor/components/Filter"; -import { SearchCustomers_search_edges_node } from "@saleor/searches/types/SearchCustomers"; -import { SearchProducts_search_edges_node } from "@saleor/searches/types/SearchProducts"; -import { GiftCardFilterInput } from "@saleor/types/globalTypes"; +import { + GiftCardFilterInput, + SearchCustomersQuery, + SearchProductsQuery +} from "@saleor/graphql"; +import { RelayToFlat } from "@saleor/types"; import { createFilterTabUtils, createFilterUtils, @@ -38,9 +41,9 @@ interface GiftCardFilterOptsProps { params: GiftCardListUrlFilters; currencies: string[]; loadingCurrencies: boolean; - products: SearchProducts_search_edges_node[]; + products: RelayToFlat; productSearchProps: SearchWithFetchMoreProps; - customers: SearchCustomers_search_edges_node[]; + customers: RelayToFlat; customerSearchProps: SearchWithFetchMoreProps; tags: string[]; tagSearchProps: SearchWithFetchMoreProps; diff --git a/src/giftCards/GiftCardsList/GiftCardListSearchAndFilters/queries.ts b/src/giftCards/GiftCardsList/GiftCardListSearchAndFilters/queries.ts index eb9663e97..090e77fdf 100644 --- a/src/giftCards/GiftCardsList/GiftCardListSearchAndFilters/queries.ts +++ b/src/giftCards/GiftCardsList/GiftCardListSearchAndFilters/queries.ts @@ -1,14 +1,7 @@ import { gql } from "@apollo/client"; -import makeQuery from "@saleor/hooks/makeQuery"; -import { GiftCardCurrencies } from "./types/GiftCardCurrencies"; - -const useGiftCardCurrencies = gql` +export const useGiftCardCurrencies = gql` query GiftCardCurrencies { giftCardCurrencies } `; - -export const useGiftCardCurrenciesQuery = makeQuery( - useGiftCardCurrencies -); diff --git a/src/giftCards/GiftCardsList/GiftCardListSearchAndFilters/types/GiftCardCurrencies.ts b/src/giftCards/GiftCardsList/GiftCardListSearchAndFilters/types/GiftCardCurrencies.ts deleted file mode 100644 index 6b03ff452..000000000 --- a/src/giftCards/GiftCardsList/GiftCardListSearchAndFilters/types/GiftCardCurrencies.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: GiftCardCurrencies -// ==================================================== - -export interface GiftCardCurrencies { - giftCardCurrencies: string[]; -} diff --git a/src/giftCards/GiftCardsList/GiftCardsListHeader/GiftCardsListHeader.tsx b/src/giftCards/GiftCardsList/GiftCardsListHeader/GiftCardsListHeader.tsx index 4142daebc..235e00844 100644 --- a/src/giftCards/GiftCardsList/GiftCardsListHeader/GiftCardsListHeader.tsx +++ b/src/giftCards/GiftCardsList/GiftCardsListHeader/GiftCardsListHeader.tsx @@ -9,7 +9,7 @@ import { useIntl } from "react-intl"; import { giftCardSettingsUrl } from "../../urls"; import { giftCardsListHeaderMenuItemsMessages as messages } from "../messages"; -import useGiftCardListDialogs from "../providers/GiftCardListDialogsProvider/hooks/useGiftCardListDialogs"; +import { useGiftCardListDialogs } from "../providers/GiftCardListDialogsProvider"; import GiftCardsListHeaderAlert from "./GiftCardsListHeaderAlert"; const GiftCardsListHeader: React.FC = () => { diff --git a/src/giftCards/GiftCardsList/GiftCardsListHeader/GiftCardsListHeaderAlert.tsx b/src/giftCards/GiftCardsList/GiftCardsListHeader/GiftCardsListHeaderAlert.tsx index dede29015..d7f52998c 100644 --- a/src/giftCards/GiftCardsList/GiftCardsListHeader/GiftCardsListHeaderAlert.tsx +++ b/src/giftCards/GiftCardsList/GiftCardsListHeader/GiftCardsListHeaderAlert.tsx @@ -1,9 +1,9 @@ +import { useGiftCardProductsCountQuery } from "@saleor/graphql"; import { Alert } from "@saleor/macaw-ui"; import React from "react"; import { useIntl } from "react-intl"; import { giftCardsListHeaderMenuItemsMessages as messages } from "../messages"; -import { useGiftCardProductsCountQuery } from "../queries"; import GiftCardsListHeaderAlertContent from "./GiftCardsListHeaderAlertContent"; const GiftCardsListHeaderAlert: React.FC = () => { diff --git a/src/giftCards/GiftCardsList/GiftCardsListHeader/GiftCardsListHeaderAlertContent.tsx b/src/giftCards/GiftCardsList/GiftCardsListHeader/GiftCardsListHeaderAlertContent.tsx index 909d637a3..419ca71e1 100644 --- a/src/giftCards/GiftCardsList/GiftCardsListHeader/GiftCardsListHeaderAlertContent.tsx +++ b/src/giftCards/GiftCardsList/GiftCardsListHeader/GiftCardsListHeaderAlertContent.tsx @@ -1,7 +1,7 @@ import Link from "@saleor/components/Link"; +import { ProductTypeKindEnum } from "@saleor/graphql"; import { productAddUrl } from "@saleor/products/urls"; import { productTypeAddUrl } from "@saleor/productTypes/urls"; -import { ProductTypeKindEnum } from "@saleor/types/globalTypes"; import React from "react"; import { FormattedMessage } from "react-intl"; diff --git a/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTable.tsx b/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTable.tsx index 982bb824c..3a31abef4 100644 --- a/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTable.tsx +++ b/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTable.tsx @@ -20,16 +20,14 @@ import useNavigator from "@saleor/hooks/useNavigator"; import { PillLink } from "@saleor/macaw-ui"; import { renderCollection } from "@saleor/misc"; import { productUrl } from "@saleor/products/urls"; -import React from "react"; -import { useEffect } from "react"; +import React, { useEffect } from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { Link as RouterLink } from "react-router-dom"; import GiftCardListSearchAndFilters from "../GiftCardListSearchAndFilters"; import { giftCardsListTableMessages as messages } from "../messages"; -import useGiftCardListDialogs from "../providers/GiftCardListDialogsProvider/hooks/useGiftCardListDialogs"; -import useGiftCardList from "../providers/GiftCardListProvider/hooks/useGiftCardList"; -import useGiftCardListBulkActions from "../providers/GiftCardListProvider/hooks/useGiftCardListBulkActions"; +import { useGiftCardListDialogs } from "../providers/GiftCardListDialogsProvider"; +import { useGiftCardList } from "../providers/GiftCardListProvider"; import { canBeSorted } from "../sort"; import { useTableStyles as useStyles } from "../styles"; import { GiftCardUrlSortField } from "../types"; @@ -42,8 +40,13 @@ const GiftCardsListTable: React.FC = () => { const classes = useStyles({}); const navigate = useNavigator(); - const { giftCards, numberOfColumns, params } = useGiftCardList(); - const { toggle, isSelected } = useGiftCardListBulkActions(); + const { + toggle, + isSelected, + giftCards, + numberOfColumns, + params + } = useGiftCardList(); const { openDeleteDialog } = useGiftCardListDialogs(); const isCurrencySelected = !!params.currency; diff --git a/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableFooter.tsx b/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableFooter.tsx index ba9b2dacd..4bdee470e 100644 --- a/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableFooter.tsx +++ b/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableFooter.tsx @@ -3,7 +3,7 @@ import TablePagination from "@saleor/components/TablePagination"; import usePaginator from "@saleor/hooks/usePaginator"; import React from "react"; -import useGiftCardList from "../providers/GiftCardListProvider/hooks/useGiftCardList"; +import { useGiftCardList } from "../providers/GiftCardListProvider"; const GiftCardsListTableFooter: React.FC = () => { const paginate = usePaginator(); diff --git a/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableHeader/BulkEnableDisableSection.tsx b/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableHeader/BulkEnableDisableSection.tsx index 47433731a..ee2bc9a2f 100644 --- a/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableHeader/BulkEnableDisableSection.tsx +++ b/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableHeader/BulkEnableDisableSection.tsx @@ -1,69 +1,23 @@ import ConfirmButton from "@saleor/components/ConfirmButton"; import { IMessage } from "@saleor/components/messages"; +import { + useGiftCardBulkActivateMutation, + useGiftCardBulkDeactivateMutation +} from "@saleor/graphql"; import useNotifier from "@saleor/hooks/useNotifier"; import { getByIds } from "@saleor/orders/components/OrderReturnPage/utils"; import React from "react"; import { useIntl } from "react-intl"; -import useGiftCardList from "../../providers/GiftCardListProvider/hooks/useGiftCardList"; -import useGiftCardListBulkActions from "../../providers/GiftCardListProvider/hooks/useGiftCardListBulkActions"; -import { GIFT_CARD_LIST_QUERY } from "../../types"; +import { useGiftCardList } from "../../providers/GiftCardListProvider"; +import { GIFT_CARD_LIST_QUERY } from "../../queries"; import { bulkEnableDisableSectionMessages as messages } from "./messages"; -import { - useGiftCardBulkActivateMutation, - useGiftCardBulkDeactivateMutation -} from "./mutations"; -import { GiftCardBulkActivate } from "./types/GiftCardBulkActivate"; -import { GiftCardBulkDeactivate } from "./types/GiftCardBulkDeactivate"; const BulkEnableDisableSection: React.FC = () => { const intl = useIntl(); const notify = useNotifier(); - const { listElements: ids, reset } = useGiftCardListBulkActions(); - const { giftCards } = useGiftCardList(); - - const onActivateCompleted = (data: GiftCardBulkActivate) => { - const { errors, count } = data?.giftCardBulkActivate; - - const notifierData: IMessage = !!errors?.length - ? { - status: "error", - text: intl.formatMessage(messages.errorActivateAlertText, { count }) - } - : { - status: "success", - text: intl.formatMessage(messages.successActivateAlertText, { count }) - }; - - notify(notifierData); - - if (!errors.length) { - reset(); - } - }; - - const onDeactivateCompleted = (data: GiftCardBulkDeactivate) => { - const { errors, count } = data?.giftCardBulkDeactivate; - - const notifierData: IMessage = !!errors?.length - ? { - status: "error", - text: intl.formatMessage(messages.errorDeactivateAlertText, { count }) - } - : { - status: "success", - text: intl.formatMessage(messages.successDeactivateAlertText, { - count - }) - }; - - notify(notifierData); - - if (!errors.length) { - reset(); - } - }; + const { listElements: ids, reset, giftCards } = useGiftCardList(); const hasAnyEnabledCardsSelected = giftCards .filter(getByIds(ids)) @@ -85,7 +39,27 @@ const BulkEnableDisableSection: React.FC = () => { activateGiftCards, activateGiftCardsOpts ] = useGiftCardBulkActivateMutation({ - onCompleted: onActivateCompleted, + onCompleted: data => { + const { errors, count } = data?.giftCardBulkActivate; + + const notifierData: IMessage = !!errors?.length + ? { + status: "error", + text: intl.formatMessage(messages.errorActivateAlertText, { count }) + } + : { + status: "success", + text: intl.formatMessage(messages.successActivateAlertText, { + count + }) + }; + + notify(notifierData); + + if (!errors.length) { + reset(); + } + }, refetchQueries: [GIFT_CARD_LIST_QUERY] }); @@ -93,7 +67,29 @@ const BulkEnableDisableSection: React.FC = () => { deactivateGiftCards, deactivateGiftCardsOpts ] = useGiftCardBulkDeactivateMutation({ - onCompleted: onDeactivateCompleted, + onCompleted: data => { + const { errors, count } = data?.giftCardBulkDeactivate; + + const notifierData: IMessage = !!errors?.length + ? { + status: "error", + text: intl.formatMessage(messages.errorDeactivateAlertText, { + count + }) + } + : { + status: "success", + text: intl.formatMessage(messages.successDeactivateAlertText, { + count + }) + }; + + notify(notifierData); + + if (!errors.length) { + reset(); + } + }, refetchQueries: [GIFT_CARD_LIST_QUERY] }); diff --git a/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableHeader/GiftCardsListTableHeader.tsx b/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableHeader/GiftCardsListTableHeader.tsx index d12133624..274474828 100644 --- a/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableHeader/GiftCardsListTableHeader.tsx +++ b/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableHeader/GiftCardsListTableHeader.tsx @@ -16,10 +16,8 @@ import { MessageDescriptor, useIntl } from "react-intl"; import { messages as filterLabels } from "../../GiftCardListSearchAndFilters/filters"; import { giftCardsListTableMessages as messages } from "../../messages"; -import useGiftCardListDialogs from "../../providers/GiftCardListDialogsProvider/hooks/useGiftCardListDialogs"; -import useGiftCardListSort from "../../providers/GiftCardListDialogsProvider/hooks/useGiftCardListSort"; -import useGiftCardList from "../../providers/GiftCardListProvider/hooks/useGiftCardList"; -import useGiftCardListBulkActions from "../../providers/GiftCardListProvider/hooks/useGiftCardListBulkActions"; +import { useGiftCardListDialogs } from "../../providers/GiftCardListDialogsProvider"; +import { useGiftCardList } from "../../providers/GiftCardListProvider"; import { canBeSorted } from "../../sort"; import { useTableStyles as useStyles } from "../../styles"; import { GiftCardUrlSortField } from "../../types"; @@ -42,10 +40,15 @@ const GiftCardsListTableHeader: React.FC = ({ const intl = useIntl(); const classes = useStyles({}); - const { giftCards, numberOfColumns, loading } = useGiftCardList(); - const { toggleAll, listElements } = useGiftCardListBulkActions(); + const { + giftCards, + numberOfColumns, + loading, + toggleAll, + listElements + } = useGiftCardList(); const { openDeleteDialog } = useGiftCardListDialogs(); - const { onSort, sort } = useGiftCardListSort(); + const { onSort, sort } = useGiftCardList(); const getDirection = (sortField: GiftCardUrlSortField) => sort.sort === sortField ? getArrowDirection(sort.asc) : undefined; diff --git a/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableHeader/mutations.ts b/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableHeader/mutations.ts index d76efe216..046a22320 100644 --- a/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableHeader/mutations.ts +++ b/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableHeader/mutations.ts @@ -1,18 +1,6 @@ import { gql } from "@apollo/client"; -import { giftCardErrorFragment } from "@saleor/fragments/errors"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { - GiftCardBulkActivate, - GiftCardBulkActivateVariables -} from "./types/GiftCardBulkActivate"; -import { - GiftCardBulkDeactivate, - GiftCardBulkDeactivateVariables -} from "./types/GiftCardBulkDeactivate"; - -const giftCardBulkActivate = gql` - ${giftCardErrorFragment} +export const giftCardBulkActivate = gql` mutation GiftCardBulkActivate($ids: [ID]!) { giftCardBulkActivate(ids: $ids) { errors { @@ -23,13 +11,7 @@ const giftCardBulkActivate = gql` } `; -export const useGiftCardBulkActivateMutation = makeMutation< - GiftCardBulkActivate, - GiftCardBulkActivateVariables ->(giftCardBulkActivate); - -const giftCardBulkDeactivate = gql` - ${giftCardErrorFragment} +export const giftCardBulkDeactivate = gql` mutation GiftCardBulkDeactivate($ids: [ID]!) { giftCardBulkDeactivate(ids: $ids) { errors { @@ -39,8 +21,3 @@ const giftCardBulkDeactivate = gql` } } `; - -export const useGiftCardBulkDeactivateMutation = makeMutation< - GiftCardBulkDeactivate, - GiftCardBulkDeactivateVariables ->(giftCardBulkDeactivate); diff --git a/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableHeader/types/GiftCardBulkActivate.ts b/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableHeader/types/GiftCardBulkActivate.ts deleted file mode 100644 index c928b3860..000000000 --- a/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableHeader/types/GiftCardBulkActivate.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardErrorCode } from "./../../../../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: GiftCardBulkActivate -// ==================================================== - -export interface GiftCardBulkActivate_giftCardBulkActivate_errors { - __typename: "GiftCardError"; - code: GiftCardErrorCode; - field: string | null; - message: string | null; -} - -export interface GiftCardBulkActivate_giftCardBulkActivate { - __typename: "GiftCardBulkActivate"; - errors: GiftCardBulkActivate_giftCardBulkActivate_errors[]; - count: number; -} - -export interface GiftCardBulkActivate { - giftCardBulkActivate: GiftCardBulkActivate_giftCardBulkActivate | null; -} - -export interface GiftCardBulkActivateVariables { - ids: (string | null)[]; -} diff --git a/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableHeader/types/GiftCardBulkDeactivate.ts b/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableHeader/types/GiftCardBulkDeactivate.ts deleted file mode 100644 index b79d0d17f..000000000 --- a/src/giftCards/GiftCardsList/GiftCardsListTable/GiftCardsListTableHeader/types/GiftCardBulkDeactivate.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardErrorCode } from "./../../../../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: GiftCardBulkDeactivate -// ==================================================== - -export interface GiftCardBulkDeactivate_giftCardBulkDeactivate_errors { - __typename: "GiftCardError"; - code: GiftCardErrorCode; - field: string | null; - message: string | null; -} - -export interface GiftCardBulkDeactivate_giftCardBulkDeactivate { - __typename: "GiftCardBulkDeactivate"; - errors: GiftCardBulkDeactivate_giftCardBulkDeactivate_errors[]; - count: number; -} - -export interface GiftCardBulkDeactivate { - giftCardBulkDeactivate: GiftCardBulkDeactivate_giftCardBulkDeactivate | null; -} - -export interface GiftCardBulkDeactivateVariables { - ids: (string | null)[]; -} diff --git a/src/giftCards/GiftCardsList/GiftCardsListTable/utils.ts b/src/giftCards/GiftCardsList/GiftCardsListTable/utils.ts index 0949279ba..906754cd1 100644 --- a/src/giftCards/GiftCardsList/GiftCardsListTable/utils.ts +++ b/src/giftCards/GiftCardsList/GiftCardsListTable/utils.ts @@ -1,10 +1,7 @@ import { PLACEHOLDER } from "@saleor/giftCards/GiftCardUpdate/types"; +import { GiftCardDataFragment } from "@saleor/graphql"; -import { GiftCardList_giftCards_edges_node_tags } from "../types/GiftCardList"; - -export const getTagCellText = ( - tags: GiftCardList_giftCards_edges_node_tags[] -) => { +export const getTagCellText = (tags: GiftCardDataFragment["tags"]) => { if (!!tags.length) { return tags.map(({ name }) => name).join(", "); } diff --git a/src/giftCards/GiftCardsList/mutations.ts b/src/giftCards/GiftCardsList/mutations.ts index 5246e74a7..e2d476a25 100644 --- a/src/giftCards/GiftCardsList/mutations.ts +++ b/src/giftCards/GiftCardsList/mutations.ts @@ -1,18 +1,6 @@ import { gql } from "@apollo/client"; -import { giftCardErrorFragment } from "@saleor/fragments/errors"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { - BulkDeleteGiftCard, - BulkDeleteGiftCardVariables -} from "./types/BulkDeleteGiftCard"; -import { - DeleteGiftCard, - DeleteGiftCardVariables -} from "./types/DeleteGiftCard"; - -const deleteGiftCard = gql` - ${giftCardErrorFragment} +export const deleteGiftCard = gql` mutation DeleteGiftCard($id: ID!) { giftCardDelete(id: $id) { errors { @@ -22,13 +10,7 @@ const deleteGiftCard = gql` } `; -export const useGiftCardDeleteMutation = makeMutation< - DeleteGiftCard, - DeleteGiftCardVariables ->(deleteGiftCard); - -const bulkDeleteGiftCard = gql` - ${giftCardErrorFragment} +export const bulkDeleteGiftCard = gql` mutation BulkDeleteGiftCard($ids: [ID]!) { giftCardBulkDelete(ids: $ids) { errors { @@ -37,8 +19,3 @@ const bulkDeleteGiftCard = gql` } } `; - -export const useGiftCardBulkDeleteMutation = makeMutation< - BulkDeleteGiftCard, - BulkDeleteGiftCardVariables ->(bulkDeleteGiftCard); diff --git a/src/giftCards/GiftCardsList/providers/GiftCardListDialogsProvider/GiftCardListDialogsProvider.tsx b/src/giftCards/GiftCardsList/providers/GiftCardListDialogsProvider/GiftCardListDialogsProvider.tsx index c515633d8..314ca9d41 100644 --- a/src/giftCards/GiftCardsList/providers/GiftCardListDialogsProvider/GiftCardListDialogsProvider.tsx +++ b/src/giftCards/GiftCardsList/providers/GiftCardListDialogsProvider/GiftCardListDialogsProvider.tsx @@ -6,10 +6,10 @@ import GiftCardExportDialogContent from "@saleor/giftCards/GiftCardExportDialogC import { giftCardListUrl } from "@saleor/giftCards/urls"; import useNavigator from "@saleor/hooks/useNavigator"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; -import React, { createContext } from "react"; +import React, { createContext, useContext } from "react"; +import { GIFT_CARD_LIST_QUERY } from "../../queries"; import { - GIFT_CARD_LIST_QUERY, GiftCardListActionParamsEnum, GiftCardListUrlQueryParams } from "../../types"; @@ -34,6 +34,9 @@ export const GiftCardListDialogsContext = createContext< GiftCardListDialogsConsumerProps >(null); +export const useGiftCardListDialogs = () => + useContext(GiftCardListDialogsContext); + const GiftCardListDialogsProvider: React.FC = ({ children, params diff --git a/src/giftCards/GiftCardsList/providers/GiftCardListDialogsProvider/hooks/useGiftCardListDialogs.ts b/src/giftCards/GiftCardsList/providers/GiftCardListDialogsProvider/hooks/useGiftCardListDialogs.ts deleted file mode 100644 index 06fef7ff5..000000000 --- a/src/giftCards/GiftCardsList/providers/GiftCardListDialogsProvider/hooks/useGiftCardListDialogs.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { useContext } from "react"; - -import { - GiftCardListDialogsConsumerProps, - GiftCardListDialogsContext -} from "../GiftCardListDialogsProvider"; - -const useGiftCardListDialogs = (): GiftCardListDialogsConsumerProps => { - const giftCardListDialogsProps = useContext(GiftCardListDialogsContext); - - return giftCardListDialogsProps; -}; - -export default useGiftCardListDialogs; diff --git a/src/giftCards/GiftCardsList/providers/GiftCardListDialogsProvider/hooks/useGiftCardListSort.ts b/src/giftCards/GiftCardsList/providers/GiftCardListDialogsProvider/hooks/useGiftCardListSort.ts deleted file mode 100644 index e1457dcfa..000000000 --- a/src/giftCards/GiftCardsList/providers/GiftCardListDialogsProvider/hooks/useGiftCardListSort.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { GiftCardUrlSortField } from "@saleor/giftCards/GiftCardsList/types"; -import { SortPage } from "@saleor/types"; - -import useGiftCardList from "../../GiftCardListProvider/hooks/useGiftCardList"; - -type GiftCardSortListProps = SortPage; - -const useGiftCardListSort = (): GiftCardSortListProps => { - const { onSort, sort } = useGiftCardList(); - - return { onSort, sort }; -}; - -export default useGiftCardListSort; diff --git a/src/giftCards/GiftCardsList/providers/GiftCardListProvider/GiftCardListProvider.tsx b/src/giftCards/GiftCardsList/providers/GiftCardListProvider/GiftCardListProvider.tsx index 80c45bb22..31861414f 100644 --- a/src/giftCards/GiftCardsList/providers/GiftCardListProvider/GiftCardListProvider.tsx +++ b/src/giftCards/GiftCardsList/providers/GiftCardListProvider/GiftCardListProvider.tsx @@ -2,6 +2,11 @@ import { ApolloError } from "@apollo/client"; import { ExtendedGiftCard } from "@saleor/giftCards/GiftCardUpdate/providers/GiftCardDetailsProvider/types"; import { getExtendedGiftCard } from "@saleor/giftCards/GiftCardUpdate/providers/GiftCardDetailsProvider/utils"; import { giftCardListUrl } from "@saleor/giftCards/urls"; +import { + GiftCardListQuery, + GiftCardListQueryVariables, + useGiftCardListQuery +} from "@saleor/graphql"; import useBulkActions, { UseBulkActionsProps } from "@saleor/hooks/useBulkActions"; @@ -20,19 +25,14 @@ import { ListViews, SortPage } from "@saleor/types"; import createSortHandler from "@saleor/utils/handlers/sortHandler"; import { mapEdgesToItems } from "@saleor/utils/maps"; import { getSortParams } from "@saleor/utils/sort"; -import React, { createContext } from "react"; +import React, { createContext, useContext } from "react"; import { getFilterVariables } from "../../GiftCardListSearchAndFilters/filters"; -import { useGiftCardListQuery } from "../../queries"; import { GiftCardListColummns, GiftCardListUrlQueryParams, GiftCardUrlSortField } from "../../types"; -import { - GiftCardList_giftCards_edges_node, - GiftCardListVariables -} from "../../types/GiftCardList"; import { getSortQueryVariables } from "./sort"; const numberOfColumns = 7; @@ -42,21 +42,19 @@ interface GiftCardsListProviderProps { params: GiftCardListUrlQueryParams; } -export interface GiftCardListDataProps extends SortPage { - giftCards: Array>; +export interface GiftCardsListConsumerProps + extends UseBulkActionsProps, + UseListSettings, + SortPage { + giftCards: Array< + ExtendedGiftCard + >; pageInfo: PageInfo; loading: boolean; params: GiftCardListUrlQueryParams; paginationState: PaginationState; numberOfColumns: number; totalCount: number; -} - -export interface GiftCardsListConsumerProps - extends UseBulkActionsProps, - GiftCardListDataProps, - UseListSettings, - SortPage { selectedItemsCount: number; } @@ -64,6 +62,8 @@ export const GiftCardsListContext = createContext( null ); +export const useGiftCardList = () => useContext(GiftCardsListContext); + export const GiftCardsListProvider: React.FC = ({ children, params @@ -85,7 +85,7 @@ export const GiftCardsListProvider: React.FC = ({ const handleSort = createSortHandler(navigate, giftCardListUrl, params); - const queryVariables = React.useMemo( + const queryVariables = React.useMemo( () => ({ ...paginationState, filter: getFilterVariables(params), diff --git a/src/giftCards/GiftCardsList/providers/GiftCardListProvider/hooks/useGiftCardList.ts b/src/giftCards/GiftCardsList/providers/GiftCardListProvider/hooks/useGiftCardList.ts deleted file mode 100644 index f741c4aa7..000000000 --- a/src/giftCards/GiftCardsList/providers/GiftCardListProvider/hooks/useGiftCardList.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { UseListSettings } from "@saleor/hooks/useListSettings"; -import { useContext } from "react"; - -import { GiftCardListColummns } from "../../../types"; -import { - GiftCardListDataProps, - GiftCardsListContext -} from "../GiftCardListProvider"; - -export type UseGiftCardListProps = GiftCardListDataProps & - UseListSettings; - -const useGiftCardList = (): UseGiftCardListProps => { - const { - giftCards, - loading, - pageInfo, - paginationState, - params, - settings, - updateListSettings, - numberOfColumns, - totalCount, - sort, - onSort - } = useContext(GiftCardsListContext); - - return { - totalCount, - giftCards, - loading, - pageInfo, - paginationState, - params, - settings, - updateListSettings, - numberOfColumns, - sort, - onSort - }; -}; - -export default useGiftCardList; diff --git a/src/giftCards/GiftCardsList/providers/GiftCardListProvider/hooks/useGiftCardListBulkActions.ts b/src/giftCards/GiftCardsList/providers/GiftCardListProvider/hooks/useGiftCardListBulkActions.ts deleted file mode 100644 index 4f478bf49..000000000 --- a/src/giftCards/GiftCardsList/providers/GiftCardListProvider/hooks/useGiftCardListBulkActions.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { UseBulkActionsProps } from "@saleor/hooks/useBulkActions"; -import { useContext } from "react"; - -import { - GiftCardsListConsumerProps, - GiftCardsListContext -} from "../GiftCardListProvider"; - -export type UseGiftCardListBulkActionsProps = UseBulkActionsProps & - Pick; - -const useGiftCardListBulkActions = (): UseGiftCardListBulkActionsProps => { - const { - isSelected, - listElements, - reset, - toggleAll, - toggle, - selectedItemsCount - } = useContext(GiftCardsListContext); - - return { - isSelected, - listElements, - reset, - toggleAll, - toggle, - selectedItemsCount - }; -}; - -export default useGiftCardListBulkActions; diff --git a/src/giftCards/GiftCardsList/providers/GiftCardListProvider/sort.ts b/src/giftCards/GiftCardsList/providers/GiftCardListProvider/sort.ts index 3e0f140dd..261f4d48b 100644 --- a/src/giftCards/GiftCardsList/providers/GiftCardListProvider/sort.ts +++ b/src/giftCards/GiftCardsList/providers/GiftCardListProvider/sort.ts @@ -1,4 +1,4 @@ -import { GiftCardSortField } from "@saleor/types/globalTypes"; +import { GiftCardSortField } from "@saleor/graphql"; import { createGetSortQueryVariables } from "@saleor/utils/sort"; import { GiftCardUrlSortField } from "../../types"; diff --git a/src/giftCards/GiftCardsList/queries.ts b/src/giftCards/GiftCardsList/queries.ts index dccfef56f..2de6ab487 100644 --- a/src/giftCards/GiftCardsList/queries.ts +++ b/src/giftCards/GiftCardsList/queries.ts @@ -1,15 +1,7 @@ import { gql } from "@apollo/client"; -import { fragmentUserBase } from "@saleor/fragments/auth"; -import { fragmentMoney } from "@saleor/fragments/products"; -import makeQuery from "@saleor/hooks/makeQuery"; - -import { GiftCardList, GiftCardListVariables } from "./types/GiftCardList"; -import { GiftCardProductsCount } from "./types/GiftCardProductsCount"; -import { GiftCardTotalCount } from "./types/GiftCardTotalCount"; +import { getOperationAST } from "graphql"; export const giftCardList = gql` - ${fragmentUserBase} - ${fragmentMoney} query GiftCardList( $first: Int $after: String @@ -59,6 +51,8 @@ export const giftCardList = gql` } `; +export const GIFT_CARD_LIST_QUERY = getOperationAST(giftCardList).name.value; + export const giftCardTotalCount = gql` query GiftCardTotalCount { giftCards { @@ -67,15 +61,6 @@ export const giftCardTotalCount = gql` } `; -export const useGiftCardTotalCountQuery = makeQuery( - giftCardTotalCount -); - -export const useGiftCardListQuery = makeQuery< - GiftCardList, - GiftCardListVariables ->(giftCardList); - export const giftCardProductsCount = gql` query GiftCardProductsCount { giftCardProductTypes: productTypes(filter: { kind: GIFT_CARD }) { @@ -86,8 +71,3 @@ export const giftCardProductsCount = gql` } } `; - -export const useGiftCardProductsCountQuery = makeQuery< - GiftCardProductsCount, - never ->(giftCardProductsCount); diff --git a/src/giftCards/GiftCardsList/types.ts b/src/giftCards/GiftCardsList/types.ts index 382169fe7..7f5c2d0f7 100644 --- a/src/giftCards/GiftCardsList/types.ts +++ b/src/giftCards/GiftCardsList/types.ts @@ -40,5 +40,3 @@ export type GiftCardListUrlQueryParams = Pagination & GiftCardUrlSort & ActiveTab & Search; - -export const GIFT_CARD_LIST_QUERY = "GiftCardList"; diff --git a/src/giftCards/GiftCardsList/types/BulkDeleteGiftCard.ts b/src/giftCards/GiftCardsList/types/BulkDeleteGiftCard.ts deleted file mode 100644 index 5ef05d6c0..000000000 --- a/src/giftCards/GiftCardsList/types/BulkDeleteGiftCard.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardErrorCode } from "./../../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: BulkDeleteGiftCard -// ==================================================== - -export interface BulkDeleteGiftCard_giftCardBulkDelete_errors { - __typename: "GiftCardError"; - code: GiftCardErrorCode; - field: string | null; - message: string | null; -} - -export interface BulkDeleteGiftCard_giftCardBulkDelete { - __typename: "GiftCardBulkDelete"; - errors: BulkDeleteGiftCard_giftCardBulkDelete_errors[]; -} - -export interface BulkDeleteGiftCard { - giftCardBulkDelete: BulkDeleteGiftCard_giftCardBulkDelete | null; -} - -export interface BulkDeleteGiftCardVariables { - ids: (string | null)[]; -} diff --git a/src/giftCards/GiftCardsList/types/DeleteGiftCard.ts b/src/giftCards/GiftCardsList/types/DeleteGiftCard.ts deleted file mode 100644 index 392174ec8..000000000 --- a/src/giftCards/GiftCardsList/types/DeleteGiftCard.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardErrorCode } from "./../../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: DeleteGiftCard -// ==================================================== - -export interface DeleteGiftCard_giftCardDelete_errors { - __typename: "GiftCardError"; - code: GiftCardErrorCode; - field: string | null; - message: string | null; -} - -export interface DeleteGiftCard_giftCardDelete { - __typename: "GiftCardDelete"; - errors: DeleteGiftCard_giftCardDelete_errors[]; -} - -export interface DeleteGiftCard { - giftCardDelete: DeleteGiftCard_giftCardDelete | null; -} - -export interface DeleteGiftCardVariables { - id: string; -} diff --git a/src/giftCards/GiftCardsList/types/GiftCardList.ts b/src/giftCards/GiftCardsList/types/GiftCardList.ts deleted file mode 100644 index 685271333..000000000 --- a/src/giftCards/GiftCardsList/types/GiftCardList.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardFilterInput, GiftCardSortingInput } from "./../../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: GiftCardList -// ==================================================== - -export interface GiftCardList_giftCards_edges_node_product { - __typename: "Product"; - id: string; - name: string; -} - -export interface GiftCardList_giftCards_edges_node_tags { - __typename: "GiftCardTag"; - name: string; -} - -export interface GiftCardList_giftCards_edges_node_usedBy { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} - -export interface GiftCardList_giftCards_edges_node_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface GiftCardList_giftCards_edges_node { - __typename: "GiftCard"; - id: string; - usedByEmail: string | null; - last4CodeChars: string; - isActive: boolean; - expiryDate: any | null; - product: GiftCardList_giftCards_edges_node_product | null; - tags: GiftCardList_giftCards_edges_node_tags[]; - usedBy: GiftCardList_giftCards_edges_node_usedBy | null; - currentBalance: GiftCardList_giftCards_edges_node_currentBalance | null; -} - -export interface GiftCardList_giftCards_edges { - __typename: "GiftCardCountableEdge"; - node: GiftCardList_giftCards_edges_node; -} - -export interface GiftCardList_giftCards_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface GiftCardList_giftCards { - __typename: "GiftCardCountableConnection"; - edges: GiftCardList_giftCards_edges[]; - totalCount: number | null; - pageInfo: GiftCardList_giftCards_pageInfo; -} - -export interface GiftCardList { - giftCards: GiftCardList_giftCards | null; -} - -export interface GiftCardListVariables { - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; - filter?: GiftCardFilterInput | null; - sort?: GiftCardSortingInput | null; -} diff --git a/src/giftCards/GiftCardsList/types/GiftCardProductsCount.ts b/src/giftCards/GiftCardsList/types/GiftCardProductsCount.ts deleted file mode 100644 index cee5c0859..000000000 --- a/src/giftCards/GiftCardsList/types/GiftCardProductsCount.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: GiftCardProductsCount -// ==================================================== - -export interface GiftCardProductsCount_giftCardProductTypes { - __typename: "ProductTypeCountableConnection"; - totalCount: number | null; -} - -export interface GiftCardProductsCount_giftCardProducts { - __typename: "ProductCountableConnection"; - totalCount: number | null; -} - -export interface GiftCardProductsCount { - giftCardProductTypes: GiftCardProductsCount_giftCardProductTypes | null; - giftCardProducts: GiftCardProductsCount_giftCardProducts | null; -} diff --git a/src/giftCards/GiftCardsList/types/GiftCardTotalCount.ts b/src/giftCards/GiftCardsList/types/GiftCardTotalCount.ts deleted file mode 100644 index cf47ad167..000000000 --- a/src/giftCards/GiftCardsList/types/GiftCardTotalCount.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: GiftCardTotalCount -// ==================================================== - -export interface GiftCardTotalCount_giftCards { - __typename: "GiftCardCountableConnection"; - totalCount: number | null; -} - -export interface GiftCardTotalCount { - giftCards: GiftCardTotalCount_giftCards | null; -} diff --git a/src/giftCards/components/GiftCardCustomerCard/CustomerGiftCardsCard.tsx b/src/giftCards/components/GiftCardCustomerCard/CustomerGiftCardsCard.tsx index 44746c6cf..04e6fae82 100644 --- a/src/giftCards/components/GiftCardCustomerCard/CustomerGiftCardsCard.tsx +++ b/src/giftCards/components/GiftCardCustomerCard/CustomerGiftCardsCard.tsx @@ -9,6 +9,7 @@ import { useCustomerDetails } from "@saleor/customers/hooks/useCustomerDetails"; import GiftCardCreateDialogContent from "@saleor/giftCards/GiftCardCreateDialog/GiftCardCreateDialogContent"; import { getExtendedGiftCard } from "@saleor/giftCards/GiftCardUpdate/providers/GiftCardDetailsProvider/utils"; import { giftCardListUrl } from "@saleor/giftCards/urls"; +import { useCustomerGiftCardListQuery } from "@saleor/graphql"; import { Button } from "@saleor/macaw-ui"; import { getFullName } from "@saleor/misc"; import { mapEdgesToItems } from "@saleor/utils/maps"; @@ -18,10 +19,7 @@ import { FormattedMessage, useIntl } from "react-intl"; import CustomerGiftCardsCardListItem from "./CustomerGiftCardsCardListItem"; import { giftCardCustomerCardMessages as messages } from "./messages"; -import { - CUSTOMER_GIFT_CARD_LIST_QUERY, - useCustomerGiftCardQuery -} from "./queries"; +import { CUSTOMER_GIFT_CARD_LIST_QUERY } from "./queries"; import { useCardActionsStyles } from "./styles"; const CustomerGiftCardsCard: React.FC = () => { @@ -31,7 +29,7 @@ const CustomerGiftCardsCard: React.FC = () => { const customer = customerDetails?.customer?.user; const id = customer?.id; - const { data, loading } = useCustomerGiftCardQuery({ + const { data, loading } = useCustomerGiftCardListQuery({ variables: { first: 5, filter: { diff --git a/src/giftCards/components/GiftCardCustomerCard/CustomerGiftCardsCardListItem.tsx b/src/giftCards/components/GiftCardCustomerCard/CustomerGiftCardsCardListItem.tsx index 1d3a0fafb..1b79b319c 100644 --- a/src/giftCards/components/GiftCardCustomerCard/CustomerGiftCardsCardListItem.tsx +++ b/src/giftCards/components/GiftCardCustomerCard/CustomerGiftCardsCardListItem.tsx @@ -3,20 +3,19 @@ import { bulkEnableDisableSectionMessages } from "@saleor/giftCards/GiftCardsLis import { giftCardsListTableMessages } from "@saleor/giftCards/GiftCardsList/messages"; import useGiftCardActivateToggle from "@saleor/giftCards/GiftCardUpdate/GiftCardUpdatePageHeader/hooks/useGiftCardActivateToggle"; import { ExtendedGiftCard } from "@saleor/giftCards/GiftCardUpdate/providers/GiftCardDetailsProvider/types"; +import { CustomerGiftCardFragment } from "@saleor/graphql"; import * as React from "react"; import { useState } from "react"; -import { FormattedMessage } from "react-intl"; -import { useIntl } from "react-intl"; +import { FormattedMessage, useIntl } from "react-intl"; import GiftCardDeleteDialogContent from "../GiftCardDeleteDialog/GiftCardDeleteDialogContent"; import useGiftCardSingleDelete from "../GiftCardDeleteDialog/useGiftCardSingleDelete"; import GiftCardStatusChip from "../GiftCardStatusChip/GiftCardStatusChip"; import { CUSTOMER_GIFT_CARD_LIST_QUERY } from "./queries"; import { useListWrapperStyles } from "./styles"; -import { CustomerGiftCardList_giftCards_edges_node } from "./types/CustomerGiftCardList"; interface CustomerGiftCardsCardListItemProps { - giftCard: ExtendedGiftCard; + giftCard: ExtendedGiftCard; } const CustomerGiftCardsCardListItem: React.FC = ({ diff --git a/src/giftCards/components/GiftCardCustomerCard/queries.ts b/src/giftCards/components/GiftCardCustomerCard/queries.ts index 8d412aaa4..44420e680 100644 --- a/src/giftCards/components/GiftCardCustomerCard/queries.ts +++ b/src/giftCards/components/GiftCardCustomerCard/queries.ts @@ -1,34 +1,18 @@ import { gql } from "@apollo/client"; -import { fragmentMoney } from "@saleor/fragments/products"; -import makeQuery from "@saleor/hooks/makeQuery"; +import { getOperationAST } from "graphql"; -import { - CustomerGiftCardList, - CustomerGiftCardListVariables -} from "./types/CustomerGiftCardList"; - -const customerGiftCardListQuery = gql` - ${fragmentMoney} +export const customerGiftCardListQuery = gql` query CustomerGiftCardList($first: Int, $filter: GiftCardFilterInput) { giftCards(first: $first, filter: $filter) { edges { node { - id - last4CodeChars - expiryDate - isActive - currentBalance { - ...Money - } + ...CustomerGiftCard } } } } `; -export const useCustomerGiftCardQuery = makeQuery< - CustomerGiftCardList, - CustomerGiftCardListVariables ->(customerGiftCardListQuery); - -export const CUSTOMER_GIFT_CARD_LIST_QUERY = "CustomerGiftCardList"; +export const CUSTOMER_GIFT_CARD_LIST_QUERY = getOperationAST( + customerGiftCardListQuery +).name.value; diff --git a/src/giftCards/components/GiftCardCustomerCard/types/CustomerGiftCardList.ts b/src/giftCards/components/GiftCardCustomerCard/types/CustomerGiftCardList.ts deleted file mode 100644 index 9d31f85f4..000000000 --- a/src/giftCards/components/GiftCardCustomerCard/types/CustomerGiftCardList.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardFilterInput } from "./../../../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: CustomerGiftCardList -// ==================================================== - -export interface CustomerGiftCardList_giftCards_edges_node_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface CustomerGiftCardList_giftCards_edges_node { - __typename: "GiftCard"; - id: string; - last4CodeChars: string; - expiryDate: any | null; - isActive: boolean; - currentBalance: CustomerGiftCardList_giftCards_edges_node_currentBalance | null; -} - -export interface CustomerGiftCardList_giftCards_edges { - __typename: "GiftCardCountableEdge"; - node: CustomerGiftCardList_giftCards_edges_node; -} - -export interface CustomerGiftCardList_giftCards { - __typename: "GiftCardCountableConnection"; - edges: CustomerGiftCardList_giftCards_edges[]; -} - -export interface CustomerGiftCardList { - giftCards: CustomerGiftCardList_giftCards | null; -} - -export interface CustomerGiftCardListVariables { - first?: number | null; - filter?: GiftCardFilterInput | null; -} diff --git a/src/giftCards/components/GiftCardDeleteDialog/GiftCardDeleteDialogContent.tsx b/src/giftCards/components/GiftCardDeleteDialog/GiftCardDeleteDialogContent.tsx index e84c06d97..8c4faf840 100644 --- a/src/giftCards/components/GiftCardDeleteDialog/GiftCardDeleteDialogContent.tsx +++ b/src/giftCards/components/GiftCardDeleteDialog/GiftCardDeleteDialogContent.tsx @@ -7,10 +7,9 @@ import ActionDialog, { ActionDialogProps } from "@saleor/components/ActionDialog"; import DeleteWarningDialogConsentContent from "@saleor/components/TypeDeleteWarningDialog/DeleteWarningDialogConsentContent"; -import { UseGiftCardListProps } from "@saleor/giftCards/GiftCardsList/providers/GiftCardListProvider/hooks/useGiftCardList"; -import { UseGiftCardListBulkActionsProps } from "@saleor/giftCards/GiftCardsList/providers/GiftCardListProvider/hooks/useGiftCardListBulkActions"; +import { GiftCardsListConsumerProps } from "@saleor/giftCards/GiftCardsList/providers/GiftCardListProvider"; import { ExtendedGiftCard } from "@saleor/giftCards/GiftCardUpdate/providers/GiftCardDetailsProvider/types"; -import { GiftCardDetails_giftCard } from "@saleor/giftCards/GiftCardUpdate/types/GiftCardDetails"; +import { GiftCardDataFragment } from "@saleor/graphql"; import { getById } from "@saleor/orders/components/OrderReturnPage/utils"; import React, { useEffect, useState } from "react"; import { useIntl } from "react-intl"; @@ -21,7 +20,7 @@ import { useGiftCardDeleteDialogContentStyles as useStyles } from "./styles"; export const SINGLE = 1; type DeleteDialogContentGiftCard = Pick< - ExtendedGiftCard, + ExtendedGiftCard, "currentBalance" | "id" >; @@ -32,11 +31,10 @@ export interface GiftCardDeleteDialogContentProps< ActionDialogProps, "open" | "onClose" | "onConfirm" | "confirmButtonState" >, - Partial>, Partial< Pick< - UseGiftCardListBulkActionsProps, - "listElements" | "selectedItemsCount" + GiftCardsListConsumerProps, + "listElements" | "selectedItemsCount" | "giftCards" | "loading" > > { id?: string; diff --git a/src/giftCards/components/GiftCardDeleteDialog/GiftCardListPageDeleteDialog.tsx b/src/giftCards/components/GiftCardDeleteDialog/GiftCardListPageDeleteDialog.tsx index 6f7396287..cf6ebce54 100644 --- a/src/giftCards/components/GiftCardDeleteDialog/GiftCardListPageDeleteDialog.tsx +++ b/src/giftCards/components/GiftCardDeleteDialog/GiftCardListPageDeleteDialog.tsx @@ -1,8 +1,7 @@ import { ActionDialogProps } from "@saleor/components/ActionDialog"; -import useGiftCardListDialogs from "@saleor/giftCards/GiftCardsList/providers/GiftCardListDialogsProvider/hooks/useGiftCardListDialogs"; -import useGiftCardList from "@saleor/giftCards/GiftCardsList/providers/GiftCardListProvider/hooks/useGiftCardList"; -import useGiftCardListBulkActions from "@saleor/giftCards/GiftCardsList/providers/GiftCardListProvider/hooks/useGiftCardListBulkActions"; -import { GIFT_CARD_LIST_QUERY } from "@saleor/giftCards/GiftCardsList/types"; +import { useGiftCardListDialogs } from "@saleor/giftCards/GiftCardsList/providers/GiftCardListDialogsProvider"; +import { useGiftCardList } from "@saleor/giftCards/GiftCardsList/providers/GiftCardListProvider"; +import { GIFT_CARD_LIST_QUERY } from "@saleor/giftCards/GiftCardsList/queries"; import { DialogProps } from "@saleor/types"; import React from "react"; @@ -21,10 +20,8 @@ const GiftCardDeleteDialog: React.FC = ({ onClose, refetchQueries = [] }) => { - const giftCardBulkActionsProps = useGiftCardListBulkActions(); - const { selectedItemsCount } = giftCardBulkActionsProps; - - const { giftCards, loading } = useGiftCardList(); + const listProps = useGiftCardList(); + const { giftCards, loading, selectedItemsCount } = listProps; const { id } = useGiftCardListDialogs(); @@ -59,14 +56,14 @@ const GiftCardDeleteDialog: React.FC = ({ return ( ); }; diff --git a/src/giftCards/components/GiftCardDeleteDialog/GiftCardUpdatePageDeleteDialog.tsx b/src/giftCards/components/GiftCardDeleteDialog/GiftCardUpdatePageDeleteDialog.tsx index 7f47eb42e..dc65bdcde 100644 --- a/src/giftCards/components/GiftCardDeleteDialog/GiftCardUpdatePageDeleteDialog.tsx +++ b/src/giftCards/components/GiftCardDeleteDialog/GiftCardUpdatePageDeleteDialog.tsx @@ -1,4 +1,4 @@ -import { GIFT_CARD_LIST_QUERY } from "@saleor/giftCards/GiftCardsList/types"; +import { GIFT_CARD_LIST_QUERY } from "@saleor/giftCards/GiftCardsList/queries"; import useGiftCardDetails from "@saleor/giftCards/GiftCardUpdate/providers/GiftCardDetailsProvider/hooks/useGiftCardDetails"; import { GiftCardUpdateDialogsConsumerProps } from "@saleor/giftCards/GiftCardUpdate/providers/GiftCardUpdateDialogsProvider"; import { DialogProps } from "@saleor/types"; diff --git a/src/giftCards/components/GiftCardDeleteDialog/useGiftCardBulkDelete.tsx b/src/giftCards/components/GiftCardDeleteDialog/useGiftCardBulkDelete.tsx index dc81a06e5..94002cee9 100644 --- a/src/giftCards/components/GiftCardDeleteDialog/useGiftCardBulkDelete.tsx +++ b/src/giftCards/components/GiftCardDeleteDialog/useGiftCardBulkDelete.tsx @@ -1,6 +1,8 @@ -import { useGiftCardBulkDeleteMutation } from "@saleor/giftCards/GiftCardsList/mutations"; -import useGiftCardListBulkActions from "@saleor/giftCards/GiftCardsList/providers/GiftCardListProvider/hooks/useGiftCardListBulkActions"; -import { BulkDeleteGiftCard } from "@saleor/giftCards/GiftCardsList/types/BulkDeleteGiftCard"; +import { useGiftCardList } from "@saleor/giftCards/GiftCardsList/providers/GiftCardListProvider"; +import { + BulkDeleteGiftCardMutation, + useBulkDeleteGiftCardMutation +} from "@saleor/graphql"; import { MutationResultWithOpts } from "@saleor/hooks/makeMutation"; import useNotifier from "@saleor/hooks/useNotifier"; import commonErrorMessages from "@saleor/utils/errors/common"; @@ -10,7 +12,7 @@ import { giftCardDeleteDialogMessages as messages } from "./messages"; interface UseGiftCardBulkDeleteProps { onBulkDeleteGiftCards: () => void; - bulkDeleteGiftCardOpts: MutationResultWithOpts; + bulkDeleteGiftCardOpts: MutationResultWithOpts; } const useGiftCardBulkDelete = ({ @@ -27,35 +29,33 @@ const useGiftCardBulkDelete = ({ listElements, selectedItemsCount, reset: resetSelectedItems - } = useGiftCardListBulkActions(); - - const onCompleted = (data: BulkDeleteGiftCard) => { - const errors = data?.giftCardBulkDelete?.errors; - - if (!errors.length) { - notify({ - status: "success", - text: intl.formatMessage(messages.deleteSuccessAlertText, { - selectedItemsCount - }) - }); - - onClose(); - resetSelectedItems(); - return; - } - - notify({ - status: "error", - text: intl.formatMessage(commonErrorMessages.unknownError) - }); - }; + } = useGiftCardList(); const [ bulkDeleteGiftCard, bulkDeleteGiftCardOpts - ] = useGiftCardBulkDeleteMutation({ - onCompleted, + ] = useBulkDeleteGiftCardMutation({ + onCompleted: data => { + const errors = data?.giftCardBulkDelete?.errors; + + if (!errors.length) { + notify({ + status: "success", + text: intl.formatMessage(messages.deleteSuccessAlertText, { + selectedItemsCount + }) + }); + + onClose(); + resetSelectedItems(); + return; + } + + notify({ + status: "error", + text: intl.formatMessage(commonErrorMessages.unknownError) + }); + }, refetchQueries }); diff --git a/src/giftCards/components/GiftCardDeleteDialog/useGiftCardSingleDelete.tsx b/src/giftCards/components/GiftCardDeleteDialog/useGiftCardSingleDelete.tsx index c0f1266e3..9b8a0ea08 100644 --- a/src/giftCards/components/GiftCardDeleteDialog/useGiftCardSingleDelete.tsx +++ b/src/giftCards/components/GiftCardDeleteDialog/useGiftCardSingleDelete.tsx @@ -1,9 +1,8 @@ -import { useGiftCardDeleteMutation } from "@saleor/giftCards/GiftCardsList/mutations"; -import { - DeleteGiftCard, - DeleteGiftCard_giftCardDelete_errors -} from "@saleor/giftCards/GiftCardsList/types/DeleteGiftCard"; import { getGiftCardErrorMessage } from "@saleor/giftCards/GiftCardUpdate/messages"; +import { + DeleteGiftCardMutation, + useDeleteGiftCardMutation +} from "@saleor/graphql"; import { MutationResultWithOpts } from "@saleor/hooks/makeMutation"; import useNotifier from "@saleor/hooks/useNotifier"; import { useIntl } from "react-intl"; @@ -12,7 +11,7 @@ import { giftCardDeleteDialogMessages as messages } from "./messages"; interface UseGiftCardSingleDeleteProps { onDeleteGiftCard: () => void; - deleteGiftCardOpts: MutationResultWithOpts; + deleteGiftCardOpts: MutationResultWithOpts; } const useGiftCardSingleDelete = ({ @@ -29,36 +28,34 @@ const useGiftCardSingleDelete = ({ const notify = useNotifier(); const intl = useIntl(); - const onCompleted = (data: DeleteGiftCard) => { - const errors = data?.giftCardDelete?.errors; + const [deleteGiftCard, deleteGiftCardOpts] = useDeleteGiftCardMutation({ + onCompleted: data => { + const errors = data?.giftCardDelete?.errors; - if (!errors.length) { - notify({ - status: "success", - text: intl.formatMessage(messages.deleteSuccessAlertText, { - selectedItemsCount: 1 - }) - }); + if (!errors.length) { + notify({ + status: "success", + text: intl.formatMessage(messages.deleteSuccessAlertText, { + selectedItemsCount: 1 + }) + }); - onClose(); + onClose(); - if (onSuccess) { - onSuccess(); + if (onSuccess) { + onSuccess(); + } + + return; } - return; - } - - errors.map((error: DeleteGiftCard_giftCardDelete_errors) => - notify({ - status: "error", - text: getGiftCardErrorMessage(error, intl) - }) - ); - }; - - const [deleteGiftCard, deleteGiftCardOpts] = useGiftCardDeleteMutation({ - onCompleted, + errors.map(error => + notify({ + status: "error", + text: getGiftCardErrorMessage(error, intl) + }) + ); + }, refetchQueries }); diff --git a/src/giftCards/components/GiftCardSettingsExpirySelect/GiftCardSettingsExpirySelect.tsx b/src/giftCards/components/GiftCardSettingsExpirySelect/GiftCardSettingsExpirySelect.tsx index e8c1a2fd7..cde389b36 100644 --- a/src/giftCards/components/GiftCardSettingsExpirySelect/GiftCardSettingsExpirySelect.tsx +++ b/src/giftCards/components/GiftCardSettingsExpirySelect/GiftCardSettingsExpirySelect.tsx @@ -1,10 +1,12 @@ import { Typography } from "@material-ui/core"; import VerticalSpacer from "@saleor/apps/components/VerticalSpacer"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; -import { GiftCardSettingsErrorFragment } from "@saleor/fragments/types/GiftCardSettingsErrorFragment"; import { getGiftCardSettingsErrorMessage } from "@saleor/giftCards/GiftCardSettings/messages"; +import { + GiftCardSettingsErrorFragment, + TimePeriodTypeEnum +} from "@saleor/graphql"; import { FormChange } from "@saleor/hooks/useForm"; -import { TimePeriodTypeEnum } from "@saleor/types/globalTypes"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/giftCards/components/GiftCardTagInput/GiftCardTagInput.tsx b/src/giftCards/components/GiftCardTagInput/GiftCardTagInput.tsx index d5a5c6686..c3ed62b6b 100644 --- a/src/giftCards/components/GiftCardTagInput/GiftCardTagInput.tsx +++ b/src/giftCards/components/GiftCardTagInput/GiftCardTagInput.tsx @@ -5,6 +5,7 @@ import { GiftCardBulkCreateFormError } from "@saleor/giftCards/GiftCardBulkCreat import { getGiftCardErrorMessage } from "@saleor/giftCards/GiftCardUpdate/messages"; import { FormChange } from "@saleor/hooks/useForm"; import { commonMessages } from "@saleor/intl"; +import useGiftCardTagsSearch from "@saleor/searches/useGiftCardTagsSearch"; import { mapEdgesToItems, mapMultiValueNodeToChoice } from "@saleor/utils/maps"; import compact from "lodash/compact"; import uniq from "lodash/uniq"; @@ -12,7 +13,6 @@ import React from "react"; import { useIntl } from "react-intl"; import { giftCardTagInputMessages as messages } from "./messages"; -import useGiftCardTagsSearch from "./useGiftCardTagsSearch"; import { getMultiChoices } from "./utils"; interface GiftCardTagInputProps diff --git a/src/giftCards/components/GiftCardTagInput/types/SearchGiftCardTags.ts b/src/giftCards/components/GiftCardTagInput/types/SearchGiftCardTags.ts deleted file mode 100644 index 84a0f41fa..000000000 --- a/src/giftCards/components/GiftCardTagInput/types/SearchGiftCardTags.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: SearchGiftCardTags -// ==================================================== - -export interface SearchGiftCardTags_search_edges_node { - __typename: "GiftCardTag"; - id: string; - name: string; -} - -export interface SearchGiftCardTags_search_edges { - __typename: "GiftCardTagCountableEdge"; - node: SearchGiftCardTags_search_edges_node; -} - -export interface SearchGiftCardTags_search_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SearchGiftCardTags_search { - __typename: "GiftCardTagCountableConnection"; - totalCount: number | null; - edges: SearchGiftCardTags_search_edges[]; - pageInfo: SearchGiftCardTags_search_pageInfo; -} - -export interface SearchGiftCardTags { - search: SearchGiftCardTags_search | null; -} - -export interface SearchGiftCardTagsVariables { - query: string; - first: number; - after?: string | null; - last?: number | null; - before?: string | null; -} diff --git a/src/giftCards/components/TimePeriodField/TimePeriodField.tsx b/src/giftCards/components/TimePeriodField/TimePeriodField.tsx index b4f3ef432..612f1faa1 100644 --- a/src/giftCards/components/TimePeriodField/TimePeriodField.tsx +++ b/src/giftCards/components/TimePeriodField/TimePeriodField.tsx @@ -1,6 +1,6 @@ import TextWithSelectField from "@saleor/components/TextWithSelectField"; +import { TimePeriodTypeEnum } from "@saleor/graphql"; import { FormChange } from "@saleor/hooks/useForm"; -import { TimePeriodTypeEnum } from "@saleor/types/globalTypes"; import React from "react"; import { useIntl } from "react-intl"; diff --git a/src/graphql/extendedTypes.ts b/src/graphql/extendedTypes.ts new file mode 100644 index 000000000..94df9c3f4 --- /dev/null +++ b/src/graphql/extendedTypes.ts @@ -0,0 +1,6 @@ +import { PermissionEnum } from "./types.generated"; + +export interface Node { + id: string +} +export type PrefixedPermissions = `PERMISSION_${PermissionEnum}`; \ No newline at end of file diff --git a/fragmentTypes.json b/src/graphql/fragmentTypes.generated.ts similarity index 93% rename from fragmentTypes.json rename to src/graphql/fragmentTypes.generated.ts index 353eeb869..d7b718283 100644 --- a/fragmentTypes.json +++ b/src/graphql/fragmentTypes.generated.ts @@ -1,4 +1,11 @@ -{ +/* eslint-disable */ + + export interface PossibleTypesResultData { + possibleTypes: { + [key: string]: string[] + } + } + const result: PossibleTypesResultData = { "possibleTypes": { "DeliveryMethod": [ "Warehouse", @@ -146,4 +153,6 @@ "PageType" ] } -} \ No newline at end of file +}; + export default result; + \ No newline at end of file diff --git a/src/graphql/hooks.generated.ts b/src/graphql/hooks.generated.ts new file mode 100644 index 000000000..8b1cebe64 --- /dev/null +++ b/src/graphql/hooks.generated.ts @@ -0,0 +1,16447 @@ +/* eslint-disable */ +import * as Types from './types.generated'; + +import { gql } from '@apollo/client'; +import * as Apollo from '@apollo/client'; +import * as ApolloReactHooks from '@saleor/hooks/graphql'; +const defaultOptions = {} as const; +export const WebhookFragmentDoc = gql` + fragment Webhook on Webhook { + id + name + isActive + app { + id + name + } +} + `; +export const AppFragmentDoc = gql` + fragment App on App { + id + name + created + isActive + type + homepageUrl + appUrl + configurationUrl + supportUrl + version + accessToken + privateMetadata { + key + value + } + metadata { + key + value + } + tokens { + authToken + id + name + } + webhooks { + ...Webhook + } +} + ${WebhookFragmentDoc}`; +export const AttributeFragmentDoc = gql` + fragment Attribute on Attribute { + id + name + slug + type + visibleInStorefront + filterableInDashboard + filterableInStorefront + unit + inputType +} + `; +export const MetadataItemFragmentDoc = gql` + fragment MetadataItem on MetadataItem { + key + value +} + `; +export const MetadataFragmentDoc = gql` + fragment Metadata on ObjectWithMetadata { + metadata { + ...MetadataItem + } + privateMetadata { + ...MetadataItem + } +} + ${MetadataItemFragmentDoc}`; +export const AttributeDetailsFragmentDoc = gql` + fragment AttributeDetails on Attribute { + ...Attribute + ...Metadata + availableInGrid + inputType + entityType + unit + storefrontSearchPosition + valueRequired +} + ${AttributeFragmentDoc} +${MetadataFragmentDoc}`; +export const AvailableAttributeFragmentDoc = gql` + fragment AvailableAttribute on Attribute { + id + name + slug +} + `; +export const UserPermissionFragmentDoc = gql` + fragment UserPermission on UserPermission { + code + name +} + `; +export const UserFragmentDoc = gql` + fragment User on User { + id + email + firstName + lastName + isStaff + userPermissions { + ...UserPermission + } + avatar { + url + } +} + ${UserPermissionFragmentDoc}`; +export const CategoryFragmentDoc = gql` + fragment Category on Category { + id + name + children { + totalCount + } + products { + totalCount + } +} + `; +export const CategoryDetailsFragmentDoc = gql` + fragment CategoryDetails on Category { + id + ...Metadata + backgroundImage { + alt + url + } + name + slug + description + seoDescription + seoTitle + parent { + id + } +} + ${MetadataFragmentDoc}`; +export const ChannelErrorFragmentDoc = gql` + fragment ChannelError on ChannelError { + code + field + message +} + `; +export const ChannelFragmentDoc = gql` + fragment Channel on Channel { + id + isActive + name + slug + currencyCode + defaultCountry { + code + country + } +} + `; +export const ChannelDetailsFragmentDoc = gql` + fragment ChannelDetails on Channel { + ...Channel + hasOrders +} + ${ChannelFragmentDoc}`; +export const CollectionFragmentDoc = gql` + fragment Collection on Collection { + id + name + channelListings { + isPublished + publicationDate + channel { + id + name + } + } +} + `; +export const CollectionDetailsFragmentDoc = gql` + fragment CollectionDetails on Collection { + ...Collection + ...Metadata + backgroundImage { + alt + url + } + slug + description + seoDescription + seoTitle +} + ${CollectionFragmentDoc} +${MetadataFragmentDoc}`; +export const ChannelListingProductWithoutPricingFragmentDoc = gql` + fragment ChannelListingProductWithoutPricing on ProductChannelListing { + isPublished + publicationDate + isAvailableForPurchase + availableForPurchase + visibleInListings + channel { + id + name + currencyCode + } +} + `; +export const CollectionProductFragmentDoc = gql` + fragment CollectionProduct on Product { + id + name + productType { + id + name + } + thumbnail { + url + } + channelListings { + ...ChannelListingProductWithoutPricing + } +} + ${ChannelListingProductWithoutPricingFragmentDoc}`; +export const CustomerFragmentDoc = gql` + fragment Customer on User { + id + email + firstName + lastName +} + `; +export const AddressFragmentDoc = gql` + fragment Address on Address { + city + cityArea + companyName + country { + __typename + code + country + } + countryArea + firstName + id + lastName + phone + postalCode + streetAddress1 + streetAddress2 +} + `; +export const CustomerDetailsFragmentDoc = gql` + fragment CustomerDetails on User { + ...Customer + ...Metadata + dateJoined + lastLogin + defaultShippingAddress { + ...Address + } + defaultBillingAddress { + ...Address + } + note + isActive +} + ${CustomerFragmentDoc} +${MetadataFragmentDoc} +${AddressFragmentDoc}`; +export const CustomerAddressesFragmentDoc = gql` + fragment CustomerAddresses on User { + ...Customer + addresses { + ...Address + } + defaultBillingAddress { + id + } + defaultShippingAddress { + id + } +} + ${CustomerFragmentDoc} +${AddressFragmentDoc}`; +export const SaleFragmentDoc = gql` + fragment Sale on Sale { + ...Metadata + id + name + type + startDate + endDate + channelListings { + id + channel { + id + name + currencyCode + } + discountValue + currency + } +} + ${MetadataFragmentDoc}`; +export const PageInfoFragmentDoc = gql` + fragment PageInfo on PageInfo { + endCursor + hasNextPage + hasPreviousPage + startCursor +} + `; +export const SaleDetailsFragmentDoc = gql` + fragment SaleDetails on Sale { + ...Sale + variants(after: $after, before: $before, first: $first, last: $last) { + edges { + node { + id + name + product { + id + name + thumbnail { + url + } + productType { + id + name + } + channelListings { + ...ChannelListingProductWithoutPricing + } + } + } + } + pageInfo { + ...PageInfo + } + totalCount + } + products(after: $after, before: $before, first: $first, last: $last) { + edges { + node { + id + name + productType { + id + name + } + thumbnail { + url + } + channelListings { + ...ChannelListingProductWithoutPricing + } + } + } + pageInfo { + ...PageInfo + } + totalCount + } + categories(after: $after, before: $before, first: $first, last: $last) { + edges { + node { + id + name + products { + totalCount + } + } + } + pageInfo { + ...PageInfo + } + totalCount + } + collections(after: $after, before: $before, first: $first, last: $last) { + edges { + node { + id + name + products { + totalCount + } + } + } + pageInfo { + ...PageInfo + } + totalCount + } +} + ${SaleFragmentDoc} +${ChannelListingProductWithoutPricingFragmentDoc} +${PageInfoFragmentDoc}`; +export const VoucherFragmentDoc = gql` + fragment Voucher on Voucher { + ...Metadata + id + code + startDate + endDate + usageLimit + type + discountValueType + countries { + code + country + } + minCheckoutItemsQuantity + channelListings { + id + channel { + id + name + currencyCode + } + discountValue + currency + minSpent { + amount + currency + } + } +} + ${MetadataFragmentDoc}`; +export const VoucherDetailsFragmentDoc = gql` + fragment VoucherDetails on Voucher { + ...Voucher + code + usageLimit + used + applyOncePerOrder + applyOncePerCustomer + onlyForStaff + products(after: $after, before: $before, first: $first, last: $last) { + edges { + node { + id + name + productType { + id + name + } + thumbnail { + url + } + channelListings { + ...ChannelListingProductWithoutPricing + } + } + } + totalCount + pageInfo { + ...PageInfo + } + } + collections(after: $after, before: $before, first: $first, last: $last) { + edges { + node { + id + name + products { + totalCount + } + } + } + totalCount + pageInfo { + ...PageInfo + } + } + categories(after: $after, before: $before, first: $first, last: $last) { + edges { + node { + id + name + products { + totalCount + } + } + } + totalCount + pageInfo { + ...PageInfo + } + } +} + ${VoucherFragmentDoc} +${ChannelListingProductWithoutPricingFragmentDoc} +${PageInfoFragmentDoc}`; +export const AttributeErrorFragmentDoc = gql` + fragment AttributeError on AttributeError { + code + field + message +} + `; +export const ProductErrorFragmentDoc = gql` + fragment ProductError on ProductError { + code + field + message +} + `; +export const ProductErrorWithAttributesFragmentDoc = gql` + fragment ProductErrorWithAttributes on ProductError { + ...ProductError + attributes +} + ${ProductErrorFragmentDoc}`; +export const ProductChannelListingErrorFragmentDoc = gql` + fragment ProductChannelListingError on ProductChannelListingError { + code + field + message + channels +} + `; +export const CollectionChannelListingErrorFragmentDoc = gql` + fragment CollectionChannelListingError on CollectionChannelListingError { + code + field + message + channels +} + `; +export const AccountErrorFragmentDoc = gql` + fragment AccountError on AccountError { + code + field + addressType + message +} + `; +export const DiscountErrorFragmentDoc = gql` + fragment DiscountError on DiscountError { + code + field + channels + message +} + `; +export const MenuErrorFragmentDoc = gql` + fragment MenuError on MenuError { + code + field + message +} + `; +export const OrderErrorFragmentDoc = gql` + fragment OrderError on OrderError { + code + field + addressType + message +} + `; +export const OrderSettingsErrorFragmentDoc = gql` + fragment OrderSettingsError on OrderSettingsError { + code + field + message +} + `; +export const PageErrorFragmentDoc = gql` + fragment PageError on PageError { + code + field + message +} + `; +export const PageErrorWithAttributesFragmentDoc = gql` + fragment PageErrorWithAttributes on PageError { + ...PageError + attributes +} + ${PageErrorFragmentDoc}`; +export const PermissionGroupErrorFragmentDoc = gql` + fragment PermissionGroupError on PermissionGroupError { + code + field + message +} + `; +export const BulkProductErrorFragmentDoc = gql` + fragment BulkProductError on BulkProductError { + field + code + index + channels + message +} + `; +export const BulkStockErrorFragmentDoc = gql` + fragment BulkStockError on BulkStockError { + code + field + index + message +} + `; +export const StockErrorFragmentDoc = gql` + fragment StockError on StockError { + code + field + message +} + `; +export const ShippingChannelsErrorFragmentDoc = gql` + fragment ShippingChannelsError on ShippingError { + code + field + channels + message +} + `; +export const ShippingErrorFragmentDoc = gql` + fragment ShippingError on ShippingError { + code + field + message +} + `; +export const ShopErrorFragmentDoc = gql` + fragment ShopError on ShopError { + code + field + message +} + `; +export const StaffErrorFragmentDoc = gql` + fragment StaffError on StaffError { + code + field + message +} + `; +export const WarehouseErrorFragmentDoc = gql` + fragment WarehouseError on WarehouseError { + code + field + message +} + `; +export const WebhookErrorFragmentDoc = gql` + fragment WebhookError on WebhookError { + code + field + message +} + `; +export const InvoiceErrorFragmentDoc = gql` + fragment InvoiceError on InvoiceError { + code + field + message +} + `; +export const AppErrorFragmentDoc = gql` + fragment AppError on AppError { + field + message + code + permissions +} + `; +export const ExportErrorFragmentDoc = gql` + fragment ExportError on ExportError { + code + field + message +} + `; +export const PluginErrorFragmentDoc = gql` + fragment PluginError on PluginError { + code + field + message +} + `; +export const MetadataErrorFragmentDoc = gql` + fragment MetadataError on MetadataError { + code + field + message +} + `; +export const CollectionErrorFragmentDoc = gql` + fragment CollectionError on CollectionError { + code + field + message +} + `; +export const UploadErrorFragmentDoc = gql` + fragment UploadError on UploadError { + code + field + message +} + `; +export const GiftCardErrorFragmentDoc = gql` + fragment GiftCardError on GiftCardError { + code + field + message +} + `; +export const GiftCardSettingsErrorFragmentDoc = gql` + fragment GiftCardSettingsError on GiftCardSettingsError { + code + field + message +} + `; +export const SaleBulkDeleteErrorFragmentDoc = gql` + fragment SaleBulkDeleteError on DiscountError { + code + field + message +} + `; +export const VoucherBulkDeleteErrorFragmentDoc = gql` + fragment VoucherBulkDeleteError on DiscountError { + code + field + message +} + `; +export const GiftCardBulkCreateErrorFragmentFragmentDoc = gql` + fragment GiftCardBulkCreateErrorFragment on GiftCardError { + code + field + message +} + `; +export const GiftCardCreateErrorFragmentFragmentDoc = gql` + fragment GiftCardCreateErrorFragment on GiftCardError { + code + field + message +} + `; +export const PageBulkPublishErrorFragmentFragmentDoc = gql` + fragment PageBulkPublishErrorFragment on PageError { + code + field + message +} + `; +export const PageBulkRemoveErrorFragmentFragmentDoc = gql` + fragment PageBulkRemoveErrorFragment on PageError { + code + field + message +} + `; +export const PageTypeDeleteErrorFragmentFragmentDoc = gql` + fragment PageTypeDeleteErrorFragment on PageError { + code + field + message +} + `; +export const ProductVariantStocksDeleteErrorFragmentDoc = gql` + fragment ProductVariantStocksDeleteError on StockError { + code + field + message +} + `; +export const ProductTypeDeleteErrorFragmentFragmentDoc = gql` + fragment ProductTypeDeleteErrorFragment on ProductError { + code + field + message +} + `; +export const ProductTypeBulkDeleteErrorFragmentFragmentDoc = gql` + fragment ProductTypeBulkDeleteErrorFragment on ProductError { + code + field + message +} + `; +export const ProductTypeBulkUpdateErrorFragmentFragmentDoc = gql` + fragment ProductTypeBulkUpdateErrorFragment on ProductError { + code + field + message +} + `; +export const ProductAttributeAssignErrorFragmentFragmentDoc = gql` + fragment ProductAttributeAssignErrorFragment on ProductError { + code + field + message +} + `; +export const ProductAttributeUnassignErrorFragmentFragmentDoc = gql` + fragment ProductAttributeUnassignErrorFragment on ProductError { + code + field + message +} + `; +export const ProductTypeCreateErrorFragmentFragmentDoc = gql` + fragment ProductTypeCreateErrorFragment on ProductError { + code + field + message +} + `; +export const ProductTypeReorderAttributesErrorFragmentFragmentDoc = gql` + fragment ProductTypeReorderAttributesErrorFragment on ProductError { + code + field + message +} + `; +export const ProductAttributeAssignmentUpdateErrorFragmentFragmentDoc = gql` + fragment ProductAttributeAssignmentUpdateErrorFragment on ProductError { + code + field + message + attributes +} + `; +export const ShopSettingsUpdateErrorFragmentFragmentDoc = gql` + fragment ShopSettingsUpdateErrorFragment on ShopError { + code + field + message +} + `; +export const ShopFetchTaxRatesErrorFragmentFragmentDoc = gql` + fragment ShopFetchTaxRatesErrorFragment on ShopError { + code + field + message +} + `; +export const ProductTranslateErrorFragmentFragmentDoc = gql` + fragment ProductTranslateErrorFragment on TranslationError { + code + field + message +} + `; +export const ProductVariantTranslateErrorFragmentFragmentDoc = gql` + fragment ProductVariantTranslateErrorFragment on TranslationError { + code + field + message +} + `; +export const CategoryTranslateErrorFragmentFragmentDoc = gql` + fragment CategoryTranslateErrorFragment on TranslationError { + code + field + message +} + `; +export const CollectionTranslateErrorFragmentFragmentDoc = gql` + fragment CollectionTranslateErrorFragment on TranslationError { + code + field + message +} + `; +export const PageTranslateErrorFragmentFragmentDoc = gql` + fragment PageTranslateErrorFragment on TranslationError { + code + field + message +} + `; +export const VoucherTranslateErrorFragmentFragmentDoc = gql` + fragment VoucherTranslateErrorFragment on TranslationError { + code + field + message +} + `; +export const SaleTranslateErrorFragmentFragmentDoc = gql` + fragment SaleTranslateErrorFragment on TranslationError { + code + field + message +} + `; +export const AttributeTranslateErrorFragmentFragmentDoc = gql` + fragment AttributeTranslateErrorFragment on TranslationError { + code + field + message +} + `; +export const AttributeValueTranslateErrorFragmentFragmentDoc = gql` + fragment AttributeValueTranslateErrorFragment on TranslationError { + code + field + message +} + `; +export const ShippingPriceTranslateErrorFragmentFragmentDoc = gql` + fragment ShippingPriceTranslateErrorFragment on TranslationError { + code + field + message +} + `; +export const GiftCardsSettingsFragmentDoc = gql` + fragment GiftCardsSettings on GiftCardSettings { + expiryType + expiryPeriod { + type + amount + } +} + `; +export const UserBaseFragmentDoc = gql` + fragment UserBase on User { + id + firstName + lastName +} + `; +export const MoneyFragmentDoc = gql` + fragment Money on Money { + amount + currency +} + `; +export const GiftCardEventFragmentDoc = gql` + fragment GiftCardEvent on GiftCardEvent { + expiryDate + oldExpiryDate + id + date + type + user { + ...UserBase + email + } + app { + id + name + } + message + email + orderId + orderNumber + tags + oldTags + balance { + initialBalance { + ...Money + } + currentBalance { + ...Money + } + oldInitialBalance { + ...Money + } + oldCurrentBalance { + ...Money + } + } +} + ${UserBaseFragmentDoc} +${MoneyFragmentDoc}`; +export const GiftCardDataFragmentDoc = gql` + fragment GiftCardData on GiftCard { + ...Metadata + last4CodeChars + boughtInChannel + createdBy { + ...UserBase + } + product { + id + name + } + createdBy { + ...UserBase + } + usedBy { + ...UserBase + } + usedByEmail + createdByEmail + app { + id + name + } + created + expiryDate + lastUsedOn + isActive + initialBalance { + ...Money + } + currentBalance { + ...Money + } + id + tags { + name + } +} + ${MetadataFragmentDoc} +${UserBaseFragmentDoc} +${MoneyFragmentDoc}`; +export const CustomerGiftCardFragmentDoc = gql` + fragment CustomerGiftCard on GiftCard { + id + last4CodeChars + expiryDate + isActive + currentBalance { + ...Money + } +} + ${MoneyFragmentDoc}`; +export const MenuFragmentDoc = gql` + fragment Menu on Menu { + id + name + items { + id + } +} + `; +export const MenuItemFragmentDoc = gql` + fragment MenuItem on MenuItem { + category { + id + name + } + collection { + id + name + } + id + level + name + page { + id + title + } + url +} + `; +export const MenuItemNestedFragmentDoc = gql` + fragment MenuItemNested on MenuItem { + ...MenuItem + children { + ...MenuItem + children { + ...MenuItem + children { + ...MenuItem + children { + ...MenuItem + children { + ...MenuItem + children { + ...MenuItem + } + } + } + } + } + } +} + ${MenuItemFragmentDoc}`; +export const MenuDetailsFragmentDoc = gql` + fragment MenuDetails on Menu { + id + items { + ...MenuItemNested + } + name +} + ${MenuItemNestedFragmentDoc}`; +export const RefundOrderLineFragmentDoc = gql` + fragment RefundOrderLine on OrderLine { + id + productName + quantity + unitPrice { + gross { + ...Money + } + } + thumbnail(size: 64) { + url + } +} + ${MoneyFragmentDoc}`; +export const OrderEventFragmentDoc = gql` + fragment OrderEvent on OrderEvent { + id + amount + shippingCostsIncluded + date + email + emailType + invoiceNumber + discount { + valueType + value + reason + amount { + amount + currency + } + oldValueType + oldValue + oldAmount { + amount + currency + } + } + relatedOrder { + id + number + } + message + quantity + transactionReference + type + user { + id + email + firstName + lastName + } + app { + id + name + appUrl + } + lines { + quantity + itemName + discount { + valueType + value + reason + amount { + amount + currency + } + oldValueType + oldValue + oldAmount { + amount + currency + } + } + orderLine { + id + productName + variantName + } + } +} + `; +export const OrderLineFragmentDoc = gql` + fragment OrderLine on OrderLine { + id + isShippingRequired + variant { + id + quantityAvailable + preorder { + endDate + } + } + productName + productSku + quantity + quantityFulfilled + quantityToFulfill + unitDiscount { + amount + currency + } + unitDiscountValue + unitDiscountReason + unitDiscountType + undiscountedUnitPrice { + currency + gross { + amount + currency + } + net { + amount + currency + } + } + unitPrice { + gross { + amount + currency + } + net { + amount + currency + } + } + thumbnail { + url + } +} + `; +export const FulfillmentFragmentDoc = gql` + fragment Fulfillment on Fulfillment { + id + lines { + id + quantity + orderLine { + ...OrderLine + } + } + fulfillmentOrder + status + trackingNumber + warehouse { + id + name + } +} + ${OrderLineFragmentDoc}`; +export const InvoiceFragmentDoc = gql` + fragment Invoice on Invoice { + id + number + createdAt + url + status +} + `; +export const OrderDetailsFragmentDoc = gql` + fragment OrderDetails on Order { + id + token + ...Metadata + billingAddress { + ...Address + } + giftCards { + events { + id + type + orderId + balance { + initialBalance { + ...Money + } + currentBalance { + ...Money + } + oldInitialBalance { + ...Money + } + oldCurrentBalance { + ...Money + } + } + } + } + isShippingRequired + canFinalize + created + customerNote + discounts { + id + type + calculationMode: valueType + value + reason + amount { + ...Money + } + } + events { + ...OrderEvent + } + fulfillments { + ...Fulfillment + } + lines { + ...OrderLine + } + number + isPaid + paymentStatus + shippingAddress { + ...Address + } + deliveryMethod { + __typename + ... on ShippingMethod { + id + } + ... on Warehouse { + id + clickAndCollectOption + } + } + shippingMethod { + id + } + shippingMethodName + collectionPointName + shippingPrice { + gross { + amount + currency + } + } + status + subtotal { + gross { + ...Money + } + net { + ...Money + } + } + total { + gross { + ...Money + } + net { + ...Money + } + tax { + ...Money + } + } + actions + totalAuthorized { + ...Money + } + totalCaptured { + ...Money + } + undiscountedTotal { + net { + ...Money + } + gross { + ...Money + } + } + user { + id + email + } + userEmail + shippingMethods { + id + name + price { + ...Money + } + active + message + } + invoices { + ...Invoice + } + channel { + isActive + id + name + currencyCode + slug + defaultCountry { + code + } + } + isPaid +} + ${MetadataFragmentDoc} +${AddressFragmentDoc} +${MoneyFragmentDoc} +${OrderEventFragmentDoc} +${FulfillmentFragmentDoc} +${OrderLineFragmentDoc} +${InvoiceFragmentDoc}`; +export const OrderSettingsFragmentDoc = gql` + fragment OrderSettings on OrderSettings { + automaticallyConfirmAllNewOrders + automaticallyFulfillNonShippableGiftCard +} + `; +export const ShopOrderSettingsFragmentDoc = gql` + fragment ShopOrderSettings on Shop { + fulfillmentAutoApprove + fulfillmentAllowUnpaid +} + `; +export const PageTypeFragmentDoc = gql` + fragment PageType on PageType { + id + name + hasPages +} + `; +export const PageTypeDetailsFragmentDoc = gql` + fragment PageTypeDetails on PageType { + ...PageType + ...Metadata + attributes { + ...Attribute + } +} + ${PageTypeFragmentDoc} +${MetadataFragmentDoc} +${AttributeFragmentDoc}`; +export const PageFragmentDoc = gql` + fragment Page on Page { + id + title + slug + isPublished +} + `; +export const FileFragmentDoc = gql` + fragment File on File { + url + contentType +} + `; +export const AttributeValueFragmentDoc = gql` + fragment AttributeValue on AttributeValue { + id + name + slug + file { + ...File + } + reference + boolean + date + dateTime + value +} + ${FileFragmentDoc}`; +export const AttributeValueDetailsFragmentDoc = gql` + fragment AttributeValueDetails on AttributeValue { + ...AttributeValue + richText +} + ${AttributeValueFragmentDoc}`; +export const AttributeValueListFragmentDoc = gql` + fragment AttributeValueList on AttributeValueCountableConnection { + pageInfo { + ...PageInfo + } + edges { + cursor + node { + ...AttributeValueDetails + } + } +} + ${PageInfoFragmentDoc} +${AttributeValueDetailsFragmentDoc}`; +export const PageSelectedAttributeFragmentDoc = gql` + fragment PageSelectedAttribute on SelectedAttribute { + attribute { + id + slug + name + inputType + entityType + valueRequired + unit + choices( + first: $firstValues + after: $afterValues + last: $lastValues + before: $beforeValues + ) { + ...AttributeValueList + } + } + values { + ...AttributeValueDetails + } +} + ${AttributeValueListFragmentDoc} +${AttributeValueDetailsFragmentDoc}`; +export const PageAttributesFragmentDoc = gql` + fragment PageAttributes on Page { + attributes { + ...PageSelectedAttribute + } + pageType { + id + name + attributes { + id + name + inputType + entityType + valueRequired + choices( + first: $firstValues + after: $afterValues + last: $lastValues + before: $beforeValues + ) { + ...AttributeValueList + } + } + } +} + ${PageSelectedAttributeFragmentDoc} +${AttributeValueListFragmentDoc}`; +export const PageDetailsFragmentDoc = gql` + fragment PageDetails on Page { + ...Page + ...PageAttributes + ...Metadata + content + seoTitle + seoDescription + publicationDate +} + ${PageFragmentDoc} +${PageAttributesFragmentDoc} +${MetadataFragmentDoc}`; +export const PermissionGroupFragmentDoc = gql` + fragment PermissionGroup on Group { + id + name + userCanManage + users { + id + firstName + lastName + } +} + `; +export const PermissionFragmentDoc = gql` + fragment Permission on Permission { + code + name +} + `; +export const StaffMemberFragmentDoc = gql` + fragment StaffMember on User { + id + email + firstName + isActive + lastName +} + `; +export const PermissionGroupMemberFragmentDoc = gql` + fragment PermissionGroupMember on User { + ...StaffMember + avatar(size: 48) { + url + } +} + ${StaffMemberFragmentDoc}`; +export const PermissionGroupDetailsFragmentDoc = gql` + fragment PermissionGroupDetails on Group { + ...PermissionGroup + permissions { + ...Permission + } + users { + ...PermissionGroupMember + } +} + ${PermissionGroupFragmentDoc} +${PermissionFragmentDoc} +${PermissionGroupMemberFragmentDoc}`; +export const PluginConfigurationBaseFragmentDoc = gql` + fragment PluginConfigurationBase on PluginConfiguration { + active + channel { + id + name + slug + } +} + `; +export const PluginBaseFragmentDoc = gql` + fragment PluginBase on Plugin { + id + name + description + channelConfigurations { + ...PluginConfigurationBase + } + globalConfiguration { + ...PluginConfigurationBase + } +} + ${PluginConfigurationBaseFragmentDoc}`; +export const ConfigurationItemFragmentDoc = gql` + fragment ConfigurationItem on ConfigurationItem { + name + value + type + helpText + label +} + `; +export const PluginConfigurationExtendedFragmentDoc = gql` + fragment PluginConfigurationExtended on PluginConfiguration { + ...PluginConfigurationBase + configuration { + ...ConfigurationItem + } +} + ${PluginConfigurationBaseFragmentDoc} +${ConfigurationItemFragmentDoc}`; +export const PluginsDetailsFragmentDoc = gql` + fragment PluginsDetails on Plugin { + id + name + description + globalConfiguration { + ...PluginConfigurationExtended + } + channelConfigurations { + ...PluginConfigurationExtended + } +} + ${PluginConfigurationExtendedFragmentDoc}`; +export const ProductTypeFragmentDoc = gql` + fragment ProductType on ProductType { + id + name + kind + hasVariants + isShippingRequired + taxType { + description + taxCode + } +} + `; +export const ProductTypeDetailsFragmentDoc = gql` + fragment ProductTypeDetails on ProductType { + ...ProductType + ...Metadata + productAttributes { + ...Attribute + } + variantAttributes { + ...Attribute + } + assignedVariantAttributes { + attribute { + ...Attribute + } + variantSelection + } + weight { + unit + value + } +} + ${ProductTypeFragmentDoc} +${MetadataFragmentDoc} +${AttributeFragmentDoc}`; +export const PriceRangeFragmentDoc = gql` + fragment PriceRange on TaxedMoneyRange { + start { + net { + ...Money + } + } + stop { + net { + ...Money + } + } +} + ${MoneyFragmentDoc}`; +export const ChannelListingProductFragmentDoc = gql` + fragment ChannelListingProduct on ProductChannelListing { + ...ChannelListingProductWithoutPricing + pricing { + priceRange { + ...PriceRange + } + } +} + ${ChannelListingProductWithoutPricingFragmentDoc} +${PriceRangeFragmentDoc}`; +export const ProductWithChannelListingsFragmentDoc = gql` + fragment ProductWithChannelListings on Product { + id + name + thumbnail { + url + } + productType { + id + name + hasVariants + } + channelListings { + ...ChannelListingProductWithoutPricing + pricing @include(if: $hasChannel) { + priceRange { + ...PriceRange + } + } + } +} + ${ChannelListingProductWithoutPricingFragmentDoc} +${PriceRangeFragmentDoc}`; +export const ProductVariantAttributesFragmentDoc = gql` + fragment ProductVariantAttributes on Product { + id + attributes { + attribute { + id + slug + name + inputType + entityType + valueRequired + unit + choices( + first: $firstValues + after: $afterValues + last: $lastValues + before: $beforeValues + ) { + ...AttributeValueList + } + } + values { + ...AttributeValueDetails + } + } + productType { + id + variantAttributes(variantSelection: VARIANT_SELECTION) { + id + name + inputType + valueRequired + unit + choices( + first: $firstValues + after: $afterValues + last: $lastValues + before: $beforeValues + ) { + ...AttributeValueList + } + } + } + channelListings { + channel { + id + name + currencyCode + } + } +} + ${AttributeValueListFragmentDoc} +${AttributeValueDetailsFragmentDoc}`; +export const ProductMediaFragmentDoc = gql` + fragment ProductMedia on ProductMedia { + id + alt + sortOrder + url + type + oembedData +} + `; +export const StockFragmentDoc = gql` + fragment Stock on Stock { + id + quantity + quantityAllocated + warehouse { + id + name + } +} + `; +export const PreorderFragmentDoc = gql` + fragment Preorder on PreorderData { + globalThreshold + globalSoldUnits + endDate +} + `; +export const ChannelListingProductVariantFragmentDoc = gql` + fragment ChannelListingProductVariant on ProductVariantChannelListing { + channel { + id + name + currencyCode + } + price { + ...Money + } + costPrice { + ...Money + } + preorderThreshold { + quantity + soldUnits + } +} + ${MoneyFragmentDoc}`; +export const ProductDetailsVariantFragmentDoc = gql` + fragment ProductDetailsVariant on ProductVariant { + id + sku + name + margin + media { + url(size: 200) + } + stocks { + ...Stock + } + trackInventory + preorder { + ...Preorder + } + channelListings { + ...ChannelListingProductVariant + } + quantityLimitPerCustomer +} + ${StockFragmentDoc} +${PreorderFragmentDoc} +${ChannelListingProductVariantFragmentDoc}`; +export const TaxTypeFragmentDoc = gql` + fragment TaxType on TaxType { + description + taxCode +} + `; +export const WeightFragmentDoc = gql` + fragment Weight on Weight { + unit + value +} + `; +export const ProductFragmentDoc = gql` + fragment Product on Product { + ...ProductVariantAttributes + ...Metadata + name + slug + description + seoTitle + seoDescription + rating + defaultVariant { + id + } + category { + id + name + } + collections { + id + name + } + chargeTaxes + channelListings { + ...ChannelListingProductWithoutPricing + } + media { + ...ProductMedia + } + isAvailable + variants { + ...ProductDetailsVariant + } + productType { + id + name + hasVariants + taxType { + ...TaxType + } + } + weight { + ...Weight + } + taxType { + ...TaxType + } +} + ${ProductVariantAttributesFragmentDoc} +${MetadataFragmentDoc} +${ChannelListingProductWithoutPricingFragmentDoc} +${ProductMediaFragmentDoc} +${ProductDetailsVariantFragmentDoc} +${TaxTypeFragmentDoc} +${WeightFragmentDoc}`; +export const VariantAttributeFragmentDoc = gql` + fragment VariantAttribute on Attribute { + id + name + slug + inputType + entityType + valueRequired + unit + choices( + first: $firstValues + after: $afterValues + last: $lastValues + before: $beforeValues + ) { + ...AttributeValueList + } +} + ${AttributeValueListFragmentDoc}`; +export const SelectedVariantAttributeFragmentDoc = gql` + fragment SelectedVariantAttribute on SelectedAttribute { + attribute { + ...VariantAttribute + } + values { + ...AttributeValueDetails + } +} + ${VariantAttributeFragmentDoc} +${AttributeValueDetailsFragmentDoc}`; +export const ProductVariantFragmentDoc = gql` + fragment ProductVariant on ProductVariant { + id + ...Metadata + selectionAttributes: attributes(variantSelection: VARIANT_SELECTION) { + ...SelectedVariantAttribute + } + nonSelectionAttributes: attributes(variantSelection: NOT_VARIANT_SELECTION) { + ...SelectedVariantAttribute + } + media { + id + url + type + oembedData + } + name + product { + id + defaultVariant { + id + } + media { + ...ProductMedia + } + name + thumbnail { + url + } + channelListings { + publicationDate + isPublished + channel { + id + name + currencyCode + } + } + variants { + id + name + sku + media { + id + url + type + oembedData + } + } + defaultVariant { + id + } + } + channelListings { + ...ChannelListingProductVariant + } + sku + stocks { + ...Stock + } + trackInventory + preorder { + ...Preorder + } + weight { + ...Weight + } + quantityLimitPerCustomer +} + ${MetadataFragmentDoc} +${SelectedVariantAttributeFragmentDoc} +${ProductMediaFragmentDoc} +${ChannelListingProductVariantFragmentDoc} +${StockFragmentDoc} +${PreorderFragmentDoc} +${WeightFragmentDoc}`; +export const ExportFileFragmentDoc = gql` + fragment ExportFile on ExportFile { + id + status + url +} + `; +export const ShippingMethodWithPostalCodesFragmentDoc = gql` + fragment ShippingMethodWithPostalCodes on ShippingMethodType { + id + postalCodeRules { + id + inclusionType + start + end + } +} + `; +export const ShippingMethodTypeFragmentDoc = gql` + fragment ShippingMethodType on ShippingMethodType { + ...ShippingMethodWithPostalCodes + ...Metadata + minimumOrderWeight { + unit + value + } + maximumOrderWeight { + unit + value + } + minimumDeliveryDays + maximumDeliveryDays + name + description + type + channelListings { + id + channel { + id + name + currencyCode + } + price { + ...Money + } + minimumOrderPrice { + ...Money + } + maximumOrderPrice { + ...Money + } + } +} + ${ShippingMethodWithPostalCodesFragmentDoc} +${MetadataFragmentDoc} +${MoneyFragmentDoc}`; +export const ShippingMethodWithExcludedProductsFragmentDoc = gql` + fragment ShippingMethodWithExcludedProducts on ShippingMethodType { + ...ShippingMethodType + excludedProducts(before: $before, after: $after, first: $first, last: $last) { + pageInfo { + hasNextPage + hasPreviousPage + endCursor + startCursor + } + edges { + node { + id + name + thumbnail { + url + } + } + } + } +} + ${ShippingMethodTypeFragmentDoc}`; +export const ShippingZoneFragmentDoc = gql` + fragment ShippingZone on ShippingZone { + ...Metadata + id + countries { + code + country + } + name + description +} + ${MetadataFragmentDoc}`; +export const ShippingZoneDetailsFragmentDoc = gql` + fragment ShippingZoneDetails on ShippingZone { + ...ShippingZone + shippingMethods { + ...ShippingMethodType + } + warehouses { + id + name + } +} + ${ShippingZoneFragmentDoc} +${ShippingMethodTypeFragmentDoc}`; +export const CountryWithCodeFragmentDoc = gql` + fragment CountryWithCode on CountryDisplay { + country + code +} + `; +export const LanguageFragmentDoc = gql` + fragment Language on LanguageDisplay { + code + language +} + `; +export const LimitInfoFragmentDoc = gql` + fragment LimitInfo on Limits { + channels @include(if: $channels) + orders @include(if: $orders) + productVariants @include(if: $productVariants) + staffUsers @include(if: $staffUsers) + warehouses @include(if: $warehouses) +} + `; +export const ShopLimitFragmentDoc = gql` + fragment ShopLimit on Shop { + limits { + currentUsage { + ...LimitInfo + } + allowedUsage { + ...LimitInfo + } + } +} + ${LimitInfoFragmentDoc}`; +export const ShopFragmentDoc = gql` + fragment Shop on Shop { + companyAddress { + ...Address + } + countries { + code + country + } + customerSetPasswordUrl + defaultMailSenderAddress + defaultMailSenderName + description + domain { + host + } + name + reserveStockDurationAnonymousUser + reserveStockDurationAuthenticatedUser + limitQuantityPerCheckout +} + ${AddressFragmentDoc}`; +export const StaffMemberDetailsFragmentDoc = gql` + fragment StaffMemberDetails on User { + ...StaffMember + permissionGroups { + id + name + userCanManage + } + userPermissions { + code + name + } + avatar(size: 120) { + url + } +} + ${StaffMemberFragmentDoc}`; +export const TaxedMoneyFragmentDoc = gql` + fragment TaxedMoney on TaxedMoney { + net { + ...Money + } + gross { + ...Money + } +} + ${MoneyFragmentDoc}`; +export const CountryFragmentDoc = gql` + fragment Country on CountryDisplay { + country + code +} + `; +export const CountryWithTaxesFragmentDoc = gql` + fragment CountryWithTaxes on CountryDisplay { + ...Country + vat { + standardRate + reducedRates { + rateType + rate + } + } +} + ${CountryFragmentDoc}`; +export const ShopTaxesFragmentDoc = gql` + fragment ShopTaxes on Shop { + chargeTaxesOnShipping + includeTaxesInPrices + displayGrossPrices +} + `; +export const TimePeriodFragmentDoc = gql` + fragment TimePeriod on TimePeriod { + amount + type +} + `; +export const CategoryTranslationFragmentDoc = gql` + fragment CategoryTranslation on CategoryTranslatableContent { + translation(languageCode: $language) { + id + description + language { + language + } + name + seoDescription + seoTitle + } + category { + id + name + description + seoDescription + seoTitle + } +} + `; +export const CollectionTranslationFragmentDoc = gql` + fragment CollectionTranslation on CollectionTranslatableContent { + collection { + id + name + description + seoDescription + seoTitle + } + translation(languageCode: $language) { + id + description + language { + language + } + name + seoDescription + seoTitle + } +} + `; +export const ProductTranslationFragmentDoc = gql` + fragment ProductTranslation on ProductTranslatableContent { + product { + id + name + description + seoDescription + seoTitle + } + translation(languageCode: $language) { + id + seoTitle + seoDescription + name + description + language { + code + language + } + } + attributeValues { + id + name + richText + attributeValue { + id + } + translation(languageCode: $language) { + id + name + richText + language { + code + language + } + } + } +} + `; +export const ProductVariantTranslationFragmentDoc = gql` + fragment ProductVariantTranslation on ProductVariantTranslatableContent { + productVariant { + id + } + name + translation(languageCode: $language) { + id + name + language { + code + language + } + } + attributeValues { + id + name + richText + attributeValue { + id + } + translation(languageCode: $language) { + id + name + richText + language { + code + language + } + } + } +} + `; +export const SaleTranslationFragmentDoc = gql` + fragment SaleTranslation on SaleTranslatableContent { + sale { + id + name + } + translation(languageCode: $language) { + id + language { + code + language + } + name + } +} + `; +export const VoucherTranslationFragmentDoc = gql` + fragment VoucherTranslation on VoucherTranslatableContent { + name + voucher { + id + name + } + translation(languageCode: $language) { + id + language { + code + language + } + name + } +} + `; +export const ShippingMethodTranslationFragmentDoc = gql` + fragment ShippingMethodTranslation on ShippingMethodTranslatableContent { + id + name + description + shippingMethod { + id + } + translation(languageCode: $language) { + id + language { + code + language + } + name + description + } +} + `; +export const PageTranslationFragmentDoc = gql` + fragment PageTranslation on PageTranslatableContent { + page { + id + content + seoDescription + seoTitle + title + } + translation(languageCode: $language) { + id + content + seoDescription + seoTitle + title + language { + code + language + } + } + attributeValues { + id + name + richText + attributeValue { + id + } + translation(languageCode: $language) { + id + name + richText + language { + code + language + } + } + } +} + `; +export const PageTranslatableFragmentDoc = gql` + fragment PageTranslatable on PageTranslatableContent { + id + content + seoDescription + seoTitle + title + translation(languageCode: $language) { + id + content + seoDescription + seoTitle + title + language { + code + language + } + } +} + `; +export const AttributeTranslationFragmentDoc = gql` + fragment AttributeTranslation on AttributeTranslatableContent { + id + name + translation(languageCode: $language) { + id + name + } + attribute { + id + name + inputType + } +} + `; +export const AttributeChoicesTranslationFragmentDoc = gql` + fragment AttributeChoicesTranslation on AttributeValueCountableConnection { + pageInfo { + ...PageInfo + } + edges { + cursor + node { + id + name + richText + inputType + translation(languageCode: $language) { + id + name + richText + } + } + } +} + ${PageInfoFragmentDoc}`; +export const AttributeTranslationDetailsFragmentDoc = gql` + fragment AttributeTranslationDetails on AttributeTranslatableContent { + translation(languageCode: $language) { + id + name + } + attribute { + id + name + inputType + withChoices + choices( + first: $firstValues + after: $afterValues + last: $lastValues + before: $beforeValues + ) { + ...AttributeChoicesTranslation + } + } +} + ${AttributeChoicesTranslationFragmentDoc}`; +export const AttributeValueTranslatableContentFragmentDoc = gql` + fragment AttributeValueTranslatableContent on AttributeTranslatableContent { + translation(languageCode: $language) { + id + name + } + attribute { + id + name + inputType + choices( + first: $firstValues + after: $afterValues + last: $lastValues + before: $beforeValues + ) { + ...AttributeChoicesTranslation + } + } +} + ${AttributeChoicesTranslationFragmentDoc}`; +export const WarehouseFragmentDoc = gql` + fragment Warehouse on Warehouse { + id + name +} + `; +export const WarehouseWithShippingFragmentDoc = gql` + fragment WarehouseWithShipping on Warehouse { + ...Warehouse + shippingZones(first: 100) { + edges { + node { + id + name + } + } + } +} + ${WarehouseFragmentDoc}`; +export const WarehouseDetailsFragmentDoc = gql` + fragment WarehouseDetails on Warehouse { + isPrivate + clickAndCollectOption + ...WarehouseWithShipping + address { + ...Address + } +} + ${WarehouseWithShippingFragmentDoc} +${AddressFragmentDoc}`; +export const WebhooksDetailsFragmentDoc = gql` + fragment WebhooksDetails on Webhook { + ...Webhook +} + ${WebhookFragmentDoc}`; +export const AppCreateDocument = gql` + mutation AppCreate($input: AppInput!) { + appCreate(input: $input) { + authToken + app { + ...App + } + errors { + ...AppError + } + } +} + ${AppFragmentDoc} +${AppErrorFragmentDoc}`; +export type AppCreateMutationFn = Apollo.MutationFunction; + +/** + * __useAppCreateMutation__ + * + * To run a mutation, you first call `useAppCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAppCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [appCreateMutation, { data, loading, error }] = useAppCreateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useAppCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AppCreateDocument, options); + } +export type AppCreateMutationHookResult = ReturnType; +export type AppCreateMutationResult = Apollo.MutationResult; +export type AppCreateMutationOptions = Apollo.BaseMutationOptions; +export const AppDeleteDocument = gql` + mutation AppDelete($id: ID!) { + appDelete(id: $id) { + app { + ...App + } + errors { + ...AppError + } + } +} + ${AppFragmentDoc} +${AppErrorFragmentDoc}`; +export type AppDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useAppDeleteMutation__ + * + * To run a mutation, you first call `useAppDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAppDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [appDeleteMutation, { data, loading, error }] = useAppDeleteMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useAppDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AppDeleteDocument, options); + } +export type AppDeleteMutationHookResult = ReturnType; +export type AppDeleteMutationResult = Apollo.MutationResult; +export type AppDeleteMutationOptions = Apollo.BaseMutationOptions; +export const AppDeleteFailedInstallationDocument = gql` + mutation AppDeleteFailedInstallation($id: ID!) { + appDeleteFailedInstallation(id: $id) { + appInstallation { + id + status + appName + message + } + errors { + ...AppError + } + } +} + ${AppErrorFragmentDoc}`; +export type AppDeleteFailedInstallationMutationFn = Apollo.MutationFunction; + +/** + * __useAppDeleteFailedInstallationMutation__ + * + * To run a mutation, you first call `useAppDeleteFailedInstallationMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAppDeleteFailedInstallationMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [appDeleteFailedInstallationMutation, { data, loading, error }] = useAppDeleteFailedInstallationMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useAppDeleteFailedInstallationMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AppDeleteFailedInstallationDocument, options); + } +export type AppDeleteFailedInstallationMutationHookResult = ReturnType; +export type AppDeleteFailedInstallationMutationResult = Apollo.MutationResult; +export type AppDeleteFailedInstallationMutationOptions = Apollo.BaseMutationOptions; +export const AppFetchDocument = gql` + mutation AppFetch($manifestUrl: String!) { + appFetchManifest(manifestUrl: $manifestUrl) { + manifest { + identifier + version + about + name + appUrl + configurationUrl + tokenTargetUrl + dataPrivacy + dataPrivacyUrl + homepageUrl + supportUrl + permissions { + code + name + } + } + errors { + ...AppError + } + } +} + ${AppErrorFragmentDoc}`; +export type AppFetchMutationFn = Apollo.MutationFunction; + +/** + * __useAppFetchMutation__ + * + * To run a mutation, you first call `useAppFetchMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAppFetchMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [appFetchMutation, { data, loading, error }] = useAppFetchMutation({ + * variables: { + * manifestUrl: // value for 'manifestUrl' + * }, + * }); + */ +export function useAppFetchMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AppFetchDocument, options); + } +export type AppFetchMutationHookResult = ReturnType; +export type AppFetchMutationResult = Apollo.MutationResult; +export type AppFetchMutationOptions = Apollo.BaseMutationOptions; +export const AppInstallDocument = gql` + mutation AppInstall($input: AppInstallInput!) { + appInstall(input: $input) { + appInstallation { + id + status + appName + manifestUrl + } + errors { + ...AppError + } + } +} + ${AppErrorFragmentDoc}`; +export type AppInstallMutationFn = Apollo.MutationFunction; + +/** + * __useAppInstallMutation__ + * + * To run a mutation, you first call `useAppInstallMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAppInstallMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [appInstallMutation, { data, loading, error }] = useAppInstallMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useAppInstallMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AppInstallDocument, options); + } +export type AppInstallMutationHookResult = ReturnType; +export type AppInstallMutationResult = Apollo.MutationResult; +export type AppInstallMutationOptions = Apollo.BaseMutationOptions; +export const AppRetryInstallDocument = gql` + mutation AppRetryInstall($id: ID!) { + appRetryInstall(id: $id) { + appInstallation { + id + status + appName + manifestUrl + } + errors { + ...AppError + } + } +} + ${AppErrorFragmentDoc}`; +export type AppRetryInstallMutationFn = Apollo.MutationFunction; + +/** + * __useAppRetryInstallMutation__ + * + * To run a mutation, you first call `useAppRetryInstallMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAppRetryInstallMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [appRetryInstallMutation, { data, loading, error }] = useAppRetryInstallMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useAppRetryInstallMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AppRetryInstallDocument, options); + } +export type AppRetryInstallMutationHookResult = ReturnType; +export type AppRetryInstallMutationResult = Apollo.MutationResult; +export type AppRetryInstallMutationOptions = Apollo.BaseMutationOptions; +export const AppUpdateDocument = gql` + mutation AppUpdate($id: ID!, $input: AppInput!) { + appUpdate(id: $id, input: $input) { + app { + ...App + permissions { + code + name + } + } + errors { + ...AppError + message + permissions + } + } +} + ${AppFragmentDoc} +${AppErrorFragmentDoc}`; +export type AppUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useAppUpdateMutation__ + * + * To run a mutation, you first call `useAppUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAppUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [appUpdateMutation, { data, loading, error }] = useAppUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useAppUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AppUpdateDocument, options); + } +export type AppUpdateMutationHookResult = ReturnType; +export type AppUpdateMutationResult = Apollo.MutationResult; +export type AppUpdateMutationOptions = Apollo.BaseMutationOptions; +export const AppTokenCreateDocument = gql` + mutation AppTokenCreate($input: AppTokenInput!) { + appTokenCreate(input: $input) { + appToken { + name + authToken + id + } + authToken + errors { + ...AppError + } + } +} + ${AppErrorFragmentDoc}`; +export type AppTokenCreateMutationFn = Apollo.MutationFunction; + +/** + * __useAppTokenCreateMutation__ + * + * To run a mutation, you first call `useAppTokenCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAppTokenCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [appTokenCreateMutation, { data, loading, error }] = useAppTokenCreateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useAppTokenCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AppTokenCreateDocument, options); + } +export type AppTokenCreateMutationHookResult = ReturnType; +export type AppTokenCreateMutationResult = Apollo.MutationResult; +export type AppTokenCreateMutationOptions = Apollo.BaseMutationOptions; +export const AppTokenDeleteDocument = gql` + mutation AppTokenDelete($id: ID!) { + appTokenDelete(id: $id) { + appToken { + name + authToken + id + } + errors { + ...AppError + } + } +} + ${AppErrorFragmentDoc}`; +export type AppTokenDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useAppTokenDeleteMutation__ + * + * To run a mutation, you first call `useAppTokenDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAppTokenDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [appTokenDeleteMutation, { data, loading, error }] = useAppTokenDeleteMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useAppTokenDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AppTokenDeleteDocument, options); + } +export type AppTokenDeleteMutationHookResult = ReturnType; +export type AppTokenDeleteMutationResult = Apollo.MutationResult; +export type AppTokenDeleteMutationOptions = Apollo.BaseMutationOptions; +export const AppActivateDocument = gql` + mutation AppActivate($id: ID!) { + appActivate(id: $id) { + errors { + ...AppError + } + } +} + ${AppErrorFragmentDoc}`; +export type AppActivateMutationFn = Apollo.MutationFunction; + +/** + * __useAppActivateMutation__ + * + * To run a mutation, you first call `useAppActivateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAppActivateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [appActivateMutation, { data, loading, error }] = useAppActivateMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useAppActivateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AppActivateDocument, options); + } +export type AppActivateMutationHookResult = ReturnType; +export type AppActivateMutationResult = Apollo.MutationResult; +export type AppActivateMutationOptions = Apollo.BaseMutationOptions; +export const AppDeactivateDocument = gql` + mutation AppDeactivate($id: ID!) { + appDeactivate(id: $id) { + errors { + ...AppError + } + } +} + ${AppErrorFragmentDoc}`; +export type AppDeactivateMutationFn = Apollo.MutationFunction; + +/** + * __useAppDeactivateMutation__ + * + * To run a mutation, you first call `useAppDeactivateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAppDeactivateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [appDeactivateMutation, { data, loading, error }] = useAppDeactivateMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useAppDeactivateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AppDeactivateDocument, options); + } +export type AppDeactivateMutationHookResult = ReturnType; +export type AppDeactivateMutationResult = Apollo.MutationResult; +export type AppDeactivateMutationOptions = Apollo.BaseMutationOptions; +export const AppsListDocument = gql` + query AppsList($before: String, $after: String, $first: Int, $last: Int, $sort: AppSortingInput, $filter: AppFilterInput) { + apps( + before: $before + after: $after + first: $first + last: $last + sortBy: $sort + filter: $filter + ) { + pageInfo { + hasNextPage + hasPreviousPage + startCursor + endCursor + } + totalCount + edges { + node { + id + name + isActive + type + } + } + } +} + `; + +/** + * __useAppsListQuery__ + * + * To run a query within a React component, call `useAppsListQuery` and pass it any options that fit your needs. + * When your component renders, `useAppsListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAppsListQuery({ + * variables: { + * before: // value for 'before' + * after: // value for 'after' + * first: // value for 'first' + * last: // value for 'last' + * sort: // value for 'sort' + * filter: // value for 'filter' + * }, + * }); + */ +export function useAppsListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(AppsListDocument, options); + } +export function useAppsListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(AppsListDocument, options); + } +export type AppsListQueryHookResult = ReturnType; +export type AppsListLazyQueryHookResult = ReturnType; +export type AppsListQueryResult = Apollo.QueryResult; +export const AppsInstallationsDocument = gql` + query AppsInstallations { + appsInstallations { + status + message + appName + manifestUrl + id + } +} + `; + +/** + * __useAppsInstallationsQuery__ + * + * To run a query within a React component, call `useAppsInstallationsQuery` and pass it any options that fit your needs. + * When your component renders, `useAppsInstallationsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAppsInstallationsQuery({ + * variables: { + * }, + * }); + */ +export function useAppsInstallationsQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(AppsInstallationsDocument, options); + } +export function useAppsInstallationsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(AppsInstallationsDocument, options); + } +export type AppsInstallationsQueryHookResult = ReturnType; +export type AppsInstallationsLazyQueryHookResult = ReturnType; +export type AppsInstallationsQueryResult = Apollo.QueryResult; +export const AppDocument = gql` + query App($id: ID!) { + app(id: $id) { + ...App + aboutApp + permissions { + code + name + } + dataPrivacy + dataPrivacyUrl + } +} + ${AppFragmentDoc}`; + +/** + * __useAppQuery__ + * + * To run a query within a React component, call `useAppQuery` and pass it any options that fit your needs. + * When your component renders, `useAppQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAppQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useAppQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(AppDocument, options); + } +export function useAppLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(AppDocument, options); + } +export type AppQueryHookResult = ReturnType; +export type AppLazyQueryHookResult = ReturnType; +export type AppQueryResult = Apollo.QueryResult; +export const ExtensionListDocument = gql` + query ExtensionList($filter: AppExtensionFilterInput!) { + appExtensions(filter: $filter, first: 100) { + edges { + node { + id + label + url + mount + target + accessToken + permissions { + code + } + app { + id + appUrl + } + } + } + } +} + `; + +/** + * __useExtensionListQuery__ + * + * To run a query within a React component, call `useExtensionListQuery` and pass it any options that fit your needs. + * When your component renders, `useExtensionListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useExtensionListQuery({ + * variables: { + * filter: // value for 'filter' + * }, + * }); + */ +export function useExtensionListQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ExtensionListDocument, options); + } +export function useExtensionListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ExtensionListDocument, options); + } +export type ExtensionListQueryHookResult = ReturnType; +export type ExtensionListLazyQueryHookResult = ReturnType; +export type ExtensionListQueryResult = Apollo.QueryResult; +export const AttributeBulkDeleteDocument = gql` + mutation AttributeBulkDelete($ids: [ID!]!) { + attributeBulkDelete(ids: $ids) { + errors { + ...AttributeError + } + } +} + ${AttributeErrorFragmentDoc}`; +export type AttributeBulkDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useAttributeBulkDeleteMutation__ + * + * To run a mutation, you first call `useAttributeBulkDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAttributeBulkDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [attributeBulkDeleteMutation, { data, loading, error }] = useAttributeBulkDeleteMutation({ + * variables: { + * ids: // value for 'ids' + * }, + * }); + */ +export function useAttributeBulkDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AttributeBulkDeleteDocument, options); + } +export type AttributeBulkDeleteMutationHookResult = ReturnType; +export type AttributeBulkDeleteMutationResult = Apollo.MutationResult; +export type AttributeBulkDeleteMutationOptions = Apollo.BaseMutationOptions; +export const AttributeDeleteDocument = gql` + mutation AttributeDelete($id: ID!) { + attributeDelete(id: $id) { + errors { + ...AttributeError + } + } +} + ${AttributeErrorFragmentDoc}`; +export type AttributeDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useAttributeDeleteMutation__ + * + * To run a mutation, you first call `useAttributeDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAttributeDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [attributeDeleteMutation, { data, loading, error }] = useAttributeDeleteMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useAttributeDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AttributeDeleteDocument, options); + } +export type AttributeDeleteMutationHookResult = ReturnType; +export type AttributeDeleteMutationResult = Apollo.MutationResult; +export type AttributeDeleteMutationOptions = Apollo.BaseMutationOptions; +export const AttributeUpdateDocument = gql` + mutation AttributeUpdate($id: ID!, $input: AttributeUpdateInput!) { + attributeUpdate(id: $id, input: $input) { + attribute { + ...AttributeDetails + } + errors { + ...AttributeError + } + } +} + ${AttributeDetailsFragmentDoc} +${AttributeErrorFragmentDoc}`; +export type AttributeUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useAttributeUpdateMutation__ + * + * To run a mutation, you first call `useAttributeUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAttributeUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [attributeUpdateMutation, { data, loading, error }] = useAttributeUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useAttributeUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AttributeUpdateDocument, options); + } +export type AttributeUpdateMutationHookResult = ReturnType; +export type AttributeUpdateMutationResult = Apollo.MutationResult; +export type AttributeUpdateMutationOptions = Apollo.BaseMutationOptions; +export const AttributeValueDeleteDocument = gql` + mutation AttributeValueDelete($id: ID!, $firstValues: Int, $afterValues: String, $lastValues: Int, $beforeValues: String) { + attributeValueDelete(id: $id) { + attribute { + id + choices( + first: $firstValues + after: $afterValues + last: $lastValues + before: $beforeValues + ) { + ...AttributeValueList + } + } + errors { + ...AttributeError + } + } +} + ${AttributeValueListFragmentDoc} +${AttributeErrorFragmentDoc}`; +export type AttributeValueDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useAttributeValueDeleteMutation__ + * + * To run a mutation, you first call `useAttributeValueDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAttributeValueDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [attributeValueDeleteMutation, { data, loading, error }] = useAttributeValueDeleteMutation({ + * variables: { + * id: // value for 'id' + * firstValues: // value for 'firstValues' + * afterValues: // value for 'afterValues' + * lastValues: // value for 'lastValues' + * beforeValues: // value for 'beforeValues' + * }, + * }); + */ +export function useAttributeValueDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AttributeValueDeleteDocument, options); + } +export type AttributeValueDeleteMutationHookResult = ReturnType; +export type AttributeValueDeleteMutationResult = Apollo.MutationResult; +export type AttributeValueDeleteMutationOptions = Apollo.BaseMutationOptions; +export const AttributeValueUpdateDocument = gql` + mutation AttributeValueUpdate($id: ID!, $input: AttributeValueUpdateInput!, $firstValues: Int, $afterValues: String, $lastValues: Int, $beforeValues: String) { + attributeValueUpdate(id: $id, input: $input) { + attribute { + id + choices( + first: $firstValues + after: $afterValues + last: $lastValues + before: $beforeValues + ) { + ...AttributeValueList + } + } + errors { + ...AttributeError + } + } +} + ${AttributeValueListFragmentDoc} +${AttributeErrorFragmentDoc}`; +export type AttributeValueUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useAttributeValueUpdateMutation__ + * + * To run a mutation, you first call `useAttributeValueUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAttributeValueUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [attributeValueUpdateMutation, { data, loading, error }] = useAttributeValueUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * firstValues: // value for 'firstValues' + * afterValues: // value for 'afterValues' + * lastValues: // value for 'lastValues' + * beforeValues: // value for 'beforeValues' + * }, + * }); + */ +export function useAttributeValueUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AttributeValueUpdateDocument, options); + } +export type AttributeValueUpdateMutationHookResult = ReturnType; +export type AttributeValueUpdateMutationResult = Apollo.MutationResult; +export type AttributeValueUpdateMutationOptions = Apollo.BaseMutationOptions; +export const AttributeValueCreateDocument = gql` + mutation AttributeValueCreate($id: ID!, $input: AttributeValueCreateInput!, $firstValues: Int, $afterValues: String, $lastValues: Int, $beforeValues: String) { + attributeValueCreate(attribute: $id, input: $input) { + attribute { + id + choices( + first: $firstValues + after: $afterValues + last: $lastValues + before: $beforeValues + ) { + ...AttributeValueList + } + } + errors { + ...AttributeError + } + } +} + ${AttributeValueListFragmentDoc} +${AttributeErrorFragmentDoc}`; +export type AttributeValueCreateMutationFn = Apollo.MutationFunction; + +/** + * __useAttributeValueCreateMutation__ + * + * To run a mutation, you first call `useAttributeValueCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAttributeValueCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [attributeValueCreateMutation, { data, loading, error }] = useAttributeValueCreateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * firstValues: // value for 'firstValues' + * afterValues: // value for 'afterValues' + * lastValues: // value for 'lastValues' + * beforeValues: // value for 'beforeValues' + * }, + * }); + */ +export function useAttributeValueCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AttributeValueCreateDocument, options); + } +export type AttributeValueCreateMutationHookResult = ReturnType; +export type AttributeValueCreateMutationResult = Apollo.MutationResult; +export type AttributeValueCreateMutationOptions = Apollo.BaseMutationOptions; +export const AttributeCreateDocument = gql` + mutation AttributeCreate($input: AttributeCreateInput!) { + attributeCreate(input: $input) { + attribute { + id + } + errors { + ...AttributeError + } + } +} + ${AttributeErrorFragmentDoc}`; +export type AttributeCreateMutationFn = Apollo.MutationFunction; + +/** + * __useAttributeCreateMutation__ + * + * To run a mutation, you first call `useAttributeCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAttributeCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [attributeCreateMutation, { data, loading, error }] = useAttributeCreateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useAttributeCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AttributeCreateDocument, options); + } +export type AttributeCreateMutationHookResult = ReturnType; +export type AttributeCreateMutationResult = Apollo.MutationResult; +export type AttributeCreateMutationOptions = Apollo.BaseMutationOptions; +export const AttributeValueReorderDocument = gql` + mutation AttributeValueReorder($id: ID!, $move: ReorderInput!, $firstValues: Int, $afterValues: String, $lastValues: Int, $beforeValues: String) { + attributeReorderValues(attributeId: $id, moves: [$move]) { + attribute { + id + choices( + first: $firstValues + after: $afterValues + last: $lastValues + before: $beforeValues + ) { + pageInfo { + ...PageInfo + } + edges { + cursor + node { + id + } + } + } + } + errors { + ...AttributeError + } + } +} + ${PageInfoFragmentDoc} +${AttributeErrorFragmentDoc}`; +export type AttributeValueReorderMutationFn = Apollo.MutationFunction; + +/** + * __useAttributeValueReorderMutation__ + * + * To run a mutation, you first call `useAttributeValueReorderMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAttributeValueReorderMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [attributeValueReorderMutation, { data, loading, error }] = useAttributeValueReorderMutation({ + * variables: { + * id: // value for 'id' + * move: // value for 'move' + * firstValues: // value for 'firstValues' + * afterValues: // value for 'afterValues' + * lastValues: // value for 'lastValues' + * beforeValues: // value for 'beforeValues' + * }, + * }); + */ +export function useAttributeValueReorderMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AttributeValueReorderDocument, options); + } +export type AttributeValueReorderMutationHookResult = ReturnType; +export type AttributeValueReorderMutationResult = Apollo.MutationResult; +export type AttributeValueReorderMutationOptions = Apollo.BaseMutationOptions; +export const AttributeDetailsDocument = gql` + query AttributeDetails($id: ID!, $firstValues: Int, $afterValues: String, $lastValues: Int, $beforeValues: String) { + attribute(id: $id) { + ...AttributeDetails + choices( + first: $firstValues + after: $afterValues + last: $lastValues + before: $beforeValues + ) { + ...AttributeValueList + } + } +} + ${AttributeDetailsFragmentDoc} +${AttributeValueListFragmentDoc}`; + +/** + * __useAttributeDetailsQuery__ + * + * To run a query within a React component, call `useAttributeDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useAttributeDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAttributeDetailsQuery({ + * variables: { + * id: // value for 'id' + * firstValues: // value for 'firstValues' + * afterValues: // value for 'afterValues' + * lastValues: // value for 'lastValues' + * beforeValues: // value for 'beforeValues' + * }, + * }); + */ +export function useAttributeDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(AttributeDetailsDocument, options); + } +export function useAttributeDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(AttributeDetailsDocument, options); + } +export type AttributeDetailsQueryHookResult = ReturnType; +export type AttributeDetailsLazyQueryHookResult = ReturnType; +export type AttributeDetailsQueryResult = Apollo.QueryResult; +export const AttributeListDocument = gql` + query AttributeList($filter: AttributeFilterInput, $before: String, $after: String, $first: Int, $last: Int, $sort: AttributeSortingInput) { + attributes( + filter: $filter + before: $before + after: $after + first: $first + last: $last + sortBy: $sort + ) { + edges { + node { + ...Attribute + } + } + pageInfo { + ...PageInfo + } + } +} + ${AttributeFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __useAttributeListQuery__ + * + * To run a query within a React component, call `useAttributeListQuery` and pass it any options that fit your needs. + * When your component renders, `useAttributeListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAttributeListQuery({ + * variables: { + * filter: // value for 'filter' + * before: // value for 'before' + * after: // value for 'after' + * first: // value for 'first' + * last: // value for 'last' + * sort: // value for 'sort' + * }, + * }); + */ +export function useAttributeListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(AttributeListDocument, options); + } +export function useAttributeListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(AttributeListDocument, options); + } +export type AttributeListQueryHookResult = ReturnType; +export type AttributeListLazyQueryHookResult = ReturnType; +export type AttributeListQueryResult = Apollo.QueryResult; +export const RequestPasswordResetDocument = gql` + mutation RequestPasswordReset($email: String!, $redirectUrl: String!) { + requestPasswordReset(email: $email, redirectUrl: $redirectUrl) { + errors { + ...AccountError + } + } +} + ${AccountErrorFragmentDoc}`; +export type RequestPasswordResetMutationFn = Apollo.MutationFunction; + +/** + * __useRequestPasswordResetMutation__ + * + * To run a mutation, you first call `useRequestPasswordResetMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useRequestPasswordResetMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [requestPasswordResetMutation, { data, loading, error }] = useRequestPasswordResetMutation({ + * variables: { + * email: // value for 'email' + * redirectUrl: // value for 'redirectUrl' + * }, + * }); + */ +export function useRequestPasswordResetMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(RequestPasswordResetDocument, options); + } +export type RequestPasswordResetMutationHookResult = ReturnType; +export type RequestPasswordResetMutationResult = Apollo.MutationResult; +export type RequestPasswordResetMutationOptions = Apollo.BaseMutationOptions; +export const AvailableExternalAuthenticationsDocument = gql` + query AvailableExternalAuthentications { + shop { + availableExternalAuthentications { + id + name + } + } +} + `; + +/** + * __useAvailableExternalAuthenticationsQuery__ + * + * To run a query within a React component, call `useAvailableExternalAuthenticationsQuery` and pass it any options that fit your needs. + * When your component renders, `useAvailableExternalAuthenticationsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAvailableExternalAuthenticationsQuery({ + * variables: { + * }, + * }); + */ +export function useAvailableExternalAuthenticationsQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(AvailableExternalAuthenticationsDocument, options); + } +export function useAvailableExternalAuthenticationsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(AvailableExternalAuthenticationsDocument, options); + } +export type AvailableExternalAuthenticationsQueryHookResult = ReturnType; +export type AvailableExternalAuthenticationsLazyQueryHookResult = ReturnType; +export type AvailableExternalAuthenticationsQueryResult = Apollo.QueryResult; +export const UserDetailsDocument = gql` + query UserDetails { + me { + ...User + } +} + ${UserFragmentDoc}`; + +/** + * __useUserDetailsQuery__ + * + * To run a query within a React component, call `useUserDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useUserDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useUserDetailsQuery({ + * variables: { + * }, + * }); + */ +export function useUserDetailsQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(UserDetailsDocument, options); + } +export function useUserDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(UserDetailsDocument, options); + } +export type UserDetailsQueryHookResult = ReturnType; +export type UserDetailsLazyQueryHookResult = ReturnType; +export type UserDetailsQueryResult = Apollo.QueryResult; +export const CategoryDeleteDocument = gql` + mutation CategoryDelete($id: ID!) { + categoryDelete(id: $id) { + errors { + ...ProductError + } + } +} + ${ProductErrorFragmentDoc}`; +export type CategoryDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useCategoryDeleteMutation__ + * + * To run a mutation, you first call `useCategoryDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCategoryDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [categoryDeleteMutation, { data, loading, error }] = useCategoryDeleteMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useCategoryDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(CategoryDeleteDocument, options); + } +export type CategoryDeleteMutationHookResult = ReturnType; +export type CategoryDeleteMutationResult = Apollo.MutationResult; +export type CategoryDeleteMutationOptions = Apollo.BaseMutationOptions; +export const CategoryCreateDocument = gql` + mutation CategoryCreate($parent: ID, $input: CategoryInput!) { + categoryCreate(parent: $parent, input: $input) { + category { + ...CategoryDetails + } + errors { + ...ProductError + } + } +} + ${CategoryDetailsFragmentDoc} +${ProductErrorFragmentDoc}`; +export type CategoryCreateMutationFn = Apollo.MutationFunction; + +/** + * __useCategoryCreateMutation__ + * + * To run a mutation, you first call `useCategoryCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCategoryCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [categoryCreateMutation, { data, loading, error }] = useCategoryCreateMutation({ + * variables: { + * parent: // value for 'parent' + * input: // value for 'input' + * }, + * }); + */ +export function useCategoryCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(CategoryCreateDocument, options); + } +export type CategoryCreateMutationHookResult = ReturnType; +export type CategoryCreateMutationResult = Apollo.MutationResult; +export type CategoryCreateMutationOptions = Apollo.BaseMutationOptions; +export const CategoryUpdateDocument = gql` + mutation CategoryUpdate($id: ID!, $input: CategoryInput!) { + categoryUpdate(id: $id, input: $input) { + category { + ...CategoryDetails + } + errors { + ...ProductError + } + } +} + ${CategoryDetailsFragmentDoc} +${ProductErrorFragmentDoc}`; +export type CategoryUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useCategoryUpdateMutation__ + * + * To run a mutation, you first call `useCategoryUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCategoryUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [categoryUpdateMutation, { data, loading, error }] = useCategoryUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useCategoryUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(CategoryUpdateDocument, options); + } +export type CategoryUpdateMutationHookResult = ReturnType; +export type CategoryUpdateMutationResult = Apollo.MutationResult; +export type CategoryUpdateMutationOptions = Apollo.BaseMutationOptions; +export const CategoryBulkDeleteDocument = gql` + mutation CategoryBulkDelete($ids: [ID]!) { + categoryBulkDelete(ids: $ids) { + errors { + ...ProductError + } + } +} + ${ProductErrorFragmentDoc}`; +export type CategoryBulkDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useCategoryBulkDeleteMutation__ + * + * To run a mutation, you first call `useCategoryBulkDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCategoryBulkDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [categoryBulkDeleteMutation, { data, loading, error }] = useCategoryBulkDeleteMutation({ + * variables: { + * ids: // value for 'ids' + * }, + * }); + */ +export function useCategoryBulkDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(CategoryBulkDeleteDocument, options); + } +export type CategoryBulkDeleteMutationHookResult = ReturnType; +export type CategoryBulkDeleteMutationResult = Apollo.MutationResult; +export type CategoryBulkDeleteMutationOptions = Apollo.BaseMutationOptions; +export const RootCategoriesDocument = gql` + query RootCategories($first: Int, $after: String, $last: Int, $before: String, $filter: CategoryFilterInput, $sort: CategorySortingInput) { + categories( + level: 0 + first: $first + after: $after + last: $last + before: $before + filter: $filter + sortBy: $sort + ) { + edges { + node { + ...Category + } + } + pageInfo { + ...PageInfo + } + } +} + ${CategoryFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __useRootCategoriesQuery__ + * + * To run a query within a React component, call `useRootCategoriesQuery` and pass it any options that fit your needs. + * When your component renders, `useRootCategoriesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useRootCategoriesQuery({ + * variables: { + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * filter: // value for 'filter' + * sort: // value for 'sort' + * }, + * }); + */ +export function useRootCategoriesQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(RootCategoriesDocument, options); + } +export function useRootCategoriesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(RootCategoriesDocument, options); + } +export type RootCategoriesQueryHookResult = ReturnType; +export type RootCategoriesLazyQueryHookResult = ReturnType; +export type RootCategoriesQueryResult = Apollo.QueryResult; +export const CategoryDetailsDocument = gql` + query CategoryDetails($id: ID!, $first: Int, $after: String, $last: Int, $before: String) { + category(id: $id) { + ...CategoryDetails + children(first: $first, after: $after, last: $last, before: $before) { + edges { + node { + ...Category + } + } + pageInfo { + ...PageInfo + } + } + products(first: $first, after: $after, last: $last, before: $before) { + pageInfo { + ...PageInfo + } + edges { + cursor + node { + id + name + thumbnail { + url + } + } + } + } + } +} + ${CategoryDetailsFragmentDoc} +${CategoryFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __useCategoryDetailsQuery__ + * + * To run a query within a React component, call `useCategoryDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useCategoryDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useCategoryDetailsQuery({ + * variables: { + * id: // value for 'id' + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * }, + * }); + */ +export function useCategoryDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(CategoryDetailsDocument, options); + } +export function useCategoryDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(CategoryDetailsDocument, options); + } +export type CategoryDetailsQueryHookResult = ReturnType; +export type CategoryDetailsLazyQueryHookResult = ReturnType; +export type CategoryDetailsQueryResult = Apollo.QueryResult; +export const ChannelCreateDocument = gql` + mutation ChannelCreate($input: ChannelCreateInput!) { + channelCreate(input: $input) { + channel { + ...ChannelDetails + } + errors { + ...ChannelError + } + } +} + ${ChannelDetailsFragmentDoc} +${ChannelErrorFragmentDoc}`; +export type ChannelCreateMutationFn = Apollo.MutationFunction; + +/** + * __useChannelCreateMutation__ + * + * To run a mutation, you first call `useChannelCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useChannelCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [channelCreateMutation, { data, loading, error }] = useChannelCreateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useChannelCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ChannelCreateDocument, options); + } +export type ChannelCreateMutationHookResult = ReturnType; +export type ChannelCreateMutationResult = Apollo.MutationResult; +export type ChannelCreateMutationOptions = Apollo.BaseMutationOptions; +export const ChannelUpdateDocument = gql` + mutation ChannelUpdate($id: ID!, $input: ChannelUpdateInput!) { + channelUpdate(id: $id, input: $input) { + channel { + ...ChannelDetails + } + errors { + ...ChannelError + } + } +} + ${ChannelDetailsFragmentDoc} +${ChannelErrorFragmentDoc}`; +export type ChannelUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useChannelUpdateMutation__ + * + * To run a mutation, you first call `useChannelUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useChannelUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [channelUpdateMutation, { data, loading, error }] = useChannelUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useChannelUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ChannelUpdateDocument, options); + } +export type ChannelUpdateMutationHookResult = ReturnType; +export type ChannelUpdateMutationResult = Apollo.MutationResult; +export type ChannelUpdateMutationOptions = Apollo.BaseMutationOptions; +export const ChannelDeleteDocument = gql` + mutation ChannelDelete($id: ID!, $input: ChannelDeleteInput) { + channelDelete(id: $id, input: $input) { + errors { + ...ChannelError + } + } +} + ${ChannelErrorFragmentDoc}`; +export type ChannelDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useChannelDeleteMutation__ + * + * To run a mutation, you first call `useChannelDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useChannelDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [channelDeleteMutation, { data, loading, error }] = useChannelDeleteMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useChannelDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ChannelDeleteDocument, options); + } +export type ChannelDeleteMutationHookResult = ReturnType; +export type ChannelDeleteMutationResult = Apollo.MutationResult; +export type ChannelDeleteMutationOptions = Apollo.BaseMutationOptions; +export const ChannelActivateDocument = gql` + mutation ChannelActivate($id: ID!) { + channelActivate(id: $id) { + channel { + ...ChannelDetails + } + errors { + ...ChannelError + } + } +} + ${ChannelDetailsFragmentDoc} +${ChannelErrorFragmentDoc}`; +export type ChannelActivateMutationFn = Apollo.MutationFunction; + +/** + * __useChannelActivateMutation__ + * + * To run a mutation, you first call `useChannelActivateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useChannelActivateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [channelActivateMutation, { data, loading, error }] = useChannelActivateMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useChannelActivateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ChannelActivateDocument, options); + } +export type ChannelActivateMutationHookResult = ReturnType; +export type ChannelActivateMutationResult = Apollo.MutationResult; +export type ChannelActivateMutationOptions = Apollo.BaseMutationOptions; +export const ChannelDeactivateDocument = gql` + mutation ChannelDeactivate($id: ID!) { + channelDeactivate(id: $id) { + channel { + ...ChannelDetails + } + errors { + ...ChannelError + } + } +} + ${ChannelDetailsFragmentDoc} +${ChannelErrorFragmentDoc}`; +export type ChannelDeactivateMutationFn = Apollo.MutationFunction; + +/** + * __useChannelDeactivateMutation__ + * + * To run a mutation, you first call `useChannelDeactivateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useChannelDeactivateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [channelDeactivateMutation, { data, loading, error }] = useChannelDeactivateMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useChannelDeactivateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ChannelDeactivateDocument, options); + } +export type ChannelDeactivateMutationHookResult = ReturnType; +export type ChannelDeactivateMutationResult = Apollo.MutationResult; +export type ChannelDeactivateMutationOptions = Apollo.BaseMutationOptions; +export const BaseChannelsDocument = gql` + query BaseChannels { + channels { + ...Channel + } +} + ${ChannelFragmentDoc}`; + +/** + * __useBaseChannelsQuery__ + * + * To run a query within a React component, call `useBaseChannelsQuery` and pass it any options that fit your needs. + * When your component renders, `useBaseChannelsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useBaseChannelsQuery({ + * variables: { + * }, + * }); + */ +export function useBaseChannelsQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(BaseChannelsDocument, options); + } +export function useBaseChannelsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(BaseChannelsDocument, options); + } +export type BaseChannelsQueryHookResult = ReturnType; +export type BaseChannelsLazyQueryHookResult = ReturnType; +export type BaseChannelsQueryResult = Apollo.QueryResult; +export const ChannelsDocument = gql` + query Channels { + channels { + ...ChannelDetails + } +} + ${ChannelDetailsFragmentDoc}`; + +/** + * __useChannelsQuery__ + * + * To run a query within a React component, call `useChannelsQuery` and pass it any options that fit your needs. + * When your component renders, `useChannelsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useChannelsQuery({ + * variables: { + * }, + * }); + */ +export function useChannelsQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ChannelsDocument, options); + } +export function useChannelsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ChannelsDocument, options); + } +export type ChannelsQueryHookResult = ReturnType; +export type ChannelsLazyQueryHookResult = ReturnType; +export type ChannelsQueryResult = Apollo.QueryResult; +export const ChannelDocument = gql` + query Channel($id: ID!) { + channel(id: $id) { + ...ChannelDetails + } +} + ${ChannelDetailsFragmentDoc}`; + +/** + * __useChannelQuery__ + * + * To run a query within a React component, call `useChannelQuery` and pass it any options that fit your needs. + * When your component renders, `useChannelQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useChannelQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useChannelQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ChannelDocument, options); + } +export function useChannelLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ChannelDocument, options); + } +export type ChannelQueryHookResult = ReturnType; +export type ChannelLazyQueryHookResult = ReturnType; +export type ChannelQueryResult = Apollo.QueryResult; +export const CollectionUpdateDocument = gql` + mutation CollectionUpdate($id: ID!, $input: CollectionInput!) { + collectionUpdate(id: $id, input: $input) { + collection { + ...CollectionDetails + } + errors { + ...CollectionError + } + } +} + ${CollectionDetailsFragmentDoc} +${CollectionErrorFragmentDoc}`; +export type CollectionUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useCollectionUpdateMutation__ + * + * To run a mutation, you first call `useCollectionUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCollectionUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [collectionUpdateMutation, { data, loading, error }] = useCollectionUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useCollectionUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(CollectionUpdateDocument, options); + } +export type CollectionUpdateMutationHookResult = ReturnType; +export type CollectionUpdateMutationResult = Apollo.MutationResult; +export type CollectionUpdateMutationOptions = Apollo.BaseMutationOptions; +export const CollectionAssignProductDocument = gql` + mutation CollectionAssignProduct($collectionId: ID!, $productIds: [ID!]!, $first: Int, $after: String, $last: Int, $before: String) { + collectionAddProducts(collectionId: $collectionId, products: $productIds) { + collection { + id + products(first: $first, after: $after, before: $before, last: $last) { + edges { + node { + ...CollectionProduct + } + } + pageInfo { + endCursor + hasNextPage + hasPreviousPage + startCursor + } + } + } + errors { + ...CollectionError + } + } +} + ${CollectionProductFragmentDoc} +${CollectionErrorFragmentDoc}`; +export type CollectionAssignProductMutationFn = Apollo.MutationFunction; + +/** + * __useCollectionAssignProductMutation__ + * + * To run a mutation, you first call `useCollectionAssignProductMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCollectionAssignProductMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [collectionAssignProductMutation, { data, loading, error }] = useCollectionAssignProductMutation({ + * variables: { + * collectionId: // value for 'collectionId' + * productIds: // value for 'productIds' + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * }, + * }); + */ +export function useCollectionAssignProductMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(CollectionAssignProductDocument, options); + } +export type CollectionAssignProductMutationHookResult = ReturnType; +export type CollectionAssignProductMutationResult = Apollo.MutationResult; +export type CollectionAssignProductMutationOptions = Apollo.BaseMutationOptions; +export const CreateCollectionDocument = gql` + mutation CreateCollection($input: CollectionCreateInput!) { + collectionCreate(input: $input) { + collection { + ...CollectionDetails + } + errors { + ...CollectionError + } + } +} + ${CollectionDetailsFragmentDoc} +${CollectionErrorFragmentDoc}`; +export type CreateCollectionMutationFn = Apollo.MutationFunction; + +/** + * __useCreateCollectionMutation__ + * + * To run a mutation, you first call `useCreateCollectionMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCreateCollectionMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [createCollectionMutation, { data, loading, error }] = useCreateCollectionMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useCreateCollectionMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(CreateCollectionDocument, options); + } +export type CreateCollectionMutationHookResult = ReturnType; +export type CreateCollectionMutationResult = Apollo.MutationResult; +export type CreateCollectionMutationOptions = Apollo.BaseMutationOptions; +export const RemoveCollectionDocument = gql` + mutation RemoveCollection($id: ID!) { + collectionDelete(id: $id) { + errors { + ...CollectionError + } + } +} + ${CollectionErrorFragmentDoc}`; +export type RemoveCollectionMutationFn = Apollo.MutationFunction; + +/** + * __useRemoveCollectionMutation__ + * + * To run a mutation, you first call `useRemoveCollectionMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useRemoveCollectionMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [removeCollectionMutation, { data, loading, error }] = useRemoveCollectionMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useRemoveCollectionMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(RemoveCollectionDocument, options); + } +export type RemoveCollectionMutationHookResult = ReturnType; +export type RemoveCollectionMutationResult = Apollo.MutationResult; +export type RemoveCollectionMutationOptions = Apollo.BaseMutationOptions; +export const UnassignCollectionProductDocument = gql` + mutation UnassignCollectionProduct($collectionId: ID!, $productIds: [ID]!, $first: Int, $after: String, $last: Int, $before: String) { + collectionRemoveProducts(collectionId: $collectionId, products: $productIds) { + collection { + id + products(first: $first, after: $after, before: $before, last: $last) { + edges { + node { + id + name + productType { + id + name + } + thumbnail { + url + } + } + } + pageInfo { + endCursor + hasNextPage + hasPreviousPage + startCursor + } + } + } + errors { + ...CollectionError + } + } +} + ${CollectionErrorFragmentDoc}`; +export type UnassignCollectionProductMutationFn = Apollo.MutationFunction; + +/** + * __useUnassignCollectionProductMutation__ + * + * To run a mutation, you first call `useUnassignCollectionProductMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUnassignCollectionProductMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [unassignCollectionProductMutation, { data, loading, error }] = useUnassignCollectionProductMutation({ + * variables: { + * collectionId: // value for 'collectionId' + * productIds: // value for 'productIds' + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * }, + * }); + */ +export function useUnassignCollectionProductMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UnassignCollectionProductDocument, options); + } +export type UnassignCollectionProductMutationHookResult = ReturnType; +export type UnassignCollectionProductMutationResult = Apollo.MutationResult; +export type UnassignCollectionProductMutationOptions = Apollo.BaseMutationOptions; +export const CollectionBulkDeleteDocument = gql` + mutation CollectionBulkDelete($ids: [ID]!) { + collectionBulkDelete(ids: $ids) { + errors { + ...CollectionError + } + } +} + ${CollectionErrorFragmentDoc}`; +export type CollectionBulkDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useCollectionBulkDeleteMutation__ + * + * To run a mutation, you first call `useCollectionBulkDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCollectionBulkDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [collectionBulkDeleteMutation, { data, loading, error }] = useCollectionBulkDeleteMutation({ + * variables: { + * ids: // value for 'ids' + * }, + * }); + */ +export function useCollectionBulkDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(CollectionBulkDeleteDocument, options); + } +export type CollectionBulkDeleteMutationHookResult = ReturnType; +export type CollectionBulkDeleteMutationResult = Apollo.MutationResult; +export type CollectionBulkDeleteMutationOptions = Apollo.BaseMutationOptions; +export const CollectionChannelListingUpdateDocument = gql` + mutation CollectionChannelListingUpdate($id: ID!, $input: CollectionChannelListingUpdateInput!) { + collectionChannelListingUpdate(id: $id, input: $input) { + errors { + ...CollectionChannelListingError + } + } +} + ${CollectionChannelListingErrorFragmentDoc}`; +export type CollectionChannelListingUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useCollectionChannelListingUpdateMutation__ + * + * To run a mutation, you first call `useCollectionChannelListingUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCollectionChannelListingUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [collectionChannelListingUpdateMutation, { data, loading, error }] = useCollectionChannelListingUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useCollectionChannelListingUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(CollectionChannelListingUpdateDocument, options); + } +export type CollectionChannelListingUpdateMutationHookResult = ReturnType; +export type CollectionChannelListingUpdateMutationResult = Apollo.MutationResult; +export type CollectionChannelListingUpdateMutationOptions = Apollo.BaseMutationOptions; +export const CollectionListDocument = gql` + query CollectionList($first: Int, $after: String, $last: Int, $before: String, $filter: CollectionFilterInput, $sort: CollectionSortingInput, $channel: String) { + collections( + first: $first + after: $after + before: $before + last: $last + filter: $filter + sortBy: $sort + channel: $channel + ) { + edges { + node { + ...Collection + products { + totalCount + } + } + } + pageInfo { + endCursor + hasNextPage + hasPreviousPage + startCursor + } + } +} + ${CollectionFragmentDoc}`; + +/** + * __useCollectionListQuery__ + * + * To run a query within a React component, call `useCollectionListQuery` and pass it any options that fit your needs. + * When your component renders, `useCollectionListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useCollectionListQuery({ + * variables: { + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * filter: // value for 'filter' + * sort: // value for 'sort' + * channel: // value for 'channel' + * }, + * }); + */ +export function useCollectionListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(CollectionListDocument, options); + } +export function useCollectionListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(CollectionListDocument, options); + } +export type CollectionListQueryHookResult = ReturnType; +export type CollectionListLazyQueryHookResult = ReturnType; +export type CollectionListQueryResult = Apollo.QueryResult; +export const CollectionDetailsDocument = gql` + query CollectionDetails($id: ID!, $first: Int, $after: String, $last: Int, $before: String) { + collection(id: $id) { + ...CollectionDetails + products(first: $first, after: $after, before: $before, last: $last) { + edges { + node { + ...CollectionProduct + } + } + pageInfo { + endCursor + hasNextPage + hasPreviousPage + startCursor + } + } + } +} + ${CollectionDetailsFragmentDoc} +${CollectionProductFragmentDoc}`; + +/** + * __useCollectionDetailsQuery__ + * + * To run a query within a React component, call `useCollectionDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useCollectionDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useCollectionDetailsQuery({ + * variables: { + * id: // value for 'id' + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * }, + * }); + */ +export function useCollectionDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(CollectionDetailsDocument, options); + } +export function useCollectionDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(CollectionDetailsDocument, options); + } +export type CollectionDetailsQueryHookResult = ReturnType; +export type CollectionDetailsLazyQueryHookResult = ReturnType; +export type CollectionDetailsQueryResult = Apollo.QueryResult; +export const CheckIfOrderExistsDocument = gql` + query CheckIfOrderExists($id: ID!) { + order(id: $id) { + id + status + } +} + `; + +/** + * __useCheckIfOrderExistsQuery__ + * + * To run a query within a React component, call `useCheckIfOrderExistsQuery` and pass it any options that fit your needs. + * When your component renders, `useCheckIfOrderExistsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useCheckIfOrderExistsQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useCheckIfOrderExistsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(CheckIfOrderExistsDocument, options); + } +export function useCheckIfOrderExistsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(CheckIfOrderExistsDocument, options); + } +export type CheckIfOrderExistsQueryHookResult = ReturnType; +export type CheckIfOrderExistsLazyQueryHookResult = ReturnType; +export type CheckIfOrderExistsQueryResult = Apollo.QueryResult; +export const SearchCatalogDocument = gql` + query SearchCatalog($first: Int!, $query: String!) { + categories(first: $first, filter: {search: $query}) { + edges { + node { + id + name + } + } + } + collections(first: $first, filter: {search: $query}) { + edges { + node { + ...Collection + } + } + } + products(first: $first, filter: {search: $query}) { + edges { + node { + id + category { + id + name + } + name + } + } + } +} + ${CollectionFragmentDoc}`; + +/** + * __useSearchCatalogQuery__ + * + * To run a query within a React component, call `useSearchCatalogQuery` and pass it any options that fit your needs. + * When your component renders, `useSearchCatalogQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSearchCatalogQuery({ + * variables: { + * first: // value for 'first' + * query: // value for 'query' + * }, + * }); + */ +export function useSearchCatalogQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SearchCatalogDocument, options); + } +export function useSearchCatalogLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SearchCatalogDocument, options); + } +export type SearchCatalogQueryHookResult = ReturnType; +export type SearchCatalogLazyQueryHookResult = ReturnType; +export type SearchCatalogQueryResult = Apollo.QueryResult; +export const ShopInfoDocument = gql` + query ShopInfo { + shop { + countries { + ...CountryWithCode + } + defaultCountry { + ...CountryWithCode + } + defaultWeightUnit + displayGrossPrices + domain { + host + url + } + languages { + ...Language + } + includeTaxesInPrices + name + trackInventoryByDefault + permissions { + code + name + } + version + } +} + ${CountryWithCodeFragmentDoc} +${LanguageFragmentDoc}`; + +/** + * __useShopInfoQuery__ + * + * To run a query within a React component, call `useShopInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useShopInfoQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useShopInfoQuery({ + * variables: { + * }, + * }); + */ +export function useShopInfoQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ShopInfoDocument, options); + } +export function useShopInfoLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ShopInfoDocument, options); + } +export type ShopInfoQueryHookResult = ReturnType; +export type ShopInfoLazyQueryHookResult = ReturnType; +export type ShopInfoQueryResult = Apollo.QueryResult; +export const ShopCountriesDocument = gql` + query ShopCountries($filter: CountryFilterInput) { + shop { + countries(filter: $filter) { + code + country + } + } +} + `; + +/** + * __useShopCountriesQuery__ + * + * To run a query within a React component, call `useShopCountriesQuery` and pass it any options that fit your needs. + * When your component renders, `useShopCountriesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useShopCountriesQuery({ + * variables: { + * filter: // value for 'filter' + * }, + * }); + */ +export function useShopCountriesQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ShopCountriesDocument, options); + } +export function useShopCountriesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ShopCountriesDocument, options); + } +export type ShopCountriesQueryHookResult = ReturnType; +export type ShopCountriesLazyQueryHookResult = ReturnType; +export type ShopCountriesQueryResult = Apollo.QueryResult; +export const RefreshLimitsDocument = gql` + query RefreshLimits($channels: Boolean!, $orders: Boolean!, $productVariants: Boolean!, $staffUsers: Boolean!, $warehouses: Boolean!) { + shop { + ...ShopLimit + } +} + ${ShopLimitFragmentDoc}`; + +/** + * __useRefreshLimitsQuery__ + * + * To run a query within a React component, call `useRefreshLimitsQuery` and pass it any options that fit your needs. + * When your component renders, `useRefreshLimitsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useRefreshLimitsQuery({ + * variables: { + * channels: // value for 'channels' + * orders: // value for 'orders' + * productVariants: // value for 'productVariants' + * staffUsers: // value for 'staffUsers' + * warehouses: // value for 'warehouses' + * }, + * }); + */ +export function useRefreshLimitsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(RefreshLimitsDocument, options); + } +export function useRefreshLimitsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(RefreshLimitsDocument, options); + } +export type RefreshLimitsQueryHookResult = ReturnType; +export type RefreshLimitsLazyQueryHookResult = ReturnType; +export type RefreshLimitsQueryResult = Apollo.QueryResult; +export const CheckExportFileStatusDocument = gql` + query CheckExportFileStatus($id: ID!) { + exportFile(id: $id) { + id + status + } +} + `; + +/** + * __useCheckExportFileStatusQuery__ + * + * To run a query within a React component, call `useCheckExportFileStatusQuery` and pass it any options that fit your needs. + * When your component renders, `useCheckExportFileStatusQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useCheckExportFileStatusQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useCheckExportFileStatusQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(CheckExportFileStatusDocument, options); + } +export function useCheckExportFileStatusLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(CheckExportFileStatusDocument, options); + } +export type CheckExportFileStatusQueryHookResult = ReturnType; +export type CheckExportFileStatusLazyQueryHookResult = ReturnType; +export type CheckExportFileStatusQueryResult = Apollo.QueryResult; +export const CheckOrderInvoicesStatusDocument = gql` + query CheckOrderInvoicesStatus($id: ID!) { + order(id: $id) { + id + invoices { + ...Invoice + } + } +} + ${InvoiceFragmentDoc}`; + +/** + * __useCheckOrderInvoicesStatusQuery__ + * + * To run a query within a React component, call `useCheckOrderInvoicesStatusQuery` and pass it any options that fit your needs. + * When your component renders, `useCheckOrderInvoicesStatusQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useCheckOrderInvoicesStatusQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useCheckOrderInvoicesStatusQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(CheckOrderInvoicesStatusDocument, options); + } +export function useCheckOrderInvoicesStatusLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(CheckOrderInvoicesStatusDocument, options); + } +export type CheckOrderInvoicesStatusQueryHookResult = ReturnType; +export type CheckOrderInvoicesStatusLazyQueryHookResult = ReturnType; +export type CheckOrderInvoicesStatusQueryResult = Apollo.QueryResult; +export const UpdateCustomerDocument = gql` + mutation UpdateCustomer($id: ID!, $input: CustomerInput!) { + customerUpdate(id: $id, input: $input) { + errors { + ...AccountError + } + user { + ...CustomerDetails + } + } +} + ${AccountErrorFragmentDoc} +${CustomerDetailsFragmentDoc}`; +export type UpdateCustomerMutationFn = Apollo.MutationFunction; + +/** + * __useUpdateCustomerMutation__ + * + * To run a mutation, you first call `useUpdateCustomerMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateCustomerMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updateCustomerMutation, { data, loading, error }] = useUpdateCustomerMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useUpdateCustomerMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UpdateCustomerDocument, options); + } +export type UpdateCustomerMutationHookResult = ReturnType; +export type UpdateCustomerMutationResult = Apollo.MutationResult; +export type UpdateCustomerMutationOptions = Apollo.BaseMutationOptions; +export const CreateCustomerDocument = gql` + mutation CreateCustomer($input: UserCreateInput!) { + customerCreate(input: $input) { + errors { + ...AccountError + } + user { + id + } + } +} + ${AccountErrorFragmentDoc}`; +export type CreateCustomerMutationFn = Apollo.MutationFunction; + +/** + * __useCreateCustomerMutation__ + * + * To run a mutation, you first call `useCreateCustomerMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCreateCustomerMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [createCustomerMutation, { data, loading, error }] = useCreateCustomerMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useCreateCustomerMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(CreateCustomerDocument, options); + } +export type CreateCustomerMutationHookResult = ReturnType; +export type CreateCustomerMutationResult = Apollo.MutationResult; +export type CreateCustomerMutationOptions = Apollo.BaseMutationOptions; +export const RemoveCustomerDocument = gql` + mutation RemoveCustomer($id: ID!) { + customerDelete(id: $id) { + errors { + ...AccountError + } + } +} + ${AccountErrorFragmentDoc}`; +export type RemoveCustomerMutationFn = Apollo.MutationFunction; + +/** + * __useRemoveCustomerMutation__ + * + * To run a mutation, you first call `useRemoveCustomerMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useRemoveCustomerMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [removeCustomerMutation, { data, loading, error }] = useRemoveCustomerMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useRemoveCustomerMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(RemoveCustomerDocument, options); + } +export type RemoveCustomerMutationHookResult = ReturnType; +export type RemoveCustomerMutationResult = Apollo.MutationResult; +export type RemoveCustomerMutationOptions = Apollo.BaseMutationOptions; +export const SetCustomerDefaultAddressDocument = gql` + mutation SetCustomerDefaultAddress($addressId: ID!, $userId: ID!, $type: AddressTypeEnum!) { + addressSetDefault(addressId: $addressId, userId: $userId, type: $type) { + errors { + ...AccountError + } + user { + ...CustomerAddresses + } + } +} + ${AccountErrorFragmentDoc} +${CustomerAddressesFragmentDoc}`; +export type SetCustomerDefaultAddressMutationFn = Apollo.MutationFunction; + +/** + * __useSetCustomerDefaultAddressMutation__ + * + * To run a mutation, you first call `useSetCustomerDefaultAddressMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useSetCustomerDefaultAddressMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [setCustomerDefaultAddressMutation, { data, loading, error }] = useSetCustomerDefaultAddressMutation({ + * variables: { + * addressId: // value for 'addressId' + * userId: // value for 'userId' + * type: // value for 'type' + * }, + * }); + */ +export function useSetCustomerDefaultAddressMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(SetCustomerDefaultAddressDocument, options); + } +export type SetCustomerDefaultAddressMutationHookResult = ReturnType; +export type SetCustomerDefaultAddressMutationResult = Apollo.MutationResult; +export type SetCustomerDefaultAddressMutationOptions = Apollo.BaseMutationOptions; +export const CreateCustomerAddressDocument = gql` + mutation CreateCustomerAddress($id: ID!, $input: AddressInput!) { + addressCreate(userId: $id, input: $input) { + errors { + ...AccountError + } + address { + ...Address + } + user { + ...CustomerAddresses + } + } +} + ${AccountErrorFragmentDoc} +${AddressFragmentDoc} +${CustomerAddressesFragmentDoc}`; +export type CreateCustomerAddressMutationFn = Apollo.MutationFunction; + +/** + * __useCreateCustomerAddressMutation__ + * + * To run a mutation, you first call `useCreateCustomerAddressMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCreateCustomerAddressMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [createCustomerAddressMutation, { data, loading, error }] = useCreateCustomerAddressMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useCreateCustomerAddressMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(CreateCustomerAddressDocument, options); + } +export type CreateCustomerAddressMutationHookResult = ReturnType; +export type CreateCustomerAddressMutationResult = Apollo.MutationResult; +export type CreateCustomerAddressMutationOptions = Apollo.BaseMutationOptions; +export const UpdateCustomerAddressDocument = gql` + mutation UpdateCustomerAddress($id: ID!, $input: AddressInput!) { + addressUpdate(id: $id, input: $input) { + errors { + ...AccountError + } + address { + ...Address + } + } +} + ${AccountErrorFragmentDoc} +${AddressFragmentDoc}`; +export type UpdateCustomerAddressMutationFn = Apollo.MutationFunction; + +/** + * __useUpdateCustomerAddressMutation__ + * + * To run a mutation, you first call `useUpdateCustomerAddressMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateCustomerAddressMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updateCustomerAddressMutation, { data, loading, error }] = useUpdateCustomerAddressMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useUpdateCustomerAddressMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UpdateCustomerAddressDocument, options); + } +export type UpdateCustomerAddressMutationHookResult = ReturnType; +export type UpdateCustomerAddressMutationResult = Apollo.MutationResult; +export type UpdateCustomerAddressMutationOptions = Apollo.BaseMutationOptions; +export const RemoveCustomerAddressDocument = gql` + mutation RemoveCustomerAddress($id: ID!) { + addressDelete(id: $id) { + errors { + ...AccountError + } + user { + ...CustomerAddresses + } + } +} + ${AccountErrorFragmentDoc} +${CustomerAddressesFragmentDoc}`; +export type RemoveCustomerAddressMutationFn = Apollo.MutationFunction; + +/** + * __useRemoveCustomerAddressMutation__ + * + * To run a mutation, you first call `useRemoveCustomerAddressMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useRemoveCustomerAddressMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [removeCustomerAddressMutation, { data, loading, error }] = useRemoveCustomerAddressMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useRemoveCustomerAddressMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(RemoveCustomerAddressDocument, options); + } +export type RemoveCustomerAddressMutationHookResult = ReturnType; +export type RemoveCustomerAddressMutationResult = Apollo.MutationResult; +export type RemoveCustomerAddressMutationOptions = Apollo.BaseMutationOptions; +export const BulkRemoveCustomersDocument = gql` + mutation BulkRemoveCustomers($ids: [ID]!) { + customerBulkDelete(ids: $ids) { + errors { + ...AccountError + } + } +} + ${AccountErrorFragmentDoc}`; +export type BulkRemoveCustomersMutationFn = Apollo.MutationFunction; + +/** + * __useBulkRemoveCustomersMutation__ + * + * To run a mutation, you first call `useBulkRemoveCustomersMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useBulkRemoveCustomersMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [bulkRemoveCustomersMutation, { data, loading, error }] = useBulkRemoveCustomersMutation({ + * variables: { + * ids: // value for 'ids' + * }, + * }); + */ +export function useBulkRemoveCustomersMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(BulkRemoveCustomersDocument, options); + } +export type BulkRemoveCustomersMutationHookResult = ReturnType; +export type BulkRemoveCustomersMutationResult = Apollo.MutationResult; +export type BulkRemoveCustomersMutationOptions = Apollo.BaseMutationOptions; +export const ListCustomersDocument = gql` + query ListCustomers($after: String, $before: String, $first: Int, $last: Int, $filter: CustomerFilterInput, $sort: UserSortingInput, $PERMISSION_MANAGE_ORDERS: Boolean!) { + customers( + after: $after + before: $before + first: $first + last: $last + filter: $filter + sortBy: $sort + ) { + edges { + node { + ...Customer + orders @include(if: $PERMISSION_MANAGE_ORDERS) { + totalCount + } + } + } + pageInfo { + endCursor + hasNextPage + hasPreviousPage + startCursor + } + } +} + ${CustomerFragmentDoc}`; + +/** + * __useListCustomersQuery__ + * + * To run a query within a React component, call `useListCustomersQuery` and pass it any options that fit your needs. + * When your component renders, `useListCustomersQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useListCustomersQuery({ + * variables: { + * after: // value for 'after' + * before: // value for 'before' + * first: // value for 'first' + * last: // value for 'last' + * filter: // value for 'filter' + * sort: // value for 'sort' + * PERMISSION_MANAGE_ORDERS: // value for 'PERMISSION_MANAGE_ORDERS' + * }, + * }); + */ +export function useListCustomersQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ListCustomersDocument, options); + } +export function useListCustomersLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ListCustomersDocument, options); + } +export type ListCustomersQueryHookResult = ReturnType; +export type ListCustomersLazyQueryHookResult = ReturnType; +export type ListCustomersQueryResult = Apollo.QueryResult; +export const CustomerDetailsDocument = gql` + query CustomerDetails($id: ID!, $PERMISSION_MANAGE_ORDERS: Boolean!) { + user(id: $id) { + ...CustomerDetails + orders(last: 5) @include(if: $PERMISSION_MANAGE_ORDERS) { + edges { + node { + id + created + number + paymentStatus + total { + gross { + currency + amount + } + } + } + } + } + lastPlacedOrder: orders(last: 1) @include(if: $PERMISSION_MANAGE_ORDERS) { + edges { + node { + id + created + } + } + } + } +} + ${CustomerDetailsFragmentDoc}`; + +/** + * __useCustomerDetailsQuery__ + * + * To run a query within a React component, call `useCustomerDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useCustomerDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useCustomerDetailsQuery({ + * variables: { + * id: // value for 'id' + * PERMISSION_MANAGE_ORDERS: // value for 'PERMISSION_MANAGE_ORDERS' + * }, + * }); + */ +export function useCustomerDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(CustomerDetailsDocument, options); + } +export function useCustomerDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(CustomerDetailsDocument, options); + } +export type CustomerDetailsQueryHookResult = ReturnType; +export type CustomerDetailsLazyQueryHookResult = ReturnType; +export type CustomerDetailsQueryResult = Apollo.QueryResult; +export const CustomerAddressesDocument = gql` + query CustomerAddresses($id: ID!) { + user(id: $id) { + ...CustomerAddresses + } +} + ${CustomerAddressesFragmentDoc}`; + +/** + * __useCustomerAddressesQuery__ + * + * To run a query within a React component, call `useCustomerAddressesQuery` and pass it any options that fit your needs. + * When your component renders, `useCustomerAddressesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useCustomerAddressesQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useCustomerAddressesQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(CustomerAddressesDocument, options); + } +export function useCustomerAddressesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(CustomerAddressesDocument, options); + } +export type CustomerAddressesQueryHookResult = ReturnType; +export type CustomerAddressesLazyQueryHookResult = ReturnType; +export type CustomerAddressesQueryResult = Apollo.QueryResult; +export const CustomerCreateDataDocument = gql` + query CustomerCreateData { + shop { + countries { + code + country + } + } +} + `; + +/** + * __useCustomerCreateDataQuery__ + * + * To run a query within a React component, call `useCustomerCreateDataQuery` and pass it any options that fit your needs. + * When your component renders, `useCustomerCreateDataQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useCustomerCreateDataQuery({ + * variables: { + * }, + * }); + */ +export function useCustomerCreateDataQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(CustomerCreateDataDocument, options); + } +export function useCustomerCreateDataLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(CustomerCreateDataDocument, options); + } +export type CustomerCreateDataQueryHookResult = ReturnType; +export type CustomerCreateDataLazyQueryHookResult = ReturnType; +export type CustomerCreateDataQueryResult = Apollo.QueryResult; +export const SaleUpdateDocument = gql` + mutation SaleUpdate($input: SaleInput!, $id: ID!, $channelInput: SaleChannelListingInput!) { + saleUpdate(id: $id, input: $input) { + errors { + ...DiscountError + } + } + saleChannelListingUpdate(id: $id, input: $channelInput) { + errors { + ...DiscountError + } + sale { + ...Sale + } + } +} + ${DiscountErrorFragmentDoc} +${SaleFragmentDoc}`; +export type SaleUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useSaleUpdateMutation__ + * + * To run a mutation, you first call `useSaleUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useSaleUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [saleUpdateMutation, { data, loading, error }] = useSaleUpdateMutation({ + * variables: { + * input: // value for 'input' + * id: // value for 'id' + * channelInput: // value for 'channelInput' + * }, + * }); + */ +export function useSaleUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(SaleUpdateDocument, options); + } +export type SaleUpdateMutationHookResult = ReturnType; +export type SaleUpdateMutationResult = Apollo.MutationResult; +export type SaleUpdateMutationOptions = Apollo.BaseMutationOptions; +export const SaleCataloguesAddDocument = gql` + mutation SaleCataloguesAdd($input: CatalogueInput!, $id: ID!, $after: String, $before: String, $first: Int, $last: Int) { + saleCataloguesAdd(id: $id, input: $input) { + errors { + ...DiscountError + } + sale { + ...SaleDetails + } + } +} + ${DiscountErrorFragmentDoc} +${SaleDetailsFragmentDoc}`; +export type SaleCataloguesAddMutationFn = Apollo.MutationFunction; + +/** + * __useSaleCataloguesAddMutation__ + * + * To run a mutation, you first call `useSaleCataloguesAddMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useSaleCataloguesAddMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [saleCataloguesAddMutation, { data, loading, error }] = useSaleCataloguesAddMutation({ + * variables: { + * input: // value for 'input' + * id: // value for 'id' + * after: // value for 'after' + * before: // value for 'before' + * first: // value for 'first' + * last: // value for 'last' + * }, + * }); + */ +export function useSaleCataloguesAddMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(SaleCataloguesAddDocument, options); + } +export type SaleCataloguesAddMutationHookResult = ReturnType; +export type SaleCataloguesAddMutationResult = Apollo.MutationResult; +export type SaleCataloguesAddMutationOptions = Apollo.BaseMutationOptions; +export const SaleCataloguesRemoveDocument = gql` + mutation SaleCataloguesRemove($input: CatalogueInput!, $id: ID!, $after: String, $before: String, $first: Int, $last: Int) { + saleCataloguesRemove(id: $id, input: $input) { + errors { + ...DiscountError + } + sale { + ...SaleDetails + } + } +} + ${DiscountErrorFragmentDoc} +${SaleDetailsFragmentDoc}`; +export type SaleCataloguesRemoveMutationFn = Apollo.MutationFunction; + +/** + * __useSaleCataloguesRemoveMutation__ + * + * To run a mutation, you first call `useSaleCataloguesRemoveMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useSaleCataloguesRemoveMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [saleCataloguesRemoveMutation, { data, loading, error }] = useSaleCataloguesRemoveMutation({ + * variables: { + * input: // value for 'input' + * id: // value for 'id' + * after: // value for 'after' + * before: // value for 'before' + * first: // value for 'first' + * last: // value for 'last' + * }, + * }); + */ +export function useSaleCataloguesRemoveMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(SaleCataloguesRemoveDocument, options); + } +export type SaleCataloguesRemoveMutationHookResult = ReturnType; +export type SaleCataloguesRemoveMutationResult = Apollo.MutationResult; +export type SaleCataloguesRemoveMutationOptions = Apollo.BaseMutationOptions; +export const SaleCreateDocument = gql` + mutation SaleCreate($input: SaleInput!) { + saleCreate(input: $input) { + errors { + ...DiscountError + } + sale { + ...Sale + } + } +} + ${DiscountErrorFragmentDoc} +${SaleFragmentDoc}`; +export type SaleCreateMutationFn = Apollo.MutationFunction; + +/** + * __useSaleCreateMutation__ + * + * To run a mutation, you first call `useSaleCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useSaleCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [saleCreateMutation, { data, loading, error }] = useSaleCreateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useSaleCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(SaleCreateDocument, options); + } +export type SaleCreateMutationHookResult = ReturnType; +export type SaleCreateMutationResult = Apollo.MutationResult; +export type SaleCreateMutationOptions = Apollo.BaseMutationOptions; +export const SaleDeleteDocument = gql` + mutation SaleDelete($id: ID!) { + saleDelete(id: $id) { + errors { + ...DiscountError + } + } +} + ${DiscountErrorFragmentDoc}`; +export type SaleDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useSaleDeleteMutation__ + * + * To run a mutation, you first call `useSaleDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useSaleDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [saleDeleteMutation, { data, loading, error }] = useSaleDeleteMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useSaleDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(SaleDeleteDocument, options); + } +export type SaleDeleteMutationHookResult = ReturnType; +export type SaleDeleteMutationResult = Apollo.MutationResult; +export type SaleDeleteMutationOptions = Apollo.BaseMutationOptions; +export const SaleBulkDeleteDocument = gql` + mutation SaleBulkDelete($ids: [ID]!) { + saleBulkDelete(ids: $ids) { + errors { + ...SaleBulkDeleteError + } + } +} + ${SaleBulkDeleteErrorFragmentDoc}`; +export type SaleBulkDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useSaleBulkDeleteMutation__ + * + * To run a mutation, you first call `useSaleBulkDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useSaleBulkDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [saleBulkDeleteMutation, { data, loading, error }] = useSaleBulkDeleteMutation({ + * variables: { + * ids: // value for 'ids' + * }, + * }); + */ +export function useSaleBulkDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(SaleBulkDeleteDocument, options); + } +export type SaleBulkDeleteMutationHookResult = ReturnType; +export type SaleBulkDeleteMutationResult = Apollo.MutationResult; +export type SaleBulkDeleteMutationOptions = Apollo.BaseMutationOptions; +export const SaleChannelListingUpdateDocument = gql` + mutation SaleChannelListingUpdate($id: ID!, $input: SaleChannelListingInput!) { + saleChannelListingUpdate(id: $id, input: $input) { + errors { + ...DiscountError + } + sale { + ...Sale + } + } +} + ${DiscountErrorFragmentDoc} +${SaleFragmentDoc}`; +export type SaleChannelListingUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useSaleChannelListingUpdateMutation__ + * + * To run a mutation, you first call `useSaleChannelListingUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useSaleChannelListingUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [saleChannelListingUpdateMutation, { data, loading, error }] = useSaleChannelListingUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useSaleChannelListingUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(SaleChannelListingUpdateDocument, options); + } +export type SaleChannelListingUpdateMutationHookResult = ReturnType; +export type SaleChannelListingUpdateMutationResult = Apollo.MutationResult; +export type SaleChannelListingUpdateMutationOptions = Apollo.BaseMutationOptions; +export const VoucherChannelListingUpdateDocument = gql` + mutation VoucherChannelListingUpdate($id: ID!, $input: VoucherChannelListingInput!) { + voucherChannelListingUpdate(id: $id, input: $input) { + errors { + ...DiscountError + } + voucher { + ...Voucher + } + } +} + ${DiscountErrorFragmentDoc} +${VoucherFragmentDoc}`; +export type VoucherChannelListingUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useVoucherChannelListingUpdateMutation__ + * + * To run a mutation, you first call `useVoucherChannelListingUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useVoucherChannelListingUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [voucherChannelListingUpdateMutation, { data, loading, error }] = useVoucherChannelListingUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useVoucherChannelListingUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(VoucherChannelListingUpdateDocument, options); + } +export type VoucherChannelListingUpdateMutationHookResult = ReturnType; +export type VoucherChannelListingUpdateMutationResult = Apollo.MutationResult; +export type VoucherChannelListingUpdateMutationOptions = Apollo.BaseMutationOptions; +export const VoucherUpdateDocument = gql` + mutation VoucherUpdate($input: VoucherInput!, $id: ID!) { + voucherUpdate(id: $id, input: $input) { + errors { + ...DiscountError + } + voucher { + ...Voucher + } + } +} + ${DiscountErrorFragmentDoc} +${VoucherFragmentDoc}`; +export type VoucherUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useVoucherUpdateMutation__ + * + * To run a mutation, you first call `useVoucherUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useVoucherUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [voucherUpdateMutation, { data, loading, error }] = useVoucherUpdateMutation({ + * variables: { + * input: // value for 'input' + * id: // value for 'id' + * }, + * }); + */ +export function useVoucherUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(VoucherUpdateDocument, options); + } +export type VoucherUpdateMutationHookResult = ReturnType; +export type VoucherUpdateMutationResult = Apollo.MutationResult; +export type VoucherUpdateMutationOptions = Apollo.BaseMutationOptions; +export const VoucherCataloguesAddDocument = gql` + mutation VoucherCataloguesAdd($input: CatalogueInput!, $id: ID!, $after: String, $before: String, $first: Int, $last: Int) { + voucherCataloguesAdd(id: $id, input: $input) { + errors { + ...DiscountError + } + voucher { + ...VoucherDetails + } + } +} + ${DiscountErrorFragmentDoc} +${VoucherDetailsFragmentDoc}`; +export type VoucherCataloguesAddMutationFn = Apollo.MutationFunction; + +/** + * __useVoucherCataloguesAddMutation__ + * + * To run a mutation, you first call `useVoucherCataloguesAddMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useVoucherCataloguesAddMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [voucherCataloguesAddMutation, { data, loading, error }] = useVoucherCataloguesAddMutation({ + * variables: { + * input: // value for 'input' + * id: // value for 'id' + * after: // value for 'after' + * before: // value for 'before' + * first: // value for 'first' + * last: // value for 'last' + * }, + * }); + */ +export function useVoucherCataloguesAddMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(VoucherCataloguesAddDocument, options); + } +export type VoucherCataloguesAddMutationHookResult = ReturnType; +export type VoucherCataloguesAddMutationResult = Apollo.MutationResult; +export type VoucherCataloguesAddMutationOptions = Apollo.BaseMutationOptions; +export const VoucherCataloguesRemoveDocument = gql` + mutation VoucherCataloguesRemove($input: CatalogueInput!, $id: ID!, $after: String, $before: String, $first: Int, $last: Int) { + voucherCataloguesRemove(id: $id, input: $input) { + errors { + ...DiscountError + } + voucher { + ...VoucherDetails + } + } +} + ${DiscountErrorFragmentDoc} +${VoucherDetailsFragmentDoc}`; +export type VoucherCataloguesRemoveMutationFn = Apollo.MutationFunction; + +/** + * __useVoucherCataloguesRemoveMutation__ + * + * To run a mutation, you first call `useVoucherCataloguesRemoveMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useVoucherCataloguesRemoveMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [voucherCataloguesRemoveMutation, { data, loading, error }] = useVoucherCataloguesRemoveMutation({ + * variables: { + * input: // value for 'input' + * id: // value for 'id' + * after: // value for 'after' + * before: // value for 'before' + * first: // value for 'first' + * last: // value for 'last' + * }, + * }); + */ +export function useVoucherCataloguesRemoveMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(VoucherCataloguesRemoveDocument, options); + } +export type VoucherCataloguesRemoveMutationHookResult = ReturnType; +export type VoucherCataloguesRemoveMutationResult = Apollo.MutationResult; +export type VoucherCataloguesRemoveMutationOptions = Apollo.BaseMutationOptions; +export const VoucherCreateDocument = gql` + mutation VoucherCreate($input: VoucherInput!) { + voucherCreate(input: $input) { + errors { + ...DiscountError + } + voucher { + ...Voucher + } + } +} + ${DiscountErrorFragmentDoc} +${VoucherFragmentDoc}`; +export type VoucherCreateMutationFn = Apollo.MutationFunction; + +/** + * __useVoucherCreateMutation__ + * + * To run a mutation, you first call `useVoucherCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useVoucherCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [voucherCreateMutation, { data, loading, error }] = useVoucherCreateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useVoucherCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(VoucherCreateDocument, options); + } +export type VoucherCreateMutationHookResult = ReturnType; +export type VoucherCreateMutationResult = Apollo.MutationResult; +export type VoucherCreateMutationOptions = Apollo.BaseMutationOptions; +export const VoucherDeleteDocument = gql` + mutation VoucherDelete($id: ID!) { + voucherDelete(id: $id) { + errors { + ...DiscountError + } + } +} + ${DiscountErrorFragmentDoc}`; +export type VoucherDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useVoucherDeleteMutation__ + * + * To run a mutation, you first call `useVoucherDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useVoucherDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [voucherDeleteMutation, { data, loading, error }] = useVoucherDeleteMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useVoucherDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(VoucherDeleteDocument, options); + } +export type VoucherDeleteMutationHookResult = ReturnType; +export type VoucherDeleteMutationResult = Apollo.MutationResult; +export type VoucherDeleteMutationOptions = Apollo.BaseMutationOptions; +export const VoucherBulkDeleteDocument = gql` + mutation VoucherBulkDelete($ids: [ID]!) { + voucherBulkDelete(ids: $ids) { + errors { + ...VoucherBulkDeleteError + } + } +} + ${VoucherBulkDeleteErrorFragmentDoc}`; +export type VoucherBulkDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useVoucherBulkDeleteMutation__ + * + * To run a mutation, you first call `useVoucherBulkDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useVoucherBulkDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [voucherBulkDeleteMutation, { data, loading, error }] = useVoucherBulkDeleteMutation({ + * variables: { + * ids: // value for 'ids' + * }, + * }); + */ +export function useVoucherBulkDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(VoucherBulkDeleteDocument, options); + } +export type VoucherBulkDeleteMutationHookResult = ReturnType; +export type VoucherBulkDeleteMutationResult = Apollo.MutationResult; +export type VoucherBulkDeleteMutationOptions = Apollo.BaseMutationOptions; +export const SaleListDocument = gql` + query SaleList($after: String, $before: String, $first: Int, $last: Int, $filter: SaleFilterInput, $sort: SaleSortingInput, $channel: String) { + sales( + after: $after + before: $before + first: $first + last: $last + filter: $filter + sortBy: $sort + channel: $channel + ) { + edges { + node { + ...Sale + } + } + pageInfo { + ...PageInfo + } + } +} + ${SaleFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __useSaleListQuery__ + * + * To run a query within a React component, call `useSaleListQuery` and pass it any options that fit your needs. + * When your component renders, `useSaleListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSaleListQuery({ + * variables: { + * after: // value for 'after' + * before: // value for 'before' + * first: // value for 'first' + * last: // value for 'last' + * filter: // value for 'filter' + * sort: // value for 'sort' + * channel: // value for 'channel' + * }, + * }); + */ +export function useSaleListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SaleListDocument, options); + } +export function useSaleListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SaleListDocument, options); + } +export type SaleListQueryHookResult = ReturnType; +export type SaleListLazyQueryHookResult = ReturnType; +export type SaleListQueryResult = Apollo.QueryResult; +export const VoucherListDocument = gql` + query VoucherList($after: String, $before: String, $first: Int, $last: Int, $filter: VoucherFilterInput, $sort: VoucherSortingInput, $channel: String) { + vouchers( + after: $after + before: $before + first: $first + last: $last + filter: $filter + sortBy: $sort + channel: $channel + ) { + edges { + node { + ...Voucher + } + } + pageInfo { + ...PageInfo + } + } +} + ${VoucherFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __useVoucherListQuery__ + * + * To run a query within a React component, call `useVoucherListQuery` and pass it any options that fit your needs. + * When your component renders, `useVoucherListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useVoucherListQuery({ + * variables: { + * after: // value for 'after' + * before: // value for 'before' + * first: // value for 'first' + * last: // value for 'last' + * filter: // value for 'filter' + * sort: // value for 'sort' + * channel: // value for 'channel' + * }, + * }); + */ +export function useVoucherListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(VoucherListDocument, options); + } +export function useVoucherListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(VoucherListDocument, options); + } +export type VoucherListQueryHookResult = ReturnType; +export type VoucherListLazyQueryHookResult = ReturnType; +export type VoucherListQueryResult = Apollo.QueryResult; +export const SaleDetailsDocument = gql` + query SaleDetails($id: ID!, $after: String, $before: String, $first: Int, $last: Int) { + sale(id: $id) { + ...SaleDetails + } +} + ${SaleDetailsFragmentDoc}`; + +/** + * __useSaleDetailsQuery__ + * + * To run a query within a React component, call `useSaleDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useSaleDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSaleDetailsQuery({ + * variables: { + * id: // value for 'id' + * after: // value for 'after' + * before: // value for 'before' + * first: // value for 'first' + * last: // value for 'last' + * }, + * }); + */ +export function useSaleDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SaleDetailsDocument, options); + } +export function useSaleDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SaleDetailsDocument, options); + } +export type SaleDetailsQueryHookResult = ReturnType; +export type SaleDetailsLazyQueryHookResult = ReturnType; +export type SaleDetailsQueryResult = Apollo.QueryResult; +export const VoucherDetailsDocument = gql` + query VoucherDetails($id: ID!, $after: String, $before: String, $first: Int, $last: Int) { + voucher(id: $id) { + ...VoucherDetails + } +} + ${VoucherDetailsFragmentDoc}`; + +/** + * __useVoucherDetailsQuery__ + * + * To run a query within a React component, call `useVoucherDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useVoucherDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useVoucherDetailsQuery({ + * variables: { + * id: // value for 'id' + * after: // value for 'after' + * before: // value for 'before' + * first: // value for 'first' + * last: // value for 'last' + * }, + * }); + */ +export function useVoucherDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(VoucherDetailsDocument, options); + } +export function useVoucherDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(VoucherDetailsDocument, options); + } +export type VoucherDetailsQueryHookResult = ReturnType; +export type VoucherDetailsLazyQueryHookResult = ReturnType; +export type VoucherDetailsQueryResult = Apollo.QueryResult; +export const FileUploadDocument = gql` + mutation FileUpload($file: Upload!) { + fileUpload(file: $file) { + uploadedFile { + ...File + } + errors { + ...UploadError + } + } +} + ${FileFragmentDoc} +${UploadErrorFragmentDoc}`; +export type FileUploadMutationFn = Apollo.MutationFunction; + +/** + * __useFileUploadMutation__ + * + * To run a mutation, you first call `useFileUploadMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useFileUploadMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [fileUploadMutation, { data, loading, error }] = useFileUploadMutation({ + * variables: { + * file: // value for 'file' + * }, + * }); + */ +export function useFileUploadMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(FileUploadDocument, options); + } +export type FileUploadMutationHookResult = ReturnType; +export type FileUploadMutationResult = Apollo.MutationResult; +export type FileUploadMutationOptions = Apollo.BaseMutationOptions; +export const GiftCardBulkCreateDocument = gql` + mutation GiftCardBulkCreate($input: GiftCardBulkCreateInput!) { + giftCardBulkCreate(input: $input) { + giftCards { + id + } + errors { + ...GiftCardBulkCreateErrorFragment + } + } +} + ${GiftCardBulkCreateErrorFragmentFragmentDoc}`; +export type GiftCardBulkCreateMutationFn = Apollo.MutationFunction; + +/** + * __useGiftCardBulkCreateMutation__ + * + * To run a mutation, you first call `useGiftCardBulkCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useGiftCardBulkCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [giftCardBulkCreateMutation, { data, loading, error }] = useGiftCardBulkCreateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useGiftCardBulkCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(GiftCardBulkCreateDocument, options); + } +export type GiftCardBulkCreateMutationHookResult = ReturnType; +export type GiftCardBulkCreateMutationResult = Apollo.MutationResult; +export type GiftCardBulkCreateMutationOptions = Apollo.BaseMutationOptions; +export const GiftCardCreateDocument = gql` + mutation GiftCardCreate($input: GiftCardCreateInput!) { + giftCardCreate(input: $input) { + giftCard { + code + } + errors { + ...GiftCardCreateErrorFragment + } + } +} + ${GiftCardCreateErrorFragmentFragmentDoc}`; +export type GiftCardCreateMutationFn = Apollo.MutationFunction; + +/** + * __useGiftCardCreateMutation__ + * + * To run a mutation, you first call `useGiftCardCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useGiftCardCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [giftCardCreateMutation, { data, loading, error }] = useGiftCardCreateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useGiftCardCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(GiftCardCreateDocument, options); + } +export type GiftCardCreateMutationHookResult = ReturnType; +export type GiftCardCreateMutationResult = Apollo.MutationResult; +export type GiftCardCreateMutationOptions = Apollo.BaseMutationOptions; +export const ChannelCurrenciesDocument = gql` + query ChannelCurrencies { + shop { + channelCurrencies + } +} + `; + +/** + * __useChannelCurrenciesQuery__ + * + * To run a query within a React component, call `useChannelCurrenciesQuery` and pass it any options that fit your needs. + * When your component renders, `useChannelCurrenciesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useChannelCurrenciesQuery({ + * variables: { + * }, + * }); + */ +export function useChannelCurrenciesQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ChannelCurrenciesDocument, options); + } +export function useChannelCurrenciesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ChannelCurrenciesDocument, options); + } +export type ChannelCurrenciesQueryHookResult = ReturnType; +export type ChannelCurrenciesLazyQueryHookResult = ReturnType; +export type ChannelCurrenciesQueryResult = Apollo.QueryResult; +export const ExportGiftCardsDocument = gql` + mutation ExportGiftCards($input: ExportGiftCardsInput!) { + exportGiftCards(input: $input) { + errors { + ...ExportError + } + exportFile { + id + } + } +} + ${ExportErrorFragmentDoc}`; +export type ExportGiftCardsMutationFn = Apollo.MutationFunction; + +/** + * __useExportGiftCardsMutation__ + * + * To run a mutation, you first call `useExportGiftCardsMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useExportGiftCardsMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [exportGiftCardsMutation, { data, loading, error }] = useExportGiftCardsMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useExportGiftCardsMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ExportGiftCardsDocument, options); + } +export type ExportGiftCardsMutationHookResult = ReturnType; +export type ExportGiftCardsMutationResult = Apollo.MutationResult; +export type ExportGiftCardsMutationOptions = Apollo.BaseMutationOptions; +export const GiftCardSettingsUpdateDocument = gql` + mutation GiftCardSettingsUpdate($input: GiftCardSettingsUpdateInput!) { + giftCardSettingsUpdate(input: $input) { + errors { + ...GiftCardSettingsError + } + giftCardSettings { + ...GiftCardsSettings + } + } +} + ${GiftCardSettingsErrorFragmentDoc} +${GiftCardsSettingsFragmentDoc}`; +export type GiftCardSettingsUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useGiftCardSettingsUpdateMutation__ + * + * To run a mutation, you first call `useGiftCardSettingsUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useGiftCardSettingsUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [giftCardSettingsUpdateMutation, { data, loading, error }] = useGiftCardSettingsUpdateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useGiftCardSettingsUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(GiftCardSettingsUpdateDocument, options); + } +export type GiftCardSettingsUpdateMutationHookResult = ReturnType; +export type GiftCardSettingsUpdateMutationResult = Apollo.MutationResult; +export type GiftCardSettingsUpdateMutationOptions = Apollo.BaseMutationOptions; +export const GiftCardSettingsDocument = gql` + query GiftCardSettings { + giftCardSettings { + ...GiftCardsSettings + } +} + ${GiftCardsSettingsFragmentDoc}`; + +/** + * __useGiftCardSettingsQuery__ + * + * To run a query within a React component, call `useGiftCardSettingsQuery` and pass it any options that fit your needs. + * When your component renders, `useGiftCardSettingsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGiftCardSettingsQuery({ + * variables: { + * }, + * }); + */ +export function useGiftCardSettingsQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(GiftCardSettingsDocument, options); + } +export function useGiftCardSettingsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(GiftCardSettingsDocument, options); + } +export type GiftCardSettingsQueryHookResult = ReturnType; +export type GiftCardSettingsLazyQueryHookResult = ReturnType; +export type GiftCardSettingsQueryResult = Apollo.QueryResult; +export const GiftCardResendDocument = gql` + mutation GiftCardResend($input: GiftCardResendInput!) { + giftCardResend(input: $input) { + errors { + ...GiftCardError + } + giftCard { + ...GiftCardData + } + } +} + ${GiftCardErrorFragmentDoc} +${GiftCardDataFragmentDoc}`; +export type GiftCardResendMutationFn = Apollo.MutationFunction; + +/** + * __useGiftCardResendMutation__ + * + * To run a mutation, you first call `useGiftCardResendMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useGiftCardResendMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [giftCardResendMutation, { data, loading, error }] = useGiftCardResendMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useGiftCardResendMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(GiftCardResendDocument, options); + } +export type GiftCardResendMutationHookResult = ReturnType; +export type GiftCardResendMutationResult = Apollo.MutationResult; +export type GiftCardResendMutationOptions = Apollo.BaseMutationOptions; +export const GiftCardActivateDocument = gql` + mutation GiftCardActivate($id: ID!) { + giftCardActivate(id: $id) { + errors { + ...GiftCardError + } + giftCard { + ...GiftCardData + } + } +} + ${GiftCardErrorFragmentDoc} +${GiftCardDataFragmentDoc}`; +export type GiftCardActivateMutationFn = Apollo.MutationFunction; + +/** + * __useGiftCardActivateMutation__ + * + * To run a mutation, you first call `useGiftCardActivateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useGiftCardActivateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [giftCardActivateMutation, { data, loading, error }] = useGiftCardActivateMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useGiftCardActivateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(GiftCardActivateDocument, options); + } +export type GiftCardActivateMutationHookResult = ReturnType; +export type GiftCardActivateMutationResult = Apollo.MutationResult; +export type GiftCardActivateMutationOptions = Apollo.BaseMutationOptions; +export const GiftCardDeactivateDocument = gql` + mutation GiftCardDeactivate($id: ID!) { + giftCardDeactivate(id: $id) { + errors { + ...GiftCardError + } + giftCard { + ...GiftCardData + } + } +} + ${GiftCardErrorFragmentDoc} +${GiftCardDataFragmentDoc}`; +export type GiftCardDeactivateMutationFn = Apollo.MutationFunction; + +/** + * __useGiftCardDeactivateMutation__ + * + * To run a mutation, you first call `useGiftCardDeactivateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useGiftCardDeactivateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [giftCardDeactivateMutation, { data, loading, error }] = useGiftCardDeactivateMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useGiftCardDeactivateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(GiftCardDeactivateDocument, options); + } +export type GiftCardDeactivateMutationHookResult = ReturnType; +export type GiftCardDeactivateMutationResult = Apollo.MutationResult; +export type GiftCardDeactivateMutationOptions = Apollo.BaseMutationOptions; +export const GiftCardUpdateDocument = gql` + mutation GiftCardUpdate($id: ID!, $input: GiftCardUpdateInput!) { + giftCardUpdate(id: $id, input: $input) { + errors { + ...GiftCardError + } + giftCard { + ...GiftCardData + events { + ...GiftCardEvent + } + } + } +} + ${GiftCardErrorFragmentDoc} +${GiftCardDataFragmentDoc} +${GiftCardEventFragmentDoc}`; +export type GiftCardUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useGiftCardUpdateMutation__ + * + * To run a mutation, you first call `useGiftCardUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useGiftCardUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [giftCardUpdateMutation, { data, loading, error }] = useGiftCardUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useGiftCardUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(GiftCardUpdateDocument, options); + } +export type GiftCardUpdateMutationHookResult = ReturnType; +export type GiftCardUpdateMutationResult = Apollo.MutationResult; +export type GiftCardUpdateMutationOptions = Apollo.BaseMutationOptions; +export const GiftCardAddNoteDocument = gql` + mutation GiftCardAddNote($id: ID!, $input: GiftCardAddNoteInput!) { + giftCardAddNote(id: $id, input: $input) { + errors { + ...GiftCardError + } + giftCard { + ...GiftCardData + } + event { + ...GiftCardEvent + } + } +} + ${GiftCardErrorFragmentDoc} +${GiftCardDataFragmentDoc} +${GiftCardEventFragmentDoc}`; +export type GiftCardAddNoteMutationFn = Apollo.MutationFunction; + +/** + * __useGiftCardAddNoteMutation__ + * + * To run a mutation, you first call `useGiftCardAddNoteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useGiftCardAddNoteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [giftCardAddNoteMutation, { data, loading, error }] = useGiftCardAddNoteMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useGiftCardAddNoteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(GiftCardAddNoteDocument, options); + } +export type GiftCardAddNoteMutationHookResult = ReturnType; +export type GiftCardAddNoteMutationResult = Apollo.MutationResult; +export type GiftCardAddNoteMutationOptions = Apollo.BaseMutationOptions; +export const GiftCardDetailsDocument = gql` + query GiftCardDetails($id: ID!) { + giftCard(id: $id) { + ...GiftCardData + events { + ...GiftCardEvent + } + } +} + ${GiftCardDataFragmentDoc} +${GiftCardEventFragmentDoc}`; + +/** + * __useGiftCardDetailsQuery__ + * + * To run a query within a React component, call `useGiftCardDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useGiftCardDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGiftCardDetailsQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useGiftCardDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(GiftCardDetailsDocument, options); + } +export function useGiftCardDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(GiftCardDetailsDocument, options); + } +export type GiftCardDetailsQueryHookResult = ReturnType; +export type GiftCardDetailsLazyQueryHookResult = ReturnType; +export type GiftCardDetailsQueryResult = Apollo.QueryResult; +export const GiftCardCurrenciesDocument = gql` + query GiftCardCurrencies { + giftCardCurrencies +} + `; + +/** + * __useGiftCardCurrenciesQuery__ + * + * To run a query within a React component, call `useGiftCardCurrenciesQuery` and pass it any options that fit your needs. + * When your component renders, `useGiftCardCurrenciesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGiftCardCurrenciesQuery({ + * variables: { + * }, + * }); + */ +export function useGiftCardCurrenciesQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(GiftCardCurrenciesDocument, options); + } +export function useGiftCardCurrenciesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(GiftCardCurrenciesDocument, options); + } +export type GiftCardCurrenciesQueryHookResult = ReturnType; +export type GiftCardCurrenciesLazyQueryHookResult = ReturnType; +export type GiftCardCurrenciesQueryResult = Apollo.QueryResult; +export const GiftCardBulkActivateDocument = gql` + mutation GiftCardBulkActivate($ids: [ID]!) { + giftCardBulkActivate(ids: $ids) { + errors { + ...GiftCardError + } + count + } +} + ${GiftCardErrorFragmentDoc}`; +export type GiftCardBulkActivateMutationFn = Apollo.MutationFunction; + +/** + * __useGiftCardBulkActivateMutation__ + * + * To run a mutation, you first call `useGiftCardBulkActivateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useGiftCardBulkActivateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [giftCardBulkActivateMutation, { data, loading, error }] = useGiftCardBulkActivateMutation({ + * variables: { + * ids: // value for 'ids' + * }, + * }); + */ +export function useGiftCardBulkActivateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(GiftCardBulkActivateDocument, options); + } +export type GiftCardBulkActivateMutationHookResult = ReturnType; +export type GiftCardBulkActivateMutationResult = Apollo.MutationResult; +export type GiftCardBulkActivateMutationOptions = Apollo.BaseMutationOptions; +export const GiftCardBulkDeactivateDocument = gql` + mutation GiftCardBulkDeactivate($ids: [ID]!) { + giftCardBulkDeactivate(ids: $ids) { + errors { + ...GiftCardError + } + count + } +} + ${GiftCardErrorFragmentDoc}`; +export type GiftCardBulkDeactivateMutationFn = Apollo.MutationFunction; + +/** + * __useGiftCardBulkDeactivateMutation__ + * + * To run a mutation, you first call `useGiftCardBulkDeactivateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useGiftCardBulkDeactivateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [giftCardBulkDeactivateMutation, { data, loading, error }] = useGiftCardBulkDeactivateMutation({ + * variables: { + * ids: // value for 'ids' + * }, + * }); + */ +export function useGiftCardBulkDeactivateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(GiftCardBulkDeactivateDocument, options); + } +export type GiftCardBulkDeactivateMutationHookResult = ReturnType; +export type GiftCardBulkDeactivateMutationResult = Apollo.MutationResult; +export type GiftCardBulkDeactivateMutationOptions = Apollo.BaseMutationOptions; +export const DeleteGiftCardDocument = gql` + mutation DeleteGiftCard($id: ID!) { + giftCardDelete(id: $id) { + errors { + ...GiftCardError + } + } +} + ${GiftCardErrorFragmentDoc}`; +export type DeleteGiftCardMutationFn = Apollo.MutationFunction; + +/** + * __useDeleteGiftCardMutation__ + * + * To run a mutation, you first call `useDeleteGiftCardMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useDeleteGiftCardMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [deleteGiftCardMutation, { data, loading, error }] = useDeleteGiftCardMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useDeleteGiftCardMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(DeleteGiftCardDocument, options); + } +export type DeleteGiftCardMutationHookResult = ReturnType; +export type DeleteGiftCardMutationResult = Apollo.MutationResult; +export type DeleteGiftCardMutationOptions = Apollo.BaseMutationOptions; +export const BulkDeleteGiftCardDocument = gql` + mutation BulkDeleteGiftCard($ids: [ID]!) { + giftCardBulkDelete(ids: $ids) { + errors { + ...GiftCardError + } + } +} + ${GiftCardErrorFragmentDoc}`; +export type BulkDeleteGiftCardMutationFn = Apollo.MutationFunction; + +/** + * __useBulkDeleteGiftCardMutation__ + * + * To run a mutation, you first call `useBulkDeleteGiftCardMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useBulkDeleteGiftCardMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [bulkDeleteGiftCardMutation, { data, loading, error }] = useBulkDeleteGiftCardMutation({ + * variables: { + * ids: // value for 'ids' + * }, + * }); + */ +export function useBulkDeleteGiftCardMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(BulkDeleteGiftCardDocument, options); + } +export type BulkDeleteGiftCardMutationHookResult = ReturnType; +export type BulkDeleteGiftCardMutationResult = Apollo.MutationResult; +export type BulkDeleteGiftCardMutationOptions = Apollo.BaseMutationOptions; +export const GiftCardListDocument = gql` + query GiftCardList($first: Int, $after: String, $last: Int, $before: String, $filter: GiftCardFilterInput, $sort: GiftCardSortingInput) { + giftCards( + first: $first + after: $after + before: $before + last: $last + filter: $filter + sortBy: $sort + ) { + edges { + node { + id + usedByEmail + last4CodeChars + isActive + expiryDate + product { + id + name + } + tags { + name + } + usedBy { + ...UserBase + } + currentBalance { + ...Money + } + } + } + totalCount + pageInfo { + endCursor + hasNextPage + hasPreviousPage + startCursor + } + } +} + ${UserBaseFragmentDoc} +${MoneyFragmentDoc}`; + +/** + * __useGiftCardListQuery__ + * + * To run a query within a React component, call `useGiftCardListQuery` and pass it any options that fit your needs. + * When your component renders, `useGiftCardListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGiftCardListQuery({ + * variables: { + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * filter: // value for 'filter' + * sort: // value for 'sort' + * }, + * }); + */ +export function useGiftCardListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(GiftCardListDocument, options); + } +export function useGiftCardListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(GiftCardListDocument, options); + } +export type GiftCardListQueryHookResult = ReturnType; +export type GiftCardListLazyQueryHookResult = ReturnType; +export type GiftCardListQueryResult = Apollo.QueryResult; +export const GiftCardTotalCountDocument = gql` + query GiftCardTotalCount { + giftCards { + totalCount + } +} + `; + +/** + * __useGiftCardTotalCountQuery__ + * + * To run a query within a React component, call `useGiftCardTotalCountQuery` and pass it any options that fit your needs. + * When your component renders, `useGiftCardTotalCountQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGiftCardTotalCountQuery({ + * variables: { + * }, + * }); + */ +export function useGiftCardTotalCountQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(GiftCardTotalCountDocument, options); + } +export function useGiftCardTotalCountLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(GiftCardTotalCountDocument, options); + } +export type GiftCardTotalCountQueryHookResult = ReturnType; +export type GiftCardTotalCountLazyQueryHookResult = ReturnType; +export type GiftCardTotalCountQueryResult = Apollo.QueryResult; +export const GiftCardProductsCountDocument = gql` + query GiftCardProductsCount { + giftCardProductTypes: productTypes(filter: {kind: GIFT_CARD}) { + totalCount + } + giftCardProducts: products(filter: {giftCard: true}) { + totalCount + } +} + `; + +/** + * __useGiftCardProductsCountQuery__ + * + * To run a query within a React component, call `useGiftCardProductsCountQuery` and pass it any options that fit your needs. + * When your component renders, `useGiftCardProductsCountQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGiftCardProductsCountQuery({ + * variables: { + * }, + * }); + */ +export function useGiftCardProductsCountQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(GiftCardProductsCountDocument, options); + } +export function useGiftCardProductsCountLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(GiftCardProductsCountDocument, options); + } +export type GiftCardProductsCountQueryHookResult = ReturnType; +export type GiftCardProductsCountLazyQueryHookResult = ReturnType; +export type GiftCardProductsCountQueryResult = Apollo.QueryResult; +export const CustomerGiftCardListDocument = gql` + query CustomerGiftCardList($first: Int, $filter: GiftCardFilterInput) { + giftCards(first: $first, filter: $filter) { + edges { + node { + ...CustomerGiftCard + } + } + } +} + ${CustomerGiftCardFragmentDoc}`; + +/** + * __useCustomerGiftCardListQuery__ + * + * To run a query within a React component, call `useCustomerGiftCardListQuery` and pass it any options that fit your needs. + * When your component renders, `useCustomerGiftCardListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useCustomerGiftCardListQuery({ + * variables: { + * first: // value for 'first' + * filter: // value for 'filter' + * }, + * }); + */ +export function useCustomerGiftCardListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(CustomerGiftCardListDocument, options); + } +export function useCustomerGiftCardListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(CustomerGiftCardListDocument, options); + } +export type CustomerGiftCardListQueryHookResult = ReturnType; +export type CustomerGiftCardListLazyQueryHookResult = ReturnType; +export type CustomerGiftCardListQueryResult = Apollo.QueryResult; +export const HomeDocument = gql` + query Home($channel: String!, $datePeriod: DateRangeInput!, $PERMISSION_MANAGE_PRODUCTS: Boolean!, $PERMISSION_MANAGE_ORDERS: Boolean!) { + salesToday: ordersTotal(period: TODAY, channel: $channel) @include(if: $PERMISSION_MANAGE_ORDERS) { + gross { + amount + currency + } + } + ordersToday: orders(filter: {created: $datePeriod}, channel: $channel) @include(if: $PERMISSION_MANAGE_ORDERS) { + totalCount + } + ordersToFulfill: orders(filter: {status: READY_TO_FULFILL}, channel: $channel) @include(if: $PERMISSION_MANAGE_ORDERS) { + totalCount + } + ordersToCapture: orders(filter: {status: READY_TO_CAPTURE}, channel: $channel) @include(if: $PERMISSION_MANAGE_ORDERS) { + totalCount + } + productsOutOfStock: products( + filter: {stockAvailability: OUT_OF_STOCK} + channel: $channel + ) { + totalCount + } + productTopToday: reportProductSales(period: TODAY, first: 5, channel: $channel) @include(if: $PERMISSION_MANAGE_PRODUCTS) { + edges { + node { + id + revenue(period: TODAY) { + gross { + amount + currency + } + } + attributes { + values { + id + name + } + } + product { + id + name + thumbnail { + url + } + } + quantityOrdered + } + } + } + activities: homepageEvents(last: 10) @include(if: $PERMISSION_MANAGE_ORDERS) { + edges { + node { + amount + composedId + date + email + emailType + id + message + orderNumber + oversoldItems + quantity + type + user { + id + email + } + } + } + } +} + `; + +/** + * __useHomeQuery__ + * + * To run a query within a React component, call `useHomeQuery` and pass it any options that fit your needs. + * When your component renders, `useHomeQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useHomeQuery({ + * variables: { + * channel: // value for 'channel' + * datePeriod: // value for 'datePeriod' + * PERMISSION_MANAGE_PRODUCTS: // value for 'PERMISSION_MANAGE_PRODUCTS' + * PERMISSION_MANAGE_ORDERS: // value for 'PERMISSION_MANAGE_ORDERS' + * }, + * }); + */ +export function useHomeQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(HomeDocument, options); + } +export function useHomeLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(HomeDocument, options); + } +export type HomeQueryHookResult = ReturnType; +export type HomeLazyQueryHookResult = ReturnType; +export type HomeQueryResult = Apollo.QueryResult; +export const MenuCreateDocument = gql` + mutation MenuCreate($input: MenuCreateInput!) { + menuCreate(input: $input) { + errors { + ...MenuError + } + menu { + id + } + } +} + ${MenuErrorFragmentDoc}`; +export type MenuCreateMutationFn = Apollo.MutationFunction; + +/** + * __useMenuCreateMutation__ + * + * To run a mutation, you first call `useMenuCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useMenuCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [menuCreateMutation, { data, loading, error }] = useMenuCreateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useMenuCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(MenuCreateDocument, options); + } +export type MenuCreateMutationHookResult = ReturnType; +export type MenuCreateMutationResult = Apollo.MutationResult; +export type MenuCreateMutationOptions = Apollo.BaseMutationOptions; +export const MenuBulkDeleteDocument = gql` + mutation MenuBulkDelete($ids: [ID]!) { + menuBulkDelete(ids: $ids) { + errors { + ...MenuError + } + } +} + ${MenuErrorFragmentDoc}`; +export type MenuBulkDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useMenuBulkDeleteMutation__ + * + * To run a mutation, you first call `useMenuBulkDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useMenuBulkDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [menuBulkDeleteMutation, { data, loading, error }] = useMenuBulkDeleteMutation({ + * variables: { + * ids: // value for 'ids' + * }, + * }); + */ +export function useMenuBulkDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(MenuBulkDeleteDocument, options); + } +export type MenuBulkDeleteMutationHookResult = ReturnType; +export type MenuBulkDeleteMutationResult = Apollo.MutationResult; +export type MenuBulkDeleteMutationOptions = Apollo.BaseMutationOptions; +export const MenuDeleteDocument = gql` + mutation MenuDelete($id: ID!) { + menuDelete(id: $id) { + errors { + ...MenuError + } + } +} + ${MenuErrorFragmentDoc}`; +export type MenuDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useMenuDeleteMutation__ + * + * To run a mutation, you first call `useMenuDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useMenuDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [menuDeleteMutation, { data, loading, error }] = useMenuDeleteMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useMenuDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(MenuDeleteDocument, options); + } +export type MenuDeleteMutationHookResult = ReturnType; +export type MenuDeleteMutationResult = Apollo.MutationResult; +export type MenuDeleteMutationOptions = Apollo.BaseMutationOptions; +export const MenuItemCreateDocument = gql` + mutation MenuItemCreate($input: MenuItemCreateInput!) { + menuItemCreate(input: $input) { + errors { + ...MenuError + } + menuItem { + menu { + id + items { + ...MenuItemNested + } + } + } + } +} + ${MenuErrorFragmentDoc} +${MenuItemNestedFragmentDoc}`; +export type MenuItemCreateMutationFn = Apollo.MutationFunction; + +/** + * __useMenuItemCreateMutation__ + * + * To run a mutation, you first call `useMenuItemCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useMenuItemCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [menuItemCreateMutation, { data, loading, error }] = useMenuItemCreateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useMenuItemCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(MenuItemCreateDocument, options); + } +export type MenuItemCreateMutationHookResult = ReturnType; +export type MenuItemCreateMutationResult = Apollo.MutationResult; +export type MenuItemCreateMutationOptions = Apollo.BaseMutationOptions; +export const MenuUpdateDocument = gql` + mutation MenuUpdate($id: ID!, $name: String!, $moves: [MenuItemMoveInput]!, $removeIds: [ID]!) { + menuUpdate(id: $id, input: {name: $name}) { + errors { + ...MenuError + } + } + menuItemMove(menu: $id, moves: $moves) { + errors { + ...MenuError + } + } + menuItemBulkDelete(ids: $removeIds) { + errors { + ...MenuError + } + } +} + ${MenuErrorFragmentDoc}`; +export type MenuUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useMenuUpdateMutation__ + * + * To run a mutation, you first call `useMenuUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useMenuUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [menuUpdateMutation, { data, loading, error }] = useMenuUpdateMutation({ + * variables: { + * id: // value for 'id' + * name: // value for 'name' + * moves: // value for 'moves' + * removeIds: // value for 'removeIds' + * }, + * }); + */ +export function useMenuUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(MenuUpdateDocument, options); + } +export type MenuUpdateMutationHookResult = ReturnType; +export type MenuUpdateMutationResult = Apollo.MutationResult; +export type MenuUpdateMutationOptions = Apollo.BaseMutationOptions; +export const MenuItemUpdateDocument = gql` + mutation MenuItemUpdate($id: ID!, $input: MenuItemInput!) { + menuItemUpdate(id: $id, input: $input) { + errors { + ...MenuError + } + menuItem { + ...MenuItem + } + } +} + ${MenuErrorFragmentDoc} +${MenuItemFragmentDoc}`; +export type MenuItemUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useMenuItemUpdateMutation__ + * + * To run a mutation, you first call `useMenuItemUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useMenuItemUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [menuItemUpdateMutation, { data, loading, error }] = useMenuItemUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useMenuItemUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(MenuItemUpdateDocument, options); + } +export type MenuItemUpdateMutationHookResult = ReturnType; +export type MenuItemUpdateMutationResult = Apollo.MutationResult; +export type MenuItemUpdateMutationOptions = Apollo.BaseMutationOptions; +export const MenuListDocument = gql` + query MenuList($first: Int, $after: String, $last: Int, $before: String, $sort: MenuSortingInput) { + menus(first: $first, after: $after, before: $before, last: $last, sortBy: $sort) { + edges { + node { + ...Menu + } + } + pageInfo { + ...PageInfo + } + } +} + ${MenuFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __useMenuListQuery__ + * + * To run a query within a React component, call `useMenuListQuery` and pass it any options that fit your needs. + * When your component renders, `useMenuListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useMenuListQuery({ + * variables: { + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * sort: // value for 'sort' + * }, + * }); + */ +export function useMenuListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(MenuListDocument, options); + } +export function useMenuListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(MenuListDocument, options); + } +export type MenuListQueryHookResult = ReturnType; +export type MenuListLazyQueryHookResult = ReturnType; +export type MenuListQueryResult = Apollo.QueryResult; +export const MenuDetailsDocument = gql` + query MenuDetails($id: ID!) { + menu(id: $id) { + ...MenuDetails + } +} + ${MenuDetailsFragmentDoc}`; + +/** + * __useMenuDetailsQuery__ + * + * To run a query within a React component, call `useMenuDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useMenuDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useMenuDetailsQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useMenuDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(MenuDetailsDocument, options); + } +export function useMenuDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(MenuDetailsDocument, options); + } +export type MenuDetailsQueryHookResult = ReturnType; +export type MenuDetailsLazyQueryHookResult = ReturnType; +export type MenuDetailsQueryResult = Apollo.QueryResult; +export const OrderCancelDocument = gql` + mutation OrderCancel($id: ID!) { + orderCancel(id: $id) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderCancelMutationFn = Apollo.MutationFunction; + +/** + * __useOrderCancelMutation__ + * + * To run a mutation, you first call `useOrderCancelMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderCancelMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderCancelMutation, { data, loading, error }] = useOrderCancelMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useOrderCancelMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderCancelDocument, options); + } +export type OrderCancelMutationHookResult = ReturnType; +export type OrderCancelMutationResult = Apollo.MutationResult; +export type OrderCancelMutationOptions = Apollo.BaseMutationOptions; +export const OrderDiscountAddDocument = gql` + mutation OrderDiscountAdd($input: OrderDiscountCommonInput!, $orderId: ID!) { + orderDiscountAdd(input: $input, orderId: $orderId) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderDiscountAddMutationFn = Apollo.MutationFunction; + +/** + * __useOrderDiscountAddMutation__ + * + * To run a mutation, you first call `useOrderDiscountAddMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderDiscountAddMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderDiscountAddMutation, { data, loading, error }] = useOrderDiscountAddMutation({ + * variables: { + * input: // value for 'input' + * orderId: // value for 'orderId' + * }, + * }); + */ +export function useOrderDiscountAddMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderDiscountAddDocument, options); + } +export type OrderDiscountAddMutationHookResult = ReturnType; +export type OrderDiscountAddMutationResult = Apollo.MutationResult; +export type OrderDiscountAddMutationOptions = Apollo.BaseMutationOptions; +export const OrderDiscountDeleteDocument = gql` + mutation OrderDiscountDelete($discountId: ID!) { + orderDiscountDelete(discountId: $discountId) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderDiscountDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useOrderDiscountDeleteMutation__ + * + * To run a mutation, you first call `useOrderDiscountDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderDiscountDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderDiscountDeleteMutation, { data, loading, error }] = useOrderDiscountDeleteMutation({ + * variables: { + * discountId: // value for 'discountId' + * }, + * }); + */ +export function useOrderDiscountDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderDiscountDeleteDocument, options); + } +export type OrderDiscountDeleteMutationHookResult = ReturnType; +export type OrderDiscountDeleteMutationResult = Apollo.MutationResult; +export type OrderDiscountDeleteMutationOptions = Apollo.BaseMutationOptions; +export const OrderLineDiscountRemoveDocument = gql` + mutation OrderLineDiscountRemove($orderLineId: ID!) { + orderLineDiscountRemove(orderLineId: $orderLineId) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderLineDiscountRemoveMutationFn = Apollo.MutationFunction; + +/** + * __useOrderLineDiscountRemoveMutation__ + * + * To run a mutation, you first call `useOrderLineDiscountRemoveMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderLineDiscountRemoveMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderLineDiscountRemoveMutation, { data, loading, error }] = useOrderLineDiscountRemoveMutation({ + * variables: { + * orderLineId: // value for 'orderLineId' + * }, + * }); + */ +export function useOrderLineDiscountRemoveMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderLineDiscountRemoveDocument, options); + } +export type OrderLineDiscountRemoveMutationHookResult = ReturnType; +export type OrderLineDiscountRemoveMutationResult = Apollo.MutationResult; +export type OrderLineDiscountRemoveMutationOptions = Apollo.BaseMutationOptions; +export const OrderLineDiscountUpdateDocument = gql` + mutation OrderLineDiscountUpdate($input: OrderDiscountCommonInput!, $orderLineId: ID!) { + orderLineDiscountUpdate(input: $input, orderLineId: $orderLineId) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderLineDiscountUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useOrderLineDiscountUpdateMutation__ + * + * To run a mutation, you first call `useOrderLineDiscountUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderLineDiscountUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderLineDiscountUpdateMutation, { data, loading, error }] = useOrderLineDiscountUpdateMutation({ + * variables: { + * input: // value for 'input' + * orderLineId: // value for 'orderLineId' + * }, + * }); + */ +export function useOrderLineDiscountUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderLineDiscountUpdateDocument, options); + } +export type OrderLineDiscountUpdateMutationHookResult = ReturnType; +export type OrderLineDiscountUpdateMutationResult = Apollo.MutationResult; +export type OrderLineDiscountUpdateMutationOptions = Apollo.BaseMutationOptions; +export const OrderDiscountUpdateDocument = gql` + mutation OrderDiscountUpdate($input: OrderDiscountCommonInput!, $discountId: ID!) { + orderDiscountUpdate(input: $input, discountId: $discountId) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderDiscountUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useOrderDiscountUpdateMutation__ + * + * To run a mutation, you first call `useOrderDiscountUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderDiscountUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderDiscountUpdateMutation, { data, loading, error }] = useOrderDiscountUpdateMutation({ + * variables: { + * input: // value for 'input' + * discountId: // value for 'discountId' + * }, + * }); + */ +export function useOrderDiscountUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderDiscountUpdateDocument, options); + } +export type OrderDiscountUpdateMutationHookResult = ReturnType; +export type OrderDiscountUpdateMutationResult = Apollo.MutationResult; +export type OrderDiscountUpdateMutationOptions = Apollo.BaseMutationOptions; +export const OrderDraftCancelDocument = gql` + mutation OrderDraftCancel($id: ID!) { + draftOrderDelete(id: $id) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderDraftCancelMutationFn = Apollo.MutationFunction; + +/** + * __useOrderDraftCancelMutation__ + * + * To run a mutation, you first call `useOrderDraftCancelMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderDraftCancelMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderDraftCancelMutation, { data, loading, error }] = useOrderDraftCancelMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useOrderDraftCancelMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderDraftCancelDocument, options); + } +export type OrderDraftCancelMutationHookResult = ReturnType; +export type OrderDraftCancelMutationResult = Apollo.MutationResult; +export type OrderDraftCancelMutationOptions = Apollo.BaseMutationOptions; +export const OrderDraftBulkCancelDocument = gql` + mutation OrderDraftBulkCancel($ids: [ID]!) { + draftOrderBulkDelete(ids: $ids) { + errors { + ...OrderError + } + } +} + ${OrderErrorFragmentDoc}`; +export type OrderDraftBulkCancelMutationFn = Apollo.MutationFunction; + +/** + * __useOrderDraftBulkCancelMutation__ + * + * To run a mutation, you first call `useOrderDraftBulkCancelMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderDraftBulkCancelMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderDraftBulkCancelMutation, { data, loading, error }] = useOrderDraftBulkCancelMutation({ + * variables: { + * ids: // value for 'ids' + * }, + * }); + */ +export function useOrderDraftBulkCancelMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderDraftBulkCancelDocument, options); + } +export type OrderDraftBulkCancelMutationHookResult = ReturnType; +export type OrderDraftBulkCancelMutationResult = Apollo.MutationResult; +export type OrderDraftBulkCancelMutationOptions = Apollo.BaseMutationOptions; +export const OrderConfirmDocument = gql` + mutation OrderConfirm($id: ID!) { + orderConfirm(id: $id) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderConfirmMutationFn = Apollo.MutationFunction; + +/** + * __useOrderConfirmMutation__ + * + * To run a mutation, you first call `useOrderConfirmMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderConfirmMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderConfirmMutation, { data, loading, error }] = useOrderConfirmMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useOrderConfirmMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderConfirmDocument, options); + } +export type OrderConfirmMutationHookResult = ReturnType; +export type OrderConfirmMutationResult = Apollo.MutationResult; +export type OrderConfirmMutationOptions = Apollo.BaseMutationOptions; +export const OrderDraftFinalizeDocument = gql` + mutation OrderDraftFinalize($id: ID!) { + draftOrderComplete(id: $id) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderDraftFinalizeMutationFn = Apollo.MutationFunction; + +/** + * __useOrderDraftFinalizeMutation__ + * + * To run a mutation, you first call `useOrderDraftFinalizeMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderDraftFinalizeMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderDraftFinalizeMutation, { data, loading, error }] = useOrderDraftFinalizeMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useOrderDraftFinalizeMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderDraftFinalizeDocument, options); + } +export type OrderDraftFinalizeMutationHookResult = ReturnType; +export type OrderDraftFinalizeMutationResult = Apollo.MutationResult; +export type OrderDraftFinalizeMutationOptions = Apollo.BaseMutationOptions; +export const FulfillmentReturnProductsDocument = gql` + mutation FulfillmentReturnProducts($id: ID!, $input: OrderReturnProductsInput!) { + orderFulfillmentReturnProducts(input: $input, order: $id) { + errors { + ...OrderError + } + order { + id + } + replaceOrder { + id + } + } +} + ${OrderErrorFragmentDoc}`; +export type FulfillmentReturnProductsMutationFn = Apollo.MutationFunction; + +/** + * __useFulfillmentReturnProductsMutation__ + * + * To run a mutation, you first call `useFulfillmentReturnProductsMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useFulfillmentReturnProductsMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [fulfillmentReturnProductsMutation, { data, loading, error }] = useFulfillmentReturnProductsMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useFulfillmentReturnProductsMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(FulfillmentReturnProductsDocument, options); + } +export type FulfillmentReturnProductsMutationHookResult = ReturnType; +export type FulfillmentReturnProductsMutationResult = Apollo.MutationResult; +export type FulfillmentReturnProductsMutationOptions = Apollo.BaseMutationOptions; +export const OrderRefundDocument = gql` + mutation OrderRefund($id: ID!, $amount: PositiveDecimal!) { + orderRefund(id: $id, amount: $amount) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderRefundMutationFn = Apollo.MutationFunction; + +/** + * __useOrderRefundMutation__ + * + * To run a mutation, you first call `useOrderRefundMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderRefundMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderRefundMutation, { data, loading, error }] = useOrderRefundMutation({ + * variables: { + * id: // value for 'id' + * amount: // value for 'amount' + * }, + * }); + */ +export function useOrderRefundMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderRefundDocument, options); + } +export type OrderRefundMutationHookResult = ReturnType; +export type OrderRefundMutationResult = Apollo.MutationResult; +export type OrderRefundMutationOptions = Apollo.BaseMutationOptions; +export const OrderFulfillmentRefundProductsDocument = gql` + mutation OrderFulfillmentRefundProducts($input: OrderRefundProductsInput!, $order: ID!) { + orderFulfillmentRefundProducts(input: $input, order: $order) { + errors { + ...OrderError + } + fulfillment { + ...Fulfillment + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${FulfillmentFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderFulfillmentRefundProductsMutationFn = Apollo.MutationFunction; + +/** + * __useOrderFulfillmentRefundProductsMutation__ + * + * To run a mutation, you first call `useOrderFulfillmentRefundProductsMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderFulfillmentRefundProductsMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderFulfillmentRefundProductsMutation, { data, loading, error }] = useOrderFulfillmentRefundProductsMutation({ + * variables: { + * input: // value for 'input' + * order: // value for 'order' + * }, + * }); + */ +export function useOrderFulfillmentRefundProductsMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderFulfillmentRefundProductsDocument, options); + } +export type OrderFulfillmentRefundProductsMutationHookResult = ReturnType; +export type OrderFulfillmentRefundProductsMutationResult = Apollo.MutationResult; +export type OrderFulfillmentRefundProductsMutationOptions = Apollo.BaseMutationOptions; +export const OrderVoidDocument = gql` + mutation OrderVoid($id: ID!) { + orderVoid(id: $id) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderVoidMutationFn = Apollo.MutationFunction; + +/** + * __useOrderVoidMutation__ + * + * To run a mutation, you first call `useOrderVoidMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderVoidMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderVoidMutation, { data, loading, error }] = useOrderVoidMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useOrderVoidMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderVoidDocument, options); + } +export type OrderVoidMutationHookResult = ReturnType; +export type OrderVoidMutationResult = Apollo.MutationResult; +export type OrderVoidMutationOptions = Apollo.BaseMutationOptions; +export const OrderMarkAsPaidDocument = gql` + mutation OrderMarkAsPaid($id: ID!, $transactionReference: String) { + orderMarkAsPaid(id: $id, transactionReference: $transactionReference) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderMarkAsPaidMutationFn = Apollo.MutationFunction; + +/** + * __useOrderMarkAsPaidMutation__ + * + * To run a mutation, you first call `useOrderMarkAsPaidMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderMarkAsPaidMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderMarkAsPaidMutation, { data, loading, error }] = useOrderMarkAsPaidMutation({ + * variables: { + * id: // value for 'id' + * transactionReference: // value for 'transactionReference' + * }, + * }); + */ +export function useOrderMarkAsPaidMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderMarkAsPaidDocument, options); + } +export type OrderMarkAsPaidMutationHookResult = ReturnType; +export type OrderMarkAsPaidMutationResult = Apollo.MutationResult; +export type OrderMarkAsPaidMutationOptions = Apollo.BaseMutationOptions; +export const OrderCaptureDocument = gql` + mutation OrderCapture($id: ID!, $amount: PositiveDecimal!) { + orderCapture(id: $id, amount: $amount) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderCaptureMutationFn = Apollo.MutationFunction; + +/** + * __useOrderCaptureMutation__ + * + * To run a mutation, you first call `useOrderCaptureMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderCaptureMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderCaptureMutation, { data, loading, error }] = useOrderCaptureMutation({ + * variables: { + * id: // value for 'id' + * amount: // value for 'amount' + * }, + * }); + */ +export function useOrderCaptureMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderCaptureDocument, options); + } +export type OrderCaptureMutationHookResult = ReturnType; +export type OrderCaptureMutationResult = Apollo.MutationResult; +export type OrderCaptureMutationOptions = Apollo.BaseMutationOptions; +export const OrderFulfillmentUpdateTrackingDocument = gql` + mutation OrderFulfillmentUpdateTracking($id: ID!, $input: FulfillmentUpdateTrackingInput!) { + orderFulfillmentUpdateTracking(id: $id, input: $input) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderFulfillmentUpdateTrackingMutationFn = Apollo.MutationFunction; + +/** + * __useOrderFulfillmentUpdateTrackingMutation__ + * + * To run a mutation, you first call `useOrderFulfillmentUpdateTrackingMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderFulfillmentUpdateTrackingMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderFulfillmentUpdateTrackingMutation, { data, loading, error }] = useOrderFulfillmentUpdateTrackingMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useOrderFulfillmentUpdateTrackingMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderFulfillmentUpdateTrackingDocument, options); + } +export type OrderFulfillmentUpdateTrackingMutationHookResult = ReturnType; +export type OrderFulfillmentUpdateTrackingMutationResult = Apollo.MutationResult; +export type OrderFulfillmentUpdateTrackingMutationOptions = Apollo.BaseMutationOptions; +export const OrderFulfillmentApproveDocument = gql` + mutation OrderFulfillmentApprove($id: ID!, $notifyCustomer: Boolean!) { + orderFulfillmentApprove(id: $id, notifyCustomer: $notifyCustomer) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderFulfillmentApproveMutationFn = Apollo.MutationFunction; + +/** + * __useOrderFulfillmentApproveMutation__ + * + * To run a mutation, you first call `useOrderFulfillmentApproveMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderFulfillmentApproveMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderFulfillmentApproveMutation, { data, loading, error }] = useOrderFulfillmentApproveMutation({ + * variables: { + * id: // value for 'id' + * notifyCustomer: // value for 'notifyCustomer' + * }, + * }); + */ +export function useOrderFulfillmentApproveMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderFulfillmentApproveDocument, options); + } +export type OrderFulfillmentApproveMutationHookResult = ReturnType; +export type OrderFulfillmentApproveMutationResult = Apollo.MutationResult; +export type OrderFulfillmentApproveMutationOptions = Apollo.BaseMutationOptions; +export const OrderFulfillmentCancelDocument = gql` + mutation OrderFulfillmentCancel($id: ID!, $input: FulfillmentCancelInput!) { + orderFulfillmentCancel(id: $id, input: $input) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderFulfillmentCancelMutationFn = Apollo.MutationFunction; + +/** + * __useOrderFulfillmentCancelMutation__ + * + * To run a mutation, you first call `useOrderFulfillmentCancelMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderFulfillmentCancelMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderFulfillmentCancelMutation, { data, loading, error }] = useOrderFulfillmentCancelMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useOrderFulfillmentCancelMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderFulfillmentCancelDocument, options); + } +export type OrderFulfillmentCancelMutationHookResult = ReturnType; +export type OrderFulfillmentCancelMutationResult = Apollo.MutationResult; +export type OrderFulfillmentCancelMutationOptions = Apollo.BaseMutationOptions; +export const OrderAddNoteDocument = gql` + mutation OrderAddNote($order: ID!, $input: OrderAddNoteInput!) { + orderAddNote(order: $order, input: $input) { + errors { + ...OrderError + } + order { + id + events { + ...OrderEvent + } + } + } +} + ${OrderErrorFragmentDoc} +${OrderEventFragmentDoc}`; +export type OrderAddNoteMutationFn = Apollo.MutationFunction; + +/** + * __useOrderAddNoteMutation__ + * + * To run a mutation, you first call `useOrderAddNoteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderAddNoteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderAddNoteMutation, { data, loading, error }] = useOrderAddNoteMutation({ + * variables: { + * order: // value for 'order' + * input: // value for 'input' + * }, + * }); + */ +export function useOrderAddNoteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderAddNoteDocument, options); + } +export type OrderAddNoteMutationHookResult = ReturnType; +export type OrderAddNoteMutationResult = Apollo.MutationResult; +export type OrderAddNoteMutationOptions = Apollo.BaseMutationOptions; +export const OrderUpdateDocument = gql` + mutation OrderUpdate($id: ID!, $input: OrderUpdateInput!) { + orderUpdate(id: $id, input: $input) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useOrderUpdateMutation__ + * + * To run a mutation, you first call `useOrderUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderUpdateMutation, { data, loading, error }] = useOrderUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useOrderUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderUpdateDocument, options); + } +export type OrderUpdateMutationHookResult = ReturnType; +export type OrderUpdateMutationResult = Apollo.MutationResult; +export type OrderUpdateMutationOptions = Apollo.BaseMutationOptions; +export const OrderDraftUpdateDocument = gql` + mutation OrderDraftUpdate($id: ID!, $input: DraftOrderInput!) { + draftOrderUpdate(id: $id, input: $input) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderDraftUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useOrderDraftUpdateMutation__ + * + * To run a mutation, you first call `useOrderDraftUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderDraftUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderDraftUpdateMutation, { data, loading, error }] = useOrderDraftUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useOrderDraftUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderDraftUpdateDocument, options); + } +export type OrderDraftUpdateMutationHookResult = ReturnType; +export type OrderDraftUpdateMutationResult = Apollo.MutationResult; +export type OrderDraftUpdateMutationOptions = Apollo.BaseMutationOptions; +export const OrderShippingMethodUpdateDocument = gql` + mutation OrderShippingMethodUpdate($id: ID!, $input: OrderUpdateShippingInput!) { + orderUpdateShipping(order: $id, input: $input) { + errors { + ...OrderError + } + order { + shippingMethods { + id + name + } + total { + tax { + amount + currency + } + gross { + amount + currency + } + } + id + shippingMethod { + id + name + price { + amount + currency + } + } + shippingMethodName + shippingPrice { + gross { + amount + currency + } + } + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderShippingMethodUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useOrderShippingMethodUpdateMutation__ + * + * To run a mutation, you first call `useOrderShippingMethodUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderShippingMethodUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderShippingMethodUpdateMutation, { data, loading, error }] = useOrderShippingMethodUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useOrderShippingMethodUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderShippingMethodUpdateDocument, options); + } +export type OrderShippingMethodUpdateMutationHookResult = ReturnType; +export type OrderShippingMethodUpdateMutationResult = Apollo.MutationResult; +export type OrderShippingMethodUpdateMutationOptions = Apollo.BaseMutationOptions; +export const OrderDraftCreateDocument = gql` + mutation OrderDraftCreate($input: DraftOrderCreateInput!) { + draftOrderCreate(input: $input) { + errors { + ...OrderError + } + order { + id + } + } +} + ${OrderErrorFragmentDoc}`; +export type OrderDraftCreateMutationFn = Apollo.MutationFunction; + +/** + * __useOrderDraftCreateMutation__ + * + * To run a mutation, you first call `useOrderDraftCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderDraftCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderDraftCreateMutation, { data, loading, error }] = useOrderDraftCreateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useOrderDraftCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderDraftCreateDocument, options); + } +export type OrderDraftCreateMutationHookResult = ReturnType; +export type OrderDraftCreateMutationResult = Apollo.MutationResult; +export type OrderDraftCreateMutationOptions = Apollo.BaseMutationOptions; +export const OrderLineDeleteDocument = gql` + mutation OrderLineDelete($id: ID!) { + orderLineDelete(id: $id) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderLineDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useOrderLineDeleteMutation__ + * + * To run a mutation, you first call `useOrderLineDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderLineDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderLineDeleteMutation, { data, loading, error }] = useOrderLineDeleteMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useOrderLineDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderLineDeleteDocument, options); + } +export type OrderLineDeleteMutationHookResult = ReturnType; +export type OrderLineDeleteMutationResult = Apollo.MutationResult; +export type OrderLineDeleteMutationOptions = Apollo.BaseMutationOptions; +export const OrderLinesAddDocument = gql` + mutation OrderLinesAdd($id: ID!, $input: [OrderLineCreateInput]!) { + orderLinesCreate(id: $id, input: $input) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderLinesAddMutationFn = Apollo.MutationFunction; + +/** + * __useOrderLinesAddMutation__ + * + * To run a mutation, you first call `useOrderLinesAddMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderLinesAddMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderLinesAddMutation, { data, loading, error }] = useOrderLinesAddMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useOrderLinesAddMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderLinesAddDocument, options); + } +export type OrderLinesAddMutationHookResult = ReturnType; +export type OrderLinesAddMutationResult = Apollo.MutationResult; +export type OrderLinesAddMutationOptions = Apollo.BaseMutationOptions; +export const OrderLineUpdateDocument = gql` + mutation OrderLineUpdate($id: ID!, $input: OrderLineInput!) { + orderLineUpdate(id: $id, input: $input) { + errors { + ...OrderError + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type OrderLineUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useOrderLineUpdateMutation__ + * + * To run a mutation, you first call `useOrderLineUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderLineUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderLineUpdateMutation, { data, loading, error }] = useOrderLineUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useOrderLineUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderLineUpdateDocument, options); + } +export type OrderLineUpdateMutationHookResult = ReturnType; +export type OrderLineUpdateMutationResult = Apollo.MutationResult; +export type OrderLineUpdateMutationOptions = Apollo.BaseMutationOptions; +export const FulfillOrderDocument = gql` + mutation FulfillOrder($orderId: ID!, $input: OrderFulfillInput!) { + orderFulfill(order: $orderId, input: $input) { + errors { + ...OrderError + warehouse + orderLines + } + order { + ...OrderDetails + } + } +} + ${OrderErrorFragmentDoc} +${OrderDetailsFragmentDoc}`; +export type FulfillOrderMutationFn = Apollo.MutationFunction; + +/** + * __useFulfillOrderMutation__ + * + * To run a mutation, you first call `useFulfillOrderMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useFulfillOrderMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [fulfillOrderMutation, { data, loading, error }] = useFulfillOrderMutation({ + * variables: { + * orderId: // value for 'orderId' + * input: // value for 'input' + * }, + * }); + */ +export function useFulfillOrderMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(FulfillOrderDocument, options); + } +export type FulfillOrderMutationHookResult = ReturnType; +export type FulfillOrderMutationResult = Apollo.MutationResult; +export type FulfillOrderMutationOptions = Apollo.BaseMutationOptions; +export const InvoiceRequestDocument = gql` + mutation InvoiceRequest($orderId: ID!) { + invoiceRequest(orderId: $orderId) { + errors { + ...InvoiceError + } + invoice { + ...Invoice + } + order { + id + invoices { + ...Invoice + } + } + } +} + ${InvoiceErrorFragmentDoc} +${InvoiceFragmentDoc}`; +export type InvoiceRequestMutationFn = Apollo.MutationFunction; + +/** + * __useInvoiceRequestMutation__ + * + * To run a mutation, you first call `useInvoiceRequestMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useInvoiceRequestMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [invoiceRequestMutation, { data, loading, error }] = useInvoiceRequestMutation({ + * variables: { + * orderId: // value for 'orderId' + * }, + * }); + */ +export function useInvoiceRequestMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(InvoiceRequestDocument, options); + } +export type InvoiceRequestMutationHookResult = ReturnType; +export type InvoiceRequestMutationResult = Apollo.MutationResult; +export type InvoiceRequestMutationOptions = Apollo.BaseMutationOptions; +export const InvoiceEmailSendDocument = gql` + mutation InvoiceEmailSend($id: ID!) { + invoiceSendNotification(id: $id) { + errors { + ...InvoiceError + } + invoice { + ...Invoice + } + } +} + ${InvoiceErrorFragmentDoc} +${InvoiceFragmentDoc}`; +export type InvoiceEmailSendMutationFn = Apollo.MutationFunction; + +/** + * __useInvoiceEmailSendMutation__ + * + * To run a mutation, you first call `useInvoiceEmailSendMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useInvoiceEmailSendMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [invoiceEmailSendMutation, { data, loading, error }] = useInvoiceEmailSendMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useInvoiceEmailSendMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(InvoiceEmailSendDocument, options); + } +export type InvoiceEmailSendMutationHookResult = ReturnType; +export type InvoiceEmailSendMutationResult = Apollo.MutationResult; +export type InvoiceEmailSendMutationOptions = Apollo.BaseMutationOptions; +export const OrderSettingsUpdateDocument = gql` + mutation OrderSettingsUpdate($orderSettingsInput: OrderSettingsUpdateInput!, $shopSettingsInput: ShopSettingsInput!) { + orderSettingsUpdate(input: $orderSettingsInput) { + errors { + ...OrderSettingsError + } + orderSettings { + ...OrderSettings + } + } + shopSettingsUpdate(input: $shopSettingsInput) { + errors { + ...ShopError + } + shop { + ...ShopOrderSettings + } + } +} + ${OrderSettingsErrorFragmentDoc} +${OrderSettingsFragmentDoc} +${ShopErrorFragmentDoc} +${ShopOrderSettingsFragmentDoc}`; +export type OrderSettingsUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useOrderSettingsUpdateMutation__ + * + * To run a mutation, you first call `useOrderSettingsUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useOrderSettingsUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [orderSettingsUpdateMutation, { data, loading, error }] = useOrderSettingsUpdateMutation({ + * variables: { + * orderSettingsInput: // value for 'orderSettingsInput' + * shopSettingsInput: // value for 'shopSettingsInput' + * }, + * }); + */ +export function useOrderSettingsUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(OrderSettingsUpdateDocument, options); + } +export type OrderSettingsUpdateMutationHookResult = ReturnType; +export type OrderSettingsUpdateMutationResult = Apollo.MutationResult; +export type OrderSettingsUpdateMutationOptions = Apollo.BaseMutationOptions; +export const OrderListDocument = gql` + query OrderList($first: Int, $after: String, $last: Int, $before: String, $filter: OrderFilterInput, $sort: OrderSortingInput) { + orders( + before: $before + after: $after + first: $first + last: $last + filter: $filter + sortBy: $sort + ) { + edges { + node { + __typename + billingAddress { + ...Address + } + created + id + number + paymentStatus + status + total { + __typename + gross { + __typename + amount + currency + } + } + userEmail + } + } + pageInfo { + hasPreviousPage + hasNextPage + startCursor + endCursor + } + } +} + ${AddressFragmentDoc}`; + +/** + * __useOrderListQuery__ + * + * To run a query within a React component, call `useOrderListQuery` and pass it any options that fit your needs. + * When your component renders, `useOrderListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useOrderListQuery({ + * variables: { + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * filter: // value for 'filter' + * sort: // value for 'sort' + * }, + * }); + */ +export function useOrderListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(OrderListDocument, options); + } +export function useOrderListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(OrderListDocument, options); + } +export type OrderListQueryHookResult = ReturnType; +export type OrderListLazyQueryHookResult = ReturnType; +export type OrderListQueryResult = Apollo.QueryResult; +export const OrderDraftListDocument = gql` + query OrderDraftList($first: Int, $after: String, $last: Int, $before: String, $filter: OrderDraftFilterInput, $sort: OrderSortingInput) { + draftOrders( + before: $before + after: $after + first: $first + last: $last + filter: $filter + sortBy: $sort + ) { + edges { + node { + __typename + billingAddress { + ...Address + } + created + id + number + paymentStatus + status + total { + __typename + gross { + __typename + amount + currency + } + } + userEmail + } + } + pageInfo { + hasPreviousPage + hasNextPage + startCursor + endCursor + } + } +} + ${AddressFragmentDoc}`; + +/** + * __useOrderDraftListQuery__ + * + * To run a query within a React component, call `useOrderDraftListQuery` and pass it any options that fit your needs. + * When your component renders, `useOrderDraftListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useOrderDraftListQuery({ + * variables: { + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * filter: // value for 'filter' + * sort: // value for 'sort' + * }, + * }); + */ +export function useOrderDraftListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(OrderDraftListDocument, options); + } +export function useOrderDraftListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(OrderDraftListDocument, options); + } +export type OrderDraftListQueryHookResult = ReturnType; +export type OrderDraftListLazyQueryHookResult = ReturnType; +export type OrderDraftListQueryResult = Apollo.QueryResult; +export const OrderDetailsDocument = gql` + query OrderDetails($id: ID!) { + order(id: $id) { + ...OrderDetails + } + shop { + countries { + code + country + } + defaultWeightUnit + fulfillmentAllowUnpaid + fulfillmentAutoApprove + } +} + ${OrderDetailsFragmentDoc}`; + +/** + * __useOrderDetailsQuery__ + * + * To run a query within a React component, call `useOrderDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useOrderDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useOrderDetailsQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useOrderDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(OrderDetailsDocument, options); + } +export function useOrderDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(OrderDetailsDocument, options); + } +export type OrderDetailsQueryHookResult = ReturnType; +export type OrderDetailsLazyQueryHookResult = ReturnType; +export type OrderDetailsQueryResult = Apollo.QueryResult; +export const OrderFulfillDataDocument = gql` + query OrderFulfillData($orderId: ID!) { + order(id: $orderId) { + id + isPaid + deliveryMethod { + __typename + ... on ShippingMethod { + id + } + ... on Warehouse { + id + clickAndCollectOption + } + } + lines { + id + isShippingRequired + productName + quantity + allocations { + quantity + warehouse { + id + } + } + quantityFulfilled + quantityToFulfill + variant { + id + name + sku + preorder { + endDate + } + attributes { + values { + id + name + } + } + stocks { + id + warehouse { + ...Warehouse + } + quantity + quantityAllocated + } + trackInventory + } + thumbnail(size: 64) { + url + } + } + number + } +} + ${WarehouseFragmentDoc}`; + +/** + * __useOrderFulfillDataQuery__ + * + * To run a query within a React component, call `useOrderFulfillDataQuery` and pass it any options that fit your needs. + * When your component renders, `useOrderFulfillDataQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useOrderFulfillDataQuery({ + * variables: { + * orderId: // value for 'orderId' + * }, + * }); + */ +export function useOrderFulfillDataQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(OrderFulfillDataDocument, options); + } +export function useOrderFulfillDataLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(OrderFulfillDataDocument, options); + } +export type OrderFulfillDataQueryHookResult = ReturnType; +export type OrderFulfillDataLazyQueryHookResult = ReturnType; +export type OrderFulfillDataQueryResult = Apollo.QueryResult; +export const OrderFulfillSettingsDocument = gql` + query OrderFulfillSettings { + shop { + ...ShopOrderSettings + } +} + ${ShopOrderSettingsFragmentDoc}`; + +/** + * __useOrderFulfillSettingsQuery__ + * + * To run a query within a React component, call `useOrderFulfillSettingsQuery` and pass it any options that fit your needs. + * When your component renders, `useOrderFulfillSettingsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useOrderFulfillSettingsQuery({ + * variables: { + * }, + * }); + */ +export function useOrderFulfillSettingsQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(OrderFulfillSettingsDocument, options); + } +export function useOrderFulfillSettingsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(OrderFulfillSettingsDocument, options); + } +export type OrderFulfillSettingsQueryHookResult = ReturnType; +export type OrderFulfillSettingsLazyQueryHookResult = ReturnType; +export type OrderFulfillSettingsQueryResult = Apollo.QueryResult; +export const OrderSettingsDocument = gql` + query OrderSettings { + orderSettings { + ...OrderSettings + } + shop { + ...ShopOrderSettings + } +} + ${OrderSettingsFragmentDoc} +${ShopOrderSettingsFragmentDoc}`; + +/** + * __useOrderSettingsQuery__ + * + * To run a query within a React component, call `useOrderSettingsQuery` and pass it any options that fit your needs. + * When your component renders, `useOrderSettingsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useOrderSettingsQuery({ + * variables: { + * }, + * }); + */ +export function useOrderSettingsQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(OrderSettingsDocument, options); + } +export function useOrderSettingsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(OrderSettingsDocument, options); + } +export type OrderSettingsQueryHookResult = ReturnType; +export type OrderSettingsLazyQueryHookResult = ReturnType; +export type OrderSettingsQueryResult = Apollo.QueryResult; +export const OrderRefundDataDocument = gql` + query OrderRefundData($orderId: ID!) { + order(id: $orderId) { + id + number + total { + gross { + ...Money + } + } + totalCaptured { + ...Money + } + shippingPrice { + gross { + ...Money + } + } + lines { + ...RefundOrderLine + quantityToFulfill + } + fulfillments { + id + status + fulfillmentOrder + lines { + id + quantity + orderLine { + ...RefundOrderLine + } + } + } + } +} + ${MoneyFragmentDoc} +${RefundOrderLineFragmentDoc}`; + +/** + * __useOrderRefundDataQuery__ + * + * To run a query within a React component, call `useOrderRefundDataQuery` and pass it any options that fit your needs. + * When your component renders, `useOrderRefundDataQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useOrderRefundDataQuery({ + * variables: { + * orderId: // value for 'orderId' + * }, + * }); + */ +export function useOrderRefundDataQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(OrderRefundDataDocument, options); + } +export function useOrderRefundDataLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(OrderRefundDataDocument, options); + } +export type OrderRefundDataQueryHookResult = ReturnType; +export type OrderRefundDataLazyQueryHookResult = ReturnType; +export type OrderRefundDataQueryResult = Apollo.QueryResult; +export const PageTypeUpdateDocument = gql` + mutation PageTypeUpdate($id: ID!, $input: PageTypeUpdateInput!) { + pageTypeUpdate(id: $id, input: $input) { + errors { + ...PageError + } + pageType { + ...PageTypeDetails + } + } +} + ${PageErrorFragmentDoc} +${PageTypeDetailsFragmentDoc}`; +export type PageTypeUpdateMutationFn = Apollo.MutationFunction; + +/** + * __usePageTypeUpdateMutation__ + * + * To run a mutation, you first call `usePageTypeUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `usePageTypeUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [pageTypeUpdateMutation, { data, loading, error }] = usePageTypeUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function usePageTypeUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(PageTypeUpdateDocument, options); + } +export type PageTypeUpdateMutationHookResult = ReturnType; +export type PageTypeUpdateMutationResult = Apollo.MutationResult; +export type PageTypeUpdateMutationOptions = Apollo.BaseMutationOptions; +export const PageTypeCreateDocument = gql` + mutation PageTypeCreate($input: PageTypeCreateInput!) { + pageTypeCreate(input: $input) { + errors { + ...PageError + } + pageType { + ...PageTypeDetails + } + } +} + ${PageErrorFragmentDoc} +${PageTypeDetailsFragmentDoc}`; +export type PageTypeCreateMutationFn = Apollo.MutationFunction; + +/** + * __usePageTypeCreateMutation__ + * + * To run a mutation, you first call `usePageTypeCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `usePageTypeCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [pageTypeCreateMutation, { data, loading, error }] = usePageTypeCreateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function usePageTypeCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(PageTypeCreateDocument, options); + } +export type PageTypeCreateMutationHookResult = ReturnType; +export type PageTypeCreateMutationResult = Apollo.MutationResult; +export type PageTypeCreateMutationOptions = Apollo.BaseMutationOptions; +export const AssignPageAttributeDocument = gql` + mutation AssignPageAttribute($id: ID!, $ids: [ID!]!) { + pageAttributeAssign(pageTypeId: $id, attributeIds: $ids) { + errors { + ...PageError + } + pageType { + ...PageTypeDetails + } + } +} + ${PageErrorFragmentDoc} +${PageTypeDetailsFragmentDoc}`; +export type AssignPageAttributeMutationFn = Apollo.MutationFunction; + +/** + * __useAssignPageAttributeMutation__ + * + * To run a mutation, you first call `useAssignPageAttributeMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAssignPageAttributeMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [assignPageAttributeMutation, { data, loading, error }] = useAssignPageAttributeMutation({ + * variables: { + * id: // value for 'id' + * ids: // value for 'ids' + * }, + * }); + */ +export function useAssignPageAttributeMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AssignPageAttributeDocument, options); + } +export type AssignPageAttributeMutationHookResult = ReturnType; +export type AssignPageAttributeMutationResult = Apollo.MutationResult; +export type AssignPageAttributeMutationOptions = Apollo.BaseMutationOptions; +export const UnassignPageAttributeDocument = gql` + mutation UnassignPageAttribute($id: ID!, $ids: [ID!]!) { + pageAttributeUnassign(pageTypeId: $id, attributeIds: $ids) { + errors { + ...PageError + } + pageType { + ...PageTypeDetails + } + } +} + ${PageErrorFragmentDoc} +${PageTypeDetailsFragmentDoc}`; +export type UnassignPageAttributeMutationFn = Apollo.MutationFunction; + +/** + * __useUnassignPageAttributeMutation__ + * + * To run a mutation, you first call `useUnassignPageAttributeMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUnassignPageAttributeMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [unassignPageAttributeMutation, { data, loading, error }] = useUnassignPageAttributeMutation({ + * variables: { + * id: // value for 'id' + * ids: // value for 'ids' + * }, + * }); + */ +export function useUnassignPageAttributeMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UnassignPageAttributeDocument, options); + } +export type UnassignPageAttributeMutationHookResult = ReturnType; +export type UnassignPageAttributeMutationResult = Apollo.MutationResult; +export type UnassignPageAttributeMutationOptions = Apollo.BaseMutationOptions; +export const PageTypeDeleteDocument = gql` + mutation PageTypeDelete($id: ID!) { + pageTypeDelete(id: $id) { + errors { + ...PageTypeDeleteErrorFragment + } + pageType { + id + } + } +} + ${PageTypeDeleteErrorFragmentFragmentDoc}`; +export type PageTypeDeleteMutationFn = Apollo.MutationFunction; + +/** + * __usePageTypeDeleteMutation__ + * + * To run a mutation, you first call `usePageTypeDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `usePageTypeDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [pageTypeDeleteMutation, { data, loading, error }] = usePageTypeDeleteMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function usePageTypeDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(PageTypeDeleteDocument, options); + } +export type PageTypeDeleteMutationHookResult = ReturnType; +export type PageTypeDeleteMutationResult = Apollo.MutationResult; +export type PageTypeDeleteMutationOptions = Apollo.BaseMutationOptions; +export const PageTypeBulkDeleteDocument = gql` + mutation PageTypeBulkDelete($ids: [ID!]!) { + pageTypeBulkDelete(ids: $ids) { + errors { + ...PageTypeDeleteErrorFragment + } + } +} + ${PageTypeDeleteErrorFragmentFragmentDoc}`; +export type PageTypeBulkDeleteMutationFn = Apollo.MutationFunction; + +/** + * __usePageTypeBulkDeleteMutation__ + * + * To run a mutation, you first call `usePageTypeBulkDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `usePageTypeBulkDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [pageTypeBulkDeleteMutation, { data, loading, error }] = usePageTypeBulkDeleteMutation({ + * variables: { + * ids: // value for 'ids' + * }, + * }); + */ +export function usePageTypeBulkDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(PageTypeBulkDeleteDocument, options); + } +export type PageTypeBulkDeleteMutationHookResult = ReturnType; +export type PageTypeBulkDeleteMutationResult = Apollo.MutationResult; +export type PageTypeBulkDeleteMutationOptions = Apollo.BaseMutationOptions; +export const PageTypeAttributeReorderDocument = gql` + mutation PageTypeAttributeReorder($move: ReorderInput!, $pageTypeId: ID!) { + pageTypeReorderAttributes(moves: [$move], pageTypeId: $pageTypeId) { + errors { + ...PageError + } + pageType { + ...PageTypeDetails + } + } +} + ${PageErrorFragmentDoc} +${PageTypeDetailsFragmentDoc}`; +export type PageTypeAttributeReorderMutationFn = Apollo.MutationFunction; + +/** + * __usePageTypeAttributeReorderMutation__ + * + * To run a mutation, you first call `usePageTypeAttributeReorderMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `usePageTypeAttributeReorderMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [pageTypeAttributeReorderMutation, { data, loading, error }] = usePageTypeAttributeReorderMutation({ + * variables: { + * move: // value for 'move' + * pageTypeId: // value for 'pageTypeId' + * }, + * }); + */ +export function usePageTypeAttributeReorderMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(PageTypeAttributeReorderDocument, options); + } +export type PageTypeAttributeReorderMutationHookResult = ReturnType; +export type PageTypeAttributeReorderMutationResult = Apollo.MutationResult; +export type PageTypeAttributeReorderMutationOptions = Apollo.BaseMutationOptions; +export const PageTypeListDocument = gql` + query PageTypeList($after: String, $before: String, $first: Int, $last: Int, $filter: PageTypeFilterInput, $sort: PageTypeSortingInput) { + pageTypes( + after: $after + before: $before + first: $first + last: $last + filter: $filter + sortBy: $sort + ) { + edges { + node { + ...PageType + } + } + pageInfo { + ...PageInfo + } + } +} + ${PageTypeFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __usePageTypeListQuery__ + * + * To run a query within a React component, call `usePageTypeListQuery` and pass it any options that fit your needs. + * When your component renders, `usePageTypeListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = usePageTypeListQuery({ + * variables: { + * after: // value for 'after' + * before: // value for 'before' + * first: // value for 'first' + * last: // value for 'last' + * filter: // value for 'filter' + * sort: // value for 'sort' + * }, + * }); + */ +export function usePageTypeListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(PageTypeListDocument, options); + } +export function usePageTypeListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(PageTypeListDocument, options); + } +export type PageTypeListQueryHookResult = ReturnType; +export type PageTypeListLazyQueryHookResult = ReturnType; +export type PageTypeListQueryResult = Apollo.QueryResult; +export const PageTypeDetailsDocument = gql` + query PageTypeDetails($id: ID!) { + pageType(id: $id) { + ...PageTypeDetails + } +} + ${PageTypeDetailsFragmentDoc}`; + +/** + * __usePageTypeDetailsQuery__ + * + * To run a query within a React component, call `usePageTypeDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `usePageTypeDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = usePageTypeDetailsQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function usePageTypeDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(PageTypeDetailsDocument, options); + } +export function usePageTypeDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(PageTypeDetailsDocument, options); + } +export type PageTypeDetailsQueryHookResult = ReturnType; +export type PageTypeDetailsLazyQueryHookResult = ReturnType; +export type PageTypeDetailsQueryResult = Apollo.QueryResult; +export const PageCreateDocument = gql` + mutation PageCreate($input: PageCreateInput!) { + pageCreate(input: $input) { + errors { + ...PageErrorWithAttributes + } + page { + id + } + } +} + ${PageErrorWithAttributesFragmentDoc}`; +export type PageCreateMutationFn = Apollo.MutationFunction; + +/** + * __usePageCreateMutation__ + * + * To run a mutation, you first call `usePageCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `usePageCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [pageCreateMutation, { data, loading, error }] = usePageCreateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function usePageCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(PageCreateDocument, options); + } +export type PageCreateMutationHookResult = ReturnType; +export type PageCreateMutationResult = Apollo.MutationResult; +export type PageCreateMutationOptions = Apollo.BaseMutationOptions; +export const PageUpdateDocument = gql` + mutation PageUpdate($id: ID!, $input: PageInput!, $firstValues: Int, $afterValues: String, $lastValues: Int, $beforeValues: String) { + pageUpdate(id: $id, input: $input) { + errors { + ...PageErrorWithAttributes + } + page { + ...PageDetails + } + } +} + ${PageErrorWithAttributesFragmentDoc} +${PageDetailsFragmentDoc}`; +export type PageUpdateMutationFn = Apollo.MutationFunction; + +/** + * __usePageUpdateMutation__ + * + * To run a mutation, you first call `usePageUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `usePageUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [pageUpdateMutation, { data, loading, error }] = usePageUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * firstValues: // value for 'firstValues' + * afterValues: // value for 'afterValues' + * lastValues: // value for 'lastValues' + * beforeValues: // value for 'beforeValues' + * }, + * }); + */ +export function usePageUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(PageUpdateDocument, options); + } +export type PageUpdateMutationHookResult = ReturnType; +export type PageUpdateMutationResult = Apollo.MutationResult; +export type PageUpdateMutationOptions = Apollo.BaseMutationOptions; +export const PageRemoveDocument = gql` + mutation PageRemove($id: ID!) { + pageDelete(id: $id) { + errors { + ...PageError + } + } +} + ${PageErrorFragmentDoc}`; +export type PageRemoveMutationFn = Apollo.MutationFunction; + +/** + * __usePageRemoveMutation__ + * + * To run a mutation, you first call `usePageRemoveMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `usePageRemoveMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [pageRemoveMutation, { data, loading, error }] = usePageRemoveMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function usePageRemoveMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(PageRemoveDocument, options); + } +export type PageRemoveMutationHookResult = ReturnType; +export type PageRemoveMutationResult = Apollo.MutationResult; +export type PageRemoveMutationOptions = Apollo.BaseMutationOptions; +export const PageBulkPublishDocument = gql` + mutation PageBulkPublish($ids: [ID]!, $isPublished: Boolean!) { + pageBulkPublish(ids: $ids, isPublished: $isPublished) { + errors { + ...PageBulkPublishErrorFragment + } + } +} + ${PageBulkPublishErrorFragmentFragmentDoc}`; +export type PageBulkPublishMutationFn = Apollo.MutationFunction; + +/** + * __usePageBulkPublishMutation__ + * + * To run a mutation, you first call `usePageBulkPublishMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `usePageBulkPublishMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [pageBulkPublishMutation, { data, loading, error }] = usePageBulkPublishMutation({ + * variables: { + * ids: // value for 'ids' + * isPublished: // value for 'isPublished' + * }, + * }); + */ +export function usePageBulkPublishMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(PageBulkPublishDocument, options); + } +export type PageBulkPublishMutationHookResult = ReturnType; +export type PageBulkPublishMutationResult = Apollo.MutationResult; +export type PageBulkPublishMutationOptions = Apollo.BaseMutationOptions; +export const PageBulkRemoveDocument = gql` + mutation PageBulkRemove($ids: [ID]!) { + pageBulkDelete(ids: $ids) { + errors { + ...PageBulkRemoveErrorFragment + } + } +} + ${PageBulkRemoveErrorFragmentFragmentDoc}`; +export type PageBulkRemoveMutationFn = Apollo.MutationFunction; + +/** + * __usePageBulkRemoveMutation__ + * + * To run a mutation, you first call `usePageBulkRemoveMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `usePageBulkRemoveMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [pageBulkRemoveMutation, { data, loading, error }] = usePageBulkRemoveMutation({ + * variables: { + * ids: // value for 'ids' + * }, + * }); + */ +export function usePageBulkRemoveMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(PageBulkRemoveDocument, options); + } +export type PageBulkRemoveMutationHookResult = ReturnType; +export type PageBulkRemoveMutationResult = Apollo.MutationResult; +export type PageBulkRemoveMutationOptions = Apollo.BaseMutationOptions; +export const PageListDocument = gql` + query PageList($first: Int, $after: String, $last: Int, $before: String, $sort: PageSortingInput) { + pages(before: $before, after: $after, first: $first, last: $last, sortBy: $sort) { + edges { + node { + ...Page + } + } + pageInfo { + hasPreviousPage + hasNextPage + startCursor + endCursor + } + } +} + ${PageFragmentDoc}`; + +/** + * __usePageListQuery__ + * + * To run a query within a React component, call `usePageListQuery` and pass it any options that fit your needs. + * When your component renders, `usePageListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = usePageListQuery({ + * variables: { + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * sort: // value for 'sort' + * }, + * }); + */ +export function usePageListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(PageListDocument, options); + } +export function usePageListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(PageListDocument, options); + } +export type PageListQueryHookResult = ReturnType; +export type PageListLazyQueryHookResult = ReturnType; +export type PageListQueryResult = Apollo.QueryResult; +export const PageDetailsDocument = gql` + query PageDetails($id: ID!, $firstValues: Int, $afterValues: String, $lastValues: Int, $beforeValues: String) { + page(id: $id) { + ...PageDetails + } +} + ${PageDetailsFragmentDoc}`; + +/** + * __usePageDetailsQuery__ + * + * To run a query within a React component, call `usePageDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `usePageDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = usePageDetailsQuery({ + * variables: { + * id: // value for 'id' + * firstValues: // value for 'firstValues' + * afterValues: // value for 'afterValues' + * lastValues: // value for 'lastValues' + * beforeValues: // value for 'beforeValues' + * }, + * }); + */ +export function usePageDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(PageDetailsDocument, options); + } +export function usePageDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(PageDetailsDocument, options); + } +export type PageDetailsQueryHookResult = ReturnType; +export type PageDetailsLazyQueryHookResult = ReturnType; +export type PageDetailsQueryResult = Apollo.QueryResult; +export const PageTypeDocument = gql` + query PageType($id: ID!, $firstValues: Int, $afterValues: String, $lastValues: Int, $beforeValues: String) { + pageType(id: $id) { + id + name + attributes { + id + inputType + entityType + slug + name + valueRequired + choices( + first: $firstValues + after: $afterValues + last: $lastValues + before: $beforeValues + ) { + ...AttributeValueList + } + } + } +} + ${AttributeValueListFragmentDoc}`; + +/** + * __usePageTypeQuery__ + * + * To run a query within a React component, call `usePageTypeQuery` and pass it any options that fit your needs. + * When your component renders, `usePageTypeQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = usePageTypeQuery({ + * variables: { + * id: // value for 'id' + * firstValues: // value for 'firstValues' + * afterValues: // value for 'afterValues' + * lastValues: // value for 'lastValues' + * beforeValues: // value for 'beforeValues' + * }, + * }); + */ +export function usePageTypeQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(PageTypeDocument, options); + } +export function usePageTypeLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(PageTypeDocument, options); + } +export type PageTypeQueryHookResult = ReturnType; +export type PageTypeLazyQueryHookResult = ReturnType; +export type PageTypeQueryResult = Apollo.QueryResult; +export const PageCountDocument = gql` + query PageCount($filter: PageFilterInput) { + pages(filter: $filter) { + totalCount + } +} + `; + +/** + * __usePageCountQuery__ + * + * To run a query within a React component, call `usePageCountQuery` and pass it any options that fit your needs. + * When your component renders, `usePageCountQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = usePageCountQuery({ + * variables: { + * filter: // value for 'filter' + * }, + * }); + */ +export function usePageCountQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(PageCountDocument, options); + } +export function usePageCountLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(PageCountDocument, options); + } +export type PageCountQueryHookResult = ReturnType; +export type PageCountLazyQueryHookResult = ReturnType; +export type PageCountQueryResult = Apollo.QueryResult; +export const PermissionGroupDeleteDocument = gql` + mutation PermissionGroupDelete($id: ID!) { + permissionGroupDelete(id: $id) { + errors { + ...PermissionGroupError + } + } +} + ${PermissionGroupErrorFragmentDoc}`; +export type PermissionGroupDeleteMutationFn = Apollo.MutationFunction; + +/** + * __usePermissionGroupDeleteMutation__ + * + * To run a mutation, you first call `usePermissionGroupDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `usePermissionGroupDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [permissionGroupDeleteMutation, { data, loading, error }] = usePermissionGroupDeleteMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function usePermissionGroupDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(PermissionGroupDeleteDocument, options); + } +export type PermissionGroupDeleteMutationHookResult = ReturnType; +export type PermissionGroupDeleteMutationResult = Apollo.MutationResult; +export type PermissionGroupDeleteMutationOptions = Apollo.BaseMutationOptions; +export const PermissionGroupCreateDocument = gql` + mutation PermissionGroupCreate($input: PermissionGroupCreateInput!) { + permissionGroupCreate(input: $input) { + errors { + ...PermissionGroupError + } + group { + ...PermissionGroupDetails + } + } +} + ${PermissionGroupErrorFragmentDoc} +${PermissionGroupDetailsFragmentDoc}`; +export type PermissionGroupCreateMutationFn = Apollo.MutationFunction; + +/** + * __usePermissionGroupCreateMutation__ + * + * To run a mutation, you first call `usePermissionGroupCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `usePermissionGroupCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [permissionGroupCreateMutation, { data, loading, error }] = usePermissionGroupCreateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function usePermissionGroupCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(PermissionGroupCreateDocument, options); + } +export type PermissionGroupCreateMutationHookResult = ReturnType; +export type PermissionGroupCreateMutationResult = Apollo.MutationResult; +export type PermissionGroupCreateMutationOptions = Apollo.BaseMutationOptions; +export const PermissionGroupUpdateDocument = gql` + mutation PermissionGroupUpdate($id: ID!, $input: PermissionGroupUpdateInput!) { + permissionGroupUpdate(id: $id, input: $input) { + errors { + ...PermissionGroupError + } + group { + ...PermissionGroupDetails + } + } +} + ${PermissionGroupErrorFragmentDoc} +${PermissionGroupDetailsFragmentDoc}`; +export type PermissionGroupUpdateMutationFn = Apollo.MutationFunction; + +/** + * __usePermissionGroupUpdateMutation__ + * + * To run a mutation, you first call `usePermissionGroupUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `usePermissionGroupUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [permissionGroupUpdateMutation, { data, loading, error }] = usePermissionGroupUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function usePermissionGroupUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(PermissionGroupUpdateDocument, options); + } +export type PermissionGroupUpdateMutationHookResult = ReturnType; +export type PermissionGroupUpdateMutationResult = Apollo.MutationResult; +export type PermissionGroupUpdateMutationOptions = Apollo.BaseMutationOptions; +export const PermissionGroupListDocument = gql` + query PermissionGroupList($after: String, $before: String, $first: Int, $last: Int, $filter: PermissionGroupFilterInput, $sort: PermissionGroupSortingInput) { + permissionGroups( + after: $after + before: $before + first: $first + last: $last + filter: $filter + sortBy: $sort + ) { + edges { + node { + ...PermissionGroup + } + } + pageInfo { + ...PageInfo + } + } +} + ${PermissionGroupFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __usePermissionGroupListQuery__ + * + * To run a query within a React component, call `usePermissionGroupListQuery` and pass it any options that fit your needs. + * When your component renders, `usePermissionGroupListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = usePermissionGroupListQuery({ + * variables: { + * after: // value for 'after' + * before: // value for 'before' + * first: // value for 'first' + * last: // value for 'last' + * filter: // value for 'filter' + * sort: // value for 'sort' + * }, + * }); + */ +export function usePermissionGroupListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(PermissionGroupListDocument, options); + } +export function usePermissionGroupListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(PermissionGroupListDocument, options); + } +export type PermissionGroupListQueryHookResult = ReturnType; +export type PermissionGroupListLazyQueryHookResult = ReturnType; +export type PermissionGroupListQueryResult = Apollo.QueryResult; +export const PermissionGroupDetailsDocument = gql` + query PermissionGroupDetails($id: ID!, $userId: ID!) { + permissionGroup(id: $id) { + ...PermissionGroupDetails + } + user(id: $userId) { + editableGroups { + id + } + userPermissions { + code + sourcePermissionGroups(userId: $userId) { + id + } + } + } +} + ${PermissionGroupDetailsFragmentDoc}`; + +/** + * __usePermissionGroupDetailsQuery__ + * + * To run a query within a React component, call `usePermissionGroupDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `usePermissionGroupDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = usePermissionGroupDetailsQuery({ + * variables: { + * id: // value for 'id' + * userId: // value for 'userId' + * }, + * }); + */ +export function usePermissionGroupDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(PermissionGroupDetailsDocument, options); + } +export function usePermissionGroupDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(PermissionGroupDetailsDocument, options); + } +export type PermissionGroupDetailsQueryHookResult = ReturnType; +export type PermissionGroupDetailsLazyQueryHookResult = ReturnType; +export type PermissionGroupDetailsQueryResult = Apollo.QueryResult; +export const PluginUpdateDocument = gql` + mutation PluginUpdate($channelId: ID, $id: ID!, $input: PluginUpdateInput!) { + pluginUpdate(channelId: $channelId, id: $id, input: $input) { + errors { + ...PluginError + } + plugin { + ...PluginsDetails + } + } +} + ${PluginErrorFragmentDoc} +${PluginsDetailsFragmentDoc}`; +export type PluginUpdateMutationFn = Apollo.MutationFunction; + +/** + * __usePluginUpdateMutation__ + * + * To run a mutation, you first call `usePluginUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `usePluginUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [pluginUpdateMutation, { data, loading, error }] = usePluginUpdateMutation({ + * variables: { + * channelId: // value for 'channelId' + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function usePluginUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(PluginUpdateDocument, options); + } +export type PluginUpdateMutationHookResult = ReturnType; +export type PluginUpdateMutationResult = Apollo.MutationResult; +export type PluginUpdateMutationOptions = Apollo.BaseMutationOptions; +export const PluginsDocument = gql` + query Plugins($first: Int, $after: String, $last: Int, $before: String, $filter: PluginFilterInput, $sort: PluginSortingInput) { + plugins( + before: $before + after: $after + first: $first + last: $last + filter: $filter + sortBy: $sort + ) { + edges { + node { + ...PluginBase + } + } + pageInfo { + hasPreviousPage + hasNextPage + startCursor + endCursor + } + } +} + ${PluginBaseFragmentDoc}`; + +/** + * __usePluginsQuery__ + * + * To run a query within a React component, call `usePluginsQuery` and pass it any options that fit your needs. + * When your component renders, `usePluginsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = usePluginsQuery({ + * variables: { + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * filter: // value for 'filter' + * sort: // value for 'sort' + * }, + * }); + */ +export function usePluginsQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(PluginsDocument, options); + } +export function usePluginsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(PluginsDocument, options); + } +export type PluginsQueryHookResult = ReturnType; +export type PluginsLazyQueryHookResult = ReturnType; +export type PluginsQueryResult = Apollo.QueryResult; +export const PluginDocument = gql` + query Plugin($id: ID!) { + plugin(id: $id) { + ...PluginsDetails + } +} + ${PluginsDetailsFragmentDoc}`; + +/** + * __usePluginQuery__ + * + * To run a query within a React component, call `usePluginQuery` and pass it any options that fit your needs. + * When your component renders, `usePluginQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = usePluginQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function usePluginQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(PluginDocument, options); + } +export function usePluginLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(PluginDocument, options); + } +export type PluginQueryHookResult = ReturnType; +export type PluginLazyQueryHookResult = ReturnType; +export type PluginQueryResult = Apollo.QueryResult; +export const ProductTypeDeleteDocument = gql` + mutation ProductTypeDelete($id: ID!) { + productTypeDelete(id: $id) { + errors { + ...ProductTypeDeleteErrorFragment + } + productType { + id + } + } +} + ${ProductTypeDeleteErrorFragmentFragmentDoc}`; +export type ProductTypeDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useProductTypeDeleteMutation__ + * + * To run a mutation, you first call `useProductTypeDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductTypeDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productTypeDeleteMutation, { data, loading, error }] = useProductTypeDeleteMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useProductTypeDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductTypeDeleteDocument, options); + } +export type ProductTypeDeleteMutationHookResult = ReturnType; +export type ProductTypeDeleteMutationResult = Apollo.MutationResult; +export type ProductTypeDeleteMutationOptions = Apollo.BaseMutationOptions; +export const ProductTypeBulkDeleteDocument = gql` + mutation ProductTypeBulkDelete($ids: [ID]!) { + productTypeBulkDelete(ids: $ids) { + errors { + ...ProductTypeBulkDeleteErrorFragment + } + } +} + ${ProductTypeBulkDeleteErrorFragmentFragmentDoc}`; +export type ProductTypeBulkDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useProductTypeBulkDeleteMutation__ + * + * To run a mutation, you first call `useProductTypeBulkDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductTypeBulkDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productTypeBulkDeleteMutation, { data, loading, error }] = useProductTypeBulkDeleteMutation({ + * variables: { + * ids: // value for 'ids' + * }, + * }); + */ +export function useProductTypeBulkDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductTypeBulkDeleteDocument, options); + } +export type ProductTypeBulkDeleteMutationHookResult = ReturnType; +export type ProductTypeBulkDeleteMutationResult = Apollo.MutationResult; +export type ProductTypeBulkDeleteMutationOptions = Apollo.BaseMutationOptions; +export const ProductTypeUpdateDocument = gql` + mutation ProductTypeUpdate($id: ID!, $input: ProductTypeInput!) { + productTypeUpdate(id: $id, input: $input) { + errors { + ...ProductTypeBulkUpdateErrorFragment + } + productType { + ...ProductTypeDetails + } + } +} + ${ProductTypeBulkUpdateErrorFragmentFragmentDoc} +${ProductTypeDetailsFragmentDoc}`; +export type ProductTypeUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useProductTypeUpdateMutation__ + * + * To run a mutation, you first call `useProductTypeUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductTypeUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productTypeUpdateMutation, { data, loading, error }] = useProductTypeUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useProductTypeUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductTypeUpdateDocument, options); + } +export type ProductTypeUpdateMutationHookResult = ReturnType; +export type ProductTypeUpdateMutationResult = Apollo.MutationResult; +export type ProductTypeUpdateMutationOptions = Apollo.BaseMutationOptions; +export const AssignProductAttributeDocument = gql` + mutation AssignProductAttribute($id: ID!, $operations: [ProductAttributeAssignInput!]!) { + productAttributeAssign(productTypeId: $id, operations: $operations) { + errors { + ...ProductAttributeAssignErrorFragment + } + productType { + ...ProductTypeDetails + } + } +} + ${ProductAttributeAssignErrorFragmentFragmentDoc} +${ProductTypeDetailsFragmentDoc}`; +export type AssignProductAttributeMutationFn = Apollo.MutationFunction; + +/** + * __useAssignProductAttributeMutation__ + * + * To run a mutation, you first call `useAssignProductAttributeMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useAssignProductAttributeMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [assignProductAttributeMutation, { data, loading, error }] = useAssignProductAttributeMutation({ + * variables: { + * id: // value for 'id' + * operations: // value for 'operations' + * }, + * }); + */ +export function useAssignProductAttributeMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(AssignProductAttributeDocument, options); + } +export type AssignProductAttributeMutationHookResult = ReturnType; +export type AssignProductAttributeMutationResult = Apollo.MutationResult; +export type AssignProductAttributeMutationOptions = Apollo.BaseMutationOptions; +export const UnassignProductAttributeDocument = gql` + mutation UnassignProductAttribute($id: ID!, $ids: [ID]!) { + productAttributeUnassign(productTypeId: $id, attributeIds: $ids) { + errors { + ...ProductAttributeUnassignErrorFragment + } + productType { + ...ProductTypeDetails + } + } +} + ${ProductAttributeUnassignErrorFragmentFragmentDoc} +${ProductTypeDetailsFragmentDoc}`; +export type UnassignProductAttributeMutationFn = Apollo.MutationFunction; + +/** + * __useUnassignProductAttributeMutation__ + * + * To run a mutation, you first call `useUnassignProductAttributeMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUnassignProductAttributeMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [unassignProductAttributeMutation, { data, loading, error }] = useUnassignProductAttributeMutation({ + * variables: { + * id: // value for 'id' + * ids: // value for 'ids' + * }, + * }); + */ +export function useUnassignProductAttributeMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UnassignProductAttributeDocument, options); + } +export type UnassignProductAttributeMutationHookResult = ReturnType; +export type UnassignProductAttributeMutationResult = Apollo.MutationResult; +export type UnassignProductAttributeMutationOptions = Apollo.BaseMutationOptions; +export const ProductTypeCreateDocument = gql` + mutation ProductTypeCreate($input: ProductTypeInput!) { + productTypeCreate(input: $input) { + errors { + ...ProductTypeCreateErrorFragment + } + productType { + ...ProductTypeDetails + } + } +} + ${ProductTypeCreateErrorFragmentFragmentDoc} +${ProductTypeDetailsFragmentDoc}`; +export type ProductTypeCreateMutationFn = Apollo.MutationFunction; + +/** + * __useProductTypeCreateMutation__ + * + * To run a mutation, you first call `useProductTypeCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductTypeCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productTypeCreateMutation, { data, loading, error }] = useProductTypeCreateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useProductTypeCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductTypeCreateDocument, options); + } +export type ProductTypeCreateMutationHookResult = ReturnType; +export type ProductTypeCreateMutationResult = Apollo.MutationResult; +export type ProductTypeCreateMutationOptions = Apollo.BaseMutationOptions; +export const ProductTypeAttributeReorderDocument = gql` + mutation ProductTypeAttributeReorder($move: ReorderInput!, $productTypeId: ID!, $type: ProductAttributeType!) { + productTypeReorderAttributes( + moves: [$move] + productTypeId: $productTypeId + type: $type + ) { + errors { + ...ProductTypeReorderAttributesErrorFragment + } + productType { + ...ProductTypeDetails + } + } +} + ${ProductTypeReorderAttributesErrorFragmentFragmentDoc} +${ProductTypeDetailsFragmentDoc}`; +export type ProductTypeAttributeReorderMutationFn = Apollo.MutationFunction; + +/** + * __useProductTypeAttributeReorderMutation__ + * + * To run a mutation, you first call `useProductTypeAttributeReorderMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductTypeAttributeReorderMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productTypeAttributeReorderMutation, { data, loading, error }] = useProductTypeAttributeReorderMutation({ + * variables: { + * move: // value for 'move' + * productTypeId: // value for 'productTypeId' + * type: // value for 'type' + * }, + * }); + */ +export function useProductTypeAttributeReorderMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductTypeAttributeReorderDocument, options); + } +export type ProductTypeAttributeReorderMutationHookResult = ReturnType; +export type ProductTypeAttributeReorderMutationResult = Apollo.MutationResult; +export type ProductTypeAttributeReorderMutationOptions = Apollo.BaseMutationOptions; +export const ProductAttributeAssignmentUpdateDocument = gql` + mutation ProductAttributeAssignmentUpdate($operations: [ProductAttributeAssignmentUpdateInput]!, $productTypeId: ID!) { + productAttributeAssignmentUpdate( + operations: $operations + productTypeId: $productTypeId + ) { + errors { + ...ProductAttributeAssignmentUpdateErrorFragment + } + productType { + ...ProductTypeDetails + } + } +} + ${ProductAttributeAssignmentUpdateErrorFragmentFragmentDoc} +${ProductTypeDetailsFragmentDoc}`; +export type ProductAttributeAssignmentUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useProductAttributeAssignmentUpdateMutation__ + * + * To run a mutation, you first call `useProductAttributeAssignmentUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductAttributeAssignmentUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productAttributeAssignmentUpdateMutation, { data, loading, error }] = useProductAttributeAssignmentUpdateMutation({ + * variables: { + * operations: // value for 'operations' + * productTypeId: // value for 'productTypeId' + * }, + * }); + */ +export function useProductAttributeAssignmentUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductAttributeAssignmentUpdateDocument, options); + } +export type ProductAttributeAssignmentUpdateMutationHookResult = ReturnType; +export type ProductAttributeAssignmentUpdateMutationResult = Apollo.MutationResult; +export type ProductAttributeAssignmentUpdateMutationOptions = Apollo.BaseMutationOptions; +export const ProductTypeListDocument = gql` + query ProductTypeList($after: String, $before: String, $first: Int, $last: Int, $filter: ProductTypeFilterInput, $sort: ProductTypeSortingInput) { + productTypes( + after: $after + before: $before + first: $first + last: $last + filter: $filter + sortBy: $sort + ) { + edges { + node { + ...ProductType + } + } + pageInfo { + ...PageInfo + } + } +} + ${ProductTypeFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __useProductTypeListQuery__ + * + * To run a query within a React component, call `useProductTypeListQuery` and pass it any options that fit your needs. + * When your component renders, `useProductTypeListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useProductTypeListQuery({ + * variables: { + * after: // value for 'after' + * before: // value for 'before' + * first: // value for 'first' + * last: // value for 'last' + * filter: // value for 'filter' + * sort: // value for 'sort' + * }, + * }); + */ +export function useProductTypeListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ProductTypeListDocument, options); + } +export function useProductTypeListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ProductTypeListDocument, options); + } +export type ProductTypeListQueryHookResult = ReturnType; +export type ProductTypeListLazyQueryHookResult = ReturnType; +export type ProductTypeListQueryResult = Apollo.QueryResult; +export const ProductTypeDetailsDocument = gql` + query ProductTypeDetails($id: ID!) { + productType(id: $id) { + ...ProductTypeDetails + } + shop { + defaultWeightUnit + } + taxTypes { + taxCode + description + } +} + ${ProductTypeDetailsFragmentDoc}`; + +/** + * __useProductTypeDetailsQuery__ + * + * To run a query within a React component, call `useProductTypeDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useProductTypeDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useProductTypeDetailsQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useProductTypeDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ProductTypeDetailsDocument, options); + } +export function useProductTypeDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ProductTypeDetailsDocument, options); + } +export type ProductTypeDetailsQueryHookResult = ReturnType; +export type ProductTypeDetailsLazyQueryHookResult = ReturnType; +export type ProductTypeDetailsQueryResult = Apollo.QueryResult; +export const ProductTypeCreateDataDocument = gql` + query ProductTypeCreateData { + shop { + defaultWeightUnit + } + taxTypes { + taxCode + description + } +} + `; + +/** + * __useProductTypeCreateDataQuery__ + * + * To run a query within a React component, call `useProductTypeCreateDataQuery` and pass it any options that fit your needs. + * When your component renders, `useProductTypeCreateDataQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useProductTypeCreateDataQuery({ + * variables: { + * }, + * }); + */ +export function useProductTypeCreateDataQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ProductTypeCreateDataDocument, options); + } +export function useProductTypeCreateDataLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ProductTypeCreateDataDocument, options); + } +export type ProductTypeCreateDataQueryHookResult = ReturnType; +export type ProductTypeCreateDataLazyQueryHookResult = ReturnType; +export type ProductTypeCreateDataQueryResult = Apollo.QueryResult; +export const ProductMediaCreateDocument = gql` + mutation ProductMediaCreate($product: ID!, $image: Upload, $alt: String, $mediaUrl: String) { + productMediaCreate( + input: {alt: $alt, image: $image, product: $product, mediaUrl: $mediaUrl} + ) { + errors { + ...ProductError + } + product { + id + media { + ...ProductMedia + } + } + } +} + ${ProductErrorFragmentDoc} +${ProductMediaFragmentDoc}`; +export type ProductMediaCreateMutationFn = Apollo.MutationFunction; + +/** + * __useProductMediaCreateMutation__ + * + * To run a mutation, you first call `useProductMediaCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductMediaCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productMediaCreateMutation, { data, loading, error }] = useProductMediaCreateMutation({ + * variables: { + * product: // value for 'product' + * image: // value for 'image' + * alt: // value for 'alt' + * mediaUrl: // value for 'mediaUrl' + * }, + * }); + */ +export function useProductMediaCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductMediaCreateDocument, options); + } +export type ProductMediaCreateMutationHookResult = ReturnType; +export type ProductMediaCreateMutationResult = Apollo.MutationResult; +export type ProductMediaCreateMutationOptions = Apollo.BaseMutationOptions; +export const ProductDeleteDocument = gql` + mutation ProductDelete($id: ID!) { + productDelete(id: $id) { + errors { + ...ProductError + } + product { + id + } + } +} + ${ProductErrorFragmentDoc}`; +export type ProductDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useProductDeleteMutation__ + * + * To run a mutation, you first call `useProductDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productDeleteMutation, { data, loading, error }] = useProductDeleteMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useProductDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductDeleteDocument, options); + } +export type ProductDeleteMutationHookResult = ReturnType; +export type ProductDeleteMutationResult = Apollo.MutationResult; +export type ProductDeleteMutationOptions = Apollo.BaseMutationOptions; +export const ProductMediaReorderDocument = gql` + mutation ProductMediaReorder($productId: ID!, $mediaIds: [ID]!) { + productMediaReorder(productId: $productId, mediaIds: $mediaIds) { + errors { + ...ProductError + } + product { + id + media { + id + alt + sortOrder + url + } + } + } +} + ${ProductErrorFragmentDoc}`; +export type ProductMediaReorderMutationFn = Apollo.MutationFunction; + +/** + * __useProductMediaReorderMutation__ + * + * To run a mutation, you first call `useProductMediaReorderMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductMediaReorderMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productMediaReorderMutation, { data, loading, error }] = useProductMediaReorderMutation({ + * variables: { + * productId: // value for 'productId' + * mediaIds: // value for 'mediaIds' + * }, + * }); + */ +export function useProductMediaReorderMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductMediaReorderDocument, options); + } +export type ProductMediaReorderMutationHookResult = ReturnType; +export type ProductMediaReorderMutationResult = Apollo.MutationResult; +export type ProductMediaReorderMutationOptions = Apollo.BaseMutationOptions; +export const ProductVariantSetDefaultDocument = gql` + mutation ProductVariantSetDefault($productId: ID!, $variantId: ID!) { + productVariantSetDefault(productId: $productId, variantId: $variantId) { + errors { + ...ProductError + } + product { + id + defaultVariant { + id + name + } + variants { + id + name + } + } + } +} + ${ProductErrorFragmentDoc}`; +export type ProductVariantSetDefaultMutationFn = Apollo.MutationFunction; + +/** + * __useProductVariantSetDefaultMutation__ + * + * To run a mutation, you first call `useProductVariantSetDefaultMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductVariantSetDefaultMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productVariantSetDefaultMutation, { data, loading, error }] = useProductVariantSetDefaultMutation({ + * variables: { + * productId: // value for 'productId' + * variantId: // value for 'variantId' + * }, + * }); + */ +export function useProductVariantSetDefaultMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductVariantSetDefaultDocument, options); + } +export type ProductVariantSetDefaultMutationHookResult = ReturnType; +export type ProductVariantSetDefaultMutationResult = Apollo.MutationResult; +export type ProductVariantSetDefaultMutationOptions = Apollo.BaseMutationOptions; +export const ProductUpdateDocument = gql` + mutation ProductUpdate($id: ID!, $input: ProductInput!, $firstValues: Int, $afterValues: String, $lastValues: Int, $beforeValues: String) { + productUpdate(id: $id, input: $input) { + errors { + ...ProductErrorWithAttributes + } + product { + ...Product + } + } +} + ${ProductErrorWithAttributesFragmentDoc} +${ProductFragmentDoc}`; +export type ProductUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useProductUpdateMutation__ + * + * To run a mutation, you first call `useProductUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productUpdateMutation, { data, loading, error }] = useProductUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * firstValues: // value for 'firstValues' + * afterValues: // value for 'afterValues' + * lastValues: // value for 'lastValues' + * beforeValues: // value for 'beforeValues' + * }, + * }); + */ +export function useProductUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductUpdateDocument, options); + } +export type ProductUpdateMutationHookResult = ReturnType; +export type ProductUpdateMutationResult = Apollo.MutationResult; +export type ProductUpdateMutationOptions = Apollo.BaseMutationOptions; +export const SimpleProductUpdateDocument = gql` + mutation SimpleProductUpdate($id: ID!, $input: ProductInput!, $productVariantId: ID!, $productVariantInput: ProductVariantInput!, $addStocks: [StockInput!]!, $deleteStocks: [ID!]!, $updateStocks: [StockInput!]!, $firstValues: Int, $afterValues: String, $lastValues: Int, $beforeValues: String) { + productUpdate(id: $id, input: $input) { + errors { + ...ProductErrorWithAttributes + } + product { + ...Product + } + } + productVariantUpdate(id: $productVariantId, input: $productVariantInput) { + errors { + ...ProductErrorWithAttributes + } + productVariant { + ...ProductVariant + } + } + productVariantStocksCreate(stocks: $addStocks, variantId: $productVariantId) { + errors { + ...BulkStockError + } + productVariant { + ...ProductVariant + } + } + productVariantStocksDelete( + warehouseIds: $deleteStocks + variantId: $productVariantId + ) { + errors { + ...StockError + } + productVariant { + ...ProductVariant + } + } + productVariantStocksUpdate(stocks: $updateStocks, variantId: $productVariantId) { + errors { + ...BulkStockError + } + productVariant { + ...ProductVariant + } + } +} + ${ProductErrorWithAttributesFragmentDoc} +${ProductFragmentDoc} +${ProductVariantFragmentDoc} +${BulkStockErrorFragmentDoc} +${StockErrorFragmentDoc}`; +export type SimpleProductUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useSimpleProductUpdateMutation__ + * + * To run a mutation, you first call `useSimpleProductUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useSimpleProductUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [simpleProductUpdateMutation, { data, loading, error }] = useSimpleProductUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * productVariantId: // value for 'productVariantId' + * productVariantInput: // value for 'productVariantInput' + * addStocks: // value for 'addStocks' + * deleteStocks: // value for 'deleteStocks' + * updateStocks: // value for 'updateStocks' + * firstValues: // value for 'firstValues' + * afterValues: // value for 'afterValues' + * lastValues: // value for 'lastValues' + * beforeValues: // value for 'beforeValues' + * }, + * }); + */ +export function useSimpleProductUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(SimpleProductUpdateDocument, options); + } +export type SimpleProductUpdateMutationHookResult = ReturnType; +export type SimpleProductUpdateMutationResult = Apollo.MutationResult; +export type SimpleProductUpdateMutationOptions = Apollo.BaseMutationOptions; +export const ProductCreateDocument = gql` + mutation ProductCreate($input: ProductCreateInput!) { + productCreate(input: $input) { + errors { + ...ProductErrorWithAttributes + } + product { + id + } + } +} + ${ProductErrorWithAttributesFragmentDoc}`; +export type ProductCreateMutationFn = Apollo.MutationFunction; + +/** + * __useProductCreateMutation__ + * + * To run a mutation, you first call `useProductCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productCreateMutation, { data, loading, error }] = useProductCreateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useProductCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductCreateDocument, options); + } +export type ProductCreateMutationHookResult = ReturnType; +export type ProductCreateMutationResult = Apollo.MutationResult; +export type ProductCreateMutationOptions = Apollo.BaseMutationOptions; +export const VariantDeleteDocument = gql` + mutation VariantDelete($id: ID!) { + productVariantDelete(id: $id) { + errors { + ...ProductError + } + productVariant { + id + } + } +} + ${ProductErrorFragmentDoc}`; +export type VariantDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useVariantDeleteMutation__ + * + * To run a mutation, you first call `useVariantDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useVariantDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [variantDeleteMutation, { data, loading, error }] = useVariantDeleteMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useVariantDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(VariantDeleteDocument, options); + } +export type VariantDeleteMutationHookResult = ReturnType; +export type VariantDeleteMutationResult = Apollo.MutationResult; +export type VariantDeleteMutationOptions = Apollo.BaseMutationOptions; +export const VariantUpdateDocument = gql` + mutation VariantUpdate($addStocks: [StockInput!]!, $removeStocks: [ID!]!, $id: ID!, $attributes: [AttributeValueInput!], $sku: String, $quantityLimitPerCustomer: Int, $trackInventory: Boolean!, $stocks: [StockInput!]!, $preorder: PreorderSettingsInput, $weight: WeightScalar, $firstValues: Int, $afterValues: String, $lastValues: Int, $beforeValues: String) { + productVariantUpdate( + id: $id + input: {attributes: $attributes, sku: $sku, trackInventory: $trackInventory, preorder: $preorder, weight: $weight, quantityLimitPerCustomer: $quantityLimitPerCustomer} + ) { + errors { + ...ProductErrorWithAttributes + } + productVariant { + ...ProductVariant + } + } + productVariantStocksUpdate(stocks: $stocks, variantId: $id) { + errors { + ...BulkStockError + } + productVariant { + ...ProductVariant + } + } + productVariantStocksCreate(stocks: $addStocks, variantId: $id) { + errors { + ...BulkStockError + } + productVariant { + id + stocks { + ...Stock + } + } + } + productVariantStocksDelete(warehouseIds: $removeStocks, variantId: $id) { + errors { + ...ProductVariantStocksDeleteError + } + productVariant { + id + stocks { + ...Stock + } + } + } +} + ${ProductErrorWithAttributesFragmentDoc} +${ProductVariantFragmentDoc} +${BulkStockErrorFragmentDoc} +${StockFragmentDoc} +${ProductVariantStocksDeleteErrorFragmentDoc}`; +export type VariantUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useVariantUpdateMutation__ + * + * To run a mutation, you first call `useVariantUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useVariantUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [variantUpdateMutation, { data, loading, error }] = useVariantUpdateMutation({ + * variables: { + * addStocks: // value for 'addStocks' + * removeStocks: // value for 'removeStocks' + * id: // value for 'id' + * attributes: // value for 'attributes' + * sku: // value for 'sku' + * quantityLimitPerCustomer: // value for 'quantityLimitPerCustomer' + * trackInventory: // value for 'trackInventory' + * stocks: // value for 'stocks' + * preorder: // value for 'preorder' + * weight: // value for 'weight' + * firstValues: // value for 'firstValues' + * afterValues: // value for 'afterValues' + * lastValues: // value for 'lastValues' + * beforeValues: // value for 'beforeValues' + * }, + * }); + */ +export function useVariantUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(VariantUpdateDocument, options); + } +export type VariantUpdateMutationHookResult = ReturnType; +export type VariantUpdateMutationResult = Apollo.MutationResult; +export type VariantUpdateMutationOptions = Apollo.BaseMutationOptions; +export const VariantCreateDocument = gql` + mutation VariantCreate($input: ProductVariantCreateInput!, $firstValues: Int, $afterValues: String, $lastValues: Int, $beforeValues: String) { + productVariantCreate(input: $input) { + errors { + ...ProductErrorWithAttributes + } + productVariant { + ...ProductVariant + } + } +} + ${ProductErrorWithAttributesFragmentDoc} +${ProductVariantFragmentDoc}`; +export type VariantCreateMutationFn = Apollo.MutationFunction; + +/** + * __useVariantCreateMutation__ + * + * To run a mutation, you first call `useVariantCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useVariantCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [variantCreateMutation, { data, loading, error }] = useVariantCreateMutation({ + * variables: { + * input: // value for 'input' + * firstValues: // value for 'firstValues' + * afterValues: // value for 'afterValues' + * lastValues: // value for 'lastValues' + * beforeValues: // value for 'beforeValues' + * }, + * }); + */ +export function useVariantCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(VariantCreateDocument, options); + } +export type VariantCreateMutationHookResult = ReturnType; +export type VariantCreateMutationResult = Apollo.MutationResult; +export type VariantCreateMutationOptions = Apollo.BaseMutationOptions; +export const ProductMediaDeleteDocument = gql` + mutation ProductMediaDelete($id: ID!) { + productMediaDelete(id: $id) { + errors { + ...ProductError + } + product { + id + media { + id + } + } + } +} + ${ProductErrorFragmentDoc}`; +export type ProductMediaDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useProductMediaDeleteMutation__ + * + * To run a mutation, you first call `useProductMediaDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductMediaDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productMediaDeleteMutation, { data, loading, error }] = useProductMediaDeleteMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useProductMediaDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductMediaDeleteDocument, options); + } +export type ProductMediaDeleteMutationHookResult = ReturnType; +export type ProductMediaDeleteMutationResult = Apollo.MutationResult; +export type ProductMediaDeleteMutationOptions = Apollo.BaseMutationOptions; +export const ProductMediaUpdateDocument = gql` + mutation ProductMediaUpdate($id: ID!, $alt: String!) { + productMediaUpdate(id: $id, input: {alt: $alt}) { + errors { + ...ProductError + } + product { + id + media { + ...ProductMedia + } + } + } +} + ${ProductErrorFragmentDoc} +${ProductMediaFragmentDoc}`; +export type ProductMediaUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useProductMediaUpdateMutation__ + * + * To run a mutation, you first call `useProductMediaUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductMediaUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productMediaUpdateMutation, { data, loading, error }] = useProductMediaUpdateMutation({ + * variables: { + * id: // value for 'id' + * alt: // value for 'alt' + * }, + * }); + */ +export function useProductMediaUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductMediaUpdateDocument, options); + } +export type ProductMediaUpdateMutationHookResult = ReturnType; +export type ProductMediaUpdateMutationResult = Apollo.MutationResult; +export type ProductMediaUpdateMutationOptions = Apollo.BaseMutationOptions; +export const VariantMediaAssignDocument = gql` + mutation VariantMediaAssign($variantId: ID!, $mediaId: ID!) { + variantMediaAssign(variantId: $variantId, mediaId: $mediaId) { + errors { + ...ProductError + } + productVariant { + id + media { + ...ProductMedia + } + product { + id + media { + ...ProductMedia + } + variants { + id + name + sku + media { + ...ProductMedia + } + } + } + } + } +} + ${ProductErrorFragmentDoc} +${ProductMediaFragmentDoc}`; +export type VariantMediaAssignMutationFn = Apollo.MutationFunction; + +/** + * __useVariantMediaAssignMutation__ + * + * To run a mutation, you first call `useVariantMediaAssignMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useVariantMediaAssignMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [variantMediaAssignMutation, { data, loading, error }] = useVariantMediaAssignMutation({ + * variables: { + * variantId: // value for 'variantId' + * mediaId: // value for 'mediaId' + * }, + * }); + */ +export function useVariantMediaAssignMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(VariantMediaAssignDocument, options); + } +export type VariantMediaAssignMutationHookResult = ReturnType; +export type VariantMediaAssignMutationResult = Apollo.MutationResult; +export type VariantMediaAssignMutationOptions = Apollo.BaseMutationOptions; +export const VariantMediaUnassignDocument = gql` + mutation VariantMediaUnassign($variantId: ID!, $mediaId: ID!) { + variantMediaUnassign(variantId: $variantId, mediaId: $mediaId) { + errors { + ...ProductError + } + productVariant { + id + media { + ...ProductMedia + } + product { + id + media { + ...ProductMedia + } + variants { + id + name + sku + media { + ...ProductMedia + } + } + } + } + } +} + ${ProductErrorFragmentDoc} +${ProductMediaFragmentDoc}`; +export type VariantMediaUnassignMutationFn = Apollo.MutationFunction; + +/** + * __useVariantMediaUnassignMutation__ + * + * To run a mutation, you first call `useVariantMediaUnassignMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useVariantMediaUnassignMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [variantMediaUnassignMutation, { data, loading, error }] = useVariantMediaUnassignMutation({ + * variables: { + * variantId: // value for 'variantId' + * mediaId: // value for 'mediaId' + * }, + * }); + */ +export function useVariantMediaUnassignMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(VariantMediaUnassignDocument, options); + } +export type VariantMediaUnassignMutationHookResult = ReturnType; +export type VariantMediaUnassignMutationResult = Apollo.MutationResult; +export type VariantMediaUnassignMutationOptions = Apollo.BaseMutationOptions; +export const ProductBulkDeleteDocument = gql` + mutation productBulkDelete($ids: [ID!]!) { + productBulkDelete(ids: $ids) { + errors { + ...ProductError + } + } +} + ${ProductErrorFragmentDoc}`; +export type ProductBulkDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useProductBulkDeleteMutation__ + * + * To run a mutation, you first call `useProductBulkDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductBulkDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productBulkDeleteMutation, { data, loading, error }] = useProductBulkDeleteMutation({ + * variables: { + * ids: // value for 'ids' + * }, + * }); + */ +export function useProductBulkDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductBulkDeleteDocument, options); + } +export type ProductBulkDeleteMutationHookResult = ReturnType; +export type ProductBulkDeleteMutationResult = Apollo.MutationResult; +export type ProductBulkDeleteMutationOptions = Apollo.BaseMutationOptions; +export const ProductVariantBulkCreateDocument = gql` + mutation ProductVariantBulkCreate($id: ID!, $inputs: [ProductVariantBulkCreateInput]!) { + productVariantBulkCreate(product: $id, variants: $inputs) { + errors { + ...BulkProductError + } + } +} + ${BulkProductErrorFragmentDoc}`; +export type ProductVariantBulkCreateMutationFn = Apollo.MutationFunction; + +/** + * __useProductVariantBulkCreateMutation__ + * + * To run a mutation, you first call `useProductVariantBulkCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductVariantBulkCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productVariantBulkCreateMutation, { data, loading, error }] = useProductVariantBulkCreateMutation({ + * variables: { + * id: // value for 'id' + * inputs: // value for 'inputs' + * }, + * }); + */ +export function useProductVariantBulkCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductVariantBulkCreateDocument, options); + } +export type ProductVariantBulkCreateMutationHookResult = ReturnType; +export type ProductVariantBulkCreateMutationResult = Apollo.MutationResult; +export type ProductVariantBulkCreateMutationOptions = Apollo.BaseMutationOptions; +export const ProductVariantBulkDeleteDocument = gql` + mutation ProductVariantBulkDelete($ids: [ID!]!) { + productVariantBulkDelete(ids: $ids) { + errors { + ...ProductError + } + } +} + ${ProductErrorFragmentDoc}`; +export type ProductVariantBulkDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useProductVariantBulkDeleteMutation__ + * + * To run a mutation, you first call `useProductVariantBulkDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductVariantBulkDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productVariantBulkDeleteMutation, { data, loading, error }] = useProductVariantBulkDeleteMutation({ + * variables: { + * ids: // value for 'ids' + * }, + * }); + */ +export function useProductVariantBulkDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductVariantBulkDeleteDocument, options); + } +export type ProductVariantBulkDeleteMutationHookResult = ReturnType; +export type ProductVariantBulkDeleteMutationResult = Apollo.MutationResult; +export type ProductVariantBulkDeleteMutationOptions = Apollo.BaseMutationOptions; +export const ProductExportDocument = gql` + mutation ProductExport($input: ExportProductsInput!) { + exportProducts(input: $input) { + exportFile { + ...ExportFile + } + errors { + ...ExportError + } + } +} + ${ExportFileFragmentDoc} +${ExportErrorFragmentDoc}`; +export type ProductExportMutationFn = Apollo.MutationFunction; + +/** + * __useProductExportMutation__ + * + * To run a mutation, you first call `useProductExportMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductExportMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productExportMutation, { data, loading, error }] = useProductExportMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useProductExportMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductExportDocument, options); + } +export type ProductExportMutationHookResult = ReturnType; +export type ProductExportMutationResult = Apollo.MutationResult; +export type ProductExportMutationOptions = Apollo.BaseMutationOptions; +export const ProductChannelListingUpdateDocument = gql` + mutation ProductChannelListingUpdate($id: ID!, $input: ProductChannelListingUpdateInput!) { + productChannelListingUpdate(id: $id, input: $input) { + product { + id + channelListings { + ...ChannelListingProductWithoutPricing + } + variants { + id + channelListings { + ...ChannelListingProductVariant + } + } + } + errors { + ...ProductChannelListingError + } + } +} + ${ChannelListingProductWithoutPricingFragmentDoc} +${ChannelListingProductVariantFragmentDoc} +${ProductChannelListingErrorFragmentDoc}`; +export type ProductChannelListingUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useProductChannelListingUpdateMutation__ + * + * To run a mutation, you first call `useProductChannelListingUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductChannelListingUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productChannelListingUpdateMutation, { data, loading, error }] = useProductChannelListingUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useProductChannelListingUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductChannelListingUpdateDocument, options); + } +export type ProductChannelListingUpdateMutationHookResult = ReturnType; +export type ProductChannelListingUpdateMutationResult = Apollo.MutationResult; +export type ProductChannelListingUpdateMutationOptions = Apollo.BaseMutationOptions; +export const ProductVariantReorderDocument = gql` + mutation ProductVariantReorder($move: ReorderInput!, $productId: ID!) { + productVariantReorder(moves: [$move], productId: $productId) { + errors { + ...ProductError + } + product { + id + variants { + id + } + } + } +} + ${ProductErrorFragmentDoc}`; +export type ProductVariantReorderMutationFn = Apollo.MutationFunction; + +/** + * __useProductVariantReorderMutation__ + * + * To run a mutation, you first call `useProductVariantReorderMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductVariantReorderMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productVariantReorderMutation, { data, loading, error }] = useProductVariantReorderMutation({ + * variables: { + * move: // value for 'move' + * productId: // value for 'productId' + * }, + * }); + */ +export function useProductVariantReorderMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductVariantReorderDocument, options); + } +export type ProductVariantReorderMutationHookResult = ReturnType; +export type ProductVariantReorderMutationResult = Apollo.MutationResult; +export type ProductVariantReorderMutationOptions = Apollo.BaseMutationOptions; +export const ProductVariantChannelListingUpdateDocument = gql` + mutation ProductVariantChannelListingUpdate($id: ID!, $input: [ProductVariantChannelListingAddInput!]!) { + productVariantChannelListingUpdate(id: $id, input: $input) { + variant { + id + channelListings { + ...ChannelListingProductVariant + } + product { + id + channelListings { + ...ChannelListingProductWithoutPricing + } + } + } + errors { + ...ProductChannelListingError + } + } +} + ${ChannelListingProductVariantFragmentDoc} +${ChannelListingProductWithoutPricingFragmentDoc} +${ProductChannelListingErrorFragmentDoc}`; +export type ProductVariantChannelListingUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useProductVariantChannelListingUpdateMutation__ + * + * To run a mutation, you first call `useProductVariantChannelListingUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductVariantChannelListingUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productVariantChannelListingUpdateMutation, { data, loading, error }] = useProductVariantChannelListingUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useProductVariantChannelListingUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductVariantChannelListingUpdateDocument, options); + } +export type ProductVariantChannelListingUpdateMutationHookResult = ReturnType; +export type ProductVariantChannelListingUpdateMutationResult = Apollo.MutationResult; +export type ProductVariantChannelListingUpdateMutationOptions = Apollo.BaseMutationOptions; +export const ProductVariantPreorderDeactivateDocument = gql` + mutation ProductVariantPreorderDeactivate($id: ID!) { + productVariantPreorderDeactivate(id: $id) { + productVariant { + id + preorder { + ...Preorder + } + } + errors { + ...ProductError + } + } +} + ${PreorderFragmentDoc} +${ProductErrorFragmentDoc}`; +export type ProductVariantPreorderDeactivateMutationFn = Apollo.MutationFunction; + +/** + * __useProductVariantPreorderDeactivateMutation__ + * + * To run a mutation, you first call `useProductVariantPreorderDeactivateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useProductVariantPreorderDeactivateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [productVariantPreorderDeactivateMutation, { data, loading, error }] = useProductVariantPreorderDeactivateMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useProductVariantPreorderDeactivateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ProductVariantPreorderDeactivateDocument, options); + } +export type ProductVariantPreorderDeactivateMutationHookResult = ReturnType; +export type ProductVariantPreorderDeactivateMutationResult = Apollo.MutationResult; +export type ProductVariantPreorderDeactivateMutationOptions = Apollo.BaseMutationOptions; +export const InitialProductFilterAttributesDocument = gql` + query InitialProductFilterAttributes { + attributes( + first: 100 + filter: {filterableInDashboard: true, type: PRODUCT_TYPE} + ) { + edges { + node { + id + name + inputType + slug + } + } + } +} + `; + +/** + * __useInitialProductFilterAttributesQuery__ + * + * To run a query within a React component, call `useInitialProductFilterAttributesQuery` and pass it any options that fit your needs. + * When your component renders, `useInitialProductFilterAttributesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useInitialProductFilterAttributesQuery({ + * variables: { + * }, + * }); + */ +export function useInitialProductFilterAttributesQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(InitialProductFilterAttributesDocument, options); + } +export function useInitialProductFilterAttributesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(InitialProductFilterAttributesDocument, options); + } +export type InitialProductFilterAttributesQueryHookResult = ReturnType; +export type InitialProductFilterAttributesLazyQueryHookResult = ReturnType; +export type InitialProductFilterAttributesQueryResult = Apollo.QueryResult; +export const InitialProductFilterCategoriesDocument = gql` + query InitialProductFilterCategories($categories: [ID!]) { + categories(first: 100, filter: {ids: $categories}) { + edges { + node { + id + name + } + } + } +} + `; + +/** + * __useInitialProductFilterCategoriesQuery__ + * + * To run a query within a React component, call `useInitialProductFilterCategoriesQuery` and pass it any options that fit your needs. + * When your component renders, `useInitialProductFilterCategoriesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useInitialProductFilterCategoriesQuery({ + * variables: { + * categories: // value for 'categories' + * }, + * }); + */ +export function useInitialProductFilterCategoriesQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(InitialProductFilterCategoriesDocument, options); + } +export function useInitialProductFilterCategoriesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(InitialProductFilterCategoriesDocument, options); + } +export type InitialProductFilterCategoriesQueryHookResult = ReturnType; +export type InitialProductFilterCategoriesLazyQueryHookResult = ReturnType; +export type InitialProductFilterCategoriesQueryResult = Apollo.QueryResult; +export const InitialProductFilterCollectionsDocument = gql` + query InitialProductFilterCollections($collections: [ID!]) { + collections(first: 100, filter: {ids: $collections}) { + edges { + node { + id + name + } + } + } +} + `; + +/** + * __useInitialProductFilterCollectionsQuery__ + * + * To run a query within a React component, call `useInitialProductFilterCollectionsQuery` and pass it any options that fit your needs. + * When your component renders, `useInitialProductFilterCollectionsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useInitialProductFilterCollectionsQuery({ + * variables: { + * collections: // value for 'collections' + * }, + * }); + */ +export function useInitialProductFilterCollectionsQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(InitialProductFilterCollectionsDocument, options); + } +export function useInitialProductFilterCollectionsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(InitialProductFilterCollectionsDocument, options); + } +export type InitialProductFilterCollectionsQueryHookResult = ReturnType; +export type InitialProductFilterCollectionsLazyQueryHookResult = ReturnType; +export type InitialProductFilterCollectionsQueryResult = Apollo.QueryResult; +export const InitialProductFilterProductTypesDocument = gql` + query InitialProductFilterProductTypes($productTypes: [ID!]) { + productTypes(first: 100, filter: {ids: $productTypes}) { + edges { + node { + id + name + } + } + } +} + `; + +/** + * __useInitialProductFilterProductTypesQuery__ + * + * To run a query within a React component, call `useInitialProductFilterProductTypesQuery` and pass it any options that fit your needs. + * When your component renders, `useInitialProductFilterProductTypesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useInitialProductFilterProductTypesQuery({ + * variables: { + * productTypes: // value for 'productTypes' + * }, + * }); + */ +export function useInitialProductFilterProductTypesQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(InitialProductFilterProductTypesDocument, options); + } +export function useInitialProductFilterProductTypesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(InitialProductFilterProductTypesDocument, options); + } +export type InitialProductFilterProductTypesQueryHookResult = ReturnType; +export type InitialProductFilterProductTypesLazyQueryHookResult = ReturnType; +export type InitialProductFilterProductTypesQueryResult = Apollo.QueryResult; +export const ProductListDocument = gql` + query ProductList($first: Int, $after: String, $last: Int, $before: String, $filter: ProductFilterInput, $channel: String, $sort: ProductOrder, $hasChannel: Boolean!, $hasSelectedAttributes: Boolean!) { + products( + before: $before + after: $after + first: $first + last: $last + filter: $filter + sortBy: $sort + channel: $channel + ) { + edges { + node { + ...ProductWithChannelListings + updatedAt + attributes @include(if: $hasSelectedAttributes) { + attribute { + id + } + values { + ...AttributeValue + } + } + } + } + pageInfo { + hasPreviousPage + hasNextPage + startCursor + endCursor + } + totalCount + } +} + ${ProductWithChannelListingsFragmentDoc} +${AttributeValueFragmentDoc}`; + +/** + * __useProductListQuery__ + * + * To run a query within a React component, call `useProductListQuery` and pass it any options that fit your needs. + * When your component renders, `useProductListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useProductListQuery({ + * variables: { + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * filter: // value for 'filter' + * channel: // value for 'channel' + * sort: // value for 'sort' + * hasChannel: // value for 'hasChannel' + * hasSelectedAttributes: // value for 'hasSelectedAttributes' + * }, + * }); + */ +export function useProductListQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ProductListDocument, options); + } +export function useProductListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ProductListDocument, options); + } +export type ProductListQueryHookResult = ReturnType; +export type ProductListLazyQueryHookResult = ReturnType; +export type ProductListQueryResult = Apollo.QueryResult; +export const ProductCountDocument = gql` + query ProductCount($filter: ProductFilterInput, $channel: String) { + products(filter: $filter, channel: $channel) { + totalCount + } +} + `; + +/** + * __useProductCountQuery__ + * + * To run a query within a React component, call `useProductCountQuery` and pass it any options that fit your needs. + * When your component renders, `useProductCountQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useProductCountQuery({ + * variables: { + * filter: // value for 'filter' + * channel: // value for 'channel' + * }, + * }); + */ +export function useProductCountQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ProductCountDocument, options); + } +export function useProductCountLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ProductCountDocument, options); + } +export type ProductCountQueryHookResult = ReturnType; +export type ProductCountLazyQueryHookResult = ReturnType; +export type ProductCountQueryResult = Apollo.QueryResult; +export const ProductDetailsDocument = gql` + query ProductDetails($id: ID!, $channel: String, $firstValues: Int, $afterValues: String, $lastValues: Int, $beforeValues: String) { + product(id: $id, channel: $channel) { + ...Product + } + taxTypes { + ...TaxType + } +} + ${ProductFragmentDoc} +${TaxTypeFragmentDoc}`; + +/** + * __useProductDetailsQuery__ + * + * To run a query within a React component, call `useProductDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useProductDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useProductDetailsQuery({ + * variables: { + * id: // value for 'id' + * channel: // value for 'channel' + * firstValues: // value for 'firstValues' + * afterValues: // value for 'afterValues' + * lastValues: // value for 'lastValues' + * beforeValues: // value for 'beforeValues' + * }, + * }); + */ +export function useProductDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ProductDetailsDocument, options); + } +export function useProductDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ProductDetailsDocument, options); + } +export type ProductDetailsQueryHookResult = ReturnType; +export type ProductDetailsLazyQueryHookResult = ReturnType; +export type ProductDetailsQueryResult = Apollo.QueryResult; +export const ProductTypeDocument = gql` + query ProductType($id: ID!, $firstValues: Int, $afterValues: String, $lastValues: Int, $beforeValues: String) { + productType(id: $id) { + id + name + hasVariants + productAttributes { + id + inputType + entityType + slug + name + valueRequired + unit + choices( + first: $firstValues + after: $afterValues + last: $lastValues + before: $beforeValues + ) { + ...AttributeValueList + } + } + taxType { + ...TaxType + } + } +} + ${AttributeValueListFragmentDoc} +${TaxTypeFragmentDoc}`; + +/** + * __useProductTypeQuery__ + * + * To run a query within a React component, call `useProductTypeQuery` and pass it any options that fit your needs. + * When your component renders, `useProductTypeQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useProductTypeQuery({ + * variables: { + * id: // value for 'id' + * firstValues: // value for 'firstValues' + * afterValues: // value for 'afterValues' + * lastValues: // value for 'lastValues' + * beforeValues: // value for 'beforeValues' + * }, + * }); + */ +export function useProductTypeQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ProductTypeDocument, options); + } +export function useProductTypeLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ProductTypeDocument, options); + } +export type ProductTypeQueryHookResult = ReturnType; +export type ProductTypeLazyQueryHookResult = ReturnType; +export type ProductTypeQueryResult = Apollo.QueryResult; +export const ProductVariantDetailsDocument = gql` + query ProductVariantDetails($id: ID!, $firstValues: Int, $afterValues: String, $lastValues: Int, $beforeValues: String) { + productVariant(id: $id) { + ...ProductVariant + } +} + ${ProductVariantFragmentDoc}`; + +/** + * __useProductVariantDetailsQuery__ + * + * To run a query within a React component, call `useProductVariantDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useProductVariantDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useProductVariantDetailsQuery({ + * variables: { + * id: // value for 'id' + * firstValues: // value for 'firstValues' + * afterValues: // value for 'afterValues' + * lastValues: // value for 'lastValues' + * beforeValues: // value for 'beforeValues' + * }, + * }); + */ +export function useProductVariantDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ProductVariantDetailsDocument, options); + } +export function useProductVariantDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ProductVariantDetailsDocument, options); + } +export type ProductVariantDetailsQueryHookResult = ReturnType; +export type ProductVariantDetailsLazyQueryHookResult = ReturnType; +export type ProductVariantDetailsQueryResult = Apollo.QueryResult; +export const ProductVariantCreateDataDocument = gql` + query ProductVariantCreateData($id: ID!, $firstValues: Int, $afterValues: String, $lastValues: Int, $beforeValues: String) { + product(id: $id) { + id + media { + id + sortOrder + url + } + channelListings { + channel { + id + name + currencyCode + } + } + name + productType { + id + selectionVariantAttributes: variantAttributes( + variantSelection: VARIANT_SELECTION + ) { + ...VariantAttribute + } + nonSelectionVariantAttributes: variantAttributes( + variantSelection: NOT_VARIANT_SELECTION + ) { + ...VariantAttribute + } + } + thumbnail { + url + } + variants { + id + name + sku + media { + id + url + type + } + } + } +} + ${VariantAttributeFragmentDoc}`; + +/** + * __useProductVariantCreateDataQuery__ + * + * To run a query within a React component, call `useProductVariantCreateDataQuery` and pass it any options that fit your needs. + * When your component renders, `useProductVariantCreateDataQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useProductVariantCreateDataQuery({ + * variables: { + * id: // value for 'id' + * firstValues: // value for 'firstValues' + * afterValues: // value for 'afterValues' + * lastValues: // value for 'lastValues' + * beforeValues: // value for 'beforeValues' + * }, + * }); + */ +export function useProductVariantCreateDataQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ProductVariantCreateDataDocument, options); + } +export function useProductVariantCreateDataLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ProductVariantCreateDataDocument, options); + } +export type ProductVariantCreateDataQueryHookResult = ReturnType; +export type ProductVariantCreateDataLazyQueryHookResult = ReturnType; +export type ProductVariantCreateDataQueryResult = Apollo.QueryResult; +export const ProductMediaByIdDocument = gql` + query ProductMediaById($productId: ID!, $mediaId: ID!) { + product(id: $productId) { + id + name + mainImage: mediaById(id: $mediaId) { + id + alt + url + type + oembedData + } + media { + id + url(size: 48) + alt + type + oembedData + } + } +} + `; + +/** + * __useProductMediaByIdQuery__ + * + * To run a query within a React component, call `useProductMediaByIdQuery` and pass it any options that fit your needs. + * When your component renders, `useProductMediaByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useProductMediaByIdQuery({ + * variables: { + * productId: // value for 'productId' + * mediaId: // value for 'mediaId' + * }, + * }); + */ +export function useProductMediaByIdQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ProductMediaByIdDocument, options); + } +export function useProductMediaByIdLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ProductMediaByIdDocument, options); + } +export type ProductMediaByIdQueryHookResult = ReturnType; +export type ProductMediaByIdLazyQueryHookResult = ReturnType; +export type ProductMediaByIdQueryResult = Apollo.QueryResult; +export const AvailableInGridAttributesDocument = gql` + query AvailableInGridAttributes($first: Int!, $after: String) { + availableInGrid: attributes( + first: $first + after: $after + filter: {availableInGrid: true, isVariantOnly: false, type: PRODUCT_TYPE} + ) { + edges { + node { + id + name + } + } + pageInfo { + ...PageInfo + } + totalCount + } +} + ${PageInfoFragmentDoc}`; + +/** + * __useAvailableInGridAttributesQuery__ + * + * To run a query within a React component, call `useAvailableInGridAttributesQuery` and pass it any options that fit your needs. + * When your component renders, `useAvailableInGridAttributesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAvailableInGridAttributesQuery({ + * variables: { + * first: // value for 'first' + * after: // value for 'after' + * }, + * }); + */ +export function useAvailableInGridAttributesQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(AvailableInGridAttributesDocument, options); + } +export function useAvailableInGridAttributesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(AvailableInGridAttributesDocument, options); + } +export type AvailableInGridAttributesQueryHookResult = ReturnType; +export type AvailableInGridAttributesLazyQueryHookResult = ReturnType; +export type AvailableInGridAttributesQueryResult = Apollo.QueryResult; +export const GridAttributesDocument = gql` + query GridAttributes($ids: [ID!]!) { + grid: attributes(first: 25, filter: {ids: $ids}) { + edges { + node { + id + name + } + } + } +} + `; + +/** + * __useGridAttributesQuery__ + * + * To run a query within a React component, call `useGridAttributesQuery` and pass it any options that fit your needs. + * When your component renders, `useGridAttributesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGridAttributesQuery({ + * variables: { + * ids: // value for 'ids' + * }, + * }); + */ +export function useGridAttributesQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(GridAttributesDocument, options); + } +export function useGridAttributesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(GridAttributesDocument, options); + } +export type GridAttributesQueryHookResult = ReturnType; +export type GridAttributesLazyQueryHookResult = ReturnType; +export type GridAttributesQueryResult = Apollo.QueryResult; +export const CreateMultipleVariantsDataDocument = gql` + query CreateMultipleVariantsData($id: ID!, $firstValues: Int, $afterValues: String, $lastValues: Int, $beforeValues: String) { + product(id: $id) { + ...ProductVariantAttributes + } + warehouses(first: 20) { + edges { + node { + ...Warehouse + } + } + } +} + ${ProductVariantAttributesFragmentDoc} +${WarehouseFragmentDoc}`; + +/** + * __useCreateMultipleVariantsDataQuery__ + * + * To run a query within a React component, call `useCreateMultipleVariantsDataQuery` and pass it any options that fit your needs. + * When your component renders, `useCreateMultipleVariantsDataQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useCreateMultipleVariantsDataQuery({ + * variables: { + * id: // value for 'id' + * firstValues: // value for 'firstValues' + * afterValues: // value for 'afterValues' + * lastValues: // value for 'lastValues' + * beforeValues: // value for 'beforeValues' + * }, + * }); + */ +export function useCreateMultipleVariantsDataQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(CreateMultipleVariantsDataDocument, options); + } +export function useCreateMultipleVariantsDataLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(CreateMultipleVariantsDataDocument, options); + } +export type CreateMultipleVariantsDataQueryHookResult = ReturnType; +export type CreateMultipleVariantsDataLazyQueryHookResult = ReturnType; +export type CreateMultipleVariantsDataQueryResult = Apollo.QueryResult; +export const SearchAttributesDocument = gql` + query SearchAttributes($after: String, $first: Int!, $query: String!) { + search: attributes(after: $after, first: $first, filter: {search: $query}) { + edges { + node { + id + name + } + } + pageInfo { + ...PageInfo + } + } +} + ${PageInfoFragmentDoc}`; + +/** + * __useSearchAttributesQuery__ + * + * To run a query within a React component, call `useSearchAttributesQuery` and pass it any options that fit your needs. + * When your component renders, `useSearchAttributesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSearchAttributesQuery({ + * variables: { + * after: // value for 'after' + * first: // value for 'first' + * query: // value for 'query' + * }, + * }); + */ +export function useSearchAttributesQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SearchAttributesDocument, options); + } +export function useSearchAttributesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SearchAttributesDocument, options); + } +export type SearchAttributesQueryHookResult = ReturnType; +export type SearchAttributesLazyQueryHookResult = ReturnType; +export type SearchAttributesQueryResult = Apollo.QueryResult; +export const SearchAttributeValuesDocument = gql` + query SearchAttributeValues($id: ID, $after: String, $first: Int!, $query: String!) { + attribute(id: $id) { + id + choices(after: $after, first: $first, filter: {search: $query}) { + edges { + node { + ...AttributeValueDetails + } + } + pageInfo { + ...PageInfo + } + } + } +} + ${AttributeValueDetailsFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __useSearchAttributeValuesQuery__ + * + * To run a query within a React component, call `useSearchAttributeValuesQuery` and pass it any options that fit your needs. + * When your component renders, `useSearchAttributeValuesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSearchAttributeValuesQuery({ + * variables: { + * id: // value for 'id' + * after: // value for 'after' + * first: // value for 'first' + * query: // value for 'query' + * }, + * }); + */ +export function useSearchAttributeValuesQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SearchAttributeValuesDocument, options); + } +export function useSearchAttributeValuesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SearchAttributeValuesDocument, options); + } +export type SearchAttributeValuesQueryHookResult = ReturnType; +export type SearchAttributeValuesLazyQueryHookResult = ReturnType; +export type SearchAttributeValuesQueryResult = Apollo.QueryResult; +export const SearchAvailablePageAttributesDocument = gql` + query SearchAvailablePageAttributes($id: ID!, $after: String, $first: Int!, $query: String!) { + pageType(id: $id) { + id + availableAttributes(after: $after, first: $first, filter: {search: $query}) { + edges { + node { + ...AvailableAttribute + } + } + pageInfo { + ...PageInfo + } + } + } +} + ${AvailableAttributeFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __useSearchAvailablePageAttributesQuery__ + * + * To run a query within a React component, call `useSearchAvailablePageAttributesQuery` and pass it any options that fit your needs. + * When your component renders, `useSearchAvailablePageAttributesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSearchAvailablePageAttributesQuery({ + * variables: { + * id: // value for 'id' + * after: // value for 'after' + * first: // value for 'first' + * query: // value for 'query' + * }, + * }); + */ +export function useSearchAvailablePageAttributesQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SearchAvailablePageAttributesDocument, options); + } +export function useSearchAvailablePageAttributesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SearchAvailablePageAttributesDocument, options); + } +export type SearchAvailablePageAttributesQueryHookResult = ReturnType; +export type SearchAvailablePageAttributesLazyQueryHookResult = ReturnType; +export type SearchAvailablePageAttributesQueryResult = Apollo.QueryResult; +export const SearchAvailableProductAttributesDocument = gql` + query SearchAvailableProductAttributes($id: ID!, $after: String, $first: Int!, $query: String!) { + productType(id: $id) { + id + availableAttributes(after: $after, first: $first, filter: {search: $query}) { + edges { + node { + ...AvailableAttribute + } + } + pageInfo { + ...PageInfo + } + } + } +} + ${AvailableAttributeFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __useSearchAvailableProductAttributesQuery__ + * + * To run a query within a React component, call `useSearchAvailableProductAttributesQuery` and pass it any options that fit your needs. + * When your component renders, `useSearchAvailableProductAttributesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSearchAvailableProductAttributesQuery({ + * variables: { + * id: // value for 'id' + * after: // value for 'after' + * first: // value for 'first' + * query: // value for 'query' + * }, + * }); + */ +export function useSearchAvailableProductAttributesQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SearchAvailableProductAttributesDocument, options); + } +export function useSearchAvailableProductAttributesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SearchAvailableProductAttributesDocument, options); + } +export type SearchAvailableProductAttributesQueryHookResult = ReturnType; +export type SearchAvailableProductAttributesLazyQueryHookResult = ReturnType; +export type SearchAvailableProductAttributesQueryResult = Apollo.QueryResult; +export const SearchCategoriesDocument = gql` + query SearchCategories($after: String, $first: Int!, $query: String!) { + search: categories(after: $after, first: $first, filter: {search: $query}) { + edges { + node { + id + name + } + } + pageInfo { + ...PageInfo + } + } +} + ${PageInfoFragmentDoc}`; + +/** + * __useSearchCategoriesQuery__ + * + * To run a query within a React component, call `useSearchCategoriesQuery` and pass it any options that fit your needs. + * When your component renders, `useSearchCategoriesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSearchCategoriesQuery({ + * variables: { + * after: // value for 'after' + * first: // value for 'first' + * query: // value for 'query' + * }, + * }); + */ +export function useSearchCategoriesQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SearchCategoriesDocument, options); + } +export function useSearchCategoriesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SearchCategoriesDocument, options); + } +export type SearchCategoriesQueryHookResult = ReturnType; +export type SearchCategoriesLazyQueryHookResult = ReturnType; +export type SearchCategoriesQueryResult = Apollo.QueryResult; +export const SearchCollectionsDocument = gql` + query SearchCollections($after: String, $first: Int!, $query: String!) { + search: collections(after: $after, first: $first, filter: {search: $query}) { + edges { + node { + id + name + } + } + pageInfo { + ...PageInfo + } + } +} + ${PageInfoFragmentDoc}`; + +/** + * __useSearchCollectionsQuery__ + * + * To run a query within a React component, call `useSearchCollectionsQuery` and pass it any options that fit your needs. + * When your component renders, `useSearchCollectionsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSearchCollectionsQuery({ + * variables: { + * after: // value for 'after' + * first: // value for 'first' + * query: // value for 'query' + * }, + * }); + */ +export function useSearchCollectionsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SearchCollectionsDocument, options); + } +export function useSearchCollectionsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SearchCollectionsDocument, options); + } +export type SearchCollectionsQueryHookResult = ReturnType; +export type SearchCollectionsLazyQueryHookResult = ReturnType; +export type SearchCollectionsQueryResult = Apollo.QueryResult; +export const SearchCustomersDocument = gql` + query SearchCustomers($after: String, $first: Int!, $query: String!) { + search: customers(after: $after, first: $first, filter: {search: $query}) { + edges { + node { + id + email + firstName + lastName + } + } + pageInfo { + ...PageInfo + } + } +} + ${PageInfoFragmentDoc}`; + +/** + * __useSearchCustomersQuery__ + * + * To run a query within a React component, call `useSearchCustomersQuery` and pass it any options that fit your needs. + * When your component renders, `useSearchCustomersQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSearchCustomersQuery({ + * variables: { + * after: // value for 'after' + * first: // value for 'first' + * query: // value for 'query' + * }, + * }); + */ +export function useSearchCustomersQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SearchCustomersDocument, options); + } +export function useSearchCustomersLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SearchCustomersDocument, options); + } +export type SearchCustomersQueryHookResult = ReturnType; +export type SearchCustomersLazyQueryHookResult = ReturnType; +export type SearchCustomersQueryResult = Apollo.QueryResult; +export const SearchGiftCardTagsDocument = gql` + query SearchGiftCardTags($query: String!, $first: Int!, $after: String, $last: Int, $before: String) { + search: giftCardTags( + filter: {search: $query} + first: $first + after: $after + last: $last + before: $before + ) { + totalCount + edges { + node { + id + name + } + } + pageInfo { + ...PageInfo + } + } +} + ${PageInfoFragmentDoc}`; + +/** + * __useSearchGiftCardTagsQuery__ + * + * To run a query within a React component, call `useSearchGiftCardTagsQuery` and pass it any options that fit your needs. + * When your component renders, `useSearchGiftCardTagsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSearchGiftCardTagsQuery({ + * variables: { + * query: // value for 'query' + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * }, + * }); + */ +export function useSearchGiftCardTagsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SearchGiftCardTagsDocument, options); + } +export function useSearchGiftCardTagsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SearchGiftCardTagsDocument, options); + } +export type SearchGiftCardTagsQueryHookResult = ReturnType; +export type SearchGiftCardTagsLazyQueryHookResult = ReturnType; +export type SearchGiftCardTagsQueryResult = Apollo.QueryResult; +export const SearchOrderVariantDocument = gql` + query SearchOrderVariant($channel: String!, $first: Int!, $query: String!, $after: String, $address: AddressInput) { + search: products( + first: $first + after: $after + filter: {search: $query} + channel: $channel + ) { + edges { + node { + id + name + thumbnail { + url + } + variants { + id + name + sku + pricing(address: $address) { + priceUndiscounted { + gross { + ...Money + } + } + price { + gross { + ...Money + } + } + onSale + } + channelListings { + channel { + id + isActive + name + currencyCode + } + price { + amount + currency + } + } + } + } + } + pageInfo { + endCursor + hasNextPage + hasPreviousPage + startCursor + } + } +} + ${MoneyFragmentDoc}`; + +/** + * __useSearchOrderVariantQuery__ + * + * To run a query within a React component, call `useSearchOrderVariantQuery` and pass it any options that fit your needs. + * When your component renders, `useSearchOrderVariantQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSearchOrderVariantQuery({ + * variables: { + * channel: // value for 'channel' + * first: // value for 'first' + * query: // value for 'query' + * after: // value for 'after' + * address: // value for 'address' + * }, + * }); + */ +export function useSearchOrderVariantQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SearchOrderVariantDocument, options); + } +export function useSearchOrderVariantLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SearchOrderVariantDocument, options); + } +export type SearchOrderVariantQueryHookResult = ReturnType; +export type SearchOrderVariantLazyQueryHookResult = ReturnType; +export type SearchOrderVariantQueryResult = Apollo.QueryResult; +export const SearchPagesDocument = gql` + query SearchPages($after: String, $first: Int!, $query: String!) { + search: pages(after: $after, first: $first, filter: {search: $query}) { + edges { + node { + id + title + } + } + pageInfo { + ...PageInfo + } + } +} + ${PageInfoFragmentDoc}`; + +/** + * __useSearchPagesQuery__ + * + * To run a query within a React component, call `useSearchPagesQuery` and pass it any options that fit your needs. + * When your component renders, `useSearchPagesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSearchPagesQuery({ + * variables: { + * after: // value for 'after' + * first: // value for 'first' + * query: // value for 'query' + * }, + * }); + */ +export function useSearchPagesQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SearchPagesDocument, options); + } +export function useSearchPagesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SearchPagesDocument, options); + } +export type SearchPagesQueryHookResult = ReturnType; +export type SearchPagesLazyQueryHookResult = ReturnType; +export type SearchPagesQueryResult = Apollo.QueryResult; +export const SearchPageTypesDocument = gql` + query SearchPageTypes($after: String, $first: Int!, $query: String!) { + search: pageTypes(after: $after, first: $first, filter: {search: $query}) { + edges { + node { + id + name + } + } + pageInfo { + ...PageInfo + } + } +} + ${PageInfoFragmentDoc}`; + +/** + * __useSearchPageTypesQuery__ + * + * To run a query within a React component, call `useSearchPageTypesQuery` and pass it any options that fit your needs. + * When your component renders, `useSearchPageTypesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSearchPageTypesQuery({ + * variables: { + * after: // value for 'after' + * first: // value for 'first' + * query: // value for 'query' + * }, + * }); + */ +export function useSearchPageTypesQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SearchPageTypesDocument, options); + } +export function useSearchPageTypesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SearchPageTypesDocument, options); + } +export type SearchPageTypesQueryHookResult = ReturnType; +export type SearchPageTypesLazyQueryHookResult = ReturnType; +export type SearchPageTypesQueryResult = Apollo.QueryResult; +export const SearchPermissionGroupsDocument = gql` + query SearchPermissionGroups($after: String, $first: Int!, $query: String!) { + search: permissionGroups(after: $after, first: $first, filter: {search: $query}) { + edges { + node { + id + name + userCanManage + } + } + pageInfo { + ...PageInfo + } + } +} + ${PageInfoFragmentDoc}`; + +/** + * __useSearchPermissionGroupsQuery__ + * + * To run a query within a React component, call `useSearchPermissionGroupsQuery` and pass it any options that fit your needs. + * When your component renders, `useSearchPermissionGroupsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSearchPermissionGroupsQuery({ + * variables: { + * after: // value for 'after' + * first: // value for 'first' + * query: // value for 'query' + * }, + * }); + */ +export function useSearchPermissionGroupsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SearchPermissionGroupsDocument, options); + } +export function useSearchPermissionGroupsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SearchPermissionGroupsDocument, options); + } +export type SearchPermissionGroupsQueryHookResult = ReturnType; +export type SearchPermissionGroupsLazyQueryHookResult = ReturnType; +export type SearchPermissionGroupsQueryResult = Apollo.QueryResult; +export const SearchProductsDocument = gql` + query SearchProducts($after: String, $first: Int!, $query: String!) { + search: products(after: $after, first: $first, filter: {search: $query}) { + edges { + node { + id + name + thumbnail { + url + } + variants { + id + name + sku + channelListings { + channel { + id + isActive + name + currencyCode + } + price { + amount + currency + } + } + } + } + } + pageInfo { + ...PageInfo + } + } +} + ${PageInfoFragmentDoc}`; + +/** + * __useSearchProductsQuery__ + * + * To run a query within a React component, call `useSearchProductsQuery` and pass it any options that fit your needs. + * When your component renders, `useSearchProductsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSearchProductsQuery({ + * variables: { + * after: // value for 'after' + * first: // value for 'first' + * query: // value for 'query' + * }, + * }); + */ +export function useSearchProductsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SearchProductsDocument, options); + } +export function useSearchProductsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SearchProductsDocument, options); + } +export type SearchProductsQueryHookResult = ReturnType; +export type SearchProductsLazyQueryHookResult = ReturnType; +export type SearchProductsQueryResult = Apollo.QueryResult; +export const SearchProductTypesDocument = gql` + query SearchProductTypes($after: String, $first: Int!, $query: String!) { + search: productTypes(after: $after, first: $first, filter: {search: $query}) { + edges { + node { + id + name + } + } + pageInfo { + ...PageInfo + } + } +} + ${PageInfoFragmentDoc}`; + +/** + * __useSearchProductTypesQuery__ + * + * To run a query within a React component, call `useSearchProductTypesQuery` and pass it any options that fit your needs. + * When your component renders, `useSearchProductTypesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSearchProductTypesQuery({ + * variables: { + * after: // value for 'after' + * first: // value for 'first' + * query: // value for 'query' + * }, + * }); + */ +export function useSearchProductTypesQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SearchProductTypesDocument, options); + } +export function useSearchProductTypesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SearchProductTypesDocument, options); + } +export type SearchProductTypesQueryHookResult = ReturnType; +export type SearchProductTypesLazyQueryHookResult = ReturnType; +export type SearchProductTypesQueryResult = Apollo.QueryResult; +export const SearchShippingZonesDocument = gql` + query SearchShippingZones($query: String!, $first: Int!, $after: String, $last: Int, $before: String) { + search: shippingZones( + filter: {search: $query} + first: $first + after: $after + last: $last + before: $before + ) { + totalCount + edges { + node { + id + name + } + } + pageInfo { + ...PageInfo + } + } +} + ${PageInfoFragmentDoc}`; + +/** + * __useSearchShippingZonesQuery__ + * + * To run a query within a React component, call `useSearchShippingZonesQuery` and pass it any options that fit your needs. + * When your component renders, `useSearchShippingZonesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSearchShippingZonesQuery({ + * variables: { + * query: // value for 'query' + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * }, + * }); + */ +export function useSearchShippingZonesQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SearchShippingZonesDocument, options); + } +export function useSearchShippingZonesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SearchShippingZonesDocument, options); + } +export type SearchShippingZonesQueryHookResult = ReturnType; +export type SearchShippingZonesLazyQueryHookResult = ReturnType; +export type SearchShippingZonesQueryResult = Apollo.QueryResult; +export const SearchStaffMembersDocument = gql` + query SearchStaffMembers($after: String, $first: Int!, $query: String!) { + search: staffUsers(after: $after, first: $first, filter: {search: $query}) { + edges { + node { + id + email + firstName + lastName + isActive + avatar { + alt + url + } + } + } + pageInfo { + ...PageInfo + } + } +} + ${PageInfoFragmentDoc}`; + +/** + * __useSearchStaffMembersQuery__ + * + * To run a query within a React component, call `useSearchStaffMembersQuery` and pass it any options that fit your needs. + * When your component renders, `useSearchStaffMembersQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSearchStaffMembersQuery({ + * variables: { + * after: // value for 'after' + * first: // value for 'first' + * query: // value for 'query' + * }, + * }); + */ +export function useSearchStaffMembersQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SearchStaffMembersDocument, options); + } +export function useSearchStaffMembersLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SearchStaffMembersDocument, options); + } +export type SearchStaffMembersQueryHookResult = ReturnType; +export type SearchStaffMembersLazyQueryHookResult = ReturnType; +export type SearchStaffMembersQueryResult = Apollo.QueryResult; +export const SearchWarehousesDocument = gql` + query SearchWarehouses($after: String, $first: Int!, $query: String!) { + search: warehouses(after: $after, first: $first, filter: {search: $query}) { + edges { + node { + id + name + } + } + pageInfo { + ...PageInfo + } + } +} + ${PageInfoFragmentDoc}`; + +/** + * __useSearchWarehousesQuery__ + * + * To run a query within a React component, call `useSearchWarehousesQuery` and pass it any options that fit your needs. + * When your component renders, `useSearchWarehousesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSearchWarehousesQuery({ + * variables: { + * after: // value for 'after' + * first: // value for 'first' + * query: // value for 'query' + * }, + * }); + */ +export function useSearchWarehousesQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SearchWarehousesDocument, options); + } +export function useSearchWarehousesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SearchWarehousesDocument, options); + } +export type SearchWarehousesQueryHookResult = ReturnType; +export type SearchWarehousesLazyQueryHookResult = ReturnType; +export type SearchWarehousesQueryResult = Apollo.QueryResult; +export const DeleteShippingZoneDocument = gql` + mutation DeleteShippingZone($id: ID!) { + shippingZoneDelete(id: $id) { + errors { + ...ShippingError + } + } +} + ${ShippingErrorFragmentDoc}`; +export type DeleteShippingZoneMutationFn = Apollo.MutationFunction; + +/** + * __useDeleteShippingZoneMutation__ + * + * To run a mutation, you first call `useDeleteShippingZoneMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useDeleteShippingZoneMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [deleteShippingZoneMutation, { data, loading, error }] = useDeleteShippingZoneMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useDeleteShippingZoneMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(DeleteShippingZoneDocument, options); + } +export type DeleteShippingZoneMutationHookResult = ReturnType; +export type DeleteShippingZoneMutationResult = Apollo.MutationResult; +export type DeleteShippingZoneMutationOptions = Apollo.BaseMutationOptions; +export const BulkDeleteShippingZoneDocument = gql` + mutation BulkDeleteShippingZone($ids: [ID]!) { + shippingZoneBulkDelete(ids: $ids) { + errors { + ...ShippingError + } + } +} + ${ShippingErrorFragmentDoc}`; +export type BulkDeleteShippingZoneMutationFn = Apollo.MutationFunction; + +/** + * __useBulkDeleteShippingZoneMutation__ + * + * To run a mutation, you first call `useBulkDeleteShippingZoneMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useBulkDeleteShippingZoneMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [bulkDeleteShippingZoneMutation, { data, loading, error }] = useBulkDeleteShippingZoneMutation({ + * variables: { + * ids: // value for 'ids' + * }, + * }); + */ +export function useBulkDeleteShippingZoneMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(BulkDeleteShippingZoneDocument, options); + } +export type BulkDeleteShippingZoneMutationHookResult = ReturnType; +export type BulkDeleteShippingZoneMutationResult = Apollo.MutationResult; +export type BulkDeleteShippingZoneMutationOptions = Apollo.BaseMutationOptions; +export const UpdateDefaultWeightUnitDocument = gql` + mutation UpdateDefaultWeightUnit($unit: WeightUnitsEnum) { + shopSettingsUpdate(input: {defaultWeightUnit: $unit}) { + errors { + ...ShopSettingsUpdateErrorFragment + } + shop { + defaultWeightUnit + } + } +} + ${ShopSettingsUpdateErrorFragmentFragmentDoc}`; +export type UpdateDefaultWeightUnitMutationFn = Apollo.MutationFunction; + +/** + * __useUpdateDefaultWeightUnitMutation__ + * + * To run a mutation, you first call `useUpdateDefaultWeightUnitMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateDefaultWeightUnitMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updateDefaultWeightUnitMutation, { data, loading, error }] = useUpdateDefaultWeightUnitMutation({ + * variables: { + * unit: // value for 'unit' + * }, + * }); + */ +export function useUpdateDefaultWeightUnitMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UpdateDefaultWeightUnitDocument, options); + } +export type UpdateDefaultWeightUnitMutationHookResult = ReturnType; +export type UpdateDefaultWeightUnitMutationResult = Apollo.MutationResult; +export type UpdateDefaultWeightUnitMutationOptions = Apollo.BaseMutationOptions; +export const CreateShippingZoneDocument = gql` + mutation CreateShippingZone($input: ShippingZoneCreateInput!) { + shippingZoneCreate(input: $input) { + errors { + ...ShippingError + } + shippingZone { + countries { + ...Country + } + id + name + } + } +} + ${ShippingErrorFragmentDoc} +${CountryFragmentDoc}`; +export type CreateShippingZoneMutationFn = Apollo.MutationFunction; + +/** + * __useCreateShippingZoneMutation__ + * + * To run a mutation, you first call `useCreateShippingZoneMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCreateShippingZoneMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [createShippingZoneMutation, { data, loading, error }] = useCreateShippingZoneMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useCreateShippingZoneMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(CreateShippingZoneDocument, options); + } +export type CreateShippingZoneMutationHookResult = ReturnType; +export type CreateShippingZoneMutationResult = Apollo.MutationResult; +export type CreateShippingZoneMutationOptions = Apollo.BaseMutationOptions; +export const UpdateShippingZoneDocument = gql` + mutation UpdateShippingZone($id: ID!, $input: ShippingZoneUpdateInput!) { + shippingZoneUpdate(id: $id, input: $input) { + errors { + ...ShippingError + } + shippingZone { + countries { + ...Country + } + id + name + } + } +} + ${ShippingErrorFragmentDoc} +${CountryFragmentDoc}`; +export type UpdateShippingZoneMutationFn = Apollo.MutationFunction; + +/** + * __useUpdateShippingZoneMutation__ + * + * To run a mutation, you first call `useUpdateShippingZoneMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateShippingZoneMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updateShippingZoneMutation, { data, loading, error }] = useUpdateShippingZoneMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useUpdateShippingZoneMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UpdateShippingZoneDocument, options); + } +export type UpdateShippingZoneMutationHookResult = ReturnType; +export type UpdateShippingZoneMutationResult = Apollo.MutationResult; +export type UpdateShippingZoneMutationOptions = Apollo.BaseMutationOptions; +export const UpdateShippingRateDocument = gql` + mutation UpdateShippingRate($id: ID!, $input: ShippingPriceInput!) { + shippingPriceUpdate(id: $id, input: $input) { + errors { + ...ShippingError + } + shippingMethod { + ...ShippingMethodType + } + } +} + ${ShippingErrorFragmentDoc} +${ShippingMethodTypeFragmentDoc}`; +export type UpdateShippingRateMutationFn = Apollo.MutationFunction; + +/** + * __useUpdateShippingRateMutation__ + * + * To run a mutation, you first call `useUpdateShippingRateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateShippingRateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updateShippingRateMutation, { data, loading, error }] = useUpdateShippingRateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useUpdateShippingRateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UpdateShippingRateDocument, options); + } +export type UpdateShippingRateMutationHookResult = ReturnType; +export type UpdateShippingRateMutationResult = Apollo.MutationResult; +export type UpdateShippingRateMutationOptions = Apollo.BaseMutationOptions; +export const CreateShippingRateDocument = gql` + mutation CreateShippingRate($input: ShippingPriceInput!) { + shippingPriceCreate(input: $input) { + errors { + ...ShippingError + } + shippingZone { + ...ShippingZoneDetails + } + shippingMethod { + ...ShippingMethodType + } + } +} + ${ShippingErrorFragmentDoc} +${ShippingZoneDetailsFragmentDoc} +${ShippingMethodTypeFragmentDoc}`; +export type CreateShippingRateMutationFn = Apollo.MutationFunction; + +/** + * __useCreateShippingRateMutation__ + * + * To run a mutation, you first call `useCreateShippingRateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCreateShippingRateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [createShippingRateMutation, { data, loading, error }] = useCreateShippingRateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useCreateShippingRateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(CreateShippingRateDocument, options); + } +export type CreateShippingRateMutationHookResult = ReturnType; +export type CreateShippingRateMutationResult = Apollo.MutationResult; +export type CreateShippingRateMutationOptions = Apollo.BaseMutationOptions; +export const DeleteShippingRateDocument = gql` + mutation DeleteShippingRate($id: ID!) { + shippingPriceDelete(id: $id) { + errors { + ...ShippingError + } + shippingZone { + ...ShippingZoneDetails + } + } +} + ${ShippingErrorFragmentDoc} +${ShippingZoneDetailsFragmentDoc}`; +export type DeleteShippingRateMutationFn = Apollo.MutationFunction; + +/** + * __useDeleteShippingRateMutation__ + * + * To run a mutation, you first call `useDeleteShippingRateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useDeleteShippingRateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [deleteShippingRateMutation, { data, loading, error }] = useDeleteShippingRateMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useDeleteShippingRateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(DeleteShippingRateDocument, options); + } +export type DeleteShippingRateMutationHookResult = ReturnType; +export type DeleteShippingRateMutationResult = Apollo.MutationResult; +export type DeleteShippingRateMutationOptions = Apollo.BaseMutationOptions; +export const BulkDeleteShippingRateDocument = gql` + mutation BulkDeleteShippingRate($ids: [ID]!) { + shippingPriceBulkDelete(ids: $ids) { + errors { + ...ShippingError + } + } +} + ${ShippingErrorFragmentDoc}`; +export type BulkDeleteShippingRateMutationFn = Apollo.MutationFunction; + +/** + * __useBulkDeleteShippingRateMutation__ + * + * To run a mutation, you first call `useBulkDeleteShippingRateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useBulkDeleteShippingRateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [bulkDeleteShippingRateMutation, { data, loading, error }] = useBulkDeleteShippingRateMutation({ + * variables: { + * ids: // value for 'ids' + * }, + * }); + */ +export function useBulkDeleteShippingRateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(BulkDeleteShippingRateDocument, options); + } +export type BulkDeleteShippingRateMutationHookResult = ReturnType; +export type BulkDeleteShippingRateMutationResult = Apollo.MutationResult; +export type BulkDeleteShippingRateMutationOptions = Apollo.BaseMutationOptions; +export const ShippingMethodChannelListingUpdateDocument = gql` + mutation ShippingMethodChannelListingUpdate($id: ID!, $input: ShippingMethodChannelListingInput!) { + shippingMethodChannelListingUpdate(id: $id, input: $input) { + shippingMethod { + ...ShippingMethodType + } + errors { + ...ShippingChannelsError + } + } +} + ${ShippingMethodTypeFragmentDoc} +${ShippingChannelsErrorFragmentDoc}`; +export type ShippingMethodChannelListingUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useShippingMethodChannelListingUpdateMutation__ + * + * To run a mutation, you first call `useShippingMethodChannelListingUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useShippingMethodChannelListingUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [shippingMethodChannelListingUpdateMutation, { data, loading, error }] = useShippingMethodChannelListingUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useShippingMethodChannelListingUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ShippingMethodChannelListingUpdateDocument, options); + } +export type ShippingMethodChannelListingUpdateMutationHookResult = ReturnType; +export type ShippingMethodChannelListingUpdateMutationResult = Apollo.MutationResult; +export type ShippingMethodChannelListingUpdateMutationOptions = Apollo.BaseMutationOptions; +export const ShippingPriceExcludeProductDocument = gql` + mutation ShippingPriceExcludeProduct($id: ID!, $input: ShippingPriceExcludeProductsInput!) { + shippingPriceExcludeProducts(id: $id, input: $input) { + errors { + ...ShippingError + } + } +} + ${ShippingErrorFragmentDoc}`; +export type ShippingPriceExcludeProductMutationFn = Apollo.MutationFunction; + +/** + * __useShippingPriceExcludeProductMutation__ + * + * To run a mutation, you first call `useShippingPriceExcludeProductMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useShippingPriceExcludeProductMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [shippingPriceExcludeProductMutation, { data, loading, error }] = useShippingPriceExcludeProductMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useShippingPriceExcludeProductMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ShippingPriceExcludeProductDocument, options); + } +export type ShippingPriceExcludeProductMutationHookResult = ReturnType; +export type ShippingPriceExcludeProductMutationResult = Apollo.MutationResult; +export type ShippingPriceExcludeProductMutationOptions = Apollo.BaseMutationOptions; +export const ShippingPriceRemoveProductFromExcludeDocument = gql` + mutation ShippingPriceRemoveProductFromExclude($id: ID!, $products: [ID]!) { + shippingPriceRemoveProductFromExclude(id: $id, products: $products) { + errors { + ...ShippingError + } + } +} + ${ShippingErrorFragmentDoc}`; +export type ShippingPriceRemoveProductFromExcludeMutationFn = Apollo.MutationFunction; + +/** + * __useShippingPriceRemoveProductFromExcludeMutation__ + * + * To run a mutation, you first call `useShippingPriceRemoveProductFromExcludeMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useShippingPriceRemoveProductFromExcludeMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [shippingPriceRemoveProductFromExcludeMutation, { data, loading, error }] = useShippingPriceRemoveProductFromExcludeMutation({ + * variables: { + * id: // value for 'id' + * products: // value for 'products' + * }, + * }); + */ +export function useShippingPriceRemoveProductFromExcludeMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ShippingPriceRemoveProductFromExcludeDocument, options); + } +export type ShippingPriceRemoveProductFromExcludeMutationHookResult = ReturnType; +export type ShippingPriceRemoveProductFromExcludeMutationResult = Apollo.MutationResult; +export type ShippingPriceRemoveProductFromExcludeMutationOptions = Apollo.BaseMutationOptions; +export const ShippingZonesDocument = gql` + query ShippingZones($first: Int, $after: String, $last: Int, $before: String) { + shippingZones(first: $first, after: $after, last: $last, before: $before) { + edges { + node { + ...ShippingZone + } + } + pageInfo { + ...PageInfo + } + } +} + ${ShippingZoneFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __useShippingZonesQuery__ + * + * To run a query within a React component, call `useShippingZonesQuery` and pass it any options that fit your needs. + * When your component renders, `useShippingZonesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useShippingZonesQuery({ + * variables: { + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * }, + * }); + */ +export function useShippingZonesQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ShippingZonesDocument, options); + } +export function useShippingZonesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ShippingZonesDocument, options); + } +export type ShippingZonesQueryHookResult = ReturnType; +export type ShippingZonesLazyQueryHookResult = ReturnType; +export type ShippingZonesQueryResult = Apollo.QueryResult; +export const ShippingZoneDocument = gql` + query ShippingZone($id: ID!, $before: String, $after: String, $first: Int, $last: Int) { + shippingZone(id: $id) { + ...ShippingZone + default + shippingMethods { + ...ShippingMethodWithExcludedProducts + } + channels { + id + name + currencyCode + } + warehouses { + id + name + } + } +} + ${ShippingZoneFragmentDoc} +${ShippingMethodWithExcludedProductsFragmentDoc}`; + +/** + * __useShippingZoneQuery__ + * + * To run a query within a React component, call `useShippingZoneQuery` and pass it any options that fit your needs. + * When your component renders, `useShippingZoneQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useShippingZoneQuery({ + * variables: { + * id: // value for 'id' + * before: // value for 'before' + * after: // value for 'after' + * first: // value for 'first' + * last: // value for 'last' + * }, + * }); + */ +export function useShippingZoneQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ShippingZoneDocument, options); + } +export function useShippingZoneLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ShippingZoneDocument, options); + } +export type ShippingZoneQueryHookResult = ReturnType; +export type ShippingZoneLazyQueryHookResult = ReturnType; +export type ShippingZoneQueryResult = Apollo.QueryResult; +export const ShippingZoneChannelsDocument = gql` + query ShippingZoneChannels($id: ID!) { + shippingZone(id: $id) { + id + channels { + id + name + currencyCode + } + } +} + `; + +/** + * __useShippingZoneChannelsQuery__ + * + * To run a query within a React component, call `useShippingZoneChannelsQuery` and pass it any options that fit your needs. + * When your component renders, `useShippingZoneChannelsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useShippingZoneChannelsQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useShippingZoneChannelsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ShippingZoneChannelsDocument, options); + } +export function useShippingZoneChannelsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ShippingZoneChannelsDocument, options); + } +export type ShippingZoneChannelsQueryHookResult = ReturnType; +export type ShippingZoneChannelsLazyQueryHookResult = ReturnType; +export type ShippingZoneChannelsQueryResult = Apollo.QueryResult; +export const ChannelShippingZonesDocument = gql` + query ChannelShippingZones($filter: ShippingZoneFilterInput) { + shippingZones(filter: $filter, first: 100) { + edges { + node { + id + name + } + } + } +} + `; + +/** + * __useChannelShippingZonesQuery__ + * + * To run a query within a React component, call `useChannelShippingZonesQuery` and pass it any options that fit your needs. + * When your component renders, `useChannelShippingZonesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useChannelShippingZonesQuery({ + * variables: { + * filter: // value for 'filter' + * }, + * }); + */ +export function useChannelShippingZonesQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ChannelShippingZonesDocument, options); + } +export function useChannelShippingZonesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ChannelShippingZonesDocument, options); + } +export type ChannelShippingZonesQueryHookResult = ReturnType; +export type ChannelShippingZonesLazyQueryHookResult = ReturnType; +export type ChannelShippingZonesQueryResult = Apollo.QueryResult; +export const ShopSettingsUpdateDocument = gql` + mutation ShopSettingsUpdate($shopDomainInput: SiteDomainInput!, $shopSettingsInput: ShopSettingsInput!, $addressInput: AddressInput, $isCloudInstance: Boolean!) { + shopSettingsUpdate(input: $shopSettingsInput) { + errors { + ...ShopError + } + shop { + ...Shop + } + } + shopDomainUpdate(input: $shopDomainInput) @skip(if: $isCloudInstance) { + errors { + ...ShopError + } + shop { + domain { + host + url + } + } + } + shopAddressUpdate(input: $addressInput) { + errors { + ...ShopError + } + shop { + companyAddress { + ...Address + } + } + } +} + ${ShopErrorFragmentDoc} +${ShopFragmentDoc} +${AddressFragmentDoc}`; +export type ShopSettingsUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useShopSettingsUpdateMutation__ + * + * To run a mutation, you first call `useShopSettingsUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useShopSettingsUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [shopSettingsUpdateMutation, { data, loading, error }] = useShopSettingsUpdateMutation({ + * variables: { + * shopDomainInput: // value for 'shopDomainInput' + * shopSettingsInput: // value for 'shopSettingsInput' + * addressInput: // value for 'addressInput' + * isCloudInstance: // value for 'isCloudInstance' + * }, + * }); + */ +export function useShopSettingsUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ShopSettingsUpdateDocument, options); + } +export type ShopSettingsUpdateMutationHookResult = ReturnType; +export type ShopSettingsUpdateMutationResult = Apollo.MutationResult; +export type ShopSettingsUpdateMutationOptions = Apollo.BaseMutationOptions; +export const SiteSettingsDocument = gql` + query SiteSettings { + shop { + ...Shop + } +} + ${ShopFragmentDoc}`; + +/** + * __useSiteSettingsQuery__ + * + * To run a query within a React component, call `useSiteSettingsQuery` and pass it any options that fit your needs. + * When your component renders, `useSiteSettingsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSiteSettingsQuery({ + * variables: { + * }, + * }); + */ +export function useSiteSettingsQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SiteSettingsDocument, options); + } +export function useSiteSettingsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SiteSettingsDocument, options); + } +export type SiteSettingsQueryHookResult = ReturnType; +export type SiteSettingsLazyQueryHookResult = ReturnType; +export type SiteSettingsQueryResult = Apollo.QueryResult; +export const StaffMemberAddDocument = gql` + mutation StaffMemberAdd($input: StaffCreateInput!) { + staffCreate(input: $input) { + errors { + ...StaffError + } + user { + ...StaffMemberDetails + } + } +} + ${StaffErrorFragmentDoc} +${StaffMemberDetailsFragmentDoc}`; +export type StaffMemberAddMutationFn = Apollo.MutationFunction; + +/** + * __useStaffMemberAddMutation__ + * + * To run a mutation, you first call `useStaffMemberAddMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useStaffMemberAddMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [staffMemberAddMutation, { data, loading, error }] = useStaffMemberAddMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useStaffMemberAddMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(StaffMemberAddDocument, options); + } +export type StaffMemberAddMutationHookResult = ReturnType; +export type StaffMemberAddMutationResult = Apollo.MutationResult; +export type StaffMemberAddMutationOptions = Apollo.BaseMutationOptions; +export const StaffMemberUpdateDocument = gql` + mutation StaffMemberUpdate($id: ID!, $input: StaffUpdateInput!) { + staffUpdate(id: $id, input: $input) { + errors { + ...StaffError + } + user { + ...StaffMemberDetails + } + } +} + ${StaffErrorFragmentDoc} +${StaffMemberDetailsFragmentDoc}`; +export type StaffMemberUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useStaffMemberUpdateMutation__ + * + * To run a mutation, you first call `useStaffMemberUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useStaffMemberUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [staffMemberUpdateMutation, { data, loading, error }] = useStaffMemberUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useStaffMemberUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(StaffMemberUpdateDocument, options); + } +export type StaffMemberUpdateMutationHookResult = ReturnType; +export type StaffMemberUpdateMutationResult = Apollo.MutationResult; +export type StaffMemberUpdateMutationOptions = Apollo.BaseMutationOptions; +export const StaffMemberDeleteDocument = gql` + mutation StaffMemberDelete($id: ID!) { + staffDelete(id: $id) { + errors { + ...StaffError + } + } +} + ${StaffErrorFragmentDoc}`; +export type StaffMemberDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useStaffMemberDeleteMutation__ + * + * To run a mutation, you first call `useStaffMemberDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useStaffMemberDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [staffMemberDeleteMutation, { data, loading, error }] = useStaffMemberDeleteMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useStaffMemberDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(StaffMemberDeleteDocument, options); + } +export type StaffMemberDeleteMutationHookResult = ReturnType; +export type StaffMemberDeleteMutationResult = Apollo.MutationResult; +export type StaffMemberDeleteMutationOptions = Apollo.BaseMutationOptions; +export const StaffAvatarUpdateDocument = gql` + mutation StaffAvatarUpdate($image: Upload!) { + userAvatarUpdate(image: $image) { + errors { + ...AccountError + } + user { + id + avatar { + url + } + } + } +} + ${AccountErrorFragmentDoc}`; +export type StaffAvatarUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useStaffAvatarUpdateMutation__ + * + * To run a mutation, you first call `useStaffAvatarUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useStaffAvatarUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [staffAvatarUpdateMutation, { data, loading, error }] = useStaffAvatarUpdateMutation({ + * variables: { + * image: // value for 'image' + * }, + * }); + */ +export function useStaffAvatarUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(StaffAvatarUpdateDocument, options); + } +export type StaffAvatarUpdateMutationHookResult = ReturnType; +export type StaffAvatarUpdateMutationResult = Apollo.MutationResult; +export type StaffAvatarUpdateMutationOptions = Apollo.BaseMutationOptions; +export const StaffAvatarDeleteDocument = gql` + mutation StaffAvatarDelete { + userAvatarDelete { + errors { + ...AccountError + } + user { + id + avatar { + url + } + } + } +} + ${AccountErrorFragmentDoc}`; +export type StaffAvatarDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useStaffAvatarDeleteMutation__ + * + * To run a mutation, you first call `useStaffAvatarDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useStaffAvatarDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [staffAvatarDeleteMutation, { data, loading, error }] = useStaffAvatarDeleteMutation({ + * variables: { + * }, + * }); + */ +export function useStaffAvatarDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(StaffAvatarDeleteDocument, options); + } +export type StaffAvatarDeleteMutationHookResult = ReturnType; +export type StaffAvatarDeleteMutationResult = Apollo.MutationResult; +export type StaffAvatarDeleteMutationOptions = Apollo.BaseMutationOptions; +export const ChangeStaffPasswordDocument = gql` + mutation ChangeStaffPassword($newPassword: String!, $oldPassword: String!) { + passwordChange(newPassword: $newPassword, oldPassword: $oldPassword) { + errors { + ...AccountError + } + } +} + ${AccountErrorFragmentDoc}`; +export type ChangeStaffPasswordMutationFn = Apollo.MutationFunction; + +/** + * __useChangeStaffPasswordMutation__ + * + * To run a mutation, you first call `useChangeStaffPasswordMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useChangeStaffPasswordMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [changeStaffPasswordMutation, { data, loading, error }] = useChangeStaffPasswordMutation({ + * variables: { + * newPassword: // value for 'newPassword' + * oldPassword: // value for 'oldPassword' + * }, + * }); + */ +export function useChangeStaffPasswordMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(ChangeStaffPasswordDocument, options); + } +export type ChangeStaffPasswordMutationHookResult = ReturnType; +export type ChangeStaffPasswordMutationResult = Apollo.MutationResult; +export type ChangeStaffPasswordMutationOptions = Apollo.BaseMutationOptions; +export const StaffListDocument = gql` + query StaffList($first: Int, $after: String, $last: Int, $before: String, $filter: StaffUserInput, $sort: UserSortingInput) { + staffUsers( + before: $before + after: $after + first: $first + last: $last + filter: $filter + sortBy: $sort + ) { + edges { + cursor + node { + ...StaffMember + avatar(size: 48) { + url + } + } + } + pageInfo { + hasPreviousPage + hasNextPage + startCursor + endCursor + } + } +} + ${StaffMemberFragmentDoc}`; + +/** + * __useStaffListQuery__ + * + * To run a query within a React component, call `useStaffListQuery` and pass it any options that fit your needs. + * When your component renders, `useStaffListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useStaffListQuery({ + * variables: { + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * filter: // value for 'filter' + * sort: // value for 'sort' + * }, + * }); + */ +export function useStaffListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(StaffListDocument, options); + } +export function useStaffListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(StaffListDocument, options); + } +export type StaffListQueryHookResult = ReturnType; +export type StaffListLazyQueryHookResult = ReturnType; +export type StaffListQueryResult = Apollo.QueryResult; +export const StaffMemberDetailsDocument = gql` + query StaffMemberDetails($id: ID!) { + user(id: $id) { + ...StaffMemberDetails + } +} + ${StaffMemberDetailsFragmentDoc}`; + +/** + * __useStaffMemberDetailsQuery__ + * + * To run a query within a React component, call `useStaffMemberDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useStaffMemberDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useStaffMemberDetailsQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useStaffMemberDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(StaffMemberDetailsDocument, options); + } +export function useStaffMemberDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(StaffMemberDetailsDocument, options); + } +export type StaffMemberDetailsQueryHookResult = ReturnType; +export type StaffMemberDetailsLazyQueryHookResult = ReturnType; +export type StaffMemberDetailsQueryResult = Apollo.QueryResult; +export const UpdateTaxSettingsDocument = gql` + mutation UpdateTaxSettings($input: ShopSettingsInput!) { + shopSettingsUpdate(input: $input) { + errors { + ...ShopSettingsUpdateErrorFragment + } + shop { + ...ShopTaxes + } + } +} + ${ShopSettingsUpdateErrorFragmentFragmentDoc} +${ShopTaxesFragmentDoc}`; +export type UpdateTaxSettingsMutationFn = Apollo.MutationFunction; + +/** + * __useUpdateTaxSettingsMutation__ + * + * To run a mutation, you first call `useUpdateTaxSettingsMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateTaxSettingsMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updateTaxSettingsMutation, { data, loading, error }] = useUpdateTaxSettingsMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useUpdateTaxSettingsMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UpdateTaxSettingsDocument, options); + } +export type UpdateTaxSettingsMutationHookResult = ReturnType; +export type UpdateTaxSettingsMutationResult = Apollo.MutationResult; +export type UpdateTaxSettingsMutationOptions = Apollo.BaseMutationOptions; +export const FetchTaxesDocument = gql` + mutation FetchTaxes { + shopFetchTaxRates { + errors { + ...ShopFetchTaxRatesErrorFragment + } + shop { + countries { + ...Country + } + } + } +} + ${ShopFetchTaxRatesErrorFragmentFragmentDoc} +${CountryFragmentDoc}`; +export type FetchTaxesMutationFn = Apollo.MutationFunction; + +/** + * __useFetchTaxesMutation__ + * + * To run a mutation, you first call `useFetchTaxesMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useFetchTaxesMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [fetchTaxesMutation, { data, loading, error }] = useFetchTaxesMutation({ + * variables: { + * }, + * }); + */ +export function useFetchTaxesMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(FetchTaxesDocument, options); + } +export type FetchTaxesMutationHookResult = ReturnType; +export type FetchTaxesMutationResult = Apollo.MutationResult; +export type FetchTaxesMutationOptions = Apollo.BaseMutationOptions; +export const CountryListDocument = gql` + query CountryList { + shop { + ...ShopTaxes + countries { + ...CountryWithTaxes + } + } +} + ${ShopTaxesFragmentDoc} +${CountryWithTaxesFragmentDoc}`; + +/** + * __useCountryListQuery__ + * + * To run a query within a React component, call `useCountryListQuery` and pass it any options that fit your needs. + * When your component renders, `useCountryListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useCountryListQuery({ + * variables: { + * }, + * }); + */ +export function useCountryListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(CountryListDocument, options); + } +export function useCountryListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(CountryListDocument, options); + } +export type CountryListQueryHookResult = ReturnType; +export type CountryListLazyQueryHookResult = ReturnType; +export type CountryListQueryResult = Apollo.QueryResult; +export const TaxTypeListDocument = gql` + query TaxTypeList { + taxTypes { + ...TaxType + } +} + ${TaxTypeFragmentDoc}`; + +/** + * __useTaxTypeListQuery__ + * + * To run a query within a React component, call `useTaxTypeListQuery` and pass it any options that fit your needs. + * When your component renders, `useTaxTypeListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useTaxTypeListQuery({ + * variables: { + * }, + * }); + */ +export function useTaxTypeListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(TaxTypeListDocument, options); + } +export function useTaxTypeListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(TaxTypeListDocument, options); + } +export type TaxTypeListQueryHookResult = ReturnType; +export type TaxTypeListLazyQueryHookResult = ReturnType; +export type TaxTypeListQueryResult = Apollo.QueryResult; +export const UpdateProductTranslationsDocument = gql` + mutation UpdateProductTranslations($id: ID!, $input: TranslationInput!, $language: LanguageCodeEnum!) { + productTranslate(id: $id, input: $input, languageCode: $language) { + errors { + ...ProductTranslateErrorFragment + } + product { + id + name + description + seoDescription + seoTitle + translation(languageCode: $language) { + id + description + language { + code + language + } + name + seoDescription + seoTitle + } + } + } +} + ${ProductTranslateErrorFragmentFragmentDoc}`; +export type UpdateProductTranslationsMutationFn = Apollo.MutationFunction; + +/** + * __useUpdateProductTranslationsMutation__ + * + * To run a mutation, you first call `useUpdateProductTranslationsMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateProductTranslationsMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updateProductTranslationsMutation, { data, loading, error }] = useUpdateProductTranslationsMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * language: // value for 'language' + * }, + * }); + */ +export function useUpdateProductTranslationsMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UpdateProductTranslationsDocument, options); + } +export type UpdateProductTranslationsMutationHookResult = ReturnType; +export type UpdateProductTranslationsMutationResult = Apollo.MutationResult; +export type UpdateProductTranslationsMutationOptions = Apollo.BaseMutationOptions; +export const UpdateProductVariantTranslationsDocument = gql` + mutation UpdateProductVariantTranslations($id: ID!, $input: NameTranslationInput!, $language: LanguageCodeEnum!) { + productVariantTranslate(id: $id, input: $input, languageCode: $language) { + errors { + ...ProductVariantTranslateErrorFragment + } + productVariant { + id + name + translation(languageCode: $language) { + id + name + language { + code + language + } + } + } + } +} + ${ProductVariantTranslateErrorFragmentFragmentDoc}`; +export type UpdateProductVariantTranslationsMutationFn = Apollo.MutationFunction; + +/** + * __useUpdateProductVariantTranslationsMutation__ + * + * To run a mutation, you first call `useUpdateProductVariantTranslationsMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateProductVariantTranslationsMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updateProductVariantTranslationsMutation, { data, loading, error }] = useUpdateProductVariantTranslationsMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * language: // value for 'language' + * }, + * }); + */ +export function useUpdateProductVariantTranslationsMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UpdateProductVariantTranslationsDocument, options); + } +export type UpdateProductVariantTranslationsMutationHookResult = ReturnType; +export type UpdateProductVariantTranslationsMutationResult = Apollo.MutationResult; +export type UpdateProductVariantTranslationsMutationOptions = Apollo.BaseMutationOptions; +export const UpdateCategoryTranslationsDocument = gql` + mutation UpdateCategoryTranslations($id: ID!, $input: TranslationInput!, $language: LanguageCodeEnum!) { + categoryTranslate(id: $id, input: $input, languageCode: $language) { + errors { + ...CategoryTranslateErrorFragment + } + category { + id + name + description + seoDescription + seoTitle + translation(languageCode: $language) { + id + description + language { + language + } + name + seoDescription + seoTitle + } + } + } +} + ${CategoryTranslateErrorFragmentFragmentDoc}`; +export type UpdateCategoryTranslationsMutationFn = Apollo.MutationFunction; + +/** + * __useUpdateCategoryTranslationsMutation__ + * + * To run a mutation, you first call `useUpdateCategoryTranslationsMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateCategoryTranslationsMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updateCategoryTranslationsMutation, { data, loading, error }] = useUpdateCategoryTranslationsMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * language: // value for 'language' + * }, + * }); + */ +export function useUpdateCategoryTranslationsMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UpdateCategoryTranslationsDocument, options); + } +export type UpdateCategoryTranslationsMutationHookResult = ReturnType; +export type UpdateCategoryTranslationsMutationResult = Apollo.MutationResult; +export type UpdateCategoryTranslationsMutationOptions = Apollo.BaseMutationOptions; +export const UpdateCollectionTranslationsDocument = gql` + mutation UpdateCollectionTranslations($id: ID!, $input: TranslationInput!, $language: LanguageCodeEnum!) { + collectionTranslate(id: $id, input: $input, languageCode: $language) { + errors { + ...CollectionTranslateErrorFragment + } + collection { + id + name + description + seoDescription + seoTitle + translation(languageCode: $language) { + id + description + language { + language + } + name + seoDescription + seoTitle + } + } + } +} + ${CollectionTranslateErrorFragmentFragmentDoc}`; +export type UpdateCollectionTranslationsMutationFn = Apollo.MutationFunction; + +/** + * __useUpdateCollectionTranslationsMutation__ + * + * To run a mutation, you first call `useUpdateCollectionTranslationsMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateCollectionTranslationsMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updateCollectionTranslationsMutation, { data, loading, error }] = useUpdateCollectionTranslationsMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * language: // value for 'language' + * }, + * }); + */ +export function useUpdateCollectionTranslationsMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UpdateCollectionTranslationsDocument, options); + } +export type UpdateCollectionTranslationsMutationHookResult = ReturnType; +export type UpdateCollectionTranslationsMutationResult = Apollo.MutationResult; +export type UpdateCollectionTranslationsMutationOptions = Apollo.BaseMutationOptions; +export const UpdatePageTranslationsDocument = gql` + mutation UpdatePageTranslations($id: ID!, $input: PageTranslationInput!, $language: LanguageCodeEnum!) { + pageTranslate(id: $id, input: $input, languageCode: $language) { + errors { + ...PageTranslateErrorFragment + } + page { + ...PageTranslation + } + } +} + ${PageTranslateErrorFragmentFragmentDoc} +${PageTranslationFragmentDoc}`; +export type UpdatePageTranslationsMutationFn = Apollo.MutationFunction; + +/** + * __useUpdatePageTranslationsMutation__ + * + * To run a mutation, you first call `useUpdatePageTranslationsMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdatePageTranslationsMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updatePageTranslationsMutation, { data, loading, error }] = useUpdatePageTranslationsMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * language: // value for 'language' + * }, + * }); + */ +export function useUpdatePageTranslationsMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UpdatePageTranslationsDocument, options); + } +export type UpdatePageTranslationsMutationHookResult = ReturnType; +export type UpdatePageTranslationsMutationResult = Apollo.MutationResult; +export type UpdatePageTranslationsMutationOptions = Apollo.BaseMutationOptions; +export const UpdateVoucherTranslationsDocument = gql` + mutation UpdateVoucherTranslations($id: ID!, $input: NameTranslationInput!, $language: LanguageCodeEnum!) { + voucherTranslate(id: $id, input: $input, languageCode: $language) { + errors { + ...VoucherTranslateErrorFragment + } + voucher { + id + name + translation(languageCode: $language) { + id + language { + code + language + } + name + } + } + } +} + ${VoucherTranslateErrorFragmentFragmentDoc}`; +export type UpdateVoucherTranslationsMutationFn = Apollo.MutationFunction; + +/** + * __useUpdateVoucherTranslationsMutation__ + * + * To run a mutation, you first call `useUpdateVoucherTranslationsMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateVoucherTranslationsMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updateVoucherTranslationsMutation, { data, loading, error }] = useUpdateVoucherTranslationsMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * language: // value for 'language' + * }, + * }); + */ +export function useUpdateVoucherTranslationsMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UpdateVoucherTranslationsDocument, options); + } +export type UpdateVoucherTranslationsMutationHookResult = ReturnType; +export type UpdateVoucherTranslationsMutationResult = Apollo.MutationResult; +export type UpdateVoucherTranslationsMutationOptions = Apollo.BaseMutationOptions; +export const UpdateSaleTranslationsDocument = gql` + mutation UpdateSaleTranslations($id: ID!, $input: NameTranslationInput!, $language: LanguageCodeEnum!) { + saleTranslate(id: $id, input: $input, languageCode: $language) { + errors { + ...SaleTranslateErrorFragment + } + sale { + id + name + translation(languageCode: $language) { + id + language { + code + language + } + name + } + } + } +} + ${SaleTranslateErrorFragmentFragmentDoc}`; +export type UpdateSaleTranslationsMutationFn = Apollo.MutationFunction; + +/** + * __useUpdateSaleTranslationsMutation__ + * + * To run a mutation, you first call `useUpdateSaleTranslationsMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateSaleTranslationsMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updateSaleTranslationsMutation, { data, loading, error }] = useUpdateSaleTranslationsMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * language: // value for 'language' + * }, + * }); + */ +export function useUpdateSaleTranslationsMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UpdateSaleTranslationsDocument, options); + } +export type UpdateSaleTranslationsMutationHookResult = ReturnType; +export type UpdateSaleTranslationsMutationResult = Apollo.MutationResult; +export type UpdateSaleTranslationsMutationOptions = Apollo.BaseMutationOptions; +export const UpdateAttributeTranslationsDocument = gql` + mutation UpdateAttributeTranslations($id: ID!, $input: NameTranslationInput!, $language: LanguageCodeEnum!) { + attributeTranslate(id: $id, input: $input, languageCode: $language) { + errors { + ...AttributeTranslateErrorFragment + } + attribute { + id + name + translation(languageCode: $language) { + id + name + } + } + } +} + ${AttributeTranslateErrorFragmentFragmentDoc}`; +export type UpdateAttributeTranslationsMutationFn = Apollo.MutationFunction; + +/** + * __useUpdateAttributeTranslationsMutation__ + * + * To run a mutation, you first call `useUpdateAttributeTranslationsMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateAttributeTranslationsMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updateAttributeTranslationsMutation, { data, loading, error }] = useUpdateAttributeTranslationsMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * language: // value for 'language' + * }, + * }); + */ +export function useUpdateAttributeTranslationsMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UpdateAttributeTranslationsDocument, options); + } +export type UpdateAttributeTranslationsMutationHookResult = ReturnType; +export type UpdateAttributeTranslationsMutationResult = Apollo.MutationResult; +export type UpdateAttributeTranslationsMutationOptions = Apollo.BaseMutationOptions; +export const UpdateAttributeValueTranslationsDocument = gql` + mutation UpdateAttributeValueTranslations($id: ID!, $input: AttributeValueTranslationInput!, $language: LanguageCodeEnum!) { + attributeValueTranslate(id: $id, input: $input, languageCode: $language) { + errors { + ...AttributeValueTranslateErrorFragment + } + attributeValue { + id + name + richText + translation(languageCode: $language) { + id + name + richText + } + } + } +} + ${AttributeValueTranslateErrorFragmentFragmentDoc}`; +export type UpdateAttributeValueTranslationsMutationFn = Apollo.MutationFunction; + +/** + * __useUpdateAttributeValueTranslationsMutation__ + * + * To run a mutation, you first call `useUpdateAttributeValueTranslationsMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateAttributeValueTranslationsMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updateAttributeValueTranslationsMutation, { data, loading, error }] = useUpdateAttributeValueTranslationsMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * language: // value for 'language' + * }, + * }); + */ +export function useUpdateAttributeValueTranslationsMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UpdateAttributeValueTranslationsDocument, options); + } +export type UpdateAttributeValueTranslationsMutationHookResult = ReturnType; +export type UpdateAttributeValueTranslationsMutationResult = Apollo.MutationResult; +export type UpdateAttributeValueTranslationsMutationOptions = Apollo.BaseMutationOptions; +export const UpdateShippingMethodTranslationsDocument = gql` + mutation UpdateShippingMethodTranslations($id: ID!, $input: ShippingPriceTranslationInput!, $language: LanguageCodeEnum!) { + shippingPriceTranslate(id: $id, input: $input, languageCode: $language) { + errors { + ...ShippingPriceTranslateErrorFragment + } + shippingMethod { + id + name + description + translation(languageCode: $language) { + id + language { + language + } + name + description + } + } + } +} + ${ShippingPriceTranslateErrorFragmentFragmentDoc}`; +export type UpdateShippingMethodTranslationsMutationFn = Apollo.MutationFunction; + +/** + * __useUpdateShippingMethodTranslationsMutation__ + * + * To run a mutation, you first call `useUpdateShippingMethodTranslationsMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateShippingMethodTranslationsMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updateShippingMethodTranslationsMutation, { data, loading, error }] = useUpdateShippingMethodTranslationsMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * language: // value for 'language' + * }, + * }); + */ +export function useUpdateShippingMethodTranslationsMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UpdateShippingMethodTranslationsDocument, options); + } +export type UpdateShippingMethodTranslationsMutationHookResult = ReturnType; +export type UpdateShippingMethodTranslationsMutationResult = Apollo.MutationResult; +export type UpdateShippingMethodTranslationsMutationOptions = Apollo.BaseMutationOptions; +export const CategoryTranslationsDocument = gql` + query CategoryTranslations($language: LanguageCodeEnum!, $first: Int, $after: String, $last: Int, $before: String) { + translations( + kind: CATEGORY + before: $before + after: $after + first: $first + last: $last + ) { + edges { + node { + ...CategoryTranslation + } + } + pageInfo { + ...PageInfo + } + } +} + ${CategoryTranslationFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __useCategoryTranslationsQuery__ + * + * To run a query within a React component, call `useCategoryTranslationsQuery` and pass it any options that fit your needs. + * When your component renders, `useCategoryTranslationsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useCategoryTranslationsQuery({ + * variables: { + * language: // value for 'language' + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * }, + * }); + */ +export function useCategoryTranslationsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(CategoryTranslationsDocument, options); + } +export function useCategoryTranslationsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(CategoryTranslationsDocument, options); + } +export type CategoryTranslationsQueryHookResult = ReturnType; +export type CategoryTranslationsLazyQueryHookResult = ReturnType; +export type CategoryTranslationsQueryResult = Apollo.QueryResult; +export const CollectionTranslationsDocument = gql` + query CollectionTranslations($language: LanguageCodeEnum!, $first: Int, $after: String, $last: Int, $before: String) { + translations( + kind: COLLECTION + before: $before + after: $after + first: $first + last: $last + ) { + edges { + node { + ...CollectionTranslation + } + } + pageInfo { + ...PageInfo + } + } +} + ${CollectionTranslationFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __useCollectionTranslationsQuery__ + * + * To run a query within a React component, call `useCollectionTranslationsQuery` and pass it any options that fit your needs. + * When your component renders, `useCollectionTranslationsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useCollectionTranslationsQuery({ + * variables: { + * language: // value for 'language' + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * }, + * }); + */ +export function useCollectionTranslationsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(CollectionTranslationsDocument, options); + } +export function useCollectionTranslationsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(CollectionTranslationsDocument, options); + } +export type CollectionTranslationsQueryHookResult = ReturnType; +export type CollectionTranslationsLazyQueryHookResult = ReturnType; +export type CollectionTranslationsQueryResult = Apollo.QueryResult; +export const ProductTranslationsDocument = gql` + query ProductTranslations($language: LanguageCodeEnum!, $first: Int, $after: String, $last: Int, $before: String) { + translations( + kind: PRODUCT + before: $before + after: $after + first: $first + last: $last + ) { + edges { + node { + ...ProductTranslation + } + } + pageInfo { + ...PageInfo + } + } +} + ${ProductTranslationFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __useProductTranslationsQuery__ + * + * To run a query within a React component, call `useProductTranslationsQuery` and pass it any options that fit your needs. + * When your component renders, `useProductTranslationsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useProductTranslationsQuery({ + * variables: { + * language: // value for 'language' + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * }, + * }); + */ +export function useProductTranslationsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ProductTranslationsDocument, options); + } +export function useProductTranslationsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ProductTranslationsDocument, options); + } +export type ProductTranslationsQueryHookResult = ReturnType; +export type ProductTranslationsLazyQueryHookResult = ReturnType; +export type ProductTranslationsQueryResult = Apollo.QueryResult; +export const PageTranslationsDocument = gql` + query PageTranslations($language: LanguageCodeEnum!, $first: Int, $after: String, $last: Int, $before: String) { + translations( + kind: PAGE + before: $before + after: $after + first: $first + last: $last + ) { + edges { + node { + ...PageTranslation + } + } + pageInfo { + ...PageInfo + } + } +} + ${PageTranslationFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __usePageTranslationsQuery__ + * + * To run a query within a React component, call `usePageTranslationsQuery` and pass it any options that fit your needs. + * When your component renders, `usePageTranslationsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = usePageTranslationsQuery({ + * variables: { + * language: // value for 'language' + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * }, + * }); + */ +export function usePageTranslationsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(PageTranslationsDocument, options); + } +export function usePageTranslationsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(PageTranslationsDocument, options); + } +export type PageTranslationsQueryHookResult = ReturnType; +export type PageTranslationsLazyQueryHookResult = ReturnType; +export type PageTranslationsQueryResult = Apollo.QueryResult; +export const VoucherTranslationsDocument = gql` + query VoucherTranslations($language: LanguageCodeEnum!, $first: Int, $after: String, $last: Int, $before: String) { + translations( + kind: VOUCHER + before: $before + after: $after + first: $first + last: $last + ) { + edges { + node { + ...VoucherTranslation + } + } + pageInfo { + ...PageInfo + } + } +} + ${VoucherTranslationFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __useVoucherTranslationsQuery__ + * + * To run a query within a React component, call `useVoucherTranslationsQuery` and pass it any options that fit your needs. + * When your component renders, `useVoucherTranslationsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useVoucherTranslationsQuery({ + * variables: { + * language: // value for 'language' + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * }, + * }); + */ +export function useVoucherTranslationsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(VoucherTranslationsDocument, options); + } +export function useVoucherTranslationsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(VoucherTranslationsDocument, options); + } +export type VoucherTranslationsQueryHookResult = ReturnType; +export type VoucherTranslationsLazyQueryHookResult = ReturnType; +export type VoucherTranslationsQueryResult = Apollo.QueryResult; +export const SaleTranslationsDocument = gql` + query SaleTranslations($language: LanguageCodeEnum!, $first: Int, $after: String, $last: Int, $before: String) { + translations( + kind: SALE + before: $before + after: $after + first: $first + last: $last + ) { + edges { + node { + ...SaleTranslation + } + } + pageInfo { + ...PageInfo + } + } +} + ${SaleTranslationFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __useSaleTranslationsQuery__ + * + * To run a query within a React component, call `useSaleTranslationsQuery` and pass it any options that fit your needs. + * When your component renders, `useSaleTranslationsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSaleTranslationsQuery({ + * variables: { + * language: // value for 'language' + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * }, + * }); + */ +export function useSaleTranslationsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SaleTranslationsDocument, options); + } +export function useSaleTranslationsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SaleTranslationsDocument, options); + } +export type SaleTranslationsQueryHookResult = ReturnType; +export type SaleTranslationsLazyQueryHookResult = ReturnType; +export type SaleTranslationsQueryResult = Apollo.QueryResult; +export const AttributeTranslationsDocument = gql` + query AttributeTranslations($language: LanguageCodeEnum!, $first: Int, $after: String, $last: Int, $before: String) { + translations( + kind: ATTRIBUTE + before: $before + after: $after + first: $first + last: $last + ) { + edges { + node { + ...AttributeTranslation + } + } + pageInfo { + ...PageInfo + } + } +} + ${AttributeTranslationFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __useAttributeTranslationsQuery__ + * + * To run a query within a React component, call `useAttributeTranslationsQuery` and pass it any options that fit your needs. + * When your component renders, `useAttributeTranslationsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAttributeTranslationsQuery({ + * variables: { + * language: // value for 'language' + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * }, + * }); + */ +export function useAttributeTranslationsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(AttributeTranslationsDocument, options); + } +export function useAttributeTranslationsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(AttributeTranslationsDocument, options); + } +export type AttributeTranslationsQueryHookResult = ReturnType; +export type AttributeTranslationsLazyQueryHookResult = ReturnType; +export type AttributeTranslationsQueryResult = Apollo.QueryResult; +export const ShippingMethodTranslationsDocument = gql` + query ShippingMethodTranslations($language: LanguageCodeEnum!, $first: Int, $after: String, $last: Int, $before: String) { + translations( + kind: SHIPPING_METHOD + before: $before + after: $after + first: $first + last: $last + ) { + edges { + node { + ...ShippingMethodTranslation + } + } + pageInfo { + ...PageInfo + } + } +} + ${ShippingMethodTranslationFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __useShippingMethodTranslationsQuery__ + * + * To run a query within a React component, call `useShippingMethodTranslationsQuery` and pass it any options that fit your needs. + * When your component renders, `useShippingMethodTranslationsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useShippingMethodTranslationsQuery({ + * variables: { + * language: // value for 'language' + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * }, + * }); + */ +export function useShippingMethodTranslationsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ShippingMethodTranslationsDocument, options); + } +export function useShippingMethodTranslationsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ShippingMethodTranslationsDocument, options); + } +export type ShippingMethodTranslationsQueryHookResult = ReturnType; +export type ShippingMethodTranslationsLazyQueryHookResult = ReturnType; +export type ShippingMethodTranslationsQueryResult = Apollo.QueryResult; +export const ProductTranslationDetailsDocument = gql` + query ProductTranslationDetails($id: ID!, $language: LanguageCodeEnum!) { + translation(kind: PRODUCT, id: $id) { + ...ProductTranslation + } +} + ${ProductTranslationFragmentDoc}`; + +/** + * __useProductTranslationDetailsQuery__ + * + * To run a query within a React component, call `useProductTranslationDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useProductTranslationDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useProductTranslationDetailsQuery({ + * variables: { + * id: // value for 'id' + * language: // value for 'language' + * }, + * }); + */ +export function useProductTranslationDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ProductTranslationDetailsDocument, options); + } +export function useProductTranslationDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ProductTranslationDetailsDocument, options); + } +export type ProductTranslationDetailsQueryHookResult = ReturnType; +export type ProductTranslationDetailsLazyQueryHookResult = ReturnType; +export type ProductTranslationDetailsQueryResult = Apollo.QueryResult; +export const ProductVariantListDocument = gql` + query ProductVariantList($id: ID!) { + product(id: $id) { + id + variants { + id + name + sku + } + } +} + `; + +/** + * __useProductVariantListQuery__ + * + * To run a query within a React component, call `useProductVariantListQuery` and pass it any options that fit your needs. + * When your component renders, `useProductVariantListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useProductVariantListQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useProductVariantListQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ProductVariantListDocument, options); + } +export function useProductVariantListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ProductVariantListDocument, options); + } +export type ProductVariantListQueryHookResult = ReturnType; +export type ProductVariantListLazyQueryHookResult = ReturnType; +export type ProductVariantListQueryResult = Apollo.QueryResult; +export const ProductVariantTranslationDetailsDocument = gql` + query ProductVariantTranslationDetails($id: ID!, $language: LanguageCodeEnum!) { + translation(kind: VARIANT, id: $id) { + ...ProductVariantTranslation + } +} + ${ProductVariantTranslationFragmentDoc}`; + +/** + * __useProductVariantTranslationDetailsQuery__ + * + * To run a query within a React component, call `useProductVariantTranslationDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useProductVariantTranslationDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useProductVariantTranslationDetailsQuery({ + * variables: { + * id: // value for 'id' + * language: // value for 'language' + * }, + * }); + */ +export function useProductVariantTranslationDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ProductVariantTranslationDetailsDocument, options); + } +export function useProductVariantTranslationDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ProductVariantTranslationDetailsDocument, options); + } +export type ProductVariantTranslationDetailsQueryHookResult = ReturnType; +export type ProductVariantTranslationDetailsLazyQueryHookResult = ReturnType; +export type ProductVariantTranslationDetailsQueryResult = Apollo.QueryResult; +export const CategoryTranslationDetailsDocument = gql` + query CategoryTranslationDetails($id: ID!, $language: LanguageCodeEnum!) { + translation(kind: CATEGORY, id: $id) { + ...CategoryTranslation + } +} + ${CategoryTranslationFragmentDoc}`; + +/** + * __useCategoryTranslationDetailsQuery__ + * + * To run a query within a React component, call `useCategoryTranslationDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useCategoryTranslationDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useCategoryTranslationDetailsQuery({ + * variables: { + * id: // value for 'id' + * language: // value for 'language' + * }, + * }); + */ +export function useCategoryTranslationDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(CategoryTranslationDetailsDocument, options); + } +export function useCategoryTranslationDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(CategoryTranslationDetailsDocument, options); + } +export type CategoryTranslationDetailsQueryHookResult = ReturnType; +export type CategoryTranslationDetailsLazyQueryHookResult = ReturnType; +export type CategoryTranslationDetailsQueryResult = Apollo.QueryResult; +export const CollectionTranslationDetailsDocument = gql` + query CollectionTranslationDetails($id: ID!, $language: LanguageCodeEnum!) { + translation(id: $id, kind: COLLECTION) { + ...CollectionTranslation + } +} + ${CollectionTranslationFragmentDoc}`; + +/** + * __useCollectionTranslationDetailsQuery__ + * + * To run a query within a React component, call `useCollectionTranslationDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useCollectionTranslationDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useCollectionTranslationDetailsQuery({ + * variables: { + * id: // value for 'id' + * language: // value for 'language' + * }, + * }); + */ +export function useCollectionTranslationDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(CollectionTranslationDetailsDocument, options); + } +export function useCollectionTranslationDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(CollectionTranslationDetailsDocument, options); + } +export type CollectionTranslationDetailsQueryHookResult = ReturnType; +export type CollectionTranslationDetailsLazyQueryHookResult = ReturnType; +export type CollectionTranslationDetailsQueryResult = Apollo.QueryResult; +export const PageTranslationDetailsDocument = gql` + query PageTranslationDetails($id: ID!, $language: LanguageCodeEnum!) { + translation(id: $id, kind: PAGE) { + ...PageTranslation + } +} + ${PageTranslationFragmentDoc}`; + +/** + * __usePageTranslationDetailsQuery__ + * + * To run a query within a React component, call `usePageTranslationDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `usePageTranslationDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = usePageTranslationDetailsQuery({ + * variables: { + * id: // value for 'id' + * language: // value for 'language' + * }, + * }); + */ +export function usePageTranslationDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(PageTranslationDetailsDocument, options); + } +export function usePageTranslationDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(PageTranslationDetailsDocument, options); + } +export type PageTranslationDetailsQueryHookResult = ReturnType; +export type PageTranslationDetailsLazyQueryHookResult = ReturnType; +export type PageTranslationDetailsQueryResult = Apollo.QueryResult; +export const SaleTranslationDetailsDocument = gql` + query SaleTranslationDetails($id: ID!, $language: LanguageCodeEnum!) { + translation(kind: SALE, id: $id) { + ...SaleTranslation + } +} + ${SaleTranslationFragmentDoc}`; + +/** + * __useSaleTranslationDetailsQuery__ + * + * To run a query within a React component, call `useSaleTranslationDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useSaleTranslationDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useSaleTranslationDetailsQuery({ + * variables: { + * id: // value for 'id' + * language: // value for 'language' + * }, + * }); + */ +export function useSaleTranslationDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(SaleTranslationDetailsDocument, options); + } +export function useSaleTranslationDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(SaleTranslationDetailsDocument, options); + } +export type SaleTranslationDetailsQueryHookResult = ReturnType; +export type SaleTranslationDetailsLazyQueryHookResult = ReturnType; +export type SaleTranslationDetailsQueryResult = Apollo.QueryResult; +export const VoucherTranslationDetailsDocument = gql` + query VoucherTranslationDetails($id: ID!, $language: LanguageCodeEnum!) { + translation(kind: VOUCHER, id: $id) { + ...VoucherTranslation + } +} + ${VoucherTranslationFragmentDoc}`; + +/** + * __useVoucherTranslationDetailsQuery__ + * + * To run a query within a React component, call `useVoucherTranslationDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useVoucherTranslationDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useVoucherTranslationDetailsQuery({ + * variables: { + * id: // value for 'id' + * language: // value for 'language' + * }, + * }); + */ +export function useVoucherTranslationDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(VoucherTranslationDetailsDocument, options); + } +export function useVoucherTranslationDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(VoucherTranslationDetailsDocument, options); + } +export type VoucherTranslationDetailsQueryHookResult = ReturnType; +export type VoucherTranslationDetailsLazyQueryHookResult = ReturnType; +export type VoucherTranslationDetailsQueryResult = Apollo.QueryResult; +export const AttributeTranslationDetailsDocument = gql` + query AttributeTranslationDetails($id: ID!, $language: LanguageCodeEnum!, $firstValues: Int, $afterValues: String, $lastValues: Int, $beforeValues: String) { + translation(kind: ATTRIBUTE, id: $id) { + ...AttributeTranslationDetails + } +} + ${AttributeTranslationDetailsFragmentDoc}`; + +/** + * __useAttributeTranslationDetailsQuery__ + * + * To run a query within a React component, call `useAttributeTranslationDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useAttributeTranslationDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAttributeTranslationDetailsQuery({ + * variables: { + * id: // value for 'id' + * language: // value for 'language' + * firstValues: // value for 'firstValues' + * afterValues: // value for 'afterValues' + * lastValues: // value for 'lastValues' + * beforeValues: // value for 'beforeValues' + * }, + * }); + */ +export function useAttributeTranslationDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(AttributeTranslationDetailsDocument, options); + } +export function useAttributeTranslationDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(AttributeTranslationDetailsDocument, options); + } +export type AttributeTranslationDetailsQueryHookResult = ReturnType; +export type AttributeTranslationDetailsLazyQueryHookResult = ReturnType; +export type AttributeTranslationDetailsQueryResult = Apollo.QueryResult; +export const ShippingMethodTranslationDetailsDocument = gql` + query ShippingMethodTranslationDetails($id: ID!, $language: LanguageCodeEnum!) { + translation(kind: SHIPPING_METHOD, id: $id) { + ...ShippingMethodTranslation + } +} + ${ShippingMethodTranslationFragmentDoc}`; + +/** + * __useShippingMethodTranslationDetailsQuery__ + * + * To run a query within a React component, call `useShippingMethodTranslationDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useShippingMethodTranslationDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useShippingMethodTranslationDetailsQuery({ + * variables: { + * id: // value for 'id' + * language: // value for 'language' + * }, + * }); + */ +export function useShippingMethodTranslationDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(ShippingMethodTranslationDetailsDocument, options); + } +export function useShippingMethodTranslationDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(ShippingMethodTranslationDetailsDocument, options); + } +export type ShippingMethodTranslationDetailsQueryHookResult = ReturnType; +export type ShippingMethodTranslationDetailsLazyQueryHookResult = ReturnType; +export type ShippingMethodTranslationDetailsQueryResult = Apollo.QueryResult; +export const UpdateMetadataDocument = gql` + mutation UpdateMetadata($id: ID!, $input: [MetadataInput!]!, $keysToDelete: [String!]!) { + updateMetadata(id: $id, input: $input) { + errors { + ...MetadataError + } + item { + ...Metadata + ... on Node { + id + } + } + } + deleteMetadata(id: $id, keys: $keysToDelete) { + errors { + ...MetadataError + } + item { + ...Metadata + ... on Node { + id + } + } + } +} + ${MetadataErrorFragmentDoc} +${MetadataFragmentDoc}`; +export type UpdateMetadataMutationFn = Apollo.MutationFunction; + +/** + * __useUpdateMetadataMutation__ + * + * To run a mutation, you first call `useUpdateMetadataMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateMetadataMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updateMetadataMutation, { data, loading, error }] = useUpdateMetadataMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * keysToDelete: // value for 'keysToDelete' + * }, + * }); + */ +export function useUpdateMetadataMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UpdateMetadataDocument, options); + } +export type UpdateMetadataMutationHookResult = ReturnType; +export type UpdateMetadataMutationResult = Apollo.MutationResult; +export type UpdateMetadataMutationOptions = Apollo.BaseMutationOptions; +export const UpdatePrivateMetadataDocument = gql` + mutation UpdatePrivateMetadata($id: ID!, $input: [MetadataInput!]!, $keysToDelete: [String!]!) { + updatePrivateMetadata(id: $id, input: $input) { + errors { + ...MetadataError + } + item { + ...Metadata + ... on Node { + id + } + } + } + deletePrivateMetadata(id: $id, keys: $keysToDelete) { + errors { + ...MetadataError + } + item { + ...Metadata + ... on Node { + id + } + } + } +} + ${MetadataErrorFragmentDoc} +${MetadataFragmentDoc}`; +export type UpdatePrivateMetadataMutationFn = Apollo.MutationFunction; + +/** + * __useUpdatePrivateMetadataMutation__ + * + * To run a mutation, you first call `useUpdatePrivateMetadataMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdatePrivateMetadataMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updatePrivateMetadataMutation, { data, loading, error }] = useUpdatePrivateMetadataMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * keysToDelete: // value for 'keysToDelete' + * }, + * }); + */ +export function useUpdatePrivateMetadataMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(UpdatePrivateMetadataDocument, options); + } +export type UpdatePrivateMetadataMutationHookResult = ReturnType; +export type UpdatePrivateMetadataMutationResult = Apollo.MutationResult; +export type UpdatePrivateMetadataMutationOptions = Apollo.BaseMutationOptions; +export const WarehouseDeleteDocument = gql` + mutation WarehouseDelete($id: ID!) { + deleteWarehouse(id: $id) { + errors { + ...WarehouseError + } + } +} + ${WarehouseErrorFragmentDoc}`; +export type WarehouseDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useWarehouseDeleteMutation__ + * + * To run a mutation, you first call `useWarehouseDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useWarehouseDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [warehouseDeleteMutation, { data, loading, error }] = useWarehouseDeleteMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useWarehouseDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(WarehouseDeleteDocument, options); + } +export type WarehouseDeleteMutationHookResult = ReturnType; +export type WarehouseDeleteMutationResult = Apollo.MutationResult; +export type WarehouseDeleteMutationOptions = Apollo.BaseMutationOptions; +export const WarehouseCreateDocument = gql` + mutation WarehouseCreate($input: WarehouseCreateInput!) { + createWarehouse(input: $input) { + errors { + ...WarehouseError + } + warehouse { + ...WarehouseDetails + } + } +} + ${WarehouseErrorFragmentDoc} +${WarehouseDetailsFragmentDoc}`; +export type WarehouseCreateMutationFn = Apollo.MutationFunction; + +/** + * __useWarehouseCreateMutation__ + * + * To run a mutation, you first call `useWarehouseCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useWarehouseCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [warehouseCreateMutation, { data, loading, error }] = useWarehouseCreateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useWarehouseCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(WarehouseCreateDocument, options); + } +export type WarehouseCreateMutationHookResult = ReturnType; +export type WarehouseCreateMutationResult = Apollo.MutationResult; +export type WarehouseCreateMutationOptions = Apollo.BaseMutationOptions; +export const WarehouseUpdateDocument = gql` + mutation WarehouseUpdate($id: ID!, $input: WarehouseUpdateInput!) { + updateWarehouse(id: $id, input: $input) { + errors { + ...WarehouseError + } + warehouse { + ...WarehouseDetails + } + } +} + ${WarehouseErrorFragmentDoc} +${WarehouseDetailsFragmentDoc}`; +export type WarehouseUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useWarehouseUpdateMutation__ + * + * To run a mutation, you first call `useWarehouseUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useWarehouseUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [warehouseUpdateMutation, { data, loading, error }] = useWarehouseUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useWarehouseUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(WarehouseUpdateDocument, options); + } +export type WarehouseUpdateMutationHookResult = ReturnType; +export type WarehouseUpdateMutationResult = Apollo.MutationResult; +export type WarehouseUpdateMutationOptions = Apollo.BaseMutationOptions; +export const WarehouseListDocument = gql` + query WarehouseList($first: Int, $after: String, $last: Int, $before: String, $filter: WarehouseFilterInput, $sort: WarehouseSortingInput) { + warehouses( + before: $before + after: $after + first: $first + last: $last + filter: $filter + sortBy: $sort + ) { + edges { + node { + ...WarehouseWithShipping + } + } + pageInfo { + ...PageInfo + } + } +} + ${WarehouseWithShippingFragmentDoc} +${PageInfoFragmentDoc}`; + +/** + * __useWarehouseListQuery__ + * + * To run a query within a React component, call `useWarehouseListQuery` and pass it any options that fit your needs. + * When your component renders, `useWarehouseListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useWarehouseListQuery({ + * variables: { + * first: // value for 'first' + * after: // value for 'after' + * last: // value for 'last' + * before: // value for 'before' + * filter: // value for 'filter' + * sort: // value for 'sort' + * }, + * }); + */ +export function useWarehouseListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(WarehouseListDocument, options); + } +export function useWarehouseListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(WarehouseListDocument, options); + } +export type WarehouseListQueryHookResult = ReturnType; +export type WarehouseListLazyQueryHookResult = ReturnType; +export type WarehouseListQueryResult = Apollo.QueryResult; +export const WarehouseDetailsDocument = gql` + query WarehouseDetails($id: ID!) { + warehouse(id: $id) { + ...WarehouseDetails + } +} + ${WarehouseDetailsFragmentDoc}`; + +/** + * __useWarehouseDetailsQuery__ + * + * To run a query within a React component, call `useWarehouseDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useWarehouseDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useWarehouseDetailsQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useWarehouseDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(WarehouseDetailsDocument, options); + } +export function useWarehouseDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(WarehouseDetailsDocument, options); + } +export type WarehouseDetailsQueryHookResult = ReturnType; +export type WarehouseDetailsLazyQueryHookResult = ReturnType; +export type WarehouseDetailsQueryResult = Apollo.QueryResult; +export const WebhookCreateDocument = gql` + mutation WebhookCreate($input: WebhookCreateInput!) { + webhookCreate(input: $input) { + errors { + ...WebhookError + } + webhook { + ...WebhooksDetails + } + } +} + ${WebhookErrorFragmentDoc} +${WebhooksDetailsFragmentDoc}`; +export type WebhookCreateMutationFn = Apollo.MutationFunction; + +/** + * __useWebhookCreateMutation__ + * + * To run a mutation, you first call `useWebhookCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useWebhookCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [webhookCreateMutation, { data, loading, error }] = useWebhookCreateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useWebhookCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(WebhookCreateDocument, options); + } +export type WebhookCreateMutationHookResult = ReturnType; +export type WebhookCreateMutationResult = Apollo.MutationResult; +export type WebhookCreateMutationOptions = Apollo.BaseMutationOptions; +export const WebhookUpdateDocument = gql` + mutation WebhookUpdate($id: ID!, $input: WebhookUpdateInput!) { + webhookUpdate(id: $id, input: $input) { + errors { + ...WebhookError + } + webhook { + ...WebhooksDetails + } + } +} + ${WebhookErrorFragmentDoc} +${WebhooksDetailsFragmentDoc}`; +export type WebhookUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useWebhookUpdateMutation__ + * + * To run a mutation, you first call `useWebhookUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useWebhookUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [webhookUpdateMutation, { data, loading, error }] = useWebhookUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useWebhookUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(WebhookUpdateDocument, options); + } +export type WebhookUpdateMutationHookResult = ReturnType; +export type WebhookUpdateMutationResult = Apollo.MutationResult; +export type WebhookUpdateMutationOptions = Apollo.BaseMutationOptions; +export const WebhookDeleteDocument = gql` + mutation WebhookDelete($id: ID!) { + webhookDelete(id: $id) { + errors { + ...WebhookError + } + } +} + ${WebhookErrorFragmentDoc}`; +export type WebhookDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useWebhookDeleteMutation__ + * + * To run a mutation, you first call `useWebhookDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useWebhookDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [webhookDeleteMutation, { data, loading, error }] = useWebhookDeleteMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useWebhookDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(WebhookDeleteDocument, options); + } +export type WebhookDeleteMutationHookResult = ReturnType; +export type WebhookDeleteMutationResult = Apollo.MutationResult; +export type WebhookDeleteMutationOptions = Apollo.BaseMutationOptions; +export const WebhookDetailsDocument = gql` + query WebhookDetails($id: ID!) { + webhook(id: $id) { + ...Webhook + syncEvents { + eventType + } + asyncEvents { + eventType + } + secretKey + targetUrl + } +} + ${WebhookFragmentDoc}`; + +/** + * __useWebhookDetailsQuery__ + * + * To run a query within a React component, call `useWebhookDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useWebhookDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useWebhookDetailsQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useWebhookDetailsQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(WebhookDetailsDocument, options); + } +export function useWebhookDetailsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(WebhookDetailsDocument, options); + } +export type WebhookDetailsQueryHookResult = ReturnType; +export type WebhookDetailsLazyQueryHookResult = ReturnType; +export type WebhookDetailsQueryResult = Apollo.QueryResult; \ No newline at end of file diff --git a/src/graphql/index.ts b/src/graphql/index.ts new file mode 100644 index 000000000..e0001af4f --- /dev/null +++ b/src/graphql/index.ts @@ -0,0 +1,5 @@ +export * from "./extendedTypes"; +export * from "./hooks.generated"; +export * from "./types.generated"; +export * from "./typePolicies.generated"; +export { default as introspectionQueryResultData } from "./fragmentTypes.generated"; diff --git a/src/type-policies.ts b/src/graphql/typePolicies.generated.ts similarity index 99% rename from src/type-policies.ts rename to src/graphql/typePolicies.generated.ts index 0a0b949da..9fc42603a 100644 --- a/src/type-policies.ts +++ b/src/graphql/typePolicies.generated.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { FieldPolicy, FieldReadFunction, TypePolicies, TypePolicy } from '@apollo/client/cache'; export type AccountAddressCreateKeySpecifier = ('user' | 'accountErrors' | 'errors' | 'address' | AccountAddressCreateKeySpecifier)[]; export type AccountAddressCreateFieldPolicy = { @@ -2597,11 +2598,12 @@ export type PaymentCountableEdgeFieldPolicy = { node?: FieldPolicy | FieldReadFunction, cursor?: FieldPolicy | FieldReadFunction }; -export type PaymentErrorKeySpecifier = ('field' | 'message' | 'code' | PaymentErrorKeySpecifier)[]; +export type PaymentErrorKeySpecifier = ('field' | 'message' | 'code' | 'variants' | PaymentErrorKeySpecifier)[]; export type PaymentErrorFieldPolicy = { field?: FieldPolicy | FieldReadFunction, message?: FieldPolicy | FieldReadFunction, - code?: FieldPolicy | FieldReadFunction + code?: FieldPolicy | FieldReadFunction, + variants?: FieldPolicy | FieldReadFunction }; export type PaymentGatewayKeySpecifier = ('name' | 'id' | 'config' | 'currencies' | PaymentGatewayKeySpecifier)[]; export type PaymentGatewayFieldPolicy = { diff --git a/src/graphql/types.generated.ts b/src/graphql/types.generated.ts new file mode 100644 index 000000000..fa99bcf8a --- /dev/null +++ b/src/graphql/types.generated.ts @@ -0,0 +1,7519 @@ +/* eslint-disable */ +export type Maybe = T | null; +export type InputMaybe = Maybe; +export type Exact = { [K in keyof T]: T[K] }; +export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; +export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +/** All built-in and custom scalars, mapped to their actual values */ +export type Scalars = { + ID: string; + String: string; + Boolean: boolean; + Int: number; + Float: number; + /** + * The `Date` scalar type represents a Date + * value as specified by + * [iso8601](https://en.wikipedia.org/wiki/ISO_8601). + */ + Date: any; + /** + * The `DateTime` scalar type represents a DateTime + * value as specified by + * [iso8601](https://en.wikipedia.org/wiki/ISO_8601). + */ + DateTime: any; + /** + * The `GenericScalar` scalar type represents a generic + * GraphQL scalar value that could be: + * String, Boolean, Int, Float, List or Object. + */ + GenericScalar: any; + /** + * Allows use of a JSON String for input / output from the GraphQL schema. + * + * Use of this type is *not recommended* as you lose the benefits of having a defined, static + * schema (one of the key benefits of GraphQL). + */ + JSONString: any; + /** + * Positive Decimal scalar implementation. + * + * Should be used in places where value must be positive. + */ + PositiveDecimal: any; + UUID: any; + /** Variables of this type must be set to null in mutations. They will be replaced with a filename from a following multipart part containing a binary file. See: https://github.com/jaydenseric/graphql-multipart-request-spec. */ + Upload: any; + WeightScalar: any; + /** Anything */ + _Any: any; +}; + +/** An enumeration. */ +export enum AccountErrorCode { + ACTIVATE_OWN_ACCOUNT = 'ACTIVATE_OWN_ACCOUNT', + ACTIVATE_SUPERUSER_ACCOUNT = 'ACTIVATE_SUPERUSER_ACCOUNT', + DUPLICATED_INPUT_ITEM = 'DUPLICATED_INPUT_ITEM', + DEACTIVATE_OWN_ACCOUNT = 'DEACTIVATE_OWN_ACCOUNT', + DEACTIVATE_SUPERUSER_ACCOUNT = 'DEACTIVATE_SUPERUSER_ACCOUNT', + DELETE_NON_STAFF_USER = 'DELETE_NON_STAFF_USER', + DELETE_OWN_ACCOUNT = 'DELETE_OWN_ACCOUNT', + DELETE_STAFF_ACCOUNT = 'DELETE_STAFF_ACCOUNT', + DELETE_SUPERUSER_ACCOUNT = 'DELETE_SUPERUSER_ACCOUNT', + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INACTIVE = 'INACTIVE', + INVALID = 'INVALID', + INVALID_PASSWORD = 'INVALID_PASSWORD', + LEFT_NOT_MANAGEABLE_PERMISSION = 'LEFT_NOT_MANAGEABLE_PERMISSION', + INVALID_CREDENTIALS = 'INVALID_CREDENTIALS', + NOT_FOUND = 'NOT_FOUND', + OUT_OF_SCOPE_USER = 'OUT_OF_SCOPE_USER', + OUT_OF_SCOPE_GROUP = 'OUT_OF_SCOPE_GROUP', + OUT_OF_SCOPE_PERMISSION = 'OUT_OF_SCOPE_PERMISSION', + PASSWORD_ENTIRELY_NUMERIC = 'PASSWORD_ENTIRELY_NUMERIC', + PASSWORD_TOO_COMMON = 'PASSWORD_TOO_COMMON', + PASSWORD_TOO_SHORT = 'PASSWORD_TOO_SHORT', + PASSWORD_TOO_SIMILAR = 'PASSWORD_TOO_SIMILAR', + REQUIRED = 'REQUIRED', + UNIQUE = 'UNIQUE', + JWT_SIGNATURE_EXPIRED = 'JWT_SIGNATURE_EXPIRED', + JWT_INVALID_TOKEN = 'JWT_INVALID_TOKEN', + JWT_DECODE_ERROR = 'JWT_DECODE_ERROR', + JWT_MISSING_TOKEN = 'JWT_MISSING_TOKEN', + JWT_INVALID_CSRF_TOKEN = 'JWT_INVALID_CSRF_TOKEN', + CHANNEL_INACTIVE = 'CHANNEL_INACTIVE', + MISSING_CHANNEL_SLUG = 'MISSING_CHANNEL_SLUG', + ACCOUNT_NOT_CONFIRMED = 'ACCOUNT_NOT_CONFIRMED' +} + +export type AccountInput = { + /** Given name. */ + firstName?: InputMaybe; + /** Family name. */ + lastName?: InputMaybe; + /** User language code. */ + languageCode?: InputMaybe; + /** Billing address of the customer. */ + defaultBillingAddress?: InputMaybe; + /** Shipping address of the customer. */ + defaultShippingAddress?: InputMaybe; +}; + +export type AccountRegisterInput = { + /** Given name. */ + firstName?: InputMaybe; + /** Family name. */ + lastName?: InputMaybe; + /** User language code. */ + languageCode?: InputMaybe; + /** The email address of the user. */ + email: Scalars['String']; + /** Password. */ + password: Scalars['String']; + /** Base of frontend URL that will be needed to create confirmation URL. */ + redirectUrl?: InputMaybe; + /** User public metadata. */ + metadata?: InputMaybe>; + /** Slug of a channel which will be used to notify users. Optional when only one channel exists. */ + channel?: InputMaybe; +}; + +export type AddressInput = { + /** Given name. */ + firstName?: InputMaybe; + /** Family name. */ + lastName?: InputMaybe; + /** Company or organization. */ + companyName?: InputMaybe; + /** Address. */ + streetAddress1?: InputMaybe; + /** Address. */ + streetAddress2?: InputMaybe; + /** City. */ + city?: InputMaybe; + /** District. */ + cityArea?: InputMaybe; + /** Postal code. */ + postalCode?: InputMaybe; + /** Country. */ + country?: InputMaybe; + /** State or province. */ + countryArea?: InputMaybe; + /** Phone number. */ + phone?: InputMaybe; +}; + +/** An enumeration. */ +export enum AddressTypeEnum { + BILLING = 'BILLING', + SHIPPING = 'SHIPPING' +} + +/** An enumeration. */ +export enum AppErrorCode { + FORBIDDEN = 'FORBIDDEN', + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + INVALID_STATUS = 'INVALID_STATUS', + INVALID_PERMISSION = 'INVALID_PERMISSION', + INVALID_URL_FORMAT = 'INVALID_URL_FORMAT', + INVALID_MANIFEST_FORMAT = 'INVALID_MANIFEST_FORMAT', + MANIFEST_URL_CANT_CONNECT = 'MANIFEST_URL_CANT_CONNECT', + NOT_FOUND = 'NOT_FOUND', + REQUIRED = 'REQUIRED', + UNIQUE = 'UNIQUE', + OUT_OF_SCOPE_APP = 'OUT_OF_SCOPE_APP', + OUT_OF_SCOPE_PERMISSION = 'OUT_OF_SCOPE_PERMISSION' +} + +export type AppExtensionFilterInput = { + mount?: InputMaybe>>; + target?: InputMaybe; +}; + +/** All places where app extension can be mounted. */ +export enum AppExtensionMountEnum { + PRODUCT_OVERVIEW_CREATE = 'PRODUCT_OVERVIEW_CREATE', + PRODUCT_OVERVIEW_MORE_ACTIONS = 'PRODUCT_OVERVIEW_MORE_ACTIONS', + PRODUCT_DETAILS_MORE_ACTIONS = 'PRODUCT_DETAILS_MORE_ACTIONS', + NAVIGATION_CATALOG = 'NAVIGATION_CATALOG', + NAVIGATION_ORDERS = 'NAVIGATION_ORDERS', + NAVIGATION_CUSTOMERS = 'NAVIGATION_CUSTOMERS', + NAVIGATION_DISCOUNTS = 'NAVIGATION_DISCOUNTS', + NAVIGATION_TRANSLATIONS = 'NAVIGATION_TRANSLATIONS', + NAVIGATION_PAGES = 'NAVIGATION_PAGES' +} + +/** + * All available ways of opening an app extension. + * + * POPUP - app's extension will be mounted as a popup window + * APP_PAGE - redirect to app's page + * + */ +export enum AppExtensionTargetEnum { + POPUP = 'POPUP', + APP_PAGE = 'APP_PAGE' +} + +export type AppFilterInput = { + search?: InputMaybe; + isActive?: InputMaybe; + type?: InputMaybe; +}; + +export type AppInput = { + /** Name of the app. */ + name?: InputMaybe; + /** List of permission code names to assign to this app. */ + permissions?: InputMaybe>>; +}; + +export type AppInstallInput = { + /** Name of the app to install. */ + appName?: InputMaybe; + /** Url to app's manifest in JSON format. */ + manifestUrl?: InputMaybe; + /** Determine if app will be set active or not. */ + activateAfterInstallation?: InputMaybe; + /** List of permission code names to assign to this app. */ + permissions?: InputMaybe>>; +}; + +export enum AppSortField { + /** Sort apps by name. */ + NAME = 'NAME', + /** Sort apps by creation date. */ + CREATION_DATE = 'CREATION_DATE' +} + +export type AppSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** Sort apps by the selected field. */ + field: AppSortField; +}; + +export type AppTokenInput = { + /** Name of the token. */ + name?: InputMaybe; + /** ID of app. */ + app: Scalars['ID']; +}; + +/** Enum determining type of your App. */ +export enum AppTypeEnum { + /** Local Saleor App. The app is fully manageable from dashboard. You can change assigned permissions, add webhooks, or authentication token */ + LOCAL = 'LOCAL', + /** Third party external App. Installation is fully automated. Saleor uses a defined App manifest to gather all required information. */ + THIRDPARTY = 'THIRDPARTY' +} + +/** An enumeration. */ +export enum AreaUnitsEnum { + SQ_CM = 'SQ_CM', + SQ_M = 'SQ_M', + SQ_KM = 'SQ_KM', + SQ_FT = 'SQ_FT', + SQ_YD = 'SQ_YD', + SQ_INCH = 'SQ_INCH' +} + +export enum AttributeChoicesSortField { + /** Sort attribute choice by name. */ + NAME = 'NAME', + /** Sort attribute choice by slug. */ + SLUG = 'SLUG' +} + +export type AttributeChoicesSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** Sort attribute choices by the selected field. */ + field: AttributeChoicesSortField; +}; + +export type AttributeCreateInput = { + /** The input type to use for entering attribute values in the dashboard. */ + inputType?: InputMaybe; + /** The entity type which can be used as a reference. */ + entityType?: InputMaybe; + /** Name of an attribute displayed in the interface. */ + name: Scalars['String']; + /** Internal representation of an attribute name. */ + slug?: InputMaybe; + /** The attribute type. */ + type: AttributeTypeEnum; + /** The unit of attribute values. */ + unit?: InputMaybe; + /** List of attribute's values. */ + values?: InputMaybe>>; + /** Whether the attribute requires values to be passed or not. */ + valueRequired?: InputMaybe; + /** Whether the attribute is for variants only. */ + isVariantOnly?: InputMaybe; + /** Whether the attribute should be visible or not in storefront. */ + visibleInStorefront?: InputMaybe; + /** Whether the attribute can be filtered in storefront. */ + filterableInStorefront?: InputMaybe; + /** Whether the attribute can be filtered in dashboard. */ + filterableInDashboard?: InputMaybe; + /** The position of the attribute in the storefront navigation (0 by default). */ + storefrontSearchPosition?: InputMaybe; + /** Whether the attribute can be displayed in the admin product list. */ + availableInGrid?: InputMaybe; +}; + +/** An enumeration. */ +export enum AttributeEntityTypeEnum { + PAGE = 'PAGE', + PRODUCT = 'PRODUCT' +} + +/** An enumeration. */ +export enum AttributeErrorCode { + ALREADY_EXISTS = 'ALREADY_EXISTS', + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + NOT_FOUND = 'NOT_FOUND', + REQUIRED = 'REQUIRED', + UNIQUE = 'UNIQUE' +} + +export type AttributeFilterInput = { + valueRequired?: InputMaybe; + isVariantOnly?: InputMaybe; + visibleInStorefront?: InputMaybe; + filterableInStorefront?: InputMaybe; + filterableInDashboard?: InputMaybe; + availableInGrid?: InputMaybe; + metadata?: InputMaybe>>; + search?: InputMaybe; + ids?: InputMaybe>>; + type?: InputMaybe; + inCollection?: InputMaybe; + inCategory?: InputMaybe; + /** + * Specifies the channel by which the data should be filtered. + * + * DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead. + */ + channel?: InputMaybe; +}; + +export type AttributeInput = { + /** Internal representation of an attribute name. */ + slug: Scalars['String']; + /** Internal representation of a value (unique per attribute). */ + values?: InputMaybe>>; + /** The range that the returned values should be in. */ + valuesRange?: InputMaybe; + /** The date time range that the returned values should be in. */ + dateTime?: InputMaybe; + /** The date range that the returned values should be in. */ + date?: InputMaybe; + /** The boolean value of the attribute. */ + boolean?: InputMaybe; +}; + +/** An enumeration. */ +export enum AttributeInputTypeEnum { + DROPDOWN = 'DROPDOWN', + MULTISELECT = 'MULTISELECT', + FILE = 'FILE', + REFERENCE = 'REFERENCE', + NUMERIC = 'NUMERIC', + RICH_TEXT = 'RICH_TEXT', + SWATCH = 'SWATCH', + BOOLEAN = 'BOOLEAN', + DATE = 'DATE', + DATE_TIME = 'DATE_TIME' +} + +export enum AttributeSortField { + /** Sort attributes by name */ + NAME = 'NAME', + /** Sort attributes by slug */ + SLUG = 'SLUG', + /** Sort attributes by the value required flag */ + VALUE_REQUIRED = 'VALUE_REQUIRED', + /** Sort attributes by the variant only flag */ + IS_VARIANT_ONLY = 'IS_VARIANT_ONLY', + /** Sort attributes by visibility in the storefront */ + VISIBLE_IN_STOREFRONT = 'VISIBLE_IN_STOREFRONT', + /** Sort attributes by the filterable in storefront flag */ + FILTERABLE_IN_STOREFRONT = 'FILTERABLE_IN_STOREFRONT', + /** Sort attributes by the filterable in dashboard flag */ + FILTERABLE_IN_DASHBOARD = 'FILTERABLE_IN_DASHBOARD', + /** Sort attributes by their position in storefront */ + STOREFRONT_SEARCH_POSITION = 'STOREFRONT_SEARCH_POSITION', + /** Sort attributes based on whether they can be displayed or not in a product grid. */ + AVAILABLE_IN_GRID = 'AVAILABLE_IN_GRID' +} + +export type AttributeSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** Sort attributes by the selected field. */ + field: AttributeSortField; +}; + +/** An enumeration. */ +export enum AttributeTypeEnum { + PRODUCT_TYPE = 'PRODUCT_TYPE', + PAGE_TYPE = 'PAGE_TYPE' +} + +export type AttributeUpdateInput = { + /** Name of an attribute displayed in the interface. */ + name?: InputMaybe; + /** Internal representation of an attribute name. */ + slug?: InputMaybe; + /** The unit of attribute values. */ + unit?: InputMaybe; + /** IDs of values to be removed from this attribute. */ + removeValues?: InputMaybe>>; + /** New values to be created for this attribute. */ + addValues?: InputMaybe>>; + /** Whether the attribute requires values to be passed or not. */ + valueRequired?: InputMaybe; + /** Whether the attribute is for variants only. */ + isVariantOnly?: InputMaybe; + /** Whether the attribute should be visible or not in storefront. */ + visibleInStorefront?: InputMaybe; + /** Whether the attribute can be filtered in storefront. */ + filterableInStorefront?: InputMaybe; + /** Whether the attribute can be filtered in dashboard. */ + filterableInDashboard?: InputMaybe; + /** The position of the attribute in the storefront navigation (0 by default). */ + storefrontSearchPosition?: InputMaybe; + /** Whether the attribute can be displayed in the admin product list. */ + availableInGrid?: InputMaybe; +}; + +export type AttributeValueCreateInput = { + /** Represent value of the attribute value (e.g. color values for swatch attributes). */ + value?: InputMaybe; + /** Represents the text (JSON) of the attribute value. */ + richText?: InputMaybe; + /** URL of the file attribute. Every time, a new value is created. */ + fileUrl?: InputMaybe; + /** File content type. */ + contentType?: InputMaybe; + /** Name of a value displayed in the interface. */ + name: Scalars['String']; +}; + +export type AttributeValueFilterInput = { + search?: InputMaybe; +}; + +export type AttributeValueInput = { + /** ID of the selected attribute. */ + id?: InputMaybe; + /** The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. */ + values?: InputMaybe>; + /** URL of the file attribute. Every time, a new value is created. */ + file?: InputMaybe; + /** File content type. */ + contentType?: InputMaybe; + /** List of entity IDs that will be used as references. */ + references?: InputMaybe>; + /** Text content in JSON format. */ + richText?: InputMaybe; + /** Represents the boolean value of the attribute value. */ + boolean?: InputMaybe; + /** Represents the date value of the attribute value. */ + date?: InputMaybe; + /** Represents the date time value of the attribute value. */ + dateTime?: InputMaybe; +}; + +export type AttributeValueTranslationInput = { + name?: InputMaybe; + richText?: InputMaybe; +}; + +export type AttributeValueUpdateInput = { + /** Represent value of the attribute value (e.g. color values for swatch attributes). */ + value?: InputMaybe; + /** Represents the text (JSON) of the attribute value. */ + richText?: InputMaybe; + /** URL of the file attribute. Every time, a new value is created. */ + fileUrl?: InputMaybe; + /** File content type. */ + contentType?: InputMaybe; + /** Name of a value displayed in the interface. */ + name?: InputMaybe; +}; + +export type BulkAttributeValueInput = { + /** ID of the selected attribute. */ + id?: InputMaybe; + /** The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. */ + values?: InputMaybe>; + /** The boolean value of an attribute to resolve. If the passed value is non-existent, it will be created. */ + boolean?: InputMaybe; +}; + +export type CardInput = { + /** Payment method nonce, a token returned by the appropriate provider's SDK. */ + code: Scalars['String']; + /** Card security code. */ + cvc?: InputMaybe; + /** Information about currency and amount. */ + money: MoneyInput; +}; + +export type CatalogueInput = { + /** Products related to the discount. */ + products?: InputMaybe>>; + /** Categories related to the discount. */ + categories?: InputMaybe>>; + /** Collections related to the discount. */ + collections?: InputMaybe>>; + /** New in Saleor 3.1. Product variant related to the discount. */ + variants?: InputMaybe>>; +}; + +export type CategoryFilterInput = { + search?: InputMaybe; + metadata?: InputMaybe>>; + ids?: InputMaybe>>; +}; + +export type CategoryInput = { + /** Category description (JSON). */ + description?: InputMaybe; + /** Category name. */ + name?: InputMaybe; + /** Category slug. */ + slug?: InputMaybe; + /** Search engine optimization fields. */ + seo?: InputMaybe; + /** Background image file. */ + backgroundImage?: InputMaybe; + /** Alt text for a product media. */ + backgroundImageAlt?: InputMaybe; +}; + +export enum CategorySortField { + /** Sort categories by name. */ + NAME = 'NAME', + /** Sort categories by product count. */ + PRODUCT_COUNT = 'PRODUCT_COUNT', + /** Sort categories by subcategory count. */ + SUBCATEGORY_COUNT = 'SUBCATEGORY_COUNT' +} + +export type CategorySortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** + * Specifies the channel in which to sort the data. + * + * DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead. + */ + channel?: InputMaybe; + /** Sort categories by the selected field. */ + field: CategorySortField; +}; + +export type ChannelCreateInput = { + /** isActive flag. */ + isActive?: InputMaybe; + /** Name of the channel. */ + name: Scalars['String']; + /** Slug of the channel. */ + slug: Scalars['String']; + /** Currency of the channel. */ + currencyCode: Scalars['String']; + /** New in Saleor 3.1. Default country for the channel. Default country can be used in checkout to determine the stock quantities or calculate taxes when the country was not explicitly provided. */ + defaultCountry: CountryCode; + /** List of shipping zones to assign to the channel. */ + addShippingZones?: InputMaybe>; +}; + +export type ChannelDeleteInput = { + /** ID of channel to migrate orders from origin channel. */ + channelId: Scalars['ID']; +}; + +/** An enumeration. */ +export enum ChannelErrorCode { + ALREADY_EXISTS = 'ALREADY_EXISTS', + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + NOT_FOUND = 'NOT_FOUND', + REQUIRED = 'REQUIRED', + UNIQUE = 'UNIQUE', + CHANNELS_CURRENCY_MUST_BE_THE_SAME = 'CHANNELS_CURRENCY_MUST_BE_THE_SAME', + CHANNEL_WITH_ORDERS = 'CHANNEL_WITH_ORDERS', + DUPLICATED_INPUT_ITEM = 'DUPLICATED_INPUT_ITEM' +} + +export type ChannelUpdateInput = { + /** isActive flag. */ + isActive?: InputMaybe; + /** Name of the channel. */ + name?: InputMaybe; + /** Slug of the channel. */ + slug?: InputMaybe; + /** New in Saleor 3.1. Default country for the channel. Default country can be used in checkout to determine the stock quantities or calculate taxes when the country was not explicitly provided. */ + defaultCountry?: InputMaybe; + /** List of shipping zones to assign to the channel. */ + addShippingZones?: InputMaybe>; + /** List of shipping zones to unassign from the channel. */ + removeShippingZones?: InputMaybe>; +}; + +export type CheckoutCreateInput = { + /** Slug of a channel in which to create a checkout. */ + channel?: InputMaybe; + /** A list of checkout lines, each containing information about an item in the checkout. */ + lines: Array>; + /** The customer's email address. */ + email?: InputMaybe; + /** The mailing address to where the checkout will be shipped. Note: the address will be ignored if the checkout doesn't contain shippable items. */ + shippingAddress?: InputMaybe; + /** Billing address of the customer. */ + billingAddress?: InputMaybe; + /** Checkout language code. */ + languageCode?: InputMaybe; +}; + +/** An enumeration. */ +export enum CheckoutErrorCode { + BILLING_ADDRESS_NOT_SET = 'BILLING_ADDRESS_NOT_SET', + CHECKOUT_NOT_FULLY_PAID = 'CHECKOUT_NOT_FULLY_PAID', + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + PRODUCT_NOT_PUBLISHED = 'PRODUCT_NOT_PUBLISHED', + PRODUCT_UNAVAILABLE_FOR_PURCHASE = 'PRODUCT_UNAVAILABLE_FOR_PURCHASE', + INSUFFICIENT_STOCK = 'INSUFFICIENT_STOCK', + INVALID = 'INVALID', + INVALID_SHIPPING_METHOD = 'INVALID_SHIPPING_METHOD', + NOT_FOUND = 'NOT_FOUND', + PAYMENT_ERROR = 'PAYMENT_ERROR', + QUANTITY_GREATER_THAN_LIMIT = 'QUANTITY_GREATER_THAN_LIMIT', + REQUIRED = 'REQUIRED', + SHIPPING_ADDRESS_NOT_SET = 'SHIPPING_ADDRESS_NOT_SET', + SHIPPING_METHOD_NOT_APPLICABLE = 'SHIPPING_METHOD_NOT_APPLICABLE', + DELIVERY_METHOD_NOT_APPLICABLE = 'DELIVERY_METHOD_NOT_APPLICABLE', + SHIPPING_METHOD_NOT_SET = 'SHIPPING_METHOD_NOT_SET', + SHIPPING_NOT_REQUIRED = 'SHIPPING_NOT_REQUIRED', + TAX_ERROR = 'TAX_ERROR', + UNIQUE = 'UNIQUE', + VOUCHER_NOT_APPLICABLE = 'VOUCHER_NOT_APPLICABLE', + GIFT_CARD_NOT_APPLICABLE = 'GIFT_CARD_NOT_APPLICABLE', + ZERO_QUANTITY = 'ZERO_QUANTITY', + MISSING_CHANNEL_SLUG = 'MISSING_CHANNEL_SLUG', + CHANNEL_INACTIVE = 'CHANNEL_INACTIVE', + UNAVAILABLE_VARIANT_IN_CHANNEL = 'UNAVAILABLE_VARIANT_IN_CHANNEL', + EMAIL_NOT_SET = 'EMAIL_NOT_SET', + NO_LINES = 'NO_LINES' +} + +export type CheckoutFilterInput = { + customer?: InputMaybe; + created?: InputMaybe; + search?: InputMaybe; + metadata?: InputMaybe>>; + channels?: InputMaybe>>; +}; + +export type CheckoutLineInput = { + /** The number of items purchased. */ + quantity: Scalars['Int']; + /** ID of the product variant. */ + variantId: Scalars['ID']; +}; + +export enum CheckoutSortField { + /** Sort checkouts by creation date. */ + CREATION_DATE = 'CREATION_DATE', + /** Sort checkouts by customer. */ + CUSTOMER = 'CUSTOMER', + /** Sort checkouts by payment. */ + PAYMENT = 'PAYMENT' +} + +export type CheckoutSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** Sort checkouts by the selected field. */ + field: CheckoutSortField; +}; + +export type CollectionChannelListingUpdateInput = { + /** List of channels to which the collection should be assigned. */ + addChannels?: InputMaybe>; + /** List of channels from which the collection should be unassigned. */ + removeChannels?: InputMaybe>; +}; + +export type CollectionCreateInput = { + /** Informs whether a collection is published. */ + isPublished?: InputMaybe; + /** Name of the collection. */ + name?: InputMaybe; + /** Slug of the collection. */ + slug?: InputMaybe; + /** Description of the collection (JSON). */ + description?: InputMaybe; + /** Background image file. */ + backgroundImage?: InputMaybe; + /** Alt text for an image. */ + backgroundImageAlt?: InputMaybe; + /** Search engine optimization fields. */ + seo?: InputMaybe; + /** Publication date. ISO 8601 standard. */ + publicationDate?: InputMaybe; + /** List of products to be added to the collection. */ + products?: InputMaybe>>; +}; + +/** An enumeration. */ +export enum CollectionErrorCode { + DUPLICATED_INPUT_ITEM = 'DUPLICATED_INPUT_ITEM', + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + NOT_FOUND = 'NOT_FOUND', + REQUIRED = 'REQUIRED', + UNIQUE = 'UNIQUE', + CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT = 'CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT' +} + +export type CollectionFilterInput = { + published?: InputMaybe; + search?: InputMaybe; + metadata?: InputMaybe>>; + ids?: InputMaybe>>; + /** + * Specifies the channel by which the data should be filtered. + * + * DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead. + */ + channel?: InputMaybe; +}; + +export type CollectionInput = { + /** Informs whether a collection is published. */ + isPublished?: InputMaybe; + /** Name of the collection. */ + name?: InputMaybe; + /** Slug of the collection. */ + slug?: InputMaybe; + /** Description of the collection (JSON). */ + description?: InputMaybe; + /** Background image file. */ + backgroundImage?: InputMaybe; + /** Alt text for an image. */ + backgroundImageAlt?: InputMaybe; + /** Search engine optimization fields. */ + seo?: InputMaybe; + /** Publication date. ISO 8601 standard. */ + publicationDate?: InputMaybe; +}; + +export enum CollectionPublished { + PUBLISHED = 'PUBLISHED', + HIDDEN = 'HIDDEN' +} + +export enum CollectionSortField { + /** Sort collections by name. */ + NAME = 'NAME', + /** Sort collections by availability. */ + AVAILABILITY = 'AVAILABILITY', + /** Sort collections by product count. */ + PRODUCT_COUNT = 'PRODUCT_COUNT', + /** Sort collections by publication date. */ + PUBLICATION_DATE = 'PUBLICATION_DATE' +} + +export type CollectionSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** + * Specifies the channel in which to sort the data. + * + * DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead. + */ + channel?: InputMaybe; + /** Sort collections by the selected field. */ + field: CollectionSortField; +}; + +export type ConfigurationItemInput = { + /** Name of the field to update. */ + name: Scalars['String']; + /** Value of the given field to update. */ + value?: InputMaybe; +}; + +/** An enumeration. */ +export enum ConfigurationTypeFieldEnum { + STRING = 'STRING', + MULTILINE = 'MULTILINE', + BOOLEAN = 'BOOLEAN', + SECRET = 'SECRET', + PASSWORD = 'PASSWORD', + SECRETMULTILINE = 'SECRETMULTILINE', + OUTPUT = 'OUTPUT' +} + +/** An enumeration. */ +export enum CountryCode { + AF = 'AF', + AX = 'AX', + AL = 'AL', + DZ = 'DZ', + AS = 'AS', + AD = 'AD', + AO = 'AO', + AI = 'AI', + AQ = 'AQ', + AG = 'AG', + AR = 'AR', + AM = 'AM', + AW = 'AW', + AU = 'AU', + AT = 'AT', + AZ = 'AZ', + BS = 'BS', + BH = 'BH', + BD = 'BD', + BB = 'BB', + BY = 'BY', + BE = 'BE', + BZ = 'BZ', + BJ = 'BJ', + BM = 'BM', + BT = 'BT', + BO = 'BO', + BQ = 'BQ', + BA = 'BA', + BW = 'BW', + BV = 'BV', + BR = 'BR', + IO = 'IO', + BN = 'BN', + BG = 'BG', + BF = 'BF', + BI = 'BI', + CV = 'CV', + KH = 'KH', + CM = 'CM', + CA = 'CA', + KY = 'KY', + CF = 'CF', + TD = 'TD', + CL = 'CL', + CN = 'CN', + CX = 'CX', + CC = 'CC', + CO = 'CO', + KM = 'KM', + CG = 'CG', + CD = 'CD', + CK = 'CK', + CR = 'CR', + CI = 'CI', + HR = 'HR', + CU = 'CU', + CW = 'CW', + CY = 'CY', + CZ = 'CZ', + DK = 'DK', + DJ = 'DJ', + DM = 'DM', + DO = 'DO', + EC = 'EC', + EG = 'EG', + SV = 'SV', + GQ = 'GQ', + ER = 'ER', + EE = 'EE', + SZ = 'SZ', + ET = 'ET', + EU = 'EU', + FK = 'FK', + FO = 'FO', + FJ = 'FJ', + FI = 'FI', + FR = 'FR', + GF = 'GF', + PF = 'PF', + TF = 'TF', + GA = 'GA', + GM = 'GM', + GE = 'GE', + DE = 'DE', + GH = 'GH', + GI = 'GI', + GR = 'GR', + GL = 'GL', + GD = 'GD', + GP = 'GP', + GU = 'GU', + GT = 'GT', + GG = 'GG', + GN = 'GN', + GW = 'GW', + GY = 'GY', + HT = 'HT', + HM = 'HM', + VA = 'VA', + HN = 'HN', + HK = 'HK', + HU = 'HU', + IS = 'IS', + IN = 'IN', + ID = 'ID', + IR = 'IR', + IQ = 'IQ', + IE = 'IE', + IM = 'IM', + IL = 'IL', + IT = 'IT', + JM = 'JM', + JP = 'JP', + JE = 'JE', + JO = 'JO', + KZ = 'KZ', + KE = 'KE', + KI = 'KI', + KW = 'KW', + KG = 'KG', + LA = 'LA', + LV = 'LV', + LB = 'LB', + LS = 'LS', + LR = 'LR', + LY = 'LY', + LI = 'LI', + LT = 'LT', + LU = 'LU', + MO = 'MO', + MG = 'MG', + MW = 'MW', + MY = 'MY', + MV = 'MV', + ML = 'ML', + MT = 'MT', + MH = 'MH', + MQ = 'MQ', + MR = 'MR', + MU = 'MU', + YT = 'YT', + MX = 'MX', + FM = 'FM', + MD = 'MD', + MC = 'MC', + MN = 'MN', + ME = 'ME', + MS = 'MS', + MA = 'MA', + MZ = 'MZ', + MM = 'MM', + NA = 'NA', + NR = 'NR', + NP = 'NP', + NL = 'NL', + NC = 'NC', + NZ = 'NZ', + NI = 'NI', + NE = 'NE', + NG = 'NG', + NU = 'NU', + NF = 'NF', + KP = 'KP', + MK = 'MK', + MP = 'MP', + NO = 'NO', + OM = 'OM', + PK = 'PK', + PW = 'PW', + PS = 'PS', + PA = 'PA', + PG = 'PG', + PY = 'PY', + PE = 'PE', + PH = 'PH', + PN = 'PN', + PL = 'PL', + PT = 'PT', + PR = 'PR', + QA = 'QA', + RE = 'RE', + RO = 'RO', + RU = 'RU', + RW = 'RW', + BL = 'BL', + SH = 'SH', + KN = 'KN', + LC = 'LC', + MF = 'MF', + PM = 'PM', + VC = 'VC', + WS = 'WS', + SM = 'SM', + ST = 'ST', + SA = 'SA', + SN = 'SN', + RS = 'RS', + SC = 'SC', + SL = 'SL', + SG = 'SG', + SX = 'SX', + SK = 'SK', + SI = 'SI', + SB = 'SB', + SO = 'SO', + ZA = 'ZA', + GS = 'GS', + KR = 'KR', + SS = 'SS', + ES = 'ES', + LK = 'LK', + SD = 'SD', + SR = 'SR', + SJ = 'SJ', + SE = 'SE', + CH = 'CH', + SY = 'SY', + TW = 'TW', + TJ = 'TJ', + TZ = 'TZ', + TH = 'TH', + TL = 'TL', + TG = 'TG', + TK = 'TK', + TO = 'TO', + TT = 'TT', + TN = 'TN', + TR = 'TR', + TM = 'TM', + TC = 'TC', + TV = 'TV', + UG = 'UG', + UA = 'UA', + AE = 'AE', + GB = 'GB', + UM = 'UM', + US = 'US', + UY = 'UY', + UZ = 'UZ', + VU = 'VU', + VE = 'VE', + VN = 'VN', + VG = 'VG', + VI = 'VI', + WF = 'WF', + EH = 'EH', + YE = 'YE', + ZM = 'ZM', + ZW = 'ZW' +} + +export type CountryFilterInput = { + /** Boolean for filtering countries by having shipping zone assigned.If 'true', return countries with shipping zone assigned.If 'false', return countries without any shipping zone assigned.If the argument is not provided (null), return all countries. */ + attachedToShippingZones?: InputMaybe; +}; + +/** An enumeration. */ +export enum CustomerEventsEnum { + ACCOUNT_CREATED = 'ACCOUNT_CREATED', + PASSWORD_RESET_LINK_SENT = 'PASSWORD_RESET_LINK_SENT', + PASSWORD_RESET = 'PASSWORD_RESET', + EMAIL_CHANGED_REQUEST = 'EMAIL_CHANGED_REQUEST', + PASSWORD_CHANGED = 'PASSWORD_CHANGED', + EMAIL_CHANGED = 'EMAIL_CHANGED', + PLACED_ORDER = 'PLACED_ORDER', + NOTE_ADDED_TO_ORDER = 'NOTE_ADDED_TO_ORDER', + DIGITAL_LINK_DOWNLOADED = 'DIGITAL_LINK_DOWNLOADED', + CUSTOMER_DELETED = 'CUSTOMER_DELETED', + NAME_ASSIGNED = 'NAME_ASSIGNED', + EMAIL_ASSIGNED = 'EMAIL_ASSIGNED', + NOTE_ADDED = 'NOTE_ADDED' +} + +export type CustomerFilterInput = { + dateJoined?: InputMaybe; + numberOfOrders?: InputMaybe; + placedOrders?: InputMaybe; + search?: InputMaybe; + metadata?: InputMaybe>>; +}; + +export type CustomerInput = { + /** Billing address of the customer. */ + defaultBillingAddress?: InputMaybe; + /** Shipping address of the customer. */ + defaultShippingAddress?: InputMaybe; + /** Given name. */ + firstName?: InputMaybe; + /** Family name. */ + lastName?: InputMaybe; + /** The unique email address of the user. */ + email?: InputMaybe; + /** User account is active. */ + isActive?: InputMaybe; + /** A note about the user. */ + note?: InputMaybe; + /** User language code. */ + languageCode?: InputMaybe; +}; + +export type DateRangeInput = { + /** Start date. */ + gte?: InputMaybe; + /** End date. */ + lte?: InputMaybe; +}; + +export type DateTimeRangeInput = { + /** Start date. */ + gte?: InputMaybe; + /** End date. */ + lte?: InputMaybe; +}; + +export type DigitalContentInput = { + /** Use default digital content settings for this product. */ + useDefaultSettings: Scalars['Boolean']; + /** Determines how many times a download link can be accessed by a customer. */ + maxDownloads?: InputMaybe; + /** Determines for how many days a download link is active since it was generated. */ + urlValidDays?: InputMaybe; + /** Overwrite default automatic_fulfillment setting for variant. */ + automaticFulfillment?: InputMaybe; +}; + +export type DigitalContentUploadInput = { + /** Use default digital content settings for this product. */ + useDefaultSettings: Scalars['Boolean']; + /** Determines how many times a download link can be accessed by a customer. */ + maxDownloads?: InputMaybe; + /** Determines for how many days a download link is active since it was generated. */ + urlValidDays?: InputMaybe; + /** Overwrite default automatic_fulfillment setting for variant. */ + automaticFulfillment?: InputMaybe; + /** Represents an file in a multipart request. */ + contentFile: Scalars['Upload']; +}; + +export type DigitalContentUrlCreateInput = { + /** Digital content ID which URL will belong to. */ + content: Scalars['ID']; +}; + +/** An enumeration. */ +export enum DiscountErrorCode { + ALREADY_EXISTS = 'ALREADY_EXISTS', + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + NOT_FOUND = 'NOT_FOUND', + REQUIRED = 'REQUIRED', + UNIQUE = 'UNIQUE', + CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT = 'CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT', + DUPLICATED_INPUT_ITEM = 'DUPLICATED_INPUT_ITEM' +} + +export enum DiscountStatusEnum { + ACTIVE = 'ACTIVE', + EXPIRED = 'EXPIRED', + SCHEDULED = 'SCHEDULED' +} + +export enum DiscountValueTypeEnum { + FIXED = 'FIXED', + PERCENTAGE = 'PERCENTAGE' +} + +/** An enumeration. */ +export enum DistanceUnitsEnum { + CM = 'CM', + M = 'M', + KM = 'KM', + FT = 'FT', + YD = 'YD', + INCH = 'INCH' +} + +export type DraftOrderCreateInput = { + /** Billing address of the customer. */ + billingAddress?: InputMaybe; + /** Customer associated with the draft order. */ + user?: InputMaybe; + /** Email address of the customer. */ + userEmail?: InputMaybe; + /** Discount amount for the order. */ + discount?: InputMaybe; + /** Shipping address of the customer. */ + shippingAddress?: InputMaybe; + /** ID of a selected shipping method. */ + shippingMethod?: InputMaybe; + /** ID of the voucher associated with the order. */ + voucher?: InputMaybe; + /** A note from a customer. Visible by customers in the order summary. */ + customerNote?: InputMaybe; + /** ID of the channel associated with the order. */ + channelId?: InputMaybe; + /** URL of a view where users should be redirected to see the order details. URL in RFC 1808 format. */ + redirectUrl?: InputMaybe; + /** Variant line input consisting of variant ID and quantity of products. */ + lines?: InputMaybe>>; +}; + +export type DraftOrderInput = { + /** Billing address of the customer. */ + billingAddress?: InputMaybe; + /** Customer associated with the draft order. */ + user?: InputMaybe; + /** Email address of the customer. */ + userEmail?: InputMaybe; + /** Discount amount for the order. */ + discount?: InputMaybe; + /** Shipping address of the customer. */ + shippingAddress?: InputMaybe; + /** ID of a selected shipping method. */ + shippingMethod?: InputMaybe; + /** ID of the voucher associated with the order. */ + voucher?: InputMaybe; + /** A note from a customer. Visible by customers in the order summary. */ + customerNote?: InputMaybe; + /** ID of the channel associated with the order. */ + channelId?: InputMaybe; + /** URL of a view where users should be redirected to see the order details. URL in RFC 1808 format. */ + redirectUrl?: InputMaybe; +}; + +export enum EventDeliveryAttemptSortField { + /** Sort event delivery attempts by created at. */ + CREATED_AT = 'CREATED_AT' +} + +export type EventDeliveryAttemptSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** Sort attempts by the selected field. */ + field: EventDeliveryAttemptSortField; +}; + +export type EventDeliveryFilterInput = { + status?: InputMaybe; + eventType?: InputMaybe; +}; + +export enum EventDeliverySortField { + /** Sort event deliveries by created at. */ + CREATED_AT = 'CREATED_AT' +} + +export type EventDeliverySortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** Sort deliveries by the selected field. */ + field: EventDeliverySortField; +}; + +export enum EventDeliveryStatusEnum { + PENDING = 'PENDING', + SUCCESS = 'SUCCESS', + FAILED = 'FAILED' +} + +/** An enumeration. */ +export enum ExportErrorCode { + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + NOT_FOUND = 'NOT_FOUND', + REQUIRED = 'REQUIRED' +} + +/** An enumeration. */ +export enum ExportEventsEnum { + EXPORT_PENDING = 'EXPORT_PENDING', + EXPORT_SUCCESS = 'EXPORT_SUCCESS', + EXPORT_FAILED = 'EXPORT_FAILED', + EXPORT_DELETED = 'EXPORT_DELETED', + EXPORTED_FILE_SENT = 'EXPORTED_FILE_SENT', + EXPORT_FAILED_INFO_SENT = 'EXPORT_FAILED_INFO_SENT' +} + +export type ExportFileFilterInput = { + createdAt?: InputMaybe; + updatedAt?: InputMaybe; + status?: InputMaybe; + user?: InputMaybe; + app?: InputMaybe; +}; + +export enum ExportFileSortField { + /** Sort export file by status. */ + STATUS = 'STATUS', + /** Sort export file by created at. */ + CREATED_AT = 'CREATED_AT', + /** Sort export file by updated at. */ + UPDATED_AT = 'UPDATED_AT' +} + +export type ExportFileSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** Sort export file by the selected field. */ + field: ExportFileSortField; +}; + +export type ExportGiftCardsInput = { + /** Determine which gift cards should be exported. */ + scope: ExportScope; + /** Filtering options for gift cards. */ + filter?: InputMaybe; + /** List of gift cards IDs to export. */ + ids?: InputMaybe>; + /** Type of exported file. */ + fileType: FileTypesEnum; +}; + +export type ExportInfoInput = { + /** List of attribute ids witch should be exported. */ + attributes?: InputMaybe>; + /** List of warehouse ids witch should be exported. */ + warehouses?: InputMaybe>; + /** List of channels ids which should be exported. */ + channels?: InputMaybe>; + /** List of product fields witch should be exported. */ + fields?: InputMaybe>; +}; + +export type ExportProductsInput = { + /** Determine which products should be exported. */ + scope: ExportScope; + /** Filtering options for products. */ + filter?: InputMaybe; + /** List of products IDs to export. */ + ids?: InputMaybe>; + /** Input with info about fields which should be exported. */ + exportInfo?: InputMaybe; + /** Type of exported file. */ + fileType: FileTypesEnum; +}; + +export enum ExportScope { + /** Export all products. */ + ALL = 'ALL', + /** Export products with given ids. */ + IDS = 'IDS', + /** Export the filtered products. */ + FILTER = 'FILTER' +} + +/** An enumeration. */ +export enum ExternalNotificationErrorCodes { + REQUIRED = 'REQUIRED', + INVALID_MODEL_TYPE = 'INVALID_MODEL_TYPE', + NOT_FOUND = 'NOT_FOUND', + CHANNEL_INACTIVE = 'CHANNEL_INACTIVE' +} + +export type ExternalNotificationTriggerInput = { + /** The list of customers or orders node IDs that will be serialized and included in the notification payload. */ + ids: Array>; + /** Additional payload that will be merged with the one based on the bussines object ID. */ + extraPayload?: InputMaybe; + /** External event type. This field is passed to a plugin as an event type. */ + externalEventType: Scalars['String']; +}; + +/** An enumeration. */ +export enum FileTypesEnum { + CSV = 'CSV', + XLSX = 'XLSX' +} + +export type FulfillmentCancelInput = { + /** ID of a warehouse where items will be restocked. Optional when fulfillment is in WAITING_FOR_APPROVAL state. */ + warehouseId?: InputMaybe; +}; + +/** An enumeration. */ +export enum FulfillmentStatus { + FULFILLED = 'FULFILLED', + REFUNDED = 'REFUNDED', + RETURNED = 'RETURNED', + REPLACED = 'REPLACED', + REFUNDED_AND_RETURNED = 'REFUNDED_AND_RETURNED', + CANCELED = 'CANCELED', + WAITING_FOR_APPROVAL = 'WAITING_FOR_APPROVAL' +} + +export type FulfillmentUpdateTrackingInput = { + /** Fulfillment tracking number. */ + trackingNumber?: InputMaybe; + /** If true, send an email notification to the customer. */ + notifyCustomer?: InputMaybe; +}; + +export type GiftCardAddNoteInput = { + /** Note message. */ + message: Scalars['String']; +}; + +export type GiftCardBulkCreateInput = { + /** The number of cards to issue. */ + count: Scalars['Int']; + /** Balance of the gift card. */ + balance: PriceInput; + /** The gift card tags. */ + tags?: InputMaybe>; + /** The gift card expiry date. */ + expiryDate?: InputMaybe; + /** Determine if gift card is active. */ + isActive: Scalars['Boolean']; +}; + +export type GiftCardCreateInput = { + /** New in Saleor 3.1. The gift card tags to add. */ + addTags?: InputMaybe>; + /** New in Saleor 3.1. The gift card expiry date. */ + expiryDate?: InputMaybe; + /** + * Start date of the gift card in ISO 8601 format. + * + * DEPRECATED: this field will be removed in Saleor 4.0. + */ + startDate?: InputMaybe; + /** + * End date of the gift card in ISO 8601 format. + * + * DEPRECATED: this field will be removed in Saleor 4.0. Use `expiryDate` from `expirySettings` instead. + */ + endDate?: InputMaybe; + /** Balance of the gift card. */ + balance: PriceInput; + /** Email of the customer to whom gift card will be sent. */ + userEmail?: InputMaybe; + /** New in Saleor 3.1. Slug of a channel from which the email should be sent. */ + channel?: InputMaybe; + /** New in Saleor 3.1. Determine if gift card is active. */ + isActive: Scalars['Boolean']; + /** + * Code to use the gift card. + * + * DEPRECATED: this field will be removed in Saleor 4.0. The code is now auto generated. + */ + code?: InputMaybe; + /** New in Saleor 3.1. The gift card note from the staff member. */ + note?: InputMaybe; +}; + +/** An enumeration. */ +export enum GiftCardErrorCode { + ALREADY_EXISTS = 'ALREADY_EXISTS', + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + NOT_FOUND = 'NOT_FOUND', + REQUIRED = 'REQUIRED', + UNIQUE = 'UNIQUE', + EXPIRED_GIFT_CARD = 'EXPIRED_GIFT_CARD', + DUPLICATED_INPUT_ITEM = 'DUPLICATED_INPUT_ITEM' +} + +export type GiftCardEventFilterInput = { + type?: InputMaybe; + orders?: InputMaybe>; +}; + +/** An enumeration. */ +export enum GiftCardEventsEnum { + ISSUED = 'ISSUED', + BOUGHT = 'BOUGHT', + UPDATED = 'UPDATED', + ACTIVATED = 'ACTIVATED', + DEACTIVATED = 'DEACTIVATED', + BALANCE_RESET = 'BALANCE_RESET', + EXPIRY_DATE_UPDATED = 'EXPIRY_DATE_UPDATED', + TAGS_UPDATED = 'TAGS_UPDATED', + SENT_TO_CUSTOMER = 'SENT_TO_CUSTOMER', + RESENT = 'RESENT', + NOTE_ADDED = 'NOTE_ADDED', + USED_IN_ORDER = 'USED_IN_ORDER' +} + +export type GiftCardFilterInput = { + isActive?: InputMaybe; + metadata?: InputMaybe>>; + tags?: InputMaybe>>; + products?: InputMaybe>>; + usedBy?: InputMaybe>>; + used?: InputMaybe; + currency?: InputMaybe; + currentBalance?: InputMaybe; + initialBalance?: InputMaybe; + code?: InputMaybe; +}; + +export type GiftCardResendInput = { + /** ID of a gift card to resend. */ + id: Scalars['ID']; + /** Email to which gift card should be send. */ + email?: InputMaybe; + /** Slug of a channel from which the email should be sent. */ + channel: Scalars['String']; +}; + +/** An enumeration. */ +export enum GiftCardSettingsErrorCode { + INVALID = 'INVALID', + REQUIRED = 'REQUIRED', + GRAPHQL_ERROR = 'GRAPHQL_ERROR' +} + +/** An enumeration. */ +export enum GiftCardSettingsExpiryTypeEnum { + NEVER_EXPIRE = 'NEVER_EXPIRE', + EXPIRY_PERIOD = 'EXPIRY_PERIOD' +} + +export type GiftCardSettingsUpdateInput = { + /** Defines gift card default expiry settings. */ + expiryType?: InputMaybe; + /** Defines gift card expiry period. */ + expiryPeriod?: InputMaybe; +}; + +export enum GiftCardSortField { + /** Sort orders by product. */ + PRODUCT = 'PRODUCT', + /** Sort orders by used by. */ + USED_BY = 'USED_BY', + /** Sort orders by current balance. */ + CURRENT_BALANCE = 'CURRENT_BALANCE' +} + +export type GiftCardSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** Sort gift cards by the selected field. */ + field: GiftCardSortField; +}; + +export type GiftCardTagFilterInput = { + search?: InputMaybe; +}; + +export type GiftCardUpdateInput = { + /** New in Saleor 3.1. The gift card tags to add. */ + addTags?: InputMaybe>; + /** New in Saleor 3.1. The gift card expiry date. */ + expiryDate?: InputMaybe; + /** + * Start date of the gift card in ISO 8601 format. + * + * DEPRECATED: this field will be removed in Saleor 4.0. + */ + startDate?: InputMaybe; + /** + * End date of the gift card in ISO 8601 format. + * + * DEPRECATED: this field will be removed in Saleor 4.0. Use `expiryDate` from `expirySettings` instead. + */ + endDate?: InputMaybe; + /** New in Saleor 3.1. The gift card tags to remove. */ + removeTags?: InputMaybe>; + /** New in Saleor 3.1. The gift card balance amount. */ + balanceAmount?: InputMaybe; +}; + +export type IntRangeInput = { + /** Value greater than or equal to. */ + gte?: InputMaybe; + /** Value less than or equal to. */ + lte?: InputMaybe; +}; + +export type InvoiceCreateInput = { + /** Invoice number. */ + number: Scalars['String']; + /** URL of an invoice to download. */ + url: Scalars['String']; +}; + +/** An enumeration. */ +export enum InvoiceErrorCode { + REQUIRED = 'REQUIRED', + NOT_READY = 'NOT_READY', + URL_NOT_SET = 'URL_NOT_SET', + EMAIL_NOT_SET = 'EMAIL_NOT_SET', + NUMBER_NOT_SET = 'NUMBER_NOT_SET', + NOT_FOUND = 'NOT_FOUND', + INVALID_STATUS = 'INVALID_STATUS', + NO_INVOICE_PLUGIN = 'NO_INVOICE_PLUGIN' +} + +/** An enumeration. */ +export enum JobStatusEnum { + PENDING = 'PENDING', + SUCCESS = 'SUCCESS', + FAILED = 'FAILED', + DELETED = 'DELETED' +} + +/** An enumeration. */ +export enum LanguageCodeEnum { + AF = 'AF', + AF_NA = 'AF_NA', + AF_ZA = 'AF_ZA', + AGQ = 'AGQ', + AGQ_CM = 'AGQ_CM', + AK = 'AK', + AK_GH = 'AK_GH', + AM = 'AM', + AM_ET = 'AM_ET', + AR = 'AR', + AR_AE = 'AR_AE', + AR_BH = 'AR_BH', + AR_DJ = 'AR_DJ', + AR_DZ = 'AR_DZ', + AR_EG = 'AR_EG', + AR_EH = 'AR_EH', + AR_ER = 'AR_ER', + AR_IL = 'AR_IL', + AR_IQ = 'AR_IQ', + AR_JO = 'AR_JO', + AR_KM = 'AR_KM', + AR_KW = 'AR_KW', + AR_LB = 'AR_LB', + AR_LY = 'AR_LY', + AR_MA = 'AR_MA', + AR_MR = 'AR_MR', + AR_OM = 'AR_OM', + AR_PS = 'AR_PS', + AR_QA = 'AR_QA', + AR_SA = 'AR_SA', + AR_SD = 'AR_SD', + AR_SO = 'AR_SO', + AR_SS = 'AR_SS', + AR_SY = 'AR_SY', + AR_TD = 'AR_TD', + AR_TN = 'AR_TN', + AR_YE = 'AR_YE', + AS = 'AS', + AS_IN = 'AS_IN', + ASA = 'ASA', + ASA_TZ = 'ASA_TZ', + AST = 'AST', + AST_ES = 'AST_ES', + AZ = 'AZ', + AZ_CYRL = 'AZ_CYRL', + AZ_CYRL_AZ = 'AZ_CYRL_AZ', + AZ_LATN = 'AZ_LATN', + AZ_LATN_AZ = 'AZ_LATN_AZ', + BAS = 'BAS', + BAS_CM = 'BAS_CM', + BE = 'BE', + BE_BY = 'BE_BY', + BEM = 'BEM', + BEM_ZM = 'BEM_ZM', + BEZ = 'BEZ', + BEZ_TZ = 'BEZ_TZ', + BG = 'BG', + BG_BG = 'BG_BG', + BM = 'BM', + BM_ML = 'BM_ML', + BN = 'BN', + BN_BD = 'BN_BD', + BN_IN = 'BN_IN', + BO = 'BO', + BO_CN = 'BO_CN', + BO_IN = 'BO_IN', + BR = 'BR', + BR_FR = 'BR_FR', + BRX = 'BRX', + BRX_IN = 'BRX_IN', + BS = 'BS', + BS_CYRL = 'BS_CYRL', + BS_CYRL_BA = 'BS_CYRL_BA', + BS_LATN = 'BS_LATN', + BS_LATN_BA = 'BS_LATN_BA', + CA = 'CA', + CA_AD = 'CA_AD', + CA_ES = 'CA_ES', + CA_ES_VALENCIA = 'CA_ES_VALENCIA', + CA_FR = 'CA_FR', + CA_IT = 'CA_IT', + CCP = 'CCP', + CCP_BD = 'CCP_BD', + CCP_IN = 'CCP_IN', + CE = 'CE', + CE_RU = 'CE_RU', + CEB = 'CEB', + CEB_PH = 'CEB_PH', + CGG = 'CGG', + CGG_UG = 'CGG_UG', + CHR = 'CHR', + CHR_US = 'CHR_US', + CKB = 'CKB', + CKB_IQ = 'CKB_IQ', + CKB_IR = 'CKB_IR', + CS = 'CS', + CS_CZ = 'CS_CZ', + CU = 'CU', + CU_RU = 'CU_RU', + CY = 'CY', + CY_GB = 'CY_GB', + DA = 'DA', + DA_DK = 'DA_DK', + DA_GL = 'DA_GL', + DAV = 'DAV', + DAV_KE = 'DAV_KE', + DE = 'DE', + DE_AT = 'DE_AT', + DE_BE = 'DE_BE', + DE_CH = 'DE_CH', + DE_DE = 'DE_DE', + DE_IT = 'DE_IT', + DE_LI = 'DE_LI', + DE_LU = 'DE_LU', + DJE = 'DJE', + DJE_NE = 'DJE_NE', + DSB = 'DSB', + DSB_DE = 'DSB_DE', + DUA = 'DUA', + DUA_CM = 'DUA_CM', + DYO = 'DYO', + DYO_SN = 'DYO_SN', + DZ = 'DZ', + DZ_BT = 'DZ_BT', + EBU = 'EBU', + EBU_KE = 'EBU_KE', + EE = 'EE', + EE_GH = 'EE_GH', + EE_TG = 'EE_TG', + EL = 'EL', + EL_CY = 'EL_CY', + EL_GR = 'EL_GR', + EN = 'EN', + EN_AE = 'EN_AE', + EN_AG = 'EN_AG', + EN_AI = 'EN_AI', + EN_AS = 'EN_AS', + EN_AT = 'EN_AT', + EN_AU = 'EN_AU', + EN_BB = 'EN_BB', + EN_BE = 'EN_BE', + EN_BI = 'EN_BI', + EN_BM = 'EN_BM', + EN_BS = 'EN_BS', + EN_BW = 'EN_BW', + EN_BZ = 'EN_BZ', + EN_CA = 'EN_CA', + EN_CC = 'EN_CC', + EN_CH = 'EN_CH', + EN_CK = 'EN_CK', + EN_CM = 'EN_CM', + EN_CX = 'EN_CX', + EN_CY = 'EN_CY', + EN_DE = 'EN_DE', + EN_DG = 'EN_DG', + EN_DK = 'EN_DK', + EN_DM = 'EN_DM', + EN_ER = 'EN_ER', + EN_FI = 'EN_FI', + EN_FJ = 'EN_FJ', + EN_FK = 'EN_FK', + EN_FM = 'EN_FM', + EN_GB = 'EN_GB', + EN_GD = 'EN_GD', + EN_GG = 'EN_GG', + EN_GH = 'EN_GH', + EN_GI = 'EN_GI', + EN_GM = 'EN_GM', + EN_GU = 'EN_GU', + EN_GY = 'EN_GY', + EN_HK = 'EN_HK', + EN_IE = 'EN_IE', + EN_IL = 'EN_IL', + EN_IM = 'EN_IM', + EN_IN = 'EN_IN', + EN_IO = 'EN_IO', + EN_JE = 'EN_JE', + EN_JM = 'EN_JM', + EN_KE = 'EN_KE', + EN_KI = 'EN_KI', + EN_KN = 'EN_KN', + EN_KY = 'EN_KY', + EN_LC = 'EN_LC', + EN_LR = 'EN_LR', + EN_LS = 'EN_LS', + EN_MG = 'EN_MG', + EN_MH = 'EN_MH', + EN_MO = 'EN_MO', + EN_MP = 'EN_MP', + EN_MS = 'EN_MS', + EN_MT = 'EN_MT', + EN_MU = 'EN_MU', + EN_MW = 'EN_MW', + EN_MY = 'EN_MY', + EN_NA = 'EN_NA', + EN_NF = 'EN_NF', + EN_NG = 'EN_NG', + EN_NL = 'EN_NL', + EN_NR = 'EN_NR', + EN_NU = 'EN_NU', + EN_NZ = 'EN_NZ', + EN_PG = 'EN_PG', + EN_PH = 'EN_PH', + EN_PK = 'EN_PK', + EN_PN = 'EN_PN', + EN_PR = 'EN_PR', + EN_PW = 'EN_PW', + EN_RW = 'EN_RW', + EN_SB = 'EN_SB', + EN_SC = 'EN_SC', + EN_SD = 'EN_SD', + EN_SE = 'EN_SE', + EN_SG = 'EN_SG', + EN_SH = 'EN_SH', + EN_SI = 'EN_SI', + EN_SL = 'EN_SL', + EN_SS = 'EN_SS', + EN_SX = 'EN_SX', + EN_SZ = 'EN_SZ', + EN_TC = 'EN_TC', + EN_TK = 'EN_TK', + EN_TO = 'EN_TO', + EN_TT = 'EN_TT', + EN_TV = 'EN_TV', + EN_TZ = 'EN_TZ', + EN_UG = 'EN_UG', + EN_UM = 'EN_UM', + EN_US = 'EN_US', + EN_VC = 'EN_VC', + EN_VG = 'EN_VG', + EN_VI = 'EN_VI', + EN_VU = 'EN_VU', + EN_WS = 'EN_WS', + EN_ZA = 'EN_ZA', + EN_ZM = 'EN_ZM', + EN_ZW = 'EN_ZW', + EO = 'EO', + ES = 'ES', + ES_AR = 'ES_AR', + ES_BO = 'ES_BO', + ES_BR = 'ES_BR', + ES_BZ = 'ES_BZ', + ES_CL = 'ES_CL', + ES_CO = 'ES_CO', + ES_CR = 'ES_CR', + ES_CU = 'ES_CU', + ES_DO = 'ES_DO', + ES_EA = 'ES_EA', + ES_EC = 'ES_EC', + ES_ES = 'ES_ES', + ES_GQ = 'ES_GQ', + ES_GT = 'ES_GT', + ES_HN = 'ES_HN', + ES_IC = 'ES_IC', + ES_MX = 'ES_MX', + ES_NI = 'ES_NI', + ES_PA = 'ES_PA', + ES_PE = 'ES_PE', + ES_PH = 'ES_PH', + ES_PR = 'ES_PR', + ES_PY = 'ES_PY', + ES_SV = 'ES_SV', + ES_US = 'ES_US', + ES_UY = 'ES_UY', + ES_VE = 'ES_VE', + ET = 'ET', + ET_EE = 'ET_EE', + EU = 'EU', + EU_ES = 'EU_ES', + EWO = 'EWO', + EWO_CM = 'EWO_CM', + FA = 'FA', + FA_AF = 'FA_AF', + FA_IR = 'FA_IR', + FF = 'FF', + FF_ADLM = 'FF_ADLM', + FF_ADLM_BF = 'FF_ADLM_BF', + FF_ADLM_CM = 'FF_ADLM_CM', + FF_ADLM_GH = 'FF_ADLM_GH', + FF_ADLM_GM = 'FF_ADLM_GM', + FF_ADLM_GN = 'FF_ADLM_GN', + FF_ADLM_GW = 'FF_ADLM_GW', + FF_ADLM_LR = 'FF_ADLM_LR', + FF_ADLM_MR = 'FF_ADLM_MR', + FF_ADLM_NE = 'FF_ADLM_NE', + FF_ADLM_NG = 'FF_ADLM_NG', + FF_ADLM_SL = 'FF_ADLM_SL', + FF_ADLM_SN = 'FF_ADLM_SN', + FF_LATN = 'FF_LATN', + FF_LATN_BF = 'FF_LATN_BF', + FF_LATN_CM = 'FF_LATN_CM', + FF_LATN_GH = 'FF_LATN_GH', + FF_LATN_GM = 'FF_LATN_GM', + FF_LATN_GN = 'FF_LATN_GN', + FF_LATN_GW = 'FF_LATN_GW', + FF_LATN_LR = 'FF_LATN_LR', + FF_LATN_MR = 'FF_LATN_MR', + FF_LATN_NE = 'FF_LATN_NE', + FF_LATN_NG = 'FF_LATN_NG', + FF_LATN_SL = 'FF_LATN_SL', + FF_LATN_SN = 'FF_LATN_SN', + FI = 'FI', + FI_FI = 'FI_FI', + FIL = 'FIL', + FIL_PH = 'FIL_PH', + FO = 'FO', + FO_DK = 'FO_DK', + FO_FO = 'FO_FO', + FR = 'FR', + FR_BE = 'FR_BE', + FR_BF = 'FR_BF', + FR_BI = 'FR_BI', + FR_BJ = 'FR_BJ', + FR_BL = 'FR_BL', + FR_CA = 'FR_CA', + FR_CD = 'FR_CD', + FR_CF = 'FR_CF', + FR_CG = 'FR_CG', + FR_CH = 'FR_CH', + FR_CI = 'FR_CI', + FR_CM = 'FR_CM', + FR_DJ = 'FR_DJ', + FR_DZ = 'FR_DZ', + FR_FR = 'FR_FR', + FR_GA = 'FR_GA', + FR_GF = 'FR_GF', + FR_GN = 'FR_GN', + FR_GP = 'FR_GP', + FR_GQ = 'FR_GQ', + FR_HT = 'FR_HT', + FR_KM = 'FR_KM', + FR_LU = 'FR_LU', + FR_MA = 'FR_MA', + FR_MC = 'FR_MC', + FR_MF = 'FR_MF', + FR_MG = 'FR_MG', + FR_ML = 'FR_ML', + FR_MQ = 'FR_MQ', + FR_MR = 'FR_MR', + FR_MU = 'FR_MU', + FR_NC = 'FR_NC', + FR_NE = 'FR_NE', + FR_PF = 'FR_PF', + FR_PM = 'FR_PM', + FR_RE = 'FR_RE', + FR_RW = 'FR_RW', + FR_SC = 'FR_SC', + FR_SN = 'FR_SN', + FR_SY = 'FR_SY', + FR_TD = 'FR_TD', + FR_TG = 'FR_TG', + FR_TN = 'FR_TN', + FR_VU = 'FR_VU', + FR_WF = 'FR_WF', + FR_YT = 'FR_YT', + FUR = 'FUR', + FUR_IT = 'FUR_IT', + FY = 'FY', + FY_NL = 'FY_NL', + GA = 'GA', + GA_GB = 'GA_GB', + GA_IE = 'GA_IE', + GD = 'GD', + GD_GB = 'GD_GB', + GL = 'GL', + GL_ES = 'GL_ES', + GSW = 'GSW', + GSW_CH = 'GSW_CH', + GSW_FR = 'GSW_FR', + GSW_LI = 'GSW_LI', + GU = 'GU', + GU_IN = 'GU_IN', + GUZ = 'GUZ', + GUZ_KE = 'GUZ_KE', + GV = 'GV', + GV_IM = 'GV_IM', + HA = 'HA', + HA_GH = 'HA_GH', + HA_NE = 'HA_NE', + HA_NG = 'HA_NG', + HAW = 'HAW', + HAW_US = 'HAW_US', + HE = 'HE', + HE_IL = 'HE_IL', + HI = 'HI', + HI_IN = 'HI_IN', + HR = 'HR', + HR_BA = 'HR_BA', + HR_HR = 'HR_HR', + HSB = 'HSB', + HSB_DE = 'HSB_DE', + HU = 'HU', + HU_HU = 'HU_HU', + HY = 'HY', + HY_AM = 'HY_AM', + IA = 'IA', + ID = 'ID', + ID_ID = 'ID_ID', + IG = 'IG', + IG_NG = 'IG_NG', + II = 'II', + II_CN = 'II_CN', + IS = 'IS', + IS_IS = 'IS_IS', + IT = 'IT', + IT_CH = 'IT_CH', + IT_IT = 'IT_IT', + IT_SM = 'IT_SM', + IT_VA = 'IT_VA', + JA = 'JA', + JA_JP = 'JA_JP', + JGO = 'JGO', + JGO_CM = 'JGO_CM', + JMC = 'JMC', + JMC_TZ = 'JMC_TZ', + JV = 'JV', + JV_ID = 'JV_ID', + KA = 'KA', + KA_GE = 'KA_GE', + KAB = 'KAB', + KAB_DZ = 'KAB_DZ', + KAM = 'KAM', + KAM_KE = 'KAM_KE', + KDE = 'KDE', + KDE_TZ = 'KDE_TZ', + KEA = 'KEA', + KEA_CV = 'KEA_CV', + KHQ = 'KHQ', + KHQ_ML = 'KHQ_ML', + KI = 'KI', + KI_KE = 'KI_KE', + KK = 'KK', + KK_KZ = 'KK_KZ', + KKJ = 'KKJ', + KKJ_CM = 'KKJ_CM', + KL = 'KL', + KL_GL = 'KL_GL', + KLN = 'KLN', + KLN_KE = 'KLN_KE', + KM = 'KM', + KM_KH = 'KM_KH', + KN = 'KN', + KN_IN = 'KN_IN', + KO = 'KO', + KO_KP = 'KO_KP', + KO_KR = 'KO_KR', + KOK = 'KOK', + KOK_IN = 'KOK_IN', + KS = 'KS', + KS_ARAB = 'KS_ARAB', + KS_ARAB_IN = 'KS_ARAB_IN', + KSB = 'KSB', + KSB_TZ = 'KSB_TZ', + KSF = 'KSF', + KSF_CM = 'KSF_CM', + KSH = 'KSH', + KSH_DE = 'KSH_DE', + KU = 'KU', + KU_TR = 'KU_TR', + KW = 'KW', + KW_GB = 'KW_GB', + KY = 'KY', + KY_KG = 'KY_KG', + LAG = 'LAG', + LAG_TZ = 'LAG_TZ', + LB = 'LB', + LB_LU = 'LB_LU', + LG = 'LG', + LG_UG = 'LG_UG', + LKT = 'LKT', + LKT_US = 'LKT_US', + LN = 'LN', + LN_AO = 'LN_AO', + LN_CD = 'LN_CD', + LN_CF = 'LN_CF', + LN_CG = 'LN_CG', + LO = 'LO', + LO_LA = 'LO_LA', + LRC = 'LRC', + LRC_IQ = 'LRC_IQ', + LRC_IR = 'LRC_IR', + LT = 'LT', + LT_LT = 'LT_LT', + LU = 'LU', + LU_CD = 'LU_CD', + LUO = 'LUO', + LUO_KE = 'LUO_KE', + LUY = 'LUY', + LUY_KE = 'LUY_KE', + LV = 'LV', + LV_LV = 'LV_LV', + MAI = 'MAI', + MAI_IN = 'MAI_IN', + MAS = 'MAS', + MAS_KE = 'MAS_KE', + MAS_TZ = 'MAS_TZ', + MER = 'MER', + MER_KE = 'MER_KE', + MFE = 'MFE', + MFE_MU = 'MFE_MU', + MG = 'MG', + MG_MG = 'MG_MG', + MGH = 'MGH', + MGH_MZ = 'MGH_MZ', + MGO = 'MGO', + MGO_CM = 'MGO_CM', + MI = 'MI', + MI_NZ = 'MI_NZ', + MK = 'MK', + MK_MK = 'MK_MK', + ML = 'ML', + ML_IN = 'ML_IN', + MN = 'MN', + MN_MN = 'MN_MN', + MNI = 'MNI', + MNI_BENG = 'MNI_BENG', + MNI_BENG_IN = 'MNI_BENG_IN', + MR = 'MR', + MR_IN = 'MR_IN', + MS = 'MS', + MS_BN = 'MS_BN', + MS_ID = 'MS_ID', + MS_MY = 'MS_MY', + MS_SG = 'MS_SG', + MT = 'MT', + MT_MT = 'MT_MT', + MUA = 'MUA', + MUA_CM = 'MUA_CM', + MY = 'MY', + MY_MM = 'MY_MM', + MZN = 'MZN', + MZN_IR = 'MZN_IR', + NAQ = 'NAQ', + NAQ_NA = 'NAQ_NA', + NB = 'NB', + NB_NO = 'NB_NO', + NB_SJ = 'NB_SJ', + ND = 'ND', + ND_ZW = 'ND_ZW', + NDS = 'NDS', + NDS_DE = 'NDS_DE', + NDS_NL = 'NDS_NL', + NE = 'NE', + NE_IN = 'NE_IN', + NE_NP = 'NE_NP', + NL = 'NL', + NL_AW = 'NL_AW', + NL_BE = 'NL_BE', + NL_BQ = 'NL_BQ', + NL_CW = 'NL_CW', + NL_NL = 'NL_NL', + NL_SR = 'NL_SR', + NL_SX = 'NL_SX', + NMG = 'NMG', + NMG_CM = 'NMG_CM', + NN = 'NN', + NN_NO = 'NN_NO', + NNH = 'NNH', + NNH_CM = 'NNH_CM', + NUS = 'NUS', + NUS_SS = 'NUS_SS', + NYN = 'NYN', + NYN_UG = 'NYN_UG', + OM = 'OM', + OM_ET = 'OM_ET', + OM_KE = 'OM_KE', + OR = 'OR', + OR_IN = 'OR_IN', + OS = 'OS', + OS_GE = 'OS_GE', + OS_RU = 'OS_RU', + PA = 'PA', + PA_ARAB = 'PA_ARAB', + PA_ARAB_PK = 'PA_ARAB_PK', + PA_GURU = 'PA_GURU', + PA_GURU_IN = 'PA_GURU_IN', + PCM = 'PCM', + PCM_NG = 'PCM_NG', + PL = 'PL', + PL_PL = 'PL_PL', + PRG = 'PRG', + PS = 'PS', + PS_AF = 'PS_AF', + PS_PK = 'PS_PK', + PT = 'PT', + PT_AO = 'PT_AO', + PT_BR = 'PT_BR', + PT_CH = 'PT_CH', + PT_CV = 'PT_CV', + PT_GQ = 'PT_GQ', + PT_GW = 'PT_GW', + PT_LU = 'PT_LU', + PT_MO = 'PT_MO', + PT_MZ = 'PT_MZ', + PT_PT = 'PT_PT', + PT_ST = 'PT_ST', + PT_TL = 'PT_TL', + QU = 'QU', + QU_BO = 'QU_BO', + QU_EC = 'QU_EC', + QU_PE = 'QU_PE', + RM = 'RM', + RM_CH = 'RM_CH', + RN = 'RN', + RN_BI = 'RN_BI', + RO = 'RO', + RO_MD = 'RO_MD', + RO_RO = 'RO_RO', + ROF = 'ROF', + ROF_TZ = 'ROF_TZ', + RU = 'RU', + RU_BY = 'RU_BY', + RU_KG = 'RU_KG', + RU_KZ = 'RU_KZ', + RU_MD = 'RU_MD', + RU_RU = 'RU_RU', + RU_UA = 'RU_UA', + RW = 'RW', + RW_RW = 'RW_RW', + RWK = 'RWK', + RWK_TZ = 'RWK_TZ', + SAH = 'SAH', + SAH_RU = 'SAH_RU', + SAQ = 'SAQ', + SAQ_KE = 'SAQ_KE', + SAT = 'SAT', + SAT_OLCK = 'SAT_OLCK', + SAT_OLCK_IN = 'SAT_OLCK_IN', + SBP = 'SBP', + SBP_TZ = 'SBP_TZ', + SD = 'SD', + SD_ARAB = 'SD_ARAB', + SD_ARAB_PK = 'SD_ARAB_PK', + SD_DEVA = 'SD_DEVA', + SD_DEVA_IN = 'SD_DEVA_IN', + SE = 'SE', + SE_FI = 'SE_FI', + SE_NO = 'SE_NO', + SE_SE = 'SE_SE', + SEH = 'SEH', + SEH_MZ = 'SEH_MZ', + SES = 'SES', + SES_ML = 'SES_ML', + SG = 'SG', + SG_CF = 'SG_CF', + SHI = 'SHI', + SHI_LATN = 'SHI_LATN', + SHI_LATN_MA = 'SHI_LATN_MA', + SHI_TFNG = 'SHI_TFNG', + SHI_TFNG_MA = 'SHI_TFNG_MA', + SI = 'SI', + SI_LK = 'SI_LK', + SK = 'SK', + SK_SK = 'SK_SK', + SL = 'SL', + SL_SI = 'SL_SI', + SMN = 'SMN', + SMN_FI = 'SMN_FI', + SN = 'SN', + SN_ZW = 'SN_ZW', + SO = 'SO', + SO_DJ = 'SO_DJ', + SO_ET = 'SO_ET', + SO_KE = 'SO_KE', + SO_SO = 'SO_SO', + SQ = 'SQ', + SQ_AL = 'SQ_AL', + SQ_MK = 'SQ_MK', + SQ_XK = 'SQ_XK', + SR = 'SR', + SR_CYRL = 'SR_CYRL', + SR_CYRL_BA = 'SR_CYRL_BA', + SR_CYRL_ME = 'SR_CYRL_ME', + SR_CYRL_RS = 'SR_CYRL_RS', + SR_CYRL_XK = 'SR_CYRL_XK', + SR_LATN = 'SR_LATN', + SR_LATN_BA = 'SR_LATN_BA', + SR_LATN_ME = 'SR_LATN_ME', + SR_LATN_RS = 'SR_LATN_RS', + SR_LATN_XK = 'SR_LATN_XK', + SU = 'SU', + SU_LATN = 'SU_LATN', + SU_LATN_ID = 'SU_LATN_ID', + SV = 'SV', + SV_AX = 'SV_AX', + SV_FI = 'SV_FI', + SV_SE = 'SV_SE', + SW = 'SW', + SW_CD = 'SW_CD', + SW_KE = 'SW_KE', + SW_TZ = 'SW_TZ', + SW_UG = 'SW_UG', + TA = 'TA', + TA_IN = 'TA_IN', + TA_LK = 'TA_LK', + TA_MY = 'TA_MY', + TA_SG = 'TA_SG', + TE = 'TE', + TE_IN = 'TE_IN', + TEO = 'TEO', + TEO_KE = 'TEO_KE', + TEO_UG = 'TEO_UG', + TG = 'TG', + TG_TJ = 'TG_TJ', + TH = 'TH', + TH_TH = 'TH_TH', + TI = 'TI', + TI_ER = 'TI_ER', + TI_ET = 'TI_ET', + TK = 'TK', + TK_TM = 'TK_TM', + TO = 'TO', + TO_TO = 'TO_TO', + TR = 'TR', + TR_CY = 'TR_CY', + TR_TR = 'TR_TR', + TT = 'TT', + TT_RU = 'TT_RU', + TWQ = 'TWQ', + TWQ_NE = 'TWQ_NE', + TZM = 'TZM', + TZM_MA = 'TZM_MA', + UG = 'UG', + UG_CN = 'UG_CN', + UK = 'UK', + UK_UA = 'UK_UA', + UR = 'UR', + UR_IN = 'UR_IN', + UR_PK = 'UR_PK', + UZ = 'UZ', + UZ_ARAB = 'UZ_ARAB', + UZ_ARAB_AF = 'UZ_ARAB_AF', + UZ_CYRL = 'UZ_CYRL', + UZ_CYRL_UZ = 'UZ_CYRL_UZ', + UZ_LATN = 'UZ_LATN', + UZ_LATN_UZ = 'UZ_LATN_UZ', + VAI = 'VAI', + VAI_LATN = 'VAI_LATN', + VAI_LATN_LR = 'VAI_LATN_LR', + VAI_VAII = 'VAI_VAII', + VAI_VAII_LR = 'VAI_VAII_LR', + VI = 'VI', + VI_VN = 'VI_VN', + VO = 'VO', + VUN = 'VUN', + VUN_TZ = 'VUN_TZ', + WAE = 'WAE', + WAE_CH = 'WAE_CH', + WO = 'WO', + WO_SN = 'WO_SN', + XH = 'XH', + XH_ZA = 'XH_ZA', + XOG = 'XOG', + XOG_UG = 'XOG_UG', + YAV = 'YAV', + YAV_CM = 'YAV_CM', + YI = 'YI', + YO = 'YO', + YO_BJ = 'YO_BJ', + YO_NG = 'YO_NG', + YUE = 'YUE', + YUE_HANS = 'YUE_HANS', + YUE_HANS_CN = 'YUE_HANS_CN', + YUE_HANT = 'YUE_HANT', + YUE_HANT_HK = 'YUE_HANT_HK', + ZGH = 'ZGH', + ZGH_MA = 'ZGH_MA', + ZH = 'ZH', + ZH_HANS = 'ZH_HANS', + ZH_HANS_CN = 'ZH_HANS_CN', + ZH_HANS_HK = 'ZH_HANS_HK', + ZH_HANS_MO = 'ZH_HANS_MO', + ZH_HANS_SG = 'ZH_HANS_SG', + ZH_HANT = 'ZH_HANT', + ZH_HANT_HK = 'ZH_HANT_HK', + ZH_HANT_MO = 'ZH_HANT_MO', + ZH_HANT_TW = 'ZH_HANT_TW', + ZU = 'ZU', + ZU_ZA = 'ZU_ZA' +} + +/** An enumeration. */ +export enum MeasurementUnitsEnum { + CM = 'CM', + M = 'M', + KM = 'KM', + FT = 'FT', + YD = 'YD', + INCH = 'INCH', + SQ_CM = 'SQ_CM', + SQ_M = 'SQ_M', + SQ_KM = 'SQ_KM', + SQ_FT = 'SQ_FT', + SQ_YD = 'SQ_YD', + SQ_INCH = 'SQ_INCH', + CUBIC_MILLIMETER = 'CUBIC_MILLIMETER', + CUBIC_CENTIMETER = 'CUBIC_CENTIMETER', + CUBIC_DECIMETER = 'CUBIC_DECIMETER', + CUBIC_METER = 'CUBIC_METER', + LITER = 'LITER', + CUBIC_FOOT = 'CUBIC_FOOT', + CUBIC_INCH = 'CUBIC_INCH', + CUBIC_YARD = 'CUBIC_YARD', + QT = 'QT', + PINT = 'PINT', + FL_OZ = 'FL_OZ', + ACRE_IN = 'ACRE_IN', + ACRE_FT = 'ACRE_FT', + G = 'G', + LB = 'LB', + OZ = 'OZ', + KG = 'KG', + TONNE = 'TONNE' +} + +export type MenuCreateInput = { + /** Name of the menu. */ + name: Scalars['String']; + /** Slug of the menu. Will be generated if not provided. */ + slug?: InputMaybe; + /** List of menu items. */ + items?: InputMaybe>>; +}; + +/** An enumeration. */ +export enum MenuErrorCode { + CANNOT_ASSIGN_NODE = 'CANNOT_ASSIGN_NODE', + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + INVALID_MENU_ITEM = 'INVALID_MENU_ITEM', + NO_MENU_ITEM_PROVIDED = 'NO_MENU_ITEM_PROVIDED', + NOT_FOUND = 'NOT_FOUND', + REQUIRED = 'REQUIRED', + TOO_MANY_MENU_ITEMS = 'TOO_MANY_MENU_ITEMS', + UNIQUE = 'UNIQUE' +} + +export type MenuFilterInput = { + search?: InputMaybe; + slug?: InputMaybe>>; + metadata?: InputMaybe>>; +}; + +export type MenuInput = { + /** Name of the menu. */ + name?: InputMaybe; + /** Slug of the menu. */ + slug?: InputMaybe; +}; + +export type MenuItemCreateInput = { + /** Name of the menu item. */ + name: Scalars['String']; + /** URL of the pointed item. */ + url?: InputMaybe; + /** Category to which item points. */ + category?: InputMaybe; + /** Collection to which item points. */ + collection?: InputMaybe; + /** Page to which item points. */ + page?: InputMaybe; + /** Menu to which item belongs. */ + menu: Scalars['ID']; + /** ID of the parent menu. If empty, menu will be top level menu. */ + parent?: InputMaybe; +}; + +export type MenuItemFilterInput = { + search?: InputMaybe; + metadata?: InputMaybe>>; +}; + +export type MenuItemInput = { + /** Name of the menu item. */ + name?: InputMaybe; + /** URL of the pointed item. */ + url?: InputMaybe; + /** Category to which item points. */ + category?: InputMaybe; + /** Collection to which item points. */ + collection?: InputMaybe; + /** Page to which item points. */ + page?: InputMaybe; +}; + +export type MenuItemMoveInput = { + /** The menu item ID to move. */ + itemId: Scalars['ID']; + /** ID of the parent menu. If empty, menu will be top level menu. */ + parentId?: InputMaybe; + /** The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. */ + sortOrder?: InputMaybe; +}; + +export type MenuItemSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** Sort menu items by the selected field. */ + field: MenuItemsSortField; +}; + +export enum MenuItemsSortField { + /** Sort menu items by name. */ + NAME = 'NAME' +} + +export enum MenuSortField { + /** Sort menus by name. */ + NAME = 'NAME', + /** Sort menus by items count. */ + ITEMS_COUNT = 'ITEMS_COUNT' +} + +export type MenuSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** Sort menus by the selected field. */ + field: MenuSortField; +}; + +/** An enumeration. */ +export enum MetadataErrorCode { + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + NOT_FOUND = 'NOT_FOUND', + REQUIRED = 'REQUIRED' +} + +export type MetadataFilter = { + /** Key of a metadata item. */ + key: Scalars['String']; + /** Value of a metadata item. */ + value?: InputMaybe; +}; + +export type MetadataInput = { + /** Key of a metadata item. */ + key: Scalars['String']; + /** Value of a metadata item. */ + value: Scalars['String']; +}; + +export type MoneyInput = { + /** Currency code. */ + currency: Scalars['String']; + /** Amount of money. */ + amount: Scalars['PositiveDecimal']; +}; + +export type MoveProductInput = { + /** The ID of the product to move. */ + productId: Scalars['ID']; + /** The relative sorting position of the product (from -inf to +inf) starting from the first given product's actual position.1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. */ + sortOrder?: InputMaybe; +}; + +export type NameTranslationInput = { + name?: InputMaybe; +}; + +export enum NavigationType { + /** Main storefront navigation. */ + MAIN = 'MAIN', + /** Secondary storefront navigation. */ + SECONDARY = 'SECONDARY' +} + +export enum OrderAction { + /** Represents the capture action. */ + CAPTURE = 'CAPTURE', + /** Represents a mark-as-paid action. */ + MARK_AS_PAID = 'MARK_AS_PAID', + /** Represents a refund action. */ + REFUND = 'REFUND', + /** Represents a void action. */ + VOID = 'VOID' +} + +export type OrderAddNoteInput = { + /** Note message. */ + message: Scalars['String']; +}; + +export enum OrderDirection { + /** Specifies an ascending sort order. */ + ASC = 'ASC', + /** Specifies a descending sort order. */ + DESC = 'DESC' +} + +export type OrderDiscountCommonInput = { + /** Type of the discount: fixed or percent */ + valueType: DiscountValueTypeEnum; + /** Value of the discount. Can store fixed value or percent value */ + value: Scalars['PositiveDecimal']; + /** Explanation for the applied discount. */ + reason?: InputMaybe; +}; + +/** An enumeration. */ +export enum OrderDiscountType { + VOUCHER = 'VOUCHER', + MANUAL = 'MANUAL' +} + +export type OrderDraftFilterInput = { + customer?: InputMaybe; + created?: InputMaybe; + search?: InputMaybe; + metadata?: InputMaybe>>; + channels?: InputMaybe>>; +}; + +/** An enumeration. */ +export enum OrderErrorCode { + BILLING_ADDRESS_NOT_SET = 'BILLING_ADDRESS_NOT_SET', + CANNOT_CANCEL_FULFILLMENT = 'CANNOT_CANCEL_FULFILLMENT', + CANNOT_CANCEL_ORDER = 'CANNOT_CANCEL_ORDER', + CANNOT_DELETE = 'CANNOT_DELETE', + CANNOT_DISCOUNT = 'CANNOT_DISCOUNT', + CANNOT_REFUND = 'CANNOT_REFUND', + CANNOT_FULFILL_UNPAID_ORDER = 'CANNOT_FULFILL_UNPAID_ORDER', + CAPTURE_INACTIVE_PAYMENT = 'CAPTURE_INACTIVE_PAYMENT', + GIFT_CARD_LINE = 'GIFT_CARD_LINE', + NOT_EDITABLE = 'NOT_EDITABLE', + FULFILL_ORDER_LINE = 'FULFILL_ORDER_LINE', + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + PRODUCT_NOT_PUBLISHED = 'PRODUCT_NOT_PUBLISHED', + PRODUCT_UNAVAILABLE_FOR_PURCHASE = 'PRODUCT_UNAVAILABLE_FOR_PURCHASE', + NOT_FOUND = 'NOT_FOUND', + ORDER_NO_SHIPPING_ADDRESS = 'ORDER_NO_SHIPPING_ADDRESS', + PAYMENT_ERROR = 'PAYMENT_ERROR', + PAYMENT_MISSING = 'PAYMENT_MISSING', + REQUIRED = 'REQUIRED', + SHIPPING_METHOD_NOT_APPLICABLE = 'SHIPPING_METHOD_NOT_APPLICABLE', + SHIPPING_METHOD_REQUIRED = 'SHIPPING_METHOD_REQUIRED', + TAX_ERROR = 'TAX_ERROR', + UNIQUE = 'UNIQUE', + VOID_INACTIVE_PAYMENT = 'VOID_INACTIVE_PAYMENT', + ZERO_QUANTITY = 'ZERO_QUANTITY', + INVALID_QUANTITY = 'INVALID_QUANTITY', + INSUFFICIENT_STOCK = 'INSUFFICIENT_STOCK', + DUPLICATED_INPUT_ITEM = 'DUPLICATED_INPUT_ITEM', + NOT_AVAILABLE_IN_CHANNEL = 'NOT_AVAILABLE_IN_CHANNEL', + CHANNEL_INACTIVE = 'CHANNEL_INACTIVE' +} + +/** An enumeration. */ +export enum OrderEventsEmailsEnum { + PAYMENT_CONFIRMATION = 'PAYMENT_CONFIRMATION', + CONFIRMED = 'CONFIRMED', + SHIPPING_CONFIRMATION = 'SHIPPING_CONFIRMATION', + TRACKING_UPDATED = 'TRACKING_UPDATED', + ORDER_CONFIRMATION = 'ORDER_CONFIRMATION', + ORDER_CANCEL = 'ORDER_CANCEL', + ORDER_REFUND = 'ORDER_REFUND', + FULFILLMENT_CONFIRMATION = 'FULFILLMENT_CONFIRMATION', + DIGITAL_LINKS = 'DIGITAL_LINKS' +} + +/** An enumeration. */ +export enum OrderEventsEnum { + DRAFT_CREATED = 'DRAFT_CREATED', + DRAFT_CREATED_FROM_REPLACE = 'DRAFT_CREATED_FROM_REPLACE', + ADDED_PRODUCTS = 'ADDED_PRODUCTS', + REMOVED_PRODUCTS = 'REMOVED_PRODUCTS', + PLACED = 'PLACED', + PLACED_FROM_DRAFT = 'PLACED_FROM_DRAFT', + OVERSOLD_ITEMS = 'OVERSOLD_ITEMS', + CANCELED = 'CANCELED', + ORDER_MARKED_AS_PAID = 'ORDER_MARKED_AS_PAID', + ORDER_FULLY_PAID = 'ORDER_FULLY_PAID', + ORDER_REPLACEMENT_CREATED = 'ORDER_REPLACEMENT_CREATED', + ORDER_DISCOUNT_ADDED = 'ORDER_DISCOUNT_ADDED', + ORDER_DISCOUNT_AUTOMATICALLY_UPDATED = 'ORDER_DISCOUNT_AUTOMATICALLY_UPDATED', + ORDER_DISCOUNT_UPDATED = 'ORDER_DISCOUNT_UPDATED', + ORDER_DISCOUNT_DELETED = 'ORDER_DISCOUNT_DELETED', + ORDER_LINE_DISCOUNT_UPDATED = 'ORDER_LINE_DISCOUNT_UPDATED', + ORDER_LINE_DISCOUNT_REMOVED = 'ORDER_LINE_DISCOUNT_REMOVED', + ORDER_LINE_PRODUCT_DELETED = 'ORDER_LINE_PRODUCT_DELETED', + ORDER_LINE_VARIANT_DELETED = 'ORDER_LINE_VARIANT_DELETED', + UPDATED_ADDRESS = 'UPDATED_ADDRESS', + EMAIL_SENT = 'EMAIL_SENT', + CONFIRMED = 'CONFIRMED', + PAYMENT_AUTHORIZED = 'PAYMENT_AUTHORIZED', + PAYMENT_CAPTURED = 'PAYMENT_CAPTURED', + EXTERNAL_SERVICE_NOTIFICATION = 'EXTERNAL_SERVICE_NOTIFICATION', + PAYMENT_REFUNDED = 'PAYMENT_REFUNDED', + PAYMENT_VOIDED = 'PAYMENT_VOIDED', + PAYMENT_FAILED = 'PAYMENT_FAILED', + INVOICE_REQUESTED = 'INVOICE_REQUESTED', + INVOICE_GENERATED = 'INVOICE_GENERATED', + INVOICE_UPDATED = 'INVOICE_UPDATED', + INVOICE_SENT = 'INVOICE_SENT', + FULFILLMENT_CANCELED = 'FULFILLMENT_CANCELED', + FULFILLMENT_RESTOCKED_ITEMS = 'FULFILLMENT_RESTOCKED_ITEMS', + FULFILLMENT_FULFILLED_ITEMS = 'FULFILLMENT_FULFILLED_ITEMS', + FULFILLMENT_REFUNDED = 'FULFILLMENT_REFUNDED', + FULFILLMENT_RETURNED = 'FULFILLMENT_RETURNED', + FULFILLMENT_REPLACED = 'FULFILLMENT_REPLACED', + FULFILLMENT_AWAITS_APPROVAL = 'FULFILLMENT_AWAITS_APPROVAL', + TRACKING_UPDATED = 'TRACKING_UPDATED', + NOTE_ADDED = 'NOTE_ADDED', + OTHER = 'OTHER' +} + +export type OrderFilterInput = { + paymentStatus?: InputMaybe>>; + status?: InputMaybe>>; + customer?: InputMaybe; + created?: InputMaybe; + search?: InputMaybe; + metadata?: InputMaybe>>; + channels?: InputMaybe>>; + isClickAndCollect?: InputMaybe; + isPreorder?: InputMaybe; + ids?: InputMaybe>>; + giftCardUsed?: InputMaybe; + giftCardBought?: InputMaybe; +}; + +export type OrderFulfillInput = { + /** List of items informing how to fulfill the order. */ + lines: Array; + /** If true, send an email notification to the customer. */ + notifyCustomer?: InputMaybe; + /** If true, then allow proceed fulfillment when stock is exceeded. */ + allowStockToBeExceeded?: InputMaybe; +}; + +export type OrderFulfillLineInput = { + /** The ID of the order line. */ + orderLineId?: InputMaybe; + /** List of stock items to create. */ + stocks: Array; +}; + +export type OrderFulfillStockInput = { + /** The number of line items to be fulfilled from given warehouse. */ + quantity: Scalars['Int']; + /** ID of the warehouse from which the item will be fulfilled. */ + warehouse: Scalars['ID']; +}; + +export type OrderLineCreateInput = { + /** Number of variant items ordered. */ + quantity: Scalars['Int']; + /** Product variant ID. */ + variantId: Scalars['ID']; +}; + +export type OrderLineInput = { + /** Number of variant items ordered. */ + quantity: Scalars['Int']; +}; + +/** An enumeration. */ +export enum OrderOriginEnum { + CHECKOUT = 'CHECKOUT', + DRAFT = 'DRAFT', + REISSUE = 'REISSUE' +} + +export type OrderRefundFulfillmentLineInput = { + /** The ID of the fulfillment line to refund. */ + fulfillmentLineId: Scalars['ID']; + /** The number of items to be refunded. */ + quantity: Scalars['Int']; +}; + +export type OrderRefundLineInput = { + /** The ID of the order line to refund. */ + orderLineId: Scalars['ID']; + /** The number of items to be refunded. */ + quantity: Scalars['Int']; +}; + +export type OrderRefundProductsInput = { + /** List of unfulfilled lines to refund. */ + orderLines?: InputMaybe>; + /** List of fulfilled lines to refund. */ + fulfillmentLines?: InputMaybe>; + /** The total amount of refund when the value is provided manually. */ + amountToRefund?: InputMaybe; + /** If true, Saleor will refund shipping costs. If amountToRefund is providedincludeShippingCosts will be ignored. */ + includeShippingCosts?: InputMaybe; +}; + +export type OrderReturnFulfillmentLineInput = { + /** The ID of the fulfillment line to return. */ + fulfillmentLineId: Scalars['ID']; + /** The number of items to be returned. */ + quantity: Scalars['Int']; + /** Determines, if the line should be added to replace order. */ + replace?: InputMaybe; +}; + +export type OrderReturnLineInput = { + /** The ID of the order line to return. */ + orderLineId: Scalars['ID']; + /** The number of items to be returned. */ + quantity: Scalars['Int']; + /** Determines, if the line should be added to replace order. */ + replace?: InputMaybe; +}; + +export type OrderReturnProductsInput = { + /** List of unfulfilled lines to return. */ + orderLines?: InputMaybe>; + /** List of fulfilled lines to return. */ + fulfillmentLines?: InputMaybe>; + /** The total amount of refund when the value is provided manually. */ + amountToRefund?: InputMaybe; + /** If true, Saleor will refund shipping costs. If amountToRefund is providedincludeShippingCosts will be ignored. */ + includeShippingCosts?: InputMaybe; + /** If true, Saleor will call refund action for all lines. */ + refund?: InputMaybe; +}; + +/** An enumeration. */ +export enum OrderSettingsErrorCode { + INVALID = 'INVALID' +} + +export type OrderSettingsUpdateInput = { + /** When disabled, all new orders from checkout will be marked as unconfirmed. When enabled orders from checkout will become unfulfilled immediately. */ + automaticallyConfirmAllNewOrders?: InputMaybe; + /** When enabled, all non-shippable gift card orders will be fulfilled automatically. */ + automaticallyFulfillNonShippableGiftCard?: InputMaybe; +}; + +export enum OrderSortField { + /** Sort orders by number. */ + NUMBER = 'NUMBER', + /** Sort orders by creation date. */ + CREATION_DATE = 'CREATION_DATE', + /** Sort orders by customer. */ + CUSTOMER = 'CUSTOMER', + /** Sort orders by payment. */ + PAYMENT = 'PAYMENT', + /** Sort orders by fulfillment status. */ + FULFILLMENT_STATUS = 'FULFILLMENT_STATUS' +} + +export type OrderSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** Sort orders by the selected field. */ + field: OrderSortField; +}; + +/** An enumeration. */ +export enum OrderStatus { + DRAFT = 'DRAFT', + UNCONFIRMED = 'UNCONFIRMED', + UNFULFILLED = 'UNFULFILLED', + PARTIALLY_FULFILLED = 'PARTIALLY_FULFILLED', + PARTIALLY_RETURNED = 'PARTIALLY_RETURNED', + RETURNED = 'RETURNED', + FULFILLED = 'FULFILLED', + CANCELED = 'CANCELED' +} + +export enum OrderStatusFilter { + READY_TO_FULFILL = 'READY_TO_FULFILL', + READY_TO_CAPTURE = 'READY_TO_CAPTURE', + UNFULFILLED = 'UNFULFILLED', + UNCONFIRMED = 'UNCONFIRMED', + PARTIALLY_FULFILLED = 'PARTIALLY_FULFILLED', + FULFILLED = 'FULFILLED', + CANCELED = 'CANCELED' +} + +export type OrderUpdateInput = { + /** Billing address of the customer. */ + billingAddress?: InputMaybe; + /** Email address of the customer. */ + userEmail?: InputMaybe; + /** Shipping address of the customer. */ + shippingAddress?: InputMaybe; +}; + +export type OrderUpdateShippingInput = { + /** ID of the selected shipping method, pass null to remove currently assigned shipping method. */ + shippingMethod?: InputMaybe; +}; + +export type PageCreateInput = { + /** Page internal name. */ + slug?: InputMaybe; + /** Page title. */ + title?: InputMaybe; + /** Page content in JSON format. */ + content?: InputMaybe; + /** List of attributes. */ + attributes?: InputMaybe>; + /** Determines if page is visible in the storefront. */ + isPublished?: InputMaybe; + /** Publication date. ISO 8601 standard. */ + publicationDate?: InputMaybe; + /** Search engine optimization fields. */ + seo?: InputMaybe; + /** ID of the page type that page belongs to. */ + pageType: Scalars['ID']; +}; + +/** An enumeration. */ +export enum PageErrorCode { + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + NOT_FOUND = 'NOT_FOUND', + REQUIRED = 'REQUIRED', + UNIQUE = 'UNIQUE', + DUPLICATED_INPUT_ITEM = 'DUPLICATED_INPUT_ITEM', + ATTRIBUTE_ALREADY_ASSIGNED = 'ATTRIBUTE_ALREADY_ASSIGNED' +} + +export type PageFilterInput = { + search?: InputMaybe; + metadata?: InputMaybe>>; + pageTypes?: InputMaybe>>; + ids?: InputMaybe>>; +}; + +export type PageInput = { + /** Page internal name. */ + slug?: InputMaybe; + /** Page title. */ + title?: InputMaybe; + /** Page content in JSON format. */ + content?: InputMaybe; + /** List of attributes. */ + attributes?: InputMaybe>; + /** Determines if page is visible in the storefront. */ + isPublished?: InputMaybe; + /** Publication date. ISO 8601 standard. */ + publicationDate?: InputMaybe; + /** Search engine optimization fields. */ + seo?: InputMaybe; +}; + +export enum PageSortField { + /** Sort pages by title. */ + TITLE = 'TITLE', + /** Sort pages by slug. */ + SLUG = 'SLUG', + /** Sort pages by visibility. */ + VISIBILITY = 'VISIBILITY', + /** Sort pages by creation date. */ + CREATION_DATE = 'CREATION_DATE', + /** Sort pages by publication date. */ + PUBLICATION_DATE = 'PUBLICATION_DATE' +} + +export type PageSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** Sort pages by the selected field. */ + field: PageSortField; +}; + +export type PageTranslationInput = { + seoTitle?: InputMaybe; + seoDescription?: InputMaybe; + title?: InputMaybe; + content?: InputMaybe; +}; + +export type PageTypeCreateInput = { + /** Name of the page type. */ + name?: InputMaybe; + /** Page type slug. */ + slug?: InputMaybe; + /** List of attribute IDs to be assigned to the page type. */ + addAttributes?: InputMaybe>; +}; + +export type PageTypeFilterInput = { + search?: InputMaybe; +}; + +export enum PageTypeSortField { + /** Sort page types by name. */ + NAME = 'NAME', + /** Sort page types by slug. */ + SLUG = 'SLUG' +} + +export type PageTypeSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** Sort page types by the selected field. */ + field: PageTypeSortField; +}; + +export type PageTypeUpdateInput = { + /** Name of the page type. */ + name?: InputMaybe; + /** Page type slug. */ + slug?: InputMaybe; + /** List of attribute IDs to be assigned to the page type. */ + addAttributes?: InputMaybe>; + /** List of attribute IDs to be assigned to the page type. */ + removeAttributes?: InputMaybe>; +}; + +/** An enumeration. */ +export enum PaymentChargeStatusEnum { + NOT_CHARGED = 'NOT_CHARGED', + PENDING = 'PENDING', + PARTIALLY_CHARGED = 'PARTIALLY_CHARGED', + FULLY_CHARGED = 'FULLY_CHARGED', + PARTIALLY_REFUNDED = 'PARTIALLY_REFUNDED', + FULLY_REFUNDED = 'FULLY_REFUNDED', + REFUSED = 'REFUSED', + CANCELLED = 'CANCELLED' +} + +export type PaymentCheckBalanceInput = { + /** An ID of a payment gateway to check. */ + gatewayId: Scalars['String']; + /** Payment method name. */ + method: Scalars['String']; + /** Slug of a channel for which the data should be returned. */ + channel: Scalars['String']; + /** Information about card. */ + card: CardInput; +}; + +/** An enumeration. */ +export enum PaymentErrorCode { + BILLING_ADDRESS_NOT_SET = 'BILLING_ADDRESS_NOT_SET', + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + NOT_FOUND = 'NOT_FOUND', + REQUIRED = 'REQUIRED', + UNIQUE = 'UNIQUE', + PARTIAL_PAYMENT_NOT_ALLOWED = 'PARTIAL_PAYMENT_NOT_ALLOWED', + SHIPPING_ADDRESS_NOT_SET = 'SHIPPING_ADDRESS_NOT_SET', + INVALID_SHIPPING_METHOD = 'INVALID_SHIPPING_METHOD', + SHIPPING_METHOD_NOT_SET = 'SHIPPING_METHOD_NOT_SET', + PAYMENT_ERROR = 'PAYMENT_ERROR', + NOT_SUPPORTED_GATEWAY = 'NOT_SUPPORTED_GATEWAY', + CHANNEL_INACTIVE = 'CHANNEL_INACTIVE', + BALANCE_CHECK_ERROR = 'BALANCE_CHECK_ERROR', + CHECKOUT_EMAIL_NOT_SET = 'CHECKOUT_EMAIL_NOT_SET', + UNAVAILABLE_VARIANT_IN_CHANNEL = 'UNAVAILABLE_VARIANT_IN_CHANNEL', + NO_CHECKOUT_LINES = 'NO_CHECKOUT_LINES' +} + +export type PaymentFilterInput = { + checkouts?: InputMaybe>>; +}; + +export type PaymentInput = { + /** A gateway to use with that payment. */ + gateway: Scalars['String']; + /** Client-side generated payment token, representing customer's billing data in a secure manner. */ + token?: InputMaybe; + /** Total amount of the transaction, including all taxes and discounts. If no amount is provided, the checkout total will be used. */ + amount?: InputMaybe; + /** URL of a storefront view where user should be redirected after requiring additional actions. Payment with additional actions will not be finished if this field is not provided. */ + returnUrl?: InputMaybe; + /** New in Saleor 3.1. Payment store type. */ + storePaymentMethod?: InputMaybe; + /** New in Saleor 3.1. User public metadata. */ + metadata?: InputMaybe>; +}; + +/** An enumeration. */ +export enum PermissionEnum { + MANAGE_USERS = 'MANAGE_USERS', + MANAGE_STAFF = 'MANAGE_STAFF', + IMPERSONATE_USER = 'IMPERSONATE_USER', + MANAGE_APPS = 'MANAGE_APPS', + MANAGE_CHANNELS = 'MANAGE_CHANNELS', + MANAGE_DISCOUNTS = 'MANAGE_DISCOUNTS', + MANAGE_PLUGINS = 'MANAGE_PLUGINS', + MANAGE_GIFT_CARD = 'MANAGE_GIFT_CARD', + MANAGE_MENUS = 'MANAGE_MENUS', + MANAGE_ORDERS = 'MANAGE_ORDERS', + MANAGE_PAGES = 'MANAGE_PAGES', + MANAGE_PAGE_TYPES_AND_ATTRIBUTES = 'MANAGE_PAGE_TYPES_AND_ATTRIBUTES', + HANDLE_PAYMENTS = 'HANDLE_PAYMENTS', + MANAGE_PRODUCTS = 'MANAGE_PRODUCTS', + MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES = 'MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES', + MANAGE_SHIPPING = 'MANAGE_SHIPPING', + MANAGE_SETTINGS = 'MANAGE_SETTINGS', + MANAGE_TRANSLATIONS = 'MANAGE_TRANSLATIONS', + MANAGE_CHECKOUTS = 'MANAGE_CHECKOUTS' +} + +export type PermissionGroupCreateInput = { + /** List of permission code names to assign to this group. */ + addPermissions?: InputMaybe>; + /** List of users to assign to this group. */ + addUsers?: InputMaybe>; + /** Group name. */ + name: Scalars['String']; +}; + +/** An enumeration. */ +export enum PermissionGroupErrorCode { + ASSIGN_NON_STAFF_MEMBER = 'ASSIGN_NON_STAFF_MEMBER', + DUPLICATED_INPUT_ITEM = 'DUPLICATED_INPUT_ITEM', + CANNOT_REMOVE_FROM_LAST_GROUP = 'CANNOT_REMOVE_FROM_LAST_GROUP', + LEFT_NOT_MANAGEABLE_PERMISSION = 'LEFT_NOT_MANAGEABLE_PERMISSION', + OUT_OF_SCOPE_PERMISSION = 'OUT_OF_SCOPE_PERMISSION', + OUT_OF_SCOPE_USER = 'OUT_OF_SCOPE_USER', + REQUIRED = 'REQUIRED', + UNIQUE = 'UNIQUE' +} + +export type PermissionGroupFilterInput = { + search?: InputMaybe; + ids?: InputMaybe>>; +}; + +export enum PermissionGroupSortField { + /** Sort permission group accounts by name. */ + NAME = 'NAME' +} + +export type PermissionGroupSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** Sort permission group by the selected field. */ + field: PermissionGroupSortField; +}; + +export type PermissionGroupUpdateInput = { + /** List of permission code names to assign to this group. */ + addPermissions?: InputMaybe>; + /** List of users to assign to this group. */ + addUsers?: InputMaybe>; + /** Group name. */ + name?: InputMaybe; + /** List of permission code names to unassign from this group. */ + removePermissions?: InputMaybe>; + /** List of users to unassign from this group. */ + removeUsers?: InputMaybe>; +}; + +export enum PluginConfigurationType { + PER_CHANNEL = 'PER_CHANNEL', + GLOBAL = 'GLOBAL' +} + +/** An enumeration. */ +export enum PluginErrorCode { + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + PLUGIN_MISCONFIGURED = 'PLUGIN_MISCONFIGURED', + NOT_FOUND = 'NOT_FOUND', + REQUIRED = 'REQUIRED', + UNIQUE = 'UNIQUE' +} + +export type PluginFilterInput = { + statusInChannels?: InputMaybe; + search?: InputMaybe; + type?: InputMaybe; +}; + +export enum PluginSortField { + NAME = 'NAME', + IS_ACTIVE = 'IS_ACTIVE' +} + +export type PluginSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** Sort plugins by the selected field. */ + field: PluginSortField; +}; + +export type PluginStatusInChannelsInput = { + active: Scalars['Boolean']; + channels: Array; +}; + +export type PluginUpdateInput = { + /** Indicates whether the plugin should be enabled. */ + active?: InputMaybe; + /** Configuration of the plugin. */ + configuration?: InputMaybe>>; +}; + +/** An enumeration. */ +export enum PostalCodeRuleInclusionTypeEnum { + INCLUDE = 'INCLUDE', + EXCLUDE = 'EXCLUDE' +} + +export type PreorderSettingsInput = { + /** The global threshold for preorder variant. */ + globalThreshold?: InputMaybe; + /** The end date for preorder. */ + endDate?: InputMaybe; +}; + +export type PriceInput = { + /** Currency code. */ + currency: Scalars['String']; + /** Amount of money. */ + amount: Scalars['PositiveDecimal']; +}; + +export type PriceRangeInput = { + /** Price greater than or equal to. */ + gte?: InputMaybe; + /** Price less than or equal to. */ + lte?: InputMaybe; +}; + +export type ProductAttributeAssignInput = { + /** The ID of the attribute to assign. */ + id: Scalars['ID']; + /** The attribute type to be assigned as. */ + type: ProductAttributeType; + /** New in Saleor 3.1. Whether attribute is allowed in variant selection. Allowed types are: ['dropdown', 'boolean', 'swatch', 'numeric']. */ + variantSelection?: InputMaybe; +}; + +export type ProductAttributeAssignmentUpdateInput = { + /** The ID of the attribute to assign. */ + id: Scalars['ID']; + /** New in Saleor 3.1. Whether attribute is allowed in variant selection. Allowed types are: ['dropdown', 'boolean', 'swatch', 'numeric']. */ + variantSelection: Scalars['Boolean']; +}; + +export enum ProductAttributeType { + PRODUCT = 'PRODUCT', + VARIANT = 'VARIANT' +} + +export type ProductChannelListingAddInput = { + /** ID of a channel. */ + channelId: Scalars['ID']; + /** Determines if object is visible to customers. */ + isPublished?: InputMaybe; + /** Publication date. ISO 8601 standard. */ + publicationDate?: InputMaybe; + /** Determines if product is visible in product listings (doesn't apply to product collections). */ + visibleInListings?: InputMaybe; + /** Determine if product should be available for purchase. */ + isAvailableForPurchase?: InputMaybe; + /** A start date from which a product will be available for purchase. When not set and isAvailable is set to True, the current day is assumed. */ + availableForPurchaseDate?: InputMaybe; + /** List of variants to which the channel should be assigned. */ + addVariants?: InputMaybe>; + /** List of variants from which the channel should be unassigned. */ + removeVariants?: InputMaybe>; +}; + +export type ProductChannelListingUpdateInput = { + /** List of channels to which the product should be assigned or updated. */ + updateChannels?: InputMaybe>; + /** List of channels from which the product should be unassigned. */ + removeChannels?: InputMaybe>; +}; + +export type ProductCreateInput = { + /** List of attributes. */ + attributes?: InputMaybe>; + /** ID of the product's category. */ + category?: InputMaybe; + /** Determine if taxes are being charged for the product. */ + chargeTaxes?: InputMaybe; + /** List of IDs of collections that the product belongs to. */ + collections?: InputMaybe>; + /** Product description (JSON). */ + description?: InputMaybe; + /** Product name. */ + name?: InputMaybe; + /** Product slug. */ + slug?: InputMaybe; + /** Tax rate for enabled tax gateway. */ + taxCode?: InputMaybe; + /** Search engine optimization fields. */ + seo?: InputMaybe; + /** Weight of the Product. */ + weight?: InputMaybe; + /** Defines the product rating value. */ + rating?: InputMaybe; + /** ID of the type that product belongs to. */ + productType: Scalars['ID']; +}; + +/** An enumeration. */ +export enum ProductErrorCode { + ALREADY_EXISTS = 'ALREADY_EXISTS', + ATTRIBUTE_ALREADY_ASSIGNED = 'ATTRIBUTE_ALREADY_ASSIGNED', + ATTRIBUTE_CANNOT_BE_ASSIGNED = 'ATTRIBUTE_CANNOT_BE_ASSIGNED', + ATTRIBUTE_VARIANTS_DISABLED = 'ATTRIBUTE_VARIANTS_DISABLED', + DUPLICATED_INPUT_ITEM = 'DUPLICATED_INPUT_ITEM', + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + PRODUCT_WITHOUT_CATEGORY = 'PRODUCT_WITHOUT_CATEGORY', + NOT_PRODUCTS_IMAGE = 'NOT_PRODUCTS_IMAGE', + NOT_PRODUCTS_VARIANT = 'NOT_PRODUCTS_VARIANT', + NOT_FOUND = 'NOT_FOUND', + REQUIRED = 'REQUIRED', + UNIQUE = 'UNIQUE', + VARIANT_NO_DIGITAL_CONTENT = 'VARIANT_NO_DIGITAL_CONTENT', + CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT = 'CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT', + PRODUCT_NOT_ASSIGNED_TO_CHANNEL = 'PRODUCT_NOT_ASSIGNED_TO_CHANNEL', + UNSUPPORTED_MEDIA_PROVIDER = 'UNSUPPORTED_MEDIA_PROVIDER', + PREORDER_VARIANT_CANNOT_BE_DEACTIVATED = 'PREORDER_VARIANT_CANNOT_BE_DEACTIVATED' +} + +export enum ProductFieldEnum { + NAME = 'NAME', + DESCRIPTION = 'DESCRIPTION', + PRODUCT_TYPE = 'PRODUCT_TYPE', + CATEGORY = 'CATEGORY', + PRODUCT_WEIGHT = 'PRODUCT_WEIGHT', + COLLECTIONS = 'COLLECTIONS', + CHARGE_TAXES = 'CHARGE_TAXES', + PRODUCT_MEDIA = 'PRODUCT_MEDIA', + VARIANT_ID = 'VARIANT_ID', + VARIANT_SKU = 'VARIANT_SKU', + VARIANT_WEIGHT = 'VARIANT_WEIGHT', + VARIANT_MEDIA = 'VARIANT_MEDIA' +} + +export type ProductFilterInput = { + isPublished?: InputMaybe; + collections?: InputMaybe>>; + categories?: InputMaybe>>; + hasCategory?: InputMaybe; + attributes?: InputMaybe>>; + stockAvailability?: InputMaybe; + stocks?: InputMaybe; + search?: InputMaybe; + metadata?: InputMaybe>>; + price?: InputMaybe; + minimalPrice?: InputMaybe; + productTypes?: InputMaybe>>; + giftCard?: InputMaybe; + ids?: InputMaybe>>; + hasPreorderedVariants?: InputMaybe; + /** + * Specifies the channel by which the data should be filtered. + * + * DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead. + */ + channel?: InputMaybe; +}; + +export type ProductInput = { + /** List of attributes. */ + attributes?: InputMaybe>; + /** ID of the product's category. */ + category?: InputMaybe; + /** Determine if taxes are being charged for the product. */ + chargeTaxes?: InputMaybe; + /** List of IDs of collections that the product belongs to. */ + collections?: InputMaybe>; + /** Product description (JSON). */ + description?: InputMaybe; + /** Product name. */ + name?: InputMaybe; + /** Product slug. */ + slug?: InputMaybe; + /** Tax rate for enabled tax gateway. */ + taxCode?: InputMaybe; + /** Search engine optimization fields. */ + seo?: InputMaybe; + /** Weight of the Product. */ + weight?: InputMaybe; + /** Defines the product rating value. */ + rating?: InputMaybe; +}; + +export type ProductMediaCreateInput = { + /** Alt text for a product media. */ + alt?: InputMaybe; + /** Represents an image file in a multipart request. */ + image?: InputMaybe; + /** ID of an product. */ + product: Scalars['ID']; + /** Represents an URL to an external media. */ + mediaUrl?: InputMaybe; +}; + +/** An enumeration. */ +export enum ProductMediaType { + IMAGE = 'IMAGE', + VIDEO = 'VIDEO' +} + +export type ProductMediaUpdateInput = { + /** Alt text for a product media. */ + alt?: InputMaybe; +}; + +export type ProductOrder = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** + * Specifies the channel in which to sort the data. + * + * DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead. + */ + channel?: InputMaybe; + /** + * Sort product by the selected attribute's values. + * Note: this doesn't take translations into account yet. + */ + attributeId?: InputMaybe; + /** Sort products by the selected field. */ + field?: InputMaybe; +}; + +export enum ProductOrderField { + /** Sort products by name. */ + NAME = 'NAME', + /** Sort products by name. */ + RANK = 'RANK', + /** Sort products by price. */ + PRICE = 'PRICE', + /** Sort products by a minimal price of a product's variant. */ + MINIMAL_PRICE = 'MINIMAL_PRICE', + /** Sort products by update date. */ + DATE = 'DATE', + /** Sort products by type. */ + TYPE = 'TYPE', + /** Sort products by publication status. */ + PUBLISHED = 'PUBLISHED', + /** Sort products by publication date. */ + PUBLICATION_DATE = 'PUBLICATION_DATE', + /** Sort products by collection. Note: This option is available only for the `Collection.products` query. */ + COLLECTION = 'COLLECTION', + /** Sort products by rating. */ + RATING = 'RATING' +} + +export type ProductStockFilterInput = { + warehouseIds?: InputMaybe>; + quantity?: InputMaybe; +}; + +export enum ProductTypeConfigurable { + CONFIGURABLE = 'CONFIGURABLE', + SIMPLE = 'SIMPLE' +} + +export enum ProductTypeEnum { + DIGITAL = 'DIGITAL', + SHIPPABLE = 'SHIPPABLE' +} + +export type ProductTypeFilterInput = { + search?: InputMaybe; + configurable?: InputMaybe; + productType?: InputMaybe; + metadata?: InputMaybe>>; + kind?: InputMaybe; + ids?: InputMaybe>>; +}; + +export type ProductTypeInput = { + /** Name of the product type. */ + name?: InputMaybe; + /** Product type slug. */ + slug?: InputMaybe; + /** The product type kind. */ + kind?: InputMaybe; + /** Determines if product of this type has multiple variants. This option mainly simplifies product management in the dashboard. There is always at least one variant created under the hood. */ + hasVariants?: InputMaybe; + /** List of attributes shared among all product variants. */ + productAttributes?: InputMaybe>>; + /** List of attributes used to distinguish between different variants of a product. */ + variantAttributes?: InputMaybe>>; + /** Determines if shipping is required for products of this variant. */ + isShippingRequired?: InputMaybe; + /** Determines if products are digital. */ + isDigital?: InputMaybe; + /** Weight of the ProductType items. */ + weight?: InputMaybe; + /** Tax rate for enabled tax gateway. */ + taxCode?: InputMaybe; +}; + +/** An enumeration. */ +export enum ProductTypeKindEnum { + NORMAL = 'NORMAL', + GIFT_CARD = 'GIFT_CARD' +} + +export enum ProductTypeSortField { + /** Sort products by name. */ + NAME = 'NAME', + /** Sort products by type. */ + DIGITAL = 'DIGITAL', + /** Sort products by shipping. */ + SHIPPING_REQUIRED = 'SHIPPING_REQUIRED' +} + +export type ProductTypeSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** Sort product types by the selected field. */ + field: ProductTypeSortField; +}; + +export type ProductVariantBulkCreateInput = { + /** List of attributes specific to this variant. */ + attributes: Array; + /** Stock keeping unit. */ + sku?: InputMaybe; + /** Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. */ + trackInventory?: InputMaybe; + /** Weight of the Product Variant. */ + weight?: InputMaybe; + /** New in Saleor 3.1. Determines if variant is in preorder. */ + preorder?: InputMaybe; + /** New in Saleor 3.1. Determines maximum quantity of `ProductVariant`,that can be bought in a single checkout. */ + quantityLimitPerCustomer?: InputMaybe; + /** Stocks of a product available for sale. */ + stocks?: InputMaybe>; + /** List of prices assigned to channels. */ + channelListings?: InputMaybe>; +}; + +export type ProductVariantChannelListingAddInput = { + /** ID of a channel. */ + channelId: Scalars['ID']; + /** Price of the particular variant in channel. */ + price: Scalars['PositiveDecimal']; + /** Cost price of the variant in channel. */ + costPrice?: InputMaybe; + /** New in Saleor 3.1. The threshold for preorder variant in channel. */ + preorderThreshold?: InputMaybe; +}; + +export type ProductVariantCreateInput = { + /** List of attributes specific to this variant. */ + attributes: Array; + /** Stock keeping unit. */ + sku?: InputMaybe; + /** Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. */ + trackInventory?: InputMaybe; + /** Weight of the Product Variant. */ + weight?: InputMaybe; + /** New in Saleor 3.1. Determines if variant is in preorder. */ + preorder?: InputMaybe; + /** New in Saleor 3.1. Determines maximum quantity of `ProductVariant`,that can be bought in a single checkout. */ + quantityLimitPerCustomer?: InputMaybe; + /** Product ID of which type is the variant. */ + product: Scalars['ID']; + /** Stocks of a product available for sale. */ + stocks?: InputMaybe>; +}; + +export type ProductVariantFilterInput = { + search?: InputMaybe; + sku?: InputMaybe>>; + metadata?: InputMaybe>>; + isPreorder?: InputMaybe; +}; + +export type ProductVariantInput = { + /** List of attributes specific to this variant. */ + attributes?: InputMaybe>; + /** Stock keeping unit. */ + sku?: InputMaybe; + /** Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. */ + trackInventory?: InputMaybe; + /** Weight of the Product Variant. */ + weight?: InputMaybe; + /** New in Saleor 3.1. Determines if variant is in preorder. */ + preorder?: InputMaybe; + /** New in Saleor 3.1. Determines maximum quantity of `ProductVariant`,that can be bought in a single checkout. */ + quantityLimitPerCustomer?: InputMaybe; +}; + +export type PublishableChannelListingInput = { + /** ID of a channel. */ + channelId: Scalars['ID']; + /** Determines if object is visible to customers. */ + isPublished?: InputMaybe; + /** Publication date. ISO 8601 standard. */ + publicationDate?: InputMaybe; +}; + +export type ReorderInput = { + /** The ID of the item to move. */ + id: Scalars['ID']; + /** The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. */ + sortOrder?: InputMaybe; +}; + +export enum ReportingPeriod { + TODAY = 'TODAY', + THIS_MONTH = 'THIS_MONTH' +} + +export type SaleChannelListingAddInput = { + /** ID of a channel. */ + channelId: Scalars['ID']; + /** The value of the discount. */ + discountValue: Scalars['PositiveDecimal']; +}; + +export type SaleChannelListingInput = { + /** List of channels to which the sale should be assigned. */ + addChannels?: InputMaybe>; + /** List of channels from which the sale should be unassigned. */ + removeChannels?: InputMaybe>; +}; + +export type SaleFilterInput = { + status?: InputMaybe>>; + saleType?: InputMaybe; + started?: InputMaybe; + search?: InputMaybe; + metadata?: InputMaybe>>; +}; + +export type SaleInput = { + /** Voucher name. */ + name?: InputMaybe; + /** Fixed or percentage. */ + type?: InputMaybe; + /** Value of the voucher. */ + value?: InputMaybe; + /** Products related to the discount. */ + products?: InputMaybe>>; + variants?: InputMaybe>>; + /** Categories related to the discount. */ + categories?: InputMaybe>>; + /** Collections related to the discount. */ + collections?: InputMaybe>>; + /** Start date of the voucher in ISO 8601 format. */ + startDate?: InputMaybe; + /** End date of the voucher in ISO 8601 format. */ + endDate?: InputMaybe; +}; + +export enum SaleSortField { + /** Sort sales by name. */ + NAME = 'NAME', + /** Sort sales by start date. */ + START_DATE = 'START_DATE', + /** Sort sales by end date. */ + END_DATE = 'END_DATE', + /** Sort sales by value. */ + VALUE = 'VALUE', + /** Sort sales by type. */ + TYPE = 'TYPE' +} + +export type SaleSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** + * Specifies the channel in which to sort the data. + * + * DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead. + */ + channel?: InputMaybe; + /** Sort sales by the selected field. */ + field: SaleSortField; +}; + +export enum SaleType { + FIXED = 'FIXED', + PERCENTAGE = 'PERCENTAGE' +} + +export type SeoInput = { + /** SEO title. */ + title?: InputMaybe; + /** SEO description. */ + description?: InputMaybe; +}; + +/** An enumeration. */ +export enum ShippingErrorCode { + ALREADY_EXISTS = 'ALREADY_EXISTS', + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + MAX_LESS_THAN_MIN = 'MAX_LESS_THAN_MIN', + NOT_FOUND = 'NOT_FOUND', + REQUIRED = 'REQUIRED', + UNIQUE = 'UNIQUE', + DUPLICATED_INPUT_ITEM = 'DUPLICATED_INPUT_ITEM' +} + +export type ShippingMethodChannelListingAddInput = { + /** ID of a channel. */ + channelId: Scalars['ID']; + /** Shipping price of the shipping method in this channel. */ + price?: InputMaybe; + /** Minimum order price to use this shipping method. */ + minimumOrderPrice?: InputMaybe; + /** Maximum order price to use this shipping method. */ + maximumOrderPrice?: InputMaybe; +}; + +export type ShippingMethodChannelListingInput = { + /** List of channels to which the shipping method should be assigned. */ + addChannels?: InputMaybe>; + /** List of channels from which the shipping method should be unassigned. */ + removeChannels?: InputMaybe>; +}; + +/** An enumeration. */ +export enum ShippingMethodTypeEnum { + PRICE = 'PRICE', + WEIGHT = 'WEIGHT' +} + +export type ShippingPostalCodeRulesCreateInputRange = { + /** Start range of the postal code. */ + start: Scalars['String']; + /** End range of the postal code. */ + end?: InputMaybe; +}; + +export type ShippingPriceExcludeProductsInput = { + /** List of products which will be excluded. */ + products: Array>; +}; + +export type ShippingPriceInput = { + /** Name of the shipping method. */ + name?: InputMaybe; + /** Shipping method description. */ + description?: InputMaybe; + /** Minimum order weight to use this shipping method. */ + minimumOrderWeight?: InputMaybe; + /** Maximum order weight to use this shipping method. */ + maximumOrderWeight?: InputMaybe; + /** Maximum number of days for delivery. */ + maximumDeliveryDays?: InputMaybe; + /** Minimal number of days for delivery. */ + minimumDeliveryDays?: InputMaybe; + /** Shipping type: price or weight based. */ + type?: InputMaybe; + /** Shipping zone this method belongs to. */ + shippingZone?: InputMaybe; + /** Postal code rules to add. */ + addPostalCodeRules?: InputMaybe>; + /** Postal code rules to delete. */ + deletePostalCodeRules?: InputMaybe>; + /** Inclusion type for currently assigned postal code rules. */ + inclusionType?: InputMaybe; +}; + +export type ShippingPriceTranslationInput = { + name?: InputMaybe; + /** Translated shipping method description (JSON). */ + description?: InputMaybe; +}; + +export type ShippingZoneCreateInput = { + /** Shipping zone's name. Visible only to the staff. */ + name?: InputMaybe; + /** Description of the shipping zone. */ + description?: InputMaybe; + /** List of countries in this shipping zone. */ + countries?: InputMaybe>>; + /** Default shipping zone will be used for countries not covered by other zones. */ + default?: InputMaybe; + /** List of warehouses to assign to a shipping zone */ + addWarehouses?: InputMaybe>>; + /** List of channels to assign to the shipping zone. */ + addChannels?: InputMaybe>; +}; + +export type ShippingZoneFilterInput = { + search?: InputMaybe; + channels?: InputMaybe>>; +}; + +export type ShippingZoneUpdateInput = { + /** Shipping zone's name. Visible only to the staff. */ + name?: InputMaybe; + /** Description of the shipping zone. */ + description?: InputMaybe; + /** List of countries in this shipping zone. */ + countries?: InputMaybe>>; + /** Default shipping zone will be used for countries not covered by other zones. */ + default?: InputMaybe; + /** List of warehouses to assign to a shipping zone */ + addWarehouses?: InputMaybe>>; + /** List of channels to assign to the shipping zone. */ + addChannels?: InputMaybe>; + /** List of warehouses to unassign from a shipping zone */ + removeWarehouses?: InputMaybe>>; + /** List of channels to unassign from the shipping zone. */ + removeChannels?: InputMaybe>; +}; + +/** An enumeration. */ +export enum ShopErrorCode { + ALREADY_EXISTS = 'ALREADY_EXISTS', + CANNOT_FETCH_TAX_RATES = 'CANNOT_FETCH_TAX_RATES', + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + NOT_FOUND = 'NOT_FOUND', + REQUIRED = 'REQUIRED', + UNIQUE = 'UNIQUE' +} + +export type ShopSettingsInput = { + /** Header text. */ + headerText?: InputMaybe; + /** SEO description. */ + description?: InputMaybe; + /** Include taxes in prices. */ + includeTaxesInPrices?: InputMaybe; + /** Display prices with tax in store. */ + displayGrossPrices?: InputMaybe; + /** Charge taxes on shipping. */ + chargeTaxesOnShipping?: InputMaybe; + /** Enable inventory tracking. */ + trackInventoryByDefault?: InputMaybe; + /** Default weight unit. */ + defaultWeightUnit?: InputMaybe; + /** Enable automatic fulfillment for all digital products. */ + automaticFulfillmentDigitalProducts?: InputMaybe; + /** New in Saleor 3.1. Enable automatic approval of all new fulfillments. */ + fulfillmentAutoApprove?: InputMaybe; + /** New in Saleor 3.1. Enable ability to approve fulfillments which are unpaid. */ + fulfillmentAllowUnpaid?: InputMaybe; + /** Default number of max downloads per digital content URL. */ + defaultDigitalMaxDownloads?: InputMaybe; + /** Default number of days which digital content URL will be valid. */ + defaultDigitalUrlValidDays?: InputMaybe; + /** Default email sender's name. */ + defaultMailSenderName?: InputMaybe; + /** Default email sender's address. */ + defaultMailSenderAddress?: InputMaybe; + /** URL of a view where customers can set their password. */ + customerSetPasswordUrl?: InputMaybe; + /** New in Saleor 3.1. Default number of minutes stock will be reserved for anonymous checkout. Enter 0 or null to disable. */ + reserveStockDurationAnonymousUser?: InputMaybe; + /** New in Saleor 3.1. Default number of minutes stock will be reserved for authenticated checkout. Enter 0 or null to disable. */ + reserveStockDurationAuthenticatedUser?: InputMaybe; + /** New in Saleor 3.1. Default number of maximum line quantity in single checkout. Minimum possible value is 1, default value is 50. */ + limitQuantityPerCheckout?: InputMaybe; +}; + +export type ShopSettingsTranslationInput = { + headerText?: InputMaybe; + description?: InputMaybe; +}; + +export type SiteDomainInput = { + /** Domain name for shop. */ + domain?: InputMaybe; + /** Shop site name. */ + name?: InputMaybe; +}; + +export type StaffCreateInput = { + /** Given name. */ + firstName?: InputMaybe; + /** Family name. */ + lastName?: InputMaybe; + /** The unique email address of the user. */ + email?: InputMaybe; + /** User account is active. */ + isActive?: InputMaybe; + /** A note about the user. */ + note?: InputMaybe; + /** List of permission group IDs to which user should be assigned. */ + addGroups?: InputMaybe>; + /** URL of a view where users should be redirected to set the password. URL in RFC 1808 format. */ + redirectUrl?: InputMaybe; +}; + +export enum StaffMemberStatus { + /** User account has been activated. */ + ACTIVE = 'ACTIVE', + /** User account has not been activated yet. */ + DEACTIVATED = 'DEACTIVATED' +} + +export type StaffNotificationRecipientInput = { + /** The ID of the user subscribed to email notifications.. */ + user?: InputMaybe; + /** Email address of a user subscribed to email notifications. */ + email?: InputMaybe; + /** Determines if a notification active. */ + active?: InputMaybe; +}; + +export type StaffUpdateInput = { + /** Given name. */ + firstName?: InputMaybe; + /** Family name. */ + lastName?: InputMaybe; + /** The unique email address of the user. */ + email?: InputMaybe; + /** User account is active. */ + isActive?: InputMaybe; + /** A note about the user. */ + note?: InputMaybe; + /** List of permission group IDs to which user should be assigned. */ + addGroups?: InputMaybe>; + /** List of permission group IDs from which user should be unassigned. */ + removeGroups?: InputMaybe>; +}; + +export type StaffUserInput = { + status?: InputMaybe; + search?: InputMaybe; + ids?: InputMaybe>>; +}; + +export enum StockAvailability { + IN_STOCK = 'IN_STOCK', + OUT_OF_STOCK = 'OUT_OF_STOCK' +} + +/** An enumeration. */ +export enum StockErrorCode { + ALREADY_EXISTS = 'ALREADY_EXISTS', + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + NOT_FOUND = 'NOT_FOUND', + REQUIRED = 'REQUIRED', + UNIQUE = 'UNIQUE' +} + +export type StockFilterInput = { + quantity?: InputMaybe; + search?: InputMaybe; +}; + +export type StockInput = { + /** Warehouse in which stock is located. */ + warehouse: Scalars['ID']; + /** Quantity of items available for sell. */ + quantity: Scalars['Int']; +}; + +/** Enum representing the type of a payment storage in a gateway. */ +export enum StorePaymentMethodEnum { + /** On session storage type. The payment is stored only to be reused when the customer is present in the checkout flow. */ + ON_SESSION = 'ON_SESSION', + /** Off session storage type. The payment is stored to be reused even if the customer is absent. */ + OFF_SESSION = 'OFF_SESSION', + /** Storage is disabled. The payment is not stored. */ + NONE = 'NONE' +} + +export type TimePeriodInputType = { + /** The length of the period. */ + amount: Scalars['Int']; + /** The type of the period. */ + type: TimePeriodTypeEnum; +}; + +/** An enumeration. */ +export enum TimePeriodTypeEnum { + DAY = 'DAY', + WEEK = 'WEEK', + MONTH = 'MONTH', + YEAR = 'YEAR' +} + +/** An enumeration. */ +export enum TransactionKind { + EXTERNAL = 'EXTERNAL', + AUTH = 'AUTH', + PENDING = 'PENDING', + ACTION_TO_CONFIRM = 'ACTION_TO_CONFIRM', + REFUND = 'REFUND', + REFUND_ONGOING = 'REFUND_ONGOING', + CAPTURE = 'CAPTURE', + VOID = 'VOID', + CONFIRM = 'CONFIRM', + CANCEL = 'CANCEL' +} + +export enum TranslatableKinds { + ATTRIBUTE = 'ATTRIBUTE', + ATTRIBUTE_VALUE = 'ATTRIBUTE_VALUE', + CATEGORY = 'CATEGORY', + COLLECTION = 'COLLECTION', + MENU_ITEM = 'MENU_ITEM', + PAGE = 'PAGE', + PRODUCT = 'PRODUCT', + SALE = 'SALE', + SHIPPING_METHOD = 'SHIPPING_METHOD', + VARIANT = 'VARIANT', + VOUCHER = 'VOUCHER' +} + +/** An enumeration. */ +export enum TranslationErrorCode { + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + NOT_FOUND = 'NOT_FOUND', + REQUIRED = 'REQUIRED' +} + +export type TranslationInput = { + seoTitle?: InputMaybe; + seoDescription?: InputMaybe; + name?: InputMaybe; + description?: InputMaybe; +}; + +export type UpdateInvoiceInput = { + /** Invoice number */ + number?: InputMaybe; + /** URL of an invoice to download. */ + url?: InputMaybe; +}; + +/** An enumeration. */ +export enum UploadErrorCode { + GRAPHQL_ERROR = 'GRAPHQL_ERROR' +} + +export type UserCreateInput = { + /** Billing address of the customer. */ + defaultBillingAddress?: InputMaybe; + /** Shipping address of the customer. */ + defaultShippingAddress?: InputMaybe; + /** Given name. */ + firstName?: InputMaybe; + /** Family name. */ + lastName?: InputMaybe; + /** The unique email address of the user. */ + email?: InputMaybe; + /** User account is active. */ + isActive?: InputMaybe; + /** A note about the user. */ + note?: InputMaybe; + /** User language code. */ + languageCode?: InputMaybe; + /** URL of a view where users should be redirected to set the password. URL in RFC 1808 format. */ + redirectUrl?: InputMaybe; + /** Slug of a channel which will be used for notify user. Optional when only one channel exists. */ + channel?: InputMaybe; +}; + +export enum UserSortField { + /** Sort users by first name. */ + FIRST_NAME = 'FIRST_NAME', + /** Sort users by last name. */ + LAST_NAME = 'LAST_NAME', + /** Sort users by email. */ + EMAIL = 'EMAIL', + /** Sort users by order count. */ + ORDER_COUNT = 'ORDER_COUNT' +} + +export type UserSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** Sort users by the selected field. */ + field: UserSortField; +}; + +export enum VariantAttributeScope { + ALL = 'ALL', + VARIANT_SELECTION = 'VARIANT_SELECTION', + NOT_VARIANT_SELECTION = 'NOT_VARIANT_SELECTION' +} + +/** An enumeration. */ +export enum VolumeUnitsEnum { + CUBIC_MILLIMETER = 'CUBIC_MILLIMETER', + CUBIC_CENTIMETER = 'CUBIC_CENTIMETER', + CUBIC_DECIMETER = 'CUBIC_DECIMETER', + CUBIC_METER = 'CUBIC_METER', + LITER = 'LITER', + CUBIC_FOOT = 'CUBIC_FOOT', + CUBIC_INCH = 'CUBIC_INCH', + CUBIC_YARD = 'CUBIC_YARD', + QT = 'QT', + PINT = 'PINT', + FL_OZ = 'FL_OZ', + ACRE_IN = 'ACRE_IN', + ACRE_FT = 'ACRE_FT' +} + +export type VoucherChannelListingAddInput = { + /** ID of a channel. */ + channelId: Scalars['ID']; + /** Value of the voucher. */ + discountValue?: InputMaybe; + /** Min purchase amount required to apply the voucher. */ + minAmountSpent?: InputMaybe; +}; + +export type VoucherChannelListingInput = { + /** List of channels to which the voucher should be assigned. */ + addChannels?: InputMaybe>; + /** List of channels from which the voucher should be unassigned. */ + removeChannels?: InputMaybe>; +}; + +export enum VoucherDiscountType { + FIXED = 'FIXED', + PERCENTAGE = 'PERCENTAGE', + SHIPPING = 'SHIPPING' +} + +export type VoucherFilterInput = { + status?: InputMaybe>>; + timesUsed?: InputMaybe; + discountType?: InputMaybe>>; + started?: InputMaybe; + search?: InputMaybe; + metadata?: InputMaybe>>; +}; + +export type VoucherInput = { + /** Voucher type: PRODUCT, CATEGORY SHIPPING or ENTIRE_ORDER. */ + type?: InputMaybe; + /** Voucher name. */ + name?: InputMaybe; + /** Code to use the voucher. */ + code?: InputMaybe; + /** Start date of the voucher in ISO 8601 format. */ + startDate?: InputMaybe; + /** End date of the voucher in ISO 8601 format. */ + endDate?: InputMaybe; + /** Choices: fixed or percentage. */ + discountValueType?: InputMaybe; + /** Products discounted by the voucher. */ + products?: InputMaybe>>; + /** New in Saleor 3.1. Variants discounted by the voucher. */ + variants?: InputMaybe>>; + /** Collections discounted by the voucher. */ + collections?: InputMaybe>>; + /** Categories discounted by the voucher. */ + categories?: InputMaybe>>; + /** Minimal quantity of checkout items required to apply the voucher. */ + minCheckoutItemsQuantity?: InputMaybe; + /** Country codes that can be used with the shipping voucher. */ + countries?: InputMaybe>>; + /** Voucher should be applied to the cheapest item or entire order. */ + applyOncePerOrder?: InputMaybe; + /** Voucher should be applied once per customer. */ + applyOncePerCustomer?: InputMaybe; + /** Voucher can be used only by staff user. */ + onlyForStaff?: InputMaybe; + /** Limit number of times this voucher can be used in total. */ + usageLimit?: InputMaybe; +}; + +export enum VoucherSortField { + /** Sort vouchers by code. */ + CODE = 'CODE', + /** Sort vouchers by start date. */ + START_DATE = 'START_DATE', + /** Sort vouchers by end date. */ + END_DATE = 'END_DATE', + /** Sort vouchers by value. */ + VALUE = 'VALUE', + /** Sort vouchers by type. */ + TYPE = 'TYPE', + /** Sort vouchers by usage limit. */ + USAGE_LIMIT = 'USAGE_LIMIT', + /** Sort vouchers by minimum spent amount. */ + MINIMUM_SPENT_AMOUNT = 'MINIMUM_SPENT_AMOUNT' +} + +export type VoucherSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** + * Specifies the channel in which to sort the data. + * + * DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead. + */ + channel?: InputMaybe; + /** Sort vouchers by the selected field. */ + field: VoucherSortField; +}; + +export enum VoucherTypeEnum { + SHIPPING = 'SHIPPING', + ENTIRE_ORDER = 'ENTIRE_ORDER', + SPECIFIC_PRODUCT = 'SPECIFIC_PRODUCT' +} + +/** An enumeration. */ +export enum WarehouseClickAndCollectOptionEnum { + DISABLED = 'DISABLED', + LOCAL = 'LOCAL', + ALL = 'ALL' +} + +export type WarehouseCreateInput = { + /** Warehouse slug. */ + slug?: InputMaybe; + /** The email address of the warehouse. */ + email?: InputMaybe; + /** Warehouse name. */ + name: Scalars['String']; + /** Address of the warehouse. */ + address: AddressInput; + /** Shipping zones supported by the warehouse. */ + shippingZones?: InputMaybe>>; +}; + +/** An enumeration. */ +export enum WarehouseErrorCode { + ALREADY_EXISTS = 'ALREADY_EXISTS', + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + NOT_FOUND = 'NOT_FOUND', + REQUIRED = 'REQUIRED', + UNIQUE = 'UNIQUE' +} + +export type WarehouseFilterInput = { + clickAndCollectOption?: InputMaybe; + search?: InputMaybe; + ids?: InputMaybe>>; + isPrivate?: InputMaybe; +}; + +export enum WarehouseSortField { + /** Sort warehouses by name. */ + NAME = 'NAME' +} + +export type WarehouseSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** Sort warehouses by the selected field. */ + field: WarehouseSortField; +}; + +export type WarehouseUpdateInput = { + /** Warehouse slug. */ + slug?: InputMaybe; + /** The email address of the warehouse. */ + email?: InputMaybe; + /** Warehouse name. */ + name?: InputMaybe; + /** Address of the warehouse. */ + address?: InputMaybe; + /** New in Saleor 3.1. Click and collect options: local, all or disabled */ + clickAndCollectOption?: InputMaybe; + /** New in Saleor 3.1. Visibility of warehouse stocks */ + isPrivate?: InputMaybe; +}; + +export type WebhookCreateInput = { + /** The name of the webhook. */ + name?: InputMaybe; + /** The url to receive the payload. */ + targetUrl?: InputMaybe; + /** + * The events that webhook wants to subscribe. + * + * DEPRECATED: this field will be removed in Saleor 4.0. Use `asyncEvents` or `syncEvents` instead. + */ + events?: InputMaybe>>; + /** The asynchronous events that webhook wants to subscribe. */ + asyncEvents?: InputMaybe>; + /** The synchronous events that webhook wants to subscribe. */ + syncEvents?: InputMaybe>; + /** ID of the app to which webhook belongs. */ + app?: InputMaybe; + /** Determine if webhook will be set active or not. */ + isActive?: InputMaybe; + /** The secret key used to create a hash signature with each payload. */ + secretKey?: InputMaybe; +}; + +/** An enumeration. */ +export enum WebhookErrorCode { + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + NOT_FOUND = 'NOT_FOUND', + REQUIRED = 'REQUIRED', + UNIQUE = 'UNIQUE' +} + +/** Enum determining type of webhook. */ +export enum WebhookEventTypeAsyncEnum { + /** All the events. */ + ANY_EVENTS = 'ANY_EVENTS', + /** A new order is placed. */ + ORDER_CREATED = 'ORDER_CREATED', + /** An order is confirmed (status change unconfirmed -> unfulfilled) by a staff user using the OrderConfirm mutation. It also triggers when the user completes the checkout and the shop setting `automatically_confirm_all_new_orders` is enabled. */ + ORDER_CONFIRMED = 'ORDER_CONFIRMED', + /** Payment is made and an order is fully paid. */ + ORDER_FULLY_PAID = 'ORDER_FULLY_PAID', + /** An order is updated; triggered for all changes related to an order; covers all other order webhooks, except for ORDER_CREATED. */ + ORDER_UPDATED = 'ORDER_UPDATED', + /** An order is cancelled. */ + ORDER_CANCELLED = 'ORDER_CANCELLED', + /** An order is fulfilled. */ + ORDER_FULFILLED = 'ORDER_FULFILLED', + DRAFT_ORDER_CREATED = 'DRAFT_ORDER_CREATED', + DRAFT_ORDER_UPDATED = 'DRAFT_ORDER_UPDATED', + DRAFT_ORDER_DELETED = 'DRAFT_ORDER_DELETED', + SALE_CREATED = 'SALE_CREATED', + SALE_UPDATED = 'SALE_UPDATED', + SALE_DELETED = 'SALE_DELETED', + /** An invoice for order requested. */ + INVOICE_REQUESTED = 'INVOICE_REQUESTED', + /** An invoice is deleted. */ + INVOICE_DELETED = 'INVOICE_DELETED', + /** Invoice has been sent. */ + INVOICE_SENT = 'INVOICE_SENT', + /** A new customer account is created. */ + CUSTOMER_CREATED = 'CUSTOMER_CREATED', + /** A customer account is updated. */ + CUSTOMER_UPDATED = 'CUSTOMER_UPDATED', + /** A new collection is created. */ + COLLECTION_CREATED = 'COLLECTION_CREATED', + /** A collection is updated. */ + COLLECTION_UPDATED = 'COLLECTION_UPDATED', + /** A collection is deleted. */ + COLLECTION_DELETED = 'COLLECTION_DELETED', + /** A new product is created. */ + PRODUCT_CREATED = 'PRODUCT_CREATED', + /** A product is updated. */ + PRODUCT_UPDATED = 'PRODUCT_UPDATED', + /** A product is deleted. */ + PRODUCT_DELETED = 'PRODUCT_DELETED', + /** A new product variant is created. */ + PRODUCT_VARIANT_CREATED = 'PRODUCT_VARIANT_CREATED', + /** A product variant is updated. */ + PRODUCT_VARIANT_UPDATED = 'PRODUCT_VARIANT_UPDATED', + /** A product variant is deleted. */ + PRODUCT_VARIANT_DELETED = 'PRODUCT_VARIANT_DELETED', + PRODUCT_VARIANT_OUT_OF_STOCK = 'PRODUCT_VARIANT_OUT_OF_STOCK', + PRODUCT_VARIANT_BACK_IN_STOCK = 'PRODUCT_VARIANT_BACK_IN_STOCK', + /** A new checkout is created. */ + CHECKOUT_CREATED = 'CHECKOUT_CREATED', + /** A checkout is updated. It also triggers all updates related to the checkout. */ + CHECKOUT_UPDATED = 'CHECKOUT_UPDATED', + /** A new fulfillment is created. */ + FULFILLMENT_CREATED = 'FULFILLMENT_CREATED', + /** A fulfillment is cancelled. */ + FULFILLMENT_CANCELED = 'FULFILLMENT_CANCELED', + /** User notification triggered. */ + NOTIFY_USER = 'NOTIFY_USER', + /** A new page is created. */ + PAGE_CREATED = 'PAGE_CREATED', + /** A page is updated. */ + PAGE_UPDATED = 'PAGE_UPDATED', + /** A page is deleted. */ + PAGE_DELETED = 'PAGE_DELETED', + TRANSLATION_CREATED = 'TRANSLATION_CREATED', + TRANSLATION_UPDATED = 'TRANSLATION_UPDATED' +} + +/** Enum determining type of webhook. */ +export enum WebhookEventTypeEnum { + ANY_EVENTS = 'ANY_EVENTS', + ORDER_CREATED = 'ORDER_CREATED', + ORDER_CONFIRMED = 'ORDER_CONFIRMED', + ORDER_FULLY_PAID = 'ORDER_FULLY_PAID', + ORDER_UPDATED = 'ORDER_UPDATED', + ORDER_CANCELLED = 'ORDER_CANCELLED', + ORDER_FULFILLED = 'ORDER_FULFILLED', + DRAFT_ORDER_CREATED = 'DRAFT_ORDER_CREATED', + DRAFT_ORDER_UPDATED = 'DRAFT_ORDER_UPDATED', + DRAFT_ORDER_DELETED = 'DRAFT_ORDER_DELETED', + SALE_CREATED = 'SALE_CREATED', + SALE_UPDATED = 'SALE_UPDATED', + SALE_DELETED = 'SALE_DELETED', + INVOICE_REQUESTED = 'INVOICE_REQUESTED', + INVOICE_DELETED = 'INVOICE_DELETED', + INVOICE_SENT = 'INVOICE_SENT', + CUSTOMER_CREATED = 'CUSTOMER_CREATED', + CUSTOMER_UPDATED = 'CUSTOMER_UPDATED', + COLLECTION_CREATED = 'COLLECTION_CREATED', + COLLECTION_UPDATED = 'COLLECTION_UPDATED', + COLLECTION_DELETED = 'COLLECTION_DELETED', + PRODUCT_CREATED = 'PRODUCT_CREATED', + PRODUCT_UPDATED = 'PRODUCT_UPDATED', + PRODUCT_DELETED = 'PRODUCT_DELETED', + PRODUCT_VARIANT_CREATED = 'PRODUCT_VARIANT_CREATED', + PRODUCT_VARIANT_UPDATED = 'PRODUCT_VARIANT_UPDATED', + PRODUCT_VARIANT_DELETED = 'PRODUCT_VARIANT_DELETED', + PRODUCT_VARIANT_OUT_OF_STOCK = 'PRODUCT_VARIANT_OUT_OF_STOCK', + PRODUCT_VARIANT_BACK_IN_STOCK = 'PRODUCT_VARIANT_BACK_IN_STOCK', + CHECKOUT_CREATED = 'CHECKOUT_CREATED', + CHECKOUT_UPDATED = 'CHECKOUT_UPDATED', + FULFILLMENT_CREATED = 'FULFILLMENT_CREATED', + FULFILLMENT_CANCELED = 'FULFILLMENT_CANCELED', + NOTIFY_USER = 'NOTIFY_USER', + PAGE_CREATED = 'PAGE_CREATED', + PAGE_UPDATED = 'PAGE_UPDATED', + PAGE_DELETED = 'PAGE_DELETED', + TRANSLATION_CREATED = 'TRANSLATION_CREATED', + TRANSLATION_UPDATED = 'TRANSLATION_UPDATED', + PAYMENT_AUTHORIZE = 'PAYMENT_AUTHORIZE', + PAYMENT_CAPTURE = 'PAYMENT_CAPTURE', + PAYMENT_CONFIRM = 'PAYMENT_CONFIRM', + PAYMENT_LIST_GATEWAYS = 'PAYMENT_LIST_GATEWAYS', + PAYMENT_PROCESS = 'PAYMENT_PROCESS', + PAYMENT_REFUND = 'PAYMENT_REFUND', + PAYMENT_VOID = 'PAYMENT_VOID', + SHIPPING_LIST_METHODS_FOR_CHECKOUT = 'SHIPPING_LIST_METHODS_FOR_CHECKOUT' +} + +/** Enum determining type of webhook. */ +export enum WebhookEventTypeSyncEnum { + PAYMENT_AUTHORIZE = 'PAYMENT_AUTHORIZE', + PAYMENT_CAPTURE = 'PAYMENT_CAPTURE', + PAYMENT_CONFIRM = 'PAYMENT_CONFIRM', + PAYMENT_LIST_GATEWAYS = 'PAYMENT_LIST_GATEWAYS', + PAYMENT_PROCESS = 'PAYMENT_PROCESS', + PAYMENT_REFUND = 'PAYMENT_REFUND', + PAYMENT_VOID = 'PAYMENT_VOID', + SHIPPING_LIST_METHODS_FOR_CHECKOUT = 'SHIPPING_LIST_METHODS_FOR_CHECKOUT' +} + +/** An enumeration. */ +export enum WebhookSampleEventTypeEnum { + ORDER_CREATED = 'ORDER_CREATED', + ORDER_CONFIRMED = 'ORDER_CONFIRMED', + ORDER_FULLY_PAID = 'ORDER_FULLY_PAID', + ORDER_UPDATED = 'ORDER_UPDATED', + ORDER_CANCELLED = 'ORDER_CANCELLED', + ORDER_FULFILLED = 'ORDER_FULFILLED', + DRAFT_ORDER_CREATED = 'DRAFT_ORDER_CREATED', + DRAFT_ORDER_UPDATED = 'DRAFT_ORDER_UPDATED', + DRAFT_ORDER_DELETED = 'DRAFT_ORDER_DELETED', + SALE_CREATED = 'SALE_CREATED', + SALE_UPDATED = 'SALE_UPDATED', + SALE_DELETED = 'SALE_DELETED', + INVOICE_REQUESTED = 'INVOICE_REQUESTED', + INVOICE_DELETED = 'INVOICE_DELETED', + INVOICE_SENT = 'INVOICE_SENT', + CUSTOMER_CREATED = 'CUSTOMER_CREATED', + CUSTOMER_UPDATED = 'CUSTOMER_UPDATED', + COLLECTION_CREATED = 'COLLECTION_CREATED', + COLLECTION_UPDATED = 'COLLECTION_UPDATED', + COLLECTION_DELETED = 'COLLECTION_DELETED', + PRODUCT_CREATED = 'PRODUCT_CREATED', + PRODUCT_UPDATED = 'PRODUCT_UPDATED', + PRODUCT_DELETED = 'PRODUCT_DELETED', + PRODUCT_VARIANT_CREATED = 'PRODUCT_VARIANT_CREATED', + PRODUCT_VARIANT_UPDATED = 'PRODUCT_VARIANT_UPDATED', + PRODUCT_VARIANT_DELETED = 'PRODUCT_VARIANT_DELETED', + PRODUCT_VARIANT_OUT_OF_STOCK = 'PRODUCT_VARIANT_OUT_OF_STOCK', + PRODUCT_VARIANT_BACK_IN_STOCK = 'PRODUCT_VARIANT_BACK_IN_STOCK', + CHECKOUT_CREATED = 'CHECKOUT_CREATED', + CHECKOUT_UPDATED = 'CHECKOUT_UPDATED', + FULFILLMENT_CREATED = 'FULFILLMENT_CREATED', + FULFILLMENT_CANCELED = 'FULFILLMENT_CANCELED', + NOTIFY_USER = 'NOTIFY_USER', + PAGE_CREATED = 'PAGE_CREATED', + PAGE_UPDATED = 'PAGE_UPDATED', + PAGE_DELETED = 'PAGE_DELETED', + TRANSLATION_CREATED = 'TRANSLATION_CREATED', + TRANSLATION_UPDATED = 'TRANSLATION_UPDATED' +} + +export type WebhookUpdateInput = { + /** The new name of the webhook. */ + name?: InputMaybe; + /** The url to receive the payload. */ + targetUrl?: InputMaybe; + /** + * The events that webhook wants to subscribe. + * + * DEPRECATED: this field will be removed in Saleor 4.0. Use `asyncEvents` or `syncEvents` instead. + */ + events?: InputMaybe>>; + /** The asynchronous events that webhook wants to subscribe. */ + asyncEvents?: InputMaybe>; + /** The synchronous events that webhook wants to subscribe. */ + syncEvents?: InputMaybe>; + /** ID of the app to which webhook belongs. */ + app?: InputMaybe; + /** Determine if webhook will be set active or not. */ + isActive?: InputMaybe; + /** Use to create a hash signature with each payload. */ + secretKey?: InputMaybe; +}; + +/** An enumeration. */ +export enum WeightUnitsEnum { + G = 'G', + LB = 'LB', + OZ = 'OZ', + KG = 'KG', + TONNE = 'TONNE' +} + +export type AppCreateMutationVariables = Exact<{ + input: AppInput; +}>; + + +export type AppCreateMutation = { __typename: 'Mutation', appCreate: { __typename: 'AppCreate', authToken: string | null, app: { __typename: 'App', id: string, name: string | null, created: any | null, isActive: boolean | null, type: AppTypeEnum | null, homepageUrl: string | null, appUrl: string | null, configurationUrl: string | null, supportUrl: string | null, version: string | null, accessToken: string | null, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, tokens: Array<{ __typename: 'AppToken', authToken: string | null, id: string, name: string | null } | null> | null, webhooks: Array<{ __typename: 'Webhook', id: string, name: string, isActive: boolean, app: { __typename: 'App', id: string, name: string | null } } | null> | null } | null, errors: Array<{ __typename: 'AppError', field: string | null, message: string | null, code: AppErrorCode, permissions: Array | null }> } | null }; + +export type AppDeleteMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type AppDeleteMutation = { __typename: 'Mutation', appDelete: { __typename: 'AppDelete', app: { __typename: 'App', id: string, name: string | null, created: any | null, isActive: boolean | null, type: AppTypeEnum | null, homepageUrl: string | null, appUrl: string | null, configurationUrl: string | null, supportUrl: string | null, version: string | null, accessToken: string | null, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, tokens: Array<{ __typename: 'AppToken', authToken: string | null, id: string, name: string | null } | null> | null, webhooks: Array<{ __typename: 'Webhook', id: string, name: string, isActive: boolean, app: { __typename: 'App', id: string, name: string | null } } | null> | null } | null, errors: Array<{ __typename: 'AppError', field: string | null, message: string | null, code: AppErrorCode, permissions: Array | null }> } | null }; + +export type AppDeleteFailedInstallationMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type AppDeleteFailedInstallationMutation = { __typename: 'Mutation', appDeleteFailedInstallation: { __typename: 'AppDeleteFailedInstallation', appInstallation: { __typename: 'AppInstallation', id: string, status: JobStatusEnum, appName: string, message: string | null } | null, errors: Array<{ __typename: 'AppError', field: string | null, message: string | null, code: AppErrorCode, permissions: Array | null }> } | null }; + +export type AppFetchMutationVariables = Exact<{ + manifestUrl: Scalars['String']; +}>; + + +export type AppFetchMutation = { __typename: 'Mutation', appFetchManifest: { __typename: 'AppFetchManifest', manifest: { __typename: 'Manifest', identifier: string, version: string, about: string | null, name: string, appUrl: string | null, configurationUrl: string | null, tokenTargetUrl: string | null, dataPrivacy: string | null, dataPrivacyUrl: string | null, homepageUrl: string | null, supportUrl: string | null, permissions: Array<{ __typename: 'Permission', code: PermissionEnum, name: string } | null> | null } | null, errors: Array<{ __typename: 'AppError', field: string | null, message: string | null, code: AppErrorCode, permissions: Array | null }> } | null }; + +export type AppInstallMutationVariables = Exact<{ + input: AppInstallInput; +}>; + + +export type AppInstallMutation = { __typename: 'Mutation', appInstall: { __typename: 'AppInstall', appInstallation: { __typename: 'AppInstallation', id: string, status: JobStatusEnum, appName: string, manifestUrl: string } | null, errors: Array<{ __typename: 'AppError', field: string | null, message: string | null, code: AppErrorCode, permissions: Array | null }> } | null }; + +export type AppRetryInstallMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type AppRetryInstallMutation = { __typename: 'Mutation', appRetryInstall: { __typename: 'AppRetryInstall', appInstallation: { __typename: 'AppInstallation', id: string, status: JobStatusEnum, appName: string, manifestUrl: string } | null, errors: Array<{ __typename: 'AppError', field: string | null, message: string | null, code: AppErrorCode, permissions: Array | null }> } | null }; + +export type AppUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: AppInput; +}>; + + +export type AppUpdateMutation = { __typename: 'Mutation', appUpdate: { __typename: 'AppUpdate', app: { __typename: 'App', id: string, name: string | null, created: any | null, isActive: boolean | null, type: AppTypeEnum | null, homepageUrl: string | null, appUrl: string | null, configurationUrl: string | null, supportUrl: string | null, version: string | null, accessToken: string | null, permissions: Array<{ __typename: 'Permission', code: PermissionEnum, name: string } | null> | null, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, tokens: Array<{ __typename: 'AppToken', authToken: string | null, id: string, name: string | null } | null> | null, webhooks: Array<{ __typename: 'Webhook', id: string, name: string, isActive: boolean, app: { __typename: 'App', id: string, name: string | null } } | null> | null } | null, errors: Array<{ __typename: 'AppError', message: string | null, permissions: Array | null, field: string | null, code: AppErrorCode }> } | null }; + +export type AppTokenCreateMutationVariables = Exact<{ + input: AppTokenInput; +}>; + + +export type AppTokenCreateMutation = { __typename: 'Mutation', appTokenCreate: { __typename: 'AppTokenCreate', authToken: string | null, appToken: { __typename: 'AppToken', name: string | null, authToken: string | null, id: string } | null, errors: Array<{ __typename: 'AppError', field: string | null, message: string | null, code: AppErrorCode, permissions: Array | null }> } | null }; + +export type AppTokenDeleteMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type AppTokenDeleteMutation = { __typename: 'Mutation', appTokenDelete: { __typename: 'AppTokenDelete', appToken: { __typename: 'AppToken', name: string | null, authToken: string | null, id: string } | null, errors: Array<{ __typename: 'AppError', field: string | null, message: string | null, code: AppErrorCode, permissions: Array | null }> } | null }; + +export type AppActivateMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type AppActivateMutation = { __typename: 'Mutation', appActivate: { __typename: 'AppActivate', errors: Array<{ __typename: 'AppError', field: string | null, message: string | null, code: AppErrorCode, permissions: Array | null }> } | null }; + +export type AppDeactivateMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type AppDeactivateMutation = { __typename: 'Mutation', appDeactivate: { __typename: 'AppDeactivate', errors: Array<{ __typename: 'AppError', field: string | null, message: string | null, code: AppErrorCode, permissions: Array | null }> } | null }; + +export type AppsListQueryVariables = Exact<{ + before?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sort?: InputMaybe; + filter?: InputMaybe; +}>; + + +export type AppsListQuery = { __typename: 'Query', apps: { __typename: 'AppCountableConnection', totalCount: number | null, pageInfo: { __typename: 'PageInfo', hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null, endCursor: string | null }, edges: Array<{ __typename: 'AppCountableEdge', node: { __typename: 'App', id: string, name: string | null, isActive: boolean | null, type: AppTypeEnum | null } }> } | null }; + +export type AppsInstallationsQueryVariables = Exact<{ [key: string]: never; }>; + + +export type AppsInstallationsQuery = { __typename: 'Query', appsInstallations: Array<{ __typename: 'AppInstallation', status: JobStatusEnum, message: string | null, appName: string, manifestUrl: string, id: string }> }; + +export type AppQueryVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type AppQuery = { __typename: 'Query', app: { __typename: 'App', aboutApp: string | null, dataPrivacy: string | null, dataPrivacyUrl: string | null, id: string, name: string | null, created: any | null, isActive: boolean | null, type: AppTypeEnum | null, homepageUrl: string | null, appUrl: string | null, configurationUrl: string | null, supportUrl: string | null, version: string | null, accessToken: string | null, permissions: Array<{ __typename: 'Permission', code: PermissionEnum, name: string } | null> | null, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, tokens: Array<{ __typename: 'AppToken', authToken: string | null, id: string, name: string | null } | null> | null, webhooks: Array<{ __typename: 'Webhook', id: string, name: string, isActive: boolean, app: { __typename: 'App', id: string, name: string | null } } | null> | null } | null }; + +export type ExtensionListQueryVariables = Exact<{ + filter: AppExtensionFilterInput; +}>; + + +export type ExtensionListQuery = { __typename: 'Query', appExtensions: { __typename: 'AppExtensionCountableConnection', edges: Array<{ __typename: 'AppExtensionCountableEdge', node: { __typename: 'AppExtension', id: string, label: string, url: string, mount: AppExtensionMountEnum, target: AppExtensionTargetEnum, accessToken: string | null, permissions: Array<{ __typename: 'Permission', code: PermissionEnum }>, app: { __typename: 'App', id: string, appUrl: string | null } } }> } | null }; + +export type AttributeBulkDeleteMutationVariables = Exact<{ + ids: Array | Scalars['ID']; +}>; + + +export type AttributeBulkDeleteMutation = { __typename: 'Mutation', attributeBulkDelete: { __typename: 'AttributeBulkDelete', errors: Array<{ __typename: 'AttributeError', code: AttributeErrorCode, field: string | null, message: string | null }> } | null }; + +export type AttributeDeleteMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type AttributeDeleteMutation = { __typename: 'Mutation', attributeDelete: { __typename: 'AttributeDelete', errors: Array<{ __typename: 'AttributeError', code: AttributeErrorCode, field: string | null, message: string | null }> } | null }; + +export type AttributeUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: AttributeUpdateInput; +}>; + + +export type AttributeUpdateMutation = { __typename: 'Mutation', attributeUpdate: { __typename: 'AttributeUpdate', attribute: { __typename: 'Attribute', availableInGrid: boolean, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, unit: MeasurementUnitsEnum | null, storefrontSearchPosition: number, valueRequired: boolean, id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null, errors: Array<{ __typename: 'AttributeError', code: AttributeErrorCode, field: string | null, message: string | null }> } | null }; + +export type AttributeValueDeleteMutationVariables = Exact<{ + id: Scalars['ID']; + firstValues?: InputMaybe; + afterValues?: InputMaybe; + lastValues?: InputMaybe; + beforeValues?: InputMaybe; +}>; + + +export type AttributeValueDeleteMutation = { __typename: 'Mutation', attributeValueDelete: { __typename: 'AttributeValueDelete', attribute: { __typename: 'Attribute', id: string, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null } | null, errors: Array<{ __typename: 'AttributeError', code: AttributeErrorCode, field: string | null, message: string | null }> } | null }; + +export type AttributeValueUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: AttributeValueUpdateInput; + firstValues?: InputMaybe; + afterValues?: InputMaybe; + lastValues?: InputMaybe; + beforeValues?: InputMaybe; +}>; + + +export type AttributeValueUpdateMutation = { __typename: 'Mutation', attributeValueUpdate: { __typename: 'AttributeValueUpdate', attribute: { __typename: 'Attribute', id: string, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null } | null, errors: Array<{ __typename: 'AttributeError', code: AttributeErrorCode, field: string | null, message: string | null }> } | null }; + +export type AttributeValueCreateMutationVariables = Exact<{ + id: Scalars['ID']; + input: AttributeValueCreateInput; + firstValues?: InputMaybe; + afterValues?: InputMaybe; + lastValues?: InputMaybe; + beforeValues?: InputMaybe; +}>; + + +export type AttributeValueCreateMutation = { __typename: 'Mutation', attributeValueCreate: { __typename: 'AttributeValueCreate', attribute: { __typename: 'Attribute', id: string, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null } | null, errors: Array<{ __typename: 'AttributeError', code: AttributeErrorCode, field: string | null, message: string | null }> } | null }; + +export type AttributeCreateMutationVariables = Exact<{ + input: AttributeCreateInput; +}>; + + +export type AttributeCreateMutation = { __typename: 'Mutation', attributeCreate: { __typename: 'AttributeCreate', attribute: { __typename: 'Attribute', id: string } | null, errors: Array<{ __typename: 'AttributeError', code: AttributeErrorCode, field: string | null, message: string | null }> } | null }; + +export type AttributeValueReorderMutationVariables = Exact<{ + id: Scalars['ID']; + move: ReorderInput; + firstValues?: InputMaybe; + afterValues?: InputMaybe; + lastValues?: InputMaybe; + beforeValues?: InputMaybe; +}>; + + +export type AttributeValueReorderMutation = { __typename: 'Mutation', attributeReorderValues: { __typename: 'AttributeReorderValues', attribute: { __typename: 'Attribute', id: string, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', id: string } }> } | null } | null, errors: Array<{ __typename: 'AttributeError', code: AttributeErrorCode, field: string | null, message: string | null }> } | null }; + +export type AttributeDetailsQueryVariables = Exact<{ + id: Scalars['ID']; + firstValues?: InputMaybe; + afterValues?: InputMaybe; + lastValues?: InputMaybe; + beforeValues?: InputMaybe; +}>; + + +export type AttributeDetailsQuery = { __typename: 'Query', attribute: { __typename: 'Attribute', availableInGrid: boolean, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, unit: MeasurementUnitsEnum | null, storefrontSearchPosition: number, valueRequired: boolean, id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null }; + +export type AttributeListQueryVariables = Exact<{ + filter?: InputMaybe; + before?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + sort?: InputMaybe; +}>; + + +export type AttributeListQuery = { __typename: 'Query', attributes: { __typename: 'AttributeCountableConnection', edges: Array<{ __typename: 'AttributeCountableEdge', node: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type RequestPasswordResetMutationVariables = Exact<{ + email: Scalars['String']; + redirectUrl: Scalars['String']; +}>; + + +export type RequestPasswordResetMutation = { __typename: 'Mutation', requestPasswordReset: { __typename: 'RequestPasswordReset', errors: Array<{ __typename: 'AccountError', code: AccountErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }> } | null }; + +export type AvailableExternalAuthenticationsQueryVariables = Exact<{ [key: string]: never; }>; + + +export type AvailableExternalAuthenticationsQuery = { __typename: 'Query', shop: { __typename: 'Shop', availableExternalAuthentications: Array<{ __typename: 'ExternalAuthentication', id: string, name: string | null }> } }; + +export type UserDetailsQueryVariables = Exact<{ [key: string]: never; }>; + + +export type UserDetailsQuery = { __typename: 'Query', me: { __typename: 'User', id: string, email: string, firstName: string, lastName: string, isStaff: boolean, userPermissions: Array<{ __typename: 'UserPermission', code: PermissionEnum, name: string } | null> | null, avatar: { __typename: 'Image', url: string } | null } | null }; + +export type CategoryDeleteMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type CategoryDeleteMutation = { __typename: 'Mutation', categoryDelete: { __typename: 'CategoryDelete', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }> } | null }; + +export type CategoryCreateMutationVariables = Exact<{ + parent?: InputMaybe; + input: CategoryInput; +}>; + + +export type CategoryCreateMutation = { __typename: 'Mutation', categoryCreate: { __typename: 'CategoryCreate', category: { __typename: 'Category', id: string, name: string, slug: string, description: any | null, seoDescription: string | null, seoTitle: string | null, backgroundImage: { __typename: 'Image', alt: string | null, url: string } | null, parent: { __typename: 'Category', id: string } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null, errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }> } | null }; + +export type CategoryUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: CategoryInput; +}>; + + +export type CategoryUpdateMutation = { __typename: 'Mutation', categoryUpdate: { __typename: 'CategoryUpdate', category: { __typename: 'Category', id: string, name: string, slug: string, description: any | null, seoDescription: string | null, seoTitle: string | null, backgroundImage: { __typename: 'Image', alt: string | null, url: string } | null, parent: { __typename: 'Category', id: string } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null, errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }> } | null }; + +export type CategoryBulkDeleteMutationVariables = Exact<{ + ids: Array> | InputMaybe; +}>; + + +export type CategoryBulkDeleteMutation = { __typename: 'Mutation', categoryBulkDelete: { __typename: 'CategoryBulkDelete', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }> } | null }; + +export type RootCategoriesQueryVariables = Exact<{ + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + sort?: InputMaybe; +}>; + + +export type RootCategoriesQuery = { __typename: 'Query', categories: { __typename: 'CategoryCountableConnection', edges: Array<{ __typename: 'CategoryCountableEdge', node: { __typename: 'Category', id: string, name: string, children: { __typename: 'CategoryCountableConnection', totalCount: number | null } | null, products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type CategoryDetailsQueryVariables = Exact<{ + id: Scalars['ID']; + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; +}>; + + +export type CategoryDetailsQuery = { __typename: 'Query', category: { __typename: 'Category', id: string, name: string, slug: string, description: any | null, seoDescription: string | null, seoTitle: string | null, children: { __typename: 'CategoryCountableConnection', edges: Array<{ __typename: 'CategoryCountableEdge', node: { __typename: 'Category', id: string, name: string, children: { __typename: 'CategoryCountableConnection', totalCount: number | null } | null, products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, products: { __typename: 'ProductCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'ProductCountableEdge', cursor: string, node: { __typename: 'Product', id: string, name: string, thumbnail: { __typename: 'Image', url: string } | null } }> } | null, backgroundImage: { __typename: 'Image', alt: string | null, url: string } | null, parent: { __typename: 'Category', id: string } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null }; + +export type ChannelCreateMutationVariables = Exact<{ + input: ChannelCreateInput; +}>; + + +export type ChannelCreateMutation = { __typename: 'Mutation', channelCreate: { __typename: 'ChannelCreate', channel: { __typename: 'Channel', hasOrders: boolean, id: string, isActive: boolean, name: string, slug: string, currencyCode: string, defaultCountry: { __typename: 'CountryDisplay', code: string, country: string } } | null, errors: Array<{ __typename: 'ChannelError', code: ChannelErrorCode, field: string | null, message: string | null }> } | null }; + +export type ChannelUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: ChannelUpdateInput; +}>; + + +export type ChannelUpdateMutation = { __typename: 'Mutation', channelUpdate: { __typename: 'ChannelUpdate', channel: { __typename: 'Channel', hasOrders: boolean, id: string, isActive: boolean, name: string, slug: string, currencyCode: string, defaultCountry: { __typename: 'CountryDisplay', code: string, country: string } } | null, errors: Array<{ __typename: 'ChannelError', code: ChannelErrorCode, field: string | null, message: string | null }> } | null }; + +export type ChannelDeleteMutationVariables = Exact<{ + id: Scalars['ID']; + input?: InputMaybe; +}>; + + +export type ChannelDeleteMutation = { __typename: 'Mutation', channelDelete: { __typename: 'ChannelDelete', errors: Array<{ __typename: 'ChannelError', code: ChannelErrorCode, field: string | null, message: string | null }> } | null }; + +export type ChannelActivateMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type ChannelActivateMutation = { __typename: 'Mutation', channelActivate: { __typename: 'ChannelActivate', channel: { __typename: 'Channel', hasOrders: boolean, id: string, isActive: boolean, name: string, slug: string, currencyCode: string, defaultCountry: { __typename: 'CountryDisplay', code: string, country: string } } | null, errors: Array<{ __typename: 'ChannelError', code: ChannelErrorCode, field: string | null, message: string | null }> } | null }; + +export type ChannelDeactivateMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type ChannelDeactivateMutation = { __typename: 'Mutation', channelDeactivate: { __typename: 'ChannelDeactivate', channel: { __typename: 'Channel', hasOrders: boolean, id: string, isActive: boolean, name: string, slug: string, currencyCode: string, defaultCountry: { __typename: 'CountryDisplay', code: string, country: string } } | null, errors: Array<{ __typename: 'ChannelError', code: ChannelErrorCode, field: string | null, message: string | null }> } | null }; + +export type BaseChannelsQueryVariables = Exact<{ [key: string]: never; }>; + + +export type BaseChannelsQuery = { __typename: 'Query', channels: Array<{ __typename: 'Channel', id: string, isActive: boolean, name: string, slug: string, currencyCode: string, defaultCountry: { __typename: 'CountryDisplay', code: string, country: string } }> | null }; + +export type ChannelsQueryVariables = Exact<{ [key: string]: never; }>; + + +export type ChannelsQuery = { __typename: 'Query', channels: Array<{ __typename: 'Channel', hasOrders: boolean, id: string, isActive: boolean, name: string, slug: string, currencyCode: string, defaultCountry: { __typename: 'CountryDisplay', code: string, country: string } }> | null }; + +export type ChannelQueryVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type ChannelQuery = { __typename: 'Query', channel: { __typename: 'Channel', hasOrders: boolean, id: string, isActive: boolean, name: string, slug: string, currencyCode: string, defaultCountry: { __typename: 'CountryDisplay', code: string, country: string } } | null }; + +export type CollectionUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: CollectionInput; +}>; + + +export type CollectionUpdateMutation = { __typename: 'Mutation', collectionUpdate: { __typename: 'CollectionUpdate', collection: { __typename: 'Collection', slug: string, description: any | null, seoDescription: string | null, seoTitle: string | null, id: string, name: string, backgroundImage: { __typename: 'Image', alt: string | null, url: string } | null, channelListings: Array<{ __typename: 'CollectionChannelListing', isPublished: boolean, publicationDate: any | null, channel: { __typename: 'Channel', id: string, name: string } }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null, errors: Array<{ __typename: 'CollectionError', code: CollectionErrorCode, field: string | null, message: string | null }> } | null }; + +export type CollectionAssignProductMutationVariables = Exact<{ + collectionId: Scalars['ID']; + productIds: Array | Scalars['ID']; + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; +}>; + + +export type CollectionAssignProductMutation = { __typename: 'Mutation', collectionAddProducts: { __typename: 'CollectionAddProducts', collection: { __typename: 'Collection', id: string, products: { __typename: 'ProductCountableConnection', edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', id: string, name: string, productType: { __typename: 'ProductType', id: string, name: string }, thumbnail: { __typename: 'Image', url: string } | null, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null } | null, errors: Array<{ __typename: 'CollectionError', code: CollectionErrorCode, field: string | null, message: string | null }> } | null }; + +export type CreateCollectionMutationVariables = Exact<{ + input: CollectionCreateInput; +}>; + + +export type CreateCollectionMutation = { __typename: 'Mutation', collectionCreate: { __typename: 'CollectionCreate', collection: { __typename: 'Collection', slug: string, description: any | null, seoDescription: string | null, seoTitle: string | null, id: string, name: string, backgroundImage: { __typename: 'Image', alt: string | null, url: string } | null, channelListings: Array<{ __typename: 'CollectionChannelListing', isPublished: boolean, publicationDate: any | null, channel: { __typename: 'Channel', id: string, name: string } }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null, errors: Array<{ __typename: 'CollectionError', code: CollectionErrorCode, field: string | null, message: string | null }> } | null }; + +export type RemoveCollectionMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type RemoveCollectionMutation = { __typename: 'Mutation', collectionDelete: { __typename: 'CollectionDelete', errors: Array<{ __typename: 'CollectionError', code: CollectionErrorCode, field: string | null, message: string | null }> } | null }; + +export type UnassignCollectionProductMutationVariables = Exact<{ + collectionId: Scalars['ID']; + productIds: Array> | InputMaybe; + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; +}>; + + +export type UnassignCollectionProductMutation = { __typename: 'Mutation', collectionRemoveProducts: { __typename: 'CollectionRemoveProducts', collection: { __typename: 'Collection', id: string, products: { __typename: 'ProductCountableConnection', edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', id: string, name: string, productType: { __typename: 'ProductType', id: string, name: string }, thumbnail: { __typename: 'Image', url: string } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null } | null, errors: Array<{ __typename: 'CollectionError', code: CollectionErrorCode, field: string | null, message: string | null }> } | null }; + +export type CollectionBulkDeleteMutationVariables = Exact<{ + ids: Array> | InputMaybe; +}>; + + +export type CollectionBulkDeleteMutation = { __typename: 'Mutation', collectionBulkDelete: { __typename: 'CollectionBulkDelete', errors: Array<{ __typename: 'CollectionError', code: CollectionErrorCode, field: string | null, message: string | null }> } | null }; + +export type CollectionChannelListingUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: CollectionChannelListingUpdateInput; +}>; + + +export type CollectionChannelListingUpdateMutation = { __typename: 'Mutation', collectionChannelListingUpdate: { __typename: 'CollectionChannelListingUpdate', errors: Array<{ __typename: 'CollectionChannelListingError', code: ProductErrorCode, field: string | null, message: string | null, channels: Array | null }> } | null }; + +export type CollectionListQueryVariables = Exact<{ + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + sort?: InputMaybe; + channel?: InputMaybe; +}>; + + +export type CollectionListQuery = { __typename: 'Query', collections: { __typename: 'CollectionCountableConnection', edges: Array<{ __typename: 'CollectionCountableEdge', node: { __typename: 'Collection', id: string, name: string, products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null, channelListings: Array<{ __typename: 'CollectionChannelListing', isPublished: boolean, publicationDate: any | null, channel: { __typename: 'Channel', id: string, name: string } }> | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type CollectionDetailsQueryVariables = Exact<{ + id: Scalars['ID']; + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; +}>; + + +export type CollectionDetailsQuery = { __typename: 'Query', collection: { __typename: 'Collection', slug: string, description: any | null, seoDescription: string | null, seoTitle: string | null, id: string, name: string, products: { __typename: 'ProductCountableConnection', edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', id: string, name: string, productType: { __typename: 'ProductType', id: string, name: string }, thumbnail: { __typename: 'Image', url: string } | null, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, backgroundImage: { __typename: 'Image', alt: string | null, url: string } | null, channelListings: Array<{ __typename: 'CollectionChannelListing', isPublished: boolean, publicationDate: any | null, channel: { __typename: 'Channel', id: string, name: string } }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null }; + +export type CheckIfOrderExistsQueryVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type CheckIfOrderExistsQuery = { __typename: 'Query', order: { __typename: 'Order', id: string, status: OrderStatus } | null }; + +export type SearchCatalogQueryVariables = Exact<{ + first: Scalars['Int']; + query: Scalars['String']; +}>; + + +export type SearchCatalogQuery = { __typename: 'Query', categories: { __typename: 'CategoryCountableConnection', edges: Array<{ __typename: 'CategoryCountableEdge', node: { __typename: 'Category', id: string, name: string } }> } | null, collections: { __typename: 'CollectionCountableConnection', edges: Array<{ __typename: 'CollectionCountableEdge', node: { __typename: 'Collection', id: string, name: string, channelListings: Array<{ __typename: 'CollectionChannelListing', isPublished: boolean, publicationDate: any | null, channel: { __typename: 'Channel', id: string, name: string } }> | null } }> } | null, products: { __typename: 'ProductCountableConnection', edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', id: string, name: string, category: { __typename: 'Category', id: string, name: string } | null } }> } | null }; + +export type ShopInfoQueryVariables = Exact<{ [key: string]: never; }>; + + +export type ShopInfoQuery = { __typename: 'Query', shop: { __typename: 'Shop', defaultWeightUnit: WeightUnitsEnum | null, displayGrossPrices: boolean, includeTaxesInPrices: boolean, name: string, trackInventoryByDefault: boolean | null, version: string, countries: Array<{ __typename: 'CountryDisplay', country: string, code: string }>, defaultCountry: { __typename: 'CountryDisplay', country: string, code: string } | null, domain: { __typename: 'Domain', host: string, url: string }, languages: Array<{ __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } | null>, permissions: Array<{ __typename: 'Permission', code: PermissionEnum, name: string } | null> } }; + +export type ShopCountriesQueryVariables = Exact<{ + filter?: InputMaybe; +}>; + + +export type ShopCountriesQuery = { __typename: 'Query', shop: { __typename: 'Shop', countries: Array<{ __typename: 'CountryDisplay', code: string, country: string }> } }; + +export type RefreshLimitsQueryVariables = Exact<{ + channels: Scalars['Boolean']; + orders: Scalars['Boolean']; + productVariants: Scalars['Boolean']; + staffUsers: Scalars['Boolean']; + warehouses: Scalars['Boolean']; +}>; + + +export type RefreshLimitsQuery = { __typename: 'Query', shop: { __typename: 'Shop', limits: { __typename: 'LimitInfo', currentUsage: { __typename: 'Limits', channels?: number | null, orders?: number | null, productVariants?: number | null, staffUsers?: number | null, warehouses?: number | null }, allowedUsage: { __typename: 'Limits', channels?: number | null, orders?: number | null, productVariants?: number | null, staffUsers?: number | null, warehouses?: number | null } } } }; + +export type CheckExportFileStatusQueryVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type CheckExportFileStatusQuery = { __typename: 'Query', exportFile: { __typename: 'ExportFile', id: string, status: JobStatusEnum } | null }; + +export type CheckOrderInvoicesStatusQueryVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type CheckOrderInvoicesStatusQuery = { __typename: 'Query', order: { __typename: 'Order', id: string, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null } | null }; + +export type UpdateCustomerMutationVariables = Exact<{ + id: Scalars['ID']; + input: CustomerInput; +}>; + + +export type UpdateCustomerMutation = { __typename: 'Mutation', customerUpdate: { __typename: 'CustomerUpdate', errors: Array<{ __typename: 'AccountError', code: AccountErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, user: { __typename: 'User', dateJoined: any, lastLogin: any | null, note: string | null, isActive: boolean, id: string, email: string, firstName: string, lastName: string, defaultShippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, defaultBillingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type CreateCustomerMutationVariables = Exact<{ + input: UserCreateInput; +}>; + + +export type CreateCustomerMutation = { __typename: 'Mutation', customerCreate: { __typename: 'CustomerCreate', errors: Array<{ __typename: 'AccountError', code: AccountErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, user: { __typename: 'User', id: string } | null } | null }; + +export type RemoveCustomerMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type RemoveCustomerMutation = { __typename: 'Mutation', customerDelete: { __typename: 'CustomerDelete', errors: Array<{ __typename: 'AccountError', code: AccountErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }> } | null }; + +export type SetCustomerDefaultAddressMutationVariables = Exact<{ + addressId: Scalars['ID']; + userId: Scalars['ID']; + type: AddressTypeEnum; +}>; + + +export type SetCustomerDefaultAddressMutation = { __typename: 'Mutation', addressSetDefault: { __typename: 'AddressSetDefault', errors: Array<{ __typename: 'AccountError', code: AccountErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string, addresses: Array<{ __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null> | null, defaultBillingAddress: { __typename: 'Address', id: string } | null, defaultShippingAddress: { __typename: 'Address', id: string } | null } | null } | null }; + +export type CreateCustomerAddressMutationVariables = Exact<{ + id: Scalars['ID']; + input: AddressInput; +}>; + + +export type CreateCustomerAddressMutation = { __typename: 'Mutation', addressCreate: { __typename: 'AddressCreate', errors: Array<{ __typename: 'AccountError', code: AccountErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, address: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string, addresses: Array<{ __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null> | null, defaultBillingAddress: { __typename: 'Address', id: string } | null, defaultShippingAddress: { __typename: 'Address', id: string } | null } | null } | null }; + +export type UpdateCustomerAddressMutationVariables = Exact<{ + id: Scalars['ID']; + input: AddressInput; +}>; + + +export type UpdateCustomerAddressMutation = { __typename: 'Mutation', addressUpdate: { __typename: 'AddressUpdate', errors: Array<{ __typename: 'AccountError', code: AccountErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, address: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null } | null }; + +export type RemoveCustomerAddressMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type RemoveCustomerAddressMutation = { __typename: 'Mutation', addressDelete: { __typename: 'AddressDelete', errors: Array<{ __typename: 'AccountError', code: AccountErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string, addresses: Array<{ __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null> | null, defaultBillingAddress: { __typename: 'Address', id: string } | null, defaultShippingAddress: { __typename: 'Address', id: string } | null } | null } | null }; + +export type BulkRemoveCustomersMutationVariables = Exact<{ + ids: Array> | InputMaybe; +}>; + + +export type BulkRemoveCustomersMutation = { __typename: 'Mutation', customerBulkDelete: { __typename: 'CustomerBulkDelete', errors: Array<{ __typename: 'AccountError', code: AccountErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }> } | null }; + +export type ListCustomersQueryVariables = Exact<{ + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + filter?: InputMaybe; + sort?: InputMaybe; + PERMISSION_MANAGE_ORDERS: Scalars['Boolean']; +}>; + + +export type ListCustomersQuery = { __typename: 'Query', customers: { __typename: 'UserCountableConnection', edges: Array<{ __typename: 'UserCountableEdge', node: { __typename: 'User', id: string, email: string, firstName: string, lastName: string, orders?: { __typename: 'OrderCountableConnection', totalCount: number | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type CustomerDetailsQueryVariables = Exact<{ + id: Scalars['ID']; + PERMISSION_MANAGE_ORDERS: Scalars['Boolean']; +}>; + + +export type CustomerDetailsQuery = { __typename: 'Query', user: { __typename: 'User', dateJoined: any, lastLogin: any | null, note: string | null, isActive: boolean, id: string, email: string, firstName: string, lastName: string, orders?: { __typename: 'OrderCountableConnection', edges: Array<{ __typename: 'OrderCountableEdge', node: { __typename: 'Order', id: string, created: any, number: string | null, paymentStatus: PaymentChargeStatusEnum, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', currency: string, amount: number } } } }> } | null, lastPlacedOrder: { __typename: 'OrderCountableConnection', edges: Array<{ __typename: 'OrderCountableEdge', node: { __typename: 'Order', id: string, created: any } }> } | null, defaultShippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, defaultBillingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null }; + +export type CustomerAddressesQueryVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type CustomerAddressesQuery = { __typename: 'Query', user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string, addresses: Array<{ __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null> | null, defaultBillingAddress: { __typename: 'Address', id: string } | null, defaultShippingAddress: { __typename: 'Address', id: string } | null } | null }; + +export type CustomerCreateDataQueryVariables = Exact<{ [key: string]: never; }>; + + +export type CustomerCreateDataQuery = { __typename: 'Query', shop: { __typename: 'Shop', countries: Array<{ __typename: 'CountryDisplay', code: string, country: string }> } }; + +export type SaleUpdateMutationVariables = Exact<{ + input: SaleInput; + id: Scalars['ID']; + channelInput: SaleChannelListingInput; +}>; + + +export type SaleUpdateMutation = { __typename: 'Mutation', saleUpdate: { __typename: 'SaleUpdate', errors: Array<{ __typename: 'DiscountError', code: DiscountErrorCode, field: string | null, channels: Array | null, message: string | null }> } | null, saleChannelListingUpdate: { __typename: 'SaleChannelListingUpdate', errors: Array<{ __typename: 'DiscountError', code: DiscountErrorCode, field: string | null, channels: Array | null, message: string | null }>, sale: { __typename: 'Sale', id: string, name: string, type: SaleType, startDate: any, endDate: any | null, channelListings: Array<{ __typename: 'SaleChannelListing', id: string, discountValue: number, currency: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type SaleCataloguesAddMutationVariables = Exact<{ + input: CatalogueInput; + id: Scalars['ID']; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}>; + + +export type SaleCataloguesAddMutation = { __typename: 'Mutation', saleCataloguesAdd: { __typename: 'SaleAddCatalogues', errors: Array<{ __typename: 'DiscountError', code: DiscountErrorCode, field: string | null, channels: Array | null, message: string | null }>, sale: { __typename: 'Sale', id: string, name: string, type: SaleType, startDate: any, endDate: any | null, variants: { __typename: 'ProductVariantCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'ProductVariantCountableEdge', node: { __typename: 'ProductVariant', id: string, name: string, product: { __typename: 'Product', id: string, name: string, thumbnail: { __typename: 'Image', url: string } | null, productType: { __typename: 'ProductType', id: string, name: string }, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null } } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, products: { __typename: 'ProductCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', id: string, name: string, productType: { __typename: 'ProductType', id: string, name: string }, thumbnail: { __typename: 'Image', url: string } | null, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, categories: { __typename: 'CategoryCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'CategoryCountableEdge', node: { __typename: 'Category', id: string, name: string, products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, collections: { __typename: 'CollectionCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'CollectionCountableEdge', node: { __typename: 'Collection', id: string, name: string, products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, channelListings: Array<{ __typename: 'SaleChannelListing', id: string, discountValue: number, currency: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type SaleCataloguesRemoveMutationVariables = Exact<{ + input: CatalogueInput; + id: Scalars['ID']; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}>; + + +export type SaleCataloguesRemoveMutation = { __typename: 'Mutation', saleCataloguesRemove: { __typename: 'SaleRemoveCatalogues', errors: Array<{ __typename: 'DiscountError', code: DiscountErrorCode, field: string | null, channels: Array | null, message: string | null }>, sale: { __typename: 'Sale', id: string, name: string, type: SaleType, startDate: any, endDate: any | null, variants: { __typename: 'ProductVariantCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'ProductVariantCountableEdge', node: { __typename: 'ProductVariant', id: string, name: string, product: { __typename: 'Product', id: string, name: string, thumbnail: { __typename: 'Image', url: string } | null, productType: { __typename: 'ProductType', id: string, name: string }, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null } } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, products: { __typename: 'ProductCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', id: string, name: string, productType: { __typename: 'ProductType', id: string, name: string }, thumbnail: { __typename: 'Image', url: string } | null, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, categories: { __typename: 'CategoryCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'CategoryCountableEdge', node: { __typename: 'Category', id: string, name: string, products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, collections: { __typename: 'CollectionCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'CollectionCountableEdge', node: { __typename: 'Collection', id: string, name: string, products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, channelListings: Array<{ __typename: 'SaleChannelListing', id: string, discountValue: number, currency: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type SaleCreateMutationVariables = Exact<{ + input: SaleInput; +}>; + + +export type SaleCreateMutation = { __typename: 'Mutation', saleCreate: { __typename: 'SaleCreate', errors: Array<{ __typename: 'DiscountError', code: DiscountErrorCode, field: string | null, channels: Array | null, message: string | null }>, sale: { __typename: 'Sale', id: string, name: string, type: SaleType, startDate: any, endDate: any | null, channelListings: Array<{ __typename: 'SaleChannelListing', id: string, discountValue: number, currency: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type SaleDeleteMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type SaleDeleteMutation = { __typename: 'Mutation', saleDelete: { __typename: 'SaleDelete', errors: Array<{ __typename: 'DiscountError', code: DiscountErrorCode, field: string | null, channels: Array | null, message: string | null }> } | null }; + +export type SaleBulkDeleteMutationVariables = Exact<{ + ids: Array> | InputMaybe; +}>; + + +export type SaleBulkDeleteMutation = { __typename: 'Mutation', saleBulkDelete: { __typename: 'SaleBulkDelete', errors: Array<{ __typename: 'DiscountError', code: DiscountErrorCode, field: string | null, message: string | null }> } | null }; + +export type SaleChannelListingUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: SaleChannelListingInput; +}>; + + +export type SaleChannelListingUpdateMutation = { __typename: 'Mutation', saleChannelListingUpdate: { __typename: 'SaleChannelListingUpdate', errors: Array<{ __typename: 'DiscountError', code: DiscountErrorCode, field: string | null, channels: Array | null, message: string | null }>, sale: { __typename: 'Sale', id: string, name: string, type: SaleType, startDate: any, endDate: any | null, channelListings: Array<{ __typename: 'SaleChannelListing', id: string, discountValue: number, currency: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type VoucherChannelListingUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: VoucherChannelListingInput; +}>; + + +export type VoucherChannelListingUpdateMutation = { __typename: 'Mutation', voucherChannelListingUpdate: { __typename: 'VoucherChannelListingUpdate', errors: Array<{ __typename: 'DiscountError', code: DiscountErrorCode, field: string | null, channels: Array | null, message: string | null }>, voucher: { __typename: 'Voucher', id: string, code: string, startDate: any, endDate: any | null, usageLimit: number | null, type: VoucherTypeEnum, discountValueType: DiscountValueTypeEnum, minCheckoutItemsQuantity: number | null, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string } | null> | null, channelListings: Array<{ __typename: 'VoucherChannelListing', id: string, discountValue: number, currency: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, minSpent: { __typename: 'Money', amount: number, currency: string } | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type VoucherUpdateMutationVariables = Exact<{ + input: VoucherInput; + id: Scalars['ID']; +}>; + + +export type VoucherUpdateMutation = { __typename: 'Mutation', voucherUpdate: { __typename: 'VoucherUpdate', errors: Array<{ __typename: 'DiscountError', code: DiscountErrorCode, field: string | null, channels: Array | null, message: string | null }>, voucher: { __typename: 'Voucher', id: string, code: string, startDate: any, endDate: any | null, usageLimit: number | null, type: VoucherTypeEnum, discountValueType: DiscountValueTypeEnum, minCheckoutItemsQuantity: number | null, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string } | null> | null, channelListings: Array<{ __typename: 'VoucherChannelListing', id: string, discountValue: number, currency: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, minSpent: { __typename: 'Money', amount: number, currency: string } | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type VoucherCataloguesAddMutationVariables = Exact<{ + input: CatalogueInput; + id: Scalars['ID']; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}>; + + +export type VoucherCataloguesAddMutation = { __typename: 'Mutation', voucherCataloguesAdd: { __typename: 'VoucherAddCatalogues', errors: Array<{ __typename: 'DiscountError', code: DiscountErrorCode, field: string | null, channels: Array | null, message: string | null }>, voucher: { __typename: 'Voucher', code: string, usageLimit: number | null, used: number, applyOncePerOrder: boolean, applyOncePerCustomer: boolean, onlyForStaff: boolean, id: string, startDate: any, endDate: any | null, type: VoucherTypeEnum, discountValueType: DiscountValueTypeEnum, minCheckoutItemsQuantity: number | null, products: { __typename: 'ProductCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', id: string, name: string, productType: { __typename: 'ProductType', id: string, name: string }, thumbnail: { __typename: 'Image', url: string } | null, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, collections: { __typename: 'CollectionCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'CollectionCountableEdge', node: { __typename: 'Collection', id: string, name: string, products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, categories: { __typename: 'CategoryCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'CategoryCountableEdge', node: { __typename: 'Category', id: string, name: string, products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string } | null> | null, channelListings: Array<{ __typename: 'VoucherChannelListing', id: string, discountValue: number, currency: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, minSpent: { __typename: 'Money', amount: number, currency: string } | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type VoucherCataloguesRemoveMutationVariables = Exact<{ + input: CatalogueInput; + id: Scalars['ID']; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}>; + + +export type VoucherCataloguesRemoveMutation = { __typename: 'Mutation', voucherCataloguesRemove: { __typename: 'VoucherRemoveCatalogues', errors: Array<{ __typename: 'DiscountError', code: DiscountErrorCode, field: string | null, channels: Array | null, message: string | null }>, voucher: { __typename: 'Voucher', code: string, usageLimit: number | null, used: number, applyOncePerOrder: boolean, applyOncePerCustomer: boolean, onlyForStaff: boolean, id: string, startDate: any, endDate: any | null, type: VoucherTypeEnum, discountValueType: DiscountValueTypeEnum, minCheckoutItemsQuantity: number | null, products: { __typename: 'ProductCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', id: string, name: string, productType: { __typename: 'ProductType', id: string, name: string }, thumbnail: { __typename: 'Image', url: string } | null, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, collections: { __typename: 'CollectionCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'CollectionCountableEdge', node: { __typename: 'Collection', id: string, name: string, products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, categories: { __typename: 'CategoryCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'CategoryCountableEdge', node: { __typename: 'Category', id: string, name: string, products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string } | null> | null, channelListings: Array<{ __typename: 'VoucherChannelListing', id: string, discountValue: number, currency: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, minSpent: { __typename: 'Money', amount: number, currency: string } | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type VoucherCreateMutationVariables = Exact<{ + input: VoucherInput; +}>; + + +export type VoucherCreateMutation = { __typename: 'Mutation', voucherCreate: { __typename: 'VoucherCreate', errors: Array<{ __typename: 'DiscountError', code: DiscountErrorCode, field: string | null, channels: Array | null, message: string | null }>, voucher: { __typename: 'Voucher', id: string, code: string, startDate: any, endDate: any | null, usageLimit: number | null, type: VoucherTypeEnum, discountValueType: DiscountValueTypeEnum, minCheckoutItemsQuantity: number | null, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string } | null> | null, channelListings: Array<{ __typename: 'VoucherChannelListing', id: string, discountValue: number, currency: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, minSpent: { __typename: 'Money', amount: number, currency: string } | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type VoucherDeleteMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type VoucherDeleteMutation = { __typename: 'Mutation', voucherDelete: { __typename: 'VoucherDelete', errors: Array<{ __typename: 'DiscountError', code: DiscountErrorCode, field: string | null, channels: Array | null, message: string | null }> } | null }; + +export type VoucherBulkDeleteMutationVariables = Exact<{ + ids: Array> | InputMaybe; +}>; + + +export type VoucherBulkDeleteMutation = { __typename: 'Mutation', voucherBulkDelete: { __typename: 'VoucherBulkDelete', errors: Array<{ __typename: 'DiscountError', code: DiscountErrorCode, field: string | null, message: string | null }> } | null }; + +export type SaleListQueryVariables = Exact<{ + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + filter?: InputMaybe; + sort?: InputMaybe; + channel?: InputMaybe; +}>; + + +export type SaleListQuery = { __typename: 'Query', sales: { __typename: 'SaleCountableConnection', edges: Array<{ __typename: 'SaleCountableEdge', node: { __typename: 'Sale', id: string, name: string, type: SaleType, startDate: any, endDate: any | null, channelListings: Array<{ __typename: 'SaleChannelListing', id: string, discountValue: number, currency: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type VoucherListQueryVariables = Exact<{ + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + filter?: InputMaybe; + sort?: InputMaybe; + channel?: InputMaybe; +}>; + + +export type VoucherListQuery = { __typename: 'Query', vouchers: { __typename: 'VoucherCountableConnection', edges: Array<{ __typename: 'VoucherCountableEdge', node: { __typename: 'Voucher', id: string, code: string, startDate: any, endDate: any | null, usageLimit: number | null, type: VoucherTypeEnum, discountValueType: DiscountValueTypeEnum, minCheckoutItemsQuantity: number | null, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string } | null> | null, channelListings: Array<{ __typename: 'VoucherChannelListing', id: string, discountValue: number, currency: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, minSpent: { __typename: 'Money', amount: number, currency: string } | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type SaleDetailsQueryVariables = Exact<{ + id: Scalars['ID']; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}>; + + +export type SaleDetailsQuery = { __typename: 'Query', sale: { __typename: 'Sale', id: string, name: string, type: SaleType, startDate: any, endDate: any | null, variants: { __typename: 'ProductVariantCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'ProductVariantCountableEdge', node: { __typename: 'ProductVariant', id: string, name: string, product: { __typename: 'Product', id: string, name: string, thumbnail: { __typename: 'Image', url: string } | null, productType: { __typename: 'ProductType', id: string, name: string }, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null } } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, products: { __typename: 'ProductCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', id: string, name: string, productType: { __typename: 'ProductType', id: string, name: string }, thumbnail: { __typename: 'Image', url: string } | null, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, categories: { __typename: 'CategoryCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'CategoryCountableEdge', node: { __typename: 'Category', id: string, name: string, products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, collections: { __typename: 'CollectionCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'CollectionCountableEdge', node: { __typename: 'Collection', id: string, name: string, products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, channelListings: Array<{ __typename: 'SaleChannelListing', id: string, discountValue: number, currency: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null }; + +export type VoucherDetailsQueryVariables = Exact<{ + id: Scalars['ID']; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}>; + + +export type VoucherDetailsQuery = { __typename: 'Query', voucher: { __typename: 'Voucher', code: string, usageLimit: number | null, used: number, applyOncePerOrder: boolean, applyOncePerCustomer: boolean, onlyForStaff: boolean, id: string, startDate: any, endDate: any | null, type: VoucherTypeEnum, discountValueType: DiscountValueTypeEnum, minCheckoutItemsQuantity: number | null, products: { __typename: 'ProductCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', id: string, name: string, productType: { __typename: 'ProductType', id: string, name: string }, thumbnail: { __typename: 'Image', url: string } | null, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, collections: { __typename: 'CollectionCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'CollectionCountableEdge', node: { __typename: 'Collection', id: string, name: string, products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, categories: { __typename: 'CategoryCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'CategoryCountableEdge', node: { __typename: 'Category', id: string, name: string, products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string } | null> | null, channelListings: Array<{ __typename: 'VoucherChannelListing', id: string, discountValue: number, currency: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, minSpent: { __typename: 'Money', amount: number, currency: string } | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null }; + +export type FileUploadMutationVariables = Exact<{ + file: Scalars['Upload']; +}>; + + +export type FileUploadMutation = { __typename: 'Mutation', fileUpload: { __typename: 'FileUpload', uploadedFile: { __typename: 'File', url: string, contentType: string | null } | null, errors: Array<{ __typename: 'UploadError', code: UploadErrorCode, field: string | null, message: string | null }> } | null }; + +export type AddressFragment = { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } }; + +export type AppFragment = { __typename: 'App', id: string, name: string | null, created: any | null, isActive: boolean | null, type: AppTypeEnum | null, homepageUrl: string | null, appUrl: string | null, configurationUrl: string | null, supportUrl: string | null, version: string | null, accessToken: string | null, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, tokens: Array<{ __typename: 'AppToken', authToken: string | null, id: string, name: string | null } | null> | null, webhooks: Array<{ __typename: 'Webhook', id: string, name: string, isActive: boolean, app: { __typename: 'App', id: string, name: string | null } } | null> | null }; + +export type AttributeValueFragment = { __typename: 'AttributeValue', id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null }; + +export type AttributeValueDetailsFragment = { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null }; + +export type AttributeFragment = { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }; + +export type AttributeDetailsFragment = { __typename: 'Attribute', availableInGrid: boolean, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, unit: MeasurementUnitsEnum | null, storefrontSearchPosition: number, valueRequired: boolean, id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +export type AttributeValueListFragment = { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> }; + +export type AvailableAttributeFragment = { __typename: 'Attribute', id: string, name: string | null, slug: string | null }; + +export type UserPermissionFragment = { __typename: 'UserPermission', code: PermissionEnum, name: string }; + +export type UserFragment = { __typename: 'User', id: string, email: string, firstName: string, lastName: string, isStaff: boolean, userPermissions: Array<{ __typename: 'UserPermission', code: PermissionEnum, name: string } | null> | null, avatar: { __typename: 'Image', url: string } | null }; + +export type UserBaseFragment = { __typename: 'User', id: string, firstName: string, lastName: string }; + +export type CategoryFragment = { __typename: 'Category', id: string, name: string, children: { __typename: 'CategoryCountableConnection', totalCount: number | null } | null, products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null }; + +export type CategoryDetailsFragment = { __typename: 'Category', id: string, name: string, slug: string, description: any | null, seoDescription: string | null, seoTitle: string | null, backgroundImage: { __typename: 'Image', alt: string | null, url: string } | null, parent: { __typename: 'Category', id: string } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +export type ChannelErrorFragment = { __typename: 'ChannelError', code: ChannelErrorCode, field: string | null, message: string | null }; + +export type ChannelFragment = { __typename: 'Channel', id: string, isActive: boolean, name: string, slug: string, currencyCode: string, defaultCountry: { __typename: 'CountryDisplay', code: string, country: string } }; + +export type ChannelDetailsFragment = { __typename: 'Channel', hasOrders: boolean, id: string, isActive: boolean, name: string, slug: string, currencyCode: string, defaultCountry: { __typename: 'CountryDisplay', code: string, country: string } }; + +export type CollectionFragment = { __typename: 'Collection', id: string, name: string, channelListings: Array<{ __typename: 'CollectionChannelListing', isPublished: boolean, publicationDate: any | null, channel: { __typename: 'Channel', id: string, name: string } }> | null }; + +export type CollectionDetailsFragment = { __typename: 'Collection', slug: string, description: any | null, seoDescription: string | null, seoTitle: string | null, id: string, name: string, backgroundImage: { __typename: 'Image', alt: string | null, url: string } | null, channelListings: Array<{ __typename: 'CollectionChannelListing', isPublished: boolean, publicationDate: any | null, channel: { __typename: 'Channel', id: string, name: string } }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +export type CollectionProductFragment = { __typename: 'Product', id: string, name: string, productType: { __typename: 'ProductType', id: string, name: string }, thumbnail: { __typename: 'Image', url: string } | null, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null }; + +export type CustomerFragment = { __typename: 'User', id: string, email: string, firstName: string, lastName: string }; + +export type CustomerDetailsFragment = { __typename: 'User', dateJoined: any, lastLogin: any | null, note: string | null, isActive: boolean, id: string, email: string, firstName: string, lastName: string, defaultShippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, defaultBillingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +export type CustomerAddressesFragment = { __typename: 'User', id: string, email: string, firstName: string, lastName: string, addresses: Array<{ __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null> | null, defaultBillingAddress: { __typename: 'Address', id: string } | null, defaultShippingAddress: { __typename: 'Address', id: string } | null }; + +export type SaleFragment = { __typename: 'Sale', id: string, name: string, type: SaleType, startDate: any, endDate: any | null, channelListings: Array<{ __typename: 'SaleChannelListing', id: string, discountValue: number, currency: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +export type SaleDetailsFragment = { __typename: 'Sale', id: string, name: string, type: SaleType, startDate: any, endDate: any | null, variants: { __typename: 'ProductVariantCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'ProductVariantCountableEdge', node: { __typename: 'ProductVariant', id: string, name: string, product: { __typename: 'Product', id: string, name: string, thumbnail: { __typename: 'Image', url: string } | null, productType: { __typename: 'ProductType', id: string, name: string }, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null } } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, products: { __typename: 'ProductCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', id: string, name: string, productType: { __typename: 'ProductType', id: string, name: string }, thumbnail: { __typename: 'Image', url: string } | null, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, categories: { __typename: 'CategoryCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'CategoryCountableEdge', node: { __typename: 'Category', id: string, name: string, products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, collections: { __typename: 'CollectionCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'CollectionCountableEdge', node: { __typename: 'Collection', id: string, name: string, products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, channelListings: Array<{ __typename: 'SaleChannelListing', id: string, discountValue: number, currency: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +export type VoucherFragment = { __typename: 'Voucher', id: string, code: string, startDate: any, endDate: any | null, usageLimit: number | null, type: VoucherTypeEnum, discountValueType: DiscountValueTypeEnum, minCheckoutItemsQuantity: number | null, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string } | null> | null, channelListings: Array<{ __typename: 'VoucherChannelListing', id: string, discountValue: number, currency: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, minSpent: { __typename: 'Money', amount: number, currency: string } | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +export type VoucherDetailsFragment = { __typename: 'Voucher', code: string, usageLimit: number | null, used: number, applyOncePerOrder: boolean, applyOncePerCustomer: boolean, onlyForStaff: boolean, id: string, startDate: any, endDate: any | null, type: VoucherTypeEnum, discountValueType: DiscountValueTypeEnum, minCheckoutItemsQuantity: number | null, products: { __typename: 'ProductCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', id: string, name: string, productType: { __typename: 'ProductType', id: string, name: string }, thumbnail: { __typename: 'Image', url: string } | null, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, collections: { __typename: 'CollectionCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'CollectionCountableEdge', node: { __typename: 'Collection', id: string, name: string, products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, categories: { __typename: 'CategoryCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'CategoryCountableEdge', node: { __typename: 'Category', id: string, name: string, products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string } | null> | null, channelListings: Array<{ __typename: 'VoucherChannelListing', id: string, discountValue: number, currency: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, minSpent: { __typename: 'Money', amount: number, currency: string } | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +export type AttributeErrorFragment = { __typename: 'AttributeError', code: AttributeErrorCode, field: string | null, message: string | null }; + +export type ProductErrorFragment = { __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }; + +export type ProductErrorWithAttributesFragment = { __typename: 'ProductError', attributes: Array | null, code: ProductErrorCode, field: string | null, message: string | null }; + +export type ProductChannelListingErrorFragment = { __typename: 'ProductChannelListingError', code: ProductErrorCode, field: string | null, message: string | null, channels: Array | null }; + +export type CollectionChannelListingErrorFragment = { __typename: 'CollectionChannelListingError', code: ProductErrorCode, field: string | null, message: string | null, channels: Array | null }; + +export type AccountErrorFragment = { __typename: 'AccountError', code: AccountErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }; + +export type DiscountErrorFragment = { __typename: 'DiscountError', code: DiscountErrorCode, field: string | null, channels: Array | null, message: string | null }; + +export type MenuErrorFragment = { __typename: 'MenuError', code: MenuErrorCode, field: string | null, message: string | null }; + +export type OrderErrorFragment = { __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }; + +export type OrderSettingsErrorFragment = { __typename: 'OrderSettingsError', code: OrderSettingsErrorCode, field: string | null, message: string | null }; + +export type PageErrorFragment = { __typename: 'PageError', code: PageErrorCode, field: string | null, message: string | null }; + +export type PageErrorWithAttributesFragment = { __typename: 'PageError', attributes: Array | null, code: PageErrorCode, field: string | null, message: string | null }; + +export type PermissionGroupErrorFragment = { __typename: 'PermissionGroupError', code: PermissionGroupErrorCode, field: string | null, message: string | null }; + +export type BulkProductErrorFragment = { __typename: 'BulkProductError', field: string | null, code: ProductErrorCode, index: number | null, channels: Array | null, message: string | null }; + +export type BulkStockErrorFragment = { __typename: 'BulkStockError', code: ProductErrorCode, field: string | null, index: number | null, message: string | null }; + +export type StockErrorFragment = { __typename: 'StockError', code: StockErrorCode, field: string | null, message: string | null }; + +export type ShippingChannelsErrorFragment = { __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, channels: Array | null, message: string | null }; + +export type ShippingErrorFragment = { __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, message: string | null }; + +export type ShopErrorFragment = { __typename: 'ShopError', code: ShopErrorCode, field: string | null, message: string | null }; + +export type StaffErrorFragment = { __typename: 'StaffError', code: AccountErrorCode, field: string | null, message: string | null }; + +export type WarehouseErrorFragment = { __typename: 'WarehouseError', code: WarehouseErrorCode, field: string | null, message: string | null }; + +export type WebhookErrorFragment = { __typename: 'WebhookError', code: WebhookErrorCode, field: string | null, message: string | null }; + +export type InvoiceErrorFragment = { __typename: 'InvoiceError', code: InvoiceErrorCode, field: string | null, message: string | null }; + +export type AppErrorFragment = { __typename: 'AppError', field: string | null, message: string | null, code: AppErrorCode, permissions: Array | null }; + +export type ExportErrorFragment = { __typename: 'ExportError', code: ExportErrorCode, field: string | null, message: string | null }; + +export type PluginErrorFragment = { __typename: 'PluginError', code: PluginErrorCode, field: string | null, message: string | null }; + +export type MetadataErrorFragment = { __typename: 'MetadataError', code: MetadataErrorCode, field: string | null, message: string | null }; + +export type CollectionErrorFragment = { __typename: 'CollectionError', code: CollectionErrorCode, field: string | null, message: string | null }; + +export type UploadErrorFragment = { __typename: 'UploadError', code: UploadErrorCode, field: string | null, message: string | null }; + +export type GiftCardErrorFragment = { __typename: 'GiftCardError', code: GiftCardErrorCode, field: string | null, message: string | null }; + +export type GiftCardSettingsErrorFragment = { __typename: 'GiftCardSettingsError', code: GiftCardSettingsErrorCode, field: string | null, message: string | null }; + +export type SaleBulkDeleteErrorFragment = { __typename: 'DiscountError', code: DiscountErrorCode, field: string | null, message: string | null }; + +export type VoucherBulkDeleteErrorFragment = { __typename: 'DiscountError', code: DiscountErrorCode, field: string | null, message: string | null }; + +export type GiftCardBulkCreateErrorFragmentFragment = { __typename: 'GiftCardError', code: GiftCardErrorCode, field: string | null, message: string | null }; + +export type GiftCardCreateErrorFragmentFragment = { __typename: 'GiftCardError', code: GiftCardErrorCode, field: string | null, message: string | null }; + +export type PageBulkPublishErrorFragmentFragment = { __typename: 'PageError', code: PageErrorCode, field: string | null, message: string | null }; + +export type PageBulkRemoveErrorFragmentFragment = { __typename: 'PageError', code: PageErrorCode, field: string | null, message: string | null }; + +export type PageTypeDeleteErrorFragmentFragment = { __typename: 'PageError', code: PageErrorCode, field: string | null, message: string | null }; + +export type ProductVariantStocksDeleteErrorFragment = { __typename: 'StockError', code: StockErrorCode, field: string | null, message: string | null }; + +export type ProductTypeDeleteErrorFragmentFragment = { __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }; + +export type ProductTypeBulkDeleteErrorFragmentFragment = { __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }; + +export type ProductTypeBulkUpdateErrorFragmentFragment = { __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }; + +export type ProductAttributeAssignErrorFragmentFragment = { __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }; + +export type ProductAttributeUnassignErrorFragmentFragment = { __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }; + +export type ProductTypeCreateErrorFragmentFragment = { __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }; + +export type ProductTypeReorderAttributesErrorFragmentFragment = { __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }; + +export type ProductAttributeAssignmentUpdateErrorFragmentFragment = { __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null, attributes: Array | null }; + +export type ShopSettingsUpdateErrorFragmentFragment = { __typename: 'ShopError', code: ShopErrorCode, field: string | null, message: string | null }; + +export type ShopFetchTaxRatesErrorFragmentFragment = { __typename: 'ShopError', code: ShopErrorCode, field: string | null, message: string | null }; + +export type ProductTranslateErrorFragmentFragment = { __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }; + +export type ProductVariantTranslateErrorFragmentFragment = { __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }; + +export type CategoryTranslateErrorFragmentFragment = { __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }; + +export type CollectionTranslateErrorFragmentFragment = { __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }; + +export type PageTranslateErrorFragmentFragment = { __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }; + +export type VoucherTranslateErrorFragmentFragment = { __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }; + +export type SaleTranslateErrorFragmentFragment = { __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }; + +export type AttributeTranslateErrorFragmentFragment = { __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }; + +export type AttributeValueTranslateErrorFragmentFragment = { __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }; + +export type ShippingPriceTranslateErrorFragmentFragment = { __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }; + +export type FileFragment = { __typename: 'File', url: string, contentType: string | null }; + +export type GiftCardsSettingsFragment = { __typename: 'GiftCardSettings', expiryType: GiftCardSettingsExpiryTypeEnum, expiryPeriod: { __typename: 'TimePeriod', type: TimePeriodTypeEnum, amount: number } | null }; + +export type GiftCardEventFragment = { __typename: 'GiftCardEvent', expiryDate: any | null, oldExpiryDate: any | null, id: string, date: any | null, type: GiftCardEventsEnum | null, message: string | null, email: string | null, orderId: string | null, orderNumber: string | null, tags: Array | null, oldTags: Array | null, user: { __typename: 'User', email: string, id: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null } | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }; + +export type GiftCardDataFragment = { __typename: 'GiftCard', last4CodeChars: string, boughtInChannel: string | null, usedByEmail: string | null, createdByEmail: string | null, created: any, expiryDate: any | null, lastUsedOn: any | null, isActive: boolean, id: string, createdBy: { __typename: 'User', id: string, firstName: string, lastName: string } | null, product: { __typename: 'Product', id: string, name: string } | null, usedBy: { __typename: 'User', id: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null } | null, initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string } | null, tags: Array<{ __typename: 'GiftCardTag', name: string }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +export type CustomerGiftCardFragment = { __typename: 'GiftCard', id: string, last4CodeChars: string, expiryDate: any | null, isActive: boolean, currentBalance: { __typename: 'Money', amount: number, currency: string } | null }; + +export type MetadataItemFragment = { __typename: 'MetadataItem', key: string, value: string }; + +type Metadata_App_Fragment = { __typename: 'App', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_Attribute_Fragment = { __typename: 'Attribute', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_Category_Fragment = { __typename: 'Category', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_Checkout_Fragment = { __typename: 'Checkout', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_Collection_Fragment = { __typename: 'Collection', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_DigitalContent_Fragment = { __typename: 'DigitalContent', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_Fulfillment_Fragment = { __typename: 'Fulfillment', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_GiftCard_Fragment = { __typename: 'GiftCard', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_Invoice_Fragment = { __typename: 'Invoice', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_Menu_Fragment = { __typename: 'Menu', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_MenuItem_Fragment = { __typename: 'MenuItem', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_Order_Fragment = { __typename: 'Order', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_Page_Fragment = { __typename: 'Page', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_PageType_Fragment = { __typename: 'PageType', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_Payment_Fragment = { __typename: 'Payment', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_Product_Fragment = { __typename: 'Product', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_ProductType_Fragment = { __typename: 'ProductType', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_ProductVariant_Fragment = { __typename: 'ProductVariant', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_Sale_Fragment = { __typename: 'Sale', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_ShippingMethod_Fragment = { __typename: 'ShippingMethod', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_ShippingMethodType_Fragment = { __typename: 'ShippingMethodType', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_ShippingZone_Fragment = { __typename: 'ShippingZone', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_User_Fragment = { __typename: 'User', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_Voucher_Fragment = { __typename: 'Voucher', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +type Metadata_Warehouse_Fragment = { __typename: 'Warehouse', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +export type MetadataFragment = Metadata_App_Fragment | Metadata_Attribute_Fragment | Metadata_Category_Fragment | Metadata_Checkout_Fragment | Metadata_Collection_Fragment | Metadata_DigitalContent_Fragment | Metadata_Fulfillment_Fragment | Metadata_GiftCard_Fragment | Metadata_Invoice_Fragment | Metadata_Menu_Fragment | Metadata_MenuItem_Fragment | Metadata_Order_Fragment | Metadata_Page_Fragment | Metadata_PageType_Fragment | Metadata_Payment_Fragment | Metadata_Product_Fragment | Metadata_ProductType_Fragment | Metadata_ProductVariant_Fragment | Metadata_Sale_Fragment | Metadata_ShippingMethod_Fragment | Metadata_ShippingMethodType_Fragment | Metadata_ShippingZone_Fragment | Metadata_User_Fragment | Metadata_Voucher_Fragment | Metadata_Warehouse_Fragment; + +export type MenuFragment = { __typename: 'Menu', id: string, name: string, items: Array<{ __typename: 'MenuItem', id: string } | null> | null }; + +export type MenuItemFragment = { __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null }; + +export type MenuItemNestedFragment = { __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null }; + +export type MenuDetailsFragment = { __typename: 'Menu', id: string, name: string, items: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null }; + +export type OrderEventFragment = { __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null }; + +export type OrderLineFragment = { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null }; + +export type RefundOrderLineFragment = { __typename: 'OrderLine', id: string, productName: string, quantity: number, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null }; + +export type FulfillmentFragment = { __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null }; + +export type InvoiceFragment = { __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum }; + +export type OrderDetailsFragment = { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +export type OrderSettingsFragment = { __typename: 'OrderSettings', automaticallyConfirmAllNewOrders: boolean, automaticallyFulfillNonShippableGiftCard: boolean }; + +export type ShopOrderSettingsFragment = { __typename: 'Shop', fulfillmentAutoApprove: boolean, fulfillmentAllowUnpaid: boolean }; + +export type PageInfoFragment = { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }; + +export type PageTypeFragment = { __typename: 'PageType', id: string, name: string, hasPages: boolean | null }; + +export type PageTypeDetailsFragment = { __typename: 'PageType', id: string, name: string, hasPages: boolean | null, attributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +export type PageFragment = { __typename: 'Page', id: string, title: string, slug: string, isPublished: boolean }; + +export type PageSelectedAttributeFragment = { __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, slug: string | null, name: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }; + +export type PageAttributesFragment = { __typename: 'Page', attributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, slug: string | null, name: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, pageType: { __typename: 'PageType', id: string, name: string, attributes: Array<{ __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null } | null> | null } }; + +export type PageDetailsFragment = { __typename: 'Page', content: any | null, seoTitle: string | null, seoDescription: string | null, publicationDate: any | null, id: string, title: string, slug: string, isPublished: boolean, attributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, slug: string | null, name: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, pageType: { __typename: 'PageType', id: string, name: string, attributes: Array<{ __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null } | null> | null }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +export type PermissionGroupFragment = { __typename: 'Group', id: string, name: string, userCanManage: boolean, users: Array<{ __typename: 'User', id: string, firstName: string, lastName: string } | null> | null }; + +export type PermissionFragment = { __typename: 'Permission', code: PermissionEnum, name: string }; + +export type PermissionGroupMemberFragment = { __typename: 'User', id: string, email: string, firstName: string, isActive: boolean, lastName: string, avatar: { __typename: 'Image', url: string } | null }; + +export type PermissionGroupDetailsFragment = { __typename: 'Group', id: string, name: string, userCanManage: boolean, permissions: Array<{ __typename: 'Permission', code: PermissionEnum, name: string } | null> | null, users: Array<{ __typename: 'User', id: string, firstName: string, lastName: string, email: string, isActive: boolean, avatar: { __typename: 'Image', url: string } | null } | null> | null }; + +export type ConfigurationItemFragment = { __typename: 'ConfigurationItem', name: string, value: string | null, type: ConfigurationTypeFieldEnum | null, helpText: string | null, label: string | null }; + +export type PluginConfigurationBaseFragment = { __typename: 'PluginConfiguration', active: boolean, channel: { __typename: 'Channel', id: string, name: string, slug: string } | null }; + +export type PluginConfigurationExtendedFragment = { __typename: 'PluginConfiguration', active: boolean, configuration: Array<{ __typename: 'ConfigurationItem', name: string, value: string | null, type: ConfigurationTypeFieldEnum | null, helpText: string | null, label: string | null } | null> | null, channel: { __typename: 'Channel', id: string, name: string, slug: string } | null }; + +export type PluginBaseFragment = { __typename: 'Plugin', id: string, name: string, description: string, channelConfigurations: Array<{ __typename: 'PluginConfiguration', active: boolean, channel: { __typename: 'Channel', id: string, name: string, slug: string } | null }>, globalConfiguration: { __typename: 'PluginConfiguration', active: boolean, channel: { __typename: 'Channel', id: string, name: string, slug: string } | null } | null }; + +export type PluginsDetailsFragment = { __typename: 'Plugin', id: string, name: string, description: string, globalConfiguration: { __typename: 'PluginConfiguration', active: boolean, configuration: Array<{ __typename: 'ConfigurationItem', name: string, value: string | null, type: ConfigurationTypeFieldEnum | null, helpText: string | null, label: string | null } | null> | null, channel: { __typename: 'Channel', id: string, name: string, slug: string } | null } | null, channelConfigurations: Array<{ __typename: 'PluginConfiguration', active: boolean, configuration: Array<{ __typename: 'ConfigurationItem', name: string, value: string | null, type: ConfigurationTypeFieldEnum | null, helpText: string | null, label: string | null } | null> | null, channel: { __typename: 'Channel', id: string, name: string, slug: string } | null }> }; + +export type ProductTypeFragment = { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null }; + +export type ProductTypeDetailsFragment = { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } } | null> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +export type StockFragment = { __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } }; + +export type MoneyFragment = { __typename: 'Money', amount: number, currency: string }; + +export type PreorderFragment = { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null }; + +export type PriceRangeFragment = { __typename: 'TaxedMoneyRange', start: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string } } | null, stop: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string } } | null }; + +export type ProductMediaFragment = { __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }; + +export type ChannelListingProductWithoutPricingFragment = { __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }; + +export type ChannelListingProductFragment = { __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, pricing: { __typename: 'ProductPricingInfo', priceRange: { __typename: 'TaxedMoneyRange', start: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string } } | null, stop: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string } } | null } | null } | null, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }; + +export type ChannelListingProductVariantFragment = { __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }; + +export type ProductWithChannelListingsFragment = { __typename: 'Product', id: string, name: string, thumbnail: { __typename: 'Image', url: string } | null, productType: { __typename: 'ProductType', id: string, name: string, hasVariants: boolean }, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, pricing?: { __typename: 'ProductPricingInfo', priceRange: { __typename: 'TaxedMoneyRange', start: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string } } | null, stop: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string } } | null } | null } | null, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null }; + +export type ProductVariantAttributesFragment = { __typename: 'Product', id: string, attributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, slug: string | null, name: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, productType: { __typename: 'ProductType', id: string, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null } | null> | null }, channelListings: Array<{ __typename: 'ProductChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null }; + +export type ProductDetailsVariantFragment = { __typename: 'ProductVariant', id: string, sku: string | null, name: string, margin: number | null, trackInventory: boolean, quantityLimitPerCustomer: number | null, media: Array<{ __typename: 'ProductMedia', url: string }> | null, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } } | null> | null, preorder: { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null } | null, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null }; + +export type ProductFragment = { __typename: 'Product', name: string, slug: string, description: any | null, seoTitle: string | null, seoDescription: string | null, rating: number | null, chargeTaxes: boolean, isAvailable: boolean | null, id: string, defaultVariant: { __typename: 'ProductVariant', id: string } | null, category: { __typename: 'Category', id: string, name: string } | null, collections: Array<{ __typename: 'Collection', id: string, name: string } | null> | null, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, variants: Array<{ __typename: 'ProductVariant', id: string, sku: string | null, name: string, margin: number | null, trackInventory: boolean, quantityLimitPerCustomer: number | null, media: Array<{ __typename: 'ProductMedia', url: string }> | null, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } } | null> | null, preorder: { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null } | null, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null } | null> | null, productType: { __typename: 'ProductType', id: string, name: string, hasVariants: boolean, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null } | null> | null }, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, attributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, slug: string | null, name: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +export type VariantAttributeFragment = { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }; + +export type SelectedVariantAttributeFragment = { __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }; + +export type ProductVariantFragment = { __typename: 'ProductVariant', id: string, name: string, sku: string | null, trackInventory: boolean, quantityLimitPerCustomer: number | null, selectionAttributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, nonSelectionAttributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, media: Array<{ __typename: 'ProductMedia', id: string, url: string, type: ProductMediaType, oembedData: any }> | null, product: { __typename: 'Product', id: string, name: string, defaultVariant: { __typename: 'ProductVariant', id: string } | null, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, thumbnail: { __typename: 'Image', url: string } | null, channelListings: Array<{ __typename: 'ProductChannelListing', publicationDate: any | null, isPublished: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, variants: Array<{ __typename: 'ProductVariant', id: string, name: string, sku: string | null, media: Array<{ __typename: 'ProductMedia', id: string, url: string, type: ProductMediaType, oembedData: any }> | null } | null> | null }, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } } | null> | null, preorder: { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null } | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +export type ExportFileFragment = { __typename: 'ExportFile', id: string, status: JobStatusEnum, url: string | null }; + +export type ShippingZoneFragment = { __typename: 'ShippingZone', id: string, name: string, description: string | null, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +export type ShippingMethodWithPostalCodesFragment = { __typename: 'ShippingMethodType', id: string, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null } | null> | null }; + +export type ShippingMethodTypeFragment = { __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +export type ShippingMethodWithExcludedProductsFragment = { __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, excludedProducts: { __typename: 'ProductCountableConnection', pageInfo: { __typename: 'PageInfo', hasNextPage: boolean, hasPreviousPage: boolean, endCursor: string | null, startCursor: string | null }, edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', id: string, name: string, thumbnail: { __typename: 'Image', url: string } | null } }> } | null, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +export type ShippingZoneDetailsFragment = { __typename: 'ShippingZone', id: string, name: string, description: string | null, shippingMethods: Array<{ __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null> | null, warehouses: Array<{ __typename: 'Warehouse', id: string, name: string }>, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> }; + +export type CountryWithCodeFragment = { __typename: 'CountryDisplay', country: string, code: string }; + +export type LanguageFragment = { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string }; + +export type LimitInfoFragment = { __typename: 'Limits', channels?: number | null, orders?: number | null, productVariants?: number | null, staffUsers?: number | null, warehouses?: number | null }; + +export type ShopLimitFragment = { __typename: 'Shop', limits: { __typename: 'LimitInfo', currentUsage: { __typename: 'Limits', channels?: number | null, orders?: number | null, productVariants?: number | null, staffUsers?: number | null, warehouses?: number | null }, allowedUsage: { __typename: 'Limits', channels?: number | null, orders?: number | null, productVariants?: number | null, staffUsers?: number | null, warehouses?: number | null } } }; + +export type ShopFragment = { __typename: 'Shop', customerSetPasswordUrl: string | null, defaultMailSenderAddress: string | null, defaultMailSenderName: string | null, description: string | null, name: string, reserveStockDurationAnonymousUser: number | null, reserveStockDurationAuthenticatedUser: number | null, limitQuantityPerCheckout: number | null, companyAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string }>, domain: { __typename: 'Domain', host: string } }; + +export type StaffMemberFragment = { __typename: 'User', id: string, email: string, firstName: string, isActive: boolean, lastName: string }; + +export type StaffMemberDetailsFragment = { __typename: 'User', id: string, email: string, firstName: string, isActive: boolean, lastName: string, permissionGroups: Array<{ __typename: 'Group', id: string, name: string, userCanManage: boolean } | null> | null, userPermissions: Array<{ __typename: 'UserPermission', code: PermissionEnum, name: string } | null> | null, avatar: { __typename: 'Image', url: string } | null }; + +export type TaxedMoneyFragment = { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }; + +export type CountryFragment = { __typename: 'CountryDisplay', country: string, code: string }; + +export type CountryWithTaxesFragment = { __typename: 'CountryDisplay', country: string, code: string, vat: { __typename: 'VAT', standardRate: number | null, reducedRates: Array<{ __typename: 'ReducedRate', rateType: string, rate: number } | null> } | null }; + +export type ShopTaxesFragment = { __typename: 'Shop', chargeTaxesOnShipping: boolean, includeTaxesInPrices: boolean, displayGrossPrices: boolean }; + +export type TaxTypeFragment = { __typename: 'TaxType', description: string | null, taxCode: string | null }; + +export type TimePeriodFragment = { __typename: 'TimePeriod', amount: number, type: TimePeriodTypeEnum }; + +export type CategoryTranslationFragment = { __typename: 'CategoryTranslatableContent', translation: { __typename: 'CategoryTranslation', id: string, description: any | null, name: string | null, seoDescription: string | null, seoTitle: string | null, language: { __typename: 'LanguageDisplay', language: string } } | null, category: { __typename: 'Category', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null } | null }; + +export type CollectionTranslationFragment = { __typename: 'CollectionTranslatableContent', collection: { __typename: 'Collection', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null } | null, translation: { __typename: 'CollectionTranslation', id: string, description: any | null, name: string | null, seoDescription: string | null, seoTitle: string | null, language: { __typename: 'LanguageDisplay', language: string } } | null }; + +export type ProductTranslationFragment = { __typename: 'ProductTranslatableContent', product: { __typename: 'Product', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null } | null, translation: { __typename: 'ProductTranslation', id: string, seoTitle: string | null, seoDescription: string | null, name: string | null, description: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> }; + +export type ProductVariantTranslationFragment = { __typename: 'ProductVariantTranslatableContent', name: string, productVariant: { __typename: 'ProductVariant', id: string } | null, translation: { __typename: 'ProductVariantTranslation', id: string, name: string, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> }; + +export type SaleTranslationFragment = { __typename: 'SaleTranslatableContent', sale: { __typename: 'Sale', id: string, name: string } | null, translation: { __typename: 'SaleTranslation', id: string, name: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }; + +export type VoucherTranslationFragment = { __typename: 'VoucherTranslatableContent', name: string | null, voucher: { __typename: 'Voucher', id: string, name: string | null } | null, translation: { __typename: 'VoucherTranslation', id: string, name: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }; + +export type ShippingMethodTranslationFragment = { __typename: 'ShippingMethodTranslatableContent', id: string, name: string, description: any | null, shippingMethod: { __typename: 'ShippingMethodType', id: string } | null, translation: { __typename: 'ShippingMethodTranslation', id: string, name: string | null, description: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }; + +export type PageTranslationFragment = { __typename: 'PageTranslatableContent', page: { __typename: 'Page', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string } | null, translation: { __typename: 'PageTranslation', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> }; + +export type PageTranslatableFragment = { __typename: 'PageTranslatableContent', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string, translation: { __typename: 'PageTranslation', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }; + +export type AttributeChoicesTranslationFragment = { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', id: string, name: string | null, richText: any | null, inputType: AttributeInputTypeEnum | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null } | null } }> }; + +export type AttributeTranslationFragment = { __typename: 'AttributeTranslatableContent', id: string, name: string, translation: { __typename: 'AttributeTranslation', id: string, name: string } | null, attribute: { __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null } | null }; + +export type AttributeTranslationDetailsFragment = { __typename: 'AttributeTranslatableContent', translation: { __typename: 'AttributeTranslation', id: string, name: string } | null, attribute: { __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, withChoices: boolean, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', id: string, name: string | null, richText: any | null, inputType: AttributeInputTypeEnum | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null } | null } }> } | null } | null }; + +export type AttributeValueTranslatableContentFragment = { __typename: 'AttributeTranslatableContent', translation: { __typename: 'AttributeTranslation', id: string, name: string } | null, attribute: { __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', id: string, name: string | null, richText: any | null, inputType: AttributeInputTypeEnum | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null } | null } }> } | null } | null }; + +export type WarehouseFragment = { __typename: 'Warehouse', id: string, name: string }; + +export type WarehouseWithShippingFragment = { __typename: 'Warehouse', id: string, name: string, shippingZones: { __typename: 'ShippingZoneCountableConnection', edges: Array<{ __typename: 'ShippingZoneCountableEdge', node: { __typename: 'ShippingZone', id: string, name: string } }> } }; + +export type WarehouseDetailsFragment = { __typename: 'Warehouse', isPrivate: boolean, clickAndCollectOption: WarehouseClickAndCollectOptionEnum, id: string, name: string, address: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } }, shippingZones: { __typename: 'ShippingZoneCountableConnection', edges: Array<{ __typename: 'ShippingZoneCountableEdge', node: { __typename: 'ShippingZone', id: string, name: string } }> } }; + +export type WebhookFragment = { __typename: 'Webhook', id: string, name: string, isActive: boolean, app: { __typename: 'App', id: string, name: string | null } }; + +export type WebhooksDetailsFragment = { __typename: 'Webhook', id: string, name: string, isActive: boolean, app: { __typename: 'App', id: string, name: string | null } }; + +export type WeightFragment = { __typename: 'Weight', unit: WeightUnitsEnum, value: number }; + +export type GiftCardBulkCreateMutationVariables = Exact<{ + input: GiftCardBulkCreateInput; +}>; + + +export type GiftCardBulkCreateMutation = { __typename: 'Mutation', giftCardBulkCreate: { __typename: 'GiftCardBulkCreate', giftCards: Array<{ __typename: 'GiftCard', id: string }>, errors: Array<{ __typename: 'GiftCardError', code: GiftCardErrorCode, field: string | null, message: string | null }> } | null }; + +export type GiftCardCreateMutationVariables = Exact<{ + input: GiftCardCreateInput; +}>; + + +export type GiftCardCreateMutation = { __typename: 'Mutation', giftCardCreate: { __typename: 'GiftCardCreate', giftCard: { __typename: 'GiftCard', code: string } | null, errors: Array<{ __typename: 'GiftCardError', code: GiftCardErrorCode, field: string | null, message: string | null }> } | null }; + +export type ChannelCurrenciesQueryVariables = Exact<{ [key: string]: never; }>; + + +export type ChannelCurrenciesQuery = { __typename: 'Query', shop: { __typename: 'Shop', channelCurrencies: Array } }; + +export type ExportGiftCardsMutationVariables = Exact<{ + input: ExportGiftCardsInput; +}>; + + +export type ExportGiftCardsMutation = { __typename: 'Mutation', exportGiftCards: { __typename: 'ExportGiftCards', errors: Array<{ __typename: 'ExportError', code: ExportErrorCode, field: string | null, message: string | null }>, exportFile: { __typename: 'ExportFile', id: string } | null } | null }; + +export type GiftCardSettingsUpdateMutationVariables = Exact<{ + input: GiftCardSettingsUpdateInput; +}>; + + +export type GiftCardSettingsUpdateMutation = { __typename: 'Mutation', giftCardSettingsUpdate: { __typename: 'GiftCardSettingsUpdate', errors: Array<{ __typename: 'GiftCardSettingsError', code: GiftCardSettingsErrorCode, field: string | null, message: string | null }>, giftCardSettings: { __typename: 'GiftCardSettings', expiryType: GiftCardSettingsExpiryTypeEnum, expiryPeriod: { __typename: 'TimePeriod', type: TimePeriodTypeEnum, amount: number } | null } | null } | null }; + +export type GiftCardSettingsQueryVariables = Exact<{ [key: string]: never; }>; + + +export type GiftCardSettingsQuery = { __typename: 'Query', giftCardSettings: { __typename: 'GiftCardSettings', expiryType: GiftCardSettingsExpiryTypeEnum, expiryPeriod: { __typename: 'TimePeriod', type: TimePeriodTypeEnum, amount: number } | null } }; + +export type GiftCardResendMutationVariables = Exact<{ + input: GiftCardResendInput; +}>; + + +export type GiftCardResendMutation = { __typename: 'Mutation', giftCardResend: { __typename: 'GiftCardResend', errors: Array<{ __typename: 'GiftCardError', code: GiftCardErrorCode, field: string | null, message: string | null }>, giftCard: { __typename: 'GiftCard', last4CodeChars: string, boughtInChannel: string | null, usedByEmail: string | null, createdByEmail: string | null, created: any, expiryDate: any | null, lastUsedOn: any | null, isActive: boolean, id: string, createdBy: { __typename: 'User', id: string, firstName: string, lastName: string } | null, product: { __typename: 'Product', id: string, name: string } | null, usedBy: { __typename: 'User', id: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null } | null, initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string } | null, tags: Array<{ __typename: 'GiftCardTag', name: string }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type GiftCardActivateMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type GiftCardActivateMutation = { __typename: 'Mutation', giftCardActivate: { __typename: 'GiftCardActivate', errors: Array<{ __typename: 'GiftCardError', code: GiftCardErrorCode, field: string | null, message: string | null }>, giftCard: { __typename: 'GiftCard', last4CodeChars: string, boughtInChannel: string | null, usedByEmail: string | null, createdByEmail: string | null, created: any, expiryDate: any | null, lastUsedOn: any | null, isActive: boolean, id: string, createdBy: { __typename: 'User', id: string, firstName: string, lastName: string } | null, product: { __typename: 'Product', id: string, name: string } | null, usedBy: { __typename: 'User', id: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null } | null, initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string } | null, tags: Array<{ __typename: 'GiftCardTag', name: string }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type GiftCardDeactivateMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type GiftCardDeactivateMutation = { __typename: 'Mutation', giftCardDeactivate: { __typename: 'GiftCardDeactivate', errors: Array<{ __typename: 'GiftCardError', code: GiftCardErrorCode, field: string | null, message: string | null }>, giftCard: { __typename: 'GiftCard', last4CodeChars: string, boughtInChannel: string | null, usedByEmail: string | null, createdByEmail: string | null, created: any, expiryDate: any | null, lastUsedOn: any | null, isActive: boolean, id: string, createdBy: { __typename: 'User', id: string, firstName: string, lastName: string } | null, product: { __typename: 'Product', id: string, name: string } | null, usedBy: { __typename: 'User', id: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null } | null, initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string } | null, tags: Array<{ __typename: 'GiftCardTag', name: string }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type GiftCardUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: GiftCardUpdateInput; +}>; + + +export type GiftCardUpdateMutation = { __typename: 'Mutation', giftCardUpdate: { __typename: 'GiftCardUpdate', errors: Array<{ __typename: 'GiftCardError', code: GiftCardErrorCode, field: string | null, message: string | null }>, giftCard: { __typename: 'GiftCard', last4CodeChars: string, boughtInChannel: string | null, usedByEmail: string | null, createdByEmail: string | null, created: any, expiryDate: any | null, lastUsedOn: any | null, isActive: boolean, id: string, events: Array<{ __typename: 'GiftCardEvent', expiryDate: any | null, oldExpiryDate: any | null, id: string, date: any | null, type: GiftCardEventsEnum | null, message: string | null, email: string | null, orderId: string | null, orderNumber: string | null, tags: Array | null, oldTags: Array | null, user: { __typename: 'User', email: string, id: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null } | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }>, createdBy: { __typename: 'User', id: string, firstName: string, lastName: string } | null, product: { __typename: 'Product', id: string, name: string } | null, usedBy: { __typename: 'User', id: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null } | null, initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string } | null, tags: Array<{ __typename: 'GiftCardTag', name: string }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type GiftCardAddNoteMutationVariables = Exact<{ + id: Scalars['ID']; + input: GiftCardAddNoteInput; +}>; + + +export type GiftCardAddNoteMutation = { __typename: 'Mutation', giftCardAddNote: { __typename: 'GiftCardAddNote', errors: Array<{ __typename: 'GiftCardError', code: GiftCardErrorCode, field: string | null, message: string | null }>, giftCard: { __typename: 'GiftCard', last4CodeChars: string, boughtInChannel: string | null, usedByEmail: string | null, createdByEmail: string | null, created: any, expiryDate: any | null, lastUsedOn: any | null, isActive: boolean, id: string, createdBy: { __typename: 'User', id: string, firstName: string, lastName: string } | null, product: { __typename: 'Product', id: string, name: string } | null, usedBy: { __typename: 'User', id: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null } | null, initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string } | null, tags: Array<{ __typename: 'GiftCardTag', name: string }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null, event: { __typename: 'GiftCardEvent', expiryDate: any | null, oldExpiryDate: any | null, id: string, date: any | null, type: GiftCardEventsEnum | null, message: string | null, email: string | null, orderId: string | null, orderNumber: string | null, tags: Array | null, oldTags: Array | null, user: { __typename: 'User', email: string, id: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null } | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null } | null } | null }; + +export type GiftCardDetailsQueryVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type GiftCardDetailsQuery = { __typename: 'Query', giftCard: { __typename: 'GiftCard', last4CodeChars: string, boughtInChannel: string | null, usedByEmail: string | null, createdByEmail: string | null, created: any, expiryDate: any | null, lastUsedOn: any | null, isActive: boolean, id: string, events: Array<{ __typename: 'GiftCardEvent', expiryDate: any | null, oldExpiryDate: any | null, id: string, date: any | null, type: GiftCardEventsEnum | null, message: string | null, email: string | null, orderId: string | null, orderNumber: string | null, tags: Array | null, oldTags: Array | null, user: { __typename: 'User', email: string, id: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null } | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }>, createdBy: { __typename: 'User', id: string, firstName: string, lastName: string } | null, product: { __typename: 'Product', id: string, name: string } | null, usedBy: { __typename: 'User', id: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null } | null, initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string } | null, tags: Array<{ __typename: 'GiftCardTag', name: string }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null }; + +export type GiftCardCurrenciesQueryVariables = Exact<{ [key: string]: never; }>; + + +export type GiftCardCurrenciesQuery = { __typename: 'Query', giftCardCurrencies: Array }; + +export type GiftCardBulkActivateMutationVariables = Exact<{ + ids: Array> | InputMaybe; +}>; + + +export type GiftCardBulkActivateMutation = { __typename: 'Mutation', giftCardBulkActivate: { __typename: 'GiftCardBulkActivate', count: number, errors: Array<{ __typename: 'GiftCardError', code: GiftCardErrorCode, field: string | null, message: string | null }> } | null }; + +export type GiftCardBulkDeactivateMutationVariables = Exact<{ + ids: Array> | InputMaybe; +}>; + + +export type GiftCardBulkDeactivateMutation = { __typename: 'Mutation', giftCardBulkDeactivate: { __typename: 'GiftCardBulkDeactivate', count: number, errors: Array<{ __typename: 'GiftCardError', code: GiftCardErrorCode, field: string | null, message: string | null }> } | null }; + +export type DeleteGiftCardMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type DeleteGiftCardMutation = { __typename: 'Mutation', giftCardDelete: { __typename: 'GiftCardDelete', errors: Array<{ __typename: 'GiftCardError', code: GiftCardErrorCode, field: string | null, message: string | null }> } | null }; + +export type BulkDeleteGiftCardMutationVariables = Exact<{ + ids: Array> | InputMaybe; +}>; + + +export type BulkDeleteGiftCardMutation = { __typename: 'Mutation', giftCardBulkDelete: { __typename: 'GiftCardBulkDelete', errors: Array<{ __typename: 'GiftCardError', code: GiftCardErrorCode, field: string | null, message: string | null }> } | null }; + +export type GiftCardListQueryVariables = Exact<{ + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + sort?: InputMaybe; +}>; + + +export type GiftCardListQuery = { __typename: 'Query', giftCards: { __typename: 'GiftCardCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'GiftCardCountableEdge', node: { __typename: 'GiftCard', id: string, usedByEmail: string | null, last4CodeChars: string, isActive: boolean, expiryDate: any | null, product: { __typename: 'Product', id: string, name: string } | null, tags: Array<{ __typename: 'GiftCardTag', name: string }>, usedBy: { __typename: 'User', id: string, firstName: string, lastName: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type GiftCardTotalCountQueryVariables = Exact<{ [key: string]: never; }>; + + +export type GiftCardTotalCountQuery = { __typename: 'Query', giftCards: { __typename: 'GiftCardCountableConnection', totalCount: number | null } | null }; + +export type GiftCardProductsCountQueryVariables = Exact<{ [key: string]: never; }>; + + +export type GiftCardProductsCountQuery = { __typename: 'Query', giftCardProductTypes: { __typename: 'ProductTypeCountableConnection', totalCount: number | null } | null, giftCardProducts: { __typename: 'ProductCountableConnection', totalCount: number | null } | null }; + +export type CustomerGiftCardListQueryVariables = Exact<{ + first?: InputMaybe; + filter?: InputMaybe; +}>; + + +export type CustomerGiftCardListQuery = { __typename: 'Query', giftCards: { __typename: 'GiftCardCountableConnection', edges: Array<{ __typename: 'GiftCardCountableEdge', node: { __typename: 'GiftCard', id: string, last4CodeChars: string, expiryDate: any | null, isActive: boolean, currentBalance: { __typename: 'Money', amount: number, currency: string } | null } }> } | null }; + +export type HomeQueryVariables = Exact<{ + channel: Scalars['String']; + datePeriod: DateRangeInput; + PERMISSION_MANAGE_PRODUCTS: Scalars['Boolean']; + PERMISSION_MANAGE_ORDERS: Scalars['Boolean']; +}>; + + +export type HomeQuery = { __typename: 'Query', salesToday: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } } | null, ordersToday: { __typename: 'OrderCountableConnection', totalCount: number | null } | null, ordersToFulfill: { __typename: 'OrderCountableConnection', totalCount: number | null } | null, ordersToCapture: { __typename: 'OrderCountableConnection', totalCount: number | null } | null, productsOutOfStock: { __typename: 'ProductCountableConnection', totalCount: number | null } | null, productTopToday: { __typename: 'ProductVariantCountableConnection', edges: Array<{ __typename: 'ProductVariantCountableEdge', node: { __typename: 'ProductVariant', id: string, quantityOrdered: number | null, revenue: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } } | null, attributes: Array<{ __typename: 'SelectedAttribute', values: Array<{ __typename: 'AttributeValue', id: string, name: string | null } | null> }>, product: { __typename: 'Product', id: string, name: string, thumbnail: { __typename: 'Image', url: string } | null } } }> } | null, activities: { __typename: 'OrderEventCountableConnection', edges: Array<{ __typename: 'OrderEventCountableEdge', node: { __typename: 'OrderEvent', amount: number | null, composedId: string | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, id: string, message: string | null, orderNumber: string | null, oversoldItems: Array | null, quantity: number | null, type: OrderEventsEnum | null, user: { __typename: 'User', id: string, email: string } | null } }> } | null }; + +export type MenuCreateMutationVariables = Exact<{ + input: MenuCreateInput; +}>; + + +export type MenuCreateMutation = { __typename: 'Mutation', menuCreate: { __typename: 'MenuCreate', errors: Array<{ __typename: 'MenuError', code: MenuErrorCode, field: string | null, message: string | null }>, menu: { __typename: 'Menu', id: string } | null } | null }; + +export type MenuBulkDeleteMutationVariables = Exact<{ + ids: Array> | InputMaybe; +}>; + + +export type MenuBulkDeleteMutation = { __typename: 'Mutation', menuBulkDelete: { __typename: 'MenuBulkDelete', errors: Array<{ __typename: 'MenuError', code: MenuErrorCode, field: string | null, message: string | null }> } | null }; + +export type MenuDeleteMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type MenuDeleteMutation = { __typename: 'Mutation', menuDelete: { __typename: 'MenuDelete', errors: Array<{ __typename: 'MenuError', code: MenuErrorCode, field: string | null, message: string | null }> } | null }; + +export type MenuItemCreateMutationVariables = Exact<{ + input: MenuItemCreateInput; +}>; + + +export type MenuItemCreateMutation = { __typename: 'Mutation', menuItemCreate: { __typename: 'MenuItemCreate', errors: Array<{ __typename: 'MenuError', code: MenuErrorCode, field: string | null, message: string | null }>, menuItem: { __typename: 'MenuItem', menu: { __typename: 'Menu', id: string, items: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null } } | null } | null }; + +export type MenuUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + name: Scalars['String']; + moves: Array> | InputMaybe; + removeIds: Array> | InputMaybe; +}>; + + +export type MenuUpdateMutation = { __typename: 'Mutation', menuUpdate: { __typename: 'MenuUpdate', errors: Array<{ __typename: 'MenuError', code: MenuErrorCode, field: string | null, message: string | null }> } | null, menuItemMove: { __typename: 'MenuItemMove', errors: Array<{ __typename: 'MenuError', code: MenuErrorCode, field: string | null, message: string | null }> } | null, menuItemBulkDelete: { __typename: 'MenuItemBulkDelete', errors: Array<{ __typename: 'MenuError', code: MenuErrorCode, field: string | null, message: string | null }> } | null }; + +export type MenuItemUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: MenuItemInput; +}>; + + +export type MenuItemUpdateMutation = { __typename: 'Mutation', menuItemUpdate: { __typename: 'MenuItemUpdate', errors: Array<{ __typename: 'MenuError', code: MenuErrorCode, field: string | null, message: string | null }>, menuItem: { __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null } | null }; + +export type MenuListQueryVariables = Exact<{ + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; + sort?: InputMaybe; +}>; + + +export type MenuListQuery = { __typename: 'Query', menus: { __typename: 'MenuCountableConnection', edges: Array<{ __typename: 'MenuCountableEdge', node: { __typename: 'Menu', id: string, name: string, items: Array<{ __typename: 'MenuItem', id: string } | null> | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type MenuDetailsQueryVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type MenuDetailsQuery = { __typename: 'Query', menu: { __typename: 'Menu', id: string, name: string, items: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, children: Array<{ __typename: 'MenuItem', id: string, level: number, name: string, url: string | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null, category: { __typename: 'Category', id: string, name: string } | null, collection: { __typename: 'Collection', id: string, name: string } | null, page: { __typename: 'Page', id: string, title: string } | null } | null> | null } | null }; + +export type OrderCancelMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type OrderCancelMutation = { __typename: 'Mutation', orderCancel: { __typename: 'OrderCancel', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderDiscountAddMutationVariables = Exact<{ + input: OrderDiscountCommonInput; + orderId: Scalars['ID']; +}>; + + +export type OrderDiscountAddMutation = { __typename: 'Mutation', orderDiscountAdd: { __typename: 'OrderDiscountAdd', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderDiscountDeleteMutationVariables = Exact<{ + discountId: Scalars['ID']; +}>; + + +export type OrderDiscountDeleteMutation = { __typename: 'Mutation', orderDiscountDelete: { __typename: 'OrderDiscountDelete', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderLineDiscountRemoveMutationVariables = Exact<{ + orderLineId: Scalars['ID']; +}>; + + +export type OrderLineDiscountRemoveMutation = { __typename: 'Mutation', orderLineDiscountRemove: { __typename: 'OrderLineDiscountRemove', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderLineDiscountUpdateMutationVariables = Exact<{ + input: OrderDiscountCommonInput; + orderLineId: Scalars['ID']; +}>; + + +export type OrderLineDiscountUpdateMutation = { __typename: 'Mutation', orderLineDiscountUpdate: { __typename: 'OrderLineDiscountUpdate', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderDiscountUpdateMutationVariables = Exact<{ + input: OrderDiscountCommonInput; + discountId: Scalars['ID']; +}>; + + +export type OrderDiscountUpdateMutation = { __typename: 'Mutation', orderDiscountUpdate: { __typename: 'OrderDiscountUpdate', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderDraftCancelMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type OrderDraftCancelMutation = { __typename: 'Mutation', draftOrderDelete: { __typename: 'DraftOrderDelete', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderDraftBulkCancelMutationVariables = Exact<{ + ids: Array> | InputMaybe; +}>; + + +export type OrderDraftBulkCancelMutation = { __typename: 'Mutation', draftOrderBulkDelete: { __typename: 'DraftOrderBulkDelete', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }> } | null }; + +export type OrderConfirmMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type OrderConfirmMutation = { __typename: 'Mutation', orderConfirm: { __typename: 'OrderConfirm', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderDraftFinalizeMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type OrderDraftFinalizeMutation = { __typename: 'Mutation', draftOrderComplete: { __typename: 'DraftOrderComplete', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type FulfillmentReturnProductsMutationVariables = Exact<{ + id: Scalars['ID']; + input: OrderReturnProductsInput; +}>; + + +export type FulfillmentReturnProductsMutation = { __typename: 'Mutation', orderFulfillmentReturnProducts: { __typename: 'FulfillmentReturnProducts', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string } | null, replaceOrder: { __typename: 'Order', id: string } | null } | null }; + +export type OrderRefundMutationVariables = Exact<{ + id: Scalars['ID']; + amount: Scalars['PositiveDecimal']; +}>; + + +export type OrderRefundMutation = { __typename: 'Mutation', orderRefund: { __typename: 'OrderRefund', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderFulfillmentRefundProductsMutationVariables = Exact<{ + input: OrderRefundProductsInput; + order: Scalars['ID']; +}>; + + +export type OrderFulfillmentRefundProductsMutation = { __typename: 'Mutation', orderFulfillmentRefundProducts: { __typename: 'FulfillmentRefundProducts', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, fulfillment: { __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderVoidMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type OrderVoidMutation = { __typename: 'Mutation', orderVoid: { __typename: 'OrderVoid', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderMarkAsPaidMutationVariables = Exact<{ + id: Scalars['ID']; + transactionReference?: InputMaybe; +}>; + + +export type OrderMarkAsPaidMutation = { __typename: 'Mutation', orderMarkAsPaid: { __typename: 'OrderMarkAsPaid', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderCaptureMutationVariables = Exact<{ + id: Scalars['ID']; + amount: Scalars['PositiveDecimal']; +}>; + + +export type OrderCaptureMutation = { __typename: 'Mutation', orderCapture: { __typename: 'OrderCapture', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderFulfillmentUpdateTrackingMutationVariables = Exact<{ + id: Scalars['ID']; + input: FulfillmentUpdateTrackingInput; +}>; + + +export type OrderFulfillmentUpdateTrackingMutation = { __typename: 'Mutation', orderFulfillmentUpdateTracking: { __typename: 'FulfillmentUpdateTracking', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderFulfillmentApproveMutationVariables = Exact<{ + id: Scalars['ID']; + notifyCustomer: Scalars['Boolean']; +}>; + + +export type OrderFulfillmentApproveMutation = { __typename: 'Mutation', orderFulfillmentApprove: { __typename: 'FulfillmentApprove', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderFulfillmentCancelMutationVariables = Exact<{ + id: Scalars['ID']; + input: FulfillmentCancelInput; +}>; + + +export type OrderFulfillmentCancelMutation = { __typename: 'Mutation', orderFulfillmentCancel: { __typename: 'FulfillmentCancel', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderAddNoteMutationVariables = Exact<{ + order: Scalars['ID']; + input: OrderAddNoteInput; +}>; + + +export type OrderAddNoteMutation = { __typename: 'Mutation', orderAddNote: { __typename: 'OrderAddNote', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null } | null } | null }; + +export type OrderUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: OrderUpdateInput; +}>; + + +export type OrderUpdateMutation = { __typename: 'Mutation', orderUpdate: { __typename: 'OrderUpdate', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderDraftUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: DraftOrderInput; +}>; + + +export type OrderDraftUpdateMutation = { __typename: 'Mutation', draftOrderUpdate: { __typename: 'DraftOrderUpdate', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderShippingMethodUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: OrderUpdateShippingInput; +}>; + + +export type OrderShippingMethodUpdateMutation = { __typename: 'Mutation', orderUpdateShipping: { __typename: 'OrderUpdateShipping', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, shippingMethodName: string | null, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, total: { __typename: 'TaxedMoney', tax: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, shippingMethod: { __typename: 'ShippingMethod', id: string, name: string, price: { __typename: 'Money', amount: number, currency: string } } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderDraftCreateMutationVariables = Exact<{ + input: DraftOrderCreateInput; +}>; + + +export type OrderDraftCreateMutation = { __typename: 'Mutation', draftOrderCreate: { __typename: 'DraftOrderCreate', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string } | null } | null }; + +export type OrderLineDeleteMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type OrderLineDeleteMutation = { __typename: 'Mutation', orderLineDelete: { __typename: 'OrderLineDelete', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderLinesAddMutationVariables = Exact<{ + id: Scalars['ID']; + input: Array> | InputMaybe; +}>; + + +export type OrderLinesAddMutation = { __typename: 'Mutation', orderLinesCreate: { __typename: 'OrderLinesCreate', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type OrderLineUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: OrderLineInput; +}>; + + +export type OrderLineUpdateMutation = { __typename: 'Mutation', orderLineUpdate: { __typename: 'OrderLineUpdate', errors: Array<{ __typename: 'OrderError', code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type FulfillOrderMutationVariables = Exact<{ + orderId: Scalars['ID']; + input: OrderFulfillInput; +}>; + + +export type FulfillOrderMutation = { __typename: 'Mutation', orderFulfill: { __typename: 'OrderFulfill', errors: Array<{ __typename: 'OrderError', warehouse: string | null, orderLines: Array | null, code: OrderErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type InvoiceRequestMutationVariables = Exact<{ + orderId: Scalars['ID']; +}>; + + +export type InvoiceRequestMutation = { __typename: 'Mutation', invoiceRequest: { __typename: 'InvoiceRequest', errors: Array<{ __typename: 'InvoiceError', code: InvoiceErrorCode, field: string | null, message: string | null }>, invoice: { __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null, order: { __typename: 'Order', id: string, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null } | null } | null }; + +export type InvoiceEmailSendMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type InvoiceEmailSendMutation = { __typename: 'Mutation', invoiceSendNotification: { __typename: 'InvoiceSendNotification', errors: Array<{ __typename: 'InvoiceError', code: InvoiceErrorCode, field: string | null, message: string | null }>, invoice: { __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null } | null }; + +export type OrderSettingsUpdateMutationVariables = Exact<{ + orderSettingsInput: OrderSettingsUpdateInput; + shopSettingsInput: ShopSettingsInput; +}>; + + +export type OrderSettingsUpdateMutation = { __typename: 'Mutation', orderSettingsUpdate: { __typename: 'OrderSettingsUpdate', errors: Array<{ __typename: 'OrderSettingsError', code: OrderSettingsErrorCode, field: string | null, message: string | null }>, orderSettings: { __typename: 'OrderSettings', automaticallyConfirmAllNewOrders: boolean, automaticallyFulfillNonShippableGiftCard: boolean } | null } | null, shopSettingsUpdate: { __typename: 'ShopSettingsUpdate', errors: Array<{ __typename: 'ShopError', code: ShopErrorCode, field: string | null, message: string | null }>, shop: { __typename: 'Shop', fulfillmentAutoApprove: boolean, fulfillmentAllowUnpaid: boolean } | null } | null }; + +export type OrderListQueryVariables = Exact<{ + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + sort?: InputMaybe; +}>; + + +export type OrderListQuery = { __typename: 'Query', orders: { __typename: 'OrderCountableConnection', edges: Array<{ __typename: 'OrderCountableEdge', node: { __typename: 'Order', created: any, id: string, number: string | null, paymentStatus: PaymentChargeStatusEnum, status: OrderStatus, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } } } }>, pageInfo: { __typename: 'PageInfo', hasPreviousPage: boolean, hasNextPage: boolean, startCursor: string | null, endCursor: string | null } } | null }; + +export type OrderDraftListQueryVariables = Exact<{ + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + sort?: InputMaybe; +}>; + + +export type OrderDraftListQuery = { __typename: 'Query', draftOrders: { __typename: 'OrderCountableConnection', edges: Array<{ __typename: 'OrderCountableEdge', node: { __typename: 'Order', created: any, id: string, number: string | null, paymentStatus: PaymentChargeStatusEnum, status: OrderStatus, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } } } }>, pageInfo: { __typename: 'PageInfo', hasPreviousPage: boolean, hasNextPage: boolean, startCursor: string | null, endCursor: string | null } } | null }; + +export type OrderDetailsQueryVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type OrderDetailsQuery = { __typename: 'Query', order: { __typename: 'Order', id: string, token: string, isShippingRequired: boolean, canFinalize: boolean, created: any, customerNote: string, number: string | null, isPaid: boolean, paymentStatus: PaymentChargeStatusEnum, shippingMethodName: string | null, collectionPointName: string | null, status: OrderStatus, actions: Array, userEmail: string | null, billingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, giftCards: Array<{ __typename: 'GiftCard', events: Array<{ __typename: 'GiftCardEvent', id: string, type: GiftCardEventsEnum | null, orderId: string | null, balance: { __typename: 'GiftCardEventBalance', initialBalance: { __typename: 'Money', amount: number, currency: string } | null, currentBalance: { __typename: 'Money', amount: number, currency: string }, oldInitialBalance: { __typename: 'Money', amount: number, currency: string } | null, oldCurrentBalance: { __typename: 'Money', amount: number, currency: string } | null } | null }> } | null> | null, discounts: Array<{ __typename: 'OrderDiscount', id: string, type: OrderDiscountType, value: any, reason: string | null, calculationMode: DiscountValueTypeEnum, amount: { __typename: 'Money', amount: number, currency: string } }> | null, events: Array<{ __typename: 'OrderEvent', id: string, amount: number | null, shippingCostsIncluded: boolean | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, invoiceNumber: string | null, message: string | null, quantity: number | null, transactionReference: string | null, type: OrderEventsEnum | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, relatedOrder: { __typename: 'Order', id: string, number: string | null } | null, user: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } | null, app: { __typename: 'App', id: string, name: string | null, appUrl: string | null } | null, lines: Array<{ __typename: 'OrderEventOrderLineObject', quantity: number | null, itemName: string | null, discount: { __typename: 'OrderEventDiscountObject', valueType: DiscountValueTypeEnum, value: any, reason: string | null, oldValueType: DiscountValueTypeEnum | null, oldValue: any | null, amount: { __typename: 'Money', amount: number, currency: string } | null, oldAmount: { __typename: 'Money', amount: number, currency: string } | null } | null, orderLine: { __typename: 'OrderLine', id: string, productName: string, variantName: string } | null } | null> | null } | null> | null, fulfillments: Array<{ __typename: 'Fulfillment', id: string, fulfillmentOrder: number, status: FulfillmentStatus, trackingNumber: string, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null, warehouse: { __typename: 'Warehouse', id: string, name: string } | null } | null>, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, productSku: string | null, quantity: number, quantityFulfilled: number, quantityToFulfill: number, unitDiscountValue: any, unitDiscountReason: string | null, unitDiscountType: DiscountValueTypeEnum | null, variant: { __typename: 'ProductVariant', id: string, quantityAvailable: number | null, preorder: { __typename: 'PreorderData', endDate: any | null } | null } | null, unitDiscount: { __typename: 'Money', amount: number, currency: string }, undiscountedUnitPrice: { __typename: 'TaxedMoney', currency: string, gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, shippingAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, shippingMethod: { __typename: 'ShippingMethod', id: string } | null, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, subtotal: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string } }, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string }, net: { __typename: 'Money', amount: number, currency: string }, tax: { __typename: 'Money', amount: number, currency: string } }, totalAuthorized: { __typename: 'Money', amount: number, currency: string }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, undiscountedTotal: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string }, gross: { __typename: 'Money', amount: number, currency: string } }, user: { __typename: 'User', id: string, email: string } | null, shippingMethods: Array<{ __typename: 'ShippingMethod', id: string, name: string, active: boolean, message: string | null, price: { __typename: 'Money', amount: number, currency: string } } | null> | null, invoices: Array<{ __typename: 'Invoice', id: string, number: string | null, createdAt: any, url: string | null, status: JobStatusEnum } | null> | null, channel: { __typename: 'Channel', isActive: boolean, id: string, name: string, currencyCode: string, slug: string, defaultCountry: { __typename: 'CountryDisplay', code: string } }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null, shop: { __typename: 'Shop', defaultWeightUnit: WeightUnitsEnum | null, fulfillmentAllowUnpaid: boolean, fulfillmentAutoApprove: boolean, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string }> } }; + +export type OrderFulfillDataQueryVariables = Exact<{ + orderId: Scalars['ID']; +}>; + + +export type OrderFulfillDataQuery = { __typename: 'Query', order: { __typename: 'Order', id: string, isPaid: boolean, number: string | null, deliveryMethod: { __typename: 'Warehouse', id: string, clickAndCollectOption: WarehouseClickAndCollectOptionEnum } | { __typename: 'ShippingMethod', id: string } | null, lines: Array<{ __typename: 'OrderLine', id: string, isShippingRequired: boolean, productName: string, quantity: number, quantityFulfilled: number, quantityToFulfill: number, allocations: Array<{ __typename: 'Allocation', quantity: number, warehouse: { __typename: 'Warehouse', id: string } }> | null, variant: { __typename: 'ProductVariant', id: string, name: string, sku: string | null, trackInventory: boolean, preorder: { __typename: 'PreorderData', endDate: any | null } | null, attributes: Array<{ __typename: 'SelectedAttribute', values: Array<{ __typename: 'AttributeValue', id: string, name: string | null } | null> }>, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } } | null> | null } | null, thumbnail: { __typename: 'Image', url: string } | null } | null> } | null }; + +export type OrderFulfillSettingsQueryVariables = Exact<{ [key: string]: never; }>; + + +export type OrderFulfillSettingsQuery = { __typename: 'Query', shop: { __typename: 'Shop', fulfillmentAutoApprove: boolean, fulfillmentAllowUnpaid: boolean } }; + +export type OrderSettingsQueryVariables = Exact<{ [key: string]: never; }>; + + +export type OrderSettingsQuery = { __typename: 'Query', orderSettings: { __typename: 'OrderSettings', automaticallyConfirmAllNewOrders: boolean, automaticallyFulfillNonShippableGiftCard: boolean } | null, shop: { __typename: 'Shop', fulfillmentAutoApprove: boolean, fulfillmentAllowUnpaid: boolean } }; + +export type OrderRefundDataQueryVariables = Exact<{ + orderId: Scalars['ID']; +}>; + + +export type OrderRefundDataQuery = { __typename: 'Query', order: { __typename: 'Order', id: string, number: string | null, total: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, totalCaptured: { __typename: 'Money', amount: number, currency: string }, shippingPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, lines: Array<{ __typename: 'OrderLine', quantityToFulfill: number, id: string, productName: string, quantity: number, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null>, fulfillments: Array<{ __typename: 'Fulfillment', id: string, status: FulfillmentStatus, fulfillmentOrder: number, lines: Array<{ __typename: 'FulfillmentLine', id: string, quantity: number, orderLine: { __typename: 'OrderLine', id: string, productName: string, quantity: number, unitPrice: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } }, thumbnail: { __typename: 'Image', url: string } | null } | null } | null> | null } | null> } | null }; + +export type PageTypeUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: PageTypeUpdateInput; +}>; + + +export type PageTypeUpdateMutation = { __typename: 'Mutation', pageTypeUpdate: { __typename: 'PageTypeUpdate', errors: Array<{ __typename: 'PageError', code: PageErrorCode, field: string | null, message: string | null }>, pageType: { __typename: 'PageType', id: string, name: string, hasPages: boolean | null, attributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type PageTypeCreateMutationVariables = Exact<{ + input: PageTypeCreateInput; +}>; + + +export type PageTypeCreateMutation = { __typename: 'Mutation', pageTypeCreate: { __typename: 'PageTypeCreate', errors: Array<{ __typename: 'PageError', code: PageErrorCode, field: string | null, message: string | null }>, pageType: { __typename: 'PageType', id: string, name: string, hasPages: boolean | null, attributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type AssignPageAttributeMutationVariables = Exact<{ + id: Scalars['ID']; + ids: Array | Scalars['ID']; +}>; + + +export type AssignPageAttributeMutation = { __typename: 'Mutation', pageAttributeAssign: { __typename: 'PageAttributeAssign', errors: Array<{ __typename: 'PageError', code: PageErrorCode, field: string | null, message: string | null }>, pageType: { __typename: 'PageType', id: string, name: string, hasPages: boolean | null, attributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type UnassignPageAttributeMutationVariables = Exact<{ + id: Scalars['ID']; + ids: Array | Scalars['ID']; +}>; + + +export type UnassignPageAttributeMutation = { __typename: 'Mutation', pageAttributeUnassign: { __typename: 'PageAttributeUnassign', errors: Array<{ __typename: 'PageError', code: PageErrorCode, field: string | null, message: string | null }>, pageType: { __typename: 'PageType', id: string, name: string, hasPages: boolean | null, attributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type PageTypeDeleteMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type PageTypeDeleteMutation = { __typename: 'Mutation', pageTypeDelete: { __typename: 'PageTypeDelete', errors: Array<{ __typename: 'PageError', code: PageErrorCode, field: string | null, message: string | null }>, pageType: { __typename: 'PageType', id: string } | null } | null }; + +export type PageTypeBulkDeleteMutationVariables = Exact<{ + ids: Array | Scalars['ID']; +}>; + + +export type PageTypeBulkDeleteMutation = { __typename: 'Mutation', pageTypeBulkDelete: { __typename: 'PageTypeBulkDelete', errors: Array<{ __typename: 'PageError', code: PageErrorCode, field: string | null, message: string | null }> } | null }; + +export type PageTypeAttributeReorderMutationVariables = Exact<{ + move: ReorderInput; + pageTypeId: Scalars['ID']; +}>; + + +export type PageTypeAttributeReorderMutation = { __typename: 'Mutation', pageTypeReorderAttributes: { __typename: 'PageTypeReorderAttributes', errors: Array<{ __typename: 'PageError', code: PageErrorCode, field: string | null, message: string | null }>, pageType: { __typename: 'PageType', id: string, name: string, hasPages: boolean | null, attributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type PageTypeListQueryVariables = Exact<{ + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + filter?: InputMaybe; + sort?: InputMaybe; +}>; + + +export type PageTypeListQuery = { __typename: 'Query', pageTypes: { __typename: 'PageTypeCountableConnection', edges: Array<{ __typename: 'PageTypeCountableEdge', node: { __typename: 'PageType', id: string, name: string, hasPages: boolean | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type PageTypeDetailsQueryVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type PageTypeDetailsQuery = { __typename: 'Query', pageType: { __typename: 'PageType', id: string, name: string, hasPages: boolean | null, attributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null }; + +export type PageCreateMutationVariables = Exact<{ + input: PageCreateInput; +}>; + + +export type PageCreateMutation = { __typename: 'Mutation', pageCreate: { __typename: 'PageCreate', errors: Array<{ __typename: 'PageError', attributes: Array | null, code: PageErrorCode, field: string | null, message: string | null }>, page: { __typename: 'Page', id: string } | null } | null }; + +export type PageUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: PageInput; + firstValues?: InputMaybe; + afterValues?: InputMaybe; + lastValues?: InputMaybe; + beforeValues?: InputMaybe; +}>; + + +export type PageUpdateMutation = { __typename: 'Mutation', pageUpdate: { __typename: 'PageUpdate', errors: Array<{ __typename: 'PageError', attributes: Array | null, code: PageErrorCode, field: string | null, message: string | null }>, page: { __typename: 'Page', content: any | null, seoTitle: string | null, seoDescription: string | null, publicationDate: any | null, id: string, title: string, slug: string, isPublished: boolean, attributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, slug: string | null, name: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, pageType: { __typename: 'PageType', id: string, name: string, attributes: Array<{ __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null } | null> | null }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type PageRemoveMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type PageRemoveMutation = { __typename: 'Mutation', pageDelete: { __typename: 'PageDelete', errors: Array<{ __typename: 'PageError', code: PageErrorCode, field: string | null, message: string | null }> } | null }; + +export type PageBulkPublishMutationVariables = Exact<{ + ids: Array> | InputMaybe; + isPublished: Scalars['Boolean']; +}>; + + +export type PageBulkPublishMutation = { __typename: 'Mutation', pageBulkPublish: { __typename: 'PageBulkPublish', errors: Array<{ __typename: 'PageError', code: PageErrorCode, field: string | null, message: string | null }> } | null }; + +export type PageBulkRemoveMutationVariables = Exact<{ + ids: Array> | InputMaybe; +}>; + + +export type PageBulkRemoveMutation = { __typename: 'Mutation', pageBulkDelete: { __typename: 'PageBulkDelete', errors: Array<{ __typename: 'PageError', code: PageErrorCode, field: string | null, message: string | null }> } | null }; + +export type PageListQueryVariables = Exact<{ + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; + sort?: InputMaybe; +}>; + + +export type PageListQuery = { __typename: 'Query', pages: { __typename: 'PageCountableConnection', edges: Array<{ __typename: 'PageCountableEdge', node: { __typename: 'Page', id: string, title: string, slug: string, isPublished: boolean } }>, pageInfo: { __typename: 'PageInfo', hasPreviousPage: boolean, hasNextPage: boolean, startCursor: string | null, endCursor: string | null } } | null }; + +export type PageDetailsQueryVariables = Exact<{ + id: Scalars['ID']; + firstValues?: InputMaybe; + afterValues?: InputMaybe; + lastValues?: InputMaybe; + beforeValues?: InputMaybe; +}>; + + +export type PageDetailsQuery = { __typename: 'Query', page: { __typename: 'Page', content: any | null, seoTitle: string | null, seoDescription: string | null, publicationDate: any | null, id: string, title: string, slug: string, isPublished: boolean, attributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, slug: string | null, name: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, pageType: { __typename: 'PageType', id: string, name: string, attributes: Array<{ __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null } | null> | null }, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null }; + +export type PageTypeQueryVariables = Exact<{ + id: Scalars['ID']; + firstValues?: InputMaybe; + afterValues?: InputMaybe; + lastValues?: InputMaybe; + beforeValues?: InputMaybe; +}>; + + +export type PageTypeQuery = { __typename: 'Query', pageType: { __typename: 'PageType', id: string, name: string, attributes: Array<{ __typename: 'Attribute', id: string, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, slug: string | null, name: string | null, valueRequired: boolean, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null } | null> | null } | null }; + +export type PageCountQueryVariables = Exact<{ + filter?: InputMaybe; +}>; + + +export type PageCountQuery = { __typename: 'Query', pages: { __typename: 'PageCountableConnection', totalCount: number | null } | null }; + +export type PermissionGroupDeleteMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type PermissionGroupDeleteMutation = { __typename: 'Mutation', permissionGroupDelete: { __typename: 'PermissionGroupDelete', errors: Array<{ __typename: 'PermissionGroupError', code: PermissionGroupErrorCode, field: string | null, message: string | null }> } | null }; + +export type PermissionGroupCreateMutationVariables = Exact<{ + input: PermissionGroupCreateInput; +}>; + + +export type PermissionGroupCreateMutation = { __typename: 'Mutation', permissionGroupCreate: { __typename: 'PermissionGroupCreate', errors: Array<{ __typename: 'PermissionGroupError', code: PermissionGroupErrorCode, field: string | null, message: string | null }>, group: { __typename: 'Group', id: string, name: string, userCanManage: boolean, permissions: Array<{ __typename: 'Permission', code: PermissionEnum, name: string } | null> | null, users: Array<{ __typename: 'User', id: string, firstName: string, lastName: string, email: string, isActive: boolean, avatar: { __typename: 'Image', url: string } | null } | null> | null } | null } | null }; + +export type PermissionGroupUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: PermissionGroupUpdateInput; +}>; + + +export type PermissionGroupUpdateMutation = { __typename: 'Mutation', permissionGroupUpdate: { __typename: 'PermissionGroupUpdate', errors: Array<{ __typename: 'PermissionGroupError', code: PermissionGroupErrorCode, field: string | null, message: string | null }>, group: { __typename: 'Group', id: string, name: string, userCanManage: boolean, permissions: Array<{ __typename: 'Permission', code: PermissionEnum, name: string } | null> | null, users: Array<{ __typename: 'User', id: string, firstName: string, lastName: string, email: string, isActive: boolean, avatar: { __typename: 'Image', url: string } | null } | null> | null } | null } | null }; + +export type PermissionGroupListQueryVariables = Exact<{ + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + filter?: InputMaybe; + sort?: InputMaybe; +}>; + + +export type PermissionGroupListQuery = { __typename: 'Query', permissionGroups: { __typename: 'GroupCountableConnection', edges: Array<{ __typename: 'GroupCountableEdge', node: { __typename: 'Group', id: string, name: string, userCanManage: boolean, users: Array<{ __typename: 'User', id: string, firstName: string, lastName: string } | null> | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type PermissionGroupDetailsQueryVariables = Exact<{ + id: Scalars['ID']; + userId: Scalars['ID']; +}>; + + +export type PermissionGroupDetailsQuery = { __typename: 'Query', permissionGroup: { __typename: 'Group', id: string, name: string, userCanManage: boolean, permissions: Array<{ __typename: 'Permission', code: PermissionEnum, name: string } | null> | null, users: Array<{ __typename: 'User', id: string, firstName: string, lastName: string, email: string, isActive: boolean, avatar: { __typename: 'Image', url: string } | null } | null> | null } | null, user: { __typename: 'User', editableGroups: Array<{ __typename: 'Group', id: string } | null> | null, userPermissions: Array<{ __typename: 'UserPermission', code: PermissionEnum, sourcePermissionGroups: Array<{ __typename: 'Group', id: string }> | null } | null> | null } | null }; + +export type PluginUpdateMutationVariables = Exact<{ + channelId?: InputMaybe; + id: Scalars['ID']; + input: PluginUpdateInput; +}>; + + +export type PluginUpdateMutation = { __typename: 'Mutation', pluginUpdate: { __typename: 'PluginUpdate', errors: Array<{ __typename: 'PluginError', code: PluginErrorCode, field: string | null, message: string | null }>, plugin: { __typename: 'Plugin', id: string, name: string, description: string, globalConfiguration: { __typename: 'PluginConfiguration', active: boolean, configuration: Array<{ __typename: 'ConfigurationItem', name: string, value: string | null, type: ConfigurationTypeFieldEnum | null, helpText: string | null, label: string | null } | null> | null, channel: { __typename: 'Channel', id: string, name: string, slug: string } | null } | null, channelConfigurations: Array<{ __typename: 'PluginConfiguration', active: boolean, configuration: Array<{ __typename: 'ConfigurationItem', name: string, value: string | null, type: ConfigurationTypeFieldEnum | null, helpText: string | null, label: string | null } | null> | null, channel: { __typename: 'Channel', id: string, name: string, slug: string } | null }> } | null } | null }; + +export type PluginsQueryVariables = Exact<{ + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + sort?: InputMaybe; +}>; + + +export type PluginsQuery = { __typename: 'Query', plugins: { __typename: 'PluginCountableConnection', edges: Array<{ __typename: 'PluginCountableEdge', node: { __typename: 'Plugin', id: string, name: string, description: string, channelConfigurations: Array<{ __typename: 'PluginConfiguration', active: boolean, channel: { __typename: 'Channel', id: string, name: string, slug: string } | null }>, globalConfiguration: { __typename: 'PluginConfiguration', active: boolean, channel: { __typename: 'Channel', id: string, name: string, slug: string } | null } | null } }>, pageInfo: { __typename: 'PageInfo', hasPreviousPage: boolean, hasNextPage: boolean, startCursor: string | null, endCursor: string | null } } | null }; + +export type PluginQueryVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type PluginQuery = { __typename: 'Query', plugin: { __typename: 'Plugin', id: string, name: string, description: string, globalConfiguration: { __typename: 'PluginConfiguration', active: boolean, configuration: Array<{ __typename: 'ConfigurationItem', name: string, value: string | null, type: ConfigurationTypeFieldEnum | null, helpText: string | null, label: string | null } | null> | null, channel: { __typename: 'Channel', id: string, name: string, slug: string } | null } | null, channelConfigurations: Array<{ __typename: 'PluginConfiguration', active: boolean, configuration: Array<{ __typename: 'ConfigurationItem', name: string, value: string | null, type: ConfigurationTypeFieldEnum | null, helpText: string | null, label: string | null } | null> | null, channel: { __typename: 'Channel', id: string, name: string, slug: string } | null }> } | null }; + +export type ProductTypeDeleteMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type ProductTypeDeleteMutation = { __typename: 'Mutation', productTypeDelete: { __typename: 'ProductTypeDelete', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, productType: { __typename: 'ProductType', id: string } | null } | null }; + +export type ProductTypeBulkDeleteMutationVariables = Exact<{ + ids: Array> | InputMaybe; +}>; + + +export type ProductTypeBulkDeleteMutation = { __typename: 'Mutation', productTypeBulkDelete: { __typename: 'ProductTypeBulkDelete', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }> } | null }; + +export type ProductTypeUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: ProductTypeInput; +}>; + + +export type ProductTypeUpdateMutation = { __typename: 'Mutation', productTypeUpdate: { __typename: 'ProductTypeUpdate', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } } | null> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type AssignProductAttributeMutationVariables = Exact<{ + id: Scalars['ID']; + operations: Array | ProductAttributeAssignInput; +}>; + + +export type AssignProductAttributeMutation = { __typename: 'Mutation', productAttributeAssign: { __typename: 'ProductAttributeAssign', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } } | null> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type UnassignProductAttributeMutationVariables = Exact<{ + id: Scalars['ID']; + ids: Array> | InputMaybe; +}>; + + +export type UnassignProductAttributeMutation = { __typename: 'Mutation', productAttributeUnassign: { __typename: 'ProductAttributeUnassign', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } } | null> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type ProductTypeCreateMutationVariables = Exact<{ + input: ProductTypeInput; +}>; + + +export type ProductTypeCreateMutation = { __typename: 'Mutation', productTypeCreate: { __typename: 'ProductTypeCreate', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } } | null> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type ProductTypeAttributeReorderMutationVariables = Exact<{ + move: ReorderInput; + productTypeId: Scalars['ID']; + type: ProductAttributeType; +}>; + + +export type ProductTypeAttributeReorderMutation = { __typename: 'Mutation', productTypeReorderAttributes: { __typename: 'ProductTypeReorderAttributes', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } } | null> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type ProductAttributeAssignmentUpdateMutationVariables = Exact<{ + operations: Array> | InputMaybe; + productTypeId: Scalars['ID']; +}>; + + +export type ProductAttributeAssignmentUpdateMutation = { __typename: 'Mutation', productAttributeAssignmentUpdate: { __typename: 'ProductAttributeAssignmentUpdate', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null, attributes: Array | null }>, productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } } | null> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type ProductTypeListQueryVariables = Exact<{ + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + filter?: InputMaybe; + sort?: InputMaybe; +}>; + + +export type ProductTypeListQuery = { __typename: 'Query', productTypes: { __typename: 'ProductTypeCountableConnection', edges: Array<{ __typename: 'ProductTypeCountableEdge', node: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type ProductTypeDetailsQueryVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type ProductTypeDetailsQuery = { __typename: 'Query', productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } | null> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } } | null> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null, shop: { __typename: 'Shop', defaultWeightUnit: WeightUnitsEnum | null }, taxTypes: Array<{ __typename: 'TaxType', taxCode: string | null, description: string | null } | null> | null }; + +export type ProductTypeCreateDataQueryVariables = Exact<{ [key: string]: never; }>; + + +export type ProductTypeCreateDataQuery = { __typename: 'Query', shop: { __typename: 'Shop', defaultWeightUnit: WeightUnitsEnum | null }, taxTypes: Array<{ __typename: 'TaxType', taxCode: string | null, description: string | null } | null> | null }; + +export type ProductMediaCreateMutationVariables = Exact<{ + product: Scalars['ID']; + image?: InputMaybe; + alt?: InputMaybe; + mediaUrl?: InputMaybe; +}>; + + +export type ProductMediaCreateMutation = { __typename: 'Mutation', productMediaCreate: { __typename: 'ProductMediaCreate', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, product: { __typename: 'Product', id: string, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null } | null } | null }; + +export type ProductDeleteMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type ProductDeleteMutation = { __typename: 'Mutation', productDelete: { __typename: 'ProductDelete', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, product: { __typename: 'Product', id: string } | null } | null }; + +export type ProductMediaReorderMutationVariables = Exact<{ + productId: Scalars['ID']; + mediaIds: Array> | InputMaybe; +}>; + + +export type ProductMediaReorderMutation = { __typename: 'Mutation', productMediaReorder: { __typename: 'ProductMediaReorder', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, product: { __typename: 'Product', id: string, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string }> | null } | null } | null }; + +export type ProductVariantSetDefaultMutationVariables = Exact<{ + productId: Scalars['ID']; + variantId: Scalars['ID']; +}>; + + +export type ProductVariantSetDefaultMutation = { __typename: 'Mutation', productVariantSetDefault: { __typename: 'ProductVariantSetDefault', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, product: { __typename: 'Product', id: string, defaultVariant: { __typename: 'ProductVariant', id: string, name: string } | null, variants: Array<{ __typename: 'ProductVariant', id: string, name: string } | null> | null } | null } | null }; + +export type ProductUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: ProductInput; + firstValues?: InputMaybe; + afterValues?: InputMaybe; + lastValues?: InputMaybe; + beforeValues?: InputMaybe; +}>; + + +export type ProductUpdateMutation = { __typename: 'Mutation', productUpdate: { __typename: 'ProductUpdate', errors: Array<{ __typename: 'ProductError', attributes: Array | null, code: ProductErrorCode, field: string | null, message: string | null }>, product: { __typename: 'Product', name: string, slug: string, description: any | null, seoTitle: string | null, seoDescription: string | null, rating: number | null, chargeTaxes: boolean, isAvailable: boolean | null, id: string, defaultVariant: { __typename: 'ProductVariant', id: string } | null, category: { __typename: 'Category', id: string, name: string } | null, collections: Array<{ __typename: 'Collection', id: string, name: string } | null> | null, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, variants: Array<{ __typename: 'ProductVariant', id: string, sku: string | null, name: string, margin: number | null, trackInventory: boolean, quantityLimitPerCustomer: number | null, media: Array<{ __typename: 'ProductMedia', url: string }> | null, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } } | null> | null, preorder: { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null } | null, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null } | null> | null, productType: { __typename: 'ProductType', id: string, name: string, hasVariants: boolean, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null } | null> | null }, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, attributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, slug: string | null, name: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type SimpleProductUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: ProductInput; + productVariantId: Scalars['ID']; + productVariantInput: ProductVariantInput; + addStocks: Array | StockInput; + deleteStocks: Array | Scalars['ID']; + updateStocks: Array | StockInput; + firstValues?: InputMaybe; + afterValues?: InputMaybe; + lastValues?: InputMaybe; + beforeValues?: InputMaybe; +}>; + + +export type SimpleProductUpdateMutation = { __typename: 'Mutation', productUpdate: { __typename: 'ProductUpdate', errors: Array<{ __typename: 'ProductError', attributes: Array | null, code: ProductErrorCode, field: string | null, message: string | null }>, product: { __typename: 'Product', name: string, slug: string, description: any | null, seoTitle: string | null, seoDescription: string | null, rating: number | null, chargeTaxes: boolean, isAvailable: boolean | null, id: string, defaultVariant: { __typename: 'ProductVariant', id: string } | null, category: { __typename: 'Category', id: string, name: string } | null, collections: Array<{ __typename: 'Collection', id: string, name: string } | null> | null, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, variants: Array<{ __typename: 'ProductVariant', id: string, sku: string | null, name: string, margin: number | null, trackInventory: boolean, quantityLimitPerCustomer: number | null, media: Array<{ __typename: 'ProductMedia', url: string }> | null, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } } | null> | null, preorder: { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null } | null, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null } | null> | null, productType: { __typename: 'ProductType', id: string, name: string, hasVariants: boolean, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null } | null> | null }, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, attributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, slug: string | null, name: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null, productVariantUpdate: { __typename: 'ProductVariantUpdate', errors: Array<{ __typename: 'ProductError', attributes: Array | null, code: ProductErrorCode, field: string | null, message: string | null }>, productVariant: { __typename: 'ProductVariant', id: string, name: string, sku: string | null, trackInventory: boolean, quantityLimitPerCustomer: number | null, selectionAttributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, nonSelectionAttributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, media: Array<{ __typename: 'ProductMedia', id: string, url: string, type: ProductMediaType, oembedData: any }> | null, product: { __typename: 'Product', id: string, name: string, defaultVariant: { __typename: 'ProductVariant', id: string } | null, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, thumbnail: { __typename: 'Image', url: string } | null, channelListings: Array<{ __typename: 'ProductChannelListing', publicationDate: any | null, isPublished: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, variants: Array<{ __typename: 'ProductVariant', id: string, name: string, sku: string | null, media: Array<{ __typename: 'ProductMedia', id: string, url: string, type: ProductMediaType, oembedData: any }> | null } | null> | null }, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } } | null> | null, preorder: { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null } | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null, productVariantStocksCreate: { __typename: 'ProductVariantStocksCreate', errors: Array<{ __typename: 'BulkStockError', code: ProductErrorCode, field: string | null, index: number | null, message: string | null }>, productVariant: { __typename: 'ProductVariant', id: string, name: string, sku: string | null, trackInventory: boolean, quantityLimitPerCustomer: number | null, selectionAttributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, nonSelectionAttributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, media: Array<{ __typename: 'ProductMedia', id: string, url: string, type: ProductMediaType, oembedData: any }> | null, product: { __typename: 'Product', id: string, name: string, defaultVariant: { __typename: 'ProductVariant', id: string } | null, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, thumbnail: { __typename: 'Image', url: string } | null, channelListings: Array<{ __typename: 'ProductChannelListing', publicationDate: any | null, isPublished: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, variants: Array<{ __typename: 'ProductVariant', id: string, name: string, sku: string | null, media: Array<{ __typename: 'ProductMedia', id: string, url: string, type: ProductMediaType, oembedData: any }> | null } | null> | null }, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } } | null> | null, preorder: { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null } | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null, productVariantStocksDelete: { __typename: 'ProductVariantStocksDelete', errors: Array<{ __typename: 'StockError', code: StockErrorCode, field: string | null, message: string | null }>, productVariant: { __typename: 'ProductVariant', id: string, name: string, sku: string | null, trackInventory: boolean, quantityLimitPerCustomer: number | null, selectionAttributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, nonSelectionAttributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, media: Array<{ __typename: 'ProductMedia', id: string, url: string, type: ProductMediaType, oembedData: any }> | null, product: { __typename: 'Product', id: string, name: string, defaultVariant: { __typename: 'ProductVariant', id: string } | null, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, thumbnail: { __typename: 'Image', url: string } | null, channelListings: Array<{ __typename: 'ProductChannelListing', publicationDate: any | null, isPublished: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, variants: Array<{ __typename: 'ProductVariant', id: string, name: string, sku: string | null, media: Array<{ __typename: 'ProductMedia', id: string, url: string, type: ProductMediaType, oembedData: any }> | null } | null> | null }, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } } | null> | null, preorder: { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null } | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null, productVariantStocksUpdate: { __typename: 'ProductVariantStocksUpdate', errors: Array<{ __typename: 'BulkStockError', code: ProductErrorCode, field: string | null, index: number | null, message: string | null }>, productVariant: { __typename: 'ProductVariant', id: string, name: string, sku: string | null, trackInventory: boolean, quantityLimitPerCustomer: number | null, selectionAttributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, nonSelectionAttributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, media: Array<{ __typename: 'ProductMedia', id: string, url: string, type: ProductMediaType, oembedData: any }> | null, product: { __typename: 'Product', id: string, name: string, defaultVariant: { __typename: 'ProductVariant', id: string } | null, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, thumbnail: { __typename: 'Image', url: string } | null, channelListings: Array<{ __typename: 'ProductChannelListing', publicationDate: any | null, isPublished: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, variants: Array<{ __typename: 'ProductVariant', id: string, name: string, sku: string | null, media: Array<{ __typename: 'ProductMedia', id: string, url: string, type: ProductMediaType, oembedData: any }> | null } | null> | null }, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } } | null> | null, preorder: { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null } | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type ProductCreateMutationVariables = Exact<{ + input: ProductCreateInput; +}>; + + +export type ProductCreateMutation = { __typename: 'Mutation', productCreate: { __typename: 'ProductCreate', errors: Array<{ __typename: 'ProductError', attributes: Array | null, code: ProductErrorCode, field: string | null, message: string | null }>, product: { __typename: 'Product', id: string } | null } | null }; + +export type VariantDeleteMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type VariantDeleteMutation = { __typename: 'Mutation', productVariantDelete: { __typename: 'ProductVariantDelete', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, productVariant: { __typename: 'ProductVariant', id: string } | null } | null }; + +export type VariantUpdateMutationVariables = Exact<{ + addStocks: Array | StockInput; + removeStocks: Array | Scalars['ID']; + id: Scalars['ID']; + attributes?: InputMaybe | AttributeValueInput>; + sku?: InputMaybe; + quantityLimitPerCustomer?: InputMaybe; + trackInventory: Scalars['Boolean']; + stocks: Array | StockInput; + preorder?: InputMaybe; + weight?: InputMaybe; + firstValues?: InputMaybe; + afterValues?: InputMaybe; + lastValues?: InputMaybe; + beforeValues?: InputMaybe; +}>; + + +export type VariantUpdateMutation = { __typename: 'Mutation', productVariantUpdate: { __typename: 'ProductVariantUpdate', errors: Array<{ __typename: 'ProductError', attributes: Array | null, code: ProductErrorCode, field: string | null, message: string | null }>, productVariant: { __typename: 'ProductVariant', id: string, name: string, sku: string | null, trackInventory: boolean, quantityLimitPerCustomer: number | null, selectionAttributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, nonSelectionAttributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, media: Array<{ __typename: 'ProductMedia', id: string, url: string, type: ProductMediaType, oembedData: any }> | null, product: { __typename: 'Product', id: string, name: string, defaultVariant: { __typename: 'ProductVariant', id: string } | null, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, thumbnail: { __typename: 'Image', url: string } | null, channelListings: Array<{ __typename: 'ProductChannelListing', publicationDate: any | null, isPublished: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, variants: Array<{ __typename: 'ProductVariant', id: string, name: string, sku: string | null, media: Array<{ __typename: 'ProductMedia', id: string, url: string, type: ProductMediaType, oembedData: any }> | null } | null> | null }, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } } | null> | null, preorder: { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null } | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null, productVariantStocksUpdate: { __typename: 'ProductVariantStocksUpdate', errors: Array<{ __typename: 'BulkStockError', code: ProductErrorCode, field: string | null, index: number | null, message: string | null }>, productVariant: { __typename: 'ProductVariant', id: string, name: string, sku: string | null, trackInventory: boolean, quantityLimitPerCustomer: number | null, selectionAttributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, nonSelectionAttributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, media: Array<{ __typename: 'ProductMedia', id: string, url: string, type: ProductMediaType, oembedData: any }> | null, product: { __typename: 'Product', id: string, name: string, defaultVariant: { __typename: 'ProductVariant', id: string } | null, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, thumbnail: { __typename: 'Image', url: string } | null, channelListings: Array<{ __typename: 'ProductChannelListing', publicationDate: any | null, isPublished: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, variants: Array<{ __typename: 'ProductVariant', id: string, name: string, sku: string | null, media: Array<{ __typename: 'ProductMedia', id: string, url: string, type: ProductMediaType, oembedData: any }> | null } | null> | null }, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } } | null> | null, preorder: { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null } | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null, productVariantStocksCreate: { __typename: 'ProductVariantStocksCreate', errors: Array<{ __typename: 'BulkStockError', code: ProductErrorCode, field: string | null, index: number | null, message: string | null }>, productVariant: { __typename: 'ProductVariant', id: string, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } } | null> | null } | null } | null, productVariantStocksDelete: { __typename: 'ProductVariantStocksDelete', errors: Array<{ __typename: 'StockError', code: StockErrorCode, field: string | null, message: string | null }>, productVariant: { __typename: 'ProductVariant', id: string, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } } | null> | null } | null } | null }; + +export type VariantCreateMutationVariables = Exact<{ + input: ProductVariantCreateInput; + firstValues?: InputMaybe; + afterValues?: InputMaybe; + lastValues?: InputMaybe; + beforeValues?: InputMaybe; +}>; + + +export type VariantCreateMutation = { __typename: 'Mutation', productVariantCreate: { __typename: 'ProductVariantCreate', errors: Array<{ __typename: 'ProductError', attributes: Array | null, code: ProductErrorCode, field: string | null, message: string | null }>, productVariant: { __typename: 'ProductVariant', id: string, name: string, sku: string | null, trackInventory: boolean, quantityLimitPerCustomer: number | null, selectionAttributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, nonSelectionAttributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, media: Array<{ __typename: 'ProductMedia', id: string, url: string, type: ProductMediaType, oembedData: any }> | null, product: { __typename: 'Product', id: string, name: string, defaultVariant: { __typename: 'ProductVariant', id: string } | null, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, thumbnail: { __typename: 'Image', url: string } | null, channelListings: Array<{ __typename: 'ProductChannelListing', publicationDate: any | null, isPublished: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, variants: Array<{ __typename: 'ProductVariant', id: string, name: string, sku: string | null, media: Array<{ __typename: 'ProductMedia', id: string, url: string, type: ProductMediaType, oembedData: any }> | null } | null> | null }, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } } | null> | null, preorder: { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null } | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type ProductMediaDeleteMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type ProductMediaDeleteMutation = { __typename: 'Mutation', productMediaDelete: { __typename: 'ProductMediaDelete', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, product: { __typename: 'Product', id: string, media: Array<{ __typename: 'ProductMedia', id: string }> | null } | null } | null }; + +export type ProductMediaUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + alt: Scalars['String']; +}>; + + +export type ProductMediaUpdateMutation = { __typename: 'Mutation', productMediaUpdate: { __typename: 'ProductMediaUpdate', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, product: { __typename: 'Product', id: string, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null } | null } | null }; + +export type VariantMediaAssignMutationVariables = Exact<{ + variantId: Scalars['ID']; + mediaId: Scalars['ID']; +}>; + + +export type VariantMediaAssignMutation = { __typename: 'Mutation', variantMediaAssign: { __typename: 'VariantMediaAssign', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, productVariant: { __typename: 'ProductVariant', id: string, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, product: { __typename: 'Product', id: string, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, variants: Array<{ __typename: 'ProductVariant', id: string, name: string, sku: string | null, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null } | null> | null } } | null } | null }; + +export type VariantMediaUnassignMutationVariables = Exact<{ + variantId: Scalars['ID']; + mediaId: Scalars['ID']; +}>; + + +export type VariantMediaUnassignMutation = { __typename: 'Mutation', variantMediaUnassign: { __typename: 'VariantMediaUnassign', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, productVariant: { __typename: 'ProductVariant', id: string, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, product: { __typename: 'Product', id: string, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, variants: Array<{ __typename: 'ProductVariant', id: string, name: string, sku: string | null, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null } | null> | null } } | null } | null }; + +export type ProductBulkDeleteMutationVariables = Exact<{ + ids: Array | Scalars['ID']; +}>; + + +export type ProductBulkDeleteMutation = { __typename: 'Mutation', productBulkDelete: { __typename: 'ProductBulkDelete', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }> } | null }; + +export type ProductVariantBulkCreateMutationVariables = Exact<{ + id: Scalars['ID']; + inputs: Array> | InputMaybe; +}>; + + +export type ProductVariantBulkCreateMutation = { __typename: 'Mutation', productVariantBulkCreate: { __typename: 'ProductVariantBulkCreate', errors: Array<{ __typename: 'BulkProductError', field: string | null, code: ProductErrorCode, index: number | null, channels: Array | null, message: string | null }> } | null }; + +export type ProductVariantBulkDeleteMutationVariables = Exact<{ + ids: Array | Scalars['ID']; +}>; + + +export type ProductVariantBulkDeleteMutation = { __typename: 'Mutation', productVariantBulkDelete: { __typename: 'ProductVariantBulkDelete', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }> } | null }; + +export type ProductExportMutationVariables = Exact<{ + input: ExportProductsInput; +}>; + + +export type ProductExportMutation = { __typename: 'Mutation', exportProducts: { __typename: 'ExportProducts', exportFile: { __typename: 'ExportFile', id: string, status: JobStatusEnum, url: string | null } | null, errors: Array<{ __typename: 'ExportError', code: ExportErrorCode, field: string | null, message: string | null }> } | null }; + +export type ProductChannelListingUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: ProductChannelListingUpdateInput; +}>; + + +export type ProductChannelListingUpdateMutation = { __typename: 'Mutation', productChannelListingUpdate: { __typename: 'ProductChannelListingUpdate', product: { __typename: 'Product', id: string, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, variants: Array<{ __typename: 'ProductVariant', id: string, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null } | null> | null } | null, errors: Array<{ __typename: 'ProductChannelListingError', code: ProductErrorCode, field: string | null, message: string | null, channels: Array | null }> } | null }; + +export type ProductVariantReorderMutationVariables = Exact<{ + move: ReorderInput; + productId: Scalars['ID']; +}>; + + +export type ProductVariantReorderMutation = { __typename: 'Mutation', productVariantReorder: { __typename: 'ProductVariantReorder', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, product: { __typename: 'Product', id: string, variants: Array<{ __typename: 'ProductVariant', id: string } | null> | null } | null } | null }; + +export type ProductVariantChannelListingUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: Array | ProductVariantChannelListingAddInput; +}>; + + +export type ProductVariantChannelListingUpdateMutation = { __typename: 'Mutation', productVariantChannelListingUpdate: { __typename: 'ProductVariantChannelListingUpdate', variant: { __typename: 'ProductVariant', id: string, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null, product: { __typename: 'Product', id: string, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null } } | null, errors: Array<{ __typename: 'ProductChannelListingError', code: ProductErrorCode, field: string | null, message: string | null, channels: Array | null }> } | null }; + +export type ProductVariantPreorderDeactivateMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type ProductVariantPreorderDeactivateMutation = { __typename: 'Mutation', productVariantPreorderDeactivate: { __typename: 'ProductVariantPreorderDeactivate', productVariant: { __typename: 'ProductVariant', id: string, preorder: { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null } | null } | null, errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }> } | null }; + +export type InitialProductFilterAttributesQueryVariables = Exact<{ [key: string]: never; }>; + + +export type InitialProductFilterAttributesQuery = { __typename: 'Query', attributes: { __typename: 'AttributeCountableConnection', edges: Array<{ __typename: 'AttributeCountableEdge', node: { __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, slug: string | null } }> } | null }; + +export type InitialProductFilterCategoriesQueryVariables = Exact<{ + categories?: InputMaybe | Scalars['ID']>; +}>; + + +export type InitialProductFilterCategoriesQuery = { __typename: 'Query', categories: { __typename: 'CategoryCountableConnection', edges: Array<{ __typename: 'CategoryCountableEdge', node: { __typename: 'Category', id: string, name: string } }> } | null }; + +export type InitialProductFilterCollectionsQueryVariables = Exact<{ + collections?: InputMaybe | Scalars['ID']>; +}>; + + +export type InitialProductFilterCollectionsQuery = { __typename: 'Query', collections: { __typename: 'CollectionCountableConnection', edges: Array<{ __typename: 'CollectionCountableEdge', node: { __typename: 'Collection', id: string, name: string } }> } | null }; + +export type InitialProductFilterProductTypesQueryVariables = Exact<{ + productTypes?: InputMaybe | Scalars['ID']>; +}>; + + +export type InitialProductFilterProductTypesQuery = { __typename: 'Query', productTypes: { __typename: 'ProductTypeCountableConnection', edges: Array<{ __typename: 'ProductTypeCountableEdge', node: { __typename: 'ProductType', id: string, name: string } }> } | null }; + +export type ProductListQueryVariables = Exact<{ + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + channel?: InputMaybe; + sort?: InputMaybe; + hasChannel: Scalars['Boolean']; + hasSelectedAttributes: Scalars['Boolean']; +}>; + + +export type ProductListQuery = { __typename: 'Query', products: { __typename: 'ProductCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', updatedAt: any | null, id: string, name: string, attributes?: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string }, values: Array<{ __typename: 'AttributeValue', id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, thumbnail: { __typename: 'Image', url: string } | null, productType: { __typename: 'ProductType', id: string, name: string, hasVariants: boolean }, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, pricing?: { __typename: 'ProductPricingInfo', priceRange: { __typename: 'TaxedMoneyRange', start: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string } } | null, stop: { __typename: 'TaxedMoney', net: { __typename: 'Money', amount: number, currency: string } } | null } | null } | null, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null } }>, pageInfo: { __typename: 'PageInfo', hasPreviousPage: boolean, hasNextPage: boolean, startCursor: string | null, endCursor: string | null } } | null }; + +export type ProductCountQueryVariables = Exact<{ + filter?: InputMaybe; + channel?: InputMaybe; +}>; + + +export type ProductCountQuery = { __typename: 'Query', products: { __typename: 'ProductCountableConnection', totalCount: number | null } | null }; + +export type ProductDetailsQueryVariables = Exact<{ + id: Scalars['ID']; + channel?: InputMaybe; + firstValues?: InputMaybe; + afterValues?: InputMaybe; + lastValues?: InputMaybe; + beforeValues?: InputMaybe; +}>; + + +export type ProductDetailsQuery = { __typename: 'Query', product: { __typename: 'Product', name: string, slug: string, description: any | null, seoTitle: string | null, seoDescription: string | null, rating: number | null, chargeTaxes: boolean, isAvailable: boolean | null, id: string, defaultVariant: { __typename: 'ProductVariant', id: string } | null, category: { __typename: 'Category', id: string, name: string } | null, collections: Array<{ __typename: 'Collection', id: string, name: string } | null> | null, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, variants: Array<{ __typename: 'ProductVariant', id: string, sku: string | null, name: string, margin: number | null, trackInventory: boolean, quantityLimitPerCustomer: number | null, media: Array<{ __typename: 'ProductMedia', url: string }> | null, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } } | null> | null, preorder: { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null } | null, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null } | null> | null, productType: { __typename: 'ProductType', id: string, name: string, hasVariants: boolean, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null } | null> | null }, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, attributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, slug: string | null, name: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null, taxTypes: Array<{ __typename: 'TaxType', description: string | null, taxCode: string | null } | null> | null }; + +export type ProductTypeQueryVariables = Exact<{ + id: Scalars['ID']; + firstValues?: InputMaybe; + afterValues?: InputMaybe; + lastValues?: InputMaybe; + beforeValues?: InputMaybe; +}>; + + +export type ProductTypeQuery = { __typename: 'Query', productType: { __typename: 'ProductType', id: string, name: string, hasVariants: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, slug: string | null, name: string | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null } | null> | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null } | null }; + +export type ProductVariantDetailsQueryVariables = Exact<{ + id: Scalars['ID']; + firstValues?: InputMaybe; + afterValues?: InputMaybe; + lastValues?: InputMaybe; + beforeValues?: InputMaybe; +}>; + + +export type ProductVariantDetailsQuery = { __typename: 'Query', productVariant: { __typename: 'ProductVariant', id: string, name: string, sku: string | null, trackInventory: boolean, quantityLimitPerCustomer: number | null, selectionAttributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, nonSelectionAttributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, media: Array<{ __typename: 'ProductMedia', id: string, url: string, type: ProductMediaType, oembedData: any }> | null, product: { __typename: 'Product', id: string, name: string, defaultVariant: { __typename: 'ProductVariant', id: string } | null, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, thumbnail: { __typename: 'Image', url: string } | null, channelListings: Array<{ __typename: 'ProductChannelListing', publicationDate: any | null, isPublished: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, variants: Array<{ __typename: 'ProductVariant', id: string, name: string, sku: string | null, media: Array<{ __typename: 'ProductMedia', id: string, url: string, type: ProductMediaType, oembedData: any }> | null } | null> | null }, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } } | null> | null, preorder: { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null } | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null }; + +export type ProductVariantCreateDataQueryVariables = Exact<{ + id: Scalars['ID']; + firstValues?: InputMaybe; + afterValues?: InputMaybe; + lastValues?: InputMaybe; + beforeValues?: InputMaybe; +}>; + + +export type ProductVariantCreateDataQuery = { __typename: 'Query', product: { __typename: 'Product', id: string, name: string, media: Array<{ __typename: 'ProductMedia', id: string, sortOrder: number | null, url: string }> | null, channelListings: Array<{ __typename: 'ProductChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, productType: { __typename: 'ProductType', id: string, selectionVariantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null } | null> | null, nonSelectionVariantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null } | null> | null }, thumbnail: { __typename: 'Image', url: string } | null, variants: Array<{ __typename: 'ProductVariant', id: string, name: string, sku: string | null, media: Array<{ __typename: 'ProductMedia', id: string, url: string, type: ProductMediaType }> | null } | null> | null } | null }; + +export type ProductMediaByIdQueryVariables = Exact<{ + productId: Scalars['ID']; + mediaId: Scalars['ID']; +}>; + + +export type ProductMediaByIdQuery = { __typename: 'Query', product: { __typename: 'Product', id: string, name: string, mainImage: { __typename: 'ProductMedia', id: string, alt: string, url: string, type: ProductMediaType, oembedData: any } | null, media: Array<{ __typename: 'ProductMedia', id: string, url: string, alt: string, type: ProductMediaType, oembedData: any }> | null } | null }; + +export type AvailableInGridAttributesQueryVariables = Exact<{ + first: Scalars['Int']; + after?: InputMaybe; +}>; + + +export type AvailableInGridAttributesQuery = { __typename: 'Query', availableInGrid: { __typename: 'AttributeCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'AttributeCountableEdge', node: { __typename: 'Attribute', id: string, name: string | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type GridAttributesQueryVariables = Exact<{ + ids: Array | Scalars['ID']; +}>; + + +export type GridAttributesQuery = { __typename: 'Query', grid: { __typename: 'AttributeCountableConnection', edges: Array<{ __typename: 'AttributeCountableEdge', node: { __typename: 'Attribute', id: string, name: string | null } }> } | null }; + +export type CreateMultipleVariantsDataQueryVariables = Exact<{ + id: Scalars['ID']; + firstValues?: InputMaybe; + afterValues?: InputMaybe; + lastValues?: InputMaybe; + beforeValues?: InputMaybe; +}>; + + +export type CreateMultipleVariantsDataQuery = { __typename: 'Query', product: { __typename: 'Product', id: string, attributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, slug: string | null, name: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } | null> }>, productType: { __typename: 'ProductType', id: string, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null } | null> | null }, channelListings: Array<{ __typename: 'ProductChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null } | null, warehouses: { __typename: 'WarehouseCountableConnection', edges: Array<{ __typename: 'WarehouseCountableEdge', node: { __typename: 'Warehouse', id: string, name: string } }> } | null }; + +export type SearchAttributesQueryVariables = Exact<{ + after?: InputMaybe; + first: Scalars['Int']; + query: Scalars['String']; +}>; + + +export type SearchAttributesQuery = { __typename: 'Query', search: { __typename: 'AttributeCountableConnection', edges: Array<{ __typename: 'AttributeCountableEdge', node: { __typename: 'Attribute', id: string, name: string | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type SearchAttributeValuesQueryVariables = Exact<{ + id?: InputMaybe; + after?: InputMaybe; + first: Scalars['Int']; + query: Scalars['String']; +}>; + + +export type SearchAttributeValuesQuery = { __typename: 'Query', attribute: { __typename: 'Attribute', id: string, choices: { __typename: 'AttributeValueCountableConnection', edges: Array<{ __typename: 'AttributeValueCountableEdge', node: { __typename: 'AttributeValue', richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null } | null }; + +export type SearchAvailablePageAttributesQueryVariables = Exact<{ + id: Scalars['ID']; + after?: InputMaybe; + first: Scalars['Int']; + query: Scalars['String']; +}>; + + +export type SearchAvailablePageAttributesQuery = { __typename: 'Query', pageType: { __typename: 'PageType', id: string, availableAttributes: { __typename: 'AttributeCountableConnection', edges: Array<{ __typename: 'AttributeCountableEdge', node: { __typename: 'Attribute', id: string, name: string | null, slug: string | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null } | null }; + +export type SearchAvailableProductAttributesQueryVariables = Exact<{ + id: Scalars['ID']; + after?: InputMaybe; + first: Scalars['Int']; + query: Scalars['String']; +}>; + + +export type SearchAvailableProductAttributesQuery = { __typename: 'Query', productType: { __typename: 'ProductType', id: string, availableAttributes: { __typename: 'AttributeCountableConnection', edges: Array<{ __typename: 'AttributeCountableEdge', node: { __typename: 'Attribute', id: string, name: string | null, slug: string | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null } | null }; + +export type SearchCategoriesQueryVariables = Exact<{ + after?: InputMaybe; + first: Scalars['Int']; + query: Scalars['String']; +}>; + + +export type SearchCategoriesQuery = { __typename: 'Query', search: { __typename: 'CategoryCountableConnection', edges: Array<{ __typename: 'CategoryCountableEdge', node: { __typename: 'Category', id: string, name: string } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type SearchCollectionsQueryVariables = Exact<{ + after?: InputMaybe; + first: Scalars['Int']; + query: Scalars['String']; +}>; + + +export type SearchCollectionsQuery = { __typename: 'Query', search: { __typename: 'CollectionCountableConnection', edges: Array<{ __typename: 'CollectionCountableEdge', node: { __typename: 'Collection', id: string, name: string } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type SearchCustomersQueryVariables = Exact<{ + after?: InputMaybe; + first: Scalars['Int']; + query: Scalars['String']; +}>; + + +export type SearchCustomersQuery = { __typename: 'Query', search: { __typename: 'UserCountableConnection', edges: Array<{ __typename: 'UserCountableEdge', node: { __typename: 'User', id: string, email: string, firstName: string, lastName: string } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type SearchGiftCardTagsQueryVariables = Exact<{ + query: Scalars['String']; + first: Scalars['Int']; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; +}>; + + +export type SearchGiftCardTagsQuery = { __typename: 'Query', search: { __typename: 'GiftCardTagCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'GiftCardTagCountableEdge', node: { __typename: 'GiftCardTag', id: string, name: string } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type SearchOrderVariantQueryVariables = Exact<{ + channel: Scalars['String']; + first: Scalars['Int']; + query: Scalars['String']; + after?: InputMaybe; + address?: InputMaybe; +}>; + + +export type SearchOrderVariantQuery = { __typename: 'Query', search: { __typename: 'ProductCountableConnection', edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', id: string, name: string, thumbnail: { __typename: 'Image', url: string } | null, variants: Array<{ __typename: 'ProductVariant', id: string, name: string, sku: string | null, pricing: { __typename: 'VariantPricingInfo', onSale: boolean | null, priceUndiscounted: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } } | null, price: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } } | null } | null, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, isActive: boolean, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null }> | null } | null> | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type SearchPagesQueryVariables = Exact<{ + after?: InputMaybe; + first: Scalars['Int']; + query: Scalars['String']; +}>; + + +export type SearchPagesQuery = { __typename: 'Query', search: { __typename: 'PageCountableConnection', edges: Array<{ __typename: 'PageCountableEdge', node: { __typename: 'Page', id: string, title: string } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type SearchPageTypesQueryVariables = Exact<{ + after?: InputMaybe; + first: Scalars['Int']; + query: Scalars['String']; +}>; + + +export type SearchPageTypesQuery = { __typename: 'Query', search: { __typename: 'PageTypeCountableConnection', edges: Array<{ __typename: 'PageTypeCountableEdge', node: { __typename: 'PageType', id: string, name: string } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type SearchPermissionGroupsQueryVariables = Exact<{ + after?: InputMaybe; + first: Scalars['Int']; + query: Scalars['String']; +}>; + + +export type SearchPermissionGroupsQuery = { __typename: 'Query', search: { __typename: 'GroupCountableConnection', edges: Array<{ __typename: 'GroupCountableEdge', node: { __typename: 'Group', id: string, name: string, userCanManage: boolean } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type SearchProductsQueryVariables = Exact<{ + after?: InputMaybe; + first: Scalars['Int']; + query: Scalars['String']; +}>; + + +export type SearchProductsQuery = { __typename: 'Query', search: { __typename: 'ProductCountableConnection', edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', id: string, name: string, thumbnail: { __typename: 'Image', url: string } | null, variants: Array<{ __typename: 'ProductVariant', id: string, name: string, sku: string | null, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, isActive: boolean, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null }> | null } | null> | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type SearchProductTypesQueryVariables = Exact<{ + after?: InputMaybe; + first: Scalars['Int']; + query: Scalars['String']; +}>; + + +export type SearchProductTypesQuery = { __typename: 'Query', search: { __typename: 'ProductTypeCountableConnection', edges: Array<{ __typename: 'ProductTypeCountableEdge', node: { __typename: 'ProductType', id: string, name: string } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type SearchShippingZonesQueryVariables = Exact<{ + query: Scalars['String']; + first: Scalars['Int']; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; +}>; + + +export type SearchShippingZonesQuery = { __typename: 'Query', search: { __typename: 'ShippingZoneCountableConnection', totalCount: number | null, edges: Array<{ __typename: 'ShippingZoneCountableEdge', node: { __typename: 'ShippingZone', id: string, name: string } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type SearchStaffMembersQueryVariables = Exact<{ + after?: InputMaybe; + first: Scalars['Int']; + query: Scalars['String']; +}>; + + +export type SearchStaffMembersQuery = { __typename: 'Query', search: { __typename: 'UserCountableConnection', edges: Array<{ __typename: 'UserCountableEdge', node: { __typename: 'User', id: string, email: string, firstName: string, lastName: string, isActive: boolean, avatar: { __typename: 'Image', alt: string | null, url: string } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type SearchWarehousesQueryVariables = Exact<{ + after?: InputMaybe; + first: Scalars['Int']; + query: Scalars['String']; +}>; + + +export type SearchWarehousesQuery = { __typename: 'Query', search: { __typename: 'WarehouseCountableConnection', edges: Array<{ __typename: 'WarehouseCountableEdge', node: { __typename: 'Warehouse', id: string, name: string } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type DeleteShippingZoneMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type DeleteShippingZoneMutation = { __typename: 'Mutation', shippingZoneDelete: { __typename: 'ShippingZoneDelete', errors: Array<{ __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, message: string | null }> } | null }; + +export type BulkDeleteShippingZoneMutationVariables = Exact<{ + ids: Array> | InputMaybe; +}>; + + +export type BulkDeleteShippingZoneMutation = { __typename: 'Mutation', shippingZoneBulkDelete: { __typename: 'ShippingZoneBulkDelete', errors: Array<{ __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, message: string | null }> } | null }; + +export type UpdateDefaultWeightUnitMutationVariables = Exact<{ + unit?: InputMaybe; +}>; + + +export type UpdateDefaultWeightUnitMutation = { __typename: 'Mutation', shopSettingsUpdate: { __typename: 'ShopSettingsUpdate', errors: Array<{ __typename: 'ShopError', code: ShopErrorCode, field: string | null, message: string | null }>, shop: { __typename: 'Shop', defaultWeightUnit: WeightUnitsEnum | null } | null } | null }; + +export type CreateShippingZoneMutationVariables = Exact<{ + input: ShippingZoneCreateInput; +}>; + + +export type CreateShippingZoneMutation = { __typename: 'Mutation', shippingZoneCreate: { __typename: 'ShippingZoneCreate', errors: Array<{ __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, message: string | null }>, shippingZone: { __typename: 'ShippingZone', id: string, name: string, countries: Array<{ __typename: 'CountryDisplay', country: string, code: string } | null> | null } | null } | null }; + +export type UpdateShippingZoneMutationVariables = Exact<{ + id: Scalars['ID']; + input: ShippingZoneUpdateInput; +}>; + + +export type UpdateShippingZoneMutation = { __typename: 'Mutation', shippingZoneUpdate: { __typename: 'ShippingZoneUpdate', errors: Array<{ __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, message: string | null }>, shippingZone: { __typename: 'ShippingZone', id: string, name: string, countries: Array<{ __typename: 'CountryDisplay', country: string, code: string } | null> | null } | null } | null }; + +export type UpdateShippingRateMutationVariables = Exact<{ + id: Scalars['ID']; + input: ShippingPriceInput; +}>; + + +export type UpdateShippingRateMutation = { __typename: 'Mutation', shippingPriceUpdate: { __typename: 'ShippingPriceUpdate', errors: Array<{ __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, message: string | null }>, shippingMethod: { __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type CreateShippingRateMutationVariables = Exact<{ + input: ShippingPriceInput; +}>; + + +export type CreateShippingRateMutation = { __typename: 'Mutation', shippingPriceCreate: { __typename: 'ShippingPriceCreate', errors: Array<{ __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, message: string | null }>, shippingZone: { __typename: 'ShippingZone', id: string, name: string, description: string | null, shippingMethods: Array<{ __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null> | null, warehouses: Array<{ __typename: 'Warehouse', id: string, name: string }>, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null, shippingMethod: { __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type DeleteShippingRateMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type DeleteShippingRateMutation = { __typename: 'Mutation', shippingPriceDelete: { __typename: 'ShippingPriceDelete', errors: Array<{ __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, message: string | null }>, shippingZone: { __typename: 'ShippingZone', id: string, name: string, description: string | null, shippingMethods: Array<{ __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null> | null, warehouses: Array<{ __typename: 'Warehouse', id: string, name: string }>, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type BulkDeleteShippingRateMutationVariables = Exact<{ + ids: Array> | InputMaybe; +}>; + + +export type BulkDeleteShippingRateMutation = { __typename: 'Mutation', shippingPriceBulkDelete: { __typename: 'ShippingPriceBulkDelete', errors: Array<{ __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, message: string | null }> } | null }; + +export type ShippingMethodChannelListingUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: ShippingMethodChannelListingInput; +}>; + + +export type ShippingMethodChannelListingUpdateMutation = { __typename: 'Mutation', shippingMethodChannelListingUpdate: { __typename: 'ShippingMethodChannelListingUpdate', shippingMethod: { __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null, errors: Array<{ __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, channels: Array | null, message: string | null }> } | null }; + +export type ShippingPriceExcludeProductMutationVariables = Exact<{ + id: Scalars['ID']; + input: ShippingPriceExcludeProductsInput; +}>; + + +export type ShippingPriceExcludeProductMutation = { __typename: 'Mutation', shippingPriceExcludeProducts: { __typename: 'ShippingPriceExcludeProducts', errors: Array<{ __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, message: string | null }> } | null }; + +export type ShippingPriceRemoveProductFromExcludeMutationVariables = Exact<{ + id: Scalars['ID']; + products: Array> | InputMaybe; +}>; + + +export type ShippingPriceRemoveProductFromExcludeMutation = { __typename: 'Mutation', shippingPriceRemoveProductFromExclude: { __typename: 'ShippingPriceRemoveProductFromExclude', errors: Array<{ __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, message: string | null }> } | null }; + +export type ShippingZonesQueryVariables = Exact<{ + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; +}>; + + +export type ShippingZonesQuery = { __typename: 'Query', shippingZones: { __typename: 'ShippingZoneCountableConnection', edges: Array<{ __typename: 'ShippingZoneCountableEdge', node: { __typename: 'ShippingZone', id: string, name: string, description: string | null, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type ShippingZoneQueryVariables = Exact<{ + id: Scalars['ID']; + before?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}>; + + +export type ShippingZoneQuery = { __typename: 'Query', shippingZone: { __typename: 'ShippingZone', default: boolean, id: string, name: string, description: string | null, shippingMethods: Array<{ __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, excludedProducts: { __typename: 'ProductCountableConnection', pageInfo: { __typename: 'PageInfo', hasNextPage: boolean, hasPreviousPage: boolean, endCursor: string | null, startCursor: string | null }, edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', id: string, name: string, thumbnail: { __typename: 'Image', url: string } | null } }> } | null, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null> | null, channels: Array<{ __typename: 'Channel', id: string, name: string, currencyCode: string }>, warehouses: Array<{ __typename: 'Warehouse', id: string, name: string }>, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string } | null> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null }; + +export type ShippingZoneChannelsQueryVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type ShippingZoneChannelsQuery = { __typename: 'Query', shippingZone: { __typename: 'ShippingZone', id: string, channels: Array<{ __typename: 'Channel', id: string, name: string, currencyCode: string }> } | null }; + +export type ChannelShippingZonesQueryVariables = Exact<{ + filter?: InputMaybe; +}>; + + +export type ChannelShippingZonesQuery = { __typename: 'Query', shippingZones: { __typename: 'ShippingZoneCountableConnection', edges: Array<{ __typename: 'ShippingZoneCountableEdge', node: { __typename: 'ShippingZone', id: string, name: string } }> } | null }; + +export type ShopSettingsUpdateMutationVariables = Exact<{ + shopDomainInput: SiteDomainInput; + shopSettingsInput: ShopSettingsInput; + addressInput?: InputMaybe; + isCloudInstance: Scalars['Boolean']; +}>; + + +export type ShopSettingsUpdateMutation = { __typename: 'Mutation', shopSettingsUpdate: { __typename: 'ShopSettingsUpdate', errors: Array<{ __typename: 'ShopError', code: ShopErrorCode, field: string | null, message: string | null }>, shop: { __typename: 'Shop', customerSetPasswordUrl: string | null, defaultMailSenderAddress: string | null, defaultMailSenderName: string | null, description: string | null, name: string, reserveStockDurationAnonymousUser: number | null, reserveStockDurationAuthenticatedUser: number | null, limitQuantityPerCheckout: number | null, companyAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string }>, domain: { __typename: 'Domain', host: string } } | null } | null, shopDomainUpdate?: { __typename: 'ShopDomainUpdate', errors: Array<{ __typename: 'ShopError', code: ShopErrorCode, field: string | null, message: string | null }>, shop: { __typename: 'Shop', domain: { __typename: 'Domain', host: string, url: string } } | null } | null, shopAddressUpdate: { __typename: 'ShopAddressUpdate', errors: Array<{ __typename: 'ShopError', code: ShopErrorCode, field: string | null, message: string | null }>, shop: { __typename: 'Shop', companyAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null } | null } | null }; + +export type SiteSettingsQueryVariables = Exact<{ [key: string]: never; }>; + + +export type SiteSettingsQuery = { __typename: 'Query', shop: { __typename: 'Shop', customerSetPasswordUrl: string | null, defaultMailSenderAddress: string | null, defaultMailSenderName: string | null, description: string | null, name: string, reserveStockDurationAnonymousUser: number | null, reserveStockDurationAuthenticatedUser: number | null, limitQuantityPerCheckout: number | null, companyAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string }>, domain: { __typename: 'Domain', host: string } } }; + +export type StaffMemberAddMutationVariables = Exact<{ + input: StaffCreateInput; +}>; + + +export type StaffMemberAddMutation = { __typename: 'Mutation', staffCreate: { __typename: 'StaffCreate', errors: Array<{ __typename: 'StaffError', code: AccountErrorCode, field: string | null, message: string | null }>, user: { __typename: 'User', id: string, email: string, firstName: string, isActive: boolean, lastName: string, permissionGroups: Array<{ __typename: 'Group', id: string, name: string, userCanManage: boolean } | null> | null, userPermissions: Array<{ __typename: 'UserPermission', code: PermissionEnum, name: string } | null> | null, avatar: { __typename: 'Image', url: string } | null } | null } | null }; + +export type StaffMemberUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: StaffUpdateInput; +}>; + + +export type StaffMemberUpdateMutation = { __typename: 'Mutation', staffUpdate: { __typename: 'StaffUpdate', errors: Array<{ __typename: 'StaffError', code: AccountErrorCode, field: string | null, message: string | null }>, user: { __typename: 'User', id: string, email: string, firstName: string, isActive: boolean, lastName: string, permissionGroups: Array<{ __typename: 'Group', id: string, name: string, userCanManage: boolean } | null> | null, userPermissions: Array<{ __typename: 'UserPermission', code: PermissionEnum, name: string } | null> | null, avatar: { __typename: 'Image', url: string } | null } | null } | null }; + +export type StaffMemberDeleteMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type StaffMemberDeleteMutation = { __typename: 'Mutation', staffDelete: { __typename: 'StaffDelete', errors: Array<{ __typename: 'StaffError', code: AccountErrorCode, field: string | null, message: string | null }> } | null }; + +export type StaffAvatarUpdateMutationVariables = Exact<{ + image: Scalars['Upload']; +}>; + + +export type StaffAvatarUpdateMutation = { __typename: 'Mutation', userAvatarUpdate: { __typename: 'UserAvatarUpdate', errors: Array<{ __typename: 'AccountError', code: AccountErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, user: { __typename: 'User', id: string, avatar: { __typename: 'Image', url: string } | null } | null } | null }; + +export type StaffAvatarDeleteMutationVariables = Exact<{ [key: string]: never; }>; + + +export type StaffAvatarDeleteMutation = { __typename: 'Mutation', userAvatarDelete: { __typename: 'UserAvatarDelete', errors: Array<{ __typename: 'AccountError', code: AccountErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }>, user: { __typename: 'User', id: string, avatar: { __typename: 'Image', url: string } | null } | null } | null }; + +export type ChangeStaffPasswordMutationVariables = Exact<{ + newPassword: Scalars['String']; + oldPassword: Scalars['String']; +}>; + + +export type ChangeStaffPasswordMutation = { __typename: 'Mutation', passwordChange: { __typename: 'PasswordChange', errors: Array<{ __typename: 'AccountError', code: AccountErrorCode, field: string | null, addressType: AddressTypeEnum | null, message: string | null }> } | null }; + +export type StaffListQueryVariables = Exact<{ + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + sort?: InputMaybe; +}>; + + +export type StaffListQuery = { __typename: 'Query', staffUsers: { __typename: 'UserCountableConnection', edges: Array<{ __typename: 'UserCountableEdge', cursor: string, node: { __typename: 'User', id: string, email: string, firstName: string, isActive: boolean, lastName: string, avatar: { __typename: 'Image', url: string } | null } }>, pageInfo: { __typename: 'PageInfo', hasPreviousPage: boolean, hasNextPage: boolean, startCursor: string | null, endCursor: string | null } } | null }; + +export type StaffMemberDetailsQueryVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type StaffMemberDetailsQuery = { __typename: 'Query', user: { __typename: 'User', id: string, email: string, firstName: string, isActive: boolean, lastName: string, permissionGroups: Array<{ __typename: 'Group', id: string, name: string, userCanManage: boolean } | null> | null, userPermissions: Array<{ __typename: 'UserPermission', code: PermissionEnum, name: string } | null> | null, avatar: { __typename: 'Image', url: string } | null } | null }; + +export type UpdateTaxSettingsMutationVariables = Exact<{ + input: ShopSettingsInput; +}>; + + +export type UpdateTaxSettingsMutation = { __typename: 'Mutation', shopSettingsUpdate: { __typename: 'ShopSettingsUpdate', errors: Array<{ __typename: 'ShopError', code: ShopErrorCode, field: string | null, message: string | null }>, shop: { __typename: 'Shop', chargeTaxesOnShipping: boolean, includeTaxesInPrices: boolean, displayGrossPrices: boolean } | null } | null }; + +export type FetchTaxesMutationVariables = Exact<{ [key: string]: never; }>; + + +export type FetchTaxesMutation = { __typename: 'Mutation', shopFetchTaxRates: { __typename: 'ShopFetchTaxRates', errors: Array<{ __typename: 'ShopError', code: ShopErrorCode, field: string | null, message: string | null }>, shop: { __typename: 'Shop', countries: Array<{ __typename: 'CountryDisplay', country: string, code: string }> } | null } | null }; + +export type CountryListQueryVariables = Exact<{ [key: string]: never; }>; + + +export type CountryListQuery = { __typename: 'Query', shop: { __typename: 'Shop', chargeTaxesOnShipping: boolean, includeTaxesInPrices: boolean, displayGrossPrices: boolean, countries: Array<{ __typename: 'CountryDisplay', country: string, code: string, vat: { __typename: 'VAT', standardRate: number | null, reducedRates: Array<{ __typename: 'ReducedRate', rateType: string, rate: number } | null> } | null }> } }; + +export type TaxTypeListQueryVariables = Exact<{ [key: string]: never; }>; + + +export type TaxTypeListQuery = { __typename: 'Query', taxTypes: Array<{ __typename: 'TaxType', description: string | null, taxCode: string | null } | null> | null }; + +export type UpdateProductTranslationsMutationVariables = Exact<{ + id: Scalars['ID']; + input: TranslationInput; + language: LanguageCodeEnum; +}>; + + +export type UpdateProductTranslationsMutation = { __typename: 'Mutation', productTranslate: { __typename: 'ProductTranslate', errors: Array<{ __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }>, product: { __typename: 'Product', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null, translation: { __typename: 'ProductTranslation', id: string, description: any | null, name: string | null, seoDescription: string | null, seoTitle: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null } | null } | null }; + +export type UpdateProductVariantTranslationsMutationVariables = Exact<{ + id: Scalars['ID']; + input: NameTranslationInput; + language: LanguageCodeEnum; +}>; + + +export type UpdateProductVariantTranslationsMutation = { __typename: 'Mutation', productVariantTranslate: { __typename: 'ProductVariantTranslate', errors: Array<{ __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }>, productVariant: { __typename: 'ProductVariant', id: string, name: string, translation: { __typename: 'ProductVariantTranslation', id: string, name: string, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null } | null } | null }; + +export type UpdateCategoryTranslationsMutationVariables = Exact<{ + id: Scalars['ID']; + input: TranslationInput; + language: LanguageCodeEnum; +}>; + + +export type UpdateCategoryTranslationsMutation = { __typename: 'Mutation', categoryTranslate: { __typename: 'CategoryTranslate', errors: Array<{ __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }>, category: { __typename: 'Category', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null, translation: { __typename: 'CategoryTranslation', id: string, description: any | null, name: string | null, seoDescription: string | null, seoTitle: string | null, language: { __typename: 'LanguageDisplay', language: string } } | null } | null } | null }; + +export type UpdateCollectionTranslationsMutationVariables = Exact<{ + id: Scalars['ID']; + input: TranslationInput; + language: LanguageCodeEnum; +}>; + + +export type UpdateCollectionTranslationsMutation = { __typename: 'Mutation', collectionTranslate: { __typename: 'CollectionTranslate', errors: Array<{ __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }>, collection: { __typename: 'Collection', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null, translation: { __typename: 'CollectionTranslation', id: string, description: any | null, name: string | null, seoDescription: string | null, seoTitle: string | null, language: { __typename: 'LanguageDisplay', language: string } } | null } | null } | null }; + +export type UpdatePageTranslationsMutationVariables = Exact<{ + id: Scalars['ID']; + input: PageTranslationInput; + language: LanguageCodeEnum; +}>; + + +export type UpdatePageTranslationsMutation = { __typename: 'Mutation', pageTranslate: { __typename: 'PageTranslate', errors: Array<{ __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }>, page: { __typename: 'PageTranslatableContent', page: { __typename: 'Page', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string } | null, translation: { __typename: 'PageTranslation', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> } | null } | null }; + +export type UpdateVoucherTranslationsMutationVariables = Exact<{ + id: Scalars['ID']; + input: NameTranslationInput; + language: LanguageCodeEnum; +}>; + + +export type UpdateVoucherTranslationsMutation = { __typename: 'Mutation', voucherTranslate: { __typename: 'VoucherTranslate', errors: Array<{ __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }>, voucher: { __typename: 'Voucher', id: string, name: string | null, translation: { __typename: 'VoucherTranslation', id: string, name: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null } | null } | null }; + +export type UpdateSaleTranslationsMutationVariables = Exact<{ + id: Scalars['ID']; + input: NameTranslationInput; + language: LanguageCodeEnum; +}>; + + +export type UpdateSaleTranslationsMutation = { __typename: 'Mutation', saleTranslate: { __typename: 'SaleTranslate', errors: Array<{ __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }>, sale: { __typename: 'Sale', id: string, name: string, translation: { __typename: 'SaleTranslation', id: string, name: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null } | null } | null }; + +export type UpdateAttributeTranslationsMutationVariables = Exact<{ + id: Scalars['ID']; + input: NameTranslationInput; + language: LanguageCodeEnum; +}>; + + +export type UpdateAttributeTranslationsMutation = { __typename: 'Mutation', attributeTranslate: { __typename: 'AttributeTranslate', errors: Array<{ __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }>, attribute: { __typename: 'Attribute', id: string, name: string | null, translation: { __typename: 'AttributeTranslation', id: string, name: string } | null } | null } | null }; + +export type UpdateAttributeValueTranslationsMutationVariables = Exact<{ + id: Scalars['ID']; + input: AttributeValueTranslationInput; + language: LanguageCodeEnum; +}>; + + +export type UpdateAttributeValueTranslationsMutation = { __typename: 'Mutation', attributeValueTranslate: { __typename: 'AttributeValueTranslate', errors: Array<{ __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }>, attributeValue: { __typename: 'AttributeValue', id: string, name: string | null, richText: any | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null } | null } | null } | null }; + +export type UpdateShippingMethodTranslationsMutationVariables = Exact<{ + id: Scalars['ID']; + input: ShippingPriceTranslationInput; + language: LanguageCodeEnum; +}>; + + +export type UpdateShippingMethodTranslationsMutation = { __typename: 'Mutation', shippingPriceTranslate: { __typename: 'ShippingPriceTranslate', errors: Array<{ __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }>, shippingMethod: { __typename: 'ShippingMethodType', id: string, name: string, description: any | null, translation: { __typename: 'ShippingMethodTranslation', id: string, name: string | null, description: any | null, language: { __typename: 'LanguageDisplay', language: string } } | null } | null } | null }; + +export type CategoryTranslationsQueryVariables = Exact<{ + language: LanguageCodeEnum; + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; +}>; + + +export type CategoryTranslationsQuery = { __typename: 'Query', translations: { __typename: 'TranslatableItemConnection', edges: Array<{ __typename: 'TranslatableItemEdge', node: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent', translation: { __typename: 'CategoryTranslation', id: string, description: any | null, name: string | null, seoDescription: string | null, seoTitle: string | null, language: { __typename: 'LanguageDisplay', language: string } } | null, category: { __typename: 'Category', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null } | null } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type CollectionTranslationsQueryVariables = Exact<{ + language: LanguageCodeEnum; + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; +}>; + + +export type CollectionTranslationsQuery = { __typename: 'Query', translations: { __typename: 'TranslatableItemConnection', edges: Array<{ __typename: 'TranslatableItemEdge', node: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent', collection: { __typename: 'Collection', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null } | null, translation: { __typename: 'CollectionTranslation', id: string, description: any | null, name: string | null, seoDescription: string | null, seoTitle: string | null, language: { __typename: 'LanguageDisplay', language: string } } | null } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type ProductTranslationsQueryVariables = Exact<{ + language: LanguageCodeEnum; + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; +}>; + + +export type ProductTranslationsQuery = { __typename: 'Query', translations: { __typename: 'TranslatableItemConnection', edges: Array<{ __typename: 'TranslatableItemEdge', node: { __typename: 'ProductTranslatableContent', product: { __typename: 'Product', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null } | null, translation: { __typename: 'ProductTranslation', id: string, seoTitle: string | null, seoDescription: string | null, name: string | null, description: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type PageTranslationsQueryVariables = Exact<{ + language: LanguageCodeEnum; + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; +}>; + + +export type PageTranslationsQuery = { __typename: 'Query', translations: { __typename: 'TranslatableItemConnection', edges: Array<{ __typename: 'TranslatableItemEdge', node: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent', page: { __typename: 'Page', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string } | null, translation: { __typename: 'PageTranslation', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type VoucherTranslationsQueryVariables = Exact<{ + language: LanguageCodeEnum; + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; +}>; + + +export type VoucherTranslationsQuery = { __typename: 'Query', translations: { __typename: 'TranslatableItemConnection', edges: Array<{ __typename: 'TranslatableItemEdge', node: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent', name: string | null, voucher: { __typename: 'Voucher', id: string, name: string | null } | null, translation: { __typename: 'VoucherTranslation', id: string, name: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null } | { __typename: 'MenuItemTranslatableContent' } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type SaleTranslationsQueryVariables = Exact<{ + language: LanguageCodeEnum; + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; +}>; + + +export type SaleTranslationsQuery = { __typename: 'Query', translations: { __typename: 'TranslatableItemConnection', edges: Array<{ __typename: 'TranslatableItemEdge', node: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent', sale: { __typename: 'Sale', id: string, name: string } | null, translation: { __typename: 'SaleTranslation', id: string, name: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type AttributeTranslationsQueryVariables = Exact<{ + language: LanguageCodeEnum; + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; +}>; + + +export type AttributeTranslationsQuery = { __typename: 'Query', translations: { __typename: 'TranslatableItemConnection', edges: Array<{ __typename: 'TranslatableItemEdge', node: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent', id: string, name: string, translation: { __typename: 'AttributeTranslation', id: string, name: string } | null, attribute: { __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null } | null } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type ShippingMethodTranslationsQueryVariables = Exact<{ + language: LanguageCodeEnum; + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; +}>; + + +export type ShippingMethodTranslationsQuery = { __typename: 'Query', translations: { __typename: 'TranslatableItemConnection', edges: Array<{ __typename: 'TranslatableItemEdge', node: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent', id: string, name: string, description: any | null, shippingMethod: { __typename: 'ShippingMethodType', id: string } | null, translation: { __typename: 'ShippingMethodTranslation', id: string, name: string | null, description: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type ProductTranslationDetailsQueryVariables = Exact<{ + id: Scalars['ID']; + language: LanguageCodeEnum; +}>; + + +export type ProductTranslationDetailsQuery = { __typename: 'Query', translation: { __typename: 'ProductTranslatableContent', product: { __typename: 'Product', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null } | null, translation: { __typename: 'ProductTranslation', id: string, seoTitle: string | null, seoDescription: string | null, name: string | null, description: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } | null }; + +export type ProductVariantListQueryVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type ProductVariantListQuery = { __typename: 'Query', product: { __typename: 'Product', id: string, variants: Array<{ __typename: 'ProductVariant', id: string, name: string, sku: string | null } | null> | null } | null }; + +export type ProductVariantTranslationDetailsQueryVariables = Exact<{ + id: Scalars['ID']; + language: LanguageCodeEnum; +}>; + + +export type ProductVariantTranslationDetailsQuery = { __typename: 'Query', translation: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent', name: string, productVariant: { __typename: 'ProductVariant', id: string } | null, translation: { __typename: 'ProductVariantTranslation', id: string, name: string, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } | null }; + +export type CategoryTranslationDetailsQueryVariables = Exact<{ + id: Scalars['ID']; + language: LanguageCodeEnum; +}>; + + +export type CategoryTranslationDetailsQuery = { __typename: 'Query', translation: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent', translation: { __typename: 'CategoryTranslation', id: string, description: any | null, name: string | null, seoDescription: string | null, seoTitle: string | null, language: { __typename: 'LanguageDisplay', language: string } } | null, category: { __typename: 'Category', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null } | null } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } | null }; + +export type CollectionTranslationDetailsQueryVariables = Exact<{ + id: Scalars['ID']; + language: LanguageCodeEnum; +}>; + + +export type CollectionTranslationDetailsQuery = { __typename: 'Query', translation: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent', collection: { __typename: 'Collection', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null } | null, translation: { __typename: 'CollectionTranslation', id: string, description: any | null, name: string | null, seoDescription: string | null, seoTitle: string | null, language: { __typename: 'LanguageDisplay', language: string } } | null } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } | null }; + +export type PageTranslationDetailsQueryVariables = Exact<{ + id: Scalars['ID']; + language: LanguageCodeEnum; +}>; + + +export type PageTranslationDetailsQuery = { __typename: 'Query', translation: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent', page: { __typename: 'Page', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string } | null, translation: { __typename: 'PageTranslation', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } | null }; + +export type SaleTranslationDetailsQueryVariables = Exact<{ + id: Scalars['ID']; + language: LanguageCodeEnum; +}>; + + +export type SaleTranslationDetailsQuery = { __typename: 'Query', translation: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent', sale: { __typename: 'Sale', id: string, name: string } | null, translation: { __typename: 'SaleTranslation', id: string, name: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } | null }; + +export type VoucherTranslationDetailsQueryVariables = Exact<{ + id: Scalars['ID']; + language: LanguageCodeEnum; +}>; + + +export type VoucherTranslationDetailsQuery = { __typename: 'Query', translation: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent', name: string | null, voucher: { __typename: 'Voucher', id: string, name: string | null } | null, translation: { __typename: 'VoucherTranslation', id: string, name: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null } | { __typename: 'MenuItemTranslatableContent' } | null }; + +export type AttributeTranslationDetailsQueryVariables = Exact<{ + id: Scalars['ID']; + language: LanguageCodeEnum; + firstValues?: InputMaybe; + afterValues?: InputMaybe; + lastValues?: InputMaybe; + beforeValues?: InputMaybe; +}>; + + +export type AttributeTranslationDetailsQuery = { __typename: 'Query', translation: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent', translation: { __typename: 'AttributeTranslation', id: string, name: string } | null, attribute: { __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, withChoices: boolean, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', id: string, name: string | null, richText: any | null, inputType: AttributeInputTypeEnum | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null } | null } }> } | null } | null } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } | null }; + +export type ShippingMethodTranslationDetailsQueryVariables = Exact<{ + id: Scalars['ID']; + language: LanguageCodeEnum; +}>; + + +export type ShippingMethodTranslationDetailsQuery = { __typename: 'Query', translation: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent', id: string, name: string, description: any | null, shippingMethod: { __typename: 'ShippingMethodType', id: string } | null, translation: { __typename: 'ShippingMethodTranslation', id: string, name: string | null, description: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } | null }; + +export type UpdateMetadataMutationVariables = Exact<{ + id: Scalars['ID']; + input: Array | MetadataInput; + keysToDelete: Array | Scalars['String']; +}>; + + +export type UpdateMetadataMutation = { __typename: 'Mutation', updateMetadata: { __typename: 'UpdateMetadata', errors: Array<{ __typename: 'MetadataError', code: MetadataErrorCode, field: string | null, message: string | null }>, item: { __typename: 'App', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Attribute', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Category', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Checkout', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Collection', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'DigitalContent', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Fulfillment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'GiftCard', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Invoice', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Menu', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'MenuItem', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Order', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Page', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'PageType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Payment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Product', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'ProductType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'ProductVariant', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Sale', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'ShippingMethod', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'ShippingMethodType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'ShippingZone', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'User', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Voucher', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Warehouse', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null, deleteMetadata: { __typename: 'DeleteMetadata', errors: Array<{ __typename: 'MetadataError', code: MetadataErrorCode, field: string | null, message: string | null }>, item: { __typename: 'App', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Attribute', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Category', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Checkout', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Collection', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'DigitalContent', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Fulfillment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'GiftCard', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Invoice', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Menu', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'MenuItem', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Order', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Page', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'PageType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Payment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Product', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'ProductType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'ProductVariant', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Sale', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'ShippingMethod', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'ShippingMethodType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'ShippingZone', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'User', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Voucher', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Warehouse', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type UpdatePrivateMetadataMutationVariables = Exact<{ + id: Scalars['ID']; + input: Array | MetadataInput; + keysToDelete: Array | Scalars['String']; +}>; + + +export type UpdatePrivateMetadataMutation = { __typename: 'Mutation', updatePrivateMetadata: { __typename: 'UpdatePrivateMetadata', errors: Array<{ __typename: 'MetadataError', code: MetadataErrorCode, field: string | null, message: string | null }>, item: { __typename: 'App', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Attribute', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Category', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Checkout', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Collection', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'DigitalContent', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Fulfillment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'GiftCard', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Invoice', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Menu', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'MenuItem', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Order', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Page', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'PageType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Payment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Product', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'ProductType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'ProductVariant', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Sale', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'ShippingMethod', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'ShippingMethodType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'ShippingZone', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'User', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Voucher', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Warehouse', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null, deletePrivateMetadata: { __typename: 'DeletePrivateMetadata', errors: Array<{ __typename: 'MetadataError', code: MetadataErrorCode, field: string | null, message: string | null }>, item: { __typename: 'App', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Attribute', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Category', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Checkout', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Collection', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'DigitalContent', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Fulfillment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'GiftCard', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Invoice', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Menu', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'MenuItem', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Order', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Page', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'PageType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Payment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Product', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'ProductType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'ProductVariant', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Sale', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'ShippingMethod', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'ShippingMethodType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'ShippingZone', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'User', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Voucher', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | { __typename: 'Warehouse', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string } | null> } | null } | null }; + +export type WarehouseDeleteMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type WarehouseDeleteMutation = { __typename: 'Mutation', deleteWarehouse: { __typename: 'WarehouseDelete', errors: Array<{ __typename: 'WarehouseError', code: WarehouseErrorCode, field: string | null, message: string | null }> } | null }; + +export type WarehouseCreateMutationVariables = Exact<{ + input: WarehouseCreateInput; +}>; + + +export type WarehouseCreateMutation = { __typename: 'Mutation', createWarehouse: { __typename: 'WarehouseCreate', errors: Array<{ __typename: 'WarehouseError', code: WarehouseErrorCode, field: string | null, message: string | null }>, warehouse: { __typename: 'Warehouse', isPrivate: boolean, clickAndCollectOption: WarehouseClickAndCollectOptionEnum, id: string, name: string, address: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } }, shippingZones: { __typename: 'ShippingZoneCountableConnection', edges: Array<{ __typename: 'ShippingZoneCountableEdge', node: { __typename: 'ShippingZone', id: string, name: string } }> } } | null } | null }; + +export type WarehouseUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: WarehouseUpdateInput; +}>; + + +export type WarehouseUpdateMutation = { __typename: 'Mutation', updateWarehouse: { __typename: 'WarehouseUpdate', errors: Array<{ __typename: 'WarehouseError', code: WarehouseErrorCode, field: string | null, message: string | null }>, warehouse: { __typename: 'Warehouse', isPrivate: boolean, clickAndCollectOption: WarehouseClickAndCollectOptionEnum, id: string, name: string, address: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } }, shippingZones: { __typename: 'ShippingZoneCountableConnection', edges: Array<{ __typename: 'ShippingZoneCountableEdge', node: { __typename: 'ShippingZone', id: string, name: string } }> } } | null } | null }; + +export type WarehouseListQueryVariables = Exact<{ + first?: InputMaybe; + after?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + sort?: InputMaybe; +}>; + + +export type WarehouseListQuery = { __typename: 'Query', warehouses: { __typename: 'WarehouseCountableConnection', edges: Array<{ __typename: 'WarehouseCountableEdge', node: { __typename: 'Warehouse', id: string, name: string, shippingZones: { __typename: 'ShippingZoneCountableConnection', edges: Array<{ __typename: 'ShippingZoneCountableEdge', node: { __typename: 'ShippingZone', id: string, name: string } }> } } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; + +export type WarehouseDetailsQueryVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type WarehouseDetailsQuery = { __typename: 'Query', warehouse: { __typename: 'Warehouse', isPrivate: boolean, clickAndCollectOption: WarehouseClickAndCollectOptionEnum, id: string, name: string, address: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } }, shippingZones: { __typename: 'ShippingZoneCountableConnection', edges: Array<{ __typename: 'ShippingZoneCountableEdge', node: { __typename: 'ShippingZone', id: string, name: string } }> } } | null }; + +export type WebhookCreateMutationVariables = Exact<{ + input: WebhookCreateInput; +}>; + + +export type WebhookCreateMutation = { __typename: 'Mutation', webhookCreate: { __typename: 'WebhookCreate', errors: Array<{ __typename: 'WebhookError', code: WebhookErrorCode, field: string | null, message: string | null }>, webhook: { __typename: 'Webhook', id: string, name: string, isActive: boolean, app: { __typename: 'App', id: string, name: string | null } } | null } | null }; + +export type WebhookUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: WebhookUpdateInput; +}>; + + +export type WebhookUpdateMutation = { __typename: 'Mutation', webhookUpdate: { __typename: 'WebhookUpdate', errors: Array<{ __typename: 'WebhookError', code: WebhookErrorCode, field: string | null, message: string | null }>, webhook: { __typename: 'Webhook', id: string, name: string, isActive: boolean, app: { __typename: 'App', id: string, name: string | null } } | null } | null }; + +export type WebhookDeleteMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type WebhookDeleteMutation = { __typename: 'Mutation', webhookDelete: { __typename: 'WebhookDelete', errors: Array<{ __typename: 'WebhookError', code: WebhookErrorCode, field: string | null, message: string | null }> } | null }; + +export type WebhookDetailsQueryVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type WebhookDetailsQuery = { __typename: 'Query', webhook: { __typename: 'Webhook', secretKey: string | null, targetUrl: string, id: string, name: string, isActive: boolean, syncEvents: Array<{ __typename: 'WebhookEventSync', eventType: WebhookEventTypeSyncEnum }>, asyncEvents: Array<{ __typename: 'WebhookEventAsync', eventType: WebhookEventTypeAsyncEnum }>, app: { __typename: 'App', id: string, name: string | null } } | null }; diff --git a/src/home/components/HomeActivityCard/HomeActivityCard.tsx b/src/home/components/HomeActivityCard/HomeActivityCard.tsx index 626a04c1b..e676c8b8d 100644 --- a/src/home/components/HomeActivityCard/HomeActivityCard.tsx +++ b/src/home/components/HomeActivityCard/HomeActivityCard.tsx @@ -8,12 +8,13 @@ import { import CardTitle from "@saleor/components/CardTitle"; import { DateTime } from "@saleor/components/Date"; import Skeleton from "@saleor/components/Skeleton"; +import { HomeQuery } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; +import { RelayToFlat } from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { renderCollection } from "../../../misc"; -import { Home_activities_edges_node } from "../../types/Home"; import { getActivityMessage } from "./activityMessages"; const useStyles = makeStyles( @@ -31,7 +32,7 @@ const useStyles = makeStyles( ); interface HomeActivityCardProps { - activities: Home_activities_edges_node[]; + activities: RelayToFlat; testId?: string; } diff --git a/src/home/components/HomeActivityCard/activityMessages.ts b/src/home/components/HomeActivityCard/activityMessages.ts index 045ceb413..5f127a824 100644 --- a/src/home/components/HomeActivityCard/activityMessages.ts +++ b/src/home/components/HomeActivityCard/activityMessages.ts @@ -1,8 +1,6 @@ +import { HomeQuery, OrderEventsEnum } from "@saleor/graphql"; import { defineMessages, IntlShape } from "react-intl"; -import { OrderEventsEnum } from "../../../types/globalTypes"; -import { Home_activities_edges_node } from "../../types/Home"; - const messages = defineMessages({ draft: { defaultMessage: "Order #{orderId} was placed from draft by {userEmail}" @@ -19,7 +17,7 @@ const messages = defineMessages({ }); export const getActivityMessage = ( - activity: Home_activities_edges_node, + activity: HomeQuery["activities"]["edges"][0]["node"], intl: IntlShape ) => { switch (activity.type) { diff --git a/src/home/components/HomeNotificationTable/HomeNotificationTable.tsx b/src/home/components/HomeNotificationTable/HomeNotificationTable.tsx index ebe95da2d..44a616d5a 100644 --- a/src/home/components/HomeNotificationTable/HomeNotificationTable.tsx +++ b/src/home/components/HomeNotificationTable/HomeNotificationTable.tsx @@ -9,8 +9,8 @@ import KeyboardArrowRight from "@material-ui/icons/KeyboardArrowRight"; import RequirePermissions from "@saleor/components/RequirePermissions"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; +import { PermissionEnum } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; -import { PermissionEnum } from "@saleor/types/globalTypes"; import React from "react"; import { useIntl } from "react-intl"; diff --git a/src/home/components/HomePage/HomePage.tsx b/src/home/components/HomePage/HomePage.tsx index b57554095..0b44f896c 100644 --- a/src/home/components/HomePage/HomePage.tsx +++ b/src/home/components/HomePage/HomePage.tsx @@ -4,17 +4,13 @@ import Grid from "@saleor/components/Grid"; import Money from "@saleor/components/Money"; import RequirePermissions from "@saleor/components/RequirePermissions"; import Skeleton from "@saleor/components/Skeleton"; +import { HomeQuery, PermissionEnum } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; -import { PermissionEnum } from "@saleor/types/globalTypes"; +import { RelayToFlat } from "@saleor/types"; import React from "react"; import Orders from "../../../icons/Orders"; import Sales from "../../../icons/Sales"; -import { - Home_activities_edges_node, - Home_productTopToday_edges_node, - Home_salesToday_gross -} from "../../types/Home"; import HomeActivityCard from "../HomeActivityCard"; import HomeAnalyticsCard from "../HomeAnalyticsCard"; import HomeHeader from "../HomeHeader"; @@ -44,13 +40,13 @@ const useStyles = makeStyles( ); export interface HomePageProps { - activities: Home_activities_edges_node[]; + activities: RelayToFlat; orders: number | null; ordersToCapture: number | null; ordersToFulfill: number | null; productsOutOfStock: number; - sales: Home_salesToday_gross; - topProducts: Home_productTopToday_edges_node[] | null; + sales: HomeQuery["salesToday"]["gross"]; + topProducts: RelayToFlat | null; userName: string; onCreateNewChannelClick: () => void; onOrdersToCaptureClick: () => void; diff --git a/src/home/components/HomeProductListCard/HomeProductListCard.tsx b/src/home/components/HomeProductListCard/HomeProductListCard.tsx index 76cce9922..b28970a53 100644 --- a/src/home/components/HomeProductListCard/HomeProductListCard.tsx +++ b/src/home/components/HomeProductListCard/HomeProductListCard.tsx @@ -10,13 +10,14 @@ import Money from "@saleor/components/Money"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import TableCellAvatar from "@saleor/components/TableCellAvatar"; +import { HomeQuery } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; +import { RelayToFlat } from "@saleor/types"; import classNames from "classnames"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { maybe, renderCollection } from "../../../misc"; -import { Home_productTopToday_edges_node } from "../../types/Home"; const useStyles = makeStyles( theme => ({ @@ -49,7 +50,7 @@ const useStyles = makeStyles( interface HomeProductListProps { testId?: string; - topProducts: Home_productTopToday_edges_node[]; + topProducts: RelayToFlat; onRowClick: (productId: string, variantId: string) => void; } diff --git a/src/home/fixtures.ts b/src/home/fixtures.ts index f23aacdbd..7f4940602 100644 --- a/src/home/fixtures.ts +++ b/src/home/fixtures.ts @@ -1,9 +1,9 @@ -import { OrderEventsEnum } from "../types/globalTypes"; -import { Home } from "./types/Home"; +import { HomeQuery, OrderEventsEnum } from "@saleor/graphql"; -export const shop: (placeholderImage: string) => Home = ( +export const shop: (placeholderImage: string) => HomeQuery = ( placeholderImage: string ) => ({ + __typename: "Query", activities: { __typename: "OrderEventCountableConnection", edges: [ diff --git a/src/home/queries.ts b/src/home/queries.ts index 83a93c350..489310656 100644 --- a/src/home/queries.ts +++ b/src/home/queries.ts @@ -1,9 +1,6 @@ import { gql } from "@apollo/client"; -import makeQuery from "@saleor/hooks/makeQuery"; -import { Home, HomeVariables } from "./types/Home"; - -const home = gql` +export const home = gql` query Home( $channel: String! $datePeriod: DateRangeInput! @@ -94,5 +91,3 @@ const home = gql` } } `; - -export const useHomePage = makeQuery(home); diff --git a/src/home/types/Home.ts b/src/home/types/Home.ts deleted file mode 100644 index c02e8819b..000000000 --- a/src/home/types/Home.ts +++ /dev/null @@ -1,143 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { DateRangeInput, OrderEventsEmailsEnum, OrderEventsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: Home -// ==================================================== - -export interface Home_salesToday_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface Home_salesToday { - __typename: "TaxedMoney"; - gross: Home_salesToday_gross; -} - -export interface Home_ordersToday { - __typename: "OrderCountableConnection"; - totalCount: number | null; -} - -export interface Home_ordersToFulfill { - __typename: "OrderCountableConnection"; - totalCount: number | null; -} - -export interface Home_ordersToCapture { - __typename: "OrderCountableConnection"; - totalCount: number | null; -} - -export interface Home_productsOutOfStock { - __typename: "ProductCountableConnection"; - totalCount: number | null; -} - -export interface Home_productTopToday_edges_node_revenue_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface Home_productTopToday_edges_node_revenue { - __typename: "TaxedMoney"; - gross: Home_productTopToday_edges_node_revenue_gross; -} - -export interface Home_productTopToday_edges_node_attributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; -} - -export interface Home_productTopToday_edges_node_attributes { - __typename: "SelectedAttribute"; - values: (Home_productTopToday_edges_node_attributes_values | null)[]; -} - -export interface Home_productTopToday_edges_node_product_thumbnail { - __typename: "Image"; - url: string; -} - -export interface Home_productTopToday_edges_node_product { - __typename: "Product"; - id: string; - name: string; - thumbnail: Home_productTopToday_edges_node_product_thumbnail | null; -} - -export interface Home_productTopToday_edges_node { - __typename: "ProductVariant"; - id: string; - revenue: Home_productTopToday_edges_node_revenue | null; - attributes: Home_productTopToday_edges_node_attributes[]; - product: Home_productTopToday_edges_node_product; - quantityOrdered: number | null; -} - -export interface Home_productTopToday_edges { - __typename: "ProductVariantCountableEdge"; - node: Home_productTopToday_edges_node; -} - -export interface Home_productTopToday { - __typename: "ProductVariantCountableConnection"; - edges: Home_productTopToday_edges[]; -} - -export interface Home_activities_edges_node_user { - __typename: "User"; - id: string; - email: string; -} - -export interface Home_activities_edges_node { - __typename: "OrderEvent"; - amount: number | null; - composedId: string | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - id: string; - message: string | null; - orderNumber: string | null; - oversoldItems: (string | null)[] | null; - quantity: number | null; - type: OrderEventsEnum | null; - user: Home_activities_edges_node_user | null; -} - -export interface Home_activities_edges { - __typename: "OrderEventCountableEdge"; - node: Home_activities_edges_node; -} - -export interface Home_activities { - __typename: "OrderEventCountableConnection"; - edges: Home_activities_edges[]; -} - -export interface Home { - salesToday: Home_salesToday | null; - ordersToday: Home_ordersToday | null; - ordersToFulfill: Home_ordersToFulfill | null; - ordersToCapture: Home_ordersToCapture | null; - productsOutOfStock: Home_productsOutOfStock | null; - productTopToday: Home_productTopToday | null; - activities: Home_activities | null; -} - -export interface HomeVariables { - channel: string; - datePeriod: DateRangeInput; - PERMISSION_MANAGE_PRODUCTS: boolean; - PERMISSION_MANAGE_ORDERS: boolean; -} diff --git a/src/home/views/index.tsx b/src/home/views/index.tsx index de12bd481..072d5603c 100644 --- a/src/home/views/index.tsx +++ b/src/home/views/index.tsx @@ -1,6 +1,11 @@ import { useUser } from "@saleor/auth"; import { channelsListUrl } from "@saleor/channels/urls"; import useAppChannel from "@saleor/components/AppLayout/AppChannelContext"; +import { + OrderStatusFilter, + StockAvailability, + useHomeQuery +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import { mapEdgesToItems } from "@saleor/utils/maps"; import React from "react"; @@ -8,9 +13,7 @@ import React from "react"; import { getDatePeriod, getUserName } from "../../misc"; import { orderListUrl } from "../../orders/urls"; import { productListUrl, productVariantEditUrl } from "../../products/urls"; -import { OrderStatusFilter, StockAvailability } from "../../types/globalTypes"; import HomePage from "../components/HomePage"; -import { useHomePage } from "../queries"; const HomeSection = () => { const navigate = useNavigator(); @@ -19,7 +22,7 @@ const HomeSection = () => { const noChannel = !channel && typeof channel !== "undefined"; - const { data } = useHomePage({ + const { data } = useHomeQuery({ displayLoader: true, skip: noChannel, variables: { channel: channel?.slug, datePeriod: getDatePeriod(1) } diff --git a/src/hooks/graphql/index.ts b/src/hooks/graphql/index.ts new file mode 100644 index 000000000..1d08677a0 --- /dev/null +++ b/src/hooks/graphql/index.ts @@ -0,0 +1,2 @@ +export * from "../makeQuery"; +export * from "../makeMutation"; diff --git a/src/hooks/makeMutation.ts b/src/hooks/makeMutation.ts index 6cac5dad1..66281f204 100644 --- a/src/hooks/makeMutation.ts +++ b/src/hooks/makeMutation.ts @@ -1,6 +1,7 @@ import { ApolloError, MutationFunction, + MutationHookOptions as BaseMutationHookOptions, MutationResult, useMutation as useBaseMutation } from "@apollo/client"; @@ -26,79 +27,79 @@ export type UseMutation = [ MutationFunction, MutationResultWithOpts ]; -export type UseMutationCbs = Partial<{ - onCompleted: (data: TData) => void; - onError: (error: ApolloError) => void; - refetchQueries?: string[]; -}>; export type UseMutationHook = ( - cbs: UseMutationCbs + cbs: MutationHookOptions ) => UseMutation; +export type MutationHookOptions = BaseMutationHookOptions< + TData, + TVariables +>; + +export function useMutation( + mutation: DocumentNode, + { onCompleted, onError, ...opts }: MutationHookOptions +): UseMutation { + const notify = useNotifier(); + const intl = useIntl(); + const user = useUser(); + + const [mutateFn, result] = useBaseMutation(mutation, { + ...opts, + onCompleted: data => { + handleNestedMutationErrors({ + data, + intl, + notify + }); + + onCompleted(data); + }, + onError: (err: ApolloError) => { + if (err.graphQLErrors) { + if (hasError(err, GqlErrors.ReadOnlyException)) { + notify({ + status: "error", + text: intl.formatMessage(commonMessages.readOnly) + }); + } else if (err.graphQLErrors.some(isJwtError)) { + user.logout(); + notify({ + status: "error", + text: intl.formatMessage(commonMessages.sessionExpired) + }); + } else if (!hasError(err, GqlErrors.LimitReachedException)) { + err.graphQLErrors.map(graphQLError => { + notify({ + status: "error", + apiMessage: graphQLError.message + }); + }); + } + } else { + showAllErrors({ notify, error: err }); + } + + if (onError) { + onError(err); + } + } + }); + + return [ + mutateFn, + { + ...result, + status: getMutationStatus(result) + } + ]; +} + function makeMutation( mutation: DocumentNode ): UseMutationHook { - function useMutation({ - onCompleted, - onError, - refetchQueries = [] - }: UseMutationCbs): UseMutation { - const notify = useNotifier(); - const intl = useIntl(); - const user = useUser(); - - const [mutateFn, result] = useBaseMutation(mutation, { - onCompleted: data => { - handleNestedMutationErrors({ - data, - intl, - notify - }); - - onCompleted(data); - }, - refetchQueries, - onError: (err: ApolloError) => { - if (err.graphQLErrors) { - if (hasError(err, GqlErrors.ReadOnlyException)) { - notify({ - status: "error", - text: intl.formatMessage(commonMessages.readOnly) - }); - } else if (err.graphQLErrors.some(isJwtError)) { - user.logout(); - notify({ - status: "error", - text: intl.formatMessage(commonMessages.sessionExpired) - }); - } else if (!hasError(err, GqlErrors.LimitReachedException)) { - err.graphQLErrors.map(graphQLError => { - notify({ - status: "error", - apiMessage: graphQLError.message - }); - }); - } - } else { - showAllErrors({ notify, error: err }); - } - - if (onError) { - onError(err); - } - } - }); - - return [ - mutateFn, - { - ...result, - status: getMutationStatus(result) - } - ]; - } - - return useMutation; + return (opts: MutationHookOptions) => + useMutation(mutation, opts); } export default makeMutation; diff --git a/src/hooks/makeQuery.ts b/src/hooks/makeQuery.ts index 9f9d68177..30283e3a3 100644 --- a/src/hooks/makeQuery.ts +++ b/src/hooks/makeQuery.ts @@ -1,29 +1,32 @@ import { ApolloError, ApolloQueryResult, + QueryHookOptions as BaseQueryHookOptions, QueryResult, - useQuery as useBaseQuery, - WatchQueryFetchPolicy + useQuery as useBaseQuery } from "@apollo/client"; -import { handleQueryAuthError } from "@saleor/auth"; -import { useUser } from "@saleor/auth"; +import { handleQueryAuthError, useUser } from "@saleor/auth"; +import { PrefixedPermissions } from "@saleor/graphql/extendedTypes"; +import { + PermissionEnum, + UserPermissionFragment +} from "@saleor/graphql/types.generated"; import { RequireAtLeastOne } from "@saleor/misc"; import { ServerErrorWithName } from "@saleor/types"; -import { DocumentNode } from "graphql"; -import { getOperationAST } from "graphql"; +import { DocumentNode, getOperationAST } from "graphql"; import { useEffect } from "react"; import { useIntl } from "react-intl"; -import { User_userPermissions } from "../fragments/types/User"; -import { PrefixedPermissions } from "../types/extendedTypes"; -import { PermissionEnum } from "../types/globalTypes"; import useAppState from "./useAppState"; import useNotifier from "./useNotifier"; +export { useLazyQuery, LazyQueryHookOptions } from "@apollo/client"; const getPermissionKey = (permission: string) => `PERMISSION_${permission}` as PrefixedPermissions; -const allPermissions = Object.keys(PermissionEnum).reduce( +const allPermissions: Record = Object.keys( + PermissionEnum +).reduce( (prev, code) => ({ ...prev, [getPermissionKey(code)]: false @@ -31,7 +34,9 @@ const allPermissions = Object.keys(PermissionEnum).reduce( {} as Record ); -const getUserPermissions = (userPermissions: User_userPermissions[]) => +const getUserPermissions = ( + userPermissions: UserPermissionFragment[] +): Record => userPermissions.reduce( (prev, permission) => ({ ...prev, @@ -49,99 +54,101 @@ export interface LoadMore { export type UseQueryResult = QueryResult & LoadMore; -export type UseQueryOpts = Partial<{ - displayLoader: boolean; - skip: boolean; - variables: TVariables; - fetchPolicy: WatchQueryFetchPolicy; - handleError?: (error: ApolloError) => void | undefined; -}>; +export type QueryHookOptions = Partial< + Omit, "variables"> & { + displayLoader: boolean; + handleError?: (error: ApolloError) => void | undefined; + variables?: Omit; + } +>; type UseQueryHook = ( - opts?: UseQueryOpts> + opts?: QueryHookOptions> ) => UseQueryResult; -function makeQuery( - query: DocumentNode -): UseQueryHook { - function useQuery({ +export function useQuery( + query: DocumentNode, + { displayLoader, skip, variables, fetchPolicy, handleError, - ...rest - }: UseQueryOpts = {}): UseQueryResult { - const notify = useNotifier(); - const intl = useIntl(); - const [, dispatchAppState] = useAppState(); - const user = useUser(); - const userPermissions = getUserPermissions( - user.user?.userPermissions || [] - ); + ...opts + }: QueryHookOptions = {} +): UseQueryResult { + const notify = useNotifier(); + const intl = useIntl(); + const [, dispatchAppState] = useAppState(); + const user = useUser(); + const userPermissions = getUserPermissions(user.user?.userPermissions || []); - const variablesWithPermissions = { - ...variables, - ...allPermissions, - ...userPermissions - }; + const variablesWithPermissions = { + ...variables, + ...allPermissions, + ...userPermissions + } as TVariables & Record; - const queryData = useBaseQuery(query, { - context: { - useBatching: true - }, - errorPolicy: "all", - fetchPolicy: fetchPolicy ?? "cache-and-network", - onError: error => { - // TO-INVESTIGATE-BATCHING - if ( - (error.networkError as ServerErrorWithName).operationName === - getOperationAST(query).name.value - ) { - if (!!handleError) { - handleError(error); - } else { - handleQueryAuthError(error, notify, user.logout, intl); - } + const queryData = useBaseQuery(query, { + ...opts, + context: { + useBatching: true + }, + errorPolicy: "all", + fetchPolicy: fetchPolicy ?? "cache-and-network", + onError: error => { + // TO-INVESTIGATE-BATCHING + if ( + (error.networkError as ServerErrorWithName).operationName === + getOperationAST(query).name.value + ) { + if (!!handleError) { + handleError(error); + } else { + handleQueryAuthError(error, notify, user.logout, intl); } + } + }, + skip, + variables: variablesWithPermissions + }); + + useEffect(() => { + if (displayLoader) { + dispatchAppState({ + payload: { + value: queryData.loading + }, + type: "displayLoader" + }); + } + }, [queryData.loading]); + + const loadMore = ( + mergeFunc: (previousResults: TData, fetchMoreResult: TData) => TData, + extraVariables: RequireAtLeastOne + ) => + queryData.fetchMore({ + query, + updateQuery: (previousResults, { fetchMoreResult }) => { + if (!fetchMoreResult) { + return previousResults; + } + return mergeFunc(previousResults, fetchMoreResult); }, - skip, - variables: variablesWithPermissions, - ...rest + variables: { ...variablesWithPermissions, ...extraVariables } }); - useEffect(() => { - if (displayLoader) { - dispatchAppState({ - payload: { - value: queryData.loading - }, - type: "displayLoader" - }); - } - }, [queryData.loading]); + return { + ...queryData, + loadMore + }; +} - const loadMore = ( - mergeFunc: (previousResults: TData, fetchMoreResult: TData) => TData, - extraVariables: RequireAtLeastOne - ) => - queryData.fetchMore({ - query, - updateQuery: (previousResults, { fetchMoreResult }) => { - if (!fetchMoreResult) { - return previousResults; - } - return mergeFunc(previousResults, fetchMoreResult); - }, - variables: { ...variablesWithPermissions, ...extraVariables } - }); - - return { - ...queryData, - loadMore - }; - } - - return useQuery; +function makeQuery( + query: DocumentNode +): UseQueryHook { + return (opts: QueryHookOptions) => + useQuery(query, opts); } export default makeQuery; diff --git a/src/hooks/makeTopLevelSearch/makeTopLevelSearch.ts b/src/hooks/makeTopLevelSearch/makeTopLevelSearch.ts index cdea74d5f..6a9df43c6 100644 --- a/src/hooks/makeTopLevelSearch/makeTopLevelSearch.ts +++ b/src/hooks/makeTopLevelSearch/makeTopLevelSearch.ts @@ -1,4 +1,4 @@ -import { PageInfoFragment } from "@saleor/fragments/types/PageInfoFragment"; +import { PageInfoFragment } from "@saleor/graphql"; import { DocumentNode } from "graphql"; import makeSearch, { SearchVariables, UseSearchHook } from "../makeSearch"; diff --git a/src/hooks/useAddressValidation.ts b/src/hooks/useAddressValidation.ts index 7a480beed..5517685bb 100644 --- a/src/hooks/useAddressValidation.ts +++ b/src/hooks/useAddressValidation.ts @@ -1,11 +1,11 @@ import { AddressTypeInput } from "@saleor/customers/types"; -import { AccountErrorFragment } from "@saleor/fragments/types/AccountErrorFragment"; -import { transformFormToAddressInput } from "@saleor/misc"; import { AccountErrorCode, + AccountErrorFragment, AddressInput, AddressTypeEnum -} from "@saleor/types/globalTypes"; +} from "@saleor/graphql"; +import { transformFormToAddressInput } from "@saleor/misc"; import { add, remove } from "@saleor/utils/lists"; import { useState } from "react"; diff --git a/src/hooks/useChannelsSearch.ts b/src/hooks/useChannelsSearch.ts index 394c49f4f..15ac22dd0 100644 --- a/src/hooks/useChannelsSearch.ts +++ b/src/hooks/useChannelsSearch.ts @@ -1,4 +1,4 @@ -import { Channel_channel } from "@saleor/channels/types/Channel"; +import { ChannelDetailsFragment } from "@saleor/graphql"; import { FetchMoreProps, Search, SearchProps } from "@saleor/types"; import { filter } from "fuzzaldrin"; import React from "react"; @@ -17,5 +17,5 @@ export interface ChannelsWithLoadMoreProps extends FetchMoreProps, Search, SearchProps { - channels: Channel_channel[]; + channels: ChannelDetailsFragment[]; } diff --git a/src/hooks/useChannelsSearchWithLoadMore.ts b/src/hooks/useChannelsSearchWithLoadMore.ts index 5cd198988..73341756e 100644 --- a/src/hooks/useChannelsSearchWithLoadMore.ts +++ b/src/hooks/useChannelsSearchWithLoadMore.ts @@ -1,4 +1,4 @@ -import { useBaseChannelsList } from "@saleor/channels/queries"; +import { useBaseChannelsQuery } from "@saleor/graphql"; import chunk from "lodash/chunk"; import compact from "lodash/compact"; import concat from "lodash/concat"; @@ -15,7 +15,7 @@ const INITIAL_INDEX = 0; export const useChannelsSearchWithLoadMore = ( itemsPerPage: number = DEFAULT_ITEMS_PER_PAGE ): ChannelsWithLoadMoreProps => { - const { data, loading } = useBaseChannelsList({}); + const { data, loading } = useBaseChannelsQuery({}); const { query, diff --git a/src/hooks/useForm.ts b/src/hooks/useForm.ts index 423a99a3a..5bf50922f 100644 --- a/src/hooks/useForm.ts +++ b/src/hooks/useForm.ts @@ -7,8 +7,7 @@ import useHandleFormSubmit from "@saleor/hooks/useHandleFormSubmit"; import { toggle } from "@saleor/utils/lists"; import isEqual from "lodash/isEqual"; import omit from "lodash/omit"; -import React, { useEffect } from "react"; -import { useState } from "react"; +import React, { useEffect, useState } from "react"; import useStateFromProps from "./useStateFromProps"; diff --git a/src/hooks/useNotifier/useNotifier.ts b/src/hooks/useNotifier/useNotifier.ts index b18186511..0f0e6257a 100644 --- a/src/hooks/useNotifier/useNotifier.ts +++ b/src/hooks/useNotifier/useNotifier.ts @@ -1,5 +1,8 @@ -import { IMessage } from "@saleor/components/messages"; -import { IMessageContext, MessageContext } from "@saleor/components/messages"; +import { + IMessage, + IMessageContext, + MessageContext +} from "@saleor/components/messages"; import { useContext } from "react"; export type UseNotifierResult = IMessageContext; diff --git a/src/hooks/useOnSetDefaultVariant.ts b/src/hooks/useOnSetDefaultVariant.ts index ededc9819..5fcd61bf6 100644 --- a/src/hooks/useOnSetDefaultVariant.ts +++ b/src/hooks/useOnSetDefaultVariant.ts @@ -1,17 +1,9 @@ +import { Node, useProductVariantSetDefaultMutation } from "@saleor/graphql"; import useNotifier from "@saleor/hooks/useNotifier"; -import { useProductVariantSetDefaultMutation } from "@saleor/products/mutations"; import { getProductErrorMessage } from "@saleor/utils/errors"; import { useIntl } from "react-intl"; -import { ProductDetails_product_variants } from "../products/types/ProductDetails"; -import { VariantUpdate_productVariantUpdate_productVariant } from "../products/types/VariantUpdate"; - -function useOnSetDefaultVariant( - productId: string, - variant: - | ProductDetails_product_variants - | VariantUpdate_productVariantUpdate_productVariant -) { +function useOnSetDefaultVariant(productId: string, variant: Node) { const notify = useNotifier(); const intl = useIntl(); diff --git a/src/index.tsx b/src/index.tsx index ae85e46c3..f9ad6d593 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -7,6 +7,7 @@ import { import { BatchHttpLink } from "@apollo/client/link/batch-http"; import { onError } from "@apollo/client/link/error"; import DemoBanner from "@saleor/components/DemoBanner"; +import { PermissionEnum } from "@saleor/graphql"; import useAppState from "@saleor/hooks/useAppState"; import { ThemeProvider } from "@saleor/macaw-ui"; import { createFetch, createSaleorClient, SaleorProvider } from "@saleor/sdk"; @@ -18,7 +19,6 @@ import TagManager from "react-gtm-module"; import { useIntl } from "react-intl"; import { BrowserRouter, Route, Switch } from "react-router-dom"; -import introspectionQueryResultData from "../fragmentTypes.json"; import AppsSection from "./apps"; import { ExternalAppProvider } from "./apps/components/ExternalAppContext"; import { appsSection } from "./apps/urls"; @@ -52,6 +52,7 @@ import { CustomerSection } from "./customers"; import DiscountSection from "./discounts"; import GiftCardSection from "./giftCards"; import { giftCardsSectionUrlName } from "./giftCards/urls"; +import { introspectionQueryResultData, TypedTypePolicies } from "./graphql"; import HomePage from "./home"; import { commonMessages } from "./intl"; import NavigationSection from "./navigation"; @@ -71,9 +72,7 @@ import StaffSection from "./staff"; import TaxesSection from "./taxes"; import themeOverrides from "./themeOverrides"; import TranslationsSection from "./translations"; -import { TypedTypePolicies } from "./type-policies"; import { ServerErrorWithName } from "./types"; -import { PermissionEnum } from "./types/globalTypes"; import WarehouseSection from "./warehouses"; import { warehouseSection } from "./warehouses/urls"; diff --git a/src/misc.ts b/src/misc.ts index b95207dc4..2fce05b7a 100644 --- a/src/misc.ts +++ b/src/misc.ts @@ -1,4 +1,11 @@ import { FetchResult, MutationFunction, MutationResult } from "@apollo/client"; +import { + AddressInput, + CountryCode, + DateRangeInput, + OrderStatus, + PaymentChargeStatusEnum +} from "@saleor/graphql"; import { ConfirmButtonTransitionState, ThemeType } from "@saleor/macaw-ui"; import uniqBy from "lodash/uniqBy"; import moment from "moment-timezone"; @@ -6,26 +13,19 @@ import { IntlShape } from "react-intl"; import { MultiAutocompleteChoiceType } from "./components/MultiAutocompleteSelectField"; import { AddressType, AddressTypeInput } from "./customers/types"; +import { AddressFragment } from "./graphql"; import { commonStatusMessages, errorMessages, orderStatusMessages, paymentStatusMessages } from "./intl"; -import { OrderDetails_order_shippingAddress } from "./orders/types/OrderDetails"; import { MutationResultAdditionalProps, PartialMutationProviderOutput, StatusType, UserError } from "./types"; -import { - AddressInput, - CountryCode, - DateRangeInput, - OrderStatus, - PaymentChargeStatusEnum -} from "./types/globalTypes"; export type RequireAtLeastOne = Pick< T, @@ -398,7 +398,7 @@ export function findInEnum(needle: string, haystack: TEnum) { } export function addressToAddressInput( - address: T & OrderDetails_order_shippingAddress + address: T & AddressFragment ): AddressInput { const { id, __typename, ...rest } = address; return { diff --git a/src/mutations.tsx b/src/mutations.tsx deleted file mode 100644 index b749ba229..000000000 --- a/src/mutations.tsx +++ /dev/null @@ -1,88 +0,0 @@ -import { - ApolloError, - MutationFunction, - MutationResult, - MutationUpdaterFn -} from "@apollo/client"; -import { Mutation } from "@apollo/client/react/components"; -import { DocumentNode } from "graphql"; -import React from "react"; -import { useIntl } from "react-intl"; - -import { handleNestedMutationErrors, showAllErrors, useUser } from "./auth"; -import { isJwtError } from "./auth/errors"; -import useNotifier from "./hooks/useNotifier"; -import { commonMessages } from "./intl"; -import { getMutationStatus } from "./misc"; -import { MutationResultAdditionalProps } from "./types"; -import { GqlErrors, hasError } from "./utils/api"; - -export interface TypedMutationInnerProps { - children: ( - mutateFn: MutationFunction, - result: MutationResult & MutationResultAdditionalProps - ) => React.ReactNode; - onCompleted?: (data: TData) => void; - onError?: (error: ApolloError) => void; - variables?: TVariables; -} - -// For some reason Mutation returns () => Element instead of () => ReactNode -export function TypedMutation( - mutation: DocumentNode, - update?: MutationUpdaterFn -) { - return (props: TypedMutationInnerProps) => { - const notify = useNotifier(); - const intl = useIntl(); - const user = useUser(); - const { children, onCompleted, onError, variables } = props; - - return ( - { - handleNestedMutationErrors({ - data, - intl, - notify - }); - - onCompleted(data); - }} - errorPolicy="all" - onError={(err: ApolloError) => { - if (hasError(err, GqlErrors.ReadOnlyException)) { - notify({ - status: "error", - text: intl.formatMessage(commonMessages.readOnly) - }); - } else if (err.graphQLErrors.some(isJwtError)) { - user.logout(); - notify({ - status: "error", - text: intl.formatMessage(commonMessages.sessionExpired) - }); - } else { - showAllErrors({ notify, error: err }); - } - - if (onError) { - onError(err); - } - }} - variables={variables} - update={update} - > - {(mutateFn, result) => ( - <> - {children(mutateFn, { - ...result, - status: getMutationStatus(result) - })} - - )} - - ); - }; -} diff --git a/src/navigation/components/MenuCreateDialog/MenuCreateDialog.tsx b/src/navigation/components/MenuCreateDialog/MenuCreateDialog.tsx index fe37a3ca8..ad3786d0c 100644 --- a/src/navigation/components/MenuCreateDialog/MenuCreateDialog.tsx +++ b/src/navigation/components/MenuCreateDialog/MenuCreateDialog.tsx @@ -8,7 +8,7 @@ import { import BackButton from "@saleor/components/BackButton"; import ConfirmButton from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; -import { MenuErrorFragment } from "@saleor/fragments/types/MenuErrorFragment"; +import { MenuErrorFragment } from "@saleor/graphql"; import { buttonMessages } from "@saleor/intl"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { getFormErrors } from "@saleor/utils/errors"; diff --git a/src/navigation/components/MenuDetailsPage/MenuDetailsPage.tsx b/src/navigation/components/MenuDetailsPage/MenuDetailsPage.tsx index 9962ba653..040604b9a 100644 --- a/src/navigation/components/MenuDetailsPage/MenuDetailsPage.tsx +++ b/src/navigation/components/MenuDetailsPage/MenuDetailsPage.tsx @@ -4,15 +4,13 @@ import Container from "@saleor/components/Container"; import Form from "@saleor/components/Form"; import Grid from "@saleor/components/Grid"; import Savebar from "@saleor/components/Savebar"; -import { MenuErrorFragment } from "@saleor/fragments/types/MenuErrorFragment"; +import { MenuDetailsFragment, MenuErrorFragment } from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { MenuDetails_menu } from "../../types/MenuDetails"; import { MenuItemType } from "../MenuItemDialog"; import MenuItems, { TreeOperation } from "../MenuItems"; import MenuProperties from "../MenuProperties"; @@ -30,7 +28,7 @@ export interface MenuDetailsPageProps { saveButtonState: ConfirmButtonTransitionState; disabled: boolean; errors: MenuErrorFragment[]; - menu: MenuDetails_menu; + menu: MenuDetailsFragment; onBack: () => void; onDelete: () => void; onItemAdd: () => void; diff --git a/src/navigation/components/MenuDetailsPage/tree.test.ts b/src/navigation/components/MenuDetailsPage/tree.test.ts index 05f2e9c08..2f55907e0 100644 --- a/src/navigation/components/MenuDetailsPage/tree.test.ts +++ b/src/navigation/components/MenuDetailsPage/tree.test.ts @@ -1,9 +1,10 @@ +import { MenuDetailsFragment, MenuDetailsQuery } from "@saleor/graphql"; + import { menu } from "../../fixtures"; -import { MenuDetails_menu_items } from "../../types/MenuDetails"; import { TreeOperation } from "../MenuItems"; import { computeRelativeTree } from "./tree"; -const relativeOutput: MenuDetails_menu_items[][] = [ +const relativeOutput: Array = [ // no moves [ { @@ -1152,7 +1153,7 @@ const testTable: TreeOperation[][] = [ // Readability FTW function innerTreeToString( - tree: MenuDetails_menu_items, + tree: MenuDetailsFragment["items"][0], level: number ): string { return ( @@ -1165,7 +1166,7 @@ function innerTreeToString( ) ); } -function treeToString(tree: MenuDetails_menu_items[]): string { +function treeToString(tree: MenuDetailsFragment["items"]): string { return tree.reduce((acc, node) => acc + innerTreeToString(node, 0), ""); } diff --git a/src/navigation/components/MenuDetailsPage/tree.ts b/src/navigation/components/MenuDetailsPage/tree.ts index 3db0a9f4a..51815b759 100644 --- a/src/navigation/components/MenuDetailsPage/tree.ts +++ b/src/navigation/components/MenuDetailsPage/tree.ts @@ -1,7 +1,11 @@ -import { MenuDetails_menu_items } from "../../types/MenuDetails"; +import { MenuDetailsFragment } from "@saleor/graphql"; + import { TreeOperation } from "../MenuItems"; -export function findNode(tree: MenuDetails_menu_items[], id: string): number[] { +export function findNode( + tree: MenuDetailsFragment["items"], + id: string +): number[] { const foundNodeIndex = tree.findIndex(node => node.id === id); if (tree.length === 0) { return [null]; @@ -17,9 +21,9 @@ export function findNode(tree: MenuDetails_menu_items[], id: string): number[] { } export function getNode( - tree: MenuDetails_menu_items[], + tree: MenuDetailsFragment["items"], path: number[] -): MenuDetails_menu_items { +): MenuDetailsFragment["items"][0] { if (path.length === 1) { return tree[path[0]]; } @@ -27,9 +31,9 @@ export function getNode( } function removeNode( - tree: MenuDetails_menu_items[], + tree: MenuDetailsFragment["items"], path: number[] -): MenuDetails_menu_items[] { +): MenuDetailsFragment["items"] { const removeIndex = path[0]; if (path.length === 1) { @@ -45,17 +49,19 @@ function removeNode( return newTree; } +interface InsertNodeInput { + tree: MenuDetailsFragment["items"]; + path: number[]; + node: MenuDetailsFragment["items"][0]; + position: number; +} + function insertNode({ tree, path, node, position -}: { - tree: MenuDetails_menu_items[]; - path: number[]; - node: MenuDetails_menu_items; - position: number; -}): MenuDetails_menu_items[] { +}: InsertNodeInput): MenuDetailsFragment["items"] { if (path.length === 0) { return [...tree.slice(0, position), node, ...tree.slice(position)]; } @@ -72,9 +78,9 @@ function insertNode({ } function removeNodeAndChildren( - tree: MenuDetails_menu_items[], + tree: MenuDetailsFragment["items"], operation: TreeOperation -): MenuDetails_menu_items[] { +): MenuDetailsFragment["items"] { const sourcePath = findNode(tree, operation.id); const node = getNode(tree, sourcePath); @@ -95,9 +101,9 @@ function removeNodeAndChildren( } function permuteRelativeNode( - tree: MenuDetails_menu_items[], + tree: MenuDetailsFragment["items"], permutation: TreeOperation -): MenuDetails_menu_items[] { +): MenuDetailsFragment["items"] { const sourcePath = findNode(tree, permutation.id); const node = getNode(tree, sourcePath); @@ -122,16 +128,16 @@ function permuteRelativeNode( } function executeRelativeOperation( - tree: MenuDetails_menu_items[], + tree: MenuDetailsFragment["items"], operation: TreeOperation -): MenuDetails_menu_items[] { +): MenuDetailsFragment["items"] { return operation.type === "move" ? permuteRelativeNode(tree, operation) : removeNodeAndChildren(tree, operation); } export function computeRelativeTree( - tree: MenuDetails_menu_items[], + tree: MenuDetailsFragment["items"], operations: TreeOperation[] ) { const newTree = operations.reduce( diff --git a/src/navigation/components/MenuItemDialog/MenuItemDialog.tsx b/src/navigation/components/MenuItemDialog/MenuItemDialog.tsx index dc5f755e3..4dff4e029 100644 --- a/src/navigation/components/MenuItemDialog/MenuItemDialog.tsx +++ b/src/navigation/components/MenuItemDialog/MenuItemDialog.tsx @@ -10,15 +10,18 @@ import AutocompleteSelectMenu from "@saleor/components/AutocompleteSelectMenu"; import BackButton from "@saleor/components/BackButton"; import ConfirmButton from "@saleor/components/ConfirmButton"; import FormSpacer from "@saleor/components/FormSpacer"; -import { MenuErrorFragment } from "@saleor/fragments/types/MenuErrorFragment"; +import { + MenuErrorFragment, + SearchCategoriesQuery, + SearchCollectionsQuery, + SearchPagesQuery +} from "@saleor/graphql"; import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import useModalDialogOpen from "@saleor/hooks/useModalDialogOpen"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; import { buttonMessages, sectionNames } from "@saleor/intl"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { SearchCategories_search_edges_node } from "@saleor/searches/types/SearchCategories"; -import { SearchCollections_search_edges_node } from "@saleor/searches/types/SearchCollections"; -import { SearchPages_search_edges_node } from "@saleor/searches/types/SearchPages"; +import { RelayToFlat } from "@saleor/types"; import { getFieldError, getFormErrors } from "@saleor/utils/errors"; import getMenuErrorMessage from "@saleor/utils/errors/menu"; import { getMenuItemByValue, IMenu } from "@saleor/utils/menu"; @@ -44,9 +47,9 @@ export interface MenuItemDialogProps { initialDisplayValue?: string; loading: boolean; open: boolean; - collections: SearchCollections_search_edges_node[]; - categories: SearchCategories_search_edges_node[]; - pages: SearchPages_search_edges_node[]; + collections: RelayToFlat; + categories: RelayToFlat; + pages: RelayToFlat; onClose: () => void; onSubmit: (data: MenuItemDialogFormData) => void; onQueryChange: (query: string) => void; diff --git a/src/navigation/components/MenuItems/MenuItems.tsx b/src/navigation/components/MenuItems/MenuItems.tsx index 0b566ce79..9eb579ec4 100644 --- a/src/navigation/components/MenuItems/MenuItems.tsx +++ b/src/navigation/components/MenuItems/MenuItems.tsx @@ -2,16 +2,21 @@ import { Card, CardActions, Paper, Typography } from "@material-ui/core"; import EditIcon from "@material-ui/icons/Edit"; import CardTitle from "@saleor/components/CardTitle"; import Skeleton from "@saleor/components/Skeleton"; +import { MenuDetailsFragment } from "@saleor/graphql"; import { buttonMessages } from "@saleor/intl"; -import { Button, DeleteIcon, IconButton, useTheme } from "@saleor/macaw-ui"; -import { makeStyles } from "@saleor/macaw-ui"; +import { + Button, + DeleteIcon, + IconButton, + makeStyles, + useTheme +} from "@saleor/macaw-ui"; import classNames from "classnames"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import SortableTree, { NodeRendererProps, TreeItem } from "react-sortable-tree"; import Draggable from "../../../icons/Draggable"; -import { MenuDetails_menu_items } from "../../types/MenuDetails"; import { MenuItemType } from "../MenuItemDialog"; import { getDiff, getNodeData, getNodeQuantity, TreeOperation } from "./tree"; @@ -20,7 +25,7 @@ const NODE_MARGIN = 40; export interface MenuItemsProps { canUndo: boolean; - items: MenuDetails_menu_items[]; + items: MenuDetailsFragment["items"]; onChange: (operations: TreeOperation[]) => void; onItemAdd: () => void; onItemClick: (id: string, type: MenuItemType) => void; diff --git a/src/navigation/components/MenuItems/tree.ts b/src/navigation/components/MenuItems/tree.ts index 8341e9ce4..808128dc6 100644 --- a/src/navigation/components/MenuItems/tree.ts +++ b/src/navigation/components/MenuItems/tree.ts @@ -1,7 +1,7 @@ +import { MenuDetailsFragment } from "@saleor/graphql"; import { getPatch } from "fast-array-diff"; import { TreeItem } from "react-sortable-tree"; -import { MenuDetails_menu_items } from "../../types/MenuDetails"; import { MenuItemType } from "../MenuItemDialog"; export type TreeOperationType = "move" | "remove"; @@ -34,7 +34,9 @@ function treeToMap(tree: TreeItem[], parent: string): Record { }; } -export function getItemType(item: MenuDetails_menu_items): MenuItemType { +export function getItemType( + item: MenuDetailsFragment["items"][0] +): MenuItemType { if (item.category) { return "category"; } else if (item.collection) { @@ -48,7 +50,7 @@ export function getItemType(item: MenuDetails_menu_items): MenuItemType { } } -export function getItemId(item: MenuDetails_menu_items): string { +export function getItemId(item: MenuDetailsFragment["items"][0]): string { if (item.category) { return item.category.id; } else if (item.collection) { @@ -125,7 +127,7 @@ export function getDiff( } export function getNodeData( - item: MenuDetails_menu_items, + item: MenuDetailsFragment["items"][0], onChange: (operations: TreeOperation[]) => void, onClick: (id: string, type: MenuItemType) => void, onEdit: (id: string) => void @@ -143,7 +145,7 @@ export function getNodeData( }; } -export function getNodeQuantity(items: MenuDetails_menu_items[]): number { +export function getNodeQuantity(items: MenuDetailsFragment["items"]): number { return items.reduce( (acc, curr) => acc + getNodeQuantity(curr.children), items.length diff --git a/src/navigation/components/MenuList/MenuList.tsx b/src/navigation/components/MenuList/MenuList.tsx index 435668f98..a481ef854 100644 --- a/src/navigation/components/MenuList/MenuList.tsx +++ b/src/navigation/components/MenuList/MenuList.tsx @@ -12,6 +12,7 @@ import Skeleton from "@saleor/components/Skeleton"; import TableCellHeader from "@saleor/components/TableCellHeader"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; +import { MenuFragment } from "@saleor/graphql"; import { DeleteIcon, makeStyles } from "@saleor/macaw-ui"; import { maybe, renderCollection } from "@saleor/misc"; import { MenuListUrlSortField } from "@saleor/navigation/urls"; @@ -21,13 +22,11 @@ import { getFooterColSpanWithBulkActions } from "@saleor/utils/tables"; import React from "react"; import { FormattedMessage } from "react-intl"; -import { MenuList_menus_edges_node } from "../../types/MenuList"; - export interface MenuListProps extends ListProps, ListActions, SortPage { - menus: MenuList_menus_edges_node[]; + menus: MenuFragment[]; onDelete: (id: string) => void; } diff --git a/src/navigation/components/MenuListPage/MenuListPage.tsx b/src/navigation/components/MenuListPage/MenuListPage.tsx index 91b47c8cd..abb2905e6 100644 --- a/src/navigation/components/MenuListPage/MenuListPage.tsx +++ b/src/navigation/components/MenuListPage/MenuListPage.tsx @@ -1,5 +1,6 @@ import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; +import { MenuFragment } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { Backlink, Button } from "@saleor/macaw-ui"; import { MenuListUrlSortField } from "@saleor/navigation/urls"; @@ -7,14 +8,13 @@ import { ListActions, PageListProps, SortPage } from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { MenuList_menus_edges_node } from "../../types/MenuList"; import MenuList from "../MenuList"; export interface MenuListPageProps extends PageListProps, ListActions, SortPage { - menus: MenuList_menus_edges_node[]; + menus: MenuFragment[]; onBack: () => void; onDelete: (id: string) => void; } diff --git a/src/navigation/components/MenuProperties/MenuProperties.tsx b/src/navigation/components/MenuProperties/MenuProperties.tsx index c30e97f55..ce8f0f9b5 100644 --- a/src/navigation/components/MenuProperties/MenuProperties.tsx +++ b/src/navigation/components/MenuProperties/MenuProperties.tsx @@ -1,6 +1,6 @@ import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; -import { MenuErrorFragment } from "@saleor/fragments/types/MenuErrorFragment"; +import { MenuErrorFragment } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { getFormErrors } from "@saleor/utils/errors"; import getMenuErrorMessage from "@saleor/utils/errors/menu"; diff --git a/src/navigation/fixtures.ts b/src/navigation/fixtures.ts index dd4745e47..4e5131928 100644 --- a/src/navigation/fixtures.ts +++ b/src/navigation/fixtures.ts @@ -1,7 +1,6 @@ -import { MenuDetails_menu } from "./types/MenuDetails"; -import { MenuList_menus_edges_node } from "./types/MenuList"; +import { MenuDetailsFragment, MenuFragment } from "@saleor/graphql"; -export const menuList: MenuList_menus_edges_node[] = [ +export const menuList: MenuFragment[] = [ { __typename: "Menu", id: "TWVudTox", @@ -23,7 +22,7 @@ export const menuList: MenuList_menus_edges_node[] = [ } ]; -export const menu: MenuDetails_menu = { +export const menu: MenuDetailsFragment = { __typename: "Menu", id: "TWVudTox", items: [ diff --git a/src/navigation/mutations.ts b/src/navigation/mutations.ts index 58ea7e2f2..cbee34073 100644 --- a/src/navigation/mutations.ts +++ b/src/navigation/mutations.ts @@ -1,33 +1,10 @@ import { gql } from "@apollo/client"; -import { menuErrorFragment } from "@saleor/fragments/errors"; -import { - menuItemFragment, - menuItemNestedFragment -} from "@saleor/fragments/navigation"; -import { TypedMutation } from "../mutations"; -import { - MenuBulkDelete, - MenuBulkDeleteVariables -} from "./types/MenuBulkDelete"; -import { MenuCreate, MenuCreateVariables } from "./types/MenuCreate"; -import { MenuDelete, MenuDeleteVariables } from "./types/MenuDelete"; -import { - MenuItemCreate, - MenuItemCreateVariables -} from "./types/MenuItemCreate"; -import { - MenuItemUpdate, - MenuItemUpdateVariables -} from "./types/MenuItemUpdate"; -import { MenuUpdate, MenuUpdateVariables } from "./types/MenuUpdate"; - -const menuCreate = gql` - ${menuErrorFragment} +export const menuCreate = gql` mutation MenuCreate($input: MenuCreateInput!) { menuCreate(input: $input) { errors { - ...MenuErrorFragment + ...MenuError } menu { id @@ -35,67 +12,46 @@ const menuCreate = gql` } } `; -export const MenuCreateMutation = TypedMutation< - MenuCreate, - MenuCreateVariables ->(menuCreate); -const menuBulkDelete = gql` - ${menuErrorFragment} +export const menuBulkDelete = gql` mutation MenuBulkDelete($ids: [ID]!) { menuBulkDelete(ids: $ids) { errors { - ...MenuErrorFragment + ...MenuError } } } `; -export const MenuBulkDeleteMutation = TypedMutation< - MenuBulkDelete, - MenuBulkDeleteVariables ->(menuBulkDelete); -const menuDelete = gql` - ${menuErrorFragment} +export const menuDelete = gql` mutation MenuDelete($id: ID!) { menuDelete(id: $id) { errors { - ...MenuErrorFragment + ...MenuError } } } `; -export const MenuDeleteMutation = TypedMutation< - MenuDelete, - MenuDeleteVariables ->(menuDelete); -const menuItemCreate = gql` - ${menuErrorFragment} - ${menuItemNestedFragment} +export const menuItemCreate = gql` mutation MenuItemCreate($input: MenuItemCreateInput!) { menuItemCreate(input: $input) { errors { - ...MenuErrorFragment + ...MenuError } menuItem { menu { id items { - ...MenuItemNestedFragment + ...MenuItemNested } } } } } `; -export const MenuItemCreateMutation = TypedMutation< - MenuItemCreate, - MenuItemCreateVariables ->(menuItemCreate); -const menuUpdate = gql` - ${menuErrorFragment} +export const menuUpdate = gql` mutation MenuUpdate( $id: ID! $name: String! @@ -104,43 +60,33 @@ const menuUpdate = gql` ) { menuUpdate(id: $id, input: { name: $name }) { errors { - ...MenuErrorFragment + ...MenuError } } menuItemMove(menu: $id, moves: $moves) { errors { - ...MenuErrorFragment + ...MenuError } } menuItemBulkDelete(ids: $removeIds) { errors { - ...MenuErrorFragment + ...MenuError } } } `; -export const MenuUpdateMutation = TypedMutation< - MenuUpdate, - MenuUpdateVariables ->(menuUpdate); -const menuItemUpdate = gql` - ${menuErrorFragment} - ${menuItemFragment} +export const menuItemUpdate = gql` mutation MenuItemUpdate($id: ID!, $input: MenuItemInput!) { menuItemUpdate(id: $id, input: $input) { errors { - ...MenuErrorFragment + ...MenuError } menuItem { - ...MenuItemFragment + ...MenuItem } } } `; -export const MenuItemUpdateMutation = TypedMutation< - MenuItemUpdate, - MenuItemUpdateVariables ->(menuItemUpdate); diff --git a/src/navigation/queries.ts b/src/navigation/queries.ts index 6269692f0..54b77e1f5 100644 --- a/src/navigation/queries.ts +++ b/src/navigation/queries.ts @@ -1,18 +1,6 @@ import { gql } from "@apollo/client"; -import { - menuDetailsFragment, - menuFragment -} from "@saleor/fragments/navigation"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; -import makeQuery from "@saleor/hooks/makeQuery"; -import { TypedQuery } from "../queries"; -import { MenuDetails, MenuDetailsVariables } from "./types/MenuDetails"; -import { MenuList, MenuListVariables } from "./types/MenuList"; - -const menuList = gql` - ${menuFragment} - ${pageInfoFragment} +export const menuList = gql` query MenuList( $first: Int $after: String @@ -29,27 +17,20 @@ const menuList = gql` ) { edges { node { - ...MenuFragment + ...Menu } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export const useMenuListQuery = makeQuery( - menuList -); -const menuDetails = gql` - ${menuDetailsFragment} +export const menuDetails = gql` query MenuDetails($id: ID!) { menu(id: $id) { - ...MenuDetailsFragment + ...MenuDetails } } `; -export const MenuDetailsQuery = TypedQuery( - menuDetails -); diff --git a/src/navigation/types/MenuBulkDelete.ts b/src/navigation/types/MenuBulkDelete.ts deleted file mode 100644 index 13b661ee8..000000000 --- a/src/navigation/types/MenuBulkDelete.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { MenuErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: MenuBulkDelete -// ==================================================== - -export interface MenuBulkDelete_menuBulkDelete_errors { - __typename: "MenuError"; - code: MenuErrorCode; - field: string | null; - message: string | null; -} - -export interface MenuBulkDelete_menuBulkDelete { - __typename: "MenuBulkDelete"; - errors: MenuBulkDelete_menuBulkDelete_errors[]; -} - -export interface MenuBulkDelete { - menuBulkDelete: MenuBulkDelete_menuBulkDelete | null; -} - -export interface MenuBulkDeleteVariables { - ids: (string | null)[]; -} diff --git a/src/navigation/types/MenuCreate.ts b/src/navigation/types/MenuCreate.ts deleted file mode 100644 index 6ea378c5e..000000000 --- a/src/navigation/types/MenuCreate.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { MenuCreateInput, MenuErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: MenuCreate -// ==================================================== - -export interface MenuCreate_menuCreate_errors { - __typename: "MenuError"; - code: MenuErrorCode; - field: string | null; - message: string | null; -} - -export interface MenuCreate_menuCreate_menu { - __typename: "Menu"; - id: string; -} - -export interface MenuCreate_menuCreate { - __typename: "MenuCreate"; - errors: MenuCreate_menuCreate_errors[]; - menu: MenuCreate_menuCreate_menu | null; -} - -export interface MenuCreate { - menuCreate: MenuCreate_menuCreate | null; -} - -export interface MenuCreateVariables { - input: MenuCreateInput; -} diff --git a/src/navigation/types/MenuDelete.ts b/src/navigation/types/MenuDelete.ts deleted file mode 100644 index 726868868..000000000 --- a/src/navigation/types/MenuDelete.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { MenuErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: MenuDelete -// ==================================================== - -export interface MenuDelete_menuDelete_errors { - __typename: "MenuError"; - code: MenuErrorCode; - field: string | null; - message: string | null; -} - -export interface MenuDelete_menuDelete { - __typename: "MenuDelete"; - errors: MenuDelete_menuDelete_errors[]; -} - -export interface MenuDelete { - menuDelete: MenuDelete_menuDelete | null; -} - -export interface MenuDeleteVariables { - id: string; -} diff --git a/src/navigation/types/MenuDetails.ts b/src/navigation/types/MenuDetails.ts deleted file mode 100644 index 2ddb2c2e8..000000000 --- a/src/navigation/types/MenuDetails.ts +++ /dev/null @@ -1,232 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: MenuDetails -// ==================================================== - -export interface MenuDetails_menu_items_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuDetails_menu_items_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuDetails_menu_items_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuDetails_menu_items_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuDetails_menu_items_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuDetails_menu_items_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuDetails_menu_items_children_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuDetails_menu_items_children_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuDetails_menu_items_children_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuDetails_menu_items_children_children_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuDetails_menu_items_children_children_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuDetails_menu_items_children_children_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuDetails_menu_items_children_children_children_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuDetails_menu_items_children_children_children_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuDetails_menu_items_children_children_children_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuDetails_menu_items_children_children_children_children_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuDetails_menu_items_children_children_children_children_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuDetails_menu_items_children_children_children_children_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuDetails_menu_items_children_children_children_children_children_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuDetails_menu_items_children_children_children_children_children_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuDetails_menu_items_children_children_children_children_children_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuDetails_menu_items_children_children_children_children_children_children { - __typename: "MenuItem"; - category: MenuDetails_menu_items_children_children_children_children_children_children_category | null; - collection: MenuDetails_menu_items_children_children_children_children_children_children_collection | null; - id: string; - level: number; - name: string; - page: MenuDetails_menu_items_children_children_children_children_children_children_page | null; - url: string | null; -} - -export interface MenuDetails_menu_items_children_children_children_children_children { - __typename: "MenuItem"; - category: MenuDetails_menu_items_children_children_children_children_children_category | null; - collection: MenuDetails_menu_items_children_children_children_children_children_collection | null; - id: string; - level: number; - name: string; - page: MenuDetails_menu_items_children_children_children_children_children_page | null; - url: string | null; - children: (MenuDetails_menu_items_children_children_children_children_children_children | null)[] | null; -} - -export interface MenuDetails_menu_items_children_children_children_children { - __typename: "MenuItem"; - category: MenuDetails_menu_items_children_children_children_children_category | null; - collection: MenuDetails_menu_items_children_children_children_children_collection | null; - id: string; - level: number; - name: string; - page: MenuDetails_menu_items_children_children_children_children_page | null; - url: string | null; - children: (MenuDetails_menu_items_children_children_children_children_children | null)[] | null; -} - -export interface MenuDetails_menu_items_children_children_children { - __typename: "MenuItem"; - category: MenuDetails_menu_items_children_children_children_category | null; - collection: MenuDetails_menu_items_children_children_children_collection | null; - id: string; - level: number; - name: string; - page: MenuDetails_menu_items_children_children_children_page | null; - url: string | null; - children: (MenuDetails_menu_items_children_children_children_children | null)[] | null; -} - -export interface MenuDetails_menu_items_children_children { - __typename: "MenuItem"; - category: MenuDetails_menu_items_children_children_category | null; - collection: MenuDetails_menu_items_children_children_collection | null; - id: string; - level: number; - name: string; - page: MenuDetails_menu_items_children_children_page | null; - url: string | null; - children: (MenuDetails_menu_items_children_children_children | null)[] | null; -} - -export interface MenuDetails_menu_items_children { - __typename: "MenuItem"; - category: MenuDetails_menu_items_children_category | null; - collection: MenuDetails_menu_items_children_collection | null; - id: string; - level: number; - name: string; - page: MenuDetails_menu_items_children_page | null; - url: string | null; - children: (MenuDetails_menu_items_children_children | null)[] | null; -} - -export interface MenuDetails_menu_items { - __typename: "MenuItem"; - category: MenuDetails_menu_items_category | null; - collection: MenuDetails_menu_items_collection | null; - id: string; - level: number; - name: string; - page: MenuDetails_menu_items_page | null; - url: string | null; - children: (MenuDetails_menu_items_children | null)[] | null; -} - -export interface MenuDetails_menu { - __typename: "Menu"; - id: string; - items: (MenuDetails_menu_items | null)[] | null; - name: string; -} - -export interface MenuDetails { - menu: MenuDetails_menu | null; -} - -export interface MenuDetailsVariables { - id: string; -} diff --git a/src/navigation/types/MenuItemCreate.ts b/src/navigation/types/MenuItemCreate.ts deleted file mode 100644 index e855e7ad5..000000000 --- a/src/navigation/types/MenuItemCreate.ts +++ /dev/null @@ -1,251 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { MenuItemCreateInput, MenuErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: MenuItemCreate -// ==================================================== - -export interface MenuItemCreate_menuItemCreate_errors { - __typename: "MenuError"; - code: MenuErrorCode; - field: string | null; - message: string | null; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_children_children_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_children_children_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_children_children_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_children_children { - __typename: "MenuItem"; - category: MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_children_children_category | null; - collection: MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_children_children_collection | null; - id: string; - level: number; - name: string; - page: MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_children_children_page | null; - url: string | null; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_children { - __typename: "MenuItem"; - category: MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_children_category | null; - collection: MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_children_collection | null; - id: string; - level: number; - name: string; - page: MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_children_page | null; - url: string | null; - children: (MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_children_children | null)[] | null; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children { - __typename: "MenuItem"; - category: MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_category | null; - collection: MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_collection | null; - id: string; - level: number; - name: string; - page: MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_page | null; - url: string | null; - children: (MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children_children | null)[] | null; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children { - __typename: "MenuItem"; - category: MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_category | null; - collection: MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_collection | null; - id: string; - level: number; - name: string; - page: MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_page | null; - url: string | null; - children: (MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children_children | null)[] | null; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children { - __typename: "MenuItem"; - category: MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_category | null; - collection: MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_collection | null; - id: string; - level: number; - name: string; - page: MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_page | null; - url: string | null; - children: (MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children_children | null)[] | null; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items_children { - __typename: "MenuItem"; - category: MenuItemCreate_menuItemCreate_menuItem_menu_items_children_category | null; - collection: MenuItemCreate_menuItemCreate_menuItem_menu_items_children_collection | null; - id: string; - level: number; - name: string; - page: MenuItemCreate_menuItemCreate_menuItem_menu_items_children_page | null; - url: string | null; - children: (MenuItemCreate_menuItemCreate_menuItem_menu_items_children_children | null)[] | null; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu_items { - __typename: "MenuItem"; - category: MenuItemCreate_menuItemCreate_menuItem_menu_items_category | null; - collection: MenuItemCreate_menuItemCreate_menuItem_menu_items_collection | null; - id: string; - level: number; - name: string; - page: MenuItemCreate_menuItemCreate_menuItem_menu_items_page | null; - url: string | null; - children: (MenuItemCreate_menuItemCreate_menuItem_menu_items_children | null)[] | null; -} - -export interface MenuItemCreate_menuItemCreate_menuItem_menu { - __typename: "Menu"; - id: string; - items: (MenuItemCreate_menuItemCreate_menuItem_menu_items | null)[] | null; -} - -export interface MenuItemCreate_menuItemCreate_menuItem { - __typename: "MenuItem"; - menu: MenuItemCreate_menuItemCreate_menuItem_menu; -} - -export interface MenuItemCreate_menuItemCreate { - __typename: "MenuItemCreate"; - errors: MenuItemCreate_menuItemCreate_errors[]; - menuItem: MenuItemCreate_menuItemCreate_menuItem | null; -} - -export interface MenuItemCreate { - menuItemCreate: MenuItemCreate_menuItemCreate | null; -} - -export interface MenuItemCreateVariables { - input: MenuItemCreateInput; -} diff --git a/src/navigation/types/MenuItemUpdate.ts b/src/navigation/types/MenuItemUpdate.ts deleted file mode 100644 index 66bc55521..000000000 --- a/src/navigation/types/MenuItemUpdate.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { MenuItemInput, MenuErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: MenuItemUpdate -// ==================================================== - -export interface MenuItemUpdate_menuItemUpdate_errors { - __typename: "MenuError"; - code: MenuErrorCode; - field: string | null; - message: string | null; -} - -export interface MenuItemUpdate_menuItemUpdate_menuItem_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface MenuItemUpdate_menuItemUpdate_menuItem_collection { - __typename: "Collection"; - id: string; - name: string; -} - -export interface MenuItemUpdate_menuItemUpdate_menuItem_page { - __typename: "Page"; - id: string; - title: string; -} - -export interface MenuItemUpdate_menuItemUpdate_menuItem { - __typename: "MenuItem"; - category: MenuItemUpdate_menuItemUpdate_menuItem_category | null; - collection: MenuItemUpdate_menuItemUpdate_menuItem_collection | null; - id: string; - level: number; - name: string; - page: MenuItemUpdate_menuItemUpdate_menuItem_page | null; - url: string | null; -} - -export interface MenuItemUpdate_menuItemUpdate { - __typename: "MenuItemUpdate"; - errors: MenuItemUpdate_menuItemUpdate_errors[]; - menuItem: MenuItemUpdate_menuItemUpdate_menuItem | null; -} - -export interface MenuItemUpdate { - menuItemUpdate: MenuItemUpdate_menuItemUpdate | null; -} - -export interface MenuItemUpdateVariables { - id: string; - input: MenuItemInput; -} diff --git a/src/navigation/types/MenuList.ts b/src/navigation/types/MenuList.ts deleted file mode 100644 index 16226e90a..000000000 --- a/src/navigation/types/MenuList.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { MenuSortingInput } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: MenuList -// ==================================================== - -export interface MenuList_menus_edges_node_items { - __typename: "MenuItem"; - id: string; -} - -export interface MenuList_menus_edges_node { - __typename: "Menu"; - id: string; - name: string; - items: (MenuList_menus_edges_node_items | null)[] | null; -} - -export interface MenuList_menus_edges { - __typename: "MenuCountableEdge"; - node: MenuList_menus_edges_node; -} - -export interface MenuList_menus_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface MenuList_menus { - __typename: "MenuCountableConnection"; - edges: MenuList_menus_edges[]; - pageInfo: MenuList_menus_pageInfo; -} - -export interface MenuList { - menus: MenuList_menus | null; -} - -export interface MenuListVariables { - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; - sort?: MenuSortingInput | null; -} diff --git a/src/navigation/types/MenuUpdate.ts b/src/navigation/types/MenuUpdate.ts deleted file mode 100644 index 338637634..000000000 --- a/src/navigation/types/MenuUpdate.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { MenuItemMoveInput, MenuErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: MenuUpdate -// ==================================================== - -export interface MenuUpdate_menuUpdate_errors { - __typename: "MenuError"; - code: MenuErrorCode; - field: string | null; - message: string | null; -} - -export interface MenuUpdate_menuUpdate { - __typename: "MenuUpdate"; - errors: MenuUpdate_menuUpdate_errors[]; -} - -export interface MenuUpdate_menuItemMove_errors { - __typename: "MenuError"; - code: MenuErrorCode; - field: string | null; - message: string | null; -} - -export interface MenuUpdate_menuItemMove { - __typename: "MenuItemMove"; - errors: MenuUpdate_menuItemMove_errors[]; -} - -export interface MenuUpdate_menuItemBulkDelete_errors { - __typename: "MenuError"; - code: MenuErrorCode; - field: string | null; - message: string | null; -} - -export interface MenuUpdate_menuItemBulkDelete { - __typename: "MenuItemBulkDelete"; - errors: MenuUpdate_menuItemBulkDelete_errors[]; -} - -export interface MenuUpdate { - menuUpdate: MenuUpdate_menuUpdate | null; - menuItemMove: MenuUpdate_menuItemMove | null; - menuItemBulkDelete: MenuUpdate_menuItemBulkDelete | null; -} - -export interface MenuUpdateVariables { - id: string; - name: string; - moves: (MenuItemMoveInput | null)[]; - removeIds: (string | null)[]; -} diff --git a/src/navigation/views/MenuDetails/index.tsx b/src/navigation/views/MenuDetails/index.tsx index 432e6f109..1b1f3a5bd 100644 --- a/src/navigation/views/MenuDetails/index.tsx +++ b/src/navigation/views/MenuDetails/index.tsx @@ -1,6 +1,13 @@ import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; +import { + useMenuDeleteMutation, + useMenuDetailsQuery, + useMenuItemCreateMutation, + useMenuItemUpdateMutation, + useMenuUpdateMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useCategorySearch from "@saleor/searches/useCategorySearch"; @@ -27,15 +34,6 @@ import { getItemType, unknownTypeError } from "../../components/MenuItems"; -import { - MenuDeleteMutation, - MenuItemCreateMutation, - MenuItemUpdateMutation, - MenuUpdateMutation -} from "../../mutations"; -import { MenuDetailsQuery } from "../../queries"; -import { MenuItemCreateVariables } from "../../types/MenuItemCreate"; -import { MenuItemUpdateVariables } from "../../types/MenuItemUpdate"; import { menuListUrl, menuUrl, MenuUrlQueryParams } from "../../urls"; import { handleDelete, @@ -70,6 +68,26 @@ const MenuDetails: React.FC = ({ id, params }) => { variables: DEFAULT_INITIAL_SEARCH_DATA }); + const { data, loading, refetch } = useMenuDetailsQuery({ + variables: { id } + }); + + const [menuDelete, menuDeleteOpts] = useMenuDeleteMutation({ + onCompleted: data => handleDelete(data, navigate, notify, intl) + }); + + const [menuUpdate, menuUpdateOpts] = useMenuUpdateMutation({ + onCompleted: data => handleUpdate(data, notify, refetch, intl) + }); + + const [menuItemCreate, menuItemCreateOpts] = useMenuItemCreateMutation({ + onCompleted: data => handleItemCreate(data, notify, closeModal, intl) + }); + + const [menuItemUpdate, menuItemUpdateOpts] = useMenuItemUpdateMutation({ + onCompleted: data => handleItemUpdate(data, id, navigate, notify, intl) + }); + const closeModal = () => navigate( menuUrl(id, { @@ -104,234 +122,164 @@ const MenuDetails: React.FC = ({ id, params }) => { } }; + const handleQueryChange = (query: string) => { + categorySearch.search(query); + collectionSearch.search(query); + pageSearch.search(query); + }; + + const categories = + mapEdgesToItems(categorySearch?.result?.data?.search) || []; + + const collections = + mapEdgesToItems(collectionSearch?.result?.data?.search) || []; + + const pages = mapEdgesToItems(pageSearch?.result?.data?.search) || []; + + const handleMenuItemCreate = (data: MenuItemDialogFormData) => + extractMutationErrors( + menuItemCreate({ + variables: { + input: getMenuItemCreateInputData(id, data) + } + }) + ); + + const handleMenuItemUpdate = (data: MenuItemDialogFormData) => + extractMutationErrors( + menuItemUpdate({ + variables: { + id: params.id, + input: getMenuItemInputData(data) + } + }) + ); + + const menuItem = maybe(() => + getNode(data.menu.items, findNode(data.menu.items, params.id)) + ); + + const initialMenuItemUpdateFormData: MenuItemDialogFormData = { + id: maybe(() => getItemId(menuItem)), + name: maybe(() => menuItem.name, "..."), + type: maybe(() => getItemType(menuItem), "category") + }; + + // This is a workaround to let know + // that it should clean operation stack if mutations + // were successful + const handleSubmit = async (data: MenuDetailsSubmitData) => { + const result = await menuUpdate({ + variables: { + id, + moves: getMoves(data), + name: data.name, + removeIds: getRemoveIds(data) + } + }); + + return [ + ...result.data.menuItemBulkDelete.errors, + ...result.data.menuItemMove.errors, + ...result.data.menuUpdate.errors + ]; + }; + return ( - - {({ data, loading, refetch }) => { - const handleQueryChange = (query: string) => { - categorySearch.search(query); - collectionSearch.search(query); - pageSearch.search(query); - }; + <> + data.menu)} + onBack={() => navigate(menuListUrl())} + onDelete={() => + navigate( + menuUrl(id, { + action: "remove" + }) + ) + } + onItemAdd={() => + navigate( + menuUrl(id, { + action: "add-item" + }) + ) + } + onItemClick={handleItemClick} + onItemEdit={itemId => + navigate( + menuUrl(id, { + action: "edit-item", + id: itemId + }) + ) + } + onSubmit={handleSubmit} + saveButtonState={menuUpdateOpts.status} + /> + + extractMutationErrors(menuDelete({ variables: { id } })) + } + variant="delete" + title={intl.formatMessage({ + defaultMessage: "Delete Menu", + description: "dialog header", + id: "menuDetailsDeleteMenuHeader" + })} + > + + {maybe(() => data.menu.name, "...")} + }} + /> + + - const categories = - mapEdgesToItems(categorySearch?.result?.data?.search) || []; - - const collections = - mapEdgesToItems(collectionSearch?.result?.data?.search) || []; - - const pages = mapEdgesToItems(pageSearch?.result?.data?.search) || []; - - return ( - handleDelete(data, navigate, notify, intl)} - > - {(menuDelete, menuDeleteOpts) => ( - handleUpdate(data, notify, refetch, intl)} - > - {(menuUpdate, menuUpdateOpts) => { - // This is a workaround to let know - // that it should clean operation stack if mutations - // were successful - const handleSubmit = async (data: MenuDetailsSubmitData) => { - const result = await menuUpdate({ - variables: { - id, - moves: getMoves(data), - name: data.name, - removeIds: getRemoveIds(data) - } - }); - - return [ - ...result.data.menuItemBulkDelete.errors, - ...result.data.menuItemMove.errors, - ...result.data.menuUpdate.errors - ]; - }; - - return ( - <> - data.menu)} - onBack={() => navigate(menuListUrl())} - onDelete={() => - navigate( - menuUrl(id, { - action: "remove" - }) - ) - } - onItemAdd={() => - navigate( - menuUrl(id, { - action: "add-item" - }) - ) - } - onItemClick={handleItemClick} - onItemEdit={itemId => - navigate( - menuUrl(id, { - action: "edit-item", - id: itemId - }) - ) - } - onSubmit={handleSubmit} - saveButtonState={menuUpdateOpts.status} - /> - - extractMutationErrors( - menuDelete({ variables: { id } }) - ) - } - variant="delete" - title={intl.formatMessage({ - defaultMessage: "Delete Menu", - description: "dialog header", - id: "menuDetailsDeleteMenuHeader" - })} - > - - - {maybe(() => data.menu.name, "...")} - - ) - }} - /> - - - - - handleItemCreate(data, notify, closeModal, intl) - } - > - {(menuItemCreate, menuItemCreateOpts) => { - const handleSubmit = ( - data: MenuItemDialogFormData - ) => { - const variables: MenuItemCreateVariables = { - input: getMenuItemCreateInputData(id, data) - }; - - extractMutationErrors( - menuItemCreate({ variables }) - ); - }; - - return ( - - menuItemCreateOpts.data.menuItemCreate.errors, - [] - )} - pages={pages} - loading={ - categorySearch.result.loading || - collectionSearch.result.loading - } - confirmButtonState={menuItemCreateOpts.status} - disabled={menuItemCreateOpts.loading} - onClose={closeModal} - onSubmit={handleSubmit} - onQueryChange={handleQueryChange} - /> - ); - }} - - - handleItemUpdate(data, id, navigate, notify, intl) - } - > - {(menuItemUpdate, menuItemUpdateOpts) => { - const handleSubmit = ( - data: MenuItemDialogFormData - ) => { - const variables: MenuItemUpdateVariables = { - id: params.id, - input: getMenuItemInputData(data) - }; - - extractMutationErrors( - menuItemUpdate({ variables }) - ); - }; - - const menuItem = maybe(() => - getNode( - data.menu.items, - findNode(data.menu.items, params.id) - ) - ); - - const initialFormData: MenuItemDialogFormData = { - id: maybe(() => getItemId(menuItem)), - name: maybe(() => menuItem.name, "..."), - type: maybe( - () => getItemType(menuItem), - "category" - ) - }; - - return ( - - menuItemUpdateOpts.data.menuItemUpdate.errors, - [] - )} - pages={pages} - initial={initialFormData} - initialDisplayValue={getInitialDisplayValue( - menuItem - )} - loading={ - categorySearch.result.loading || - collectionSearch.result.loading - } - confirmButtonState={menuItemUpdateOpts.status} - disabled={menuItemUpdateOpts.loading} - onClose={closeModal} - onSubmit={handleSubmit} - onQueryChange={handleQueryChange} - /> - ); - }} - - - ); - }} - - )} - - ); - }} - + menuItemCreateOpts.data.menuItemCreate.errors, [])} + pages={pages} + loading={ + categorySearch.result.loading || collectionSearch.result.loading + } + confirmButtonState={menuItemCreateOpts.status} + disabled={menuItemCreateOpts.loading} + onClose={closeModal} + onSubmit={handleMenuItemCreate} + onQueryChange={handleQueryChange} + /> + menuItemUpdateOpts.data.menuItemUpdate.errors, [])} + pages={pages} + initial={initialMenuItemUpdateFormData} + initialDisplayValue={getInitialDisplayValue(menuItem)} + loading={ + categorySearch.result.loading || collectionSearch.result.loading + } + confirmButtonState={menuItemUpdateOpts.status} + disabled={menuItemUpdateOpts.loading} + onClose={closeModal} + onSubmit={handleMenuItemUpdate} + onQueryChange={handleQueryChange} + /> + ); }; MenuDetails.displayName = "MenuDetails"; diff --git a/src/navigation/views/MenuDetails/successHandlers.ts b/src/navigation/views/MenuDetails/successHandlers.ts index fe7f4383b..8832e0c30 100644 --- a/src/navigation/views/MenuDetails/successHandlers.ts +++ b/src/navigation/views/MenuDetails/successHandlers.ts @@ -1,16 +1,18 @@ +import { + MenuDeleteMutation, + MenuItemCreateMutation, + MenuItemUpdateMutation, + MenuUpdateMutation +} from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { IntlShape } from "react-intl"; import { UseNavigatorResult } from "../../../hooks/useNavigator"; import { UseNotifierResult } from "../../../hooks/useNotifier"; -import { MenuDelete } from "../../types/MenuDelete"; -import { MenuItemCreate } from "../../types/MenuItemCreate"; -import { MenuItemUpdate } from "../../types/MenuItemUpdate"; -import { MenuUpdate } from "../../types/MenuUpdate"; import { menuListUrl, menuUrl } from "../../urls"; export function handleItemCreate( - data: MenuItemCreate, + data: MenuItemCreateMutation, notify: UseNotifierResult, closeModal: () => void, intl: IntlShape @@ -25,7 +27,7 @@ export function handleItemCreate( } export function handleItemUpdate( - data: MenuItemUpdate, + data: MenuItemUpdateMutation, id: string, navigate: UseNavigatorResult, notify: UseNotifierResult, @@ -46,7 +48,7 @@ export function handleItemUpdate( } export function handleDelete( - data: MenuDelete, + data: MenuDeleteMutation, navigate: UseNavigatorResult, notify: UseNotifierResult, intl: IntlShape @@ -61,7 +63,7 @@ export function handleDelete( } export function handleUpdate( - data: MenuUpdate, + data: MenuUpdateMutation, notify: UseNotifierResult, refetch: () => void, intl: IntlShape diff --git a/src/navigation/views/MenuDetails/utils.ts b/src/navigation/views/MenuDetails/utils.ts index 1ad873304..9cf0873ec 100644 --- a/src/navigation/views/MenuDetails/utils.ts +++ b/src/navigation/views/MenuDetails/utils.ts @@ -1,12 +1,13 @@ import { MenuItemCreateInput, + MenuItemFragment, MenuItemInput, MenuItemMoveInput -} from "../../../types/globalTypes"; +} from "@saleor/graphql"; + import { MenuDetailsSubmitData } from "../../components/MenuDetailsPage"; import { MenuItemDialogFormData } from "../../components/MenuItemDialog"; import { unknownTypeError } from "../../components/MenuItems"; -import { MenuDetails_menu_items } from "../../types/MenuDetails"; export function getMenuItemInputData( data: MenuItemDialogFormData @@ -70,7 +71,7 @@ export function getMenuItemCreateInputData( return variables; } -export function getInitialDisplayValue(item: MenuDetails_menu_items): string { +export function getInitialDisplayValue(item: MenuItemFragment): string { if (!item) { return "..."; } diff --git a/src/navigation/views/MenuList/MenuList.tsx b/src/navigation/views/MenuList/MenuList.tsx index 4423cdc31..0b0c65043 100644 --- a/src/navigation/views/MenuList/MenuList.tsx +++ b/src/navigation/views/MenuList/MenuList.tsx @@ -1,6 +1,12 @@ import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { configurationMenuUrl } from "@saleor/configuration"; +import { + useMenuBulkDeleteMutation, + useMenuCreateMutation, + useMenuDeleteMutation, + useMenuListQuery +} from "@saleor/graphql"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useListSettings from "@saleor/hooks/useListSettings"; import useNavigator from "@saleor/hooks/useNavigator"; @@ -22,15 +28,6 @@ import { FormattedMessage, useIntl } from "react-intl"; import MenuCreateDialog from "../../components/MenuCreateDialog"; import MenuListPage from "../../components/MenuListPage"; -import { - MenuBulkDeleteMutation, - MenuCreateMutation, - MenuDeleteMutation -} from "../../mutations"; -import { useMenuListQuery } from "../../queries"; -import { MenuBulkDelete } from "../../types/MenuBulkDelete"; -import { MenuCreate } from "../../types/MenuCreate"; -import { MenuDelete } from "../../types/MenuDelete"; import { menuListUrl, MenuListUrlQueryParams, menuUrl } from "../../urls"; import { getSortQueryVariables } from "./sort"; @@ -82,192 +79,180 @@ const MenuList: React.FC = ({ params }) => { params ); - const handleCreate = (data: MenuCreate) => { - if (data.menuCreate.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage({ - defaultMessage: "Created menu", - id: "menuListCreatedMenu" - }) - }); - navigate(menuUrl(data.menuCreate.menu.id)); + const [menuCreate, menuCreateOpts] = useMenuCreateMutation({ + onCompleted: data => { + if (data.menuCreate.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage({ + defaultMessage: "Created menu", + id: "menuListCreatedMenu" + }) + }); + navigate(menuUrl(data.menuCreate.menu.id)); + } } - }; + }); - const handleBulkDelete = (data: MenuBulkDelete) => { - if (data.menuBulkDelete.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - closeModal(); - reset(); - refetch(); + const [menuDelete, menuDeleteOpts] = useMenuDeleteMutation({ + onCompleted: data => { + if (data.menuDelete.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage({ + defaultMessage: "Deleted menu", + id: "menuListDeletedMenu" + }) + }); + closeModal(); + refetch(); + } } - }; + }); - const handleDelete = (data: MenuDelete) => { - if (data.menuDelete.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage({ - defaultMessage: "Deleted menu", - id: "menuListDeletedMenu" - }) - }); - closeModal(); - refetch(); + const [menuBulkDelete, menuBulkDeleteOpts] = useMenuBulkDeleteMutation({ + onCompleted: data => { + if (data.menuBulkDelete.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + closeModal(); + reset(); + refetch(); + } } - }; + }); const handleSort = createSortHandler(navigate, menuListUrl, params); return ( - - {(menuCreate, menuCreateOpts) => ( - - {(menuDelete, menuDeleteOpts) => ( - - {(menuBulkDelete, menuBulkDeleteOpts) => ( - <> - - navigate( - menuListUrl({ - action: "add" - }) - ) - } - onBack={() => navigate(configurationMenuUrl)} - onDelete={id => - navigate( - menuListUrl({ - action: "remove", - id - }) - ) - } - onNextPage={loadNextPage} - onPreviousPage={loadPreviousPage} - onUpdateListSettings={updateListSettings} - onRowClick={id => () => navigate(menuUrl(id))} - onSort={handleSort} - pageInfo={pageInfo} - isChecked={isSelected} - selected={listElements.length} - sort={getSortParams(params)} - toggle={toggle} - toggleAll={toggleAll} - toolbar={ - - } - /> - - menuCreate({ - variables: { input: formData } - }) - } - /> - - menuDelete({ - variables: { - id: params.id - } - }) - } - variant="delete" - title={intl.formatMessage({ - defaultMessage: "Delete Menu", - description: "dialog header", - id: "menuListDeleteMenuHeader" - })} - > - - - - - params.ids.length > 0) - } - onClose={closeModal} - confirmButtonState={menuBulkDeleteOpts.status} - onConfirm={() => - menuBulkDelete({ - variables: { - ids: params.ids - } - }) - } - variant="delete" - title={intl.formatMessage({ - defaultMessage: "Delete Menus", - description: "dialog header", - id: "menuListDeleteMenusHeader" - })} - > - - params.ids.length.toString(), - "..." - ), - displayQuantity: ( - - {maybe(() => params.ids.length.toString(), "...")} - - ) - }} - /> - - - - )} - - )} - - )} - + <> + + navigate( + menuListUrl({ + action: "add" + }) + ) + } + onBack={() => navigate(configurationMenuUrl)} + onDelete={id => + navigate( + menuListUrl({ + action: "remove", + id + }) + ) + } + onNextPage={loadNextPage} + onPreviousPage={loadPreviousPage} + onUpdateListSettings={updateListSettings} + onRowClick={id => () => navigate(menuUrl(id))} + onSort={handleSort} + pageInfo={pageInfo} + isChecked={isSelected} + selected={listElements.length} + sort={getSortParams(params)} + toggle={toggle} + toggleAll={toggleAll} + toolbar={ + + } + /> + + menuCreate({ + variables: { input: formData } + }) + } + /> + + menuDelete({ + variables: { + id: params.id + } + }) + } + variant="delete" + title={intl.formatMessage({ + defaultMessage: "Delete Menu", + description: "dialog header", + id: "menuListDeleteMenuHeader" + })} + > + + + + + params.ids.length > 0) + } + onClose={closeModal} + confirmButtonState={menuBulkDeleteOpts.status} + onConfirm={() => + menuBulkDelete({ + variables: { + ids: params.ids + } + }) + } + variant="delete" + title={intl.formatMessage({ + defaultMessage: "Delete Menus", + description: "dialog header", + id: "menuListDeleteMenusHeader" + })} + > + + params.ids.length.toString(), "..."), + displayQuantity: ( + + {maybe(() => params.ids.length.toString(), "...")} + + ) + }} + /> + + + ); }; export default MenuList; diff --git a/src/navigation/views/MenuList/sort.ts b/src/navigation/views/MenuList/sort.ts index 4a9f3260a..b9eef983e 100644 --- a/src/navigation/views/MenuList/sort.ts +++ b/src/navigation/views/MenuList/sort.ts @@ -1,5 +1,5 @@ +import { MenuSortField } from "@saleor/graphql"; import { MenuListUrlSortField } from "@saleor/navigation/urls"; -import { MenuSortField } from "@saleor/types/globalTypes"; import { createGetSortQueryVariables } from "@saleor/utils/sort"; export function getSortQueryField(sort: MenuListUrlSortField): MenuSortField { diff --git a/src/orders/components/OrderAddressFields/OrderAddressFields.tsx b/src/orders/components/OrderAddressFields/OrderAddressFields.tsx index ffe8f2776..3810b9695 100644 --- a/src/orders/components/OrderAddressFields/OrderAddressFields.tsx +++ b/src/orders/components/OrderAddressFields/OrderAddressFields.tsx @@ -1,13 +1,12 @@ -import { CustomerAddresses_user } from "@saleor/customers/types/CustomerAddresses"; -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; +import { + AddressFragment, + CustomerAddressesQuery, + OrderDetailsQuery, + OrderErrorFragment +} from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { transformAddressToForm } from "@saleor/misc"; -import { - OrderDetails_order_billingAddress, - OrderDetails_order_shippingAddress, - OrderDetails_shop_countries -} from "@saleor/orders/types/OrderDetails"; import React from "react"; import OrderCustomerAddressesEditDialog, { @@ -22,14 +21,14 @@ interface OrderAddressFieldsProps { action: string; isDraft: boolean; customerAddressesLoading: boolean; - customer: CustomerAddresses_user; - countries: OrderDetails_shop_countries[]; + customer: CustomerAddressesQuery["user"]; + countries: OrderDetailsQuery["shop"]["countries"]; onClose: () => void; onConfirm: (data: OrderCustomerAddressesEditDialogOutput) => SubmitPromise; confirmButtonState: ConfirmButtonTransitionState; errors: OrderErrorFragment[]; - orderShippingAddress: OrderDetails_order_shippingAddress; - orderBillingAddress: OrderDetails_order_billingAddress; + orderShippingAddress: AddressFragment; + orderBillingAddress: AddressFragment; } const OrderAddressFields: React.FC = ({ diff --git a/src/orders/components/OrderCancelDialog/OrderCancelDialog.tsx b/src/orders/components/OrderCancelDialog/OrderCancelDialog.tsx index f85e2b154..94e13389e 100644 --- a/src/orders/components/OrderCancelDialog/OrderCancelDialog.tsx +++ b/src/orders/components/OrderCancelDialog/OrderCancelDialog.tsx @@ -8,7 +8,7 @@ import { import BackButton from "@saleor/components/BackButton"; import ConfirmButton from "@saleor/components/ConfirmButton"; import FormSpacer from "@saleor/components/FormSpacer"; -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; +import { OrderErrorFragment } from "@saleor/graphql"; import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import { buttonMessages } from "@saleor/intl"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; diff --git a/src/orders/components/OrderCustomer/OrderCustomer.tsx b/src/orders/components/OrderCustomer/OrderCustomer.tsx index 260d94ce6..3af9908e3 100644 --- a/src/orders/components/OrderCustomer/OrderCustomer.tsx +++ b/src/orders/components/OrderCustomer/OrderCustomer.tsx @@ -8,20 +8,22 @@ import Link from "@saleor/components/Link"; import RequirePermissions from "@saleor/components/RequirePermissions"; import SingleAutocompleteSelectField from "@saleor/components/SingleAutocompleteSelectField"; import Skeleton from "@saleor/components/Skeleton"; +import { + OrderDetailsFragment, + PermissionEnum, + SearchCustomersQuery, + WarehouseClickAndCollectOptionEnum +} from "@saleor/graphql"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; import { buttonMessages } from "@saleor/intl"; import { Button, makeStyles } from "@saleor/macaw-ui"; -import { SearchCustomers_search_edges_node } from "@saleor/searches/types/SearchCustomers"; -import { FetchMoreProps } from "@saleor/types"; -import { PermissionEnum } from "@saleor/types/globalTypes"; +import { FetchMoreProps, RelayToFlat } from "@saleor/types"; import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { customerUrl } from "../../../customers/urls"; import { maybe } from "../../../misc"; -import { OrderDetails_order } from "../../types/OrderDetails"; -import { WarehouseClickAndCollectOptionEnum } from "./../../../types/globalTypes"; import messages from "./messages"; const useStyles = makeStyles( @@ -56,8 +58,8 @@ export interface CustomerEditData { } export interface OrderCustomerProps extends Partial { - order: OrderDetails_order; - users?: SearchCustomers_search_edges_node[]; + order: OrderDetailsFragment; + users?: RelayToFlat; loading?: boolean; canEditAddresses: boolean; canEditCustomer: boolean; diff --git a/src/orders/components/OrderCustomerAddressesEditDialog/OrderCustomerAddressEdit.tsx b/src/orders/components/OrderCustomerAddressesEditDialog/OrderCustomerAddressEdit.tsx index 954548c46..ac0e18f46 100644 --- a/src/orders/components/OrderCustomerAddressesEditDialog/OrderCustomerAddressEdit.tsx +++ b/src/orders/components/OrderCustomerAddressesEditDialog/OrderCustomerAddressEdit.tsx @@ -6,9 +6,11 @@ import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompl import Skeleton from "@saleor/components/Skeleton"; import CustomerAddressChoiceCard from "@saleor/customers/components/CustomerAddressChoiceCard"; import { AddressTypeInput } from "@saleor/customers/types"; -import { CustomerAddresses_user_addresses } from "@saleor/customers/types/CustomerAddresses"; -import { AccountErrorFragment } from "@saleor/fragments/types/AccountErrorFragment"; -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; +import { + AccountErrorFragment, + AddressFragment, + OrderErrorFragment +} from "@saleor/graphql"; import { FormChange } from "@saleor/hooks/useForm"; import React from "react"; import { useIntl } from "react-intl"; @@ -20,7 +22,7 @@ import { useStyles } from "./styles"; export interface OrderCustomerAddressEditProps { loading: boolean; - customerAddresses: CustomerAddresses_user_addresses[]; + customerAddresses: AddressFragment[]; countryChoices: SingleAutocompleteChoiceType[]; addressInputOption: AddressInputOptionEnum; addressInputName: string; diff --git a/src/orders/components/OrderCustomerAddressesEditDialog/OrderCustomerAddressesEditDialog.tsx b/src/orders/components/OrderCustomerAddressesEditDialog/OrderCustomerAddressesEditDialog.tsx index 239be6764..e82920172 100644 --- a/src/orders/components/OrderCustomerAddressesEditDialog/OrderCustomerAddressesEditDialog.tsx +++ b/src/orders/components/OrderCustomerAddressesEditDialog/OrderCustomerAddressesEditDialog.tsx @@ -10,25 +10,24 @@ import VerticalSpacer from "@saleor/apps/components/VerticalSpacer"; import Checkbox from "@saleor/components/Checkbox"; import ConfirmButton from "@saleor/components/ConfirmButton"; import FormSpacer from "@saleor/components/FormSpacer"; -import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo"; import { AddressTypeInput } from "@saleor/customers/types"; import { - CustomerAddresses_user_addresses, - CustomerAddresses_user_defaultBillingAddress, - CustomerAddresses_user_defaultShippingAddress -} from "@saleor/customers/types/CustomerAddresses"; -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; + AddressFragment, + AddressInput, + AddressTypeEnum, + CountryWithCodeFragment, + Node, + OrderErrorFragment +} from "@saleor/graphql"; import useAddressValidation from "@saleor/hooks/useAddressValidation"; import { SubmitPromise } from "@saleor/hooks/useForm"; import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import { buttonMessages } from "@saleor/intl"; import { ConfirmButtonTransitionState, DialogHeader } from "@saleor/macaw-ui"; import { transformAddressToAddressInput } from "@saleor/misc"; -import { AddressInput, AddressTypeEnum } from "@saleor/types/globalTypes"; import { mapCountriesToChoices } from "@saleor/utils/maps"; import React from "react"; -import { MessageDescriptor } from "react-intl"; -import { FormattedMessage, useIntl } from "react-intl"; +import { FormattedMessage, MessageDescriptor, useIntl } from "react-intl"; import { getById } from "../OrderReturnPage/utils"; import OrderCustomerAddressesEditForm, { @@ -54,10 +53,10 @@ export interface OrderCustomerAddressesEditDialogProps { errors: OrderErrorFragment[]; orderShippingAddress?: AddressTypeInput; orderBillingAddress?: AddressTypeInput; - countries?: ShopInfo_shop_countries[]; - customerAddresses?: CustomerAddresses_user_addresses[]; - defaultShippingAddress?: CustomerAddresses_user_defaultShippingAddress; - defaultBillingAddress?: CustomerAddresses_user_defaultBillingAddress; + countries?: CountryWithCodeFragment[]; + customerAddresses?: AddressFragment[]; + defaultShippingAddress?: Node; + defaultBillingAddress?: Node; onClose(); onConfirm( data: Partial diff --git a/src/orders/components/OrderCustomerAddressesEditDialog/OrderCustomerAddressesSearch.tsx b/src/orders/components/OrderCustomerAddressesEditDialog/OrderCustomerAddressesSearch.tsx index 16036f166..f618a1943 100644 --- a/src/orders/components/OrderCustomerAddressesEditDialog/OrderCustomerAddressesSearch.tsx +++ b/src/orders/components/OrderCustomerAddressesEditDialog/OrderCustomerAddressesSearch.tsx @@ -9,7 +9,7 @@ import { import VerticalSpacer from "@saleor/apps/components/VerticalSpacer"; import { ConfirmButton } from "@saleor/components/ConfirmButton"; import CustomerAddressChoiceCard from "@saleor/customers/components/CustomerAddressChoiceCard"; -import { CustomerAddresses_user_addresses } from "@saleor/customers/types/CustomerAddresses"; +import { AddressFragment, AddressTypeEnum } from "@saleor/graphql"; import { FormChange } from "@saleor/hooks/useForm"; import { buttonMessages } from "@saleor/intl"; import { @@ -17,7 +17,6 @@ import { ConfirmButtonTransitionState, SearchIcon } from "@saleor/macaw-ui"; -import { AddressTypeEnum } from "@saleor/types/globalTypes"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -33,13 +32,9 @@ export interface OrderCustomerAddressesSearchProps { openFromCustomerChange: boolean; transitionState: ConfirmButtonTransitionState; selectedCustomerAddressId: string; - customerAddresses: CustomerAddresses_user_addresses[]; - onChangeCustomerShippingAddress: ( - customerAddress: CustomerAddresses_user_addresses - ) => void; - onChangeCustomerBillingAddress: ( - customerAddress: CustomerAddresses_user_addresses - ) => void; + customerAddresses: AddressFragment[]; + onChangeCustomerShippingAddress: (customerAddress: AddressFragment) => void; + onChangeCustomerBillingAddress: (customerAddress: AddressFragment) => void; exitSearch(); } diff --git a/src/orders/components/OrderCustomerAddressesEditDialog/form.tsx b/src/orders/components/OrderCustomerAddressesEditDialog/form.tsx index c8c0c1ec3..83dcea612 100644 --- a/src/orders/components/OrderCustomerAddressesEditDialog/form.tsx +++ b/src/orders/components/OrderCustomerAddressesEditDialog/form.tsx @@ -1,12 +1,11 @@ import { useExitFormDialog } from "@saleor/components/Form/useExitFormDialog"; -import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo"; import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; import { AddressTypeInput } from "@saleor/customers/types"; import { - CustomerAddresses_user_addresses, - CustomerAddresses_user_defaultBillingAddress, - CustomerAddresses_user_defaultShippingAddress -} from "@saleor/customers/types/CustomerAddresses"; + AddressFragment, + CountryWithCodeFragment, + Node +} from "@saleor/graphql"; import useForm, { CommonUseFormResultWithHandlers, FormChange, @@ -25,8 +24,8 @@ export interface OrderCustomerAddressesEditFormData { cloneAddress: boolean; shippingAddressInputOption: AddressInputOptionEnum; billingAddressInputOption: AddressInputOptionEnum; - customerShippingAddress: CustomerAddresses_user_defaultShippingAddress; - customerBillingAddress: CustomerAddresses_user_defaultBillingAddress; + customerShippingAddress: Node; + customerBillingAddress: Node; shippingAddress: AddressTypeInput; billingAddress: AddressTypeInput; } @@ -43,7 +42,7 @@ export interface OrderCustomerAddressesEditHandlers { addressType: "shippingAddress" | "billingAddress" ) => void; changeCustomerAddress: ( - customerAddress: CustomerAddresses_user_addresses, + customerAddress: AddressFragment, addressType: "customerShippingAddress" | "customerBillingAddress" ) => void; selectShippingCountry: FormChange; @@ -60,9 +59,9 @@ interface UseOrderCustomerAddressesEditFormResult interface UseOrderCustomerAddressesEditFormOpts { countryChoices: SingleAutocompleteChoiceType[]; - countries: ShopInfo_shop_countries[]; - defaultShippingAddress: CustomerAddresses_user_defaultShippingAddress; - defaultBillingAddress: CustomerAddresses_user_defaultBillingAddress; + countries: CountryWithCodeFragment[]; + defaultShippingAddress: Node; + defaultBillingAddress: Node; defaultCloneAddress: boolean; } @@ -137,7 +136,7 @@ function useOrderCustomerAddressesEditForm( } }); const handleCustomerAddressChange = ( - customerAddress: CustomerAddresses_user_addresses, + customerAddress: AddressFragment, addressType: "customerShippingAddress" | "customerBillingAddress" ) => change({ diff --git a/src/orders/components/OrderCustomerAddressesEditDialog/types.ts b/src/orders/components/OrderCustomerAddressesEditDialog/types.ts index 038bbdc5b..025774e1f 100644 --- a/src/orders/components/OrderCustomerAddressesEditDialog/types.ts +++ b/src/orders/components/OrderCustomerAddressesEditDialog/types.ts @@ -1,4 +1,4 @@ -import { AddressInput, AddressTypeEnum } from "@saleor/types/globalTypes"; +import { AddressInput, AddressTypeEnum } from "@saleor/graphql"; export interface OrderCustomerSearchAddressState { open: boolean; diff --git a/src/orders/components/OrderCustomerAddressesEditDialog/utils.ts b/src/orders/components/OrderCustomerAddressesEditDialog/utils.ts index 5417ce8f3..ad46f0c25 100644 --- a/src/orders/components/OrderCustomerAddressesEditDialog/utils.ts +++ b/src/orders/components/OrderCustomerAddressesEditDialog/utils.ts @@ -1,13 +1,13 @@ import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; import { - CustomerAddresses_user_addresses, - CustomerAddresses_user_defaultShippingAddress -} from "@saleor/customers/types/CustomerAddresses"; -import { AccountErrorFragment } from "@saleor/fragments/types/AccountErrorFragment"; -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; + AccountErrorFragment, + AddressFragment, + AddressTypeEnum, + Node, + OrderErrorFragment +} from "@saleor/graphql"; import { FormChange } from "@saleor/hooks/useForm"; import { flatten } from "@saleor/misc"; -import { AddressTypeEnum } from "@saleor/types/globalTypes"; import { getById } from "../OrderReturnPage/utils"; import { @@ -21,12 +21,10 @@ interface AddressEditCommonProps { showCard: boolean; loading: boolean; countryChoices: SingleAutocompleteChoiceType[]; - customerAddresses: CustomerAddresses_user_addresses[]; + customerAddresses: AddressFragment[]; } -export const stringifyAddress = ( - address: Partial -): string => { +export const stringifyAddress = (address: Partial): string => { const { id, ...addressWithoutId } = address; return Object.values(flatten(addressWithoutId)).join(" "); }; @@ -34,15 +32,13 @@ export const stringifyAddress = ( export const parseQuery = (query: string) => query.replace(/([.?*+\-=:^$\\[\]<>(){}|])/g, "\\$&"); -export function validateDefaultAddress< - T extends CustomerAddresses_user_defaultShippingAddress ->( - defaultAddress: CustomerAddresses_user_defaultShippingAddress, +export function validateDefaultAddress( + defaultAddress: Node, customerAddresses: T[] -): CustomerAddresses_user_defaultShippingAddress { +): Node { const fallbackAddress = { id: customerAddresses[0]?.id - } as CustomerAddresses_user_defaultShippingAddress; + } as AddressFragment; if (!defaultAddress) { return fallbackAddress; } diff --git a/src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx b/src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx index 9cc2d0b5f..097e51a8e 100644 --- a/src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx +++ b/src/orders/components/OrderDetailsPage/OrderDetailsPage.tsx @@ -9,11 +9,18 @@ import Metadata, { MetadataFormData } from "@saleor/components/Metadata"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; import Skeleton from "@saleor/components/Skeleton"; +import { + OrderDetailsFragment, + OrderDetailsQuery, + OrderStatus +} from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; -import { makeStyles } from "@saleor/macaw-ui"; +import { + Backlink, + ConfirmButtonTransitionState, + makeStyles +} from "@saleor/macaw-ui"; import OrderChannelSectionCard from "@saleor/orders/components/OrderChannelSectionCard"; import { mapMetadataItemToInput } from "@saleor/utils/maps"; import useMetadataChangeTrigger from "@saleor/utils/metadata/useMetadataChangeTrigger"; @@ -21,11 +28,6 @@ import React from "react"; import { defineMessages, useIntl } from "react-intl"; import { getMutationErrors, maybe } from "../../../misc"; -import { OrderStatus } from "../../../types/globalTypes"; -import { - OrderDetails_order, - OrderDetails_shop -} from "../../types/OrderDetails"; import OrderCustomer from "../OrderCustomer"; import OrderCustomerNote from "../OrderCustomerNote"; import OrderDraftDetails from "../OrderDraftDetails/OrderDraftDetails"; @@ -55,8 +57,8 @@ const useStyles = makeStyles( ); export interface OrderDetailsPageProps { - order: OrderDetails_order; - shop: OrderDetails_shop; + order: OrderDetailsFragment; + shop: OrderDetailsQuery["shop"]; shippingMethods?: Array<{ id: string; name: string; diff --git a/src/orders/components/OrderDetailsPage/Title.tsx b/src/orders/components/OrderDetailsPage/Title.tsx index 377a66abd..ce6793e0d 100644 --- a/src/orders/components/OrderDetailsPage/Title.tsx +++ b/src/orders/components/OrderDetailsPage/Title.tsx @@ -1,11 +1,11 @@ +import { OrderDetailsFragment } from "@saleor/graphql"; import { makeStyles, Pill } from "@saleor/macaw-ui"; import { transformOrderStatus } from "@saleor/misc"; -import { OrderDetails_order } from "@saleor/orders/types/OrderDetails"; import React from "react"; import { useIntl } from "react-intl"; export interface TitleProps { - order?: OrderDetails_order; + order?: OrderDetailsFragment; } const useStyles = makeStyles( diff --git a/src/orders/components/OrderDetailsPage/utils.ts b/src/orders/components/OrderDetailsPage/utils.ts index a5af67ee3..5fbaafc75 100644 --- a/src/orders/components/OrderDetailsPage/utils.ts +++ b/src/orders/components/OrderDetailsPage/utils.ts @@ -1,4 +1,4 @@ -import { OrderDetails_order } from "@saleor/orders/types/OrderDetails"; +import { OrderDetailsFragment } from "@saleor/graphql"; import { getFulfilledFulfillemnts, @@ -6,7 +6,7 @@ import { getWaitingFulfillments } from "../OrderReturnPage/utils"; -export const hasAnyItemsReplaceable = (order?: OrderDetails_order) => { +export const hasAnyItemsReplaceable = (order?: OrderDetailsFragment) => { if (!order) { return false; } diff --git a/src/orders/components/OrderDiscountCommonModal/OrderDiscountCommonModal.stories.tsx b/src/orders/components/OrderDiscountCommonModal/OrderDiscountCommonModal.stories.tsx index a1d0fe451..3cf77c703 100644 --- a/src/orders/components/OrderDiscountCommonModal/OrderDiscountCommonModal.stories.tsx +++ b/src/orders/components/OrderDiscountCommonModal/OrderDiscountCommonModal.stories.tsx @@ -1,5 +1,5 @@ +import { DiscountValueTypeEnum } from "@saleor/graphql"; import Decorator from "@saleor/storybook/Decorator"; -import { DiscountValueTypeEnum } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/orders/components/OrderDiscountCommonModal/OrderDiscountCommonModal.tsx b/src/orders/components/OrderDiscountCommonModal/OrderDiscountCommonModal.tsx index 1fd0c1510..548cf2b2e 100644 --- a/src/orders/components/OrderDiscountCommonModal/OrderDiscountCommonModal.tsx +++ b/src/orders/components/OrderDiscountCommonModal/OrderDiscountCommonModal.tsx @@ -11,11 +11,10 @@ import CardSpacer from "@saleor/components/CardSpacer"; import ConfirmButton from "@saleor/components/ConfirmButton"; import PriceField from "@saleor/components/PriceField"; import RadioGroupField from "@saleor/components/RadioGroupField"; -import { Money } from "@saleor/fragments/types/Money"; +import { DiscountValueTypeEnum, MoneyFragment } from "@saleor/graphql"; import { useUpdateEffect } from "@saleor/hooks/useUpdateEffect"; import { buttonMessages } from "@saleor/intl"; import { ConfirmButtonTransitionState, makeStyles } from "@saleor/macaw-ui"; -import { DiscountValueTypeEnum } from "@saleor/types/globalTypes"; import React, { ChangeEvent, MutableRefObject, @@ -23,8 +22,7 @@ import React, { useRef, useState } from "react"; -import { useIntl } from "react-intl"; -import { defineMessages } from "react-intl"; +import { defineMessages, useIntl } from "react-intl"; import ModalTitle from "./ModalTitle"; import { @@ -105,7 +103,7 @@ const messages = defineMessages({ }); export interface OrderDiscountCommonModalProps { - maxPrice: Money; + maxPrice: MoneyFragment; onConfirm: (discount: OrderDiscountCommonInput) => void; onClose: () => void; onRemove: () => void; diff --git a/src/orders/components/OrderDiscountCommonModal/types.ts b/src/orders/components/OrderDiscountCommonModal/types.ts index 98872c82a..f1da98b57 100644 --- a/src/orders/components/OrderDiscountCommonModal/types.ts +++ b/src/orders/components/OrderDiscountCommonModal/types.ts @@ -1,4 +1,4 @@ -import { DiscountValueTypeEnum } from "@saleor/types/globalTypes"; +import { DiscountValueTypeEnum } from "@saleor/graphql"; export const ORDER_DISCOUNT = "add-order-discount"; export const ORDER_LINE_DISCOUNT = "add-order-line-discount"; diff --git a/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.tsx b/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.tsx index 70cb94f71..a55023b4f 100644 --- a/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.tsx +++ b/src/orders/components/OrderDraftCancelDialog/OrderDraftCancelDialog.tsx @@ -1,7 +1,7 @@ import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import FormSpacer from "@saleor/components/FormSpacer"; -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; +import { OrderErrorFragment } from "@saleor/graphql"; import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import getOrderErrorMessage from "@saleor/utils/errors/order"; diff --git a/src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx b/src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx index bc8df6305..823122df5 100644 --- a/src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx +++ b/src/orders/components/OrderDraftDetails/OrderDraftDetails.tsx @@ -1,5 +1,6 @@ import { Card, CardContent } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; +import { OrderDetailsFragment } from "@saleor/graphql"; import { Button } from "@saleor/macaw-ui"; import { OrderDiscountContext, @@ -9,14 +10,13 @@ import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { maybe } from "../../../misc"; -import { OrderDetails_order } from "../../types/OrderDetails"; import OrderDraftDetailsProducts, { FormData as OrderDraftDetailsProductsFormData } from "../OrderDraftDetailsProducts"; import OrderDraftDetailsSummary from "../OrderDraftDetailsSummary"; interface OrderDraftDetailsProps { - order: OrderDetails_order; + order: OrderDetailsFragment; onOrderLineAdd: () => void; onOrderLineChange: ( id: string, diff --git a/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx b/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx index 496d21dc7..e6701b3e5 100644 --- a/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx +++ b/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx @@ -1,6 +1,7 @@ import { TableBody, TableCell, TableHead, TableRow } from "@material-ui/core"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import { AVATAR_MARGIN } from "@saleor/components/TableCellAvatar/Avatar"; +import { OrderLineFragment } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; import { OrderLineDiscountConsumer, @@ -10,7 +11,6 @@ import React from "react"; import { FormattedMessage } from "react-intl"; import { maybe, renderCollection } from "../../../misc"; -import { OrderDetails_order_lines } from "../../types/OrderDetails"; import TableLine from "./TableLine"; export interface FormData { @@ -58,7 +58,7 @@ const useStyles = makeStyles( ); interface OrderDraftDetailsProductsProps { - lines: OrderDetails_order_lines[]; + lines: OrderLineFragment[]; onOrderLineChange: (id: string, data: FormData) => void; onOrderLineRemove: (id: string) => void; } diff --git a/src/orders/components/OrderDraftDetailsProducts/TableLine.tsx b/src/orders/components/OrderDraftDetailsProducts/TableLine.tsx index 7c8d3e1b7..3db681551 100644 --- a/src/orders/components/OrderDraftDetailsProducts/TableLine.tsx +++ b/src/orders/components/OrderDraftDetailsProducts/TableLine.tsx @@ -3,12 +3,12 @@ import Link from "@saleor/components/Link"; import Money from "@saleor/components/Money"; import TableCellAvatar from "@saleor/components/TableCellAvatar"; import { AVATAR_MARGIN } from "@saleor/components/TableCellAvatar/Avatar"; +import { OrderLineFragment } from "@saleor/graphql"; import { DeleteIcon, IconButton, makeStyles } from "@saleor/macaw-ui"; import { OrderLineDiscountContextConsumerProps } from "@saleor/products/components/OrderDiscountProviders/OrderLineDiscountProvider"; import React, { useRef } from "react"; import { maybe } from "../../../misc"; -import { OrderDetails_order_lines } from "../../types/OrderDetails"; import OrderDiscountCommonModal from "../OrderDiscountCommonModal"; import { ORDER_LINE_DISCOUNT } from "../OrderDiscountCommonModal/types"; import TableLineForm, { FormData } from "./TableLineForm"; @@ -51,7 +51,7 @@ const useStyles = makeStyles( ); interface TableLineProps extends OrderLineDiscountContextConsumerProps { - line: OrderDetails_order_lines; + line: OrderLineFragment; onOrderLineChange: (id: string, data: FormData) => void; onOrderLineRemove: (id: string) => void; } diff --git a/src/orders/components/OrderDraftDetailsProducts/TableLineForm.tsx b/src/orders/components/OrderDraftDetailsProducts/TableLineForm.tsx index 5c2b7769e..cda415e0f 100644 --- a/src/orders/components/OrderDraftDetailsProducts/TableLineForm.tsx +++ b/src/orders/components/OrderDraftDetailsProducts/TableLineForm.tsx @@ -1,8 +1,8 @@ import { TextField } from "@material-ui/core"; import DebounceForm from "@saleor/components/DebounceForm"; import Form from "@saleor/components/Form"; +import { OrderLineFragment } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; -import { OrderDetails_order_lines } from "@saleor/orders/types/OrderDetails"; import createNonNegativeValueChangeHandler from "@saleor/utils/handlers/nonNegativeValueChangeHandler"; import React from "react"; @@ -24,7 +24,7 @@ export interface FormData { } interface TableLineFormProps { - line: OrderDetails_order_lines; + line: OrderLineFragment; onOrderLineChange: (id: string, data: FormData) => void; } diff --git a/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx b/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx index cbefeefff..79e0da67d 100644 --- a/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx +++ b/src/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx @@ -2,14 +2,13 @@ import { Typography } from "@material-ui/core"; import HorizontalSpacer from "@saleor/apps/components/HorizontalSpacer"; import Link from "@saleor/components/Link"; import Money from "@saleor/components/Money"; +import { DiscountValueTypeEnum, OrderDetailsFragment } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; import { OrderDiscountContextConsumerProps } from "@saleor/products/components/OrderDiscountProviders/OrderDiscountProvider"; import { OrderDiscountData } from "@saleor/products/components/OrderDiscountProviders/types"; -import { DiscountValueTypeEnum } from "@saleor/types/globalTypes"; import React, { useRef } from "react"; import { useIntl } from "react-intl"; -import { OrderDetails_order } from "../../types/OrderDetails"; import OrderDiscountCommonModal from "../OrderDiscountCommonModal"; import { ORDER_DISCOUNT } from "../OrderDiscountCommonModal/types"; import { messages } from "./messages"; @@ -51,7 +50,7 @@ const PRICE_PLACEHOLDER = "---"; interface OrderDraftDetailsSummaryProps extends OrderDiscountContextConsumerProps { disabled?: boolean; - order: OrderDetails_order; + order: OrderDetailsFragment; onShippingMethodEdit: () => void; } diff --git a/src/orders/components/OrderDraftList/OrderDraftList.tsx b/src/orders/components/OrderDraftList/OrderDraftList.tsx index 7e5915d90..f4bc9247a 100644 --- a/src/orders/components/OrderDraftList/OrderDraftList.tsx +++ b/src/orders/components/OrderDraftList/OrderDraftList.tsx @@ -7,6 +7,7 @@ import Skeleton from "@saleor/components/Skeleton"; import TableCellHeader from "@saleor/components/TableCellHeader"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; +import { OrderDraftListQuery } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; import { maybe, @@ -15,13 +16,11 @@ import { transformPaymentStatus } from "@saleor/misc"; import { OrderDraftListUrlSortField } from "@saleor/orders/urls"; -import { ListActions, ListProps, SortPage } from "@saleor/types"; +import { ListActions, ListProps, RelayToFlat, SortPage } from "@saleor/types"; import { getArrowDirection } from "@saleor/utils/sort"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { OrderDraftList_draftOrders_edges_node } from "../../types/OrderDraftList"; - const useStyles = makeStyles( theme => ({ [theme.breakpoints.up("lg")]: { @@ -55,7 +54,7 @@ interface OrderDraftListProps extends ListProps, ListActions, SortPage { - orders: OrderDraftList_draftOrders_edges_node[]; + orders: RelayToFlat; } export const OrderDraftList: React.FC = props => { diff --git a/src/orders/components/OrderDraftListPage/OrderDraftListPage.tsx b/src/orders/components/OrderDraftListPage/OrderDraftListPage.tsx index e71a01432..71ae7bf31 100644 --- a/src/orders/components/OrderDraftListPage/OrderDraftListPage.tsx +++ b/src/orders/components/OrderDraftListPage/OrderDraftListPage.tsx @@ -2,7 +2,7 @@ import { Card } from "@material-ui/core"; import Container from "@saleor/components/Container"; import FilterBar from "@saleor/components/FilterBar"; import PageHeader from "@saleor/components/PageHeader"; -import { RefreshLimits_shop_limits } from "@saleor/components/Shop/types/RefreshLimits"; +import { OrderDraftListQuery, RefreshLimitsQuery } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { Button } from "@saleor/macaw-ui"; import { OrderDraftListUrlSortField } from "@saleor/orders/urls"; @@ -10,6 +10,7 @@ import { FilterPageProps, ListActions, PageListProps, + RelayToFlat, SortPage, TabPageProps } from "@saleor/types"; @@ -17,7 +18,6 @@ import { hasLimits, isLimitReached } from "@saleor/utils/limits"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { OrderDraftList_draftOrders_edges_node } from "../../types/OrderDraftList"; import OrderDraftList from "../OrderDraftList"; import OrderLimitReached from "../OrderLimitReached"; import { @@ -32,8 +32,8 @@ export interface OrderDraftListPageProps FilterPageProps, SortPage, TabPageProps { - limits: RefreshLimits_shop_limits; - orders: OrderDraftList_draftOrders_edges_node[]; + limits: RefreshLimitsQuery["shop"]["limits"]; + orders: RelayToFlat; } const OrderDraftListPage: React.FC = ({ diff --git a/src/orders/components/OrderDraftPage/OrderDraftPage.tsx b/src/orders/components/OrderDraftPage/OrderDraftPage.tsx index 91aad7a22..0215f0b83 100644 --- a/src/orders/components/OrderDraftPage/OrderDraftPage.tsx +++ b/src/orders/components/OrderDraftPage/OrderDraftPage.tsx @@ -7,18 +7,19 @@ import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; import Skeleton from "@saleor/components/Skeleton"; +import { OrderDetailsFragment, SearchCustomersQuery } from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; -import { makeStyles } from "@saleor/macaw-ui"; +import { + Backlink, + ConfirmButtonTransitionState, + makeStyles +} from "@saleor/macaw-ui"; import DraftOrderChannelSectionCard from "@saleor/orders/components/DraftOrderChannelSectionCard"; -import { SearchCustomers_search_edges_node } from "@saleor/searches/types/SearchCustomers"; -import { FetchMoreProps } from "@saleor/types"; +import { FetchMoreProps, RelayToFlat } from "@saleor/types"; import React from "react"; import { useIntl } from "react-intl"; -import { OrderDetails_order } from "../../types/OrderDetails"; import OrderCustomer, { CustomerEditData } from "../OrderCustomer"; import OrderDraftDetails from "../OrderDraftDetails/OrderDraftDetails"; import { FormData as OrderDraftDetailsProductsFormData } from "../OrderDraftDetailsProducts"; @@ -39,8 +40,8 @@ const useStyles = makeStyles( export interface OrderDraftPageProps extends FetchMoreProps { disabled: boolean; - order: OrderDetails_order; - users: SearchCustomers_search_edges_node[]; + order: OrderDetailsFragment; + users: RelayToFlat; usersLoading: boolean; saveButtonBarState: ConfirmButtonTransitionState; fetchUsers: (query: string) => void; diff --git a/src/orders/components/OrderFulfillPage/OrderFulfillPage.stories.tsx b/src/orders/components/OrderFulfillPage/OrderFulfillPage.stories.tsx index a2f184bdd..36bd9e5dc 100644 --- a/src/orders/components/OrderFulfillPage/OrderFulfillPage.stories.tsx +++ b/src/orders/components/OrderFulfillPage/OrderFulfillPage.stories.tsx @@ -1,5 +1,5 @@ +import { OrderErrorCode } from "@saleor/graphql"; import Decorator from "@saleor/storybook/Decorator"; -import { OrderErrorCode } from "@saleor/types/globalTypes"; import { warehouseList } from "@saleor/warehouses/fixtures"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx b/src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx index ffc0fd53c..6294885d3 100644 --- a/src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx +++ b/src/orders/components/OrderFulfillPage/OrderFulfillPage.tsx @@ -18,23 +18,26 @@ import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Savebar from "@saleor/components/Savebar"; import Skeleton from "@saleor/components/Skeleton"; import TableCellAvatar from "@saleor/components/TableCellAvatar"; -import { ShopOrderSettingsFragment } from "@saleor/fragments/types/ShopOrderSettingsFragment"; -import { WarehouseFragment } from "@saleor/fragments/types/WarehouseFragment"; +import { + FulfillOrderMutation, + OrderFulfillDataQuery, + OrderFulfillStockInput, + ShopOrderSettingsFragment, + WarehouseFragment +} from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import useFormset, { FormsetData } from "@saleor/hooks/useFormset"; import { commonMessages } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; -import { makeStyles } from "@saleor/macaw-ui"; -import { renderCollection } from "@saleor/misc"; -import { FulfillOrder_orderFulfill_errors } from "@saleor/orders/types/FulfillOrder"; import { - OrderFulfillData_order, - OrderFulfillData_order_lines -} from "@saleor/orders/types/OrderFulfillData"; -import { getToFulfillOrderLines } from "@saleor/orders/utils/data"; -import { isStockError } from "@saleor/orders/utils/data"; -import { OrderFulfillStockInput } from "@saleor/types/globalTypes"; + Backlink, + ConfirmButtonTransitionState, + makeStyles +} from "@saleor/macaw-ui"; +import { renderCollection } from "@saleor/misc"; +import { + getToFulfillOrderLines, + isStockError +} from "@saleor/orders/utils/data"; import { update } from "@saleor/utils/lists"; import classNames from "classnames"; import React from "react"; @@ -116,8 +119,8 @@ export interface OrderFulfillSubmitData extends OrderFulfillFormData { } export interface OrderFulfillPageProps { loading: boolean; - errors: FulfillOrder_orderFulfill_errors[]; - order: OrderFulfillData_order; + errors: FulfillOrderMutation["orderFulfill"]["errors"]; + order: OrderFulfillDataQuery["order"]; saveButtonBar: ConfirmButtonTransitionState; warehouses: WarehouseFragment[]; shopSettings?: ShopOrderSettingsFragment; @@ -256,7 +259,10 @@ const OrderFulfillPage: React.FC = props => { {renderCollection( getToFulfillOrderLines(order?.lines), - (line: OrderFulfillData_order_lines, lineIndex) => { + ( + line: OrderFulfillDataQuery["order"]["lines"][0], + lineIndex + ) => { if (!line) { return ( diff --git a/src/orders/components/OrderFulfillPage/fixtures.ts b/src/orders/components/OrderFulfillPage/fixtures.ts index 9c0fa54dc..c86714661 100644 --- a/src/orders/components/OrderFulfillPage/fixtures.ts +++ b/src/orders/components/OrderFulfillPage/fixtures.ts @@ -1,10 +1,8 @@ -/* eslint-disable sort-keys */ - import * as placeholderImage from "@assets/images/sample-product.jpg"; -import { OrderFulfillData_order } from "@saleor/orders/types/OrderFulfillData"; +import { OrderFulfillDataQuery } from "@saleor/graphql"; import { warehouseList } from "@saleor/warehouses/fixtures"; -export const orderToFulfill: OrderFulfillData_order = { +export const orderToFulfill: OrderFulfillDataQuery["order"] = { __typename: "Order", id: "T3JkZXI6Mg==", isPaid: true, diff --git a/src/orders/components/OrderFulfilledProductsCard/ActionButtons.tsx b/src/orders/components/OrderFulfilledProductsCard/ActionButtons.tsx index 166021ed0..7387b9d94 100644 --- a/src/orders/components/OrderFulfilledProductsCard/ActionButtons.tsx +++ b/src/orders/components/OrderFulfilledProductsCard/ActionButtons.tsx @@ -1,7 +1,7 @@ import { CardActions, Typography } from "@material-ui/core"; +import { FulfillmentStatus } from "@saleor/graphql"; import { buttonMessages, commonMessages } from "@saleor/intl"; import { Button } from "@saleor/macaw-ui"; -import { FulfillmentStatus } from "@saleor/types/globalTypes"; import React from "react"; import { FormattedMessage } from "react-intl"; diff --git a/src/orders/components/OrderFulfilledProductsCard/ExtraInfoLines.tsx b/src/orders/components/OrderFulfilledProductsCard/ExtraInfoLines.tsx index c7166b593..d51a09ab5 100644 --- a/src/orders/components/OrderFulfilledProductsCard/ExtraInfoLines.tsx +++ b/src/orders/components/OrderFulfilledProductsCard/ExtraInfoLines.tsx @@ -1,19 +1,17 @@ import { TableCell, TableRow, Typography } from "@material-ui/core"; +import { FulfillmentStatus, OrderDetailsFragment } from "@saleor/graphql"; import { getStringOrPlaceholder } from "@saleor/misc"; -import { FulfillmentStatus } from "@saleor/types/globalTypes"; import classNames from "classnames"; import React from "react"; -import { useIntl } from "react-intl"; -import { FormattedMessage } from "react-intl"; +import { FormattedMessage, useIntl } from "react-intl"; -import { OrderDetails_order_fulfillments } from "../../types/OrderDetails"; import { extraInfoMessages } from "./messages"; import useStyles from "./styles"; const NUMBER_OF_COLUMNS = 5; interface ExtraInfoLinesProps { - fulfillment?: OrderDetails_order_fulfillments; + fulfillment?: OrderDetailsFragment["fulfillments"][0]; } const ExtraInfoLines: React.FC = ({ fulfillment }) => { diff --git a/src/orders/components/OrderFulfilledProductsCard/OrderFulfilledProductsCard.tsx b/src/orders/components/OrderFulfilledProductsCard/OrderFulfilledProductsCard.tsx index 971b247ee..1c556fec5 100644 --- a/src/orders/components/OrderFulfilledProductsCard/OrderFulfilledProductsCard.tsx +++ b/src/orders/components/OrderFulfilledProductsCard/OrderFulfilledProductsCard.tsx @@ -1,15 +1,13 @@ import { Card, TableBody } from "@material-ui/core"; import CardSpacer from "@saleor/components/CardSpacer"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; -import { OrderDetailsFragment } from "@saleor/fragments/types/OrderDetailsFragment"; +import { FulfillmentStatus, OrderDetailsFragment } from "@saleor/graphql"; import TrashIcon from "@saleor/icons/Trash"; import { IconButton } from "@saleor/macaw-ui"; import { mergeRepeatedOrderLines } from "@saleor/orders/utils/data"; import React from "react"; import { renderCollection } from "../../../misc"; -import { FulfillmentStatus } from "../../../types/globalTypes"; -import { OrderDetails_order_fulfillments } from "../../types/OrderDetails"; import TableHeader from "../OrderProductsCardElements/OrderProductsCardHeader"; import TableLine from "../OrderProductsCardElements/OrderProductsTableRow"; import CardTitle from "../OrderReturnPage/OrderReturnRefundItemsCard/CardTitle"; @@ -18,7 +16,7 @@ import ExtraInfoLines from "./ExtraInfoLines"; import useStyles from "./styles"; interface OrderFulfilledProductsCardProps { - fulfillment: OrderDetails_order_fulfillments; + fulfillment: OrderDetailsFragment["fulfillments"][0]; fulfillmentAllowUnpaid: boolean; order?: OrderDetailsFragment; onOrderFulfillmentApprove: () => void; diff --git a/src/orders/components/OrderFulfillmentApproveDialog/OrderFulfillmentApproveDialog.tsx b/src/orders/components/OrderFulfillmentApproveDialog/OrderFulfillmentApproveDialog.tsx index 36fca7516..8a791a2f3 100644 --- a/src/orders/components/OrderFulfillmentApproveDialog/OrderFulfillmentApproveDialog.tsx +++ b/src/orders/components/OrderFulfillmentApproveDialog/OrderFulfillmentApproveDialog.tsx @@ -9,7 +9,7 @@ import ConfirmButton from "@saleor/components/ConfirmButton"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; +import { OrderErrorFragment } from "@saleor/graphql"; import { buttonMessages } from "@saleor/intl"; import { Button, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import getOrderErrorMessage from "@saleor/utils/errors/order"; diff --git a/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.tsx b/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.tsx index af42aeab2..3321790e3 100644 --- a/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.tsx +++ b/src/orders/components/OrderFulfillmentCancelDialog/OrderFulfillmentCancelDialog.tsx @@ -10,8 +10,7 @@ import ConfirmButton from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; import SingleAutocompleteSelectField from "@saleor/components/SingleAutocompleteSelectField"; -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; -import { WarehouseFragment } from "@saleor/fragments/types/WarehouseFragment"; +import { OrderErrorFragment, WarehouseFragment } from "@saleor/graphql"; import { buttonMessages } from "@saleor/intl"; import { ConfirmButtonTransitionState, makeStyles } from "@saleor/macaw-ui"; import getOrderErrorMessage from "@saleor/utils/errors/order"; diff --git a/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.tsx b/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.tsx index 8602e59e6..d7af6b4e3 100644 --- a/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.tsx +++ b/src/orders/components/OrderFulfillmentTrackingDialog/OrderFulfillmentTrackingDialog.tsx @@ -10,7 +10,7 @@ import BackButton from "@saleor/components/BackButton"; import ConfirmButton from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; +import { OrderErrorFragment } from "@saleor/graphql"; import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import { buttonMessages } from "@saleor/intl"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; diff --git a/src/orders/components/OrderHistory/ExtendedDiscountTimelineEvent/ExtendedDiscountTimelineEvent.tsx b/src/orders/components/OrderHistory/ExtendedDiscountTimelineEvent/ExtendedDiscountTimelineEvent.tsx index e4a0dbe1a..08c4b5496 100644 --- a/src/orders/components/OrderHistory/ExtendedDiscountTimelineEvent/ExtendedDiscountTimelineEvent.tsx +++ b/src/orders/components/OrderHistory/ExtendedDiscountTimelineEvent/ExtendedDiscountTimelineEvent.tsx @@ -3,9 +3,8 @@ import HorizontalSpacer from "@saleor/apps/components/HorizontalSpacer"; import CardSpacer from "@saleor/components/CardSpacer"; import { TimelineEvent } from "@saleor/components/Timeline"; import { TitleElement } from "@saleor/components/Timeline/TimelineEventHeader"; +import { OrderEventFragment, OrderEventsEnum } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; -import { OrderDetails_order_events } from "@saleor/orders/types/OrderDetails"; -import { OrderEventsEnum } from "@saleor/types/globalTypes"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; @@ -33,7 +32,7 @@ export const messages = defineMessages({ }); interface ExtendedTimelineEventProps { - event: OrderDetails_order_events; + event: OrderEventFragment; titleElements: TitleElement[]; } diff --git a/src/orders/components/OrderHistory/ExtendedDiscountTimelineEvent/MoneySection.tsx b/src/orders/components/OrderHistory/ExtendedDiscountTimelineEvent/MoneySection.tsx index 47aff3b16..09b349266 100644 --- a/src/orders/components/OrderHistory/ExtendedDiscountTimelineEvent/MoneySection.tsx +++ b/src/orders/components/OrderHistory/ExtendedDiscountTimelineEvent/MoneySection.tsx @@ -1,8 +1,7 @@ import { Typography } from "@material-ui/core"; import HorizontalSpacer from "@saleor/apps/components/HorizontalSpacer"; -import { Money } from "@saleor/fragments/types/Money"; +import { DiscountValueTypeEnum, MoneyFragment } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; -import { DiscountValueTypeEnum } from "@saleor/types/globalTypes"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; @@ -61,7 +60,7 @@ export enum MoneySectionType { interface MoneySectionProps { value?: number; calculationMode?: DiscountValueTypeEnum; - moneyData?: Money; + moneyData?: MoneyFragment; sectionType?: MoneySectionType; } diff --git a/src/orders/components/OrderHistory/ExtendedTimelineEvent.tsx b/src/orders/components/OrderHistory/ExtendedTimelineEvent.tsx index c538fbe38..04c10a600 100644 --- a/src/orders/components/OrderHistory/ExtendedTimelineEvent.tsx +++ b/src/orders/components/OrderHistory/ExtendedTimelineEvent.tsx @@ -1,13 +1,12 @@ import { Typography } from "@material-ui/core"; import Money from "@saleor/components/Money"; import { TimelineEvent } from "@saleor/components/Timeline"; +import { OrderEventFragment, OrderEventsEnum } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; -import { OrderEventsEnum } from "@saleor/types/globalTypes"; import camelCase from "lodash/camelCase"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; -import { OrderDetails_order_events } from "../../types/OrderDetails"; import ExtendedDiscountTimelineEvent from "./ExtendedDiscountTimelineEvent"; import Label from "./Label"; import { @@ -141,7 +140,7 @@ export const messages = defineMessages({ }); interface ExtendedTimelineEventProps { - event: OrderDetails_order_events; + event: OrderEventFragment; orderCurrency: string; } diff --git a/src/orders/components/OrderHistory/LinkedTimelineEvent.tsx b/src/orders/components/OrderHistory/LinkedTimelineEvent.tsx index 6b3e191b8..03cee94d9 100644 --- a/src/orders/components/OrderHistory/LinkedTimelineEvent.tsx +++ b/src/orders/components/OrderHistory/LinkedTimelineEvent.tsx @@ -1,8 +1,7 @@ import { TimelineEvent } from "@saleor/components/Timeline"; import { TitleElement } from "@saleor/components/Timeline/TimelineEventHeader"; -import { OrderDetails_order_events } from "@saleor/orders/types/OrderDetails"; +import { OrderEventFragment, OrderEventsEnum } from "@saleor/graphql"; import { orderUrl } from "@saleor/orders/urls"; -import { OrderEventsEnum } from "@saleor/types/globalTypes"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; @@ -31,7 +30,7 @@ export const discountRemovedMessages = defineMessages({ }); interface LinkedTimelineEventProps { - event: OrderDetails_order_events; + event: OrderEventFragment; } const LinkedTimelineEvent: React.FC = ({ event }) => { diff --git a/src/orders/components/OrderHistory/OrderHistory.tsx b/src/orders/components/OrderHistory/OrderHistory.tsx index 5a21e4cc2..acfab4e2a 100644 --- a/src/orders/components/OrderHistory/OrderHistory.tsx +++ b/src/orders/components/OrderHistory/OrderHistory.tsx @@ -9,13 +9,13 @@ import { TimelineEventProps, TimelineNote } from "@saleor/components/Timeline"; -import { SubmitPromise } from "@saleor/hooks/useForm"; -import { makeStyles } from "@saleor/macaw-ui"; -import { OrderDetails_order_events } from "@saleor/orders/types/OrderDetails"; import { + OrderEventFragment, OrderEventsEmailsEnum, OrderEventsEnum -} from "@saleor/types/globalTypes"; +} from "@saleor/graphql"; +import { SubmitPromise } from "@saleor/hooks/useForm"; +import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, IntlShape, useIntl } from "react-intl"; @@ -23,10 +23,7 @@ import ExtendedTimelineEvent from "./ExtendedTimelineEvent"; import LinkedTimelineEvent from "./LinkedTimelineEvent"; import { getEventSecondaryTitle, isTimelineEventOfType } from "./utils"; -export const getEventMessage = ( - event: OrderDetails_order_events, - intl: IntlShape -) => { +export const getEventMessage = (event: OrderEventFragment, intl: IntlShape) => { const getUserOrApp = () => { if (event.user) { return event.user.email; @@ -294,7 +291,7 @@ const useStyles = makeStyles( ); interface OrderHistoryProps { - history: OrderDetails_order_events[]; + history: OrderEventFragment[]; orderCurrency: string; onNoteAdd: (data: FormData) => SubmitPromise; } @@ -306,7 +303,7 @@ const OrderHistory: React.FC = props => { const intl = useIntl(); const getTimelineEventTitleProps = ( - event: OrderDetails_order_events + event: OrderEventFragment ): Partial => { const { type, message } = event; diff --git a/src/orders/components/OrderHistory/utils.tsx b/src/orders/components/OrderHistory/utils.tsx index 2ebec75fc..e11d22455 100644 --- a/src/orders/components/OrderHistory/utils.tsx +++ b/src/orders/components/OrderHistory/utils.tsx @@ -1,15 +1,11 @@ +import { OrderEventFragment, OrderEventsEnum } from "@saleor/graphql"; import { getFullName } from "@saleor/misc"; -import { - OrderDetails_order_events, - OrderDetails_order_events_user -} from "@saleor/orders/types/OrderDetails"; import { orderUrl } from "@saleor/orders/urls"; import { staffMemberDetailsUrl } from "@saleor/staff/urls"; -import { OrderEventsEnum } from "@saleor/types/globalTypes"; import { MessageDescriptor } from "react-intl"; export const getEventSecondaryTitle = ( - event: OrderDetails_order_events + event: OrderEventFragment ): [MessageDescriptor, any?] => { switch (event.type) { case OrderEventsEnum.ORDER_MARKED_AS_PAID: { @@ -74,7 +70,7 @@ const selectEmployeeName = ({ firstName, lastName, email -}: OrderDetails_order_events_user) => { +}: OrderEventFragment["user"]) => { if (!!firstName) { return getFullName({ firstName, lastName }).trim(); } @@ -82,7 +78,7 @@ const selectEmployeeName = ({ return email; }; -export const getEmployeeNameLink = (event: OrderDetails_order_events) => { +export const getEmployeeNameLink = (event: OrderEventFragment) => { if (!hasEnsuredOrderEventFields(event, ["user"])) { return null; } @@ -98,12 +94,12 @@ export const getEmployeeNameLink = (event: OrderDetails_order_events) => { export const hasOrderLineDiscountWithNoPreviousValue = ({ type, lines -}: OrderDetails_order_events) => +}: OrderEventFragment) => type === OrderEventsEnum.ORDER_LINE_DISCOUNT_UPDATED && lines?.[0]?.discount && !lines?.[0].discount?.oldValue; -export const getOrderNumberLink = (event: OrderDetails_order_events) => { +export const getOrderNumberLink = (event: OrderEventFragment) => { if (!hasEnsuredOrderEventFields(event, ["relatedOrder"])) { return null; } @@ -114,9 +110,9 @@ export const getOrderNumberLink = (event: OrderDetails_order_events) => { }; const hasEnsuredOrderEventFields = ( - event, - fields: Array -) => !fields.some((field: keyof OrderDetails_order_events) => !event[field]); + event: OrderEventFragment, + fields: Array +) => !fields.some((field: keyof OrderEventFragment) => !event[field]); export const getOrderNumberLinkObject = ({ id, diff --git a/src/orders/components/OrderInvoiceEmailSendDialog/OrderInvoiceEmailSendDialog.tsx b/src/orders/components/OrderInvoiceEmailSendDialog/OrderInvoiceEmailSendDialog.tsx index f0b66117b..23faa4ddf 100644 --- a/src/orders/components/OrderInvoiceEmailSendDialog/OrderInvoiceEmailSendDialog.tsx +++ b/src/orders/components/OrderInvoiceEmailSendDialog/OrderInvoiceEmailSendDialog.tsx @@ -8,8 +8,7 @@ import { import BackButton from "@saleor/components/BackButton"; import ConfirmButton from "@saleor/components/ConfirmButton"; import FormSpacer from "@saleor/components/FormSpacer"; -import { InvoiceErrorFragment } from "@saleor/fragments/types/InvoiceErrorFragment"; -import { InvoiceFragment } from "@saleor/fragments/types/InvoiceFragment"; +import { InvoiceErrorFragment, InvoiceFragment } from "@saleor/graphql"; import { buttonMessages } from "@saleor/intl"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { DialogProps } from "@saleor/types"; diff --git a/src/orders/components/OrderInvoiceList/OrderInvoiceList.tsx b/src/orders/components/OrderInvoiceList/OrderInvoiceList.tsx index 42dfe5a26..0d06b872a 100644 --- a/src/orders/components/OrderInvoiceList/OrderInvoiceList.tsx +++ b/src/orders/components/OrderInvoiceList/OrderInvoiceList.tsx @@ -10,7 +10,7 @@ import CardTitle from "@saleor/components/CardTitle"; import Date from "@saleor/components/Date"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; -import { InvoiceFragment } from "@saleor/fragments/types/InvoiceFragment"; +import { InvoiceFragment } from "@saleor/graphql"; import { buttonMessages } from "@saleor/intl"; import { Button, makeStyles } from "@saleor/macaw-ui"; import classNames from "classnames"; diff --git a/src/orders/components/OrderList/OrderList.tsx b/src/orders/components/OrderList/OrderList.tsx index 3a9eb8e13..69d884b26 100644 --- a/src/orders/components/OrderList/OrderList.tsx +++ b/src/orders/components/OrderList/OrderList.tsx @@ -12,6 +12,7 @@ import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import TableCellHeader from "@saleor/components/TableCellHeader"; import TablePagination from "@saleor/components/TablePagination"; +import { OrderListQuery } from "@saleor/graphql"; import { makeStyles, Pill } from "@saleor/macaw-ui"; import { maybe, @@ -20,13 +21,11 @@ import { transformPaymentStatus } from "@saleor/misc"; import { OrderListUrlSortField } from "@saleor/orders/urls"; -import { ListProps, SortPage } from "@saleor/types"; +import { ListProps, RelayToFlat, SortPage } from "@saleor/types"; import { getArrowDirection } from "@saleor/utils/sort"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { OrderList_orders_edges_node } from "../../types/OrderList"; - const useStyles = makeStyles( theme => { const overflowing: CSSProperties = { @@ -72,7 +71,7 @@ const useStyles = makeStyles( ); interface OrderListProps extends ListProps, SortPage { - orders: OrderList_orders_edges_node[]; + orders: RelayToFlat; } const numberOfColumns = 6; diff --git a/src/orders/components/OrderListPage/OrderListPage.tsx b/src/orders/components/OrderListPage/OrderListPage.tsx index 4493da85a..af10a5acd 100644 --- a/src/orders/components/OrderListPage/OrderListPage.tsx +++ b/src/orders/components/OrderListPage/OrderListPage.tsx @@ -3,16 +3,20 @@ import CardMenu from "@saleor/components/CardMenu"; import Container from "@saleor/components/Container"; import FilterBar from "@saleor/components/FilterBar"; import PageHeader from "@saleor/components/PageHeader"; -import { RefreshLimits_shop_limits } from "@saleor/components/Shop/types/RefreshLimits"; +import { OrderListQuery, RefreshLimitsQuery } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { Button, makeStyles } from "@saleor/macaw-ui"; import { OrderListUrlSortField } from "@saleor/orders/urls"; -import { FilterPageProps, PageListProps, SortPage } from "@saleor/types"; +import { + FilterPageProps, + PageListProps, + RelayToFlat, + SortPage +} from "@saleor/types"; import { hasLimits, isLimitReached } from "@saleor/utils/limits"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { OrderList_orders_edges_node } from "../../types/OrderList"; import OrderLimitReached from "../OrderLimitReached"; import OrderList from "../OrderList"; import { @@ -25,8 +29,8 @@ export interface OrderListPageProps extends PageListProps, FilterPageProps, SortPage { - limits: RefreshLimits_shop_limits; - orders: OrderList_orders_edges_node[]; + limits: RefreshLimitsQuery["shop"]["limits"]; + orders: RelayToFlat; onSettingsOpen: () => void; } diff --git a/src/orders/components/OrderListPage/filters.ts b/src/orders/components/OrderListPage/filters.ts index 3c6ccffe7..30f2fad46 100644 --- a/src/orders/components/OrderListPage/filters.ts +++ b/src/orders/components/OrderListPage/filters.ts @@ -1,16 +1,13 @@ import { IFilter } from "@saleor/components/Filter"; import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; -import { commonMessages } from "@saleor/intl"; +import { OrderStatusFilter, PaymentChargeStatusEnum } from "@saleor/graphql"; import { + commonMessages, commonStatusMessages, orderStatusMessages, paymentStatusMessages } from "@saleor/intl"; import { FilterOpts, MinMax } from "@saleor/types"; -import { - OrderStatusFilter, - PaymentChargeStatusEnum -} from "@saleor/types/globalTypes"; import { createBooleanField, createDateField, diff --git a/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx b/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx index 80c835bb4..22cc02ae2 100644 --- a/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx +++ b/src/orders/components/OrderMarkAsPaidDialog/OrderMarkAsPaidDialog.tsx @@ -1,7 +1,7 @@ import { DialogContentText, TextField } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import FormSpacer from "@saleor/components/FormSpacer"; -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; +import { OrderErrorFragment } from "@saleor/graphql"; import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import getOrderErrorMessage from "@saleor/utils/errors/order"; diff --git a/src/orders/components/OrderPayment/OrderPayment.tsx b/src/orders/components/OrderPayment/OrderPayment.tsx index c49aadadf..25d6de92e 100644 --- a/src/orders/components/OrderPayment/OrderPayment.tsx +++ b/src/orders/components/OrderPayment/OrderPayment.tsx @@ -4,17 +4,17 @@ import CardTitle from "@saleor/components/CardTitle"; import { Hr } from "@saleor/components/Hr"; import Money from "@saleor/components/Money"; import Skeleton from "@saleor/components/Skeleton"; +import { + OrderAction, + OrderDetailsFragment, + OrderDiscountType, + OrderStatus +} from "@saleor/graphql"; import { Button, makeStyles, Pill } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { maybe, transformPaymentStatus } from "../../../misc"; -import { - OrderAction, - OrderDiscountType, - OrderStatus -} from "../../../types/globalTypes"; -import { OrderDetails_order } from "../../types/OrderDetails"; import { orderPaymentMessages, paymentButtonMessages } from "./messages"; import { extractOrderGiftCardUsedAmount, @@ -47,7 +47,7 @@ const useStyles = makeStyles( ); interface OrderPaymentProps { - order: OrderDetails_order; + order: OrderDetailsFragment; onCapture: () => void; onMarkAsPaid: () => void; onRefund: () => void; diff --git a/src/orders/components/OrderPayment/utils.ts b/src/orders/components/OrderPayment/utils.ts index e76511a23..77d320e56 100644 --- a/src/orders/components/OrderPayment/utils.ts +++ b/src/orders/components/OrderPayment/utils.ts @@ -1,13 +1,13 @@ import { IMoney, subtractMoney } from "@saleor/components/Money"; -import { OrderDetails_order } from "@saleor/orders/types/OrderDetails"; import { GiftCardEventsEnum, + OrderDetailsFragment, PaymentChargeStatusEnum -} from "@saleor/types/globalTypes"; +} from "@saleor/graphql"; import compact from "lodash/compact"; export const extractOrderGiftCardUsedAmount = ( - order?: OrderDetails_order + order?: OrderDetailsFragment ): number | undefined => { if (!order) { return undefined; @@ -37,12 +37,14 @@ export const extractOrderGiftCardUsedAmount = ( }, 0); }; -export const extractOutstandingBalance = (order: OrderDetails_order): IMoney => +export const extractOutstandingBalance = ( + order: OrderDetailsFragment +): IMoney => order?.totalCaptured && order?.total?.gross && subtractMoney(order.total.gross, order.totalCaptured); -export const extractRefundedAmount = (order: OrderDetails_order): IMoney => { +export const extractRefundedAmount = (order: OrderDetailsFragment): IMoney => { if (order?.paymentStatus === PaymentChargeStatusEnum.FULLY_REFUNDED) { return order?.total?.gross; } diff --git a/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx b/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx index bdd965210..570664f83 100644 --- a/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx +++ b/src/orders/components/OrderPaymentDialog/OrderPaymentDialog.tsx @@ -10,7 +10,7 @@ import BackButton from "@saleor/components/BackButton"; import ConfirmButton from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; +import { OrderErrorFragment } from "@saleor/graphql"; import { buttonMessages } from "@saleor/intl"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { getFormErrors } from "@saleor/utils/errors"; diff --git a/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx b/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx index 64136ab8b..f6b9515ba 100644 --- a/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx +++ b/src/orders/components/OrderPaymentVoidDialog/OrderPaymentVoidDialog.tsx @@ -8,7 +8,7 @@ import { import BackButton from "@saleor/components/BackButton"; import ConfirmButton from "@saleor/components/ConfirmButton"; import FormSpacer from "@saleor/components/FormSpacer"; -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; +import { OrderErrorFragment } from "@saleor/graphql"; import { buttonMessages } from "@saleor/intl"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import getOrderErrorMessage from "@saleor/utils/errors/order"; diff --git a/src/orders/components/OrderPriceLabel/OrderPriceLabel.tsx b/src/orders/components/OrderPriceLabel/OrderPriceLabel.tsx index 1177b6f97..b093b95cd 100644 --- a/src/orders/components/OrderPriceLabel/OrderPriceLabel.tsx +++ b/src/orders/components/OrderPriceLabel/OrderPriceLabel.tsx @@ -1,13 +1,13 @@ import { Typography } from "@material-ui/core"; import DiscountedPrice from "@saleor/components/DiscountedPrice/DiscountedPrice"; import Money from "@saleor/components/Money"; -import { SearchOrderVariant_search_edges_node_variants_pricing } from "@saleor/orders/types/SearchOrderVariant"; +import { SearchOrderVariantQuery } from "@saleor/graphql"; import * as React from "react"; import { useStyles } from "./styles"; interface OrderPriceLabelProps { - pricing: SearchOrderVariant_search_edges_node_variants_pricing; + pricing: SearchOrderVariantQuery["search"]["edges"][0]["node"]["variants"][0]["pricing"]; } const OrderPriceLabel: React.FC = ({ pricing }) => { diff --git a/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx b/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx index 48383611a..c767dabd4 100644 --- a/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx +++ b/src/orders/components/OrderProductAddDialog/OrderProductAddDialog.tsx @@ -16,23 +16,19 @@ import ConfirmButton from "@saleor/components/ConfirmButton"; import FormSpacer from "@saleor/components/FormSpacer"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import TableCellAvatar from "@saleor/components/TableCellAvatar"; -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; +import { OrderErrorFragment, SearchOrderVariantQuery } from "@saleor/graphql"; import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import useModalDialogOpen from "@saleor/hooks/useModalDialogOpen"; import useSearchQuery from "@saleor/hooks/useSearchQuery"; import { buttonMessages } from "@saleor/intl"; import { ConfirmButtonTransitionState, makeStyles } from "@saleor/macaw-ui"; import { maybe, renderCollection } from "@saleor/misc"; -import { ChannelProps, FetchMoreProps } from "@saleor/types"; +import { ChannelProps, FetchMoreProps, RelayToFlat } from "@saleor/types"; import getOrderErrorMessage from "@saleor/utils/errors/order"; import React from "react"; import InfiniteScroll from "react-infinite-scroll-component"; import { FormattedMessage, useIntl } from "react-intl"; -import { - SearchOrderVariant_search_edges_node, - SearchOrderVariant_search_edges_node_variants -} from "../../types/SearchOrderVariant"; import OrderPriceLabel from "../OrderPriceLabel/OrderPriceLabel"; const useStyles = makeStyles( @@ -91,7 +87,7 @@ const useStyles = makeStyles( ); type SetVariantsAction = ( - data: SearchOrderVariant_search_edges_node_variants[] + data: SearchOrderVariantQuery["search"]["edges"][0]["node"]["variants"] ) => void; export interface OrderProductAddDialogProps @@ -100,15 +96,17 @@ export interface OrderProductAddDialogProps confirmButtonState: ConfirmButtonTransitionState; errors: OrderErrorFragment[]; open: boolean; - products: SearchOrderVariant_search_edges_node[]; + products: RelayToFlat; onClose: () => void; onFetch: (query: string) => void; - onSubmit: (data: SearchOrderVariant_search_edges_node_variants[]) => void; + onSubmit: ( + data: SearchOrderVariantQuery["search"]["edges"][0]["node"]["variants"] + ) => void; } function hasAllVariantsSelected( - productVariants: SearchOrderVariant_search_edges_node_variants[], - selectedVariantsToProductsMap: SearchOrderVariant_search_edges_node_variants[] + productVariants: SearchOrderVariantQuery["search"]["edges"][0]["node"]["variants"], + selectedVariantsToProductsMap: SearchOrderVariantQuery["search"]["edges"][0]["node"]["variants"] ): boolean { return productVariants.reduce( (acc, productVariant) => @@ -121,8 +119,8 @@ function hasAllVariantsSelected( } function isVariantSelected( - variant: SearchOrderVariant_search_edges_node_variants, - selectedVariantsToProductsMap: SearchOrderVariant_search_edges_node_variants[] + variant: SearchOrderVariantQuery["search"]["edges"][0]["node"]["variants"][0], + selectedVariantsToProductsMap: SearchOrderVariantQuery["search"]["edges"][0]["node"]["variants"] ): boolean { return !!selectedVariantsToProductsMap.find( selectedVariant => selectedVariant.id === variant.id @@ -130,10 +128,10 @@ function isVariantSelected( } const onProductAdd = ( - product: SearchOrderVariant_search_edges_node, + product: SearchOrderVariantQuery["search"]["edges"][0]["node"], productIndex: number, productsWithAllVariantsSelected: boolean[], - variants: SearchOrderVariant_search_edges_node_variants[], + variants: SearchOrderVariantQuery["search"]["edges"][0]["node"]["variants"], setVariants: SetVariantsAction ) => productsWithAllVariantsSelected[productIndex] @@ -156,10 +154,10 @@ const onProductAdd = ( ]); const onVariantAdd = ( - variant: SearchOrderVariant_search_edges_node_variants, + variant: SearchOrderVariantQuery["search"]["edges"][0]["node"]["variants"][0], variantIndex: number, productIndex: number, - variants: SearchOrderVariant_search_edges_node_variants[], + variants: SearchOrderVariantQuery["search"]["edges"][0]["node"]["variants"], selectedVariantsToProductsMap: boolean[][], setVariants: SetVariantsAction ) => @@ -190,7 +188,7 @@ const OrderProductAddDialog: React.FC = props => { const intl = useIntl(); const [query, onQueryChange] = useSearchQuery(onFetch); const [variants, setVariants] = React.useState< - SearchOrderVariant_search_edges_node_variants[] + SearchOrderVariantQuery["search"]["edges"][0]["node"]["variants"] >([]); const errors = useModalDialogErrors(apiErrors, open); @@ -200,7 +198,7 @@ const OrderProductAddDialog: React.FC = props => { const isValidVariant = ({ channelListings - }: SearchOrderVariant_search_edges_node_variants) => { + }: SearchOrderVariantQuery["search"]["edges"][0]["node"]["variants"][0]) => { const currentListing = channelListings.find( listing => listing.channel.id === selectedChannelId ); @@ -215,7 +213,8 @@ const OrderProductAddDialog: React.FC = props => { const getValidProductVariants = ({ variants - }: SearchOrderVariant_search_edges_node) => variants.filter(isValidVariant); + }: SearchOrderVariantQuery["search"]["edges"][0]["node"]) => + variants.filter(isValidVariant); const productChoices = products?.filter(product => getValidProductVariants(product).length > 0) || diff --git a/src/orders/components/OrderProductsCardElements/OrderProductsTableRow.tsx b/src/orders/components/OrderProductsCardElements/OrderProductsTableRow.tsx index d15c17aa3..b88ec52f0 100644 --- a/src/orders/components/OrderProductsCardElements/OrderProductsTableRow.tsx +++ b/src/orders/components/OrderProductsCardElements/OrderProductsTableRow.tsx @@ -3,12 +3,9 @@ import Money from "@saleor/components/Money"; import Skeleton from "@saleor/components/Skeleton"; import TableCellAvatar from "@saleor/components/TableCellAvatar"; import { AVATAR_MARGIN } from "@saleor/components/TableCellAvatar/Avatar"; +import { OrderDetailsFragment, OrderLineFragment } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; import { maybe } from "@saleor/misc"; -import { - OrderDetails_order_fulfillments_lines, - OrderDetails_order_lines -} from "@saleor/orders/types/OrderDetails"; import React from "react"; const useStyles = makeStyles( @@ -51,7 +48,7 @@ const useStyles = makeStyles( ); interface TableLineProps { - line: OrderDetails_order_fulfillments_lines | OrderDetails_order_lines; + line: OrderDetailsFragment["fulfillments"][0]["lines"][0] | OrderLineFragment; isOrderLine?: boolean; } @@ -60,7 +57,7 @@ const TableLine: React.FC = ({ isOrderLine = false }) => { const classes = useStyles({}); - const { quantity, quantityToFulfill } = lineData as OrderDetails_order_lines; + const { quantity, quantityToFulfill } = lineData as OrderLineFragment; if (!lineData) { return ; @@ -70,8 +67,8 @@ const TableLine: React.FC = ({ ? ({ ...lineData, orderLine: lineData - } as OrderDetails_order_fulfillments_lines) - : (lineData as OrderDetails_order_fulfillments_lines); + } as OrderDetailsFragment["fulfillments"][0]["lines"][0]) + : (lineData as OrderDetailsFragment["fulfillments"][0]["lines"][0]); const quantityToDisplay = isOrderLine ? quantityToFulfill : quantity; diff --git a/src/orders/components/OrderRefundFulfilledProducts/OrderRefundFulfilledProducts.tsx b/src/orders/components/OrderRefundFulfilledProducts/OrderRefundFulfilledProducts.tsx index b9f810b81..a51a1e179 100644 --- a/src/orders/components/OrderRefundFulfilledProducts/OrderRefundFulfilledProducts.tsx +++ b/src/orders/components/OrderRefundFulfilledProducts/OrderRefundFulfilledProducts.tsx @@ -13,10 +13,10 @@ import CardTitle from "@saleor/components/CardTitle"; import Money from "@saleor/components/Money"; import Skeleton from "@saleor/components/Skeleton"; import TableCellAvatar from "@saleor/components/TableCellAvatar"; +import { OrderRefundDataQuery } from "@saleor/graphql"; import { FormsetChange } from "@saleor/hooks/useFormset"; import { Button, makeStyles } from "@saleor/macaw-ui"; import { renderCollection } from "@saleor/misc"; -import { OrderRefundData_order_fulfillments } from "@saleor/orders/types/OrderRefundData"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -67,7 +67,7 @@ const useStyles = makeStyles( ); interface OrderRefundFulfilledProductsProps { - fulfillment: OrderRefundData_order_fulfillments; + fulfillment: OrderRefundDataQuery["order"]["fulfillments"][0]; data: OrderRefundFormData; disabled: boolean; orderNumber: string; diff --git a/src/orders/components/OrderRefundFulfilledProducts/messages.ts b/src/orders/components/OrderRefundFulfilledProducts/messages.ts index db42f78a5..69bd3899a 100644 --- a/src/orders/components/OrderRefundFulfilledProducts/messages.ts +++ b/src/orders/components/OrderRefundFulfilledProducts/messages.ts @@ -1,4 +1,4 @@ -import { FulfillmentStatus } from "@saleor/types/globalTypes"; +import { FulfillmentStatus } from "@saleor/graphql"; import { defineMessages, IntlShape } from "react-intl"; export const messages = defineMessages({ diff --git a/src/orders/components/OrderRefundPage/OrderRefundPage.tsx b/src/orders/components/OrderRefundPage/OrderRefundPage.tsx index 9ded90cf6..288d33f1f 100644 --- a/src/orders/components/OrderRefundPage/OrderRefundPage.tsx +++ b/src/orders/components/OrderRefundPage/OrderRefundPage.tsx @@ -2,12 +2,14 @@ import CardSpacer from "@saleor/components/CardSpacer"; import Container from "@saleor/components/Container"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; +import { + FulfillmentStatus, + OrderErrorFragment, + OrderRefundDataQuery +} from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { Backlink } from "@saleor/macaw-ui"; import { renderCollection } from "@saleor/misc"; -import { OrderRefundData_order } from "@saleor/orders/types/OrderRefundData"; -import { FulfillmentStatus } from "@saleor/types/globalTypes"; import React from "react"; import { useIntl } from "react-intl"; @@ -31,7 +33,7 @@ export const refundFulfilledStatuses = [ ]; export interface OrderRefundPageProps { - order: OrderRefundData_order; + order: OrderRefundDataQuery["order"]; defaultType?: OrderRefundType; disabled: boolean; errors: OrderErrorFragment[]; diff --git a/src/orders/components/OrderRefundPage/fixtures.ts b/src/orders/components/OrderRefundPage/fixtures.ts index 61b9aa391..fa109c14e 100644 --- a/src/orders/components/OrderRefundPage/fixtures.ts +++ b/src/orders/components/OrderRefundPage/fixtures.ts @@ -1,9 +1,8 @@ -/* eslint-disable sort-keys */ +import { FulfillmentStatus, OrderRefundDataQuery } from "@saleor/graphql"; -import { OrderRefundData_order } from "@saleor/orders/types/OrderRefundData"; -import { FulfillmentStatus } from "@saleor/types/globalTypes"; - -export const orderToRefund = (placeholder: string): OrderRefundData_order => ({ +export const orderToRefund = ( + placeholder: string +): OrderRefundDataQuery["order"] => ({ __typename: "Order", id: "ifgdfuhdfdf", number: "22", diff --git a/src/orders/components/OrderRefundPage/form.tsx b/src/orders/components/OrderRefundPage/form.tsx index 6ec56f4f3..74a27d44c 100644 --- a/src/orders/components/OrderRefundPage/form.tsx +++ b/src/orders/components/OrderRefundPage/form.tsx @@ -1,4 +1,5 @@ import { useExitFormDialog } from "@saleor/components/Form/useExitFormDialog"; +import { OrderRefundDataQuery } from "@saleor/graphql"; import useForm, { CommonUseFormResultWithHandlers, SubmitPromise @@ -8,7 +9,6 @@ import useFormset, { FormsetData } from "@saleor/hooks/useFormset"; import useHandleFormSubmit from "@saleor/hooks/useHandleFormSubmit"; -import { OrderRefundData_order } from "@saleor/orders/types/OrderRefundData"; import React, { useEffect } from "react"; import { refundFulfilledStatuses } from "./OrderRefundPage"; @@ -54,7 +54,7 @@ export interface UseOrderRefundFormResult interface OrderRefundFormProps { children: (props: UseOrderRefundFormResult) => React.ReactNode; - order: OrderRefundData_order; + order: OrderRefundDataQuery["order"]; defaultType: OrderRefundType; onSubmit: (data: OrderRefundSubmitData) => SubmitPromise; } @@ -71,7 +71,7 @@ function getOrderRefundPageFormData( } function useOrderRefundForm( - order: OrderRefundData_order, + order: OrderRefundDataQuery["order"], defaultType: OrderRefundType, onSubmit: (data: OrderRefundSubmitData) => SubmitPromise ): UseOrderRefundFormResult { diff --git a/src/orders/components/OrderRefundReturnAmount/OrderRefundReturnAmount.tsx b/src/orders/components/OrderRefundReturnAmount/OrderRefundReturnAmount.tsx index db9b3923a..7403f1102 100644 --- a/src/orders/components/OrderRefundReturnAmount/OrderRefundReturnAmount.tsx +++ b/src/orders/components/OrderRefundReturnAmount/OrderRefundReturnAmount.tsx @@ -10,10 +10,12 @@ import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import Hr from "@saleor/components/Hr"; -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; +import { + OrderDetailsFragment, + OrderErrorFragment, + OrderRefundDataQuery +} from "@saleor/graphql"; import { Button, makeStyles } from "@saleor/macaw-ui"; -import { OrderDetails_order } from "@saleor/orders/types/OrderDetails"; -import { OrderRefundData_order } from "@saleor/orders/types/OrderRefundData"; import React from "react"; import { defineMessages, FormattedMessage, useIntl } from "react-intl"; @@ -81,7 +83,7 @@ const messages = defineMessages({ interface OrderRefundAmountProps { data: OrderRefundFormData | OrderReturnFormData; - order: OrderRefundData_order | OrderDetails_order; + order: OrderRefundDataQuery["order"] | OrderDetailsFragment; disabled: boolean; disableSubmitButton?: boolean; isReturn?: boolean; diff --git a/src/orders/components/OrderRefundReturnAmount/OrderRefundReturnAmountValues.tsx b/src/orders/components/OrderRefundReturnAmount/OrderRefundReturnAmountValues.tsx index b72fecafb..1d4808aac 100644 --- a/src/orders/components/OrderRefundReturnAmount/OrderRefundReturnAmountValues.tsx +++ b/src/orders/components/OrderRefundReturnAmount/OrderRefundReturnAmountValues.tsx @@ -4,8 +4,7 @@ import { makeStyles } from "@saleor/macaw-ui"; import classNames from "classnames"; import reduce from "lodash/reduce"; import React from "react"; -import { useIntl } from "react-intl"; -import { defineMessages } from "react-intl"; +import { defineMessages, useIntl } from "react-intl"; const useStyles = makeStyles( theme => ({ diff --git a/src/orders/components/OrderRefundReturnAmount/RefundAmountInput.tsx b/src/orders/components/OrderRefundReturnAmount/RefundAmountInput.tsx index 2cb0da762..89b1e1ae6 100644 --- a/src/orders/components/OrderRefundReturnAmount/RefundAmountInput.tsx +++ b/src/orders/components/OrderRefundReturnAmount/RefundAmountInput.tsx @@ -1,6 +1,6 @@ import { IMoney } from "@saleor/components/Money"; import PriceField from "@saleor/components/PriceField"; -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; +import { OrderErrorFragment } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; import { getFormErrors } from "@saleor/utils/errors"; import getOrderErrorMessage from "@saleor/utils/errors/order"; diff --git a/src/orders/components/OrderRefundReturnAmount/utils.ts b/src/orders/components/OrderRefundReturnAmount/utils.ts index 5b0b4b997..6ab94faff 100644 --- a/src/orders/components/OrderRefundReturnAmount/utils.ts +++ b/src/orders/components/OrderRefundReturnAmount/utils.ts @@ -1,7 +1,6 @@ import { IMoney } from "@saleor/components/Money"; +import { OrderDetailsFragment, OrderRefundDataQuery } from "@saleor/graphql"; import { FormsetData } from "@saleor/hooks/useFormset"; -import { OrderDetails_order } from "@saleor/orders/types/OrderDetails"; -import { OrderRefundData_order } from "@saleor/orders/types/OrderRefundData"; import { getAllFulfillmentLinesPriceSum, getPreviouslyRefundedPrice, @@ -15,7 +14,7 @@ import { LineItemData, OrderReturnFormData } from "../OrderReturnPage/form"; import { OrderRefundAmountValuesProps } from "./OrderRefundReturnAmountValues"; export const getMiscellaneousAmountValues = ( - order: OrderRefundData_order + order: OrderRefundDataQuery["order"] ): OrderRefundAmountValuesProps => { const authorizedAmount = order?.total?.gross; const previouslyRefunded = getPreviouslyRefundedPrice(order); @@ -28,17 +27,18 @@ export const getMiscellaneousAmountValues = ( }; }; -const getAuthorizedAmount = (order: OrderRefundData_order) => +const getAuthorizedAmount = (order: OrderRefundDataQuery["order"]) => order?.total?.gross; -const getShipmentCost = (order: OrderRefundData_order) => +const getShipmentCost = (order: OrderRefundDataQuery["order"]) => getAuthorizedAmount(order)?.currency && (order?.shippingPrice?.gross || { amount: 0, currency: getAuthorizedAmount(order)?.currency }); -const getMaxRefund = (order: OrderRefundData_order) => order?.totalCaptured; +const getMaxRefund = (order: OrderRefundDataQuery["order"]) => + order?.totalCaptured; export const getProductsAmountValues = ({ order, @@ -47,7 +47,7 @@ export const getProductsAmountValues = ({ unfulfilledItemsQuantities, refundShipmentCosts }: { - order: OrderRefundData_order; + order: OrderRefundDataQuery["order"]; fulfilledItemsQuantities: FormsetData; waitingItemsQuantities: FormsetData; unfulfilledItemsQuantities: FormsetData; @@ -136,7 +136,7 @@ const getReturnTotalAmount = ({ order, maxRefund }: { - order: OrderDetails_order; + order: OrderDetailsFragment; selectedProductsValue: IMoney; refundShipmentCosts: boolean; maxRefund: IMoney; @@ -155,7 +155,7 @@ const getReturnTotalAmount = ({ }; export const getReturnProductsAmountValues = ( - order: OrderDetails_order, + order: OrderDetailsFragment, formData: OrderReturnFormData ) => { const authorizedAmount = getAuthorizedAmount(order); @@ -202,7 +202,7 @@ export const getReturnProductsAmountValues = ( }; export const getRefundProductsAmountValues = ( - order: OrderRefundData_order, + order: OrderRefundDataQuery["order"], { refundedFulfilledProductQuantities, refundShipmentCosts, diff --git a/src/orders/components/OrderRefundUnfulfilledProducts/OrderRefundUnfulfilledProducts.tsx b/src/orders/components/OrderRefundUnfulfilledProducts/OrderRefundUnfulfilledProducts.tsx index 4eb1564e0..48f57402a 100644 --- a/src/orders/components/OrderRefundUnfulfilledProducts/OrderRefundUnfulfilledProducts.tsx +++ b/src/orders/components/OrderRefundUnfulfilledProducts/OrderRefundUnfulfilledProducts.tsx @@ -13,10 +13,10 @@ import CardTitle from "@saleor/components/CardTitle"; import Money from "@saleor/components/Money"; import Skeleton from "@saleor/components/Skeleton"; import TableCellAvatar from "@saleor/components/TableCellAvatar"; +import { OrderRefundDataQuery } from "@saleor/graphql"; import { FormsetChange } from "@saleor/hooks/useFormset"; import { Button, makeStyles } from "@saleor/macaw-ui"; import { renderCollection } from "@saleor/misc"; -import { OrderRefundData_order_lines } from "@saleor/orders/types/OrderRefundData"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -62,7 +62,7 @@ const useStyles = makeStyles( ); interface OrderRefundUnfulfilledProductsProps { - unfulfilledLines: OrderRefundData_order_lines[]; + unfulfilledLines: OrderRefundDataQuery["order"]["lines"]; data: OrderRefundFormData; disabled: boolean; onRefundedProductQuantityChange: FormsetChange; diff --git a/src/orders/components/OrderReturnPage/OrderReturnPage.tsx b/src/orders/components/OrderReturnPage/OrderReturnPage.tsx index a4c276fba..33fda2acc 100644 --- a/src/orders/components/OrderReturnPage/OrderReturnPage.tsx +++ b/src/orders/components/OrderReturnPage/OrderReturnPage.tsx @@ -2,11 +2,10 @@ import CardSpacer from "@saleor/components/CardSpacer"; import Container from "@saleor/components/Container"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; +import { OrderDetailsFragment, OrderErrorFragment } from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { Backlink } from "@saleor/macaw-ui"; import { renderCollection } from "@saleor/misc"; -import { OrderDetails_order } from "@saleor/orders/types/OrderDetails"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; @@ -33,7 +32,7 @@ const messages = defineMessages({ }); export interface OrderReturnPageProps { - order: OrderDetails_order; + order: OrderDetailsFragment; loading: boolean; errors?: OrderErrorFragment[]; onBack: () => void; diff --git a/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/CardTitle.tsx b/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/CardTitle.tsx index 2d932d188..02fa81b59 100644 --- a/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/CardTitle.tsx +++ b/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/CardTitle.tsx @@ -1,13 +1,11 @@ import { Typography } from "@material-ui/core"; import DefaultCardTitle from "@saleor/components/CardTitle"; +import { FulfillmentStatus } from "@saleor/graphql"; import { makeStyles, Pill } from "@saleor/macaw-ui"; import { StatusType } from "@saleor/types"; -import { FulfillmentStatus } from "@saleor/types/globalTypes"; import camelCase from "lodash/camelCase"; import React from "react"; -import { FormattedMessage } from "react-intl"; -import { defineMessages } from "react-intl"; -import { useIntl } from "react-intl"; +import { defineMessages, FormattedMessage, useIntl } from "react-intl"; const useStyles = makeStyles( theme => ({ diff --git a/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/ProductErrorCell.tsx b/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/ProductErrorCell.tsx index 60721b09a..ab2a55866 100644 --- a/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/ProductErrorCell.tsx +++ b/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/ProductErrorCell.tsx @@ -2,8 +2,7 @@ import { Popper, TableCell, Typography } from "@material-ui/core"; import ErrorExclamationCircleIcon from "@saleor/icons/ErrorExclamationCircle"; import { makeStyles } from "@saleor/macaw-ui"; import React, { useState } from "react"; -import { defineMessages } from "react-intl"; -import { useIntl } from "react-intl"; +import { defineMessages, useIntl } from "react-intl"; const useStyles = makeStyles( theme => ({ diff --git a/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/ReturnItemsCard.tsx b/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/ReturnItemsCard.tsx index bf30b3672..d6624939c 100644 --- a/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/ReturnItemsCard.tsx +++ b/src/orders/components/OrderReturnPage/OrderReturnRefundItemsCard/ReturnItemsCard.tsx @@ -11,14 +11,14 @@ import { import Money from "@saleor/components/Money"; import Skeleton from "@saleor/components/Skeleton"; import TableCellAvatar from "@saleor/components/TableCellAvatar"; -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; +import { + OrderDetailsFragment, + OrderErrorFragment, + OrderLineFragment +} from "@saleor/graphql"; import { FormsetChange } from "@saleor/hooks/useFormset"; import { makeStyles, ResponsiveTable } from "@saleor/macaw-ui"; import { renderCollection } from "@saleor/misc"; -import { - OrderDetails_order, - OrderDetails_order_lines -} from "@saleor/orders/types/OrderDetails"; import React, { CSSProperties } from "react"; import { defineMessages, FormattedMessage, useIntl } from "react-intl"; @@ -91,8 +91,8 @@ interface OrderReturnRefundLinesCardProps { fulfilmentId?: string; canReplace?: boolean; errors: OrderErrorFragment[]; - lines: OrderDetails_order_lines[]; - order: OrderDetails_order; + lines: OrderLineFragment[]; + order: OrderDetailsFragment; itemsSelections: FormsetReplacementData; itemsQuantities: FormsetQuantityData; onChangeSelected: FormsetChange; diff --git a/src/orders/components/OrderReturnPage/form.tsx b/src/orders/components/OrderReturnPage/form.tsx index 04c8f2a4f..c08df6720 100644 --- a/src/orders/components/OrderReturnPage/form.tsx +++ b/src/orders/components/OrderReturnPage/form.tsx @@ -1,4 +1,5 @@ import { useExitFormDialog } from "@saleor/components/Form/useExitFormDialog"; +import { FulfillmentStatus, OrderDetailsFragment } from "@saleor/graphql"; import useForm, { CommonUseFormResultWithHandlers, SubmitPromise @@ -8,8 +9,6 @@ import useFormset, { FormsetData } from "@saleor/hooks/useFormset"; import useHandleFormSubmit from "@saleor/hooks/useHandleFormSubmit"; -import { OrderDetails_order } from "@saleor/orders/types/OrderDetails"; -import { FulfillmentStatus } from "@saleor/types/globalTypes"; import React, { useEffect } from "react"; import { OrderRefundAmountCalculationMode } from "../OrderRefundPage/form"; @@ -66,7 +65,7 @@ export type UseOrderRefundFormResult = CommonUseFormResultWithHandlers< interface OrderReturnProps { children: (props: UseOrderRefundFormResult) => React.ReactNode; - order: OrderDetails_order; + order: OrderDetailsFragment; onSubmit: (data: OrderRefundSubmitData) => SubmitPromise; } @@ -77,7 +76,7 @@ const getOrderRefundPageFormData = (): OrderReturnData => ({ }); function useOrderReturnForm( - order: OrderDetails_order, + order: OrderDetailsFragment, onSubmit: (data: OrderRefundSubmitData) => SubmitPromise ): UseOrderRefundFormResult { const { diff --git a/src/orders/components/OrderReturnPage/utils.tsx b/src/orders/components/OrderReturnPage/utils.tsx index 7c8b12c9e..661b74e00 100644 --- a/src/orders/components/OrderReturnPage/utils.tsx +++ b/src/orders/components/OrderReturnPage/utils.tsx @@ -1,10 +1,5 @@ -import { OrderDetailsFragment_fulfillments_lines } from "@saleor/fragments/types/OrderDetailsFragment"; -import { - OrderDetails_order, - OrderDetails_order_fulfillments -} from "@saleor/orders/types/OrderDetails"; +import { FulfillmentStatus, OrderDetailsFragment } from "@saleor/graphql"; import { Node } from "@saleor/types"; -import { FulfillmentStatus } from "@saleor/types/globalTypes"; import { LineItemOptions } from "./form"; @@ -13,30 +8,30 @@ const fulfiledStatuses = [ FulfillmentStatus.REFUNDED ]; -export const getOrderUnfulfilledLines = (order: OrderDetails_order) => +export const getOrderUnfulfilledLines = (order: OrderDetailsFragment) => order?.lines.filter(line => line.quantityToFulfill > 0) || []; export const getFulfilledFulfillment = fulfillment => fulfiledStatuses.includes(fulfillment.status); -export const getFulfilledFulfillemnts = (order?: OrderDetails_order) => +export const getFulfilledFulfillemnts = (order?: OrderDetailsFragment) => order?.fulfillments.filter(getFulfilledFulfillment) || []; -export const getWaitingFulfillments = (order: OrderDetails_order) => +export const getWaitingFulfillments = (order: OrderDetailsFragment) => order?.fulfillments.filter( f => f.status === FulfillmentStatus.WAITING_FOR_APPROVAL ) || []; -export const getUnfulfilledLines = (order?: OrderDetails_order) => +export const getUnfulfilledLines = (order?: OrderDetailsFragment) => order?.lines.filter(line => line.quantityToFulfill > 0) || []; -export const getAllOrderFulfilledLines = (order?: OrderDetails_order) => +export const getAllOrderFulfilledLines = (order?: OrderDetailsFragment) => getFulfilledFulfillemnts(order).reduce( (result, { lines }) => [...result, ...getParsedLines(lines)], [] ); -export const getAllOrderWaitingLines = (order?: OrderDetails_order) => +export const getAllOrderWaitingLines = (order?: OrderDetailsFragment) => getWaitingFulfillments(order).reduce( (result, { lines }) => [...result, ...getParsedLines(lines)], [] @@ -68,7 +63,7 @@ export function getParsedLineData({ } export function getParsedLineDataForFulfillmentStatus( - order: OrderDetails_order, + order: OrderDetailsFragment, fulfillmentStatus: FulfillmentStatus, lineItemOptions: LineItemOptions ) { @@ -78,14 +73,14 @@ export function getParsedLineDataForFulfillmentStatus( } export const getFulfillmentsWithStatus = ( - order: OrderDetails_order, + order: OrderDetailsFragment, fulfillmentStatus: FulfillmentStatus ) => order?.fulfillments.filter(({ status }) => status === fulfillmentStatus) || []; export const getParsedLinesOfFulfillments = ( - fullfillments: OrderDetails_order_fulfillments[] + fullfillments: OrderDetailsFragment["fulfillments"] ) => fullfillments.reduce( (result, { lines }) => [...result, ...getParsedLines(lines)], @@ -93,7 +88,7 @@ export const getParsedLinesOfFulfillments = ( ); export const getParsedLines = ( - lines: OrderDetailsFragment_fulfillments_lines[] + lines: OrderDetailsFragment["fulfillments"][0]["lines"] ) => lines.map(({ id, quantity, orderLine }) => ({ ...orderLine, diff --git a/src/orders/components/OrderSettingsPage/OrderSettingsPage.tsx b/src/orders/components/OrderSettingsPage/OrderSettingsPage.tsx index 288a379c0..f4aaa9cb7 100644 --- a/src/orders/components/OrderSettingsPage/OrderSettingsPage.tsx +++ b/src/orders/components/OrderSettingsPage/OrderSettingsPage.tsx @@ -3,12 +3,13 @@ import Container from "@saleor/components/Container"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; -import { OrderSettingsFragment } from "@saleor/fragments/types/OrderSettingsFragment"; -import { ShopOrderSettingsFragment } from "@saleor/fragments/types/ShopOrderSettingsFragment"; +import { + OrderSettingsFragment, + ShopOrderSettingsFragment +} from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/orders/components/OrderSettingsPage/form.tsx b/src/orders/components/OrderSettingsPage/form.tsx index 94d5a0907..3571ba9b1 100644 --- a/src/orders/components/OrderSettingsPage/form.tsx +++ b/src/orders/components/OrderSettingsPage/form.tsx @@ -1,5 +1,7 @@ -import { OrderSettingsFragment } from "@saleor/fragments/types/OrderSettingsFragment"; -import { ShopOrderSettingsFragment } from "@saleor/fragments/types/ShopOrderSettingsFragment"; +import { + OrderSettingsFragment, + ShopOrderSettingsFragment +} from "@saleor/graphql"; import useForm, { FormChange, SubmitPromise } from "@saleor/hooks/useForm"; import useHandleFormSubmit from "@saleor/hooks/useHandleFormSubmit"; import React from "react"; diff --git a/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx b/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx index 7f90d7eca..7f81dcf11 100644 --- a/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx +++ b/src/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx @@ -12,7 +12,7 @@ import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; import Money from "@saleor/components/Money"; import { SingleSelectField } from "@saleor/components/SingleSelectField"; -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; +import { OrderDetailsFragment, OrderErrorFragment } from "@saleor/graphql"; import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import { buttonMessages } from "@saleor/intl"; import { ConfirmButtonTransitionState, makeStyles } from "@saleor/macaw-ui"; @@ -21,8 +21,6 @@ import getOrderErrorMessage from "@saleor/utils/errors/order"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { OrderDetails_order_shippingMethods } from "../../types/OrderDetails"; - export interface FormData { shippingMethod: string; } @@ -63,7 +61,7 @@ export interface OrderShippingMethodEditDialogProps { errors: OrderErrorFragment[]; open: boolean; shippingMethod: string; - shippingMethods?: OrderDetails_order_shippingMethods[]; + shippingMethods?: OrderDetailsFragment["shippingMethods"]; onClose(); onSubmit?(data: FormData); } diff --git a/src/orders/components/OrderUnfulfilledProductsCard/OrderUnfulfilledProductsCard.tsx b/src/orders/components/OrderUnfulfilledProductsCard/OrderUnfulfilledProductsCard.tsx index eeb2f08c3..f01bbe0e9 100644 --- a/src/orders/components/OrderUnfulfilledProductsCard/OrderUnfulfilledProductsCard.tsx +++ b/src/orders/components/OrderUnfulfilledProductsCard/OrderUnfulfilledProductsCard.tsx @@ -1,13 +1,13 @@ import { Card, CardActions, TableBody, Typography } from "@material-ui/core"; import CardSpacer from "@saleor/components/CardSpacer"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; +import { OrderLineFragment } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { Button, makeStyles } from "@saleor/macaw-ui"; import { renderCollection } from "@saleor/misc"; import React from "react"; import { FormattedMessage } from "react-intl"; -import { OrderDetails_order_lines } from "../../types/OrderDetails"; import TableHeader from "../OrderProductsCardElements/OrderProductsCardHeader"; import TableLine from "../OrderProductsCardElements/OrderProductsTableRow"; import CardTitle from "../OrderReturnPage/OrderReturnRefundItemsCard/CardTitle"; @@ -34,7 +34,7 @@ const useStyles = makeStyles( interface OrderUnfulfilledProductsCardProps { showFulfillmentAction: boolean; notAllowedToFulfillUnpaid: boolean; - lines: OrderDetails_order_lines[]; + lines: OrderLineFragment[]; onFulfill: () => void; } diff --git a/src/orders/containers/OrderOperations.tsx b/src/orders/containers/OrderOperations.tsx index 1dd1302a3..e9a34fadc 100644 --- a/src/orders/containers/OrderOperations.tsx +++ b/src/orders/containers/OrderOperations.tsx @@ -1,173 +1,160 @@ +import { + InvoiceEmailSendMutation, + InvoiceEmailSendMutationVariables, + InvoiceRequestMutation, + InvoiceRequestMutationVariables, + OrderAddNoteMutation, + OrderAddNoteMutationVariables, + OrderCancelMutation, + OrderCancelMutationVariables, + OrderCaptureMutation, + OrderCaptureMutationVariables, + OrderDraftCancelMutation, + OrderDraftCancelMutationVariables, + OrderDraftFinalizeMutation, + OrderDraftFinalizeMutationVariables, + OrderDraftUpdateMutation, + OrderDraftUpdateMutationVariables, + OrderFulfillmentApproveMutation, + OrderFulfillmentApproveMutationVariables, + OrderFulfillmentCancelMutation, + OrderFulfillmentCancelMutationVariables, + OrderFulfillmentUpdateTrackingMutation, + OrderFulfillmentUpdateTrackingMutationVariables, + OrderLineDeleteMutation, + OrderLineDeleteMutationVariables, + OrderLinesAddMutation, + OrderLinesAddMutationVariables, + OrderLineUpdateMutation, + OrderLineUpdateMutationVariables, + OrderMarkAsPaidMutation, + OrderMarkAsPaidMutationVariables, + OrderShippingMethodUpdateMutation, + OrderShippingMethodUpdateMutationVariables, + OrderUpdateMutation, + OrderUpdateMutationVariables, + OrderVoidMutation, + OrderVoidMutationVariables, + useInvoiceEmailSendMutation, + useInvoiceRequestMutation, + useOrderAddNoteMutation, + useOrderCancelMutation, + useOrderCaptureMutation, + useOrderDraftCancelMutation, + useOrderDraftFinalizeMutation, + useOrderDraftUpdateMutation, + useOrderFulfillmentApproveMutation, + useOrderFulfillmentCancelMutation, + useOrderFulfillmentUpdateTrackingMutation, + useOrderLineDeleteMutation, + useOrderLinesAddMutation, + useOrderLineUpdateMutation, + useOrderMarkAsPaidMutation, + useOrderShippingMethodUpdateMutation, + useOrderUpdateMutation, + useOrderVoidMutation +} from "@saleor/graphql"; import React from "react"; import { getMutationProviderData } from "../../misc"; import { PartialMutationProviderOutput } from "../../types"; -import { - TypedInvoiceEmailSendMutation, - TypedInvoiceRequestMutation, - TypedOrderAddNoteMutation, - TypedOrderCancelMutation, - TypedOrderCaptureMutation, - TypedOrderDraftCancelMutation, - TypedOrderDraftFinalizeMutation, - TypedOrderDraftUpdateMutation, - TypedOrderFulfillmentApproveMutation, - TypedOrderFulfillmentCancelMutation, - TypedOrderFulfillmentUpdateTrackingMutation, - TypedOrderLineDeleteMutation, - TypedOrderLinesAddMutation, - TypedOrderLineUpdateMutation, - TypedOrderMarkAsPaidMutation, - TypedOrderShippingMethodUpdateMutation, - TypedOrderUpdateMutation, - TypedOrderVoidMutation -} from "../mutations"; -import { - InvoiceEmailSend, - InvoiceEmailSendVariables -} from "../types/InvoiceEmailSend"; -import { - InvoiceRequest, - InvoiceRequestVariables -} from "../types/InvoiceRequest"; -import { OrderAddNote, OrderAddNoteVariables } from "../types/OrderAddNote"; -import { OrderCancel, OrderCancelVariables } from "../types/OrderCancel"; -import { OrderCapture, OrderCaptureVariables } from "../types/OrderCapture"; -import { - OrderDraftCancel, - OrderDraftCancelVariables -} from "../types/OrderDraftCancel"; -import { - OrderDraftFinalize, - OrderDraftFinalizeVariables -} from "../types/OrderDraftFinalize"; -import { - OrderDraftUpdate, - OrderDraftUpdateVariables -} from "../types/OrderDraftUpdate"; -import { - OrderFulfillmentApprove, - OrderFulfillmentApproveVariables -} from "../types/OrderFulfillmentApprove"; -import { - OrderFulfillmentCancel, - OrderFulfillmentCancelVariables -} from "../types/OrderFulfillmentCancel"; -import { - OrderFulfillmentUpdateTracking, - OrderFulfillmentUpdateTrackingVariables -} from "../types/OrderFulfillmentUpdateTracking"; -import { - OrderLineDelete, - OrderLineDeleteVariables -} from "../types/OrderLineDelete"; -import { OrderLinesAdd, OrderLinesAddVariables } from "../types/OrderLinesAdd"; -import { - OrderLineUpdate, - OrderLineUpdateVariables -} from "../types/OrderLineUpdate"; -import { - OrderMarkAsPaid, - OrderMarkAsPaidVariables -} from "../types/OrderMarkAsPaid"; -import { - OrderShippingMethodUpdate, - OrderShippingMethodUpdateVariables -} from "../types/OrderShippingMethodUpdate"; -import { OrderUpdate, OrderUpdateVariables } from "../types/OrderUpdate"; -import { OrderVoid, OrderVoidVariables } from "../types/OrderVoid"; interface OrderOperationsProps { order: string; children: (props: { orderAddNote: PartialMutationProviderOutput< - OrderAddNote, - OrderAddNoteVariables + OrderAddNoteMutation, + OrderAddNoteMutationVariables >; orderCancel: PartialMutationProviderOutput< - OrderCancel, - OrderCancelVariables + OrderCancelMutation, + OrderCancelMutationVariables >; orderFulfillmentApprove: PartialMutationProviderOutput< - OrderFulfillmentApprove, - OrderFulfillmentApproveVariables + OrderFulfillmentApproveMutation, + OrderFulfillmentApproveMutationVariables >; orderFulfillmentCancel: PartialMutationProviderOutput< - OrderFulfillmentCancel, - OrderFulfillmentCancelVariables + OrderFulfillmentCancelMutation, + OrderFulfillmentCancelMutationVariables >; orderFulfillmentUpdateTracking: PartialMutationProviderOutput< - OrderFulfillmentUpdateTracking, - OrderFulfillmentUpdateTrackingVariables + OrderFulfillmentUpdateTrackingMutation, + OrderFulfillmentUpdateTrackingMutationVariables >; orderPaymentCapture: PartialMutationProviderOutput< - OrderCapture, - OrderCaptureVariables + OrderCaptureMutation, + OrderCaptureMutationVariables >; orderPaymentMarkAsPaid: PartialMutationProviderOutput< - OrderMarkAsPaid, - OrderMarkAsPaidVariables + OrderMarkAsPaidMutation, + OrderMarkAsPaidMutationVariables + >; + orderVoid: PartialMutationProviderOutput< + OrderVoidMutation, + OrderVoidMutationVariables >; - orderVoid: PartialMutationProviderOutput; orderUpdate: PartialMutationProviderOutput< - OrderUpdate, - OrderUpdateVariables + OrderUpdateMutation, + OrderUpdateMutationVariables >; orderDraftCancel: PartialMutationProviderOutput< - OrderDraftCancel, - OrderDraftCancelVariables + OrderDraftCancelMutation, + OrderDraftCancelMutationVariables >; orderDraftFinalize: PartialMutationProviderOutput< - OrderDraftFinalize, - OrderDraftFinalizeVariables + OrderDraftFinalizeMutation, + OrderDraftFinalizeMutationVariables >; orderDraftUpdate: PartialMutationProviderOutput< - OrderDraftUpdate, - OrderDraftUpdateVariables + OrderDraftUpdateMutation, + OrderDraftUpdateMutationVariables >; orderShippingMethodUpdate: PartialMutationProviderOutput< - OrderShippingMethodUpdate, - OrderShippingMethodUpdateVariables + OrderShippingMethodUpdateMutation, + OrderShippingMethodUpdateMutationVariables >; orderLineDelete: PartialMutationProviderOutput< - OrderLineDelete, - OrderLineDeleteVariables + OrderLineDeleteMutation, + OrderLineDeleteMutationVariables >; orderLinesAdd: PartialMutationProviderOutput< - OrderLinesAdd, - OrderLinesAddVariables + OrderLinesAddMutation, + OrderLinesAddMutationVariables >; orderLineUpdate: PartialMutationProviderOutput< - OrderLineUpdate, - OrderLineUpdateVariables + OrderLineUpdateMutation, + OrderLineUpdateMutationVariables >; orderInvoiceRequest: PartialMutationProviderOutput< - InvoiceRequest, - InvoiceRequestVariables + InvoiceRequestMutation, + InvoiceRequestMutationVariables >; orderInvoiceSend: PartialMutationProviderOutput< - InvoiceEmailSend, - InvoiceEmailSendVariables + InvoiceEmailSendMutation, + InvoiceEmailSendMutationVariables >; }) => React.ReactNode; - onOrderFulfillmentApprove: (data: OrderFulfillmentApprove) => void; - onOrderFulfillmentCancel: (data: OrderFulfillmentCancel) => void; - onOrderFulfillmentUpdate: (data: OrderFulfillmentUpdateTracking) => void; - onOrderCancel: (data: OrderCancel) => void; - onOrderVoid: (data: OrderVoid) => void; - onOrderMarkAsPaid: (data: OrderMarkAsPaid) => void; - onNoteAdd: (data: OrderAddNote) => void; - onPaymentCapture: (data: OrderCapture) => void; - onUpdate: (data: OrderUpdate) => void; - onDraftCancel: (data: OrderDraftCancel) => void; - onDraftFinalize: (data: OrderDraftFinalize) => void; - onDraftUpdate: (data: OrderDraftUpdate) => void; - onShippingMethodUpdate: (data: OrderShippingMethodUpdate) => void; - onOrderLineDelete: (data: OrderLineDelete) => void; - onOrderLinesAdd: (data: OrderLinesAdd) => void; - onOrderLineUpdate: (data: OrderLineUpdate) => void; - onInvoiceRequest: (data: InvoiceRequest) => void; - onInvoiceSend: (data: InvoiceEmailSend) => void; + onOrderFulfillmentApprove: (data: OrderFulfillmentApproveMutation) => void; + onOrderFulfillmentCancel: (data: OrderFulfillmentCancelMutation) => void; + onOrderFulfillmentUpdate: ( + data: OrderFulfillmentUpdateTrackingMutation + ) => void; + onOrderCancel: (data: OrderCancelMutation) => void; + onOrderVoid: (data: OrderVoidMutation) => void; + onOrderMarkAsPaid: (data: OrderMarkAsPaidMutation) => void; + onNoteAdd: (data: OrderAddNoteMutation) => void; + onPaymentCapture: (data: OrderCaptureMutation) => void; + onUpdate: (data: OrderUpdateMutation) => void; + onDraftCancel: (data: OrderDraftCancelMutation) => void; + onDraftFinalize: (data: OrderDraftFinalizeMutation) => void; + onDraftUpdate: (data: OrderDraftUpdateMutation) => void; + onShippingMethodUpdate: (data: OrderShippingMethodUpdateMutation) => void; + onOrderLineDelete: (data: OrderLineDeleteMutation) => void; + onOrderLinesAdd: (data: OrderLinesAddMutation) => void; + onOrderLineUpdate: (data: OrderLineUpdateMutation) => void; + onInvoiceRequest: (data: InvoiceRequestMutation) => void; + onInvoiceSend: (data: InvoiceEmailSendMutation) => void; } const OrderOperations: React.FC = ({ @@ -190,188 +177,89 @@ const OrderOperations: React.FC = ({ onOrderMarkAsPaid, onInvoiceRequest, onInvoiceSend -}) => ( - - {(...orderVoid) => ( - - {(...orderCancel) => ( - - {(...paymentCapture) => ( - - {(...addNote) => ( - - {(...update) => ( - - {(...updateDraft) => ( - - {(...updateShippingMethod) => ( - - {(...deleteOrderLine) => ( - - {(...addOrderLine) => ( - - {(...updateOrderLine) => ( - - {(...approveFulfillment) => ( - - {(...cancelFulfillment) => ( - - {( - ...updateTrackingNumber - ) => ( - - {(...finalizeDraft) => ( - - {( - ...cancelDraft - ) => ( - - {( - ...markAsPaid - ) => ( - - {( - ...invoiceRequest - ) => ( - - {( - ...invoiceEmailSend - ) => - children( - { - orderAddNote: getMutationProviderData( - ...addNote - ), - orderCancel: getMutationProviderData( - ...orderCancel - ), - orderDraftCancel: getMutationProviderData( - ...cancelDraft - ), - orderDraftFinalize: getMutationProviderData( - ...finalizeDraft - ), - orderDraftUpdate: getMutationProviderData( - ...updateDraft - ), - orderFulfillmentApprove: getMutationProviderData( - ...approveFulfillment - ), - orderFulfillmentCancel: getMutationProviderData( - ...cancelFulfillment - ), - orderFulfillmentUpdateTracking: getMutationProviderData( - ...updateTrackingNumber - ), - orderInvoiceRequest: getMutationProviderData( - ...invoiceRequest - ), - orderInvoiceSend: getMutationProviderData( - ...invoiceEmailSend - ), - orderLineDelete: getMutationProviderData( - ...deleteOrderLine - ), - orderLineUpdate: getMutationProviderData( - ...updateOrderLine - ), - orderLinesAdd: getMutationProviderData( - ...addOrderLine - ), - orderPaymentCapture: getMutationProviderData( - ...paymentCapture - ), - orderPaymentMarkAsPaid: getMutationProviderData( - ...markAsPaid - ), - orderShippingMethodUpdate: getMutationProviderData( - ...updateShippingMethod - ), - orderUpdate: getMutationProviderData( - ...update - ), - orderVoid: getMutationProviderData( - ...orderVoid - ) - } - ) - } - - )} - - )} - - )} - - )} - - )} - - )} - - )} - - )} - - )} - - )} - - )} - - )} - - )} - - )} - - )} - - )} - - )} - -); +}) => { + const orderVoid = useOrderVoidMutation({ + onCompleted: onOrderVoid + }); + const orderCancel = useOrderCancelMutation({ + onCompleted: onOrderCancel + }); + const paymentCapture = useOrderCaptureMutation({ + onCompleted: onPaymentCapture + }); + const addNote = useOrderAddNoteMutation({ + onCompleted: onNoteAdd + }); + const update = useOrderUpdateMutation({ + onCompleted: onUpdate + }); + const updateDraft = useOrderDraftUpdateMutation({ + onCompleted: onDraftUpdate + }); + const updateShippingMethod = useOrderShippingMethodUpdateMutation({ + onCompleted: onShippingMethodUpdate + }); + const deleteOrderLine = useOrderLineDeleteMutation({ + onCompleted: onOrderLineDelete + }); + const addOrderLine = useOrderLinesAddMutation({ + onCompleted: onOrderLinesAdd + }); + const updateOrderLine = useOrderLineUpdateMutation({ + onCompleted: onOrderLineUpdate + }); + const approveFulfillment = useOrderFulfillmentApproveMutation({ + onCompleted: onOrderFulfillmentApprove + }); + const cancelFulfillment = useOrderFulfillmentCancelMutation({ + onCompleted: onOrderFulfillmentCancel + }); + const updateTrackingNumber = useOrderFulfillmentUpdateTrackingMutation({ + onCompleted: onOrderFulfillmentUpdate + }); + const finalizeDraft = useOrderDraftFinalizeMutation({ + onCompleted: onDraftFinalize + }); + const cancelDraft = useOrderDraftCancelMutation({ + onCompleted: onDraftCancel + }); + const markAsPaid = useOrderMarkAsPaidMutation({ + onCompleted: onOrderMarkAsPaid + }); + const invoiceRequest = useInvoiceRequestMutation({ + onCompleted: onInvoiceRequest + }); + const invoiceEmailSend = useInvoiceEmailSendMutation({ + onCompleted: onInvoiceSend + }); + + return ( + <> + {children({ + orderAddNote: getMutationProviderData(...addNote), + orderCancel: getMutationProviderData(...orderCancel), + orderDraftCancel: getMutationProviderData(...cancelDraft), + orderDraftFinalize: getMutationProviderData(...finalizeDraft), + orderDraftUpdate: getMutationProviderData(...updateDraft), + orderFulfillmentApprove: getMutationProviderData(...approveFulfillment), + orderFulfillmentCancel: getMutationProviderData(...cancelFulfillment), + orderFulfillmentUpdateTracking: getMutationProviderData( + ...updateTrackingNumber + ), + orderInvoiceRequest: getMutationProviderData(...invoiceRequest), + orderInvoiceSend: getMutationProviderData(...invoiceEmailSend), + orderLineDelete: getMutationProviderData(...deleteOrderLine), + orderLineUpdate: getMutationProviderData(...updateOrderLine), + orderLinesAdd: getMutationProviderData(...addOrderLine), + orderPaymentCapture: getMutationProviderData(...paymentCapture), + orderPaymentMarkAsPaid: getMutationProviderData(...markAsPaid), + orderShippingMethodUpdate: getMutationProviderData( + ...updateShippingMethod + ), + orderUpdate: getMutationProviderData(...update), + orderVoid: getMutationProviderData(...orderVoid) + })} + + ); +}; export default OrderOperations; diff --git a/src/orders/fixtures.ts b/src/orders/fixtures.ts index 08b80c471..a0bf83be8 100644 --- a/src/orders/fixtures.ts +++ b/src/orders/fixtures.ts @@ -1,34 +1,36 @@ -import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo"; -import { InvoiceFragment } from "@saleor/fragments/types/InvoiceFragment"; -import { OrderSettingsFragment } from "@saleor/fragments/types/OrderSettingsFragment"; -import { ShopOrderSettingsFragment } from "@saleor/fragments/types/ShopOrderSettingsFragment"; -import { SearchCustomers_search_edges_node } from "@saleor/searches/types/SearchCustomers"; +import { + CountryWithCodeFragment, + FulfillmentStatus, + InvoiceFragment, + JobStatusEnum, + OrderAction, + OrderDetailsFragment, + OrderDetailsQuery, + OrderEventsEmailsEnum, + OrderEventsEnum, + OrderListQuery, + OrderSettingsFragment, + OrderStatus, + PaymentChargeStatusEnum, + SearchCustomersQuery, + SearchOrderVariantQuery, + ShopOrderSettingsFragment, + WeightUnitsEnum +} from "@saleor/graphql"; +import { RelayToFlat } from "@saleor/types"; import { warehouseForPickup, warehouseList } from "@saleor/warehouses/fixtures"; import { MessageDescriptor } from "react-intl"; import { transformOrderStatus, transformPaymentStatus } from "../misc"; -import { - FulfillmentStatus, - JobStatusEnum, - OrderAction, - OrderEventsEmailsEnum, - OrderEventsEnum, - OrderStatus, - PaymentChargeStatusEnum, - WeightUnitsEnum -} from "../types/globalTypes"; -import { OrderDetails_order, OrderDetails_shop } from "./types/OrderDetails"; -import { OrderList_orders_edges_node } from "./types/OrderList"; -import { SearchOrderVariant_search_edges_node } from "./types/SearchOrderVariant"; -export const countries: ShopInfo_shop_countries[] = [ +export const countries: CountryWithCodeFragment[] = [ { __typename: "CountryDisplay", code: "AF", country: "Afghanistan" }, { __typename: "CountryDisplay", code: "AX", country: "Ã…land Islands" }, { __typename: "CountryDisplay", code: "AL", country: "Albania" }, { __typename: "CountryDisplay", code: "DZ", country: "Algeria" }, { __typename: "CountryDisplay", code: "AS", country: "American Samoa" } ]; -export const shop: OrderDetails_shop = { +export const shop: OrderDetailsQuery["shop"] = { __typename: "Shop", countries, defaultWeightUnit: WeightUnitsEnum.KG, @@ -36,7 +38,7 @@ export const shop: OrderDetails_shop = { fulfillmentAutoApprove: true }; -export const clients: SearchCustomers_search_edges_node[] = [ +export const clients: RelayToFlat = [ { __typename: "User" as "User", email: "test.client1@example.com", @@ -66,7 +68,7 @@ export const clients: SearchCustomers_search_edges_node[] = [ lastName: "Jonas" } ]; -export const orders: OrderList_orders_edges_node[] = [ +export const orders: RelayToFlat = [ { __typename: "Order", billingAddress: { @@ -770,7 +772,7 @@ export const orders: OrderList_orders_edges_node[] = [ userEmail: "curtis.bailey@example.com" } ]; -export const order = (placeholder: string): OrderDetails_order => ({ +export const order = (placeholder: string): OrderDetailsFragment => ({ __typename: "Order", giftCards: [], actions: [ @@ -1421,7 +1423,7 @@ export const order = (placeholder: string): OrderDetails_order => ({ user: null, userEmail: "melissa.simon@example.com" }); -export const draftOrder = (placeholder: string): OrderDetails_order => ({ +export const draftOrder = (placeholder: string): OrderDetailsFragment => ({ __typename: "Order" as "Order", giftCards: [], actions: [OrderAction.CAPTURE], @@ -1663,7 +1665,7 @@ export const shippingMethods = [ ]; export const orderLineSearch = ( placeholderImage: string -): SearchOrderVariant_search_edges_node[] => [ +): RelayToFlat => [ { __typename: "Product" as "Product", id: "UHJvZHVjdDo3Mg==", diff --git a/src/orders/mutations.ts b/src/orders/mutations.ts index 420e7861d..0160729f3 100644 --- a/src/orders/mutations.ts +++ b/src/orders/mutations.ts @@ -1,326 +1,149 @@ import { gql } from "@apollo/client"; -import { - invoiceErrorFragment, - orderErrorFragment, - orderSettingsErrorFragment, - shopErrorFragment -} from "@saleor/fragments/errors"; -import { - fragmentOrderDetails, - fragmentOrderEvent, - fragmentOrderSettings, - fragmentShopOrderSettings, - fulfillmentFragment, - invoiceFragment -} from "@saleor/fragments/orders"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { TypedMutation } from "../mutations"; -import { - FulfillmentReturnProducts, - FulfillmentReturnProductsVariables -} from "./types/FulfillmentReturnProducts"; -import { FulfillOrder, FulfillOrderVariables } from "./types/FulfillOrder"; -import { - InvoiceEmailSend, - InvoiceEmailSendVariables -} from "./types/InvoiceEmailSend"; -import { - InvoiceRequest, - InvoiceRequestVariables -} from "./types/InvoiceRequest"; -import { OrderAddNote, OrderAddNoteVariables } from "./types/OrderAddNote"; -import { OrderCancel, OrderCancelVariables } from "./types/OrderCancel"; -import { OrderCapture, OrderCaptureVariables } from "./types/OrderCapture"; -import { OrderConfirm, OrderConfirmVariables } from "./types/OrderConfirm"; -import { - OrderDiscountAdd, - OrderDiscountAddVariables -} from "./types/OrderDiscountAdd"; -import { - OrderDiscountDelete, - OrderDiscountDeleteVariables -} from "./types/OrderDiscountDelete"; -import { - OrderDiscountUpdate, - OrderDiscountUpdateVariables -} from "./types/OrderDiscountUpdate"; -import { - OrderDraftBulkCancel, - OrderDraftBulkCancelVariables -} from "./types/OrderDraftBulkCancel"; -import { - OrderDraftCancel, - OrderDraftCancelVariables -} from "./types/OrderDraftCancel"; -import { - OrderDraftCreate, - OrderDraftCreateVariables -} from "./types/OrderDraftCreate"; -import { - OrderDraftFinalize, - OrderDraftFinalizeVariables -} from "./types/OrderDraftFinalize"; -import { - OrderDraftUpdate, - OrderDraftUpdateVariables -} from "./types/OrderDraftUpdate"; -import { - OrderFulfillmentApprove, - OrderFulfillmentApproveVariables -} from "./types/OrderFulfillmentApprove"; -import { - OrderFulfillmentCancel, - OrderFulfillmentCancelVariables -} from "./types/OrderFulfillmentCancel"; -import { - OrderFulfillmentRefundProducts, - OrderFulfillmentRefundProductsVariables -} from "./types/OrderFulfillmentRefundProducts"; -import { - OrderFulfillmentUpdateTracking, - OrderFulfillmentUpdateTrackingVariables -} from "./types/OrderFulfillmentUpdateTracking"; -import { - OrderLineDelete, - OrderLineDeleteVariables -} from "./types/OrderLineDelete"; -import { - OrderLineDiscountRemove, - OrderLineDiscountRemoveVariables -} from "./types/OrderLineDiscountRemove"; -import { - OrderLineDiscountUpdate, - OrderLineDiscountUpdateVariables -} from "./types/OrderLineDiscountUpdate"; -import { OrderLinesAdd, OrderLinesAddVariables } from "./types/OrderLinesAdd"; -import { - OrderLineUpdate, - OrderLineUpdateVariables -} from "./types/OrderLineUpdate"; -import { - OrderMarkAsPaid, - OrderMarkAsPaidVariables -} from "./types/OrderMarkAsPaid"; -import { OrderRefund, OrderRefundVariables } from "./types/OrderRefund"; -import { - OrderSettingsUpdate, - OrderSettingsUpdateVariables -} from "./types/OrderSettingsUpdate"; -import { - OrderShippingMethodUpdate, - OrderShippingMethodUpdateVariables -} from "./types/OrderShippingMethodUpdate"; -import { OrderUpdate, OrderUpdateVariables } from "./types/OrderUpdate"; -import { OrderVoid, OrderVoidVariables } from "./types/OrderVoid"; - -const orderCancelMutation = gql` - ${fragmentOrderDetails} - ${orderErrorFragment} +export const orderCancelMutation = gql` mutation OrderCancel($id: ID!) { orderCancel(id: $id) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const TypedOrderCancelMutation = TypedMutation< - OrderCancel, - OrderCancelVariables ->(orderCancelMutation); // Discounts -const orderDiscountAddMutation = gql` - ${orderErrorFragment} - ${fragmentOrderDetails} +export const orderDiscountAddMutation = gql` mutation OrderDiscountAdd($input: OrderDiscountCommonInput!, $orderId: ID!) { orderDiscountAdd(input: $input, orderId: $orderId) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const useOrderDiscountAddMutation = makeMutation< - OrderDiscountAdd, - OrderDiscountAddVariables ->(orderDiscountAddMutation); - -const orderDiscountDeleteMutation = gql` - ${orderErrorFragment} - ${fragmentOrderDetails} +export const orderDiscountDeleteMutation = gql` mutation OrderDiscountDelete($discountId: ID!) { orderDiscountDelete(discountId: $discountId) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const useOrderDiscountDeleteMutation = makeMutation< - OrderDiscountDelete, - OrderDiscountDeleteVariables ->(orderDiscountDeleteMutation); - -const orderLineDiscountRemoveMutation = gql` - ${orderErrorFragment} - ${fragmentOrderDetails} +export const orderLineDiscountRemoveMutation = gql` mutation OrderLineDiscountRemove($orderLineId: ID!) { orderLineDiscountRemove(orderLineId: $orderLineId) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const useOrderLineDiscountRemoveMutation = makeMutation< - OrderLineDiscountRemove, - OrderLineDiscountRemoveVariables ->(orderLineDiscountRemoveMutation); - -const orderLineDiscountUpdateMutation = gql` - ${orderErrorFragment} - ${fragmentOrderDetails} +export const orderLineDiscountUpdateMutation = gql` mutation OrderLineDiscountUpdate( $input: OrderDiscountCommonInput! $orderLineId: ID! ) { orderLineDiscountUpdate(input: $input, orderLineId: $orderLineId) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const useOrderLineDiscountUpdateMutation = makeMutation< - OrderLineDiscountUpdate, - OrderLineDiscountUpdateVariables ->(orderLineDiscountUpdateMutation); - -const orderDiscountUpdateMutation = gql` - ${fragmentOrderDetails} - ${orderErrorFragment} +export const orderDiscountUpdateMutation = gql` mutation OrderDiscountUpdate( $input: OrderDiscountCommonInput! $discountId: ID! ) { orderDiscountUpdate(input: $input, discountId: $discountId) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const useOrderDiscountUpdateMutation = makeMutation< - OrderDiscountUpdate, - OrderDiscountUpdateVariables ->(orderDiscountUpdateMutation); - // ----- -const orderDraftCancelMutation = gql` - ${fragmentOrderDetails} - ${orderErrorFragment} +export const orderDraftCancelMutation = gql` mutation OrderDraftCancel($id: ID!) { draftOrderDelete(id: $id) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const TypedOrderDraftCancelMutation = TypedMutation< - OrderDraftCancel, - OrderDraftCancelVariables ->(orderDraftCancelMutation); -const orderDraftBulkCancelMutation = gql` - ${orderErrorFragment} +export const orderDraftBulkCancelMutation = gql` mutation OrderDraftBulkCancel($ids: [ID]!) { draftOrderBulkDelete(ids: $ids) { errors { - ...OrderErrorFragment + ...OrderError } } } `; export const orderConfirmMutation = gql` - ${fragmentOrderDetails} - ${orderErrorFragment} mutation OrderConfirm($id: ID!) { orderConfirm(id: $id) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const useOrderConfirmMutation = makeMutation< - OrderConfirm, - OrderConfirmVariables ->(orderConfirmMutation); - -export const TypedOrderDraftBulkCancelMutation = TypedMutation< - OrderDraftBulkCancel, - OrderDraftBulkCancelVariables ->(orderDraftBulkCancelMutation); - -const orderDraftFinalizeMutation = gql` - ${fragmentOrderDetails} - ${orderErrorFragment} +export const orderDraftFinalizeMutation = gql` mutation OrderDraftFinalize($id: ID!) { draftOrderComplete(id: $id) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -const orderReturnCreateMutation = gql` - ${orderErrorFragment} +export const orderReturnCreateMutation = gql` mutation FulfillmentReturnProducts( $id: ID! $input: OrderReturnProductsInput! ) { orderFulfillmentReturnProducts(input: $input, order: $id) { errors { - ...OrderErrorFragment + ...OrderError } order { id @@ -332,249 +155,169 @@ const orderReturnCreateMutation = gql` } `; -export const useOrderReturnCreateMutation = makeMutation< - FulfillmentReturnProducts, - FulfillmentReturnProductsVariables ->(orderReturnCreateMutation); - -export const TypedOrderDraftFinalizeMutation = TypedMutation< - OrderDraftFinalize, - OrderDraftFinalizeVariables ->(orderDraftFinalizeMutation); - -const orderRefundMutation = gql` - ${fragmentOrderDetails} - ${orderErrorFragment} +export const orderRefundMutation = gql` mutation OrderRefund($id: ID!, $amount: PositiveDecimal!) { orderRefund(id: $id, amount: $amount) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const useOrderRefundMutation = makeMutation< - OrderRefund, - OrderRefundVariables ->(orderRefundMutation); - -const orderFulfillmentRefundProductsMutation = gql` - ${fragmentOrderDetails} - ${fulfillmentFragment} - ${orderErrorFragment} +export const orderFulfillmentRefundProductsMutation = gql` mutation OrderFulfillmentRefundProducts( $input: OrderRefundProductsInput! $order: ID! ) { orderFulfillmentRefundProducts(input: $input, order: $order) { errors { - ...OrderErrorFragment + ...OrderError } fulfillment { - ...FulfillmentFragment + ...Fulfillment } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const useOrderFulfillmentRefundProductsMutation = makeMutation< - OrderFulfillmentRefundProducts, - OrderFulfillmentRefundProductsVariables ->(orderFulfillmentRefundProductsMutation); -const orderVoidMutation = gql` - ${fragmentOrderDetails} - ${orderErrorFragment} +export const orderVoidMutation = gql` mutation OrderVoid($id: ID!) { orderVoid(id: $id) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const TypedOrderVoidMutation = TypedMutation< - OrderVoid, - OrderVoidVariables ->(orderVoidMutation); -const orderMarkAsPaidMutation = gql` - ${fragmentOrderDetails} - ${orderErrorFragment} +export const orderMarkAsPaidMutation = gql` mutation OrderMarkAsPaid($id: ID!, $transactionReference: String) { orderMarkAsPaid(id: $id, transactionReference: $transactionReference) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const TypedOrderMarkAsPaidMutation = TypedMutation< - OrderMarkAsPaid, - OrderMarkAsPaidVariables ->(orderMarkAsPaidMutation); -const orderCaptureMutation = gql` - ${fragmentOrderDetails} - ${orderErrorFragment} +export const orderCaptureMutation = gql` mutation OrderCapture($id: ID!, $amount: PositiveDecimal!) { orderCapture(id: $id, amount: $amount) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const TypedOrderCaptureMutation = TypedMutation< - OrderCapture, - OrderCaptureVariables ->(orderCaptureMutation); -const orderFulfillmentUpdateTrackingMutation = gql` - ${fragmentOrderDetails} - ${orderErrorFragment} +export const orderFulfillmentUpdateTrackingMutation = gql` mutation OrderFulfillmentUpdateTracking( $id: ID! $input: FulfillmentUpdateTrackingInput! ) { orderFulfillmentUpdateTracking(id: $id, input: $input) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const TypedOrderFulfillmentUpdateTrackingMutation = TypedMutation< - OrderFulfillmentUpdateTracking, - OrderFulfillmentUpdateTrackingVariables ->(orderFulfillmentUpdateTrackingMutation); -const orderFulfillmentApproveMutation = gql` - ${fragmentOrderDetails} - ${orderErrorFragment} +export const orderFulfillmentApproveMutation = gql` mutation OrderFulfillmentApprove($id: ID!, $notifyCustomer: Boolean!) { orderFulfillmentApprove(id: $id, notifyCustomer: $notifyCustomer) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const TypedOrderFulfillmentApproveMutation = TypedMutation< - OrderFulfillmentApprove, - OrderFulfillmentApproveVariables ->(orderFulfillmentApproveMutation); -const orderFulfillmentCancelMutation = gql` - ${fragmentOrderDetails} - ${orderErrorFragment} +export const orderFulfillmentCancelMutation = gql` mutation OrderFulfillmentCancel($id: ID!, $input: FulfillmentCancelInput!) { orderFulfillmentCancel(id: $id, input: $input) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const TypedOrderFulfillmentCancelMutation = TypedMutation< - OrderFulfillmentCancel, - OrderFulfillmentCancelVariables ->(orderFulfillmentCancelMutation); -const orderAddNoteMutation = gql` - ${fragmentOrderEvent} - ${orderErrorFragment} +export const orderAddNoteMutation = gql` mutation OrderAddNote($order: ID!, $input: OrderAddNoteInput!) { orderAddNote(order: $order, input: $input) { errors { - ...OrderErrorFragment + ...OrderError } order { id events { - ...OrderEventFragment + ...OrderEvent } } } } `; -export const TypedOrderAddNoteMutation = TypedMutation< - OrderAddNote, - OrderAddNoteVariables ->(orderAddNoteMutation); -const orderUpdateMutation = gql` - ${fragmentOrderDetails} - ${orderErrorFragment} +export const orderUpdateMutation = gql` mutation OrderUpdate($id: ID!, $input: OrderUpdateInput!) { orderUpdate(id: $id, input: $input) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const TypedOrderUpdateMutation = TypedMutation< - OrderUpdate, - OrderUpdateVariables ->(orderUpdateMutation); -const orderDraftUpdateMutation = gql` - ${fragmentOrderDetails} - ${orderErrorFragment} +export const orderDraftUpdateMutation = gql` mutation OrderDraftUpdate($id: ID!, $input: DraftOrderInput!) { draftOrderUpdate(id: $id, input: $input) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const TypedOrderDraftUpdateMutation = TypedMutation< - OrderDraftUpdate, - OrderDraftUpdateVariables ->(orderDraftUpdateMutation); -const orderShippingMethodUpdateMutation = gql` - ${orderErrorFragment} - ${fragmentOrderDetails} +export const orderShippingMethodUpdateMutation = gql` mutation OrderShippingMethodUpdate( $id: ID! $input: OrderUpdateShippingInput! ) { orderUpdateShipping(order: $id, input: $input) { errors { - ...OrderErrorFragment + ...OrderError } order { shippingMethods { @@ -607,22 +350,17 @@ const orderShippingMethodUpdateMutation = gql` currency } } - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const TypedOrderShippingMethodUpdateMutation = TypedMutation< - OrderShippingMethodUpdate, - OrderShippingMethodUpdateVariables ->(orderShippingMethodUpdateMutation); -const orderDraftCreateMutation = gql` - ${orderErrorFragment} +export const orderDraftCreateMutation = gql` mutation OrderDraftCreate($input: DraftOrderCreateInput!) { draftOrderCreate(input: $input) { errors { - ...OrderErrorFragment + ...OrderError } order { id @@ -630,161 +368,113 @@ const orderDraftCreateMutation = gql` } } `; -export const useOrderDraftCreateMutation = makeMutation< - OrderDraftCreate, - OrderDraftCreateVariables ->(orderDraftCreateMutation); -const orderLineDeleteMutation = gql` - ${fragmentOrderDetails} - ${orderErrorFragment} +export const orderLineDeleteMutation = gql` mutation OrderLineDelete($id: ID!) { orderLineDelete(id: $id) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const TypedOrderLineDeleteMutation = TypedMutation< - OrderLineDelete, - OrderLineDeleteVariables ->(orderLineDeleteMutation); -const orderLinesAddMutation = gql` - ${fragmentOrderDetails} - ${orderErrorFragment} +export const orderLinesAddMutation = gql` mutation OrderLinesAdd($id: ID!, $input: [OrderLineCreateInput]!) { orderLinesCreate(id: $id, input: $input) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const TypedOrderLinesAddMutation = TypedMutation< - OrderLinesAdd, - OrderLinesAddVariables ->(orderLinesAddMutation); -const orderLineUpdateMutation = gql` - ${fragmentOrderDetails} - ${orderErrorFragment} +export const orderLineUpdateMutation = gql` mutation OrderLineUpdate($id: ID!, $input: OrderLineInput!) { orderLineUpdate(id: $id, input: $input) { errors { - ...OrderErrorFragment + ...OrderError } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const TypedOrderLineUpdateMutation = TypedMutation< - OrderLineUpdate, - OrderLineUpdateVariables ->(orderLineUpdateMutation); -const fulfillOrder = gql` - ${fragmentOrderDetails} - ${orderErrorFragment} +export const fulfillOrder = gql` mutation FulfillOrder($orderId: ID!, $input: OrderFulfillInput!) { orderFulfill(order: $orderId, input: $input) { errors { - ...OrderErrorFragment + ...OrderError warehouse orderLines } order { - ...OrderDetailsFragment + ...OrderDetails } } } `; -export const useOrderFulfill = makeMutation< - FulfillOrder, - FulfillOrderVariables ->(fulfillOrder); -const invoiceRequestMutation = gql` - ${invoiceErrorFragment} - ${invoiceFragment} +export const invoiceRequestMutation = gql` mutation InvoiceRequest($orderId: ID!) { invoiceRequest(orderId: $orderId) { errors { - ...InvoiceErrorFragment + ...InvoiceError } invoice { - ...InvoiceFragment + ...Invoice } order { id invoices { - ...InvoiceFragment + ...Invoice } } } } `; -export const TypedInvoiceRequestMutation = TypedMutation< - InvoiceRequest, - InvoiceRequestVariables ->(invoiceRequestMutation); -const invoiceEmailSendMutation = gql` - ${invoiceErrorFragment} - ${invoiceFragment} +export const invoiceEmailSendMutation = gql` mutation InvoiceEmailSend($id: ID!) { invoiceSendNotification(id: $id) { errors { - ...InvoiceErrorFragment + ...InvoiceError } invoice { - ...InvoiceFragment + ...Invoice } } } `; -export const TypedInvoiceEmailSendMutation = TypedMutation< - InvoiceEmailSend, - InvoiceEmailSendVariables ->(invoiceEmailSendMutation); -const orderSettingsUpdateMutation = gql` - ${fragmentOrderSettings} - ${fragmentShopOrderSettings} - ${orderSettingsErrorFragment} - ${shopErrorFragment} +export const orderSettingsUpdateMutation = gql` mutation OrderSettingsUpdate( $orderSettingsInput: OrderSettingsUpdateInput! $shopSettingsInput: ShopSettingsInput! ) { orderSettingsUpdate(input: $orderSettingsInput) { errors { - ...OrderSettingsErrorFragment + ...OrderSettingsError } orderSettings { - ...OrderSettingsFragment + ...OrderSettings } } shopSettingsUpdate(input: $shopSettingsInput) { errors { - ...ShopErrorFragment + ...ShopError } shop { - ...ShopOrderSettingsFragment + ...ShopOrderSettings } } } `; -export const useOrderSettingsUpdateMutation = makeMutation< - OrderSettingsUpdate, - OrderSettingsUpdateVariables ->(orderSettingsUpdateMutation); diff --git a/src/orders/queries.ts b/src/orders/queries.ts index 846b6bb71..cf5a644e9 100644 --- a/src/orders/queries.ts +++ b/src/orders/queries.ts @@ -1,40 +1,6 @@ import { gql } from "@apollo/client"; -import { fragmentAddress } from "@saleor/fragments/address"; -import { - fragmentOrderDetails, - fragmentOrderSettings, - fragmentRefundOrderLine, - fragmentShopOrderSettings -} from "@saleor/fragments/orders"; -import { fragmentMoney } from "@saleor/fragments/products"; -import { warehouseFragment } from "@saleor/fragments/warehouses"; -import makeQuery from "@saleor/hooks/makeQuery"; -import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; - -import { TypedQuery } from "../queries"; -import { OrderDetails, OrderDetailsVariables } from "./types/OrderDetails"; -import { - OrderDraftList, - OrderDraftListVariables -} from "./types/OrderDraftList"; -import { - OrderFulfillData, - OrderFulfillDataVariables -} from "./types/OrderFulfillData"; -import { OrderFulfillSettings } from "./types/OrderFulfillSettings"; -import { OrderList, OrderListVariables } from "./types/OrderList"; -import { - OrderRefundData, - OrderRefundDataVariables -} from "./types/OrderRefundData"; -import { OrderSettings } from "./types/OrderSettings"; -import { - SearchOrderVariant as SearchOrderVariantType, - SearchOrderVariantVariables -} from "./types/SearchOrderVariant"; export const orderListQuery = gql` - ${fragmentAddress} query OrderList( $first: Int $after: String @@ -55,7 +21,7 @@ export const orderListQuery = gql` node { __typename billingAddress { - ...AddressFragment + ...Address } created id @@ -82,12 +48,7 @@ export const orderListQuery = gql` } } `; -export const useOrderListQuery = makeQuery( - orderListQuery -); - export const orderDraftListQuery = gql` - ${fragmentAddress} query OrderDraftList( $first: Int $after: String @@ -108,7 +69,7 @@ export const orderDraftListQuery = gql` node { __typename billingAddress { - ...AddressFragment + ...Address } created id @@ -135,17 +96,11 @@ export const orderDraftListQuery = gql` } } `; -export const useOrderDraftListQuery = makeQuery< - OrderDraftList, - OrderDraftListVariables ->(orderDraftListQuery); export const orderDetailsQuery = gql` - ${fragmentOrderDetails} - ${fragmentMoney} query OrderDetails($id: ID!) { order(id: $id) { - ...OrderDetailsFragment + ...OrderDetails } shop { countries { @@ -159,85 +114,7 @@ export const orderDetailsQuery = gql` } `; -export const TypedOrderDetailsQuery = TypedQuery< - OrderDetails, - OrderDetailsVariables ->(orderDetailsQuery); - -export const useOrderQuery = makeQuery( - orderDetailsQuery -); - -export const searchOrderVariant = gql` - ${fragmentMoney} - query SearchOrderVariant( - $channel: String! - $first: Int! - $query: String! - $after: String - $address: AddressInput - ) { - search: products( - first: $first - after: $after - filter: { search: $query } - channel: $channel - ) { - edges { - node { - id - name - thumbnail { - url - } - variants { - id - name - sku - pricing(address: $address) { - priceUndiscounted { - gross { - ...Money - } - } - price { - gross { - ...Money - } - } - onSale - } - channelListings { - channel { - id - isActive - name - currencyCode - } - price { - amount - currency - } - } - } - } - } - pageInfo { - endCursor - hasNextPage - hasPreviousPage - startCursor - } - } - } -`; -export const useOrderVariantSearch = makeTopLevelSearch< - SearchOrderVariantType, - SearchOrderVariantVariables ->(searchOrderVariant); - -const orderFulfillData = gql` - ${warehouseFragment} +export const orderFulfillData = gql` query OrderFulfillData($orderId: ID!) { order(id: $orderId) { id @@ -281,7 +158,7 @@ const orderFulfillData = gql` stocks { id warehouse { - ...WarehouseFragment + ...Warehouse } quantity quantityAllocated @@ -296,43 +173,26 @@ const orderFulfillData = gql` } } `; -export const useOrderFulfillData = makeQuery< - OrderFulfillData, - OrderFulfillDataVariables ->(orderFulfillData); export const orderFulfillSettingsQuery = gql` - ${fragmentShopOrderSettings} query OrderFulfillSettings { shop { - ...ShopOrderSettingsFragment + ...ShopOrderSettings } } `; -export const useOrderFulfillSettingsQuery = makeQuery< - OrderFulfillSettings, - never ->(orderFulfillSettingsQuery); export const orderSettingsQuery = gql` - ${fragmentOrderSettings} - ${fragmentShopOrderSettings} query OrderSettings { orderSettings { - ...OrderSettingsFragment + ...OrderSettings } shop { - ...ShopOrderSettingsFragment + ...ShopOrderSettings } } `; -export const useOrderSettingsQuery = makeQuery( - orderSettingsQuery -); - -const orderRefundData = gql` - ${fragmentMoney} - ${fragmentRefundOrderLine} +export const orderRefundData = gql` query OrderRefundData($orderId: ID!) { order(id: $orderId) { id @@ -351,7 +211,7 @@ const orderRefundData = gql` } } lines { - ...RefundOrderLineFragment + ...RefundOrderLine quantityToFulfill } fulfillments { @@ -362,14 +222,10 @@ const orderRefundData = gql` id quantity orderLine { - ...RefundOrderLineFragment + ...RefundOrderLine } } } } } `; -export const useOrderRefundData = makeQuery< - OrderRefundData, - OrderRefundDataVariables ->(orderRefundData); diff --git a/src/orders/types/FulfillOrder.ts b/src/orders/types/FulfillOrder.ts deleted file mode 100644 index 85b772491..000000000 --- a/src/orders/types/FulfillOrder.ts +++ /dev/null @@ -1,621 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderFulfillInput, OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: FulfillOrder -// ==================================================== - -export interface FulfillOrder_orderFulfill_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; - warehouse: string | null; - orderLines: string[] | null; -} - -export interface FulfillOrder_orderFulfill_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface FulfillOrder_orderFulfill_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface FulfillOrder_orderFulfill_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface FulfillOrder_orderFulfill_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: FulfillOrder_orderFulfill_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface FulfillOrder_orderFulfill_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: FulfillOrder_orderFulfill_order_giftCards_events_balance_initialBalance | null; - currentBalance: FulfillOrder_orderFulfill_order_giftCards_events_balance_currentBalance; - oldInitialBalance: FulfillOrder_orderFulfill_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: FulfillOrder_orderFulfill_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface FulfillOrder_orderFulfill_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: FulfillOrder_orderFulfill_order_giftCards_events_balance | null; -} - -export interface FulfillOrder_orderFulfill_order_giftCards { - __typename: "GiftCard"; - events: FulfillOrder_orderFulfill_order_giftCards_events[]; -} - -export interface FulfillOrder_orderFulfill_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: FulfillOrder_orderFulfill_order_discounts_amount; -} - -export interface FulfillOrder_orderFulfill_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: FulfillOrder_orderFulfill_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: FulfillOrder_orderFulfill_order_events_discount_oldAmount | null; -} - -export interface FulfillOrder_orderFulfill_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface FulfillOrder_orderFulfill_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface FulfillOrder_orderFulfill_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface FulfillOrder_orderFulfill_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: FulfillOrder_orderFulfill_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: FulfillOrder_orderFulfill_order_events_lines_discount_oldAmount | null; -} - -export interface FulfillOrder_orderFulfill_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface FulfillOrder_orderFulfill_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: FulfillOrder_orderFulfill_order_events_lines_discount | null; - orderLine: FulfillOrder_orderFulfill_order_events_lines_orderLine | null; -} - -export interface FulfillOrder_orderFulfill_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: FulfillOrder_orderFulfill_order_events_discount | null; - relatedOrder: FulfillOrder_orderFulfill_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: FulfillOrder_orderFulfill_order_events_user | null; - app: FulfillOrder_orderFulfill_order_events_app | null; - lines: (FulfillOrder_orderFulfill_order_events_lines | null)[] | null; -} - -export interface FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine_unitPrice_gross; - net: FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface FulfillOrder_orderFulfill_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: FulfillOrder_orderFulfill_order_fulfillments_lines_orderLine | null; -} - -export interface FulfillOrder_orderFulfill_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface FulfillOrder_orderFulfill_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (FulfillOrder_orderFulfill_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: FulfillOrder_orderFulfill_order_fulfillments_warehouse | null; -} - -export interface FulfillOrder_orderFulfill_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface FulfillOrder_orderFulfill_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: FulfillOrder_orderFulfill_order_lines_variant_preorder | null; -} - -export interface FulfillOrder_orderFulfill_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: FulfillOrder_orderFulfill_order_lines_undiscountedUnitPrice_gross; - net: FulfillOrder_orderFulfill_order_lines_undiscountedUnitPrice_net; -} - -export interface FulfillOrder_orderFulfill_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: FulfillOrder_orderFulfill_order_lines_unitPrice_gross; - net: FulfillOrder_orderFulfill_order_lines_unitPrice_net; -} - -export interface FulfillOrder_orderFulfill_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface FulfillOrder_orderFulfill_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: FulfillOrder_orderFulfill_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: FulfillOrder_orderFulfill_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: FulfillOrder_orderFulfill_order_lines_undiscountedUnitPrice; - unitPrice: FulfillOrder_orderFulfill_order_lines_unitPrice; - thumbnail: FulfillOrder_orderFulfill_order_lines_thumbnail | null; -} - -export interface FulfillOrder_orderFulfill_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface FulfillOrder_orderFulfill_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: FulfillOrder_orderFulfill_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface FulfillOrder_orderFulfill_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface FulfillOrder_orderFulfill_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type FulfillOrder_orderFulfill_order_deliveryMethod = FulfillOrder_orderFulfill_order_deliveryMethod_ShippingMethod | FulfillOrder_orderFulfill_order_deliveryMethod_Warehouse; - -export interface FulfillOrder_orderFulfill_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface FulfillOrder_orderFulfill_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_shippingPrice { - __typename: "TaxedMoney"; - gross: FulfillOrder_orderFulfill_order_shippingPrice_gross; -} - -export interface FulfillOrder_orderFulfill_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_subtotal { - __typename: "TaxedMoney"; - gross: FulfillOrder_orderFulfill_order_subtotal_gross; - net: FulfillOrder_orderFulfill_order_subtotal_net; -} - -export interface FulfillOrder_orderFulfill_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_total { - __typename: "TaxedMoney"; - gross: FulfillOrder_orderFulfill_order_total_gross; - net: FulfillOrder_orderFulfill_order_total_net; - tax: FulfillOrder_orderFulfill_order_total_tax; -} - -export interface FulfillOrder_orderFulfill_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: FulfillOrder_orderFulfill_order_undiscountedTotal_net; - gross: FulfillOrder_orderFulfill_order_undiscountedTotal_gross; -} - -export interface FulfillOrder_orderFulfill_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface FulfillOrder_orderFulfill_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface FulfillOrder_orderFulfill_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: FulfillOrder_orderFulfill_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface FulfillOrder_orderFulfill_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface FulfillOrder_orderFulfill_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface FulfillOrder_orderFulfill_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: FulfillOrder_orderFulfill_order_channel_defaultCountry; -} - -export interface FulfillOrder_orderFulfill_order { - __typename: "Order"; - id: string; - token: string; - metadata: (FulfillOrder_orderFulfill_order_metadata | null)[]; - privateMetadata: (FulfillOrder_orderFulfill_order_privateMetadata | null)[]; - billingAddress: FulfillOrder_orderFulfill_order_billingAddress | null; - giftCards: (FulfillOrder_orderFulfill_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: FulfillOrder_orderFulfill_order_discounts[] | null; - events: (FulfillOrder_orderFulfill_order_events | null)[] | null; - fulfillments: (FulfillOrder_orderFulfill_order_fulfillments | null)[]; - lines: (FulfillOrder_orderFulfill_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: FulfillOrder_orderFulfill_order_shippingAddress | null; - deliveryMethod: FulfillOrder_orderFulfill_order_deliveryMethod | null; - shippingMethod: FulfillOrder_orderFulfill_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: FulfillOrder_orderFulfill_order_shippingPrice; - status: OrderStatus; - subtotal: FulfillOrder_orderFulfill_order_subtotal; - total: FulfillOrder_orderFulfill_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: FulfillOrder_orderFulfill_order_totalAuthorized; - totalCaptured: FulfillOrder_orderFulfill_order_totalCaptured; - undiscountedTotal: FulfillOrder_orderFulfill_order_undiscountedTotal; - user: FulfillOrder_orderFulfill_order_user | null; - userEmail: string | null; - shippingMethods: (FulfillOrder_orderFulfill_order_shippingMethods | null)[] | null; - invoices: (FulfillOrder_orderFulfill_order_invoices | null)[] | null; - channel: FulfillOrder_orderFulfill_order_channel; -} - -export interface FulfillOrder_orderFulfill { - __typename: "OrderFulfill"; - errors: FulfillOrder_orderFulfill_errors[]; - order: FulfillOrder_orderFulfill_order | null; -} - -export interface FulfillOrder { - orderFulfill: FulfillOrder_orderFulfill | null; -} - -export interface FulfillOrderVariables { - orderId: string; - input: OrderFulfillInput; -} diff --git a/src/orders/types/FulfillmentReturnProducts.ts b/src/orders/types/FulfillmentReturnProducts.ts deleted file mode 100644 index cf64cc220..000000000 --- a/src/orders/types/FulfillmentReturnProducts.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderReturnProductsInput, OrderErrorCode, AddressTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: FulfillmentReturnProducts -// ==================================================== - -export interface FulfillmentReturnProducts_orderFulfillmentReturnProducts_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface FulfillmentReturnProducts_orderFulfillmentReturnProducts_order { - __typename: "Order"; - id: string; -} - -export interface FulfillmentReturnProducts_orderFulfillmentReturnProducts_replaceOrder { - __typename: "Order"; - id: string; -} - -export interface FulfillmentReturnProducts_orderFulfillmentReturnProducts { - __typename: "FulfillmentReturnProducts"; - errors: FulfillmentReturnProducts_orderFulfillmentReturnProducts_errors[]; - order: FulfillmentReturnProducts_orderFulfillmentReturnProducts_order | null; - replaceOrder: FulfillmentReturnProducts_orderFulfillmentReturnProducts_replaceOrder | null; -} - -export interface FulfillmentReturnProducts { - orderFulfillmentReturnProducts: FulfillmentReturnProducts_orderFulfillmentReturnProducts | null; -} - -export interface FulfillmentReturnProductsVariables { - id: string; - input: OrderReturnProductsInput; -} diff --git a/src/orders/types/InvoiceEmailSend.ts b/src/orders/types/InvoiceEmailSend.ts deleted file mode 100644 index fc1558949..000000000 --- a/src/orders/types/InvoiceEmailSend.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { InvoiceErrorCode, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: InvoiceEmailSend -// ==================================================== - -export interface InvoiceEmailSend_invoiceSendNotification_errors { - __typename: "InvoiceError"; - code: InvoiceErrorCode; - field: string | null; - message: string | null; -} - -export interface InvoiceEmailSend_invoiceSendNotification_invoice { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface InvoiceEmailSend_invoiceSendNotification { - __typename: "InvoiceSendNotification"; - errors: InvoiceEmailSend_invoiceSendNotification_errors[]; - invoice: InvoiceEmailSend_invoiceSendNotification_invoice | null; -} - -export interface InvoiceEmailSend { - invoiceSendNotification: InvoiceEmailSend_invoiceSendNotification | null; -} - -export interface InvoiceEmailSendVariables { - id: string; -} diff --git a/src/orders/types/InvoiceRequest.ts b/src/orders/types/InvoiceRequest.ts deleted file mode 100644 index bcb3ac5fc..000000000 --- a/src/orders/types/InvoiceRequest.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { InvoiceErrorCode, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: InvoiceRequest -// ==================================================== - -export interface InvoiceRequest_invoiceRequest_errors { - __typename: "InvoiceError"; - code: InvoiceErrorCode; - field: string | null; - message: string | null; -} - -export interface InvoiceRequest_invoiceRequest_invoice { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface InvoiceRequest_invoiceRequest_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface InvoiceRequest_invoiceRequest_order { - __typename: "Order"; - id: string; - invoices: (InvoiceRequest_invoiceRequest_order_invoices | null)[] | null; -} - -export interface InvoiceRequest_invoiceRequest { - __typename: "InvoiceRequest"; - errors: InvoiceRequest_invoiceRequest_errors[]; - invoice: InvoiceRequest_invoiceRequest_invoice | null; - order: InvoiceRequest_invoiceRequest_order | null; -} - -export interface InvoiceRequest { - invoiceRequest: InvoiceRequest_invoiceRequest | null; -} - -export interface InvoiceRequestVariables { - orderId: string; -} diff --git a/src/orders/types/OrderAddNote.ts b/src/orders/types/OrderAddNote.ts deleted file mode 100644 index 58ec9ae87..000000000 --- a/src/orders/types/OrderAddNote.ts +++ /dev/null @@ -1,141 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderAddNoteInput, OrderErrorCode, AddressTypeEnum, OrderEventsEmailsEnum, DiscountValueTypeEnum, OrderEventsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderAddNote -// ==================================================== - -export interface OrderAddNote_orderAddNote_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderAddNote_orderAddNote_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderAddNote_orderAddNote_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderAddNote_orderAddNote_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderAddNote_orderAddNote_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderAddNote_orderAddNote_order_events_discount_oldAmount | null; -} - -export interface OrderAddNote_orderAddNote_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderAddNote_orderAddNote_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderAddNote_orderAddNote_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderAddNote_orderAddNote_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderAddNote_orderAddNote_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderAddNote_orderAddNote_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderAddNote_orderAddNote_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderAddNote_orderAddNote_order_events_lines_discount_oldAmount | null; -} - -export interface OrderAddNote_orderAddNote_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderAddNote_orderAddNote_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderAddNote_orderAddNote_order_events_lines_discount | null; - orderLine: OrderAddNote_orderAddNote_order_events_lines_orderLine | null; -} - -export interface OrderAddNote_orderAddNote_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderAddNote_orderAddNote_order_events_discount | null; - relatedOrder: OrderAddNote_orderAddNote_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderAddNote_orderAddNote_order_events_user | null; - app: OrderAddNote_orderAddNote_order_events_app | null; - lines: (OrderAddNote_orderAddNote_order_events_lines | null)[] | null; -} - -export interface OrderAddNote_orderAddNote_order { - __typename: "Order"; - id: string; - events: (OrderAddNote_orderAddNote_order_events | null)[] | null; -} - -export interface OrderAddNote_orderAddNote { - __typename: "OrderAddNote"; - errors: OrderAddNote_orderAddNote_errors[]; - order: OrderAddNote_orderAddNote_order | null; -} - -export interface OrderAddNote { - orderAddNote: OrderAddNote_orderAddNote | null; -} - -export interface OrderAddNoteVariables { - order: string; - input: OrderAddNoteInput; -} diff --git a/src/orders/types/OrderCancel.ts b/src/orders/types/OrderCancel.ts deleted file mode 100644 index 9284b876b..000000000 --- a/src/orders/types/OrderCancel.ts +++ /dev/null @@ -1,618 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderCancel -// ==================================================== - -export interface OrderCancel_orderCancel_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderCancel_orderCancel_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderCancel_orderCancel_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderCancel_orderCancel_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderCancel_orderCancel_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderCancel_orderCancel_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderCancel_orderCancel_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderCancel_orderCancel_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderCancel_orderCancel_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderCancel_orderCancel_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderCancel_orderCancel_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderCancel_orderCancel_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderCancel_orderCancel_order_giftCards_events_balance | null; -} - -export interface OrderCancel_orderCancel_order_giftCards { - __typename: "GiftCard"; - events: OrderCancel_orderCancel_order_giftCards_events[]; -} - -export interface OrderCancel_orderCancel_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderCancel_orderCancel_order_discounts_amount; -} - -export interface OrderCancel_orderCancel_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderCancel_orderCancel_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderCancel_orderCancel_order_events_discount_oldAmount | null; -} - -export interface OrderCancel_orderCancel_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderCancel_orderCancel_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderCancel_orderCancel_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderCancel_orderCancel_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderCancel_orderCancel_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderCancel_orderCancel_order_events_lines_discount_oldAmount | null; -} - -export interface OrderCancel_orderCancel_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderCancel_orderCancel_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderCancel_orderCancel_order_events_lines_discount | null; - orderLine: OrderCancel_orderCancel_order_events_lines_orderLine | null; -} - -export interface OrderCancel_orderCancel_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderCancel_orderCancel_order_events_discount | null; - relatedOrder: OrderCancel_orderCancel_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderCancel_orderCancel_order_events_user | null; - app: OrderCancel_orderCancel_order_events_app | null; - lines: (OrderCancel_orderCancel_order_events_lines | null)[] | null; -} - -export interface OrderCancel_orderCancel_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderCancel_orderCancel_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderCancel_orderCancel_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderCancel_orderCancel_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderCancel_orderCancel_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderCancel_orderCancel_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderCancel_orderCancel_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderCancel_orderCancel_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderCancel_orderCancel_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderCancel_orderCancel_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderCancel_orderCancel_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderCancel_orderCancel_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderCancel_orderCancel_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderCancel_orderCancel_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderCancel_orderCancel_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderCancel_orderCancel_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderCancel_orderCancel_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderCancel_orderCancel_order_fulfillments_lines_orderLine | null; -} - -export interface OrderCancel_orderCancel_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderCancel_orderCancel_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderCancel_orderCancel_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderCancel_orderCancel_order_fulfillments_warehouse | null; -} - -export interface OrderCancel_orderCancel_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderCancel_orderCancel_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderCancel_orderCancel_order_lines_variant_preorder | null; -} - -export interface OrderCancel_orderCancel_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderCancel_orderCancel_order_lines_undiscountedUnitPrice_gross; - net: OrderCancel_orderCancel_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderCancel_orderCancel_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderCancel_orderCancel_order_lines_unitPrice_gross; - net: OrderCancel_orderCancel_order_lines_unitPrice_net; -} - -export interface OrderCancel_orderCancel_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderCancel_orderCancel_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderCancel_orderCancel_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderCancel_orderCancel_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderCancel_orderCancel_order_lines_undiscountedUnitPrice; - unitPrice: OrderCancel_orderCancel_order_lines_unitPrice; - thumbnail: OrderCancel_orderCancel_order_lines_thumbnail | null; -} - -export interface OrderCancel_orderCancel_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderCancel_orderCancel_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderCancel_orderCancel_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderCancel_orderCancel_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderCancel_orderCancel_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderCancel_orderCancel_order_deliveryMethod = OrderCancel_orderCancel_order_deliveryMethod_ShippingMethod | OrderCancel_orderCancel_order_deliveryMethod_Warehouse; - -export interface OrderCancel_orderCancel_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderCancel_orderCancel_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderCancel_orderCancel_order_shippingPrice_gross; -} - -export interface OrderCancel_orderCancel_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderCancel_orderCancel_order_subtotal_gross; - net: OrderCancel_orderCancel_order_subtotal_net; -} - -export interface OrderCancel_orderCancel_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_total { - __typename: "TaxedMoney"; - gross: OrderCancel_orderCancel_order_total_gross; - net: OrderCancel_orderCancel_order_total_net; - tax: OrderCancel_orderCancel_order_total_tax; -} - -export interface OrderCancel_orderCancel_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderCancel_orderCancel_order_undiscountedTotal_net; - gross: OrderCancel_orderCancel_order_undiscountedTotal_gross; -} - -export interface OrderCancel_orderCancel_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderCancel_orderCancel_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCancel_orderCancel_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderCancel_orderCancel_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderCancel_orderCancel_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderCancel_orderCancel_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderCancel_orderCancel_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderCancel_orderCancel_order_channel_defaultCountry; -} - -export interface OrderCancel_orderCancel_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderCancel_orderCancel_order_metadata | null)[]; - privateMetadata: (OrderCancel_orderCancel_order_privateMetadata | null)[]; - billingAddress: OrderCancel_orderCancel_order_billingAddress | null; - giftCards: (OrderCancel_orderCancel_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderCancel_orderCancel_order_discounts[] | null; - events: (OrderCancel_orderCancel_order_events | null)[] | null; - fulfillments: (OrderCancel_orderCancel_order_fulfillments | null)[]; - lines: (OrderCancel_orderCancel_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderCancel_orderCancel_order_shippingAddress | null; - deliveryMethod: OrderCancel_orderCancel_order_deliveryMethod | null; - shippingMethod: OrderCancel_orderCancel_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderCancel_orderCancel_order_shippingPrice; - status: OrderStatus; - subtotal: OrderCancel_orderCancel_order_subtotal; - total: OrderCancel_orderCancel_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderCancel_orderCancel_order_totalAuthorized; - totalCaptured: OrderCancel_orderCancel_order_totalCaptured; - undiscountedTotal: OrderCancel_orderCancel_order_undiscountedTotal; - user: OrderCancel_orderCancel_order_user | null; - userEmail: string | null; - shippingMethods: (OrderCancel_orderCancel_order_shippingMethods | null)[] | null; - invoices: (OrderCancel_orderCancel_order_invoices | null)[] | null; - channel: OrderCancel_orderCancel_order_channel; -} - -export interface OrderCancel_orderCancel { - __typename: "OrderCancel"; - errors: OrderCancel_orderCancel_errors[]; - order: OrderCancel_orderCancel_order | null; -} - -export interface OrderCancel { - orderCancel: OrderCancel_orderCancel | null; -} - -export interface OrderCancelVariables { - id: string; -} diff --git a/src/orders/types/OrderCapture.ts b/src/orders/types/OrderCapture.ts deleted file mode 100644 index 699993af5..000000000 --- a/src/orders/types/OrderCapture.ts +++ /dev/null @@ -1,619 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderCapture -// ==================================================== - -export interface OrderCapture_orderCapture_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderCapture_orderCapture_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderCapture_orderCapture_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderCapture_orderCapture_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderCapture_orderCapture_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderCapture_orderCapture_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderCapture_orderCapture_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderCapture_orderCapture_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderCapture_orderCapture_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderCapture_orderCapture_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderCapture_orderCapture_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderCapture_orderCapture_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderCapture_orderCapture_order_giftCards_events_balance | null; -} - -export interface OrderCapture_orderCapture_order_giftCards { - __typename: "GiftCard"; - events: OrderCapture_orderCapture_order_giftCards_events[]; -} - -export interface OrderCapture_orderCapture_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderCapture_orderCapture_order_discounts_amount; -} - -export interface OrderCapture_orderCapture_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderCapture_orderCapture_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderCapture_orderCapture_order_events_discount_oldAmount | null; -} - -export interface OrderCapture_orderCapture_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderCapture_orderCapture_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderCapture_orderCapture_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderCapture_orderCapture_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderCapture_orderCapture_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderCapture_orderCapture_order_events_lines_discount_oldAmount | null; -} - -export interface OrderCapture_orderCapture_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderCapture_orderCapture_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderCapture_orderCapture_order_events_lines_discount | null; - orderLine: OrderCapture_orderCapture_order_events_lines_orderLine | null; -} - -export interface OrderCapture_orderCapture_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderCapture_orderCapture_order_events_discount | null; - relatedOrder: OrderCapture_orderCapture_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderCapture_orderCapture_order_events_user | null; - app: OrderCapture_orderCapture_order_events_app | null; - lines: (OrderCapture_orderCapture_order_events_lines | null)[] | null; -} - -export interface OrderCapture_orderCapture_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderCapture_orderCapture_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderCapture_orderCapture_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderCapture_orderCapture_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderCapture_orderCapture_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderCapture_orderCapture_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderCapture_orderCapture_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderCapture_orderCapture_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderCapture_orderCapture_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderCapture_orderCapture_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderCapture_orderCapture_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderCapture_orderCapture_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderCapture_orderCapture_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderCapture_orderCapture_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderCapture_orderCapture_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderCapture_orderCapture_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderCapture_orderCapture_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderCapture_orderCapture_order_fulfillments_lines_orderLine | null; -} - -export interface OrderCapture_orderCapture_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderCapture_orderCapture_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderCapture_orderCapture_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderCapture_orderCapture_order_fulfillments_warehouse | null; -} - -export interface OrderCapture_orderCapture_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderCapture_orderCapture_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderCapture_orderCapture_order_lines_variant_preorder | null; -} - -export interface OrderCapture_orderCapture_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderCapture_orderCapture_order_lines_undiscountedUnitPrice_gross; - net: OrderCapture_orderCapture_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderCapture_orderCapture_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderCapture_orderCapture_order_lines_unitPrice_gross; - net: OrderCapture_orderCapture_order_lines_unitPrice_net; -} - -export interface OrderCapture_orderCapture_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderCapture_orderCapture_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderCapture_orderCapture_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderCapture_orderCapture_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderCapture_orderCapture_order_lines_undiscountedUnitPrice; - unitPrice: OrderCapture_orderCapture_order_lines_unitPrice; - thumbnail: OrderCapture_orderCapture_order_lines_thumbnail | null; -} - -export interface OrderCapture_orderCapture_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderCapture_orderCapture_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderCapture_orderCapture_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderCapture_orderCapture_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderCapture_orderCapture_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderCapture_orderCapture_order_deliveryMethod = OrderCapture_orderCapture_order_deliveryMethod_ShippingMethod | OrderCapture_orderCapture_order_deliveryMethod_Warehouse; - -export interface OrderCapture_orderCapture_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderCapture_orderCapture_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderCapture_orderCapture_order_shippingPrice_gross; -} - -export interface OrderCapture_orderCapture_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderCapture_orderCapture_order_subtotal_gross; - net: OrderCapture_orderCapture_order_subtotal_net; -} - -export interface OrderCapture_orderCapture_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_total { - __typename: "TaxedMoney"; - gross: OrderCapture_orderCapture_order_total_gross; - net: OrderCapture_orderCapture_order_total_net; - tax: OrderCapture_orderCapture_order_total_tax; -} - -export interface OrderCapture_orderCapture_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderCapture_orderCapture_order_undiscountedTotal_net; - gross: OrderCapture_orderCapture_order_undiscountedTotal_gross; -} - -export interface OrderCapture_orderCapture_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderCapture_orderCapture_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderCapture_orderCapture_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderCapture_orderCapture_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderCapture_orderCapture_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderCapture_orderCapture_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderCapture_orderCapture_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderCapture_orderCapture_order_channel_defaultCountry; -} - -export interface OrderCapture_orderCapture_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderCapture_orderCapture_order_metadata | null)[]; - privateMetadata: (OrderCapture_orderCapture_order_privateMetadata | null)[]; - billingAddress: OrderCapture_orderCapture_order_billingAddress | null; - giftCards: (OrderCapture_orderCapture_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderCapture_orderCapture_order_discounts[] | null; - events: (OrderCapture_orderCapture_order_events | null)[] | null; - fulfillments: (OrderCapture_orderCapture_order_fulfillments | null)[]; - lines: (OrderCapture_orderCapture_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderCapture_orderCapture_order_shippingAddress | null; - deliveryMethod: OrderCapture_orderCapture_order_deliveryMethod | null; - shippingMethod: OrderCapture_orderCapture_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderCapture_orderCapture_order_shippingPrice; - status: OrderStatus; - subtotal: OrderCapture_orderCapture_order_subtotal; - total: OrderCapture_orderCapture_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderCapture_orderCapture_order_totalAuthorized; - totalCaptured: OrderCapture_orderCapture_order_totalCaptured; - undiscountedTotal: OrderCapture_orderCapture_order_undiscountedTotal; - user: OrderCapture_orderCapture_order_user | null; - userEmail: string | null; - shippingMethods: (OrderCapture_orderCapture_order_shippingMethods | null)[] | null; - invoices: (OrderCapture_orderCapture_order_invoices | null)[] | null; - channel: OrderCapture_orderCapture_order_channel; -} - -export interface OrderCapture_orderCapture { - __typename: "OrderCapture"; - errors: OrderCapture_orderCapture_errors[]; - order: OrderCapture_orderCapture_order | null; -} - -export interface OrderCapture { - orderCapture: OrderCapture_orderCapture | null; -} - -export interface OrderCaptureVariables { - id: string; - amount: any; -} diff --git a/src/orders/types/OrderConfirm.ts b/src/orders/types/OrderConfirm.ts deleted file mode 100644 index e1296ee0e..000000000 --- a/src/orders/types/OrderConfirm.ts +++ /dev/null @@ -1,618 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderConfirm -// ==================================================== - -export interface OrderConfirm_orderConfirm_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderConfirm_orderConfirm_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderConfirm_orderConfirm_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderConfirm_orderConfirm_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderConfirm_orderConfirm_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderConfirm_orderConfirm_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderConfirm_orderConfirm_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderConfirm_orderConfirm_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderConfirm_orderConfirm_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderConfirm_orderConfirm_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderConfirm_orderConfirm_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderConfirm_orderConfirm_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderConfirm_orderConfirm_order_giftCards_events_balance | null; -} - -export interface OrderConfirm_orderConfirm_order_giftCards { - __typename: "GiftCard"; - events: OrderConfirm_orderConfirm_order_giftCards_events[]; -} - -export interface OrderConfirm_orderConfirm_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderConfirm_orderConfirm_order_discounts_amount; -} - -export interface OrderConfirm_orderConfirm_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderConfirm_orderConfirm_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderConfirm_orderConfirm_order_events_discount_oldAmount | null; -} - -export interface OrderConfirm_orderConfirm_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderConfirm_orderConfirm_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderConfirm_orderConfirm_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderConfirm_orderConfirm_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderConfirm_orderConfirm_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderConfirm_orderConfirm_order_events_lines_discount_oldAmount | null; -} - -export interface OrderConfirm_orderConfirm_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderConfirm_orderConfirm_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderConfirm_orderConfirm_order_events_lines_discount | null; - orderLine: OrderConfirm_orderConfirm_order_events_lines_orderLine | null; -} - -export interface OrderConfirm_orderConfirm_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderConfirm_orderConfirm_order_events_discount | null; - relatedOrder: OrderConfirm_orderConfirm_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderConfirm_orderConfirm_order_events_user | null; - app: OrderConfirm_orderConfirm_order_events_app | null; - lines: (OrderConfirm_orderConfirm_order_events_lines | null)[] | null; -} - -export interface OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderConfirm_orderConfirm_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderConfirm_orderConfirm_order_fulfillments_lines_orderLine | null; -} - -export interface OrderConfirm_orderConfirm_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderConfirm_orderConfirm_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderConfirm_orderConfirm_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderConfirm_orderConfirm_order_fulfillments_warehouse | null; -} - -export interface OrderConfirm_orderConfirm_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderConfirm_orderConfirm_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderConfirm_orderConfirm_order_lines_variant_preorder | null; -} - -export interface OrderConfirm_orderConfirm_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderConfirm_orderConfirm_order_lines_undiscountedUnitPrice_gross; - net: OrderConfirm_orderConfirm_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderConfirm_orderConfirm_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderConfirm_orderConfirm_order_lines_unitPrice_gross; - net: OrderConfirm_orderConfirm_order_lines_unitPrice_net; -} - -export interface OrderConfirm_orderConfirm_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderConfirm_orderConfirm_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderConfirm_orderConfirm_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderConfirm_orderConfirm_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderConfirm_orderConfirm_order_lines_undiscountedUnitPrice; - unitPrice: OrderConfirm_orderConfirm_order_lines_unitPrice; - thumbnail: OrderConfirm_orderConfirm_order_lines_thumbnail | null; -} - -export interface OrderConfirm_orderConfirm_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderConfirm_orderConfirm_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderConfirm_orderConfirm_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderConfirm_orderConfirm_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderConfirm_orderConfirm_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderConfirm_orderConfirm_order_deliveryMethod = OrderConfirm_orderConfirm_order_deliveryMethod_ShippingMethod | OrderConfirm_orderConfirm_order_deliveryMethod_Warehouse; - -export interface OrderConfirm_orderConfirm_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderConfirm_orderConfirm_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderConfirm_orderConfirm_order_shippingPrice_gross; -} - -export interface OrderConfirm_orderConfirm_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderConfirm_orderConfirm_order_subtotal_gross; - net: OrderConfirm_orderConfirm_order_subtotal_net; -} - -export interface OrderConfirm_orderConfirm_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_total { - __typename: "TaxedMoney"; - gross: OrderConfirm_orderConfirm_order_total_gross; - net: OrderConfirm_orderConfirm_order_total_net; - tax: OrderConfirm_orderConfirm_order_total_tax; -} - -export interface OrderConfirm_orderConfirm_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderConfirm_orderConfirm_order_undiscountedTotal_net; - gross: OrderConfirm_orderConfirm_order_undiscountedTotal_gross; -} - -export interface OrderConfirm_orderConfirm_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderConfirm_orderConfirm_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderConfirm_orderConfirm_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderConfirm_orderConfirm_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderConfirm_orderConfirm_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderConfirm_orderConfirm_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderConfirm_orderConfirm_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderConfirm_orderConfirm_order_channel_defaultCountry; -} - -export interface OrderConfirm_orderConfirm_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderConfirm_orderConfirm_order_metadata | null)[]; - privateMetadata: (OrderConfirm_orderConfirm_order_privateMetadata | null)[]; - billingAddress: OrderConfirm_orderConfirm_order_billingAddress | null; - giftCards: (OrderConfirm_orderConfirm_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderConfirm_orderConfirm_order_discounts[] | null; - events: (OrderConfirm_orderConfirm_order_events | null)[] | null; - fulfillments: (OrderConfirm_orderConfirm_order_fulfillments | null)[]; - lines: (OrderConfirm_orderConfirm_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderConfirm_orderConfirm_order_shippingAddress | null; - deliveryMethod: OrderConfirm_orderConfirm_order_deliveryMethod | null; - shippingMethod: OrderConfirm_orderConfirm_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderConfirm_orderConfirm_order_shippingPrice; - status: OrderStatus; - subtotal: OrderConfirm_orderConfirm_order_subtotal; - total: OrderConfirm_orderConfirm_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderConfirm_orderConfirm_order_totalAuthorized; - totalCaptured: OrderConfirm_orderConfirm_order_totalCaptured; - undiscountedTotal: OrderConfirm_orderConfirm_order_undiscountedTotal; - user: OrderConfirm_orderConfirm_order_user | null; - userEmail: string | null; - shippingMethods: (OrderConfirm_orderConfirm_order_shippingMethods | null)[] | null; - invoices: (OrderConfirm_orderConfirm_order_invoices | null)[] | null; - channel: OrderConfirm_orderConfirm_order_channel; -} - -export interface OrderConfirm_orderConfirm { - __typename: "OrderConfirm"; - errors: OrderConfirm_orderConfirm_errors[]; - order: OrderConfirm_orderConfirm_order | null; -} - -export interface OrderConfirm { - orderConfirm: OrderConfirm_orderConfirm | null; -} - -export interface OrderConfirmVariables { - id: string; -} diff --git a/src/orders/types/OrderDetails.ts b/src/orders/types/OrderDetails.ts deleted file mode 100644 index 608a1e9a4..000000000 --- a/src/orders/types/OrderDetails.ts +++ /dev/null @@ -1,619 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum, WeightUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: OrderDetails -// ==================================================== - -export interface OrderDetails_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderDetails_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderDetails_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderDetails_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderDetails_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderDetails_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderDetails_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderDetails_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderDetails_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderDetails_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderDetails_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderDetails_order_giftCards_events_balance | null; -} - -export interface OrderDetails_order_giftCards { - __typename: "GiftCard"; - events: OrderDetails_order_giftCards_events[]; -} - -export interface OrderDetails_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDetails_order_discounts_amount; -} - -export interface OrderDetails_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDetails_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderDetails_order_events_discount_oldAmount | null; -} - -export interface OrderDetails_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderDetails_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderDetails_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderDetails_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDetails_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderDetails_order_events_lines_discount_oldAmount | null; -} - -export interface OrderDetails_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderDetails_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderDetails_order_events_lines_discount | null; - orderLine: OrderDetails_order_events_lines_orderLine | null; -} - -export interface OrderDetails_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderDetails_order_events_discount | null; - relatedOrder: OrderDetails_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderDetails_order_events_user | null; - app: OrderDetails_order_events_app | null; - lines: (OrderDetails_order_events_lines | null)[] | null; -} - -export interface OrderDetails_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderDetails_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderDetails_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderDetails_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderDetails_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderDetails_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderDetails_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderDetails_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderDetails_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderDetails_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderDetails_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderDetails_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderDetails_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderDetails_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderDetails_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderDetails_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderDetails_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderDetails_order_fulfillments_lines_orderLine | null; -} - -export interface OrderDetails_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderDetails_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderDetails_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderDetails_order_fulfillments_warehouse | null; -} - -export interface OrderDetails_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderDetails_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderDetails_order_lines_variant_preorder | null; -} - -export interface OrderDetails_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderDetails_order_lines_undiscountedUnitPrice_gross; - net: OrderDetails_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderDetails_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderDetails_order_lines_unitPrice_gross; - net: OrderDetails_order_lines_unitPrice_net; -} - -export interface OrderDetails_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderDetails_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderDetails_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderDetails_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderDetails_order_lines_undiscountedUnitPrice; - unitPrice: OrderDetails_order_lines_unitPrice; - thumbnail: OrderDetails_order_lines_thumbnail | null; -} - -export interface OrderDetails_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderDetails_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderDetails_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderDetails_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderDetails_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderDetails_order_deliveryMethod = OrderDetails_order_deliveryMethod_ShippingMethod | OrderDetails_order_deliveryMethod_Warehouse; - -export interface OrderDetails_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderDetails_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderDetails_order_shippingPrice_gross; -} - -export interface OrderDetails_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderDetails_order_subtotal_gross; - net: OrderDetails_order_subtotal_net; -} - -export interface OrderDetails_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_total { - __typename: "TaxedMoney"; - gross: OrderDetails_order_total_gross; - net: OrderDetails_order_total_net; - tax: OrderDetails_order_total_tax; -} - -export interface OrderDetails_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderDetails_order_undiscountedTotal_net; - gross: OrderDetails_order_undiscountedTotal_gross; -} - -export interface OrderDetails_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderDetails_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDetails_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderDetails_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderDetails_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderDetails_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderDetails_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderDetails_order_channel_defaultCountry; -} - -export interface OrderDetails_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderDetails_order_metadata | null)[]; - privateMetadata: (OrderDetails_order_privateMetadata | null)[]; - billingAddress: OrderDetails_order_billingAddress | null; - giftCards: (OrderDetails_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderDetails_order_discounts[] | null; - events: (OrderDetails_order_events | null)[] | null; - fulfillments: (OrderDetails_order_fulfillments | null)[]; - lines: (OrderDetails_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderDetails_order_shippingAddress | null; - deliveryMethod: OrderDetails_order_deliveryMethod | null; - shippingMethod: OrderDetails_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderDetails_order_shippingPrice; - status: OrderStatus; - subtotal: OrderDetails_order_subtotal; - total: OrderDetails_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderDetails_order_totalAuthorized; - totalCaptured: OrderDetails_order_totalCaptured; - undiscountedTotal: OrderDetails_order_undiscountedTotal; - user: OrderDetails_order_user | null; - userEmail: string | null; - shippingMethods: (OrderDetails_order_shippingMethods | null)[] | null; - invoices: (OrderDetails_order_invoices | null)[] | null; - channel: OrderDetails_order_channel; -} - -export interface OrderDetails_shop_countries { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderDetails_shop { - __typename: "Shop"; - countries: OrderDetails_shop_countries[]; - defaultWeightUnit: WeightUnitsEnum | null; - fulfillmentAllowUnpaid: boolean; - fulfillmentAutoApprove: boolean; -} - -export interface OrderDetails { - order: OrderDetails_order | null; - shop: OrderDetails_shop; -} - -export interface OrderDetailsVariables { - id: string; -} diff --git a/src/orders/types/OrderDiscountAdd.ts b/src/orders/types/OrderDiscountAdd.ts deleted file mode 100644 index 57885dd45..000000000 --- a/src/orders/types/OrderDiscountAdd.ts +++ /dev/null @@ -1,619 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderDiscountCommonInput, OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderDiscountAdd -// ==================================================== - -export interface OrderDiscountAdd_orderDiscountAdd_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderDiscountAdd_orderDiscountAdd_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderDiscountAdd_orderDiscountAdd_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderDiscountAdd_orderDiscountAdd_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderDiscountAdd_orderDiscountAdd_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderDiscountAdd_orderDiscountAdd_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderDiscountAdd_orderDiscountAdd_order_giftCards_events_balance | null; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_giftCards { - __typename: "GiftCard"; - events: OrderDiscountAdd_orderDiscountAdd_order_giftCards_events[]; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDiscountAdd_orderDiscountAdd_order_discounts_amount; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDiscountAdd_orderDiscountAdd_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderDiscountAdd_orderDiscountAdd_order_events_discount_oldAmount | null; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDiscountAdd_orderDiscountAdd_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderDiscountAdd_orderDiscountAdd_order_events_lines_discount_oldAmount | null; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderDiscountAdd_orderDiscountAdd_order_events_lines_discount | null; - orderLine: OrderDiscountAdd_orderDiscountAdd_order_events_lines_orderLine | null; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderDiscountAdd_orderDiscountAdd_order_events_discount | null; - relatedOrder: OrderDiscountAdd_orderDiscountAdd_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderDiscountAdd_orderDiscountAdd_order_events_user | null; - app: OrderDiscountAdd_orderDiscountAdd_order_events_app | null; - lines: (OrderDiscountAdd_orderDiscountAdd_order_events_lines | null)[] | null; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines_orderLine | null; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderDiscountAdd_orderDiscountAdd_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderDiscountAdd_orderDiscountAdd_order_fulfillments_warehouse | null; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderDiscountAdd_orderDiscountAdd_order_lines_variant_preorder | null; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderDiscountAdd_orderDiscountAdd_order_lines_undiscountedUnitPrice_gross; - net: OrderDiscountAdd_orderDiscountAdd_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderDiscountAdd_orderDiscountAdd_order_lines_unitPrice_gross; - net: OrderDiscountAdd_orderDiscountAdd_order_lines_unitPrice_net; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderDiscountAdd_orderDiscountAdd_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderDiscountAdd_orderDiscountAdd_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderDiscountAdd_orderDiscountAdd_order_lines_undiscountedUnitPrice; - unitPrice: OrderDiscountAdd_orderDiscountAdd_order_lines_unitPrice; - thumbnail: OrderDiscountAdd_orderDiscountAdd_order_lines_thumbnail | null; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderDiscountAdd_orderDiscountAdd_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderDiscountAdd_orderDiscountAdd_order_deliveryMethod = OrderDiscountAdd_orderDiscountAdd_order_deliveryMethod_ShippingMethod | OrderDiscountAdd_orderDiscountAdd_order_deliveryMethod_Warehouse; - -export interface OrderDiscountAdd_orderDiscountAdd_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderDiscountAdd_orderDiscountAdd_order_shippingPrice_gross; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderDiscountAdd_orderDiscountAdd_order_subtotal_gross; - net: OrderDiscountAdd_orderDiscountAdd_order_subtotal_net; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_total { - __typename: "TaxedMoney"; - gross: OrderDiscountAdd_orderDiscountAdd_order_total_gross; - net: OrderDiscountAdd_orderDiscountAdd_order_total_net; - tax: OrderDiscountAdd_orderDiscountAdd_order_total_tax; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderDiscountAdd_orderDiscountAdd_order_undiscountedTotal_net; - gross: OrderDiscountAdd_orderDiscountAdd_order_undiscountedTotal_gross; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderDiscountAdd_orderDiscountAdd_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderDiscountAdd_orderDiscountAdd_order_channel_defaultCountry; -} - -export interface OrderDiscountAdd_orderDiscountAdd_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderDiscountAdd_orderDiscountAdd_order_metadata | null)[]; - privateMetadata: (OrderDiscountAdd_orderDiscountAdd_order_privateMetadata | null)[]; - billingAddress: OrderDiscountAdd_orderDiscountAdd_order_billingAddress | null; - giftCards: (OrderDiscountAdd_orderDiscountAdd_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderDiscountAdd_orderDiscountAdd_order_discounts[] | null; - events: (OrderDiscountAdd_orderDiscountAdd_order_events | null)[] | null; - fulfillments: (OrderDiscountAdd_orderDiscountAdd_order_fulfillments | null)[]; - lines: (OrderDiscountAdd_orderDiscountAdd_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderDiscountAdd_orderDiscountAdd_order_shippingAddress | null; - deliveryMethod: OrderDiscountAdd_orderDiscountAdd_order_deliveryMethod | null; - shippingMethod: OrderDiscountAdd_orderDiscountAdd_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderDiscountAdd_orderDiscountAdd_order_shippingPrice; - status: OrderStatus; - subtotal: OrderDiscountAdd_orderDiscountAdd_order_subtotal; - total: OrderDiscountAdd_orderDiscountAdd_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderDiscountAdd_orderDiscountAdd_order_totalAuthorized; - totalCaptured: OrderDiscountAdd_orderDiscountAdd_order_totalCaptured; - undiscountedTotal: OrderDiscountAdd_orderDiscountAdd_order_undiscountedTotal; - user: OrderDiscountAdd_orderDiscountAdd_order_user | null; - userEmail: string | null; - shippingMethods: (OrderDiscountAdd_orderDiscountAdd_order_shippingMethods | null)[] | null; - invoices: (OrderDiscountAdd_orderDiscountAdd_order_invoices | null)[] | null; - channel: OrderDiscountAdd_orderDiscountAdd_order_channel; -} - -export interface OrderDiscountAdd_orderDiscountAdd { - __typename: "OrderDiscountAdd"; - errors: OrderDiscountAdd_orderDiscountAdd_errors[]; - order: OrderDiscountAdd_orderDiscountAdd_order | null; -} - -export interface OrderDiscountAdd { - orderDiscountAdd: OrderDiscountAdd_orderDiscountAdd | null; -} - -export interface OrderDiscountAddVariables { - input: OrderDiscountCommonInput; - orderId: string; -} diff --git a/src/orders/types/OrderDiscountDelete.ts b/src/orders/types/OrderDiscountDelete.ts deleted file mode 100644 index d4e2d1b2e..000000000 --- a/src/orders/types/OrderDiscountDelete.ts +++ /dev/null @@ -1,618 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderDiscountDelete -// ==================================================== - -export interface OrderDiscountDelete_orderDiscountDelete_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderDiscountDelete_orderDiscountDelete_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderDiscountDelete_orderDiscountDelete_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderDiscountDelete_orderDiscountDelete_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderDiscountDelete_orderDiscountDelete_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderDiscountDelete_orderDiscountDelete_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderDiscountDelete_orderDiscountDelete_order_giftCards_events_balance | null; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_giftCards { - __typename: "GiftCard"; - events: OrderDiscountDelete_orderDiscountDelete_order_giftCards_events[]; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDiscountDelete_orderDiscountDelete_order_discounts_amount; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDiscountDelete_orderDiscountDelete_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderDiscountDelete_orderDiscountDelete_order_events_discount_oldAmount | null; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDiscountDelete_orderDiscountDelete_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderDiscountDelete_orderDiscountDelete_order_events_lines_discount_oldAmount | null; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderDiscountDelete_orderDiscountDelete_order_events_lines_discount | null; - orderLine: OrderDiscountDelete_orderDiscountDelete_order_events_lines_orderLine | null; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderDiscountDelete_orderDiscountDelete_order_events_discount | null; - relatedOrder: OrderDiscountDelete_orderDiscountDelete_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderDiscountDelete_orderDiscountDelete_order_events_user | null; - app: OrderDiscountDelete_orderDiscountDelete_order_events_app | null; - lines: (OrderDiscountDelete_orderDiscountDelete_order_events_lines | null)[] | null; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines_orderLine | null; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderDiscountDelete_orderDiscountDelete_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderDiscountDelete_orderDiscountDelete_order_fulfillments_warehouse | null; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderDiscountDelete_orderDiscountDelete_order_lines_variant_preorder | null; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderDiscountDelete_orderDiscountDelete_order_lines_undiscountedUnitPrice_gross; - net: OrderDiscountDelete_orderDiscountDelete_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderDiscountDelete_orderDiscountDelete_order_lines_unitPrice_gross; - net: OrderDiscountDelete_orderDiscountDelete_order_lines_unitPrice_net; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderDiscountDelete_orderDiscountDelete_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderDiscountDelete_orderDiscountDelete_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderDiscountDelete_orderDiscountDelete_order_lines_undiscountedUnitPrice; - unitPrice: OrderDiscountDelete_orderDiscountDelete_order_lines_unitPrice; - thumbnail: OrderDiscountDelete_orderDiscountDelete_order_lines_thumbnail | null; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderDiscountDelete_orderDiscountDelete_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderDiscountDelete_orderDiscountDelete_order_deliveryMethod = OrderDiscountDelete_orderDiscountDelete_order_deliveryMethod_ShippingMethod | OrderDiscountDelete_orderDiscountDelete_order_deliveryMethod_Warehouse; - -export interface OrderDiscountDelete_orderDiscountDelete_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderDiscountDelete_orderDiscountDelete_order_shippingPrice_gross; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderDiscountDelete_orderDiscountDelete_order_subtotal_gross; - net: OrderDiscountDelete_orderDiscountDelete_order_subtotal_net; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_total { - __typename: "TaxedMoney"; - gross: OrderDiscountDelete_orderDiscountDelete_order_total_gross; - net: OrderDiscountDelete_orderDiscountDelete_order_total_net; - tax: OrderDiscountDelete_orderDiscountDelete_order_total_tax; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderDiscountDelete_orderDiscountDelete_order_undiscountedTotal_net; - gross: OrderDiscountDelete_orderDiscountDelete_order_undiscountedTotal_gross; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderDiscountDelete_orderDiscountDelete_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderDiscountDelete_orderDiscountDelete_order_channel_defaultCountry; -} - -export interface OrderDiscountDelete_orderDiscountDelete_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderDiscountDelete_orderDiscountDelete_order_metadata | null)[]; - privateMetadata: (OrderDiscountDelete_orderDiscountDelete_order_privateMetadata | null)[]; - billingAddress: OrderDiscountDelete_orderDiscountDelete_order_billingAddress | null; - giftCards: (OrderDiscountDelete_orderDiscountDelete_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderDiscountDelete_orderDiscountDelete_order_discounts[] | null; - events: (OrderDiscountDelete_orderDiscountDelete_order_events | null)[] | null; - fulfillments: (OrderDiscountDelete_orderDiscountDelete_order_fulfillments | null)[]; - lines: (OrderDiscountDelete_orderDiscountDelete_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderDiscountDelete_orderDiscountDelete_order_shippingAddress | null; - deliveryMethod: OrderDiscountDelete_orderDiscountDelete_order_deliveryMethod | null; - shippingMethod: OrderDiscountDelete_orderDiscountDelete_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderDiscountDelete_orderDiscountDelete_order_shippingPrice; - status: OrderStatus; - subtotal: OrderDiscountDelete_orderDiscountDelete_order_subtotal; - total: OrderDiscountDelete_orderDiscountDelete_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderDiscountDelete_orderDiscountDelete_order_totalAuthorized; - totalCaptured: OrderDiscountDelete_orderDiscountDelete_order_totalCaptured; - undiscountedTotal: OrderDiscountDelete_orderDiscountDelete_order_undiscountedTotal; - user: OrderDiscountDelete_orderDiscountDelete_order_user | null; - userEmail: string | null; - shippingMethods: (OrderDiscountDelete_orderDiscountDelete_order_shippingMethods | null)[] | null; - invoices: (OrderDiscountDelete_orderDiscountDelete_order_invoices | null)[] | null; - channel: OrderDiscountDelete_orderDiscountDelete_order_channel; -} - -export interface OrderDiscountDelete_orderDiscountDelete { - __typename: "OrderDiscountDelete"; - errors: OrderDiscountDelete_orderDiscountDelete_errors[]; - order: OrderDiscountDelete_orderDiscountDelete_order | null; -} - -export interface OrderDiscountDelete { - orderDiscountDelete: OrderDiscountDelete_orderDiscountDelete | null; -} - -export interface OrderDiscountDeleteVariables { - discountId: string; -} diff --git a/src/orders/types/OrderDiscountUpdate.ts b/src/orders/types/OrderDiscountUpdate.ts deleted file mode 100644 index 45079def6..000000000 --- a/src/orders/types/OrderDiscountUpdate.ts +++ /dev/null @@ -1,619 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderDiscountCommonInput, OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderDiscountUpdate -// ==================================================== - -export interface OrderDiscountUpdate_orderDiscountUpdate_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderDiscountUpdate_orderDiscountUpdate_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderDiscountUpdate_orderDiscountUpdate_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderDiscountUpdate_orderDiscountUpdate_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderDiscountUpdate_orderDiscountUpdate_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderDiscountUpdate_orderDiscountUpdate_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderDiscountUpdate_orderDiscountUpdate_order_giftCards_events_balance | null; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_giftCards { - __typename: "GiftCard"; - events: OrderDiscountUpdate_orderDiscountUpdate_order_giftCards_events[]; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDiscountUpdate_orderDiscountUpdate_order_discounts_amount; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDiscountUpdate_orderDiscountUpdate_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderDiscountUpdate_orderDiscountUpdate_order_events_discount_oldAmount | null; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDiscountUpdate_orderDiscountUpdate_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderDiscountUpdate_orderDiscountUpdate_order_events_lines_discount_oldAmount | null; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderDiscountUpdate_orderDiscountUpdate_order_events_lines_discount | null; - orderLine: OrderDiscountUpdate_orderDiscountUpdate_order_events_lines_orderLine | null; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderDiscountUpdate_orderDiscountUpdate_order_events_discount | null; - relatedOrder: OrderDiscountUpdate_orderDiscountUpdate_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderDiscountUpdate_orderDiscountUpdate_order_events_user | null; - app: OrderDiscountUpdate_orderDiscountUpdate_order_events_app | null; - lines: (OrderDiscountUpdate_orderDiscountUpdate_order_events_lines | null)[] | null; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines_orderLine | null; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments_warehouse | null; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderDiscountUpdate_orderDiscountUpdate_order_lines_variant_preorder | null; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderDiscountUpdate_orderDiscountUpdate_order_lines_undiscountedUnitPrice_gross; - net: OrderDiscountUpdate_orderDiscountUpdate_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderDiscountUpdate_orderDiscountUpdate_order_lines_unitPrice_gross; - net: OrderDiscountUpdate_orderDiscountUpdate_order_lines_unitPrice_net; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderDiscountUpdate_orderDiscountUpdate_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderDiscountUpdate_orderDiscountUpdate_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderDiscountUpdate_orderDiscountUpdate_order_lines_undiscountedUnitPrice; - unitPrice: OrderDiscountUpdate_orderDiscountUpdate_order_lines_unitPrice; - thumbnail: OrderDiscountUpdate_orderDiscountUpdate_order_lines_thumbnail | null; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderDiscountUpdate_orderDiscountUpdate_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderDiscountUpdate_orderDiscountUpdate_order_deliveryMethod = OrderDiscountUpdate_orderDiscountUpdate_order_deliveryMethod_ShippingMethod | OrderDiscountUpdate_orderDiscountUpdate_order_deliveryMethod_Warehouse; - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderDiscountUpdate_orderDiscountUpdate_order_shippingPrice_gross; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderDiscountUpdate_orderDiscountUpdate_order_subtotal_gross; - net: OrderDiscountUpdate_orderDiscountUpdate_order_subtotal_net; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_total { - __typename: "TaxedMoney"; - gross: OrderDiscountUpdate_orderDiscountUpdate_order_total_gross; - net: OrderDiscountUpdate_orderDiscountUpdate_order_total_net; - tax: OrderDiscountUpdate_orderDiscountUpdate_order_total_tax; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderDiscountUpdate_orderDiscountUpdate_order_undiscountedTotal_net; - gross: OrderDiscountUpdate_orderDiscountUpdate_order_undiscountedTotal_gross; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderDiscountUpdate_orderDiscountUpdate_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderDiscountUpdate_orderDiscountUpdate_order_channel_defaultCountry; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderDiscountUpdate_orderDiscountUpdate_order_metadata | null)[]; - privateMetadata: (OrderDiscountUpdate_orderDiscountUpdate_order_privateMetadata | null)[]; - billingAddress: OrderDiscountUpdate_orderDiscountUpdate_order_billingAddress | null; - giftCards: (OrderDiscountUpdate_orderDiscountUpdate_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderDiscountUpdate_orderDiscountUpdate_order_discounts[] | null; - events: (OrderDiscountUpdate_orderDiscountUpdate_order_events | null)[] | null; - fulfillments: (OrderDiscountUpdate_orderDiscountUpdate_order_fulfillments | null)[]; - lines: (OrderDiscountUpdate_orderDiscountUpdate_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderDiscountUpdate_orderDiscountUpdate_order_shippingAddress | null; - deliveryMethod: OrderDiscountUpdate_orderDiscountUpdate_order_deliveryMethod | null; - shippingMethod: OrderDiscountUpdate_orderDiscountUpdate_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderDiscountUpdate_orderDiscountUpdate_order_shippingPrice; - status: OrderStatus; - subtotal: OrderDiscountUpdate_orderDiscountUpdate_order_subtotal; - total: OrderDiscountUpdate_orderDiscountUpdate_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderDiscountUpdate_orderDiscountUpdate_order_totalAuthorized; - totalCaptured: OrderDiscountUpdate_orderDiscountUpdate_order_totalCaptured; - undiscountedTotal: OrderDiscountUpdate_orderDiscountUpdate_order_undiscountedTotal; - user: OrderDiscountUpdate_orderDiscountUpdate_order_user | null; - userEmail: string | null; - shippingMethods: (OrderDiscountUpdate_orderDiscountUpdate_order_shippingMethods | null)[] | null; - invoices: (OrderDiscountUpdate_orderDiscountUpdate_order_invoices | null)[] | null; - channel: OrderDiscountUpdate_orderDiscountUpdate_order_channel; -} - -export interface OrderDiscountUpdate_orderDiscountUpdate { - __typename: "OrderDiscountUpdate"; - errors: OrderDiscountUpdate_orderDiscountUpdate_errors[]; - order: OrderDiscountUpdate_orderDiscountUpdate_order | null; -} - -export interface OrderDiscountUpdate { - orderDiscountUpdate: OrderDiscountUpdate_orderDiscountUpdate | null; -} - -export interface OrderDiscountUpdateVariables { - input: OrderDiscountCommonInput; - discountId: string; -} diff --git a/src/orders/types/OrderDraftBulkCancel.ts b/src/orders/types/OrderDraftBulkCancel.ts deleted file mode 100644 index 445012a2c..000000000 --- a/src/orders/types/OrderDraftBulkCancel.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderErrorCode, AddressTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderDraftBulkCancel -// ==================================================== - -export interface OrderDraftBulkCancel_draftOrderBulkDelete_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderDraftBulkCancel_draftOrderBulkDelete { - __typename: "DraftOrderBulkDelete"; - errors: OrderDraftBulkCancel_draftOrderBulkDelete_errors[]; -} - -export interface OrderDraftBulkCancel { - draftOrderBulkDelete: OrderDraftBulkCancel_draftOrderBulkDelete | null; -} - -export interface OrderDraftBulkCancelVariables { - ids: (string | null)[]; -} diff --git a/src/orders/types/OrderDraftCancel.ts b/src/orders/types/OrderDraftCancel.ts deleted file mode 100644 index 57c0ebc3b..000000000 --- a/src/orders/types/OrderDraftCancel.ts +++ /dev/null @@ -1,618 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderDraftCancel -// ==================================================== - -export interface OrderDraftCancel_draftOrderDelete_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderDraftCancel_draftOrderDelete_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderDraftCancel_draftOrderDelete_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderDraftCancel_draftOrderDelete_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderDraftCancel_draftOrderDelete_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderDraftCancel_draftOrderDelete_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderDraftCancel_draftOrderDelete_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderDraftCancel_draftOrderDelete_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderDraftCancel_draftOrderDelete_order_giftCards_events_balance | null; -} - -export interface OrderDraftCancel_draftOrderDelete_order_giftCards { - __typename: "GiftCard"; - events: OrderDraftCancel_draftOrderDelete_order_giftCards_events[]; -} - -export interface OrderDraftCancel_draftOrderDelete_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDraftCancel_draftOrderDelete_order_discounts_amount; -} - -export interface OrderDraftCancel_draftOrderDelete_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDraftCancel_draftOrderDelete_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderDraftCancel_draftOrderDelete_order_events_discount_oldAmount | null; -} - -export interface OrderDraftCancel_draftOrderDelete_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderDraftCancel_draftOrderDelete_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderDraftCancel_draftOrderDelete_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDraftCancel_draftOrderDelete_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderDraftCancel_draftOrderDelete_order_events_lines_discount_oldAmount | null; -} - -export interface OrderDraftCancel_draftOrderDelete_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderDraftCancel_draftOrderDelete_order_events_lines_discount | null; - orderLine: OrderDraftCancel_draftOrderDelete_order_events_lines_orderLine | null; -} - -export interface OrderDraftCancel_draftOrderDelete_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderDraftCancel_draftOrderDelete_order_events_discount | null; - relatedOrder: OrderDraftCancel_draftOrderDelete_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderDraftCancel_draftOrderDelete_order_events_user | null; - app: OrderDraftCancel_draftOrderDelete_order_events_app | null; - lines: (OrderDraftCancel_draftOrderDelete_order_events_lines | null)[] | null; -} - -export interface OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderDraftCancel_draftOrderDelete_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderDraftCancel_draftOrderDelete_order_fulfillments_lines_orderLine | null; -} - -export interface OrderDraftCancel_draftOrderDelete_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderDraftCancel_draftOrderDelete_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderDraftCancel_draftOrderDelete_order_fulfillments_warehouse | null; -} - -export interface OrderDraftCancel_draftOrderDelete_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderDraftCancel_draftOrderDelete_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderDraftCancel_draftOrderDelete_order_lines_variant_preorder | null; -} - -export interface OrderDraftCancel_draftOrderDelete_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderDraftCancel_draftOrderDelete_order_lines_undiscountedUnitPrice_gross; - net: OrderDraftCancel_draftOrderDelete_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderDraftCancel_draftOrderDelete_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderDraftCancel_draftOrderDelete_order_lines_unitPrice_gross; - net: OrderDraftCancel_draftOrderDelete_order_lines_unitPrice_net; -} - -export interface OrderDraftCancel_draftOrderDelete_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderDraftCancel_draftOrderDelete_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderDraftCancel_draftOrderDelete_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderDraftCancel_draftOrderDelete_order_lines_undiscountedUnitPrice; - unitPrice: OrderDraftCancel_draftOrderDelete_order_lines_unitPrice; - thumbnail: OrderDraftCancel_draftOrderDelete_order_lines_thumbnail | null; -} - -export interface OrderDraftCancel_draftOrderDelete_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderDraftCancel_draftOrderDelete_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderDraftCancel_draftOrderDelete_order_deliveryMethod = OrderDraftCancel_draftOrderDelete_order_deliveryMethod_ShippingMethod | OrderDraftCancel_draftOrderDelete_order_deliveryMethod_Warehouse; - -export interface OrderDraftCancel_draftOrderDelete_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderDraftCancel_draftOrderDelete_order_shippingPrice_gross; -} - -export interface OrderDraftCancel_draftOrderDelete_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderDraftCancel_draftOrderDelete_order_subtotal_gross; - net: OrderDraftCancel_draftOrderDelete_order_subtotal_net; -} - -export interface OrderDraftCancel_draftOrderDelete_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_total { - __typename: "TaxedMoney"; - gross: OrderDraftCancel_draftOrderDelete_order_total_gross; - net: OrderDraftCancel_draftOrderDelete_order_total_net; - tax: OrderDraftCancel_draftOrderDelete_order_total_tax; -} - -export interface OrderDraftCancel_draftOrderDelete_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderDraftCancel_draftOrderDelete_order_undiscountedTotal_net; - gross: OrderDraftCancel_draftOrderDelete_order_undiscountedTotal_gross; -} - -export interface OrderDraftCancel_draftOrderDelete_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderDraftCancel_draftOrderDelete_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderDraftCancel_draftOrderDelete_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderDraftCancel_draftOrderDelete_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderDraftCancel_draftOrderDelete_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderDraftCancel_draftOrderDelete_order_channel_defaultCountry; -} - -export interface OrderDraftCancel_draftOrderDelete_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderDraftCancel_draftOrderDelete_order_metadata | null)[]; - privateMetadata: (OrderDraftCancel_draftOrderDelete_order_privateMetadata | null)[]; - billingAddress: OrderDraftCancel_draftOrderDelete_order_billingAddress | null; - giftCards: (OrderDraftCancel_draftOrderDelete_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderDraftCancel_draftOrderDelete_order_discounts[] | null; - events: (OrderDraftCancel_draftOrderDelete_order_events | null)[] | null; - fulfillments: (OrderDraftCancel_draftOrderDelete_order_fulfillments | null)[]; - lines: (OrderDraftCancel_draftOrderDelete_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderDraftCancel_draftOrderDelete_order_shippingAddress | null; - deliveryMethod: OrderDraftCancel_draftOrderDelete_order_deliveryMethod | null; - shippingMethod: OrderDraftCancel_draftOrderDelete_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderDraftCancel_draftOrderDelete_order_shippingPrice; - status: OrderStatus; - subtotal: OrderDraftCancel_draftOrderDelete_order_subtotal; - total: OrderDraftCancel_draftOrderDelete_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderDraftCancel_draftOrderDelete_order_totalAuthorized; - totalCaptured: OrderDraftCancel_draftOrderDelete_order_totalCaptured; - undiscountedTotal: OrderDraftCancel_draftOrderDelete_order_undiscountedTotal; - user: OrderDraftCancel_draftOrderDelete_order_user | null; - userEmail: string | null; - shippingMethods: (OrderDraftCancel_draftOrderDelete_order_shippingMethods | null)[] | null; - invoices: (OrderDraftCancel_draftOrderDelete_order_invoices | null)[] | null; - channel: OrderDraftCancel_draftOrderDelete_order_channel; -} - -export interface OrderDraftCancel_draftOrderDelete { - __typename: "DraftOrderDelete"; - errors: OrderDraftCancel_draftOrderDelete_errors[]; - order: OrderDraftCancel_draftOrderDelete_order | null; -} - -export interface OrderDraftCancel { - draftOrderDelete: OrderDraftCancel_draftOrderDelete | null; -} - -export interface OrderDraftCancelVariables { - id: string; -} diff --git a/src/orders/types/OrderDraftCreate.ts b/src/orders/types/OrderDraftCreate.ts deleted file mode 100644 index e42346f91..000000000 --- a/src/orders/types/OrderDraftCreate.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { DraftOrderCreateInput, OrderErrorCode, AddressTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderDraftCreate -// ==================================================== - -export interface OrderDraftCreate_draftOrderCreate_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderDraftCreate_draftOrderCreate_order { - __typename: "Order"; - id: string; -} - -export interface OrderDraftCreate_draftOrderCreate { - __typename: "DraftOrderCreate"; - errors: OrderDraftCreate_draftOrderCreate_errors[]; - order: OrderDraftCreate_draftOrderCreate_order | null; -} - -export interface OrderDraftCreate { - draftOrderCreate: OrderDraftCreate_draftOrderCreate | null; -} - -export interface OrderDraftCreateVariables { - input: DraftOrderCreateInput; -} diff --git a/src/orders/types/OrderDraftFinalize.ts b/src/orders/types/OrderDraftFinalize.ts deleted file mode 100644 index 2c05faae9..000000000 --- a/src/orders/types/OrderDraftFinalize.ts +++ /dev/null @@ -1,618 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderDraftFinalize -// ==================================================== - -export interface OrderDraftFinalize_draftOrderComplete_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderDraftFinalize_draftOrderComplete_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderDraftFinalize_draftOrderComplete_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderDraftFinalize_draftOrderComplete_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderDraftFinalize_draftOrderComplete_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderDraftFinalize_draftOrderComplete_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderDraftFinalize_draftOrderComplete_order_giftCards_events_balance | null; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_giftCards { - __typename: "GiftCard"; - events: OrderDraftFinalize_draftOrderComplete_order_giftCards_events[]; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDraftFinalize_draftOrderComplete_order_discounts_amount; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDraftFinalize_draftOrderComplete_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderDraftFinalize_draftOrderComplete_order_events_discount_oldAmount | null; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDraftFinalize_draftOrderComplete_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderDraftFinalize_draftOrderComplete_order_events_lines_discount_oldAmount | null; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderDraftFinalize_draftOrderComplete_order_events_lines_discount | null; - orderLine: OrderDraftFinalize_draftOrderComplete_order_events_lines_orderLine | null; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderDraftFinalize_draftOrderComplete_order_events_discount | null; - relatedOrder: OrderDraftFinalize_draftOrderComplete_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderDraftFinalize_draftOrderComplete_order_events_user | null; - app: OrderDraftFinalize_draftOrderComplete_order_events_app | null; - lines: (OrderDraftFinalize_draftOrderComplete_order_events_lines | null)[] | null; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines_orderLine | null; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderDraftFinalize_draftOrderComplete_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderDraftFinalize_draftOrderComplete_order_fulfillments_warehouse | null; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderDraftFinalize_draftOrderComplete_order_lines_variant_preorder | null; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderDraftFinalize_draftOrderComplete_order_lines_undiscountedUnitPrice_gross; - net: OrderDraftFinalize_draftOrderComplete_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderDraftFinalize_draftOrderComplete_order_lines_unitPrice_gross; - net: OrderDraftFinalize_draftOrderComplete_order_lines_unitPrice_net; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderDraftFinalize_draftOrderComplete_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderDraftFinalize_draftOrderComplete_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderDraftFinalize_draftOrderComplete_order_lines_undiscountedUnitPrice; - unitPrice: OrderDraftFinalize_draftOrderComplete_order_lines_unitPrice; - thumbnail: OrderDraftFinalize_draftOrderComplete_order_lines_thumbnail | null; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderDraftFinalize_draftOrderComplete_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderDraftFinalize_draftOrderComplete_order_deliveryMethod = OrderDraftFinalize_draftOrderComplete_order_deliveryMethod_ShippingMethod | OrderDraftFinalize_draftOrderComplete_order_deliveryMethod_Warehouse; - -export interface OrderDraftFinalize_draftOrderComplete_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderDraftFinalize_draftOrderComplete_order_shippingPrice_gross; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderDraftFinalize_draftOrderComplete_order_subtotal_gross; - net: OrderDraftFinalize_draftOrderComplete_order_subtotal_net; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_total { - __typename: "TaxedMoney"; - gross: OrderDraftFinalize_draftOrderComplete_order_total_gross; - net: OrderDraftFinalize_draftOrderComplete_order_total_net; - tax: OrderDraftFinalize_draftOrderComplete_order_total_tax; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderDraftFinalize_draftOrderComplete_order_undiscountedTotal_net; - gross: OrderDraftFinalize_draftOrderComplete_order_undiscountedTotal_gross; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderDraftFinalize_draftOrderComplete_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderDraftFinalize_draftOrderComplete_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderDraftFinalize_draftOrderComplete_order_channel_defaultCountry; -} - -export interface OrderDraftFinalize_draftOrderComplete_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderDraftFinalize_draftOrderComplete_order_metadata | null)[]; - privateMetadata: (OrderDraftFinalize_draftOrderComplete_order_privateMetadata | null)[]; - billingAddress: OrderDraftFinalize_draftOrderComplete_order_billingAddress | null; - giftCards: (OrderDraftFinalize_draftOrderComplete_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderDraftFinalize_draftOrderComplete_order_discounts[] | null; - events: (OrderDraftFinalize_draftOrderComplete_order_events | null)[] | null; - fulfillments: (OrderDraftFinalize_draftOrderComplete_order_fulfillments | null)[]; - lines: (OrderDraftFinalize_draftOrderComplete_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderDraftFinalize_draftOrderComplete_order_shippingAddress | null; - deliveryMethod: OrderDraftFinalize_draftOrderComplete_order_deliveryMethod | null; - shippingMethod: OrderDraftFinalize_draftOrderComplete_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderDraftFinalize_draftOrderComplete_order_shippingPrice; - status: OrderStatus; - subtotal: OrderDraftFinalize_draftOrderComplete_order_subtotal; - total: OrderDraftFinalize_draftOrderComplete_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderDraftFinalize_draftOrderComplete_order_totalAuthorized; - totalCaptured: OrderDraftFinalize_draftOrderComplete_order_totalCaptured; - undiscountedTotal: OrderDraftFinalize_draftOrderComplete_order_undiscountedTotal; - user: OrderDraftFinalize_draftOrderComplete_order_user | null; - userEmail: string | null; - shippingMethods: (OrderDraftFinalize_draftOrderComplete_order_shippingMethods | null)[] | null; - invoices: (OrderDraftFinalize_draftOrderComplete_order_invoices | null)[] | null; - channel: OrderDraftFinalize_draftOrderComplete_order_channel; -} - -export interface OrderDraftFinalize_draftOrderComplete { - __typename: "DraftOrderComplete"; - errors: OrderDraftFinalize_draftOrderComplete_errors[]; - order: OrderDraftFinalize_draftOrderComplete_order | null; -} - -export interface OrderDraftFinalize { - draftOrderComplete: OrderDraftFinalize_draftOrderComplete | null; -} - -export interface OrderDraftFinalizeVariables { - id: string; -} diff --git a/src/orders/types/OrderDraftList.ts b/src/orders/types/OrderDraftList.ts deleted file mode 100644 index 9143dc1b8..000000000 --- a/src/orders/types/OrderDraftList.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderDraftFilterInput, OrderSortingInput, PaymentChargeStatusEnum, OrderStatus } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: OrderDraftList -// ==================================================== - -export interface OrderDraftList_draftOrders_edges_node_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderDraftList_draftOrders_edges_node_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderDraftList_draftOrders_edges_node_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderDraftList_draftOrders_edges_node_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftList_draftOrders_edges_node_total { - __typename: "TaxedMoney"; - gross: OrderDraftList_draftOrders_edges_node_total_gross; -} - -export interface OrderDraftList_draftOrders_edges_node { - __typename: "Order"; - billingAddress: OrderDraftList_draftOrders_edges_node_billingAddress | null; - created: any; - id: string; - number: string | null; - paymentStatus: PaymentChargeStatusEnum; - status: OrderStatus; - total: OrderDraftList_draftOrders_edges_node_total; - userEmail: string | null; -} - -export interface OrderDraftList_draftOrders_edges { - __typename: "OrderCountableEdge"; - node: OrderDraftList_draftOrders_edges_node; -} - -export interface OrderDraftList_draftOrders_pageInfo { - __typename: "PageInfo"; - hasPreviousPage: boolean; - hasNextPage: boolean; - startCursor: string | null; - endCursor: string | null; -} - -export interface OrderDraftList_draftOrders { - __typename: "OrderCountableConnection"; - edges: OrderDraftList_draftOrders_edges[]; - pageInfo: OrderDraftList_draftOrders_pageInfo; -} - -export interface OrderDraftList { - draftOrders: OrderDraftList_draftOrders | null; -} - -export interface OrderDraftListVariables { - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; - filter?: OrderDraftFilterInput | null; - sort?: OrderSortingInput | null; -} diff --git a/src/orders/types/OrderDraftUpdate.ts b/src/orders/types/OrderDraftUpdate.ts deleted file mode 100644 index a9c5352b4..000000000 --- a/src/orders/types/OrderDraftUpdate.ts +++ /dev/null @@ -1,619 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { DraftOrderInput, OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderDraftUpdate -// ==================================================== - -export interface OrderDraftUpdate_draftOrderUpdate_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderDraftUpdate_draftOrderUpdate_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderDraftUpdate_draftOrderUpdate_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderDraftUpdate_draftOrderUpdate_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderDraftUpdate_draftOrderUpdate_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderDraftUpdate_draftOrderUpdate_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderDraftUpdate_draftOrderUpdate_order_giftCards_events_balance | null; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_giftCards { - __typename: "GiftCard"; - events: OrderDraftUpdate_draftOrderUpdate_order_giftCards_events[]; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDraftUpdate_draftOrderUpdate_order_discounts_amount; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDraftUpdate_draftOrderUpdate_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderDraftUpdate_draftOrderUpdate_order_events_discount_oldAmount | null; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderDraftUpdate_draftOrderUpdate_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderDraftUpdate_draftOrderUpdate_order_events_lines_discount_oldAmount | null; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderDraftUpdate_draftOrderUpdate_order_events_lines_discount | null; - orderLine: OrderDraftUpdate_draftOrderUpdate_order_events_lines_orderLine | null; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderDraftUpdate_draftOrderUpdate_order_events_discount | null; - relatedOrder: OrderDraftUpdate_draftOrderUpdate_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderDraftUpdate_draftOrderUpdate_order_events_user | null; - app: OrderDraftUpdate_draftOrderUpdate_order_events_app | null; - lines: (OrderDraftUpdate_draftOrderUpdate_order_events_lines | null)[] | null; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines_orderLine | null; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderDraftUpdate_draftOrderUpdate_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderDraftUpdate_draftOrderUpdate_order_fulfillments_warehouse | null; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderDraftUpdate_draftOrderUpdate_order_lines_variant_preorder | null; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderDraftUpdate_draftOrderUpdate_order_lines_undiscountedUnitPrice_gross; - net: OrderDraftUpdate_draftOrderUpdate_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderDraftUpdate_draftOrderUpdate_order_lines_unitPrice_gross; - net: OrderDraftUpdate_draftOrderUpdate_order_lines_unitPrice_net; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderDraftUpdate_draftOrderUpdate_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderDraftUpdate_draftOrderUpdate_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderDraftUpdate_draftOrderUpdate_order_lines_undiscountedUnitPrice; - unitPrice: OrderDraftUpdate_draftOrderUpdate_order_lines_unitPrice; - thumbnail: OrderDraftUpdate_draftOrderUpdate_order_lines_thumbnail | null; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderDraftUpdate_draftOrderUpdate_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderDraftUpdate_draftOrderUpdate_order_deliveryMethod = OrderDraftUpdate_draftOrderUpdate_order_deliveryMethod_ShippingMethod | OrderDraftUpdate_draftOrderUpdate_order_deliveryMethod_Warehouse; - -export interface OrderDraftUpdate_draftOrderUpdate_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderDraftUpdate_draftOrderUpdate_order_shippingPrice_gross; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderDraftUpdate_draftOrderUpdate_order_subtotal_gross; - net: OrderDraftUpdate_draftOrderUpdate_order_subtotal_net; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_total { - __typename: "TaxedMoney"; - gross: OrderDraftUpdate_draftOrderUpdate_order_total_gross; - net: OrderDraftUpdate_draftOrderUpdate_order_total_net; - tax: OrderDraftUpdate_draftOrderUpdate_order_total_tax; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderDraftUpdate_draftOrderUpdate_order_undiscountedTotal_net; - gross: OrderDraftUpdate_draftOrderUpdate_order_undiscountedTotal_gross; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderDraftUpdate_draftOrderUpdate_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderDraftUpdate_draftOrderUpdate_order_channel_defaultCountry; -} - -export interface OrderDraftUpdate_draftOrderUpdate_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderDraftUpdate_draftOrderUpdate_order_metadata | null)[]; - privateMetadata: (OrderDraftUpdate_draftOrderUpdate_order_privateMetadata | null)[]; - billingAddress: OrderDraftUpdate_draftOrderUpdate_order_billingAddress | null; - giftCards: (OrderDraftUpdate_draftOrderUpdate_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderDraftUpdate_draftOrderUpdate_order_discounts[] | null; - events: (OrderDraftUpdate_draftOrderUpdate_order_events | null)[] | null; - fulfillments: (OrderDraftUpdate_draftOrderUpdate_order_fulfillments | null)[]; - lines: (OrderDraftUpdate_draftOrderUpdate_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderDraftUpdate_draftOrderUpdate_order_shippingAddress | null; - deliveryMethod: OrderDraftUpdate_draftOrderUpdate_order_deliveryMethod | null; - shippingMethod: OrderDraftUpdate_draftOrderUpdate_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderDraftUpdate_draftOrderUpdate_order_shippingPrice; - status: OrderStatus; - subtotal: OrderDraftUpdate_draftOrderUpdate_order_subtotal; - total: OrderDraftUpdate_draftOrderUpdate_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderDraftUpdate_draftOrderUpdate_order_totalAuthorized; - totalCaptured: OrderDraftUpdate_draftOrderUpdate_order_totalCaptured; - undiscountedTotal: OrderDraftUpdate_draftOrderUpdate_order_undiscountedTotal; - user: OrderDraftUpdate_draftOrderUpdate_order_user | null; - userEmail: string | null; - shippingMethods: (OrderDraftUpdate_draftOrderUpdate_order_shippingMethods | null)[] | null; - invoices: (OrderDraftUpdate_draftOrderUpdate_order_invoices | null)[] | null; - channel: OrderDraftUpdate_draftOrderUpdate_order_channel; -} - -export interface OrderDraftUpdate_draftOrderUpdate { - __typename: "DraftOrderUpdate"; - errors: OrderDraftUpdate_draftOrderUpdate_errors[]; - order: OrderDraftUpdate_draftOrderUpdate_order | null; -} - -export interface OrderDraftUpdate { - draftOrderUpdate: OrderDraftUpdate_draftOrderUpdate | null; -} - -export interface OrderDraftUpdateVariables { - id: string; - input: DraftOrderInput; -} diff --git a/src/orders/types/OrderFulfillData.ts b/src/orders/types/OrderFulfillData.ts deleted file mode 100644 index 3caf5a247..000000000 --- a/src/orders/types/OrderFulfillData.ts +++ /dev/null @@ -1,110 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { WarehouseClickAndCollectOptionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: OrderFulfillData -// ==================================================== - -export interface OrderFulfillData_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderFulfillData_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderFulfillData_order_deliveryMethod = OrderFulfillData_order_deliveryMethod_ShippingMethod | OrderFulfillData_order_deliveryMethod_Warehouse; - -export interface OrderFulfillData_order_lines_allocations_warehouse { - __typename: "Warehouse"; - id: string; -} - -export interface OrderFulfillData_order_lines_allocations { - __typename: "Allocation"; - quantity: number; - warehouse: OrderFulfillData_order_lines_allocations_warehouse; -} - -export interface OrderFulfillData_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderFulfillData_order_lines_variant_attributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; -} - -export interface OrderFulfillData_order_lines_variant_attributes { - __typename: "SelectedAttribute"; - values: (OrderFulfillData_order_lines_variant_attributes_values | null)[]; -} - -export interface OrderFulfillData_order_lines_variant_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderFulfillData_order_lines_variant_stocks { - __typename: "Stock"; - id: string; - warehouse: OrderFulfillData_order_lines_variant_stocks_warehouse; - quantity: number; - quantityAllocated: number; -} - -export interface OrderFulfillData_order_lines_variant { - __typename: "ProductVariant"; - id: string; - name: string; - sku: string | null; - preorder: OrderFulfillData_order_lines_variant_preorder | null; - attributes: OrderFulfillData_order_lines_variant_attributes[]; - stocks: (OrderFulfillData_order_lines_variant_stocks | null)[] | null; - trackInventory: boolean; -} - -export interface OrderFulfillData_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderFulfillData_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - productName: string; - quantity: number; - allocations: OrderFulfillData_order_lines_allocations[] | null; - quantityFulfilled: number; - quantityToFulfill: number; - variant: OrderFulfillData_order_lines_variant | null; - thumbnail: OrderFulfillData_order_lines_thumbnail | null; -} - -export interface OrderFulfillData_order { - __typename: "Order"; - id: string; - isPaid: boolean; - deliveryMethod: OrderFulfillData_order_deliveryMethod | null; - lines: (OrderFulfillData_order_lines | null)[]; - number: string | null; -} - -export interface OrderFulfillData { - order: OrderFulfillData_order | null; -} - -export interface OrderFulfillDataVariables { - orderId: string; -} diff --git a/src/orders/types/OrderFulfillSettings.ts b/src/orders/types/OrderFulfillSettings.ts deleted file mode 100644 index d8e633c4f..000000000 --- a/src/orders/types/OrderFulfillSettings.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: OrderFulfillSettings -// ==================================================== - -export interface OrderFulfillSettings_shop { - __typename: "Shop"; - fulfillmentAutoApprove: boolean; - fulfillmentAllowUnpaid: boolean; -} - -export interface OrderFulfillSettings { - shop: OrderFulfillSettings_shop; -} diff --git a/src/orders/types/OrderFulfillmentApprove.ts b/src/orders/types/OrderFulfillmentApprove.ts deleted file mode 100644 index 94a13c96d..000000000 --- a/src/orders/types/OrderFulfillmentApprove.ts +++ /dev/null @@ -1,619 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderFulfillmentApprove -// ==================================================== - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderFulfillmentApprove_orderFulfillmentApprove_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderFulfillmentApprove_orderFulfillmentApprove_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderFulfillmentApprove_orderFulfillmentApprove_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderFulfillmentApprove_orderFulfillmentApprove_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderFulfillmentApprove_orderFulfillmentApprove_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderFulfillmentApprove_orderFulfillmentApprove_order_giftCards_events_balance | null; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_giftCards { - __typename: "GiftCard"; - events: OrderFulfillmentApprove_orderFulfillmentApprove_order_giftCards_events[]; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderFulfillmentApprove_orderFulfillmentApprove_order_discounts_amount; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderFulfillmentApprove_orderFulfillmentApprove_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderFulfillmentApprove_orderFulfillmentApprove_order_events_discount_oldAmount | null; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderFulfillmentApprove_orderFulfillmentApprove_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderFulfillmentApprove_orderFulfillmentApprove_order_events_lines_discount_oldAmount | null; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderFulfillmentApprove_orderFulfillmentApprove_order_events_lines_discount | null; - orderLine: OrderFulfillmentApprove_orderFulfillmentApprove_order_events_lines_orderLine | null; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderFulfillmentApprove_orderFulfillmentApprove_order_events_discount | null; - relatedOrder: OrderFulfillmentApprove_orderFulfillmentApprove_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderFulfillmentApprove_orderFulfillmentApprove_order_events_user | null; - app: OrderFulfillmentApprove_orderFulfillmentApprove_order_events_app | null; - lines: (OrderFulfillmentApprove_orderFulfillmentApprove_order_events_lines | null)[] | null; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines_orderLine | null; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments_warehouse | null; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderFulfillmentApprove_orderFulfillmentApprove_order_lines_variant_preorder | null; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderFulfillmentApprove_orderFulfillmentApprove_order_lines_undiscountedUnitPrice_gross; - net: OrderFulfillmentApprove_orderFulfillmentApprove_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderFulfillmentApprove_orderFulfillmentApprove_order_lines_unitPrice_gross; - net: OrderFulfillmentApprove_orderFulfillmentApprove_order_lines_unitPrice_net; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderFulfillmentApprove_orderFulfillmentApprove_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderFulfillmentApprove_orderFulfillmentApprove_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderFulfillmentApprove_orderFulfillmentApprove_order_lines_undiscountedUnitPrice; - unitPrice: OrderFulfillmentApprove_orderFulfillmentApprove_order_lines_unitPrice; - thumbnail: OrderFulfillmentApprove_orderFulfillmentApprove_order_lines_thumbnail | null; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderFulfillmentApprove_orderFulfillmentApprove_order_deliveryMethod = OrderFulfillmentApprove_orderFulfillmentApprove_order_deliveryMethod_ShippingMethod | OrderFulfillmentApprove_orderFulfillmentApprove_order_deliveryMethod_Warehouse; - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingPrice_gross; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderFulfillmentApprove_orderFulfillmentApprove_order_subtotal_gross; - net: OrderFulfillmentApprove_orderFulfillmentApprove_order_subtotal_net; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_total { - __typename: "TaxedMoney"; - gross: OrderFulfillmentApprove_orderFulfillmentApprove_order_total_gross; - net: OrderFulfillmentApprove_orderFulfillmentApprove_order_total_net; - tax: OrderFulfillmentApprove_orderFulfillmentApprove_order_total_tax; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderFulfillmentApprove_orderFulfillmentApprove_order_undiscountedTotal_net; - gross: OrderFulfillmentApprove_orderFulfillmentApprove_order_undiscountedTotal_gross; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderFulfillmentApprove_orderFulfillmentApprove_order_channel_defaultCountry; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderFulfillmentApprove_orderFulfillmentApprove_order_metadata | null)[]; - privateMetadata: (OrderFulfillmentApprove_orderFulfillmentApprove_order_privateMetadata | null)[]; - billingAddress: OrderFulfillmentApprove_orderFulfillmentApprove_order_billingAddress | null; - giftCards: (OrderFulfillmentApprove_orderFulfillmentApprove_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderFulfillmentApprove_orderFulfillmentApprove_order_discounts[] | null; - events: (OrderFulfillmentApprove_orderFulfillmentApprove_order_events | null)[] | null; - fulfillments: (OrderFulfillmentApprove_orderFulfillmentApprove_order_fulfillments | null)[]; - lines: (OrderFulfillmentApprove_orderFulfillmentApprove_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingAddress | null; - deliveryMethod: OrderFulfillmentApprove_orderFulfillmentApprove_order_deliveryMethod | null; - shippingMethod: OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingPrice; - status: OrderStatus; - subtotal: OrderFulfillmentApprove_orderFulfillmentApprove_order_subtotal; - total: OrderFulfillmentApprove_orderFulfillmentApprove_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderFulfillmentApprove_orderFulfillmentApprove_order_totalAuthorized; - totalCaptured: OrderFulfillmentApprove_orderFulfillmentApprove_order_totalCaptured; - undiscountedTotal: OrderFulfillmentApprove_orderFulfillmentApprove_order_undiscountedTotal; - user: OrderFulfillmentApprove_orderFulfillmentApprove_order_user | null; - userEmail: string | null; - shippingMethods: (OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingMethods | null)[] | null; - invoices: (OrderFulfillmentApprove_orderFulfillmentApprove_order_invoices | null)[] | null; - channel: OrderFulfillmentApprove_orderFulfillmentApprove_order_channel; -} - -export interface OrderFulfillmentApprove_orderFulfillmentApprove { - __typename: "FulfillmentApprove"; - errors: OrderFulfillmentApprove_orderFulfillmentApprove_errors[]; - order: OrderFulfillmentApprove_orderFulfillmentApprove_order | null; -} - -export interface OrderFulfillmentApprove { - orderFulfillmentApprove: OrderFulfillmentApprove_orderFulfillmentApprove | null; -} - -export interface OrderFulfillmentApproveVariables { - id: string; - notifyCustomer: boolean; -} diff --git a/src/orders/types/OrderFulfillmentCancel.ts b/src/orders/types/OrderFulfillmentCancel.ts deleted file mode 100644 index 4a502fbbf..000000000 --- a/src/orders/types/OrderFulfillmentCancel.ts +++ /dev/null @@ -1,619 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { FulfillmentCancelInput, OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderFulfillmentCancel -// ==================================================== - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderFulfillmentCancel_orderFulfillmentCancel_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderFulfillmentCancel_orderFulfillmentCancel_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderFulfillmentCancel_orderFulfillmentCancel_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderFulfillmentCancel_orderFulfillmentCancel_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderFulfillmentCancel_orderFulfillmentCancel_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderFulfillmentCancel_orderFulfillmentCancel_order_giftCards_events_balance | null; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_giftCards { - __typename: "GiftCard"; - events: OrderFulfillmentCancel_orderFulfillmentCancel_order_giftCards_events[]; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderFulfillmentCancel_orderFulfillmentCancel_order_discounts_amount; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderFulfillmentCancel_orderFulfillmentCancel_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderFulfillmentCancel_orderFulfillmentCancel_order_events_discount_oldAmount | null; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderFulfillmentCancel_orderFulfillmentCancel_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderFulfillmentCancel_orderFulfillmentCancel_order_events_lines_discount_oldAmount | null; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderFulfillmentCancel_orderFulfillmentCancel_order_events_lines_discount | null; - orderLine: OrderFulfillmentCancel_orderFulfillmentCancel_order_events_lines_orderLine | null; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderFulfillmentCancel_orderFulfillmentCancel_order_events_discount | null; - relatedOrder: OrderFulfillmentCancel_orderFulfillmentCancel_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderFulfillmentCancel_orderFulfillmentCancel_order_events_user | null; - app: OrderFulfillmentCancel_orderFulfillmentCancel_order_events_app | null; - lines: (OrderFulfillmentCancel_orderFulfillmentCancel_order_events_lines | null)[] | null; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines_orderLine | null; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments_warehouse | null; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderFulfillmentCancel_orderFulfillmentCancel_order_lines_variant_preorder | null; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderFulfillmentCancel_orderFulfillmentCancel_order_lines_undiscountedUnitPrice_gross; - net: OrderFulfillmentCancel_orderFulfillmentCancel_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderFulfillmentCancel_orderFulfillmentCancel_order_lines_unitPrice_gross; - net: OrderFulfillmentCancel_orderFulfillmentCancel_order_lines_unitPrice_net; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderFulfillmentCancel_orderFulfillmentCancel_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderFulfillmentCancel_orderFulfillmentCancel_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderFulfillmentCancel_orderFulfillmentCancel_order_lines_undiscountedUnitPrice; - unitPrice: OrderFulfillmentCancel_orderFulfillmentCancel_order_lines_unitPrice; - thumbnail: OrderFulfillmentCancel_orderFulfillmentCancel_order_lines_thumbnail | null; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderFulfillmentCancel_orderFulfillmentCancel_order_deliveryMethod = OrderFulfillmentCancel_orderFulfillmentCancel_order_deliveryMethod_ShippingMethod | OrderFulfillmentCancel_orderFulfillmentCancel_order_deliveryMethod_Warehouse; - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingPrice_gross; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderFulfillmentCancel_orderFulfillmentCancel_order_subtotal_gross; - net: OrderFulfillmentCancel_orderFulfillmentCancel_order_subtotal_net; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_total { - __typename: "TaxedMoney"; - gross: OrderFulfillmentCancel_orderFulfillmentCancel_order_total_gross; - net: OrderFulfillmentCancel_orderFulfillmentCancel_order_total_net; - tax: OrderFulfillmentCancel_orderFulfillmentCancel_order_total_tax; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderFulfillmentCancel_orderFulfillmentCancel_order_undiscountedTotal_net; - gross: OrderFulfillmentCancel_orderFulfillmentCancel_order_undiscountedTotal_gross; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderFulfillmentCancel_orderFulfillmentCancel_order_channel_defaultCountry; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderFulfillmentCancel_orderFulfillmentCancel_order_metadata | null)[]; - privateMetadata: (OrderFulfillmentCancel_orderFulfillmentCancel_order_privateMetadata | null)[]; - billingAddress: OrderFulfillmentCancel_orderFulfillmentCancel_order_billingAddress | null; - giftCards: (OrderFulfillmentCancel_orderFulfillmentCancel_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderFulfillmentCancel_orderFulfillmentCancel_order_discounts[] | null; - events: (OrderFulfillmentCancel_orderFulfillmentCancel_order_events | null)[] | null; - fulfillments: (OrderFulfillmentCancel_orderFulfillmentCancel_order_fulfillments | null)[]; - lines: (OrderFulfillmentCancel_orderFulfillmentCancel_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingAddress | null; - deliveryMethod: OrderFulfillmentCancel_orderFulfillmentCancel_order_deliveryMethod | null; - shippingMethod: OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingPrice; - status: OrderStatus; - subtotal: OrderFulfillmentCancel_orderFulfillmentCancel_order_subtotal; - total: OrderFulfillmentCancel_orderFulfillmentCancel_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderFulfillmentCancel_orderFulfillmentCancel_order_totalAuthorized; - totalCaptured: OrderFulfillmentCancel_orderFulfillmentCancel_order_totalCaptured; - undiscountedTotal: OrderFulfillmentCancel_orderFulfillmentCancel_order_undiscountedTotal; - user: OrderFulfillmentCancel_orderFulfillmentCancel_order_user | null; - userEmail: string | null; - shippingMethods: (OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingMethods | null)[] | null; - invoices: (OrderFulfillmentCancel_orderFulfillmentCancel_order_invoices | null)[] | null; - channel: OrderFulfillmentCancel_orderFulfillmentCancel_order_channel; -} - -export interface OrderFulfillmentCancel_orderFulfillmentCancel { - __typename: "FulfillmentCancel"; - errors: OrderFulfillmentCancel_orderFulfillmentCancel_errors[]; - order: OrderFulfillmentCancel_orderFulfillmentCancel_order | null; -} - -export interface OrderFulfillmentCancel { - orderFulfillmentCancel: OrderFulfillmentCancel_orderFulfillmentCancel | null; -} - -export interface OrderFulfillmentCancelVariables { - id: string; - input: FulfillmentCancelInput; -} diff --git a/src/orders/types/OrderFulfillmentRefundProducts.ts b/src/orders/types/OrderFulfillmentRefundProducts.ts deleted file mode 100644 index 50dd3c09e..000000000 --- a/src/orders/types/OrderFulfillmentRefundProducts.ts +++ /dev/null @@ -1,722 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderRefundProductsInput, OrderErrorCode, AddressTypeEnum, DiscountValueTypeEnum, FulfillmentStatus, GiftCardEventsEnum, OrderDiscountType, OrderEventsEmailsEnum, OrderEventsEnum, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderFulfillmentRefundProducts -// ==================================================== - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine_variant_preorder | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine_unitPrice_gross; - net: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine_unitPrice_net; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine_unitPrice; - thumbnail: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine_thumbnail | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines_orderLine | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment { - __typename: "Fulfillment"; - id: string; - lines: (OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment_warehouse | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_giftCards_events_balance | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_giftCards { - __typename: "GiftCard"; - events: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_giftCards_events[]; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_discounts_amount; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_discount_oldAmount | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_lines_discount_oldAmount | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_lines_discount | null; - orderLine: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_lines_orderLine | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_discount | null; - relatedOrder: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_user | null; - app: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_app | null; - lines: (OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events_lines | null)[] | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines_orderLine | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments_warehouse | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines_variant_preorder | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines_undiscountedUnitPrice_gross; - net: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines_unitPrice_gross; - net: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines_unitPrice_net; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines_undiscountedUnitPrice; - unitPrice: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines_unitPrice; - thumbnail: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines_thumbnail | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_deliveryMethod = OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_deliveryMethod_ShippingMethod | OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_deliveryMethod_Warehouse; - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingPrice_gross; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_subtotal_gross; - net: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_subtotal_net; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_total { - __typename: "TaxedMoney"; - gross: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_total_gross; - net: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_total_net; - tax: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_total_tax; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_undiscountedTotal_net; - gross: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_undiscountedTotal_gross; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_channel_defaultCountry; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_metadata | null)[]; - privateMetadata: (OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_privateMetadata | null)[]; - billingAddress: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_billingAddress | null; - giftCards: (OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_discounts[] | null; - events: (OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_events | null)[] | null; - fulfillments: (OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_fulfillments | null)[]; - lines: (OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingAddress | null; - deliveryMethod: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_deliveryMethod | null; - shippingMethod: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingPrice; - status: OrderStatus; - subtotal: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_subtotal; - total: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_totalAuthorized; - totalCaptured: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_totalCaptured; - undiscountedTotal: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_undiscountedTotal; - user: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_user | null; - userEmail: string | null; - shippingMethods: (OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingMethods | null)[] | null; - invoices: (OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_invoices | null)[] | null; - channel: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_channel; -} - -export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts { - __typename: "FulfillmentRefundProducts"; - errors: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_errors[]; - fulfillment: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_fulfillment | null; - order: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order | null; -} - -export interface OrderFulfillmentRefundProducts { - orderFulfillmentRefundProducts: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts | null; -} - -export interface OrderFulfillmentRefundProductsVariables { - input: OrderRefundProductsInput; - order: string; -} diff --git a/src/orders/types/OrderFulfillmentUpdateTracking.ts b/src/orders/types/OrderFulfillmentUpdateTracking.ts deleted file mode 100644 index fe50d644c..000000000 --- a/src/orders/types/OrderFulfillmentUpdateTracking.ts +++ /dev/null @@ -1,619 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { FulfillmentUpdateTrackingInput, OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderFulfillmentUpdateTracking -// ==================================================== - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_giftCards_events_balance | null; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_giftCards { - __typename: "GiftCard"; - events: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_giftCards_events[]; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_discounts_amount; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_discount_oldAmount | null; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_lines_discount_oldAmount | null; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_lines_discount | null; - orderLine: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_lines_orderLine | null; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_discount | null; - relatedOrder: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_user | null; - app: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_app | null; - lines: (OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events_lines | null)[] | null; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines_orderLine | null; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments_warehouse | null; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines_variant_preorder | null; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines_undiscountedUnitPrice_gross; - net: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines_unitPrice_gross; - net: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines_unitPrice_net; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines_undiscountedUnitPrice; - unitPrice: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines_unitPrice; - thumbnail: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines_thumbnail | null; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_deliveryMethod = OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_deliveryMethod_ShippingMethod | OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_deliveryMethod_Warehouse; - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingPrice_gross; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_subtotal_gross; - net: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_subtotal_net; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_total { - __typename: "TaxedMoney"; - gross: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_total_gross; - net: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_total_net; - tax: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_total_tax; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_undiscountedTotal_net; - gross: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_undiscountedTotal_gross; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_channel_defaultCountry; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_metadata | null)[]; - privateMetadata: (OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_privateMetadata | null)[]; - billingAddress: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_billingAddress | null; - giftCards: (OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_discounts[] | null; - events: (OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_events | null)[] | null; - fulfillments: (OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_fulfillments | null)[]; - lines: (OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingAddress | null; - deliveryMethod: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_deliveryMethod | null; - shippingMethod: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingPrice; - status: OrderStatus; - subtotal: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_subtotal; - total: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_totalAuthorized; - totalCaptured: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_totalCaptured; - undiscountedTotal: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_undiscountedTotal; - user: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_user | null; - userEmail: string | null; - shippingMethods: (OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingMethods | null)[] | null; - invoices: (OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_invoices | null)[] | null; - channel: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_channel; -} - -export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking { - __typename: "FulfillmentUpdateTracking"; - errors: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_errors[]; - order: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order | null; -} - -export interface OrderFulfillmentUpdateTracking { - orderFulfillmentUpdateTracking: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking | null; -} - -export interface OrderFulfillmentUpdateTrackingVariables { - id: string; - input: FulfillmentUpdateTrackingInput; -} diff --git a/src/orders/types/OrderLineDelete.ts b/src/orders/types/OrderLineDelete.ts deleted file mode 100644 index de17c01f2..000000000 --- a/src/orders/types/OrderLineDelete.ts +++ /dev/null @@ -1,618 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderLineDelete -// ==================================================== - -export interface OrderLineDelete_orderLineDelete_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderLineDelete_orderLineDelete_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderLineDelete_orderLineDelete_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderLineDelete_orderLineDelete_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderLineDelete_orderLineDelete_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderLineDelete_orderLineDelete_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderLineDelete_orderLineDelete_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderLineDelete_orderLineDelete_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderLineDelete_orderLineDelete_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderLineDelete_orderLineDelete_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderLineDelete_orderLineDelete_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderLineDelete_orderLineDelete_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderLineDelete_orderLineDelete_order_giftCards_events_balance | null; -} - -export interface OrderLineDelete_orderLineDelete_order_giftCards { - __typename: "GiftCard"; - events: OrderLineDelete_orderLineDelete_order_giftCards_events[]; -} - -export interface OrderLineDelete_orderLineDelete_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderLineDelete_orderLineDelete_order_discounts_amount; -} - -export interface OrderLineDelete_orderLineDelete_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderLineDelete_orderLineDelete_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderLineDelete_orderLineDelete_order_events_discount_oldAmount | null; -} - -export interface OrderLineDelete_orderLineDelete_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderLineDelete_orderLineDelete_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderLineDelete_orderLineDelete_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderLineDelete_orderLineDelete_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderLineDelete_orderLineDelete_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderLineDelete_orderLineDelete_order_events_lines_discount_oldAmount | null; -} - -export interface OrderLineDelete_orderLineDelete_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderLineDelete_orderLineDelete_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderLineDelete_orderLineDelete_order_events_lines_discount | null; - orderLine: OrderLineDelete_orderLineDelete_order_events_lines_orderLine | null; -} - -export interface OrderLineDelete_orderLineDelete_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderLineDelete_orderLineDelete_order_events_discount | null; - relatedOrder: OrderLineDelete_orderLineDelete_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderLineDelete_orderLineDelete_order_events_user | null; - app: OrderLineDelete_orderLineDelete_order_events_app | null; - lines: (OrderLineDelete_orderLineDelete_order_events_lines | null)[] | null; -} - -export interface OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderLineDelete_orderLineDelete_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderLineDelete_orderLineDelete_order_fulfillments_lines_orderLine | null; -} - -export interface OrderLineDelete_orderLineDelete_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderLineDelete_orderLineDelete_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderLineDelete_orderLineDelete_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderLineDelete_orderLineDelete_order_fulfillments_warehouse | null; -} - -export interface OrderLineDelete_orderLineDelete_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderLineDelete_orderLineDelete_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderLineDelete_orderLineDelete_order_lines_variant_preorder | null; -} - -export interface OrderLineDelete_orderLineDelete_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderLineDelete_orderLineDelete_order_lines_undiscountedUnitPrice_gross; - net: OrderLineDelete_orderLineDelete_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderLineDelete_orderLineDelete_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderLineDelete_orderLineDelete_order_lines_unitPrice_gross; - net: OrderLineDelete_orderLineDelete_order_lines_unitPrice_net; -} - -export interface OrderLineDelete_orderLineDelete_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderLineDelete_orderLineDelete_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderLineDelete_orderLineDelete_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderLineDelete_orderLineDelete_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderLineDelete_orderLineDelete_order_lines_undiscountedUnitPrice; - unitPrice: OrderLineDelete_orderLineDelete_order_lines_unitPrice; - thumbnail: OrderLineDelete_orderLineDelete_order_lines_thumbnail | null; -} - -export interface OrderLineDelete_orderLineDelete_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderLineDelete_orderLineDelete_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderLineDelete_orderLineDelete_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderLineDelete_orderLineDelete_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderLineDelete_orderLineDelete_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderLineDelete_orderLineDelete_order_deliveryMethod = OrderLineDelete_orderLineDelete_order_deliveryMethod_ShippingMethod | OrderLineDelete_orderLineDelete_order_deliveryMethod_Warehouse; - -export interface OrderLineDelete_orderLineDelete_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderLineDelete_orderLineDelete_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderLineDelete_orderLineDelete_order_shippingPrice_gross; -} - -export interface OrderLineDelete_orderLineDelete_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderLineDelete_orderLineDelete_order_subtotal_gross; - net: OrderLineDelete_orderLineDelete_order_subtotal_net; -} - -export interface OrderLineDelete_orderLineDelete_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_total { - __typename: "TaxedMoney"; - gross: OrderLineDelete_orderLineDelete_order_total_gross; - net: OrderLineDelete_orderLineDelete_order_total_net; - tax: OrderLineDelete_orderLineDelete_order_total_tax; -} - -export interface OrderLineDelete_orderLineDelete_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderLineDelete_orderLineDelete_order_undiscountedTotal_net; - gross: OrderLineDelete_orderLineDelete_order_undiscountedTotal_gross; -} - -export interface OrderLineDelete_orderLineDelete_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderLineDelete_orderLineDelete_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDelete_orderLineDelete_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderLineDelete_orderLineDelete_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderLineDelete_orderLineDelete_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderLineDelete_orderLineDelete_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderLineDelete_orderLineDelete_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderLineDelete_orderLineDelete_order_channel_defaultCountry; -} - -export interface OrderLineDelete_orderLineDelete_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderLineDelete_orderLineDelete_order_metadata | null)[]; - privateMetadata: (OrderLineDelete_orderLineDelete_order_privateMetadata | null)[]; - billingAddress: OrderLineDelete_orderLineDelete_order_billingAddress | null; - giftCards: (OrderLineDelete_orderLineDelete_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderLineDelete_orderLineDelete_order_discounts[] | null; - events: (OrderLineDelete_orderLineDelete_order_events | null)[] | null; - fulfillments: (OrderLineDelete_orderLineDelete_order_fulfillments | null)[]; - lines: (OrderLineDelete_orderLineDelete_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderLineDelete_orderLineDelete_order_shippingAddress | null; - deliveryMethod: OrderLineDelete_orderLineDelete_order_deliveryMethod | null; - shippingMethod: OrderLineDelete_orderLineDelete_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderLineDelete_orderLineDelete_order_shippingPrice; - status: OrderStatus; - subtotal: OrderLineDelete_orderLineDelete_order_subtotal; - total: OrderLineDelete_orderLineDelete_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderLineDelete_orderLineDelete_order_totalAuthorized; - totalCaptured: OrderLineDelete_orderLineDelete_order_totalCaptured; - undiscountedTotal: OrderLineDelete_orderLineDelete_order_undiscountedTotal; - user: OrderLineDelete_orderLineDelete_order_user | null; - userEmail: string | null; - shippingMethods: (OrderLineDelete_orderLineDelete_order_shippingMethods | null)[] | null; - invoices: (OrderLineDelete_orderLineDelete_order_invoices | null)[] | null; - channel: OrderLineDelete_orderLineDelete_order_channel; -} - -export interface OrderLineDelete_orderLineDelete { - __typename: "OrderLineDelete"; - errors: OrderLineDelete_orderLineDelete_errors[]; - order: OrderLineDelete_orderLineDelete_order | null; -} - -export interface OrderLineDelete { - orderLineDelete: OrderLineDelete_orderLineDelete | null; -} - -export interface OrderLineDeleteVariables { - id: string; -} diff --git a/src/orders/types/OrderLineDiscountAdd.ts b/src/orders/types/OrderLineDiscountAdd.ts deleted file mode 100644 index ddc637990..000000000 --- a/src/orders/types/OrderLineDiscountAdd.ts +++ /dev/null @@ -1,372 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -import { OrderDiscountCommonInput, OrderErrorCode, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderLineDiscountAdd -// ==================================================== - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderLineDiscountAdd_orderLineDiscountAdd_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - orderLine: OrderLineDiscountAdd_orderLineDiscountAdd_order_events_lines_orderLine | null; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - relatedOrder: OrderLineDiscountAdd_orderLineDiscountAdd_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderLineDiscountAdd_orderLineDiscountAdd_order_events_user | null; - lines: (OrderLineDiscountAdd_orderLineDiscountAdd_order_events_lines | null)[] | null; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderLineDiscountAdd_orderLineDiscountAdd_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderLineDiscountAdd_orderLineDiscountAdd_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderLineDiscountAdd_orderLineDiscountAdd_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string; - quantity: number; - quantityFulfilled: number; - unitPrice: OrderLineDiscountAdd_orderLineDiscountAdd_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderLineDiscountAdd_orderLineDiscountAdd_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderLineDiscountAdd_orderLineDiscountAdd_order_fulfillments_lines_orderLine | null; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderLineDiscountAdd_orderLineDiscountAdd_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderLineDiscountAdd_orderLineDiscountAdd_order_fulfillments_warehouse | null; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_lines_unitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderLineDiscountAdd_orderLineDiscountAdd_order_lines_unitPrice_gross; - net: OrderLineDiscountAdd_orderLineDiscountAdd_order_lines_unitPrice_net; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderLineDiscountAdd_orderLineDiscountAdd_order_lines_variant | null; - productName: string; - productSku: string; - quantity: number; - quantityFulfilled: number; - unitPrice: OrderLineDiscountAdd_orderLineDiscountAdd_order_lines_unitPrice; - thumbnail: OrderLineDiscountAdd_orderLineDiscountAdd_order_lines_thumbnail | null; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingPrice_gross; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderLineDiscountAdd_orderLineDiscountAdd_order_subtotal_gross; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_total { - __typename: "TaxedMoney"; - gross: OrderLineDiscountAdd_orderLineDiscountAdd_order_total_gross; - tax: OrderLineDiscountAdd_orderLineDiscountAdd_order_total_tax; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingMethods_price | null; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_discount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd_order { - __typename: "Order"; - id: string; - metadata: (OrderLineDiscountAdd_orderLineDiscountAdd_order_metadata | null)[]; - privateMetadata: (OrderLineDiscountAdd_orderLineDiscountAdd_order_privateMetadata | null)[]; - billingAddress: OrderLineDiscountAdd_orderLineDiscountAdd_order_billingAddress | null; - canFinalize: boolean; - created: any; - customerNote: string; - events: (OrderLineDiscountAdd_orderLineDiscountAdd_order_events | null)[] | null; - fulfillments: (OrderLineDiscountAdd_orderLineDiscountAdd_order_fulfillments | null)[]; - lines: (OrderLineDiscountAdd_orderLineDiscountAdd_order_lines | null)[]; - number: string | null; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingAddress | null; - shippingMethod: OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingMethod | null; - shippingMethodName: string | null; - shippingPrice: OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingPrice; - status: OrderStatus; - subtotal: OrderLineDiscountAdd_orderLineDiscountAdd_order_subtotal; - total: OrderLineDiscountAdd_orderLineDiscountAdd_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderLineDiscountAdd_orderLineDiscountAdd_order_totalAuthorized; - totalCaptured: OrderLineDiscountAdd_orderLineDiscountAdd_order_totalCaptured; - user: OrderLineDiscountAdd_orderLineDiscountAdd_order_user | null; - userEmail: string | null; - shippingMethods: (OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingMethods | null)[] | null; - discount: OrderLineDiscountAdd_orderLineDiscountAdd_order_discount | null; - invoices: (OrderLineDiscountAdd_orderLineDiscountAdd_order_invoices | null)[] | null; - channel: OrderLineDiscountAdd_orderLineDiscountAdd_order_channel; - isPaid: boolean; -} - -export interface OrderLineDiscountAdd_orderLineDiscountAdd { - __typename: "OrderLineDiscountAdd"; - errors: OrderLineDiscountAdd_orderLineDiscountAdd_errors[]; - order: OrderLineDiscountAdd_orderLineDiscountAdd_order | null; -} - -export interface OrderLineDiscountAdd { - orderLineDiscountAdd: OrderLineDiscountAdd_orderLineDiscountAdd | null; -} - -export interface OrderLineDiscountAddVariables { - input: OrderDiscountCommonInput; - orderLineId: string; -} diff --git a/src/orders/types/OrderLineDiscountDelete.ts b/src/orders/types/OrderLineDiscountDelete.ts deleted file mode 100644 index f309b1ff0..000000000 --- a/src/orders/types/OrderLineDiscountDelete.ts +++ /dev/null @@ -1,371 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -import { OrderErrorCode, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderLineDiscountDelete -// ==================================================== - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderLineDiscountDelete_orderLineDiscountDelete_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - orderLine: OrderLineDiscountDelete_orderLineDiscountDelete_order_events_lines_orderLine | null; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - relatedOrder: OrderLineDiscountDelete_orderLineDiscountDelete_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderLineDiscountDelete_orderLineDiscountDelete_order_events_user | null; - lines: (OrderLineDiscountDelete_orderLineDiscountDelete_order_events_lines | null)[] | null; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderLineDiscountDelete_orderLineDiscountDelete_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderLineDiscountDelete_orderLineDiscountDelete_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderLineDiscountDelete_orderLineDiscountDelete_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string; - quantity: number; - quantityFulfilled: number; - unitPrice: OrderLineDiscountDelete_orderLineDiscountDelete_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderLineDiscountDelete_orderLineDiscountDelete_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderLineDiscountDelete_orderLineDiscountDelete_order_fulfillments_lines_orderLine | null; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderLineDiscountDelete_orderLineDiscountDelete_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderLineDiscountDelete_orderLineDiscountDelete_order_fulfillments_warehouse | null; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_lines_unitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderLineDiscountDelete_orderLineDiscountDelete_order_lines_unitPrice_gross; - net: OrderLineDiscountDelete_orderLineDiscountDelete_order_lines_unitPrice_net; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderLineDiscountDelete_orderLineDiscountDelete_order_lines_variant | null; - productName: string; - productSku: string; - quantity: number; - quantityFulfilled: number; - unitPrice: OrderLineDiscountDelete_orderLineDiscountDelete_order_lines_unitPrice; - thumbnail: OrderLineDiscountDelete_orderLineDiscountDelete_order_lines_thumbnail | null; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingPrice_gross; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderLineDiscountDelete_orderLineDiscountDelete_order_subtotal_gross; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_total { - __typename: "TaxedMoney"; - gross: OrderLineDiscountDelete_orderLineDiscountDelete_order_total_gross; - tax: OrderLineDiscountDelete_orderLineDiscountDelete_order_total_tax; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingMethods_price | null; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_discount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete_order { - __typename: "Order"; - id: string; - metadata: (OrderLineDiscountDelete_orderLineDiscountDelete_order_metadata | null)[]; - privateMetadata: (OrderLineDiscountDelete_orderLineDiscountDelete_order_privateMetadata | null)[]; - billingAddress: OrderLineDiscountDelete_orderLineDiscountDelete_order_billingAddress | null; - canFinalize: boolean; - created: any; - customerNote: string; - events: (OrderLineDiscountDelete_orderLineDiscountDelete_order_events | null)[] | null; - fulfillments: (OrderLineDiscountDelete_orderLineDiscountDelete_order_fulfillments | null)[]; - lines: (OrderLineDiscountDelete_orderLineDiscountDelete_order_lines | null)[]; - number: string | null; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingAddress | null; - shippingMethod: OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingMethod | null; - shippingMethodName: string | null; - shippingPrice: OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingPrice; - status: OrderStatus; - subtotal: OrderLineDiscountDelete_orderLineDiscountDelete_order_subtotal; - total: OrderLineDiscountDelete_orderLineDiscountDelete_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderLineDiscountDelete_orderLineDiscountDelete_order_totalAuthorized; - totalCaptured: OrderLineDiscountDelete_orderLineDiscountDelete_order_totalCaptured; - user: OrderLineDiscountDelete_orderLineDiscountDelete_order_user | null; - userEmail: string | null; - shippingMethods: (OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingMethods | null)[] | null; - discount: OrderLineDiscountDelete_orderLineDiscountDelete_order_discount | null; - invoices: (OrderLineDiscountDelete_orderLineDiscountDelete_order_invoices | null)[] | null; - channel: OrderLineDiscountDelete_orderLineDiscountDelete_order_channel; - isPaid: boolean; -} - -export interface OrderLineDiscountDelete_orderLineDiscountDelete { - __typename: "OrderLineDiscountDelete"; - errors: OrderLineDiscountDelete_orderLineDiscountDelete_errors[]; - order: OrderLineDiscountDelete_orderLineDiscountDelete_order | null; -} - -export interface OrderLineDiscountDelete { - orderLineDiscountDelete: OrderLineDiscountDelete_orderLineDiscountDelete | null; -} - -export interface OrderLineDiscountDeleteVariables { - orderLineId: string; -} diff --git a/src/orders/types/OrderLineDiscountRemove.ts b/src/orders/types/OrderLineDiscountRemove.ts deleted file mode 100644 index db98a2fca..000000000 --- a/src/orders/types/OrderLineDiscountRemove.ts +++ /dev/null @@ -1,618 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderLineDiscountRemove -// ==================================================== - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderLineDiscountRemove_orderLineDiscountRemove_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderLineDiscountRemove_orderLineDiscountRemove_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderLineDiscountRemove_orderLineDiscountRemove_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderLineDiscountRemove_orderLineDiscountRemove_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderLineDiscountRemove_orderLineDiscountRemove_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderLineDiscountRemove_orderLineDiscountRemove_order_giftCards_events_balance | null; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_giftCards { - __typename: "GiftCard"; - events: OrderLineDiscountRemove_orderLineDiscountRemove_order_giftCards_events[]; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderLineDiscountRemove_orderLineDiscountRemove_order_discounts_amount; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderLineDiscountRemove_orderLineDiscountRemove_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderLineDiscountRemove_orderLineDiscountRemove_order_events_discount_oldAmount | null; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderLineDiscountRemove_orderLineDiscountRemove_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderLineDiscountRemove_orderLineDiscountRemove_order_events_lines_discount_oldAmount | null; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderLineDiscountRemove_orderLineDiscountRemove_order_events_lines_discount | null; - orderLine: OrderLineDiscountRemove_orderLineDiscountRemove_order_events_lines_orderLine | null; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderLineDiscountRemove_orderLineDiscountRemove_order_events_discount | null; - relatedOrder: OrderLineDiscountRemove_orderLineDiscountRemove_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderLineDiscountRemove_orderLineDiscountRemove_order_events_user | null; - app: OrderLineDiscountRemove_orderLineDiscountRemove_order_events_app | null; - lines: (OrderLineDiscountRemove_orderLineDiscountRemove_order_events_lines | null)[] | null; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines_orderLine | null; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments_warehouse | null; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderLineDiscountRemove_orderLineDiscountRemove_order_lines_variant_preorder | null; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderLineDiscountRemove_orderLineDiscountRemove_order_lines_undiscountedUnitPrice_gross; - net: OrderLineDiscountRemove_orderLineDiscountRemove_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderLineDiscountRemove_orderLineDiscountRemove_order_lines_unitPrice_gross; - net: OrderLineDiscountRemove_orderLineDiscountRemove_order_lines_unitPrice_net; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderLineDiscountRemove_orderLineDiscountRemove_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderLineDiscountRemove_orderLineDiscountRemove_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderLineDiscountRemove_orderLineDiscountRemove_order_lines_undiscountedUnitPrice; - unitPrice: OrderLineDiscountRemove_orderLineDiscountRemove_order_lines_unitPrice; - thumbnail: OrderLineDiscountRemove_orderLineDiscountRemove_order_lines_thumbnail | null; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderLineDiscountRemove_orderLineDiscountRemove_order_deliveryMethod = OrderLineDiscountRemove_orderLineDiscountRemove_order_deliveryMethod_ShippingMethod | OrderLineDiscountRemove_orderLineDiscountRemove_order_deliveryMethod_Warehouse; - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingPrice_gross; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderLineDiscountRemove_orderLineDiscountRemove_order_subtotal_gross; - net: OrderLineDiscountRemove_orderLineDiscountRemove_order_subtotal_net; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_total { - __typename: "TaxedMoney"; - gross: OrderLineDiscountRemove_orderLineDiscountRemove_order_total_gross; - net: OrderLineDiscountRemove_orderLineDiscountRemove_order_total_net; - tax: OrderLineDiscountRemove_orderLineDiscountRemove_order_total_tax; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderLineDiscountRemove_orderLineDiscountRemove_order_undiscountedTotal_net; - gross: OrderLineDiscountRemove_orderLineDiscountRemove_order_undiscountedTotal_gross; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderLineDiscountRemove_orderLineDiscountRemove_order_channel_defaultCountry; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderLineDiscountRemove_orderLineDiscountRemove_order_metadata | null)[]; - privateMetadata: (OrderLineDiscountRemove_orderLineDiscountRemove_order_privateMetadata | null)[]; - billingAddress: OrderLineDiscountRemove_orderLineDiscountRemove_order_billingAddress | null; - giftCards: (OrderLineDiscountRemove_orderLineDiscountRemove_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderLineDiscountRemove_orderLineDiscountRemove_order_discounts[] | null; - events: (OrderLineDiscountRemove_orderLineDiscountRemove_order_events | null)[] | null; - fulfillments: (OrderLineDiscountRemove_orderLineDiscountRemove_order_fulfillments | null)[]; - lines: (OrderLineDiscountRemove_orderLineDiscountRemove_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingAddress | null; - deliveryMethod: OrderLineDiscountRemove_orderLineDiscountRemove_order_deliveryMethod | null; - shippingMethod: OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingPrice; - status: OrderStatus; - subtotal: OrderLineDiscountRemove_orderLineDiscountRemove_order_subtotal; - total: OrderLineDiscountRemove_orderLineDiscountRemove_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderLineDiscountRemove_orderLineDiscountRemove_order_totalAuthorized; - totalCaptured: OrderLineDiscountRemove_orderLineDiscountRemove_order_totalCaptured; - undiscountedTotal: OrderLineDiscountRemove_orderLineDiscountRemove_order_undiscountedTotal; - user: OrderLineDiscountRemove_orderLineDiscountRemove_order_user | null; - userEmail: string | null; - shippingMethods: (OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingMethods | null)[] | null; - invoices: (OrderLineDiscountRemove_orderLineDiscountRemove_order_invoices | null)[] | null; - channel: OrderLineDiscountRemove_orderLineDiscountRemove_order_channel; -} - -export interface OrderLineDiscountRemove_orderLineDiscountRemove { - __typename: "OrderLineDiscountRemove"; - errors: OrderLineDiscountRemove_orderLineDiscountRemove_errors[]; - order: OrderLineDiscountRemove_orderLineDiscountRemove_order | null; -} - -export interface OrderLineDiscountRemove { - orderLineDiscountRemove: OrderLineDiscountRemove_orderLineDiscountRemove | null; -} - -export interface OrderLineDiscountRemoveVariables { - orderLineId: string; -} diff --git a/src/orders/types/OrderLineDiscountUpdate.ts b/src/orders/types/OrderLineDiscountUpdate.ts deleted file mode 100644 index f2e709089..000000000 --- a/src/orders/types/OrderLineDiscountUpdate.ts +++ /dev/null @@ -1,619 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderDiscountCommonInput, OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderLineDiscountUpdate -// ==================================================== - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_giftCards_events_balance | null; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_giftCards { - __typename: "GiftCard"; - events: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_giftCards_events[]; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_discounts_amount; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_discount_oldAmount | null; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_lines_discount_oldAmount | null; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_lines_discount | null; - orderLine: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_lines_orderLine | null; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_discount | null; - relatedOrder: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_user | null; - app: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_app | null; - lines: (OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events_lines | null)[] | null; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines_orderLine | null; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments_warehouse | null; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines_variant_preorder | null; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines_undiscountedUnitPrice_gross; - net: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines_unitPrice_gross; - net: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines_unitPrice_net; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines_undiscountedUnitPrice; - unitPrice: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines_unitPrice; - thumbnail: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines_thumbnail | null; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderLineDiscountUpdate_orderLineDiscountUpdate_order_deliveryMethod = OrderLineDiscountUpdate_orderLineDiscountUpdate_order_deliveryMethod_ShippingMethod | OrderLineDiscountUpdate_orderLineDiscountUpdate_order_deliveryMethod_Warehouse; - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingPrice_gross; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_subtotal_gross; - net: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_subtotal_net; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_total { - __typename: "TaxedMoney"; - gross: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_total_gross; - net: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_total_net; - tax: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_total_tax; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_undiscountedTotal_net; - gross: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_undiscountedTotal_gross; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_channel_defaultCountry; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderLineDiscountUpdate_orderLineDiscountUpdate_order_metadata | null)[]; - privateMetadata: (OrderLineDiscountUpdate_orderLineDiscountUpdate_order_privateMetadata | null)[]; - billingAddress: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_billingAddress | null; - giftCards: (OrderLineDiscountUpdate_orderLineDiscountUpdate_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_discounts[] | null; - events: (OrderLineDiscountUpdate_orderLineDiscountUpdate_order_events | null)[] | null; - fulfillments: (OrderLineDiscountUpdate_orderLineDiscountUpdate_order_fulfillments | null)[]; - lines: (OrderLineDiscountUpdate_orderLineDiscountUpdate_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingAddress | null; - deliveryMethod: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_deliveryMethod | null; - shippingMethod: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingPrice; - status: OrderStatus; - subtotal: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_subtotal; - total: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_totalAuthorized; - totalCaptured: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_totalCaptured; - undiscountedTotal: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_undiscountedTotal; - user: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_user | null; - userEmail: string | null; - shippingMethods: (OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingMethods | null)[] | null; - invoices: (OrderLineDiscountUpdate_orderLineDiscountUpdate_order_invoices | null)[] | null; - channel: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_channel; -} - -export interface OrderLineDiscountUpdate_orderLineDiscountUpdate { - __typename: "OrderLineDiscountUpdate"; - errors: OrderLineDiscountUpdate_orderLineDiscountUpdate_errors[]; - order: OrderLineDiscountUpdate_orderLineDiscountUpdate_order | null; -} - -export interface OrderLineDiscountUpdate { - orderLineDiscountUpdate: OrderLineDiscountUpdate_orderLineDiscountUpdate | null; -} - -export interface OrderLineDiscountUpdateVariables { - input: OrderDiscountCommonInput; - orderLineId: string; -} diff --git a/src/orders/types/OrderLineUpdate.ts b/src/orders/types/OrderLineUpdate.ts deleted file mode 100644 index b3cebd854..000000000 --- a/src/orders/types/OrderLineUpdate.ts +++ /dev/null @@ -1,619 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderLineInput, OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderLineUpdate -// ==================================================== - -export interface OrderLineUpdate_orderLineUpdate_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderLineUpdate_orderLineUpdate_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderLineUpdate_orderLineUpdate_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderLineUpdate_orderLineUpdate_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderLineUpdate_orderLineUpdate_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderLineUpdate_orderLineUpdate_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderLineUpdate_orderLineUpdate_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderLineUpdate_orderLineUpdate_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderLineUpdate_orderLineUpdate_order_giftCards_events_balance | null; -} - -export interface OrderLineUpdate_orderLineUpdate_order_giftCards { - __typename: "GiftCard"; - events: OrderLineUpdate_orderLineUpdate_order_giftCards_events[]; -} - -export interface OrderLineUpdate_orderLineUpdate_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderLineUpdate_orderLineUpdate_order_discounts_amount; -} - -export interface OrderLineUpdate_orderLineUpdate_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderLineUpdate_orderLineUpdate_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderLineUpdate_orderLineUpdate_order_events_discount_oldAmount | null; -} - -export interface OrderLineUpdate_orderLineUpdate_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderLineUpdate_orderLineUpdate_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderLineUpdate_orderLineUpdate_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderLineUpdate_orderLineUpdate_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderLineUpdate_orderLineUpdate_order_events_lines_discount_oldAmount | null; -} - -export interface OrderLineUpdate_orderLineUpdate_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderLineUpdate_orderLineUpdate_order_events_lines_discount | null; - orderLine: OrderLineUpdate_orderLineUpdate_order_events_lines_orderLine | null; -} - -export interface OrderLineUpdate_orderLineUpdate_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderLineUpdate_orderLineUpdate_order_events_discount | null; - relatedOrder: OrderLineUpdate_orderLineUpdate_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderLineUpdate_orderLineUpdate_order_events_user | null; - app: OrderLineUpdate_orderLineUpdate_order_events_app | null; - lines: (OrderLineUpdate_orderLineUpdate_order_events_lines | null)[] | null; -} - -export interface OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderLineUpdate_orderLineUpdate_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderLineUpdate_orderLineUpdate_order_fulfillments_lines_orderLine | null; -} - -export interface OrderLineUpdate_orderLineUpdate_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderLineUpdate_orderLineUpdate_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderLineUpdate_orderLineUpdate_order_fulfillments_warehouse | null; -} - -export interface OrderLineUpdate_orderLineUpdate_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderLineUpdate_orderLineUpdate_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderLineUpdate_orderLineUpdate_order_lines_variant_preorder | null; -} - -export interface OrderLineUpdate_orderLineUpdate_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderLineUpdate_orderLineUpdate_order_lines_undiscountedUnitPrice_gross; - net: OrderLineUpdate_orderLineUpdate_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderLineUpdate_orderLineUpdate_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderLineUpdate_orderLineUpdate_order_lines_unitPrice_gross; - net: OrderLineUpdate_orderLineUpdate_order_lines_unitPrice_net; -} - -export interface OrderLineUpdate_orderLineUpdate_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderLineUpdate_orderLineUpdate_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderLineUpdate_orderLineUpdate_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderLineUpdate_orderLineUpdate_order_lines_undiscountedUnitPrice; - unitPrice: OrderLineUpdate_orderLineUpdate_order_lines_unitPrice; - thumbnail: OrderLineUpdate_orderLineUpdate_order_lines_thumbnail | null; -} - -export interface OrderLineUpdate_orderLineUpdate_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderLineUpdate_orderLineUpdate_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderLineUpdate_orderLineUpdate_order_deliveryMethod = OrderLineUpdate_orderLineUpdate_order_deliveryMethod_ShippingMethod | OrderLineUpdate_orderLineUpdate_order_deliveryMethod_Warehouse; - -export interface OrderLineUpdate_orderLineUpdate_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderLineUpdate_orderLineUpdate_order_shippingPrice_gross; -} - -export interface OrderLineUpdate_orderLineUpdate_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderLineUpdate_orderLineUpdate_order_subtotal_gross; - net: OrderLineUpdate_orderLineUpdate_order_subtotal_net; -} - -export interface OrderLineUpdate_orderLineUpdate_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_total { - __typename: "TaxedMoney"; - gross: OrderLineUpdate_orderLineUpdate_order_total_gross; - net: OrderLineUpdate_orderLineUpdate_order_total_net; - tax: OrderLineUpdate_orderLineUpdate_order_total_tax; -} - -export interface OrderLineUpdate_orderLineUpdate_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderLineUpdate_orderLineUpdate_order_undiscountedTotal_net; - gross: OrderLineUpdate_orderLineUpdate_order_undiscountedTotal_gross; -} - -export interface OrderLineUpdate_orderLineUpdate_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderLineUpdate_orderLineUpdate_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderLineUpdate_orderLineUpdate_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderLineUpdate_orderLineUpdate_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderLineUpdate_orderLineUpdate_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderLineUpdate_orderLineUpdate_order_channel_defaultCountry; -} - -export interface OrderLineUpdate_orderLineUpdate_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderLineUpdate_orderLineUpdate_order_metadata | null)[]; - privateMetadata: (OrderLineUpdate_orderLineUpdate_order_privateMetadata | null)[]; - billingAddress: OrderLineUpdate_orderLineUpdate_order_billingAddress | null; - giftCards: (OrderLineUpdate_orderLineUpdate_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderLineUpdate_orderLineUpdate_order_discounts[] | null; - events: (OrderLineUpdate_orderLineUpdate_order_events | null)[] | null; - fulfillments: (OrderLineUpdate_orderLineUpdate_order_fulfillments | null)[]; - lines: (OrderLineUpdate_orderLineUpdate_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderLineUpdate_orderLineUpdate_order_shippingAddress | null; - deliveryMethod: OrderLineUpdate_orderLineUpdate_order_deliveryMethod | null; - shippingMethod: OrderLineUpdate_orderLineUpdate_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderLineUpdate_orderLineUpdate_order_shippingPrice; - status: OrderStatus; - subtotal: OrderLineUpdate_orderLineUpdate_order_subtotal; - total: OrderLineUpdate_orderLineUpdate_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderLineUpdate_orderLineUpdate_order_totalAuthorized; - totalCaptured: OrderLineUpdate_orderLineUpdate_order_totalCaptured; - undiscountedTotal: OrderLineUpdate_orderLineUpdate_order_undiscountedTotal; - user: OrderLineUpdate_orderLineUpdate_order_user | null; - userEmail: string | null; - shippingMethods: (OrderLineUpdate_orderLineUpdate_order_shippingMethods | null)[] | null; - invoices: (OrderLineUpdate_orderLineUpdate_order_invoices | null)[] | null; - channel: OrderLineUpdate_orderLineUpdate_order_channel; -} - -export interface OrderLineUpdate_orderLineUpdate { - __typename: "OrderLineUpdate"; - errors: OrderLineUpdate_orderLineUpdate_errors[]; - order: OrderLineUpdate_orderLineUpdate_order | null; -} - -export interface OrderLineUpdate { - orderLineUpdate: OrderLineUpdate_orderLineUpdate | null; -} - -export interface OrderLineUpdateVariables { - id: string; - input: OrderLineInput; -} diff --git a/src/orders/types/OrderLinesAdd.ts b/src/orders/types/OrderLinesAdd.ts deleted file mode 100644 index a3ece0c67..000000000 --- a/src/orders/types/OrderLinesAdd.ts +++ /dev/null @@ -1,619 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderLineCreateInput, OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderLinesAdd -// ==================================================== - -export interface OrderLinesAdd_orderLinesCreate_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderLinesAdd_orderLinesCreate_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderLinesAdd_orderLinesCreate_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderLinesAdd_orderLinesCreate_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderLinesAdd_orderLinesCreate_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderLinesAdd_orderLinesCreate_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderLinesAdd_orderLinesCreate_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderLinesAdd_orderLinesCreate_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderLinesAdd_orderLinesCreate_order_giftCards_events_balance | null; -} - -export interface OrderLinesAdd_orderLinesCreate_order_giftCards { - __typename: "GiftCard"; - events: OrderLinesAdd_orderLinesCreate_order_giftCards_events[]; -} - -export interface OrderLinesAdd_orderLinesCreate_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderLinesAdd_orderLinesCreate_order_discounts_amount; -} - -export interface OrderLinesAdd_orderLinesCreate_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderLinesAdd_orderLinesCreate_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderLinesAdd_orderLinesCreate_order_events_discount_oldAmount | null; -} - -export interface OrderLinesAdd_orderLinesCreate_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderLinesAdd_orderLinesCreate_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderLinesAdd_orderLinesCreate_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderLinesAdd_orderLinesCreate_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderLinesAdd_orderLinesCreate_order_events_lines_discount_oldAmount | null; -} - -export interface OrderLinesAdd_orderLinesCreate_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderLinesAdd_orderLinesCreate_order_events_lines_discount | null; - orderLine: OrderLinesAdd_orderLinesCreate_order_events_lines_orderLine | null; -} - -export interface OrderLinesAdd_orderLinesCreate_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderLinesAdd_orderLinesCreate_order_events_discount | null; - relatedOrder: OrderLinesAdd_orderLinesCreate_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderLinesAdd_orderLinesCreate_order_events_user | null; - app: OrderLinesAdd_orderLinesCreate_order_events_app | null; - lines: (OrderLinesAdd_orderLinesCreate_order_events_lines | null)[] | null; -} - -export interface OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderLinesAdd_orderLinesCreate_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderLinesAdd_orderLinesCreate_order_fulfillments_lines_orderLine | null; -} - -export interface OrderLinesAdd_orderLinesCreate_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderLinesAdd_orderLinesCreate_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderLinesAdd_orderLinesCreate_order_fulfillments_warehouse | null; -} - -export interface OrderLinesAdd_orderLinesCreate_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderLinesAdd_orderLinesCreate_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderLinesAdd_orderLinesCreate_order_lines_variant_preorder | null; -} - -export interface OrderLinesAdd_orderLinesCreate_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderLinesAdd_orderLinesCreate_order_lines_undiscountedUnitPrice_gross; - net: OrderLinesAdd_orderLinesCreate_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderLinesAdd_orderLinesCreate_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderLinesAdd_orderLinesCreate_order_lines_unitPrice_gross; - net: OrderLinesAdd_orderLinesCreate_order_lines_unitPrice_net; -} - -export interface OrderLinesAdd_orderLinesCreate_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderLinesAdd_orderLinesCreate_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderLinesAdd_orderLinesCreate_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderLinesAdd_orderLinesCreate_order_lines_undiscountedUnitPrice; - unitPrice: OrderLinesAdd_orderLinesCreate_order_lines_unitPrice; - thumbnail: OrderLinesAdd_orderLinesCreate_order_lines_thumbnail | null; -} - -export interface OrderLinesAdd_orderLinesCreate_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderLinesAdd_orderLinesCreate_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderLinesAdd_orderLinesCreate_order_deliveryMethod = OrderLinesAdd_orderLinesCreate_order_deliveryMethod_ShippingMethod | OrderLinesAdd_orderLinesCreate_order_deliveryMethod_Warehouse; - -export interface OrderLinesAdd_orderLinesCreate_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderLinesAdd_orderLinesCreate_order_shippingPrice_gross; -} - -export interface OrderLinesAdd_orderLinesCreate_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderLinesAdd_orderLinesCreate_order_subtotal_gross; - net: OrderLinesAdd_orderLinesCreate_order_subtotal_net; -} - -export interface OrderLinesAdd_orderLinesCreate_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_total { - __typename: "TaxedMoney"; - gross: OrderLinesAdd_orderLinesCreate_order_total_gross; - net: OrderLinesAdd_orderLinesCreate_order_total_net; - tax: OrderLinesAdd_orderLinesCreate_order_total_tax; -} - -export interface OrderLinesAdd_orderLinesCreate_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderLinesAdd_orderLinesCreate_order_undiscountedTotal_net; - gross: OrderLinesAdd_orderLinesCreate_order_undiscountedTotal_gross; -} - -export interface OrderLinesAdd_orderLinesCreate_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderLinesAdd_orderLinesCreate_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderLinesAdd_orderLinesCreate_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderLinesAdd_orderLinesCreate_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderLinesAdd_orderLinesCreate_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderLinesAdd_orderLinesCreate_order_channel_defaultCountry; -} - -export interface OrderLinesAdd_orderLinesCreate_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderLinesAdd_orderLinesCreate_order_metadata | null)[]; - privateMetadata: (OrderLinesAdd_orderLinesCreate_order_privateMetadata | null)[]; - billingAddress: OrderLinesAdd_orderLinesCreate_order_billingAddress | null; - giftCards: (OrderLinesAdd_orderLinesCreate_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderLinesAdd_orderLinesCreate_order_discounts[] | null; - events: (OrderLinesAdd_orderLinesCreate_order_events | null)[] | null; - fulfillments: (OrderLinesAdd_orderLinesCreate_order_fulfillments | null)[]; - lines: (OrderLinesAdd_orderLinesCreate_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderLinesAdd_orderLinesCreate_order_shippingAddress | null; - deliveryMethod: OrderLinesAdd_orderLinesCreate_order_deliveryMethod | null; - shippingMethod: OrderLinesAdd_orderLinesCreate_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderLinesAdd_orderLinesCreate_order_shippingPrice; - status: OrderStatus; - subtotal: OrderLinesAdd_orderLinesCreate_order_subtotal; - total: OrderLinesAdd_orderLinesCreate_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderLinesAdd_orderLinesCreate_order_totalAuthorized; - totalCaptured: OrderLinesAdd_orderLinesCreate_order_totalCaptured; - undiscountedTotal: OrderLinesAdd_orderLinesCreate_order_undiscountedTotal; - user: OrderLinesAdd_orderLinesCreate_order_user | null; - userEmail: string | null; - shippingMethods: (OrderLinesAdd_orderLinesCreate_order_shippingMethods | null)[] | null; - invoices: (OrderLinesAdd_orderLinesCreate_order_invoices | null)[] | null; - channel: OrderLinesAdd_orderLinesCreate_order_channel; -} - -export interface OrderLinesAdd_orderLinesCreate { - __typename: "OrderLinesCreate"; - errors: OrderLinesAdd_orderLinesCreate_errors[]; - order: OrderLinesAdd_orderLinesCreate_order | null; -} - -export interface OrderLinesAdd { - orderLinesCreate: OrderLinesAdd_orderLinesCreate | null; -} - -export interface OrderLinesAddVariables { - id: string; - input: (OrderLineCreateInput | null)[]; -} diff --git a/src/orders/types/OrderList.ts b/src/orders/types/OrderList.ts deleted file mode 100644 index 6378263bc..000000000 --- a/src/orders/types/OrderList.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderFilterInput, OrderSortingInput, PaymentChargeStatusEnum, OrderStatus } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: OrderList -// ==================================================== - -export interface OrderList_orders_edges_node_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderList_orders_edges_node_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderList_orders_edges_node_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderList_orders_edges_node_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderList_orders_edges_node_total { - __typename: "TaxedMoney"; - gross: OrderList_orders_edges_node_total_gross; -} - -export interface OrderList_orders_edges_node { - __typename: "Order"; - billingAddress: OrderList_orders_edges_node_billingAddress | null; - created: any; - id: string; - number: string | null; - paymentStatus: PaymentChargeStatusEnum; - status: OrderStatus; - total: OrderList_orders_edges_node_total; - userEmail: string | null; -} - -export interface OrderList_orders_edges { - __typename: "OrderCountableEdge"; - node: OrderList_orders_edges_node; -} - -export interface OrderList_orders_pageInfo { - __typename: "PageInfo"; - hasPreviousPage: boolean; - hasNextPage: boolean; - startCursor: string | null; - endCursor: string | null; -} - -export interface OrderList_orders { - __typename: "OrderCountableConnection"; - edges: OrderList_orders_edges[]; - pageInfo: OrderList_orders_pageInfo; -} - -export interface OrderList { - orders: OrderList_orders | null; -} - -export interface OrderListVariables { - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; - filter?: OrderFilterInput | null; - sort?: OrderSortingInput | null; -} diff --git a/src/orders/types/OrderMarkAsPaid.ts b/src/orders/types/OrderMarkAsPaid.ts deleted file mode 100644 index b86c1f2d6..000000000 --- a/src/orders/types/OrderMarkAsPaid.ts +++ /dev/null @@ -1,619 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderMarkAsPaid -// ==================================================== - -export interface OrderMarkAsPaid_orderMarkAsPaid_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderMarkAsPaid_orderMarkAsPaid_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderMarkAsPaid_orderMarkAsPaid_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderMarkAsPaid_orderMarkAsPaid_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderMarkAsPaid_orderMarkAsPaid_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderMarkAsPaid_orderMarkAsPaid_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderMarkAsPaid_orderMarkAsPaid_order_giftCards_events_balance | null; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_giftCards { - __typename: "GiftCard"; - events: OrderMarkAsPaid_orderMarkAsPaid_order_giftCards_events[]; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderMarkAsPaid_orderMarkAsPaid_order_discounts_amount; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderMarkAsPaid_orderMarkAsPaid_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderMarkAsPaid_orderMarkAsPaid_order_events_discount_oldAmount | null; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderMarkAsPaid_orderMarkAsPaid_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderMarkAsPaid_orderMarkAsPaid_order_events_lines_discount_oldAmount | null; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderMarkAsPaid_orderMarkAsPaid_order_events_lines_discount | null; - orderLine: OrderMarkAsPaid_orderMarkAsPaid_order_events_lines_orderLine | null; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderMarkAsPaid_orderMarkAsPaid_order_events_discount | null; - relatedOrder: OrderMarkAsPaid_orderMarkAsPaid_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderMarkAsPaid_orderMarkAsPaid_order_events_user | null; - app: OrderMarkAsPaid_orderMarkAsPaid_order_events_app | null; - lines: (OrderMarkAsPaid_orderMarkAsPaid_order_events_lines | null)[] | null; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines_orderLine | null; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments_warehouse | null; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderMarkAsPaid_orderMarkAsPaid_order_lines_variant_preorder | null; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderMarkAsPaid_orderMarkAsPaid_order_lines_undiscountedUnitPrice_gross; - net: OrderMarkAsPaid_orderMarkAsPaid_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderMarkAsPaid_orderMarkAsPaid_order_lines_unitPrice_gross; - net: OrderMarkAsPaid_orderMarkAsPaid_order_lines_unitPrice_net; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderMarkAsPaid_orderMarkAsPaid_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderMarkAsPaid_orderMarkAsPaid_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderMarkAsPaid_orderMarkAsPaid_order_lines_undiscountedUnitPrice; - unitPrice: OrderMarkAsPaid_orderMarkAsPaid_order_lines_unitPrice; - thumbnail: OrderMarkAsPaid_orderMarkAsPaid_order_lines_thumbnail | null; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderMarkAsPaid_orderMarkAsPaid_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderMarkAsPaid_orderMarkAsPaid_order_deliveryMethod = OrderMarkAsPaid_orderMarkAsPaid_order_deliveryMethod_ShippingMethod | OrderMarkAsPaid_orderMarkAsPaid_order_deliveryMethod_Warehouse; - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderMarkAsPaid_orderMarkAsPaid_order_shippingPrice_gross; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderMarkAsPaid_orderMarkAsPaid_order_subtotal_gross; - net: OrderMarkAsPaid_orderMarkAsPaid_order_subtotal_net; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_total { - __typename: "TaxedMoney"; - gross: OrderMarkAsPaid_orderMarkAsPaid_order_total_gross; - net: OrderMarkAsPaid_orderMarkAsPaid_order_total_net; - tax: OrderMarkAsPaid_orderMarkAsPaid_order_total_tax; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderMarkAsPaid_orderMarkAsPaid_order_undiscountedTotal_net; - gross: OrderMarkAsPaid_orderMarkAsPaid_order_undiscountedTotal_gross; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderMarkAsPaid_orderMarkAsPaid_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderMarkAsPaid_orderMarkAsPaid_order_channel_defaultCountry; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderMarkAsPaid_orderMarkAsPaid_order_metadata | null)[]; - privateMetadata: (OrderMarkAsPaid_orderMarkAsPaid_order_privateMetadata | null)[]; - billingAddress: OrderMarkAsPaid_orderMarkAsPaid_order_billingAddress | null; - giftCards: (OrderMarkAsPaid_orderMarkAsPaid_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderMarkAsPaid_orderMarkAsPaid_order_discounts[] | null; - events: (OrderMarkAsPaid_orderMarkAsPaid_order_events | null)[] | null; - fulfillments: (OrderMarkAsPaid_orderMarkAsPaid_order_fulfillments | null)[]; - lines: (OrderMarkAsPaid_orderMarkAsPaid_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderMarkAsPaid_orderMarkAsPaid_order_shippingAddress | null; - deliveryMethod: OrderMarkAsPaid_orderMarkAsPaid_order_deliveryMethod | null; - shippingMethod: OrderMarkAsPaid_orderMarkAsPaid_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderMarkAsPaid_orderMarkAsPaid_order_shippingPrice; - status: OrderStatus; - subtotal: OrderMarkAsPaid_orderMarkAsPaid_order_subtotal; - total: OrderMarkAsPaid_orderMarkAsPaid_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderMarkAsPaid_orderMarkAsPaid_order_totalAuthorized; - totalCaptured: OrderMarkAsPaid_orderMarkAsPaid_order_totalCaptured; - undiscountedTotal: OrderMarkAsPaid_orderMarkAsPaid_order_undiscountedTotal; - user: OrderMarkAsPaid_orderMarkAsPaid_order_user | null; - userEmail: string | null; - shippingMethods: (OrderMarkAsPaid_orderMarkAsPaid_order_shippingMethods | null)[] | null; - invoices: (OrderMarkAsPaid_orderMarkAsPaid_order_invoices | null)[] | null; - channel: OrderMarkAsPaid_orderMarkAsPaid_order_channel; -} - -export interface OrderMarkAsPaid_orderMarkAsPaid { - __typename: "OrderMarkAsPaid"; - errors: OrderMarkAsPaid_orderMarkAsPaid_errors[]; - order: OrderMarkAsPaid_orderMarkAsPaid_order | null; -} - -export interface OrderMarkAsPaid { - orderMarkAsPaid: OrderMarkAsPaid_orderMarkAsPaid | null; -} - -export interface OrderMarkAsPaidVariables { - id: string; - transactionReference?: string | null; -} diff --git a/src/orders/types/OrderRefund.ts b/src/orders/types/OrderRefund.ts deleted file mode 100644 index df2e9b89e..000000000 --- a/src/orders/types/OrderRefund.ts +++ /dev/null @@ -1,619 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderRefund -// ==================================================== - -export interface OrderRefund_orderRefund_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderRefund_orderRefund_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderRefund_orderRefund_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderRefund_orderRefund_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderRefund_orderRefund_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderRefund_orderRefund_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderRefund_orderRefund_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderRefund_orderRefund_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderRefund_orderRefund_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderRefund_orderRefund_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderRefund_orderRefund_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderRefund_orderRefund_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderRefund_orderRefund_order_giftCards_events_balance | null; -} - -export interface OrderRefund_orderRefund_order_giftCards { - __typename: "GiftCard"; - events: OrderRefund_orderRefund_order_giftCards_events[]; -} - -export interface OrderRefund_orderRefund_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderRefund_orderRefund_order_discounts_amount; -} - -export interface OrderRefund_orderRefund_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderRefund_orderRefund_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderRefund_orderRefund_order_events_discount_oldAmount | null; -} - -export interface OrderRefund_orderRefund_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderRefund_orderRefund_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderRefund_orderRefund_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderRefund_orderRefund_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderRefund_orderRefund_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderRefund_orderRefund_order_events_lines_discount_oldAmount | null; -} - -export interface OrderRefund_orderRefund_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderRefund_orderRefund_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderRefund_orderRefund_order_events_lines_discount | null; - orderLine: OrderRefund_orderRefund_order_events_lines_orderLine | null; -} - -export interface OrderRefund_orderRefund_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderRefund_orderRefund_order_events_discount | null; - relatedOrder: OrderRefund_orderRefund_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderRefund_orderRefund_order_events_user | null; - app: OrderRefund_orderRefund_order_events_app | null; - lines: (OrderRefund_orderRefund_order_events_lines | null)[] | null; -} - -export interface OrderRefund_orderRefund_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderRefund_orderRefund_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderRefund_orderRefund_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderRefund_orderRefund_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderRefund_orderRefund_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderRefund_orderRefund_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderRefund_orderRefund_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderRefund_orderRefund_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderRefund_orderRefund_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderRefund_orderRefund_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderRefund_orderRefund_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderRefund_orderRefund_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderRefund_orderRefund_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderRefund_orderRefund_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderRefund_orderRefund_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderRefund_orderRefund_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderRefund_orderRefund_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderRefund_orderRefund_order_fulfillments_lines_orderLine | null; -} - -export interface OrderRefund_orderRefund_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderRefund_orderRefund_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderRefund_orderRefund_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderRefund_orderRefund_order_fulfillments_warehouse | null; -} - -export interface OrderRefund_orderRefund_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderRefund_orderRefund_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderRefund_orderRefund_order_lines_variant_preorder | null; -} - -export interface OrderRefund_orderRefund_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderRefund_orderRefund_order_lines_undiscountedUnitPrice_gross; - net: OrderRefund_orderRefund_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderRefund_orderRefund_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderRefund_orderRefund_order_lines_unitPrice_gross; - net: OrderRefund_orderRefund_order_lines_unitPrice_net; -} - -export interface OrderRefund_orderRefund_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderRefund_orderRefund_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderRefund_orderRefund_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderRefund_orderRefund_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderRefund_orderRefund_order_lines_undiscountedUnitPrice; - unitPrice: OrderRefund_orderRefund_order_lines_unitPrice; - thumbnail: OrderRefund_orderRefund_order_lines_thumbnail | null; -} - -export interface OrderRefund_orderRefund_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderRefund_orderRefund_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderRefund_orderRefund_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderRefund_orderRefund_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderRefund_orderRefund_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderRefund_orderRefund_order_deliveryMethod = OrderRefund_orderRefund_order_deliveryMethod_ShippingMethod | OrderRefund_orderRefund_order_deliveryMethod_Warehouse; - -export interface OrderRefund_orderRefund_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderRefund_orderRefund_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderRefund_orderRefund_order_shippingPrice_gross; -} - -export interface OrderRefund_orderRefund_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderRefund_orderRefund_order_subtotal_gross; - net: OrderRefund_orderRefund_order_subtotal_net; -} - -export interface OrderRefund_orderRefund_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_total { - __typename: "TaxedMoney"; - gross: OrderRefund_orderRefund_order_total_gross; - net: OrderRefund_orderRefund_order_total_net; - tax: OrderRefund_orderRefund_order_total_tax; -} - -export interface OrderRefund_orderRefund_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderRefund_orderRefund_order_undiscountedTotal_net; - gross: OrderRefund_orderRefund_order_undiscountedTotal_gross; -} - -export interface OrderRefund_orderRefund_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderRefund_orderRefund_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefund_orderRefund_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderRefund_orderRefund_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderRefund_orderRefund_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderRefund_orderRefund_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderRefund_orderRefund_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderRefund_orderRefund_order_channel_defaultCountry; -} - -export interface OrderRefund_orderRefund_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderRefund_orderRefund_order_metadata | null)[]; - privateMetadata: (OrderRefund_orderRefund_order_privateMetadata | null)[]; - billingAddress: OrderRefund_orderRefund_order_billingAddress | null; - giftCards: (OrderRefund_orderRefund_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderRefund_orderRefund_order_discounts[] | null; - events: (OrderRefund_orderRefund_order_events | null)[] | null; - fulfillments: (OrderRefund_orderRefund_order_fulfillments | null)[]; - lines: (OrderRefund_orderRefund_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderRefund_orderRefund_order_shippingAddress | null; - deliveryMethod: OrderRefund_orderRefund_order_deliveryMethod | null; - shippingMethod: OrderRefund_orderRefund_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderRefund_orderRefund_order_shippingPrice; - status: OrderStatus; - subtotal: OrderRefund_orderRefund_order_subtotal; - total: OrderRefund_orderRefund_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderRefund_orderRefund_order_totalAuthorized; - totalCaptured: OrderRefund_orderRefund_order_totalCaptured; - undiscountedTotal: OrderRefund_orderRefund_order_undiscountedTotal; - user: OrderRefund_orderRefund_order_user | null; - userEmail: string | null; - shippingMethods: (OrderRefund_orderRefund_order_shippingMethods | null)[] | null; - invoices: (OrderRefund_orderRefund_order_invoices | null)[] | null; - channel: OrderRefund_orderRefund_order_channel; -} - -export interface OrderRefund_orderRefund { - __typename: "OrderRefund"; - errors: OrderRefund_orderRefund_errors[]; - order: OrderRefund_orderRefund_order | null; -} - -export interface OrderRefund { - orderRefund: OrderRefund_orderRefund | null; -} - -export interface OrderRefundVariables { - id: string; - amount: any; -} diff --git a/src/orders/types/OrderRefundData.ts b/src/orders/types/OrderRefundData.ts deleted file mode 100644 index 0974720b1..000000000 --- a/src/orders/types/OrderRefundData.ts +++ /dev/null @@ -1,123 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { FulfillmentStatus } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: OrderRefundData -// ==================================================== - -export interface OrderRefundData_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefundData_order_total { - __typename: "TaxedMoney"; - gross: OrderRefundData_order_total_gross; -} - -export interface OrderRefundData_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefundData_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefundData_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderRefundData_order_shippingPrice_gross; -} - -export interface OrderRefundData_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefundData_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderRefundData_order_lines_unitPrice_gross; -} - -export interface OrderRefundData_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderRefundData_order_lines { - __typename: "OrderLine"; - id: string; - productName: string; - quantity: number; - unitPrice: OrderRefundData_order_lines_unitPrice; - thumbnail: OrderRefundData_order_lines_thumbnail | null; - quantityToFulfill: number; -} - -export interface OrderRefundData_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderRefundData_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderRefundData_order_fulfillments_lines_orderLine_unitPrice_gross; -} - -export interface OrderRefundData_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderRefundData_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - quantity: number; - unitPrice: OrderRefundData_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderRefundData_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderRefundData_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderRefundData_order_fulfillments_lines_orderLine | null; -} - -export interface OrderRefundData_order_fulfillments { - __typename: "Fulfillment"; - id: string; - status: FulfillmentStatus; - fulfillmentOrder: number; - lines: (OrderRefundData_order_fulfillments_lines | null)[] | null; -} - -export interface OrderRefundData_order { - __typename: "Order"; - id: string; - number: string | null; - total: OrderRefundData_order_total; - totalCaptured: OrderRefundData_order_totalCaptured; - shippingPrice: OrderRefundData_order_shippingPrice; - lines: (OrderRefundData_order_lines | null)[]; - fulfillments: (OrderRefundData_order_fulfillments | null)[]; -} - -export interface OrderRefundData { - order: OrderRefundData_order | null; -} - -export interface OrderRefundDataVariables { - orderId: string; -} diff --git a/src/orders/types/OrderSettings.ts b/src/orders/types/OrderSettings.ts deleted file mode 100644 index 4cf06e937..000000000 --- a/src/orders/types/OrderSettings.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: OrderSettings -// ==================================================== - -export interface OrderSettings_orderSettings { - __typename: "OrderSettings"; - automaticallyConfirmAllNewOrders: boolean; - automaticallyFulfillNonShippableGiftCard: boolean; -} - -export interface OrderSettings_shop { - __typename: "Shop"; - fulfillmentAutoApprove: boolean; - fulfillmentAllowUnpaid: boolean; -} - -export interface OrderSettings { - orderSettings: OrderSettings_orderSettings | null; - shop: OrderSettings_shop; -} diff --git a/src/orders/types/OrderSettingsUpdate.ts b/src/orders/types/OrderSettingsUpdate.ts deleted file mode 100644 index 4afa4abf6..000000000 --- a/src/orders/types/OrderSettingsUpdate.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderSettingsUpdateInput, ShopSettingsInput, OrderSettingsErrorCode, ShopErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderSettingsUpdate -// ==================================================== - -export interface OrderSettingsUpdate_orderSettingsUpdate_errors { - __typename: "OrderSettingsError"; - code: OrderSettingsErrorCode; - field: string | null; - message: string | null; -} - -export interface OrderSettingsUpdate_orderSettingsUpdate_orderSettings { - __typename: "OrderSettings"; - automaticallyConfirmAllNewOrders: boolean; - automaticallyFulfillNonShippableGiftCard: boolean; -} - -export interface OrderSettingsUpdate_orderSettingsUpdate { - __typename: "OrderSettingsUpdate"; - errors: OrderSettingsUpdate_orderSettingsUpdate_errors[]; - orderSettings: OrderSettingsUpdate_orderSettingsUpdate_orderSettings | null; -} - -export interface OrderSettingsUpdate_shopSettingsUpdate_errors { - __typename: "ShopError"; - code: ShopErrorCode; - field: string | null; - message: string | null; -} - -export interface OrderSettingsUpdate_shopSettingsUpdate_shop { - __typename: "Shop"; - fulfillmentAutoApprove: boolean; - fulfillmentAllowUnpaid: boolean; -} - -export interface OrderSettingsUpdate_shopSettingsUpdate { - __typename: "ShopSettingsUpdate"; - errors: OrderSettingsUpdate_shopSettingsUpdate_errors[]; - shop: OrderSettingsUpdate_shopSettingsUpdate_shop | null; -} - -export interface OrderSettingsUpdate { - orderSettingsUpdate: OrderSettingsUpdate_orderSettingsUpdate | null; - shopSettingsUpdate: OrderSettingsUpdate_shopSettingsUpdate | null; -} - -export interface OrderSettingsUpdateVariables { - orderSettingsInput: OrderSettingsUpdateInput; - shopSettingsInput: ShopSettingsInput; -} diff --git a/src/orders/types/OrderShippingMethodUpdate.ts b/src/orders/types/OrderShippingMethodUpdate.ts deleted file mode 100644 index 116b5b707..000000000 --- a/src/orders/types/OrderShippingMethodUpdate.ts +++ /dev/null @@ -1,627 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderUpdateShippingInput, OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderShippingMethodUpdate -// ==================================================== - -export interface OrderShippingMethodUpdate_orderUpdateShipping_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_total { - __typename: "TaxedMoney"; - tax: OrderShippingMethodUpdate_orderUpdateShipping_order_total_tax; - gross: OrderShippingMethodUpdate_orderUpdateShipping_order_total_gross; - net: OrderShippingMethodUpdate_orderUpdateShipping_order_total_net; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethod_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethod_price; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderShippingMethodUpdate_orderUpdateShipping_order_shippingPrice_gross; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderShippingMethodUpdate_orderUpdateShipping_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderShippingMethodUpdate_orderUpdateShipping_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderShippingMethodUpdate_orderUpdateShipping_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderShippingMethodUpdate_orderUpdateShipping_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderShippingMethodUpdate_orderUpdateShipping_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderShippingMethodUpdate_orderUpdateShipping_order_giftCards_events_balance | null; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_giftCards { - __typename: "GiftCard"; - events: OrderShippingMethodUpdate_orderUpdateShipping_order_giftCards_events[]; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderShippingMethodUpdate_orderUpdateShipping_order_discounts_amount; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderShippingMethodUpdate_orderUpdateShipping_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderShippingMethodUpdate_orderUpdateShipping_order_events_discount_oldAmount | null; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderShippingMethodUpdate_orderUpdateShipping_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderShippingMethodUpdate_orderUpdateShipping_order_events_lines_discount_oldAmount | null; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderShippingMethodUpdate_orderUpdateShipping_order_events_lines_discount | null; - orderLine: OrderShippingMethodUpdate_orderUpdateShipping_order_events_lines_orderLine | null; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderShippingMethodUpdate_orderUpdateShipping_order_events_discount | null; - relatedOrder: OrderShippingMethodUpdate_orderUpdateShipping_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderShippingMethodUpdate_orderUpdateShipping_order_events_user | null; - app: OrderShippingMethodUpdate_orderUpdateShipping_order_events_app | null; - lines: (OrderShippingMethodUpdate_orderUpdateShipping_order_events_lines | null)[] | null; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines_orderLine | null; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments_warehouse | null; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderShippingMethodUpdate_orderUpdateShipping_order_lines_variant_preorder | null; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderShippingMethodUpdate_orderUpdateShipping_order_lines_undiscountedUnitPrice_gross; - net: OrderShippingMethodUpdate_orderUpdateShipping_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderShippingMethodUpdate_orderUpdateShipping_order_lines_unitPrice_gross; - net: OrderShippingMethodUpdate_orderUpdateShipping_order_lines_unitPrice_net; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderShippingMethodUpdate_orderUpdateShipping_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderShippingMethodUpdate_orderUpdateShipping_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderShippingMethodUpdate_orderUpdateShipping_order_lines_undiscountedUnitPrice; - unitPrice: OrderShippingMethodUpdate_orderUpdateShipping_order_lines_unitPrice; - thumbnail: OrderShippingMethodUpdate_orderUpdateShipping_order_lines_thumbnail | null; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderShippingMethodUpdate_orderUpdateShipping_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderShippingMethodUpdate_orderUpdateShipping_order_deliveryMethod = OrderShippingMethodUpdate_orderUpdateShipping_order_deliveryMethod_ShippingMethod | OrderShippingMethodUpdate_orderUpdateShipping_order_deliveryMethod_Warehouse; - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderShippingMethodUpdate_orderUpdateShipping_order_subtotal_gross; - net: OrderShippingMethodUpdate_orderUpdateShipping_order_subtotal_net; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderShippingMethodUpdate_orderUpdateShipping_order_undiscountedTotal_net; - gross: OrderShippingMethodUpdate_orderUpdateShipping_order_undiscountedTotal_gross; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderShippingMethodUpdate_orderUpdateShipping_order_channel_defaultCountry; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping_order { - __typename: "Order"; - shippingMethods: (OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethods | null)[] | null; - total: OrderShippingMethodUpdate_orderUpdateShipping_order_total; - id: string; - shippingMethod: OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethod | null; - shippingMethodName: string | null; - shippingPrice: OrderShippingMethodUpdate_orderUpdateShipping_order_shippingPrice; - token: string; - metadata: (OrderShippingMethodUpdate_orderUpdateShipping_order_metadata | null)[]; - privateMetadata: (OrderShippingMethodUpdate_orderUpdateShipping_order_privateMetadata | null)[]; - billingAddress: OrderShippingMethodUpdate_orderUpdateShipping_order_billingAddress | null; - giftCards: (OrderShippingMethodUpdate_orderUpdateShipping_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderShippingMethodUpdate_orderUpdateShipping_order_discounts[] | null; - events: (OrderShippingMethodUpdate_orderUpdateShipping_order_events | null)[] | null; - fulfillments: (OrderShippingMethodUpdate_orderUpdateShipping_order_fulfillments | null)[]; - lines: (OrderShippingMethodUpdate_orderUpdateShipping_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderShippingMethodUpdate_orderUpdateShipping_order_shippingAddress | null; - deliveryMethod: OrderShippingMethodUpdate_orderUpdateShipping_order_deliveryMethod | null; - collectionPointName: string | null; - status: OrderStatus; - subtotal: OrderShippingMethodUpdate_orderUpdateShipping_order_subtotal; - actions: (OrderAction | null)[]; - totalAuthorized: OrderShippingMethodUpdate_orderUpdateShipping_order_totalAuthorized; - totalCaptured: OrderShippingMethodUpdate_orderUpdateShipping_order_totalCaptured; - undiscountedTotal: OrderShippingMethodUpdate_orderUpdateShipping_order_undiscountedTotal; - user: OrderShippingMethodUpdate_orderUpdateShipping_order_user | null; - userEmail: string | null; - invoices: (OrderShippingMethodUpdate_orderUpdateShipping_order_invoices | null)[] | null; - channel: OrderShippingMethodUpdate_orderUpdateShipping_order_channel; -} - -export interface OrderShippingMethodUpdate_orderUpdateShipping { - __typename: "OrderUpdateShipping"; - errors: OrderShippingMethodUpdate_orderUpdateShipping_errors[]; - order: OrderShippingMethodUpdate_orderUpdateShipping_order | null; -} - -export interface OrderShippingMethodUpdate { - orderUpdateShipping: OrderShippingMethodUpdate_orderUpdateShipping | null; -} - -export interface OrderShippingMethodUpdateVariables { - id: string; - input: OrderUpdateShippingInput; -} diff --git a/src/orders/types/OrderUpdate.ts b/src/orders/types/OrderUpdate.ts deleted file mode 100644 index 9088ac33f..000000000 --- a/src/orders/types/OrderUpdate.ts +++ /dev/null @@ -1,619 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderUpdateInput, OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderUpdate -// ==================================================== - -export interface OrderUpdate_orderUpdate_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderUpdate_orderUpdate_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderUpdate_orderUpdate_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderUpdate_orderUpdate_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderUpdate_orderUpdate_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderUpdate_orderUpdate_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderUpdate_orderUpdate_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderUpdate_orderUpdate_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderUpdate_orderUpdate_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderUpdate_orderUpdate_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderUpdate_orderUpdate_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderUpdate_orderUpdate_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderUpdate_orderUpdate_order_giftCards_events_balance | null; -} - -export interface OrderUpdate_orderUpdate_order_giftCards { - __typename: "GiftCard"; - events: OrderUpdate_orderUpdate_order_giftCards_events[]; -} - -export interface OrderUpdate_orderUpdate_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderUpdate_orderUpdate_order_discounts_amount; -} - -export interface OrderUpdate_orderUpdate_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderUpdate_orderUpdate_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderUpdate_orderUpdate_order_events_discount_oldAmount | null; -} - -export interface OrderUpdate_orderUpdate_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderUpdate_orderUpdate_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderUpdate_orderUpdate_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderUpdate_orderUpdate_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderUpdate_orderUpdate_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderUpdate_orderUpdate_order_events_lines_discount_oldAmount | null; -} - -export interface OrderUpdate_orderUpdate_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderUpdate_orderUpdate_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderUpdate_orderUpdate_order_events_lines_discount | null; - orderLine: OrderUpdate_orderUpdate_order_events_lines_orderLine | null; -} - -export interface OrderUpdate_orderUpdate_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderUpdate_orderUpdate_order_events_discount | null; - relatedOrder: OrderUpdate_orderUpdate_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderUpdate_orderUpdate_order_events_user | null; - app: OrderUpdate_orderUpdate_order_events_app | null; - lines: (OrderUpdate_orderUpdate_order_events_lines | null)[] | null; -} - -export interface OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderUpdate_orderUpdate_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderUpdate_orderUpdate_order_fulfillments_lines_orderLine | null; -} - -export interface OrderUpdate_orderUpdate_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderUpdate_orderUpdate_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderUpdate_orderUpdate_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderUpdate_orderUpdate_order_fulfillments_warehouse | null; -} - -export interface OrderUpdate_orderUpdate_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderUpdate_orderUpdate_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderUpdate_orderUpdate_order_lines_variant_preorder | null; -} - -export interface OrderUpdate_orderUpdate_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderUpdate_orderUpdate_order_lines_undiscountedUnitPrice_gross; - net: OrderUpdate_orderUpdate_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderUpdate_orderUpdate_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderUpdate_orderUpdate_order_lines_unitPrice_gross; - net: OrderUpdate_orderUpdate_order_lines_unitPrice_net; -} - -export interface OrderUpdate_orderUpdate_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderUpdate_orderUpdate_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderUpdate_orderUpdate_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderUpdate_orderUpdate_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderUpdate_orderUpdate_order_lines_undiscountedUnitPrice; - unitPrice: OrderUpdate_orderUpdate_order_lines_unitPrice; - thumbnail: OrderUpdate_orderUpdate_order_lines_thumbnail | null; -} - -export interface OrderUpdate_orderUpdate_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderUpdate_orderUpdate_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderUpdate_orderUpdate_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderUpdate_orderUpdate_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderUpdate_orderUpdate_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderUpdate_orderUpdate_order_deliveryMethod = OrderUpdate_orderUpdate_order_deliveryMethod_ShippingMethod | OrderUpdate_orderUpdate_order_deliveryMethod_Warehouse; - -export interface OrderUpdate_orderUpdate_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderUpdate_orderUpdate_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderUpdate_orderUpdate_order_shippingPrice_gross; -} - -export interface OrderUpdate_orderUpdate_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderUpdate_orderUpdate_order_subtotal_gross; - net: OrderUpdate_orderUpdate_order_subtotal_net; -} - -export interface OrderUpdate_orderUpdate_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_total { - __typename: "TaxedMoney"; - gross: OrderUpdate_orderUpdate_order_total_gross; - net: OrderUpdate_orderUpdate_order_total_net; - tax: OrderUpdate_orderUpdate_order_total_tax; -} - -export interface OrderUpdate_orderUpdate_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderUpdate_orderUpdate_order_undiscountedTotal_net; - gross: OrderUpdate_orderUpdate_order_undiscountedTotal_gross; -} - -export interface OrderUpdate_orderUpdate_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderUpdate_orderUpdate_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderUpdate_orderUpdate_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderUpdate_orderUpdate_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderUpdate_orderUpdate_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderUpdate_orderUpdate_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderUpdate_orderUpdate_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderUpdate_orderUpdate_order_channel_defaultCountry; -} - -export interface OrderUpdate_orderUpdate_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderUpdate_orderUpdate_order_metadata | null)[]; - privateMetadata: (OrderUpdate_orderUpdate_order_privateMetadata | null)[]; - billingAddress: OrderUpdate_orderUpdate_order_billingAddress | null; - giftCards: (OrderUpdate_orderUpdate_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderUpdate_orderUpdate_order_discounts[] | null; - events: (OrderUpdate_orderUpdate_order_events | null)[] | null; - fulfillments: (OrderUpdate_orderUpdate_order_fulfillments | null)[]; - lines: (OrderUpdate_orderUpdate_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderUpdate_orderUpdate_order_shippingAddress | null; - deliveryMethod: OrderUpdate_orderUpdate_order_deliveryMethod | null; - shippingMethod: OrderUpdate_orderUpdate_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderUpdate_orderUpdate_order_shippingPrice; - status: OrderStatus; - subtotal: OrderUpdate_orderUpdate_order_subtotal; - total: OrderUpdate_orderUpdate_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderUpdate_orderUpdate_order_totalAuthorized; - totalCaptured: OrderUpdate_orderUpdate_order_totalCaptured; - undiscountedTotal: OrderUpdate_orderUpdate_order_undiscountedTotal; - user: OrderUpdate_orderUpdate_order_user | null; - userEmail: string | null; - shippingMethods: (OrderUpdate_orderUpdate_order_shippingMethods | null)[] | null; - invoices: (OrderUpdate_orderUpdate_order_invoices | null)[] | null; - channel: OrderUpdate_orderUpdate_order_channel; -} - -export interface OrderUpdate_orderUpdate { - __typename: "OrderUpdate"; - errors: OrderUpdate_orderUpdate_errors[]; - order: OrderUpdate_orderUpdate_order | null; -} - -export interface OrderUpdate { - orderUpdate: OrderUpdate_orderUpdate | null; -} - -export interface OrderUpdateVariables { - id: string; - input: OrderUpdateInput; -} diff --git a/src/orders/types/OrderVoid.ts b/src/orders/types/OrderVoid.ts deleted file mode 100644 index c297bce0a..000000000 --- a/src/orders/types/OrderVoid.ts +++ /dev/null @@ -1,618 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { OrderErrorCode, AddressTypeEnum, GiftCardEventsEnum, OrderDiscountType, DiscountValueTypeEnum, OrderEventsEmailsEnum, OrderEventsEnum, FulfillmentStatus, PaymentChargeStatusEnum, WarehouseClickAndCollectOptionEnum, OrderStatus, OrderAction, JobStatusEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: OrderVoid -// ==================================================== - -export interface OrderVoid_orderVoid_errors { - __typename: "OrderError"; - code: OrderErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface OrderVoid_orderVoid_order_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderVoid_orderVoid_order_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface OrderVoid_orderVoid_order_billingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderVoid_orderVoid_order_billingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderVoid_orderVoid_order_billingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderVoid_orderVoid_order_giftCards_events_balance_initialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_giftCards_events_balance_currentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_giftCards_events_balance_oldInitialBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_giftCards_events_balance_oldCurrentBalance { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_giftCards_events_balance { - __typename: "GiftCardEventBalance"; - initialBalance: OrderVoid_orderVoid_order_giftCards_events_balance_initialBalance | null; - currentBalance: OrderVoid_orderVoid_order_giftCards_events_balance_currentBalance; - oldInitialBalance: OrderVoid_orderVoid_order_giftCards_events_balance_oldInitialBalance | null; - oldCurrentBalance: OrderVoid_orderVoid_order_giftCards_events_balance_oldCurrentBalance | null; -} - -export interface OrderVoid_orderVoid_order_giftCards_events { - __typename: "GiftCardEvent"; - id: string; - type: GiftCardEventsEnum | null; - orderId: string | null; - balance: OrderVoid_orderVoid_order_giftCards_events_balance | null; -} - -export interface OrderVoid_orderVoid_order_giftCards { - __typename: "GiftCard"; - events: OrderVoid_orderVoid_order_giftCards_events[]; -} - -export interface OrderVoid_orderVoid_order_discounts_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_discounts { - __typename: "OrderDiscount"; - id: string; - type: OrderDiscountType; - calculationMode: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderVoid_orderVoid_order_discounts_amount; -} - -export interface OrderVoid_orderVoid_order_events_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_events_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_events_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderVoid_orderVoid_order_events_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderVoid_orderVoid_order_events_discount_oldAmount | null; -} - -export interface OrderVoid_orderVoid_order_events_relatedOrder { - __typename: "Order"; - id: string; - number: string | null; -} - -export interface OrderVoid_orderVoid_order_events_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface OrderVoid_orderVoid_order_events_app { - __typename: "App"; - id: string; - name: string | null; - appUrl: string | null; -} - -export interface OrderVoid_orderVoid_order_events_lines_discount_amount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_events_lines_discount_oldAmount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_events_lines_discount { - __typename: "OrderEventDiscountObject"; - valueType: DiscountValueTypeEnum; - value: any; - reason: string | null; - amount: OrderVoid_orderVoid_order_events_lines_discount_amount | null; - oldValueType: DiscountValueTypeEnum | null; - oldValue: any | null; - oldAmount: OrderVoid_orderVoid_order_events_lines_discount_oldAmount | null; -} - -export interface OrderVoid_orderVoid_order_events_lines_orderLine { - __typename: "OrderLine"; - id: string; - productName: string; - variantName: string; -} - -export interface OrderVoid_orderVoid_order_events_lines { - __typename: "OrderEventOrderLineObject"; - quantity: number | null; - itemName: string | null; - discount: OrderVoid_orderVoid_order_events_lines_discount | null; - orderLine: OrderVoid_orderVoid_order_events_lines_orderLine | null; -} - -export interface OrderVoid_orderVoid_order_events { - __typename: "OrderEvent"; - id: string; - amount: number | null; - shippingCostsIncluded: boolean | null; - date: any | null; - email: string | null; - emailType: OrderEventsEmailsEnum | null; - invoiceNumber: string | null; - discount: OrderVoid_orderVoid_order_events_discount | null; - relatedOrder: OrderVoid_orderVoid_order_events_relatedOrder | null; - message: string | null; - quantity: number | null; - transactionReference: string | null; - type: OrderEventsEnum | null; - user: OrderVoid_orderVoid_order_events_user | null; - app: OrderVoid_orderVoid_order_events_app | null; - lines: (OrderVoid_orderVoid_order_events_lines | null)[] | null; -} - -export interface OrderVoid_orderVoid_order_fulfillments_lines_orderLine_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderVoid_orderVoid_order_fulfillments_lines_orderLine_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderVoid_orderVoid_order_fulfillments_lines_orderLine_variant_preorder | null; -} - -export interface OrderVoid_orderVoid_order_fulfillments_lines_orderLine_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_fulfillments_lines_orderLine_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderVoid_orderVoid_order_fulfillments_lines_orderLine_undiscountedUnitPrice_gross; - net: OrderVoid_orderVoid_order_fulfillments_lines_orderLine_undiscountedUnitPrice_net; -} - -export interface OrderVoid_orderVoid_order_fulfillments_lines_orderLine_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_fulfillments_lines_orderLine_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_fulfillments_lines_orderLine_unitPrice { - __typename: "TaxedMoney"; - gross: OrderVoid_orderVoid_order_fulfillments_lines_orderLine_unitPrice_gross; - net: OrderVoid_orderVoid_order_fulfillments_lines_orderLine_unitPrice_net; -} - -export interface OrderVoid_orderVoid_order_fulfillments_lines_orderLine_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderVoid_orderVoid_order_fulfillments_lines_orderLine { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderVoid_orderVoid_order_fulfillments_lines_orderLine_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderVoid_orderVoid_order_fulfillments_lines_orderLine_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderVoid_orderVoid_order_fulfillments_lines_orderLine_undiscountedUnitPrice; - unitPrice: OrderVoid_orderVoid_order_fulfillments_lines_orderLine_unitPrice; - thumbnail: OrderVoid_orderVoid_order_fulfillments_lines_orderLine_thumbnail | null; -} - -export interface OrderVoid_orderVoid_order_fulfillments_lines { - __typename: "FulfillmentLine"; - id: string; - quantity: number; - orderLine: OrderVoid_orderVoid_order_fulfillments_lines_orderLine | null; -} - -export interface OrderVoid_orderVoid_order_fulfillments_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface OrderVoid_orderVoid_order_fulfillments { - __typename: "Fulfillment"; - id: string; - lines: (OrderVoid_orderVoid_order_fulfillments_lines | null)[] | null; - fulfillmentOrder: number; - status: FulfillmentStatus; - trackingNumber: string; - warehouse: OrderVoid_orderVoid_order_fulfillments_warehouse | null; -} - -export interface OrderVoid_orderVoid_order_lines_variant_preorder { - __typename: "PreorderData"; - endDate: any | null; -} - -export interface OrderVoid_orderVoid_order_lines_variant { - __typename: "ProductVariant"; - id: string; - quantityAvailable: number | null; - preorder: OrderVoid_orderVoid_order_lines_variant_preorder | null; -} - -export interface OrderVoid_orderVoid_order_lines_unitDiscount { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_lines_undiscountedUnitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_lines_undiscountedUnitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_lines_undiscountedUnitPrice { - __typename: "TaxedMoney"; - currency: string; - gross: OrderVoid_orderVoid_order_lines_undiscountedUnitPrice_gross; - net: OrderVoid_orderVoid_order_lines_undiscountedUnitPrice_net; -} - -export interface OrderVoid_orderVoid_order_lines_unitPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_lines_unitPrice_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_lines_unitPrice { - __typename: "TaxedMoney"; - gross: OrderVoid_orderVoid_order_lines_unitPrice_gross; - net: OrderVoid_orderVoid_order_lines_unitPrice_net; -} - -export interface OrderVoid_orderVoid_order_lines_thumbnail { - __typename: "Image"; - url: string; -} - -export interface OrderVoid_orderVoid_order_lines { - __typename: "OrderLine"; - id: string; - isShippingRequired: boolean; - variant: OrderVoid_orderVoid_order_lines_variant | null; - productName: string; - productSku: string | null; - quantity: number; - quantityFulfilled: number; - quantityToFulfill: number; - unitDiscount: OrderVoid_orderVoid_order_lines_unitDiscount; - unitDiscountValue: any; - unitDiscountReason: string | null; - unitDiscountType: DiscountValueTypeEnum | null; - undiscountedUnitPrice: OrderVoid_orderVoid_order_lines_undiscountedUnitPrice; - unitPrice: OrderVoid_orderVoid_order_lines_unitPrice; - thumbnail: OrderVoid_orderVoid_order_lines_thumbnail | null; -} - -export interface OrderVoid_orderVoid_order_shippingAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface OrderVoid_orderVoid_order_shippingAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: OrderVoid_orderVoid_order_shippingAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface OrderVoid_orderVoid_order_deliveryMethod_ShippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderVoid_orderVoid_order_deliveryMethod_Warehouse { - __typename: "Warehouse"; - id: string; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; -} - -export type OrderVoid_orderVoid_order_deliveryMethod = OrderVoid_orderVoid_order_deliveryMethod_ShippingMethod | OrderVoid_orderVoid_order_deliveryMethod_Warehouse; - -export interface OrderVoid_orderVoid_order_shippingMethod { - __typename: "ShippingMethod"; - id: string; -} - -export interface OrderVoid_orderVoid_order_shippingPrice_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_shippingPrice { - __typename: "TaxedMoney"; - gross: OrderVoid_orderVoid_order_shippingPrice_gross; -} - -export interface OrderVoid_orderVoid_order_subtotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_subtotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_subtotal { - __typename: "TaxedMoney"; - gross: OrderVoid_orderVoid_order_subtotal_gross; - net: OrderVoid_orderVoid_order_subtotal_net; -} - -export interface OrderVoid_orderVoid_order_total_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_total_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_total_tax { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_total { - __typename: "TaxedMoney"; - gross: OrderVoid_orderVoid_order_total_gross; - net: OrderVoid_orderVoid_order_total_net; - tax: OrderVoid_orderVoid_order_total_tax; -} - -export interface OrderVoid_orderVoid_order_totalAuthorized { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_totalCaptured { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_undiscountedTotal_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_undiscountedTotal_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_undiscountedTotal { - __typename: "TaxedMoney"; - net: OrderVoid_orderVoid_order_undiscountedTotal_net; - gross: OrderVoid_orderVoid_order_undiscountedTotal_gross; -} - -export interface OrderVoid_orderVoid_order_user { - __typename: "User"; - id: string; - email: string; -} - -export interface OrderVoid_orderVoid_order_shippingMethods_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface OrderVoid_orderVoid_order_shippingMethods { - __typename: "ShippingMethod"; - id: string; - name: string; - price: OrderVoid_orderVoid_order_shippingMethods_price; - active: boolean; - message: string | null; -} - -export interface OrderVoid_orderVoid_order_invoices { - __typename: "Invoice"; - id: string; - number: string | null; - createdAt: any; - url: string | null; - status: JobStatusEnum; -} - -export interface OrderVoid_orderVoid_order_channel_defaultCountry { - __typename: "CountryDisplay"; - code: string; -} - -export interface OrderVoid_orderVoid_order_channel { - __typename: "Channel"; - isActive: boolean; - id: string; - name: string; - currencyCode: string; - slug: string; - defaultCountry: OrderVoid_orderVoid_order_channel_defaultCountry; -} - -export interface OrderVoid_orderVoid_order { - __typename: "Order"; - id: string; - token: string; - metadata: (OrderVoid_orderVoid_order_metadata | null)[]; - privateMetadata: (OrderVoid_orderVoid_order_privateMetadata | null)[]; - billingAddress: OrderVoid_orderVoid_order_billingAddress | null; - giftCards: (OrderVoid_orderVoid_order_giftCards | null)[] | null; - isShippingRequired: boolean; - canFinalize: boolean; - created: any; - customerNote: string; - discounts: OrderVoid_orderVoid_order_discounts[] | null; - events: (OrderVoid_orderVoid_order_events | null)[] | null; - fulfillments: (OrderVoid_orderVoid_order_fulfillments | null)[]; - lines: (OrderVoid_orderVoid_order_lines | null)[]; - number: string | null; - isPaid: boolean; - paymentStatus: PaymentChargeStatusEnum; - shippingAddress: OrderVoid_orderVoid_order_shippingAddress | null; - deliveryMethod: OrderVoid_orderVoid_order_deliveryMethod | null; - shippingMethod: OrderVoid_orderVoid_order_shippingMethod | null; - shippingMethodName: string | null; - collectionPointName: string | null; - shippingPrice: OrderVoid_orderVoid_order_shippingPrice; - status: OrderStatus; - subtotal: OrderVoid_orderVoid_order_subtotal; - total: OrderVoid_orderVoid_order_total; - actions: (OrderAction | null)[]; - totalAuthorized: OrderVoid_orderVoid_order_totalAuthorized; - totalCaptured: OrderVoid_orderVoid_order_totalCaptured; - undiscountedTotal: OrderVoid_orderVoid_order_undiscountedTotal; - user: OrderVoid_orderVoid_order_user | null; - userEmail: string | null; - shippingMethods: (OrderVoid_orderVoid_order_shippingMethods | null)[] | null; - invoices: (OrderVoid_orderVoid_order_invoices | null)[] | null; - channel: OrderVoid_orderVoid_order_channel; -} - -export interface OrderVoid_orderVoid { - __typename: "OrderVoid"; - errors: OrderVoid_orderVoid_errors[]; - order: OrderVoid_orderVoid_order | null; -} - -export interface OrderVoid { - orderVoid: OrderVoid_orderVoid | null; -} - -export interface OrderVoidVariables { - id: string; -} diff --git a/src/orders/types/SearchOrderVariant.ts b/src/orders/types/SearchOrderVariant.ts deleted file mode 100644 index 8a19d8380..000000000 --- a/src/orders/types/SearchOrderVariant.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AddressInput } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: SearchOrderVariant -// ==================================================== - -export interface SearchOrderVariant_search_edges_node_thumbnail { - __typename: "Image"; - url: string; -} - -export interface SearchOrderVariant_search_edges_node_variants_pricing_priceUndiscounted_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface SearchOrderVariant_search_edges_node_variants_pricing_priceUndiscounted { - __typename: "TaxedMoney"; - gross: SearchOrderVariant_search_edges_node_variants_pricing_priceUndiscounted_gross; -} - -export interface SearchOrderVariant_search_edges_node_variants_pricing_price_gross { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface SearchOrderVariant_search_edges_node_variants_pricing_price { - __typename: "TaxedMoney"; - gross: SearchOrderVariant_search_edges_node_variants_pricing_price_gross; -} - -export interface SearchOrderVariant_search_edges_node_variants_pricing { - __typename: "VariantPricingInfo"; - priceUndiscounted: SearchOrderVariant_search_edges_node_variants_pricing_priceUndiscounted | null; - price: SearchOrderVariant_search_edges_node_variants_pricing_price | null; - onSale: boolean | null; -} - -export interface SearchOrderVariant_search_edges_node_variants_channelListings_channel { - __typename: "Channel"; - id: string; - isActive: boolean; - name: string; - currencyCode: string; -} - -export interface SearchOrderVariant_search_edges_node_variants_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface SearchOrderVariant_search_edges_node_variants_channelListings { - __typename: "ProductVariantChannelListing"; - channel: SearchOrderVariant_search_edges_node_variants_channelListings_channel; - price: SearchOrderVariant_search_edges_node_variants_channelListings_price | null; -} - -export interface SearchOrderVariant_search_edges_node_variants { - __typename: "ProductVariant"; - id: string; - name: string; - sku: string | null; - pricing: SearchOrderVariant_search_edges_node_variants_pricing | null; - channelListings: SearchOrderVariant_search_edges_node_variants_channelListings[] | null; -} - -export interface SearchOrderVariant_search_edges_node { - __typename: "Product"; - id: string; - name: string; - thumbnail: SearchOrderVariant_search_edges_node_thumbnail | null; - variants: (SearchOrderVariant_search_edges_node_variants | null)[] | null; -} - -export interface SearchOrderVariant_search_edges { - __typename: "ProductCountableEdge"; - node: SearchOrderVariant_search_edges_node; -} - -export interface SearchOrderVariant_search_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SearchOrderVariant_search { - __typename: "ProductCountableConnection"; - edges: SearchOrderVariant_search_edges[]; - pageInfo: SearchOrderVariant_search_pageInfo; -} - -export interface SearchOrderVariant { - search: SearchOrderVariant_search | null; -} - -export interface SearchOrderVariantVariables { - channel: string; - first: number; - query: string; - after?: string | null; - address?: AddressInput | null; -} diff --git a/src/orders/utils/data.test.ts b/src/orders/utils/data.test.ts index c99cc1f7e..362039a86 100644 --- a/src/orders/utils/data.test.ts +++ b/src/orders/utils/data.test.ts @@ -1,21 +1,14 @@ -/* eslint-disable sort-keys */ -import { FormsetData } from "@saleor/hooks/useFormset"; import { FulfillmentStatus, + OrderDetailsFragment, + OrderLineFragment, + OrderRefundDataQuery, OrderStatus, PaymentChargeStatusEnum -} from "@saleor/types/globalTypes"; +} from "@saleor/graphql"; +import { FormsetData } from "@saleor/hooks/useFormset"; import { LineItemData } from "../components/OrderReturnPage/form"; -import { - OrderDetails_order, - OrderDetails_order_fulfillments_lines, - OrderDetails_order_lines -} from "../types/OrderDetails"; -import { - OrderRefundData_order_fulfillments, - OrderRefundData_order_lines -} from "../types/OrderRefundData"; import { getAllFulfillmentLinesPriceSum, getPreviouslyRefundedPrice, @@ -28,7 +21,7 @@ import { OrderWithTotalAndTotalCaptured } from "./data"; -const orderBase: OrderDetails_order = { +const orderBase: OrderDetailsFragment = { __typename: "Order", actions: [], shippingMethods: [], @@ -165,7 +158,7 @@ describe("Get previously refunded price", () => { }); describe("Get refunded lines price sum", () => { - const lines: OrderRefundData_order_lines[] = [ + const lines: OrderRefundDataQuery["order"]["lines"] = [ { __typename: "OrderLine", id: "1", @@ -278,7 +271,7 @@ describe("Get refunded lines price sum", () => { }); describe("Get get all fulfillment lines price sum", () => { - const fulfillments: OrderRefundData_order_fulfillments[] = [ + const fulfillments: OrderRefundDataQuery["order"]["fulfillments"] = [ { __typename: "Fulfillment", fulfillmentOrder: 1, @@ -524,7 +517,7 @@ describe("Get get all fulfillment lines price sum", () => { describe("Get the total value of all replaced products", () => { it("sums up correctly", () => { - const unfulfilledLines: OrderDetails_order_lines[] = [ + const unfulfilledLines: OrderLineFragment[] = [ { id: "1", isShippingRequired: false, @@ -695,7 +688,7 @@ describe("Get the total value of all replaced products", () => { } ]; - const fulfilledLines: OrderDetails_order_fulfillments_lines[] = [ + const fulfilledLines: OrderDetailsFragment["fulfillments"][0]["lines"] = [ { id: "4", quantity: 1, @@ -1137,7 +1130,7 @@ describe("Get the total value of all replaced products", () => { describe("Get the total value of all selected products", () => { it("sums up correctly", () => { - const unfulfilledLines: OrderDetails_order_lines[] = [ + const unfulfilledLines: OrderLineFragment[] = [ { id: "1", isShippingRequired: false, @@ -1308,7 +1301,7 @@ describe("Get the total value of all selected products", () => { } ]; - const fulfilledLines: OrderDetails_order_fulfillments_lines[] = [ + const fulfilledLines: OrderDetailsFragment["fulfillments"][0]["lines"] = [ { id: "4", quantity: 1, @@ -1619,7 +1612,7 @@ describe("Get the total value of all selected products", () => { describe("Merge repeated order lines of fulfillment lines", () => { it("is able to merge repeated order lines and sum their quantities", () => { - const lines: OrderDetails_order_fulfillments_lines[] = [ + const lines: OrderDetailsFragment["fulfillments"][0]["lines"] = [ { id: "RnVsZmlsbG1lbnRMaW5lOjMx", quantity: 1, diff --git a/src/orders/utils/data.ts b/src/orders/utils/data.ts index bad5a57cf..e3685381b 100644 --- a/src/orders/utils/data.ts +++ b/src/orders/utils/data.ts @@ -1,13 +1,18 @@ import { IMoney, subtractMoney } from "@saleor/components/Money"; -import { WarehouseFragment } from "@saleor/fragments/types/WarehouseFragment"; -import { FormsetData } from "@saleor/hooks/useFormset"; -import { addressToAddressInput } from "@saleor/misc"; import { AddressInput, CountryCode, FulfillmentStatus, - OrderErrorCode -} from "@saleor/types/globalTypes"; + FulfillOrderMutation, + OrderDetailsFragment, + OrderErrorCode, + OrderFulfillDataQuery, + OrderLineFragment, + OrderRefundDataQuery, + WarehouseFragment +} from "@saleor/graphql"; +import { FormsetData } from "@saleor/hooks/useFormset"; +import { addressToAddressInput } from "@saleor/misc"; import { LineItemData, @@ -18,21 +23,9 @@ import { getAllOrderWaitingLines, getById } from "../components/OrderReturnPage/utils"; -import { FulfillOrder_orderFulfill_errors } from "../types/FulfillOrder"; -import { - OrderDetails_order, - OrderDetails_order_fulfillments_lines, - OrderDetails_order_lines -} from "../types/OrderDetails"; -import { OrderFulfillData_order_lines } from "../types/OrderFulfillData"; -import { - OrderRefundData_order, - OrderRefundData_order_fulfillments, - OrderRefundData_order_lines -} from "../types/OrderRefundData"; export type OrderWithTotalAndTotalCaptured = Pick< - OrderRefundData_order, + OrderRefundDataQuery["order"], "total" | "totalCaptured" >; @@ -42,7 +35,9 @@ export interface OrderLineWithStockWarehouses { }; } -export function getToFulfillOrderLines(lines?: OrderFulfillData_order_lines[]) { +export function getToFulfillOrderLines( + lines?: OrderFulfillDataQuery["order"]["lines"] +) { return lines?.filter(line => line.quantityToFulfill > 0) || []; } @@ -77,7 +72,7 @@ const getItemPriceAndQuantity = ({ itemsQuantities, id }: { - orderLines: OrderDetails_order_lines[]; + orderLines: OrderLineFragment[]; itemsQuantities: FormsetData; id: string; }) => { @@ -96,7 +91,7 @@ const getFulfillmentByFulfillmentLineId = (order, fulfillmentLineId) => { }; const selectItemPriceAndQuantity = ( - order: OrderDetails_order, + order: OrderDetailsFragment, { fulfilledItemsQuantities, waitingItemsQuantities, @@ -127,7 +122,7 @@ const selectItemPriceAndQuantity = ( }; export const getReplacedProductsAmount = ( - order: OrderDetails_order, + order: OrderDetailsFragment, { itemsToBeReplaced, unfulfilledItemsQuantities, @@ -166,7 +161,7 @@ export const getReplacedProductsAmount = ( }; export const getReturnSelectedProductsAmount = ( - order: OrderDetails_order, + order: OrderDetailsFragment, { itemsToBeReplaced, waitingItemsQuantities, @@ -206,7 +201,7 @@ const getPartialProductsValue = ({ }: { itemsToBeReplaced: FormsetData; itemsQuantities: FormsetData; - orderLines: OrderDetails_order_lines[]; + orderLines: OrderLineFragment[]; }) => itemsQuantities.reduce( (resultAmount, { id, value: quantity, data: { isRefunded } }) => { @@ -228,7 +223,7 @@ const getPartialProductsValue = ({ ); export function getRefundedLinesPriceSum( - lines: OrderRefundData_order_lines[], + lines: OrderRefundDataQuery["order"]["lines"], refundedProductQuantities: FormsetData ): number { return lines?.reduce((sum, line) => { @@ -240,7 +235,7 @@ export function getRefundedLinesPriceSum( } export function getAllFulfillmentLinesPriceSum( - fulfillments: OrderRefundData_order_fulfillments[], + fulfillments: OrderRefundDataQuery["order"]["fulfillments"], refundedFulfilledProductQuantities: FormsetData ): number { return fulfillments?.reduce((sum, fulfillment) => { @@ -258,7 +253,7 @@ export function getAllFulfillmentLinesPriceSum( } export function mergeRepeatedOrderLines( - fulfillmentLines: OrderDetails_order_fulfillments_lines[] + fulfillmentLines: OrderDetailsFragment["fulfillments"][0]["lines"] ) { return fulfillmentLines.reduce((prev, curr) => { const existingOrderLineIndex = prev.findIndex( @@ -277,7 +272,7 @@ export function mergeRepeatedOrderLines( } return prev; - }, Array()); + }, Array()); } export const isStockError = ( @@ -285,8 +280,8 @@ export const isStockError = ( formsetStock: { quantity: number }, availableQuantity: number, warehouse: WarehouseFragment, - line: OrderFulfillData_order_lines, - errors: FulfillOrder_orderFulfill_errors[] + line: OrderFulfillDataQuery["order"]["lines"][0], + errors: FulfillOrderMutation["orderFulfill"]["errors"] ) => { if (overfulfill) { return true; @@ -306,7 +301,7 @@ export const isStockError = ( }; export const getVariantSearchAddress = ( - order: OrderDetails_order + order: OrderDetailsFragment ): AddressInput => { if (order.shippingAddress) { return addressToAddressInput(order.shippingAddress); diff --git a/src/orders/views/OrderDetails/OrderDetails.tsx b/src/orders/views/OrderDetails/OrderDetails.tsx index 9bdc16a43..d23c3a190 100644 --- a/src/orders/views/OrderDetails/OrderDetails.tsx +++ b/src/orders/views/OrderDetails/OrderDetails.tsx @@ -1,25 +1,25 @@ import { MetadataFormData } from "@saleor/components/Metadata"; import NotFoundPage from "@saleor/components/NotFoundPage"; import { Task } from "@saleor/containers/BackgroundTasks/types"; +import { + JobStatusEnum, + OrderStatus, + useOrderConfirmMutation, + useOrderDetailsQuery, + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation +} from "@saleor/graphql"; import useBackgroundTask from "@saleor/hooks/useBackgroundTask"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages } from "@saleor/intl"; -import { useOrderConfirmMutation } from "@saleor/orders/mutations"; -import { InvoiceRequest } from "@saleor/orders/types/InvoiceRequest"; import getOrderErrorMessage from "@saleor/utils/errors/order"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createMetadataUpdateHandler from "@saleor/utils/handlers/metadataUpdateHandler"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; import React from "react"; import { useIntl } from "react-intl"; -import { JobStatusEnum, OrderStatus } from "../../../types/globalTypes"; import OrderOperations from "../../containers/OrderOperations"; -import { TypedOrderDetailsQuery } from "../../queries"; import { orderListUrl, orderUrl, @@ -41,11 +41,11 @@ export const OrderDetails: React.FC = ({ id, params }) => { const { queue } = useBackgroundTask(); const intl = useIntl(); - const [updateMetadata, updateMetadataOpts] = useMetadataUpdate({}); + const [updateMetadata, updateMetadataOpts] = useUpdateMetadataMutation({}); const [ updatePrivateMetadata, updatePrivateMetadataOpts - ] = usePrivateMetadataUpdate({}); + ] = useUpdatePrivateMetadataMutation({}); const notify = useNotifier(); const [openModal, closeModal] = createDialogActionHandlers< @@ -68,189 +68,182 @@ export const OrderDetails: React.FC = ({ id, params }) => { } }); + const { data, loading } = useOrderDetailsQuery({ + displayLoader: true, + variables: { id } + }); + + const order = data?.order; + if (order === null) { + return ; + } + + const isOrderUnconfirmed = order?.status === OrderStatus.UNCONFIRMED; + const isOrderDraft = order?.status === OrderStatus.DRAFT; + + const handleSubmit = async (data: MetadataFormData) => { + if (order?.status === OrderStatus.UNCONFIRMED) { + await orderConfirm({ variables: { id: order?.id } }); + } + + const update = createMetadataUpdateHandler( + order, + () => Promise.resolve([]), + variables => updateMetadata({ variables }), + variables => updatePrivateMetadata({ variables }) + ); + + const result = await update(data); + + if (result.length === 0) { + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + } + + return result; + }; + return ( - - {({ data, loading }) => { - const order = data?.order; - if (order === null) { - return ; - } - - const isOrderUnconfirmed = order?.status === OrderStatus.UNCONFIRMED; - const isOrderDraft = order?.status === OrderStatus.DRAFT; - - const handleSubmit = async (data: MetadataFormData) => { - if (order?.status === OrderStatus.UNCONFIRMED) { - await orderConfirm({ variables: { id: order?.id } }); + + {orderMessages => ( + { + orderMessages.handleShippingMethodUpdate(data); + order.total = data.orderUpdateShipping.order.total; + }} + onOrderLineDelete={orderMessages.handleOrderLineDelete} + onOrderLinesAdd={orderMessages.handleOrderLinesAdd} + onOrderLineUpdate={orderMessages.handleOrderLineUpdate} + onOrderFulfillmentApprove={ + orderMessages.handleOrderFulfillmentApprove } - - const update = createMetadataUpdateHandler( - order, - () => Promise.resolve([]), - variables => updateMetadata({ variables }), - variables => updatePrivateMetadata({ variables }) - ); - - const result = await update(data); - - if (result.length === 0) { - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - } - - return result; - }; - - return ( - - {orderMessages => ( - { - orderMessages.handleShippingMethodUpdate(data); - order.total = data.orderUpdateShipping.order.total; - }} - onOrderLineDelete={orderMessages.handleOrderLineDelete} - onOrderLinesAdd={orderMessages.handleOrderLinesAdd} - onOrderLineUpdate={orderMessages.handleOrderLineUpdate} - onOrderFulfillmentApprove={ - orderMessages.handleOrderFulfillmentApprove + onOrderFulfillmentCancel={orderMessages.handleOrderFulfillmentCancel} + onOrderFulfillmentUpdate={orderMessages.handleOrderFulfillmentUpdate} + onDraftFinalize={orderMessages.handleDraftFinalize} + onDraftCancel={orderMessages.handleDraftCancel} + onOrderMarkAsPaid={orderMessages.handleOrderMarkAsPaid} + onInvoiceRequest={data => { + if (data.invoiceRequest.invoice.status === JobStatusEnum.SUCCESS) { + orderMessages.handleInvoiceGenerateFinished(data); + } else { + orderMessages.handleInvoiceGeneratePending(data); + queue(Task.INVOICE_GENERATE, { + generateInvoice: { + invoiceId: data.invoiceRequest.invoice.id, + orderId: id } - onOrderFulfillmentCancel={ - orderMessages.handleOrderFulfillmentCancel - } - onOrderFulfillmentUpdate={ - orderMessages.handleOrderFulfillmentUpdate - } - onDraftFinalize={orderMessages.handleDraftFinalize} - onDraftCancel={orderMessages.handleDraftCancel} - onOrderMarkAsPaid={orderMessages.handleOrderMarkAsPaid} - onInvoiceRequest={(data: InvoiceRequest) => { - if ( - data.invoiceRequest.invoice.status === JobStatusEnum.SUCCESS - ) { - orderMessages.handleInvoiceGenerateFinished(data); - } else { - orderMessages.handleInvoiceGeneratePending(data); - queue(Task.INVOICE_GENERATE, { - generateInvoice: { - invoiceId: data.invoiceRequest.invoice.id, - orderId: id - } - }); + }); + } + }} + onInvoiceSend={orderMessages.handleInvoiceSend} + > + {({ + orderAddNote, + orderCancel, + orderDraftUpdate, + orderLinesAdd, + orderLineDelete, + orderLineUpdate, + orderPaymentCapture, + orderVoid, + orderShippingMethodUpdate, + orderUpdate, + orderFulfillmentApprove, + orderFulfillmentCancel, + orderFulfillmentUpdateTracking, + orderDraftCancel, + orderDraftFinalize, + orderPaymentMarkAsPaid, + orderInvoiceRequest, + orderInvoiceSend + }) => ( + <> + {!isOrderDraft && !isOrderUnconfirmed && ( + - {({ - orderAddNote, - orderCancel, - orderDraftUpdate, - orderLinesAdd, - orderLineDelete, - orderLineUpdate, - orderPaymentCapture, - orderVoid, - orderShippingMethodUpdate, - orderUpdate, - orderFulfillmentApprove, - orderFulfillmentCancel, - orderFulfillmentUpdateTracking, - orderDraftCancel, - orderDraftFinalize, - orderPaymentMarkAsPaid, - orderInvoiceRequest, - orderInvoiceSend - }) => ( - <> - {!isOrderDraft && !isOrderUnconfirmed && ( - - )} - {isOrderDraft && ( - - )} - {isOrderUnconfirmed && ( - - )} - - )} - - )} - - ); - }} - + orderInvoiceSend={orderInvoiceSend} + updateMetadataOpts={updateMetadataOpts} + updatePrivateMetadataOpts={updatePrivateMetadataOpts} + openModal={openModal} + closeModal={closeModal} + /> + )} + {isOrderDraft && ( + + )} + {isOrderUnconfirmed && ( + + )} + + )} + + )} + ); }; diff --git a/src/orders/views/OrderDetails/OrderDetailsMessages.tsx b/src/orders/views/OrderDetails/OrderDetailsMessages.tsx index 929cef0dd..4903dd6ed 100644 --- a/src/orders/views/OrderDetails/OrderDetailsMessages.tsx +++ b/src/orders/views/OrderDetails/OrderDetailsMessages.tsx @@ -1,54 +1,62 @@ import messages from "@saleor/containers/BackgroundTasks/messages"; +import { + InvoiceEmailSendMutation, + InvoiceRequestMutation, + OrderAddNoteMutation, + OrderCancelMutation, + OrderCaptureMutation, + OrderDraftCancelMutation, + OrderDraftFinalizeMutation, + OrderDraftUpdateMutation, + OrderFulfillmentApproveMutation, + OrderFulfillmentCancelMutation, + OrderFulfillmentUpdateTrackingMutation, + OrderLineDeleteMutation, + OrderLinesAddMutation, + OrderLineUpdateMutation, + OrderMarkAsPaidMutation, + OrderShippingMethodUpdateMutation, + OrderUpdateMutation, + OrderVoidMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; -import { OrderFulfillmentApprove } from "@saleor/orders/types/OrderFulfillmentApprove"; import getOrderErrorMessage from "@saleor/utils/errors/order"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import React from "react"; import { useIntl } from "react-intl"; -import { InvoiceEmailSend } from "../../types/InvoiceEmailSend"; -import { InvoiceRequest } from "../../types/InvoiceRequest"; -import { OrderAddNote } from "../../types/OrderAddNote"; -import { OrderCancel } from "../../types/OrderCancel"; -import { OrderCapture } from "../../types/OrderCapture"; -import { OrderDraftCancel } from "../../types/OrderDraftCancel"; -import { OrderDraftFinalize } from "../../types/OrderDraftFinalize"; -import { OrderDraftUpdate } from "../../types/OrderDraftUpdate"; -import { OrderFulfillmentCancel } from "../../types/OrderFulfillmentCancel"; -import { OrderFulfillmentUpdateTracking } from "../../types/OrderFulfillmentUpdateTracking"; -import { OrderLineDelete } from "../../types/OrderLineDelete"; -import { OrderLinesAdd } from "../../types/OrderLinesAdd"; -import { OrderLineUpdate } from "../../types/OrderLineUpdate"; -import { OrderMarkAsPaid } from "../../types/OrderMarkAsPaid"; -import { OrderShippingMethodUpdate } from "../../types/OrderShippingMethodUpdate"; -import { OrderUpdate } from "../../types/OrderUpdate"; -import { OrderVoid } from "../../types/OrderVoid"; import { orderUrl, OrderUrlQueryParams } from "../../urls"; interface OrderDetailsMessages { children: (props: { - handleDraftCancel: (data: OrderDraftCancel) => void; - handleDraftFinalize: (data: OrderDraftFinalize) => void; - handleDraftUpdate: (data: OrderDraftUpdate) => void; - handleNoteAdd: (data: OrderAddNote) => void; - handleOrderCancel: (data: OrderCancel) => void; - handleOrderFulfillmentApprove: (data: OrderFulfillmentApprove) => void; - handleOrderFulfillmentCancel: (data: OrderFulfillmentCancel) => void; - handleOrderFulfillmentUpdate: ( - data: OrderFulfillmentUpdateTracking + handleDraftCancel: (data: OrderDraftCancelMutation) => void; + handleDraftFinalize: (data: OrderDraftFinalizeMutation) => void; + handleDraftUpdate: (data: OrderDraftUpdateMutation) => void; + handleNoteAdd: (data: OrderAddNoteMutation) => void; + handleOrderCancel: (data: OrderCancelMutation) => void; + handleOrderFulfillmentApprove: ( + data: OrderFulfillmentApproveMutation ) => void; - handleOrderLinesAdd: (data: OrderLinesAdd) => void; - handleOrderLineDelete: (data: OrderLineDelete) => void; - handleOrderLineUpdate: (data: OrderLineUpdate) => void; - handleOrderMarkAsPaid: (data: OrderMarkAsPaid) => void; - handleOrderVoid: (data: OrderVoid) => void; - handlePaymentCapture: (data: OrderCapture) => void; - handleShippingMethodUpdate: (data: OrderShippingMethodUpdate) => void; - handleUpdate: (data: OrderUpdate) => void; - handleInvoiceGeneratePending: (data: InvoiceRequest) => void; - handleInvoiceGenerateFinished: (data: InvoiceRequest) => void; - handleInvoiceSend: (data: InvoiceEmailSend) => void; + handleOrderFulfillmentCancel: ( + data: OrderFulfillmentCancelMutation + ) => void; + handleOrderFulfillmentUpdate: ( + data: OrderFulfillmentUpdateTrackingMutation + ) => void; + handleOrderLinesAdd: (data: OrderLinesAddMutation) => void; + handleOrderLineDelete: (data: OrderLineDeleteMutation) => void; + handleOrderLineUpdate: (data: OrderLineUpdateMutation) => void; + handleOrderMarkAsPaid: (data: OrderMarkAsPaidMutation) => void; + handleOrderVoid: (data: OrderVoidMutation) => void; + handlePaymentCapture: (data: OrderCaptureMutation) => void; + handleShippingMethodUpdate: ( + data: OrderShippingMethodUpdateMutation + ) => void; + handleUpdate: (data: OrderUpdateMutation) => void; + handleInvoiceGeneratePending: (data: InvoiceRequestMutation) => void; + handleInvoiceGenerateFinished: (data: InvoiceRequestMutation) => void; + handleInvoiceSend: (data: InvoiceEmailSendMutation) => void; }) => React.ReactElement; id: string; params: OrderUrlQueryParams; @@ -69,7 +77,7 @@ export const OrderDetailsMessages: React.FC = ({ params ); - const handlePaymentCapture = (data: OrderCapture) => { + const handlePaymentCapture = (data: OrderCaptureMutation) => { const errs = data.orderCapture?.errors; if (errs.length === 0) { pushMessage({ @@ -81,7 +89,7 @@ export const OrderDetailsMessages: React.FC = ({ closeModal(); } }; - const handleOrderMarkAsPaid = (data: OrderMarkAsPaid) => { + const handleOrderMarkAsPaid = (data: OrderMarkAsPaidMutation) => { const errs = data.orderMarkAsPaid?.errors; if (errs.length === 0) { pushMessage({ @@ -93,7 +101,7 @@ export const OrderDetailsMessages: React.FC = ({ closeModal(); } }; - const handleOrderCancel = (data: OrderCancel) => { + const handleOrderCancel = (data: OrderCancelMutation) => { const errs = data.orderCancel?.errors; if (errs.length === 0) { pushMessage({ @@ -105,7 +113,7 @@ export const OrderDetailsMessages: React.FC = ({ closeModal(); } }; - const handleDraftCancel = (data: OrderDraftCancel) => { + const handleDraftCancel = (data: OrderDraftCancelMutation) => { const errs = data.draftOrderDelete?.errors; if (errs.length === 0) { pushMessage({ @@ -117,7 +125,7 @@ export const OrderDetailsMessages: React.FC = ({ closeModal(); } }; - const handleOrderVoid = (data: OrderVoid) => { + const handleOrderVoid = (data: OrderVoidMutation) => { const errs = data.orderVoid?.errors; if (errs.length === 0) { pushMessage({ @@ -129,7 +137,7 @@ export const OrderDetailsMessages: React.FC = ({ closeModal(); } }; - const handleNoteAdd = (data: OrderAddNote) => { + const handleNoteAdd = (data: OrderAddNoteMutation) => { const errs = data.orderAddNote?.errors; if (errs.length === 0) { pushMessage({ @@ -140,7 +148,7 @@ export const OrderDetailsMessages: React.FC = ({ }); } }; - const handleUpdate = (data: OrderUpdate) => { + const handleUpdate = (data: OrderUpdateMutation) => { const errs = data.orderUpdate?.errors; if (errs.length === 0) { pushMessage({ @@ -152,7 +160,7 @@ export const OrderDetailsMessages: React.FC = ({ closeModal(); } }; - const handleDraftUpdate = (data: OrderDraftUpdate) => { + const handleDraftUpdate = (data: OrderDraftUpdateMutation) => { const errs = data.draftOrderUpdate?.errors; if (errs.length === 0) { pushMessage({ @@ -164,7 +172,9 @@ export const OrderDetailsMessages: React.FC = ({ closeModal(); } }; - const handleShippingMethodUpdate = (data: OrderShippingMethodUpdate) => { + const handleShippingMethodUpdate = ( + data: OrderShippingMethodUpdateMutation + ) => { const errs = data.orderUpdateShipping?.errors; if (errs.length === 0) { pushMessage({ @@ -176,7 +186,7 @@ export const OrderDetailsMessages: React.FC = ({ closeModal(); } }; - const handleOrderLineDelete = (data: OrderLineDelete) => { + const handleOrderLineDelete = (data: OrderLineDeleteMutation) => { const errs = data.orderLineDelete?.errors; if (errs.length === 0) { pushMessage({ @@ -187,7 +197,7 @@ export const OrderDetailsMessages: React.FC = ({ }); } }; - const handleOrderLinesAdd = (data: OrderLinesAdd) => { + const handleOrderLinesAdd = (data: OrderLinesAddMutation) => { const errs = data.orderLinesCreate?.errors; if (errs.length === 0) { pushMessage({ @@ -199,7 +209,7 @@ export const OrderDetailsMessages: React.FC = ({ closeModal(); } }; - const handleOrderLineUpdate = (data: OrderLineUpdate) => { + const handleOrderLineUpdate = (data: OrderLineUpdateMutation) => { const errs = data.orderLineUpdate?.errors; if (errs.length === 0) { pushMessage({ @@ -217,7 +227,9 @@ export const OrderDetailsMessages: React.FC = ({ ); } }; - const handleOrderFulfillmentApprove = (data: OrderFulfillmentApprove) => { + const handleOrderFulfillmentApprove = ( + data: OrderFulfillmentApproveMutation + ) => { const errs = data.orderFulfillmentApprove?.errors; if (errs.length === 0) { pushMessage({ @@ -229,7 +241,9 @@ export const OrderDetailsMessages: React.FC = ({ closeModal(); } }; - const handleOrderFulfillmentCancel = (data: OrderFulfillmentCancel) => { + const handleOrderFulfillmentCancel = ( + data: OrderFulfillmentCancelMutation + ) => { const errs = data.orderFulfillmentCancel?.errors; if (errs.length === 0) { pushMessage({ @@ -242,7 +256,7 @@ export const OrderDetailsMessages: React.FC = ({ } }; const handleOrderFulfillmentUpdate = ( - data: OrderFulfillmentUpdateTracking + data: OrderFulfillmentUpdateTrackingMutation ) => { const errs = data.orderFulfillmentUpdateTracking?.errors; if (errs.length === 0) { @@ -255,7 +269,7 @@ export const OrderDetailsMessages: React.FC = ({ closeModal(); } }; - const handleDraftFinalize = (data: OrderDraftFinalize) => { + const handleDraftFinalize = (data: OrderDraftFinalizeMutation) => { const errs = data.draftOrderComplete?.errors; if (errs.length === 0) { pushMessage({ @@ -266,7 +280,7 @@ export const OrderDetailsMessages: React.FC = ({ }); } }; - const handleInvoiceGeneratePending = (data: InvoiceRequest) => { + const handleInvoiceGeneratePending = (data: InvoiceRequestMutation) => { const errs = data.invoiceRequest?.errors; if (errs.length === 0) { pushMessage({ @@ -281,7 +295,7 @@ export const OrderDetailsMessages: React.FC = ({ closeModal(); } }; - const handleInvoiceGenerateFinished = (data: InvoiceRequest) => { + const handleInvoiceGenerateFinished = (data: InvoiceRequestMutation) => { const errs = data.invoiceRequest?.errors; if (errs.length === 0) { pushMessage({ @@ -292,7 +306,7 @@ export const OrderDetailsMessages: React.FC = ({ closeModal(); } }; - const handleInvoiceSend = (data: InvoiceEmailSend) => { + const handleInvoiceSend = (data: InvoiceEmailSendMutation) => { const errs = data.invoiceSendNotification?.errors; if (errs.length === 0) { pushMessage({ diff --git a/src/orders/views/OrderDetails/OrderDraftDetails/index.tsx b/src/orders/views/OrderDetails/OrderDraftDetails/index.tsx index 4206d3a63..74f24b224 100644 --- a/src/orders/views/OrderDetails/OrderDraftDetails/index.tsx +++ b/src/orders/views/OrderDetails/OrderDraftDetails/index.tsx @@ -1,6 +1,11 @@ import { WindowTitle } from "@saleor/components/WindowTitle"; import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; -import { useCustomerAddressesQuery } from "@saleor/customers/queries"; +import { + OrderDetailsQuery, + OrderDraftUpdateMutation, + OrderDraftUpdateMutationVariables, + useCustomerAddressesQuery +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import { CustomerEditData } from "@saleor/orders/components/OrderCustomer"; import { OrderCustomerAddressesEditDialogOutput } from "@saleor/orders/components/OrderCustomerAddressesEditDialog/types"; @@ -9,15 +14,11 @@ import { OrderCustomerChangeData } from "@saleor/orders/components/OrderCustomerChangeDialog/form"; import OrderCustomerChangeDialog from "@saleor/orders/components/OrderCustomerChangeDialog/OrderCustomerChangeDialog"; -import { OrderDetails } from "@saleor/orders/types/OrderDetails"; -import { - OrderDraftUpdate, - OrderDraftUpdateVariables -} from "@saleor/orders/types/OrderDraftUpdate"; import { getVariantSearchAddress } from "@saleor/orders/utils/data"; import { OrderDiscountProvider } from "@saleor/products/components/OrderDiscountProviders/OrderDiscountProvider"; import { OrderLineDiscountProvider } from "@saleor/products/components/OrderDiscountProviders/OrderLineDiscountProvider"; import useCustomerSearch from "@saleor/searches/useCustomerSearch"; +import { useOrderVariantSearch } from "@saleor/searches/useOrderVariantSearch"; import { PartialMutationProviderOutput } from "@saleor/types"; import { mapEdgesToItems } from "@saleor/utils/maps"; import React from "react"; @@ -34,23 +35,25 @@ import OrderDraftCancelDialog from "../../../components/OrderDraftCancelDialog/O import OrderDraftPage from "../../../components/OrderDraftPage"; import OrderProductAddDialog from "../../../components/OrderProductAddDialog"; import OrderShippingMethodEditDialog from "../../../components/OrderShippingMethodEditDialog"; -import { useOrderVariantSearch } from "../../../queries"; -import { OrderUrlDialog, OrderUrlQueryParams } from "../../../urls"; -import { orderDraftListUrl } from "../../../urls"; +import { + orderDraftListUrl, + OrderUrlDialog, + OrderUrlQueryParams +} from "../../../urls"; interface OrderDraftDetailsProps { id: string; params: OrderUrlQueryParams; loading: any; - data: OrderDetails; + data: OrderDetailsQuery; orderAddNote: any; orderLineUpdate: any; orderLineDelete: any; orderShippingMethodUpdate: any; orderLinesAdd: any; orderDraftUpdate: PartialMutationProviderOutput< - OrderDraftUpdate, - OrderDraftUpdateVariables + OrderDraftUpdateMutation, + OrderDraftUpdateMutationVariables >; orderDraftCancel: any; orderDraftFinalize: any; diff --git a/src/orders/views/OrderDetails/OrderNormalDetails/index.tsx b/src/orders/views/OrderDetails/OrderNormalDetails/index.tsx index 131babd97..508abd809 100644 --- a/src/orders/views/OrderDetails/OrderNormalDetails/index.tsx +++ b/src/orders/views/OrderDetails/OrderNormalDetails/index.tsx @@ -1,21 +1,20 @@ import { WindowTitle } from "@saleor/components/WindowTitle"; -import { useCustomerAddressesQuery } from "@saleor/customers/queries"; +import { + FulfillmentStatus, + OrderFulfillmentApproveMutation, + OrderFulfillmentApproveMutationVariables, + OrderUpdateMutation, + OrderUpdateMutationVariables, + useCustomerAddressesQuery, + useWarehouseListQuery +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import OrderCannotCancelOrderDialog from "@saleor/orders/components/OrderCannotCancelOrderDialog"; import { OrderCustomerAddressesEditDialogOutput } from "@saleor/orders/components/OrderCustomerAddressesEditDialog/types"; import OrderFulfillmentApproveDialog from "@saleor/orders/components/OrderFulfillmentApproveDialog"; import OrderInvoiceEmailSendDialog from "@saleor/orders/components/OrderInvoiceEmailSendDialog"; -import { - OrderFulfillmentApprove, - OrderFulfillmentApproveVariables -} from "@saleor/orders/types/OrderFulfillmentApprove"; -import { - OrderUpdate, - OrderUpdateVariables -} from "@saleor/orders/types/OrderUpdate"; import { PartialMutationProviderOutput } from "@saleor/types"; import { mapEdgesToItems } from "@saleor/utils/maps"; -import { useWarehouseList } from "@saleor/warehouses/queries"; import React from "react"; import { useIntl } from "react-intl"; @@ -26,7 +25,6 @@ import { getStringOrPlaceholder } from "../../../../misc"; import { productUrl } from "../../../../products/urls"; -import { FulfillmentStatus } from "../../../../types/globalTypes"; import OrderAddressFields from "../../../components/OrderAddressFields/OrderAddressFields"; import OrderCancelDialog from "../../../components/OrderCancelDialog"; import OrderDetailsPage from "../../../components/OrderDetailsPage"; @@ -52,14 +50,17 @@ interface OrderNormalDetailsProps { orderAddNote: any; orderInvoiceRequest: any; handleSubmit: any; - orderUpdate: PartialMutationProviderOutput; + orderUpdate: PartialMutationProviderOutput< + OrderUpdateMutation, + OrderUpdateMutationVariables + >; orderCancel: any; orderPaymentMarkAsPaid: any; orderVoid: any; orderPaymentCapture: any; orderFulfillmentApprove: PartialMutationProviderOutput< - OrderFulfillmentApprove, - OrderFulfillmentApproveVariables + OrderFulfillmentApproveMutation, + OrderFulfillmentApproveMutationVariables >; orderFulfillmentCancel: any; orderFulfillmentUpdateTracking: any; @@ -95,7 +96,7 @@ export const OrderNormalDetails: React.FC = ({ const shop = data?.shop; const navigate = useNavigator(); - const warehouses = useWarehouseList({ + const warehouses = useWarehouseListQuery({ displayLoader: true, variables: { first: 30 diff --git a/src/orders/views/OrderDetails/OrderUnconfirmedDetails/index.tsx b/src/orders/views/OrderDetails/OrderUnconfirmedDetails/index.tsx index 032be7082..201555865 100644 --- a/src/orders/views/OrderDetails/OrderUnconfirmedDetails/index.tsx +++ b/src/orders/views/OrderDetails/OrderUnconfirmedDetails/index.tsx @@ -1,24 +1,24 @@ import { WindowTitle } from "@saleor/components/WindowTitle"; import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; -import { useCustomerAddressesQuery } from "@saleor/customers/queries"; +import { + FulfillmentStatus, + OrderFulfillmentApproveMutation, + OrderFulfillmentApproveMutationVariables, + OrderUpdateMutation, + OrderUpdateMutationVariables, + useCustomerAddressesQuery, + useWarehouseListQuery +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import OrderCannotCancelOrderDialog from "@saleor/orders/components/OrderCannotCancelOrderDialog"; import { OrderCustomerAddressesEditDialogOutput } from "@saleor/orders/components/OrderCustomerAddressesEditDialog/types"; import OrderFulfillmentApproveDialog from "@saleor/orders/components/OrderFulfillmentApproveDialog"; import OrderInvoiceEmailSendDialog from "@saleor/orders/components/OrderInvoiceEmailSendDialog"; -import { - OrderFulfillmentApprove, - OrderFulfillmentApproveVariables -} from "@saleor/orders/types/OrderFulfillmentApprove"; -import { - OrderUpdate, - OrderUpdateVariables -} from "@saleor/orders/types/OrderUpdate"; import { OrderDiscountProvider } from "@saleor/products/components/OrderDiscountProviders/OrderDiscountProvider"; import { OrderLineDiscountProvider } from "@saleor/products/components/OrderDiscountProviders/OrderLineDiscountProvider"; +import { useOrderVariantSearch } from "@saleor/searches/useOrderVariantSearch"; import { PartialMutationProviderOutput } from "@saleor/types"; import { mapEdgesToItems } from "@saleor/utils/maps"; -import { useWarehouseList } from "@saleor/warehouses/queries"; import React from "react"; import { useIntl } from "react-intl"; @@ -29,7 +29,6 @@ import { getStringOrPlaceholder } from "../../../../misc"; import { productUrl } from "../../../../products/urls"; -import { FulfillmentStatus } from "../../../../types/globalTypes"; import OrderAddressFields from "../../../components/OrderAddressFields/OrderAddressFields"; import OrderCancelDialog from "../../../components/OrderCancelDialog"; import OrderDetailsPage from "../../../components/OrderDetailsPage"; @@ -40,7 +39,6 @@ import OrderPaymentDialog from "../../../components/OrderPaymentDialog"; import OrderPaymentVoidDialog from "../../../components/OrderPaymentVoidDialog"; import OrderProductAddDialog from "../../../components/OrderProductAddDialog"; import OrderShippingMethodEditDialog from "../../../components/OrderShippingMethodEditDialog"; -import { useOrderVariantSearch } from "../../../queries"; import { orderFulfillUrl, orderListUrl, @@ -60,7 +58,10 @@ interface OrderUnconfirmedDetailsProps { orderLineDelete: any; orderInvoiceRequest: any; handleSubmit: any; - orderUpdate: PartialMutationProviderOutput; + orderUpdate: PartialMutationProviderOutput< + OrderUpdateMutation, + OrderUpdateMutationVariables + >; orderCancel: any; orderShippingMethodUpdate: any; orderLinesAdd: any; @@ -68,8 +69,8 @@ interface OrderUnconfirmedDetailsProps { orderVoid: any; orderPaymentCapture: any; orderFulfillmentApprove: PartialMutationProviderOutput< - OrderFulfillmentApprove, - OrderFulfillmentApproveVariables + OrderFulfillmentApproveMutation, + OrderFulfillmentApproveMutationVariables >; orderFulfillmentCancel: any; orderFulfillmentUpdateTracking: any; @@ -116,7 +117,7 @@ export const OrderUnconfirmedDetails: React.FC = ( } = useOrderVariantSearch({ variables: { ...DEFAULT_INITIAL_SEARCH_DATA, channel: order.channel.slug } }); - const warehouses = useWarehouseList({ + const warehouses = useWarehouseListQuery({ displayLoader: true, variables: { first: 30 diff --git a/src/orders/views/OrderDraftList/OrderDraftList.tsx b/src/orders/views/OrderDraftList/OrderDraftList.tsx index 767c42962..304d701f2 100644 --- a/src/orders/views/OrderDraftList/OrderDraftList.tsx +++ b/src/orders/views/OrderDraftList/OrderDraftList.tsx @@ -6,7 +6,12 @@ import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { SaveFilterTabDialogFormData } from "@saleor/components/SaveFilterTabDialog"; -import { useShopLimitsQuery } from "@saleor/components/Shop/query"; +import { useShopLimitsQuery } from "@saleor/components/Shop/queries"; +import { + useOrderDraftBulkCancelMutation, + useOrderDraftCreateMutation, + useOrderDraftListQuery +} from "@saleor/graphql"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useListSettings from "@saleor/hooks/useListSettings"; import useNavigator from "@saleor/hooks/useNavigator"; @@ -27,13 +32,6 @@ import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import OrderDraftListPage from "../../components/OrderDraftListPage"; -import { - TypedOrderDraftBulkCancelMutation, - useOrderDraftCreateMutation -} from "../../mutations"; -import { useOrderDraftListQuery } from "../../queries"; -import { OrderDraftBulkCancel } from "../../types/OrderDraftBulkCancel"; -import { OrderDraftCreate } from "../../types/OrderDraftCreate"; import { orderDraftListUrl, OrderDraftListUrlDialog, @@ -71,18 +69,35 @@ export const OrderDraftList: React.FC = ({ params }) => { const intl = useIntl(); - const handleCreateOrderCreateSuccess = (data: OrderDraftCreate) => { - notify({ - status: "success", - text: intl.formatMessage({ - defaultMessage: "Order draft successfully created" - }) - }); - navigate(orderUrl(data.draftOrderCreate.order.id)); - }; + const [ + orderDraftBulkDelete, + orderDraftBulkDeleteOpts + ] = useOrderDraftBulkCancelMutation({ + onCompleted: data => { + if (data.draftOrderBulkDelete.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage({ + defaultMessage: "Deleted draft orders" + }) + }); + refetch(); + reset(); + closeModal(); + } + } + }); const [createOrder] = useOrderDraftCreateMutation({ - onCompleted: handleCreateOrderCreateSuccess + onCompleted: data => { + notify({ + status: "success", + text: intl.formatMessage({ + defaultMessage: "Order draft successfully created" + }) + }); + navigate(orderUrl(data.draftOrderCreate.order.id)); + } }); const { channel, availableChannels } = useAppChannel(false); @@ -154,133 +169,107 @@ export const OrderDraftList: React.FC = ({ params }) => { params ); - const handleOrderDraftBulkCancel = (data: OrderDraftBulkCancel) => { - if (data.draftOrderBulkDelete.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage({ - defaultMessage: "Deleted draft orders" - }) - }); - refetch(); - reset(); - closeModal(); - } - }; - const handleSort = createSortHandler(navigate, orderDraftListUrl, params); + const onOrderDraftBulkDelete = () => + orderDraftBulkDelete({ + variables: { + ids: params.ids + } + }); + return ( <> - openModal("delete-search")} + onTabSave={() => openModal("save-search")} + tabs={tabs.map(tab => tab.name)} + disabled={loading} + settings={settings} + orders={mapEdgesToItems(data?.draftOrders)} + pageInfo={pageInfo} + onAdd={() => openModal("create-order")} + onNextPage={loadNextPage} + onPreviousPage={loadPreviousPage} + onRowClick={id => () => navigate(orderUrl(id))} + onSort={handleSort} + onUpdateListSettings={updateListSettings} + isChecked={isSelected} + selected={listElements.length} + sort={getSortParams(params)} + toggle={toggle} + toggleAll={toggleAll} + toolbar={ + + openModal("remove", { + ids: listElements + }) + } + > + + + } + /> + - {(orderDraftBulkDelete, orderDraftBulkDeleteOpts) => { - const onOrderDraftBulkDelete = () => - orderDraftBulkDelete({ - variables: { - ids: params.ids - } - }); - - return ( - <> - openModal("delete-search")} - onTabSave={() => openModal("save-search")} - tabs={tabs.map(tab => tab.name)} - disabled={loading} - settings={settings} - orders={mapEdgesToItems(data?.draftOrders)} - pageInfo={pageInfo} - onAdd={() => openModal("create-order")} - onNextPage={loadNextPage} - onPreviousPage={loadPreviousPage} - onRowClick={id => () => navigate(orderUrl(id))} - onSort={handleSort} - onUpdateListSettings={updateListSettings} - isChecked={isSelected} - selected={listElements.length} - sort={getSortParams(params)} - toggle={toggle} - toggleAll={toggleAll} - toolbar={ - - openModal("remove", { - ids: listElements - }) - } - > - - - } - /> - - - params.ids.length), - displayQuantity: ( - {maybe(() => params.ids.length)} - ) - }} - /> - - - - tabs[currentTab - 1].name, "...")} - /> - - createOrder({ - variables: { - input: { channelId } - } - }) - } - /> - - ); - }} - + + params.ids.length), + displayQuantity: {maybe(() => params.ids.length)} + }} + /> + + + + tabs[currentTab - 1].name, "...")} + /> + + createOrder({ + variables: { + input: { channelId } + } + }) + } + /> ); }; diff --git a/src/orders/views/OrderDraftList/filters.ts b/src/orders/views/OrderDraftList/filters.ts index e622bf2d4..0bf61a6b4 100644 --- a/src/orders/views/OrderDraftList/filters.ts +++ b/src/orders/views/OrderDraftList/filters.ts @@ -1,10 +1,10 @@ import { IFilterElement } from "@saleor/components/Filter"; +import { OrderDraftFilterInput } from "@saleor/graphql"; import { maybe } from "@saleor/misc"; import { OrderDraftFilterKeys, OrderDraftListFilterOpts } from "@saleor/orders/components/OrderDraftListPage"; -import { OrderDraftFilterInput } from "@saleor/types/globalTypes"; import { createFilterTabUtils, diff --git a/src/orders/views/OrderDraftList/sort.ts b/src/orders/views/OrderDraftList/sort.ts index faca9d620..e256fb192 100644 --- a/src/orders/views/OrderDraftList/sort.ts +++ b/src/orders/views/OrderDraftList/sort.ts @@ -1,5 +1,5 @@ +import { OrderSortField } from "@saleor/graphql"; import { OrderDraftListUrlSortField } from "@saleor/orders/urls"; -import { OrderSortField } from "@saleor/types/globalTypes"; import { createGetSortQueryVariables } from "@saleor/utils/sort"; export function getSortQueryField( diff --git a/src/orders/views/OrderFulfill/OrderFulfill.tsx b/src/orders/views/OrderFulfill/OrderFulfill.tsx index a04443a23..b23b8db82 100644 --- a/src/orders/views/OrderFulfill/OrderFulfill.tsx +++ b/src/orders/views/OrderFulfill/OrderFulfill.tsx @@ -1,28 +1,28 @@ import { WindowTitle } from "@saleor/components/WindowTitle"; +import { + OrderFulfillDataQuery, + useFulfillOrderMutation, + useOrderFulfillDataQuery, + useOrderFulfillSettingsQuery, + WarehouseClickAndCollectOptionEnum, + WarehouseFragment +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { extractMutationErrors } from "@saleor/misc"; import OrderFulfillPage from "@saleor/orders/components/OrderFulfillPage"; -import { useOrderFulfill } from "@saleor/orders/mutations"; -import { - useOrderFulfillData, - useOrderFulfillSettingsQuery -} from "@saleor/orders/queries"; -import { OrderFulfillData_order } from "@saleor/orders/types/OrderFulfillData"; import { orderUrl } from "@saleor/orders/urls"; import { getWarehousesFromOrderLines } from "@saleor/orders/utils/data"; import React from "react"; import { useIntl } from "react-intl"; -import { WarehouseClickAndCollectOptionEnum } from "../../../types/globalTypes"; - export interface OrderFulfillProps { orderId: string; } const resolveLocalFulfillment = ( - order: OrderFulfillData_order, - orderLineWarehouses + order: OrderFulfillDataQuery["order"], + orderLineWarehouses: WarehouseFragment[] ) => { const deliveryMethod = order?.deliveryMethod; if ( @@ -47,7 +47,7 @@ const OrderFulfill: React.FC = ({ orderId }) => { loading: settingsLoading } = useOrderFulfillSettingsQuery({}); - const { data, loading } = useOrderFulfillData({ + const { data, loading } = useOrderFulfillDataQuery({ displayLoader: true, variables: { orderId @@ -56,7 +56,7 @@ const OrderFulfill: React.FC = ({ orderId }) => { const orderLinesWarehouses = getWarehousesFromOrderLines(data?.order?.lines); - const [fulfillOrder, fulfillOrderOpts] = useOrderFulfill({ + const [fulfillOrder, fulfillOrderOpts] = useFulfillOrderMutation({ onCompleted: data => { if (data.orderFulfill.errors.length === 0) { navigate(orderUrl(orderId), { replace: true }); diff --git a/src/orders/views/OrderList/OrderList.tsx b/src/orders/views/OrderList/OrderList.tsx index 764f15a66..657354eda 100644 --- a/src/orders/views/OrderList/OrderList.tsx +++ b/src/orders/views/OrderList/OrderList.tsx @@ -4,7 +4,11 @@ import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { SaveFilterTabDialogFormData } from "@saleor/components/SaveFilterTabDialog"; -import { useShopLimitsQuery } from "@saleor/components/Shop/query"; +import { useShopLimitsQuery } from "@saleor/components/Shop/queries"; +import { + useOrderDraftCreateMutation, + useOrderListQuery +} from "@saleor/graphql"; import useListSettings from "@saleor/hooks/useListSettings"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; @@ -23,9 +27,6 @@ import React from "react"; import { useIntl } from "react-intl"; import OrderListPage from "../../components/OrderListPage/OrderListPage"; -import { useOrderDraftCreateMutation } from "../../mutations"; -import { useOrderListQuery } from "../../queries"; -import { OrderDraftCreate } from "../../types/OrderDraftCreate"; import { orderListUrl, OrderListUrlDialog, @@ -61,18 +62,16 @@ export const OrderList: React.FC = ({ params }) => { const intl = useIntl(); - const handleCreateOrderCreateSuccess = (data: OrderDraftCreate) => { - notify({ - status: "success", - text: intl.formatMessage({ - defaultMessage: "Order draft successfully created" - }) - }); - navigate(orderUrl(data.draftOrderCreate.order.id)); - }; - const [createOrder] = useOrderDraftCreateMutation({ - onCompleted: handleCreateOrderCreateSuccess + onCompleted: data => { + notify({ + status: "success", + text: intl.formatMessage({ + defaultMessage: "Order draft successfully created" + }) + }); + navigate(orderUrl(data.draftOrderCreate.order.id)); + } }); const { channel, availableChannels } = useAppChannel(false); diff --git a/src/orders/views/OrderList/filters.test.ts b/src/orders/views/OrderList/filters.test.ts index bcb74cf67..883e02b14 100644 --- a/src/orders/views/OrderList/filters.test.ts +++ b/src/orders/views/OrderList/filters.test.ts @@ -1,13 +1,10 @@ import { date } from "@saleor/fixtures"; +import { OrderStatusFilter, PaymentChargeStatusEnum } from "@saleor/graphql"; import { createFilterStructure, OrderFilterGiftCard } from "@saleor/orders/components/OrderListPage"; import { OrderListUrlFilters } from "@saleor/orders/urls"; -import { - OrderStatusFilter, - PaymentChargeStatusEnum -} from "@saleor/types/globalTypes"; import { getFilterQueryParams } from "@saleor/utils/filters"; import { stringifyQs } from "@saleor/utils/urls"; import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; diff --git a/src/orders/views/OrderList/filters.ts b/src/orders/views/OrderList/filters.ts index 4a64fcc36..89b152bed 100644 --- a/src/orders/views/OrderList/filters.ts +++ b/src/orders/views/OrderList/filters.ts @@ -1,4 +1,9 @@ import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; +import { + OrderFilterInput, + OrderStatusFilter, + PaymentChargeStatusEnum +} from "@saleor/graphql"; import { findInEnum, findValueInEnum, parseBoolean } from "@saleor/misc"; import { OrderFilterGiftCard, @@ -7,11 +12,6 @@ import { } from "@saleor/orders/components/OrderListPage/filters"; import { IFilterElement } from "../../../components/Filter"; -import { - OrderFilterInput, - OrderStatusFilter, - PaymentChargeStatusEnum -} from "../../../types/globalTypes"; import { createFilterTabUtils, createFilterUtils, diff --git a/src/orders/views/OrderList/sort.ts b/src/orders/views/OrderList/sort.ts index 3db1c075e..0cf8bc8a6 100644 --- a/src/orders/views/OrderList/sort.ts +++ b/src/orders/views/OrderList/sort.ts @@ -1,5 +1,5 @@ +import { OrderSortField } from "@saleor/graphql"; import { OrderListUrlSortField } from "@saleor/orders/urls"; -import { OrderSortField } from "@saleor/types/globalTypes"; import { createGetSortQueryVariables } from "@saleor/utils/sort"; export function getSortQueryField(sort: OrderListUrlSortField): OrderSortField { diff --git a/src/orders/views/OrderRefund/OrderRefund.tsx b/src/orders/views/OrderRefund/OrderRefund.tsx index 876f762cd..ed7328eab 100644 --- a/src/orders/views/OrderRefund/OrderRefund.tsx +++ b/src/orders/views/OrderRefund/OrderRefund.tsx @@ -1,3 +1,8 @@ +import { + useOrderFulfillmentRefundProductsMutation, + useOrderRefundDataQuery, + useOrderRefundMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { extractMutationErrors } from "@saleor/misc"; @@ -7,11 +12,6 @@ import { OrderRefundSubmitData, OrderRefundType } from "@saleor/orders/components/OrderRefundPage/form"; -import { - useOrderFulfillmentRefundProductsMutation, - useOrderRefundMutation -} from "@saleor/orders/mutations"; -import { useOrderRefundData } from "@saleor/orders/queries"; import { orderUrl } from "@saleor/orders/urls"; import React from "react"; import { useIntl } from "react-intl"; @@ -61,7 +61,7 @@ const OrderRefund: React.FC = ({ orderId }) => { const notify = useNotifier(); const intl = useIntl(); - const { data, loading } = useOrderRefundData({ + const { data, loading } = useOrderRefundDataQuery({ displayLoader: true, variables: { orderId diff --git a/src/orders/views/OrderReturn/OrderReturn.tsx b/src/orders/views/OrderReturn/OrderReturn.tsx index 9b27baa3e..20d06f45c 100644 --- a/src/orders/views/OrderReturn/OrderReturn.tsx +++ b/src/orders/views/OrderReturn/OrderReturn.tsx @@ -1,16 +1,17 @@ +import { + OrderErrorCode, + useFulfillmentReturnProductsMutation, + useOrderDetailsQuery +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages } from "@saleor/intl"; import { extractMutationErrors } from "@saleor/misc"; import OrderReturnPage from "@saleor/orders/components/OrderReturnPage"; import { OrderReturnFormData } from "@saleor/orders/components/OrderReturnPage/form"; -import { useOrderReturnCreateMutation } from "@saleor/orders/mutations"; -import { useOrderQuery } from "@saleor/orders/queries"; import { orderUrl } from "@saleor/orders/urls"; -import { OrderErrorCode } from "@saleor/types/globalTypes"; import React from "react"; -import { defineMessages } from "react-intl"; -import { useIntl } from "react-intl"; +import { defineMessages, useIntl } from "react-intl"; import ReturnFormDataParser from "./utils"; @@ -39,46 +40,48 @@ const OrderReturn: React.FC = ({ orderId }) => { const notify = useNotifier(); const intl = useIntl(); - const { data, loading } = useOrderQuery({ + const { data, loading } = useOrderDetailsQuery({ displayLoader: true, variables: { id: orderId } }); - const [returnCreate, returnCreateOpts] = useOrderReturnCreateMutation({ - onCompleted: ({ - orderFulfillmentReturnProducts: { errors, replaceOrder } - }) => { - if (!errors.length) { - notify({ - status: "success", - text: intl.formatMessage(messages.successAlert) - }); + const [returnCreate, returnCreateOpts] = useFulfillmentReturnProductsMutation( + { + onCompleted: ({ + orderFulfillmentReturnProducts: { errors, replaceOrder } + }) => { + if (!errors.length) { + notify({ + status: "success", + text: intl.formatMessage(messages.successAlert) + }); - navigateToOrder(replaceOrder?.id); + navigateToOrder(replaceOrder?.id); - return; - } + return; + } + + if (errors.some(err => err.code === OrderErrorCode.CANNOT_REFUND)) { + notify({ + autohide: 5000, + status: "error", + text: intl.formatMessage(messages.cannotRefundDescription), + title: intl.formatMessage(messages.cannotRefundTitle) + }); + + return; + } - if (errors.some(err => err.code === OrderErrorCode.CANNOT_REFUND)) { notify({ autohide: 5000, status: "error", - text: intl.formatMessage(messages.cannotRefundDescription), - title: intl.formatMessage(messages.cannotRefundTitle) + text: intl.formatMessage(commonMessages.somethingWentWrong) }); - - return; } - - notify({ - autohide: 5000, - status: "error", - text: intl.formatMessage(commonMessages.somethingWentWrong) - }); } - }); + ); const handleSubmit = async (formData: OrderReturnFormData) => { if (!data?.order) { diff --git a/src/orders/views/OrderReturn/utils.tsx b/src/orders/views/OrderReturn/utils.tsx index dee4e610b..f333e5b4a 100644 --- a/src/orders/views/OrderReturn/utils.tsx +++ b/src/orders/views/OrderReturn/utils.tsx @@ -1,22 +1,21 @@ -/* eslint-disable @typescript-eslint/member-ordering */ +import { + OrderDetailsFragment, + OrderReturnFulfillmentLineInput, + OrderReturnLineInput, + OrderReturnProductsInput +} from "@saleor/graphql"; import { OrderRefundAmountCalculationMode } from "@saleor/orders/components/OrderRefundPage/form"; import { FormsetQuantityData, OrderReturnFormData } from "@saleor/orders/components/OrderReturnPage/form"; import { getById } from "@saleor/orders/components/OrderReturnPage/utils"; -import { OrderDetails_order } from "@saleor/orders/types/OrderDetails"; -import { - OrderReturnFulfillmentLineInput, - OrderReturnLineInput, - OrderReturnProductsInput -} from "@saleor/types/globalTypes"; class ReturnFormDataParser { - private order: OrderDetails_order; + private order: OrderDetailsFragment; private formData: OrderReturnFormData; - constructor(order: OrderDetails_order, formData: OrderReturnFormData) { + constructor(order: OrderDetailsFragment, formData: OrderReturnFormData) { this.order = order; this.formData = formData; } @@ -101,6 +100,7 @@ class ReturnFormDataParser { ); }; + // eslint-disable-next-line @typescript-eslint/member-ordering private static isLineRefundable = function< T extends OrderReturnLineInput | OrderReturnFulfillmentLineInput >({ replace }: T) { diff --git a/src/orders/views/OrderSettings.tsx b/src/orders/views/OrderSettings.tsx index 8b457b7b5..01784e7cf 100644 --- a/src/orders/views/OrderSettings.tsx +++ b/src/orders/views/OrderSettings.tsx @@ -1,10 +1,12 @@ +import { + useOrderSettingsQuery, + useOrderSettingsUpdateMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages } from "@saleor/intl"; import { extractMutationErrors, getMutationState } from "@saleor/misc"; import OrderSettingsPage from "@saleor/orders/components/OrderSettingsPage"; -import { useOrderSettingsUpdateMutation } from "@saleor/orders/mutations"; -import { useOrderSettingsQuery } from "@saleor/orders/queries"; import { orderListUrl } from "@saleor/orders/urls"; import React from "react"; import { useIntl } from "react-intl"; diff --git a/src/pageTypes/components/PageTypeAttributes/PageTypeAttributes.tsx b/src/pageTypes/components/PageTypeAttributes/PageTypeAttributes.tsx index 6e7450de4..7b92b10d5 100644 --- a/src/pageTypes/components/PageTypeAttributes/PageTypeAttributes.tsx +++ b/src/pageTypes/components/PageTypeAttributes/PageTypeAttributes.tsx @@ -8,11 +8,10 @@ import { SortableTableRow } from "@saleor/components/SortableTable"; import TableHead from "@saleor/components/TableHead"; +import { AttributeFragment, AttributeTypeEnum } from "@saleor/graphql"; import { Button, DeleteIcon, IconButton, makeStyles } from "@saleor/macaw-ui"; import { renderCollection, stopPropagation } from "@saleor/misc"; -import { PageTypeDetails_pageType_attributes } from "@saleor/pageTypes/types/PageTypeDetails"; import { ListActions, ReorderAction } from "@saleor/types"; -import { AttributeTypeEnum } from "@saleor/types/globalTypes"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -42,7 +41,7 @@ const useStyles = makeStyles( ); interface PageTypeAttributesProps extends ListActions { - attributes: PageTypeDetails_pageType_attributes[]; + attributes: AttributeFragment[]; disabled: boolean; type: string; onAttributeAssign: (type: AttributeTypeEnum) => void; diff --git a/src/pageTypes/components/PageTypeCreatePage/PageTypeCreatePage.stories.tsx b/src/pageTypes/components/PageTypeCreatePage/PageTypeCreatePage.stories.tsx index 14f10ab47..3a42b10f7 100644 --- a/src/pageTypes/components/PageTypeCreatePage/PageTypeCreatePage.stories.tsx +++ b/src/pageTypes/components/PageTypeCreatePage/PageTypeCreatePage.stories.tsx @@ -1,4 +1,4 @@ -import { PageErrorCode } from "@saleor/types/globalTypes"; +import { PageErrorCode } from "@saleor/graphql"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/pageTypes/components/PageTypeCreatePage/PageTypeCreatePage.tsx b/src/pageTypes/components/PageTypeCreatePage/PageTypeCreatePage.tsx index a46ba31de..4cc46e1e6 100644 --- a/src/pageTypes/components/PageTypeCreatePage/PageTypeCreatePage.tsx +++ b/src/pageTypes/components/PageTypeCreatePage/PageTypeCreatePage.tsx @@ -6,10 +6,13 @@ import Hr from "@saleor/components/Hr"; import Metadata, { MetadataFormData } from "@saleor/components/Metadata"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; -import { PageErrorFragment } from "@saleor/fragments/types/PageErrorFragment"; +import { PageErrorFragment } from "@saleor/graphql"; import { commonMessages, sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink, makeStyles } from "@saleor/macaw-ui"; +import { + Backlink, + ConfirmButtonTransitionState, + makeStyles +} from "@saleor/macaw-ui"; import useMetadataChangeTrigger from "@saleor/utils/metadata/useMetadataChangeTrigger"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/pageTypes/components/PageTypeDetails/PageTypeDetails.tsx b/src/pageTypes/components/PageTypeDetails/PageTypeDetails.tsx index 1041c94a6..796ea00b5 100644 --- a/src/pageTypes/components/PageTypeDetails/PageTypeDetails.tsx +++ b/src/pageTypes/components/PageTypeDetails/PageTypeDetails.tsx @@ -1,6 +1,6 @@ import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; -import { PageErrorFragment } from "@saleor/fragments/types/PageErrorFragment"; +import { PageErrorFragment } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { getFormErrors } from "@saleor/utils/errors"; import getPageErrorMessage from "@saleor/utils/errors/page"; diff --git a/src/pageTypes/components/PageTypeDetailsPage/PageTypeDetailsPage.stories.tsx b/src/pageTypes/components/PageTypeDetailsPage/PageTypeDetailsPage.stories.tsx index 168e9e351..0e526da64 100644 --- a/src/pageTypes/components/PageTypeDetailsPage/PageTypeDetailsPage.stories.tsx +++ b/src/pageTypes/components/PageTypeDetailsPage/PageTypeDetailsPage.stories.tsx @@ -1,5 +1,5 @@ import { listActionsProps } from "@saleor/fixtures"; -import { PageErrorCode } from "@saleor/types/globalTypes"; +import { PageErrorCode } from "@saleor/graphql"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/pageTypes/components/PageTypeDetailsPage/PageTypeDetailsPage.tsx b/src/pageTypes/components/PageTypeDetailsPage/PageTypeDetailsPage.tsx index fd77150db..d7e94254f 100644 --- a/src/pageTypes/components/PageTypeDetailsPage/PageTypeDetailsPage.tsx +++ b/src/pageTypes/components/PageTypeDetailsPage/PageTypeDetailsPage.tsx @@ -8,14 +8,18 @@ import { MetadataFormData } from "@saleor/components/Metadata/types"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; -import { PageErrorFragment } from "@saleor/fragments/types/PageErrorFragment"; +import { + AttributeTypeEnum, + PageErrorFragment, + PageTypeDetailsFragment +} from "@saleor/graphql"; import { commonMessages, sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; -import { makeStyles } from "@saleor/macaw-ui"; -import { PageTypeDetails_pageType } from "@saleor/pageTypes/types/PageTypeDetails"; +import { + Backlink, + ConfirmButtonTransitionState, + makeStyles +} from "@saleor/macaw-ui"; import { ListActions, ReorderEvent } from "@saleor/types"; -import { AttributeTypeEnum } from "@saleor/types/globalTypes"; import { mapMetadataItemToInput } from "@saleor/utils/maps"; import useMetadataChangeTrigger from "@saleor/utils/metadata/useMetadataChangeTrigger"; import React from "react"; @@ -31,7 +35,7 @@ export interface PageTypeForm extends MetadataFormData { export interface PageTypeDetailsPageProps { errors: PageErrorFragment[]; - pageType: PageTypeDetails_pageType; + pageType: PageTypeDetailsFragment; disabled: boolean; pageTitle: string; attributeList: ListActions; diff --git a/src/pageTypes/components/PageTypeList/PageTypeList.tsx b/src/pageTypes/components/PageTypeList/PageTypeList.tsx index 179caa921..0791a0234 100644 --- a/src/pageTypes/components/PageTypeList/PageTypeList.tsx +++ b/src/pageTypes/components/PageTypeList/PageTypeList.tsx @@ -5,8 +5,8 @@ import Skeleton from "@saleor/components/Skeleton"; import TableCellHeader from "@saleor/components/TableCellHeader"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; +import { PageTypeFragment } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; -import { PageTypeList_pageTypes_edges_node } from "@saleor/pageTypes/types/PageTypeList"; import { PageTypeListUrlSortField } from "@saleor/pageTypes/urls"; import { getArrowDirection } from "@saleor/utils/sort"; import React from "react"; @@ -31,7 +31,7 @@ interface PageTypeListProps extends ListProps, ListActions, SortPage { - pageTypes: PageTypeList_pageTypes_edges_node[]; + pageTypes: PageTypeFragment[]; } const PageTypeList: React.FC = props => { diff --git a/src/pageTypes/components/PageTypeListPage/PageTypeListPage.tsx b/src/pageTypes/components/PageTypeListPage/PageTypeListPage.tsx index 636fe9949..b2ce42f87 100644 --- a/src/pageTypes/components/PageTypeListPage/PageTypeListPage.tsx +++ b/src/pageTypes/components/PageTypeListPage/PageTypeListPage.tsx @@ -2,9 +2,9 @@ import { Card } from "@material-ui/core"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; import SearchBar from "@saleor/components/SearchBar"; +import { PageTypeFragment } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { Backlink, Button } from "@saleor/macaw-ui"; -import { PageTypeList_pageTypes_edges_node } from "@saleor/pageTypes/types/PageTypeList"; import { PageTypeListUrlSortField } from "@saleor/pageTypes/urls"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -24,7 +24,7 @@ export interface PageTypeListPageProps SearchPageProps, SortPage, TabPageProps { - pageTypes: PageTypeList_pageTypes_edges_node[]; + pageTypes: PageTypeFragment[]; onBack: () => void; } diff --git a/src/pageTypes/fixtures.ts b/src/pageTypes/fixtures.ts index bbe9e4bad..e9f9b4a99 100644 --- a/src/pageTypes/fixtures.ts +++ b/src/pageTypes/fixtures.ts @@ -1,13 +1,11 @@ -/* eslint-disable sort-keys */ import { AttributeInputTypeEnum, - AttributeTypeEnum -} from "@saleor/types/globalTypes"; + AttributeTypeEnum, + PageTypeDetailsFragment, + PageTypeFragment +} from "@saleor/graphql"; -import { PageTypeDetails_pageType } from "./types/PageTypeDetails"; -import { PageTypeList_pageTypes_edges_node } from "./types/PageTypeList"; - -export const pageTypes: PageTypeList_pageTypes_edges_node[] = [ +export const pageTypes: PageTypeFragment[] = [ { id: "UGFnZVR5cGU6MQ==", name: "Blog", @@ -28,7 +26,7 @@ export const pageTypes: PageTypeList_pageTypes_edges_node[] = [ } ]; -export const pageType: PageTypeDetails_pageType = { +export const pageType: PageTypeDetailsFragment = { id: "UGFnZVR5cGU6MQ==", __typename: "PageType", metadata: [ diff --git a/src/pageTypes/hooks/useAvailablePageAttributeSearch/types/SearchAvailablePageAttributes.ts b/src/pageTypes/hooks/useAvailablePageAttributeSearch/types/SearchAvailablePageAttributes.ts deleted file mode 100644 index c0f432417..000000000 --- a/src/pageTypes/hooks/useAvailablePageAttributeSearch/types/SearchAvailablePageAttributes.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: SearchAvailablePageAttributes -// ==================================================== - -export interface SearchAvailablePageAttributes_pageType_availableAttributes_edges_node { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; -} - -export interface SearchAvailablePageAttributes_pageType_availableAttributes_edges { - __typename: "AttributeCountableEdge"; - node: SearchAvailablePageAttributes_pageType_availableAttributes_edges_node; -} - -export interface SearchAvailablePageAttributes_pageType_availableAttributes_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SearchAvailablePageAttributes_pageType_availableAttributes { - __typename: "AttributeCountableConnection"; - edges: SearchAvailablePageAttributes_pageType_availableAttributes_edges[]; - pageInfo: SearchAvailablePageAttributes_pageType_availableAttributes_pageInfo; -} - -export interface SearchAvailablePageAttributes_pageType { - __typename: "PageType"; - id: string; - availableAttributes: SearchAvailablePageAttributes_pageType_availableAttributes | null; -} - -export interface SearchAvailablePageAttributes { - pageType: SearchAvailablePageAttributes_pageType | null; -} - -export interface SearchAvailablePageAttributesVariables { - id: string; - after?: string | null; - first: number; - query: string; -} diff --git a/src/pageTypes/hooks/usePageTypeDelete/usePageTypeDelete.tsx b/src/pageTypes/hooks/usePageTypeDelete/usePageTypeDelete.tsx index 9849aa51b..7f0794b00 100644 --- a/src/pageTypes/hooks/usePageTypeDelete/usePageTypeDelete.tsx +++ b/src/pageTypes/hooks/usePageTypeDelete/usePageTypeDelete.tsx @@ -1,5 +1,4 @@ -import { usePageCountQuery } from "@saleor/pages/queries"; -import { PageCountVariables } from "@saleor/pages/types/PageCount"; +import { PageCountQueryVariables, usePageCountQuery } from "@saleor/graphql"; import { pageListUrl } from "@saleor/pages/urls"; import { PageTypeListUrlQueryParams, @@ -24,7 +23,7 @@ function usePageTypeDelete({ const isDeleteDialogOpen = params.action === "remove"; const pagesAssignedToSelectedTypesQueryVars = React.useMemo< - PageCountVariables + PageCountQueryVariables >( () => ({ filter: { diff --git a/src/pageTypes/mutations.ts b/src/pageTypes/mutations.ts index f710b69eb..cdca7d68a 100644 --- a/src/pageTypes/mutations.ts +++ b/src/pageTypes/mutations.ts @@ -1,119 +1,58 @@ import { gql } from "@apollo/client"; -import { - pageErrorFragment, - pageTypeBulkDeleteErrorFragment, - pageTypeDeleteErrorFragment -} from "@saleor/fragments/errors"; -import { pageTypeDetailsFragment } from "@saleor/fragments/pageTypes"; -import makeMutation from "@saleor/hooks/makeMutation"; - -import { - AssignPageAttribute, - AssignPageAttributeVariables -} from "./types/AssignPageAttribute"; -import { - PageTypeAttributeReorder, - PageTypeAttributeReorderVariables -} from "./types/PageTypeAttributeReorder"; -import { - PageTypeBulkDelete, - PageTypeBulkDeleteVariables -} from "./types/PageTypeBulkDelete"; -import { - PageTypeCreate, - PageTypeCreateVariables -} from "./types/PageTypeCreate"; -import { - PageTypeDelete, - PageTypeDeleteVariables -} from "./types/PageTypeDelete"; -import { - PageTypeUpdate, - PageTypeUpdateVariables -} from "./types/PageTypeUpdate"; -import { - UnassignPageAttribute, - UnassignPageAttributeVariables -} from "./types/UnassignPageAttribute"; export const pageTypeUpdateMutation = gql` - ${pageTypeDetailsFragment} - ${pageErrorFragment} mutation PageTypeUpdate($id: ID!, $input: PageTypeUpdateInput!) { pageTypeUpdate(id: $id, input: $input) { errors { - ...PageErrorFragment + ...PageError } pageType { - ...PageTypeDetailsFragment + ...PageTypeDetails } } } `; -export const usePageTypeUpdateMutation = makeMutation< - PageTypeUpdate, - PageTypeUpdateVariables ->(pageTypeUpdateMutation); export const pageTypeCreateMutation = gql` - ${pageTypeDetailsFragment} - ${pageErrorFragment} mutation PageTypeCreate($input: PageTypeCreateInput!) { pageTypeCreate(input: $input) { errors { - ...PageErrorFragment + ...PageError } pageType { - ...PageTypeDetailsFragment + ...PageTypeDetails } } } `; -export const usePageTypeCreateMutation = makeMutation< - PageTypeCreate, - PageTypeCreateVariables ->(pageTypeCreateMutation); export const assignPageAttributeMutation = gql` - ${pageTypeDetailsFragment} - ${pageErrorFragment} mutation AssignPageAttribute($id: ID!, $ids: [ID!]!) { pageAttributeAssign(pageTypeId: $id, attributeIds: $ids) { errors { - ...PageErrorFragment + ...PageError } pageType { - ...PageTypeDetailsFragment + ...PageTypeDetails } } } `; -export const useAssignPageAttributeMutation = makeMutation< - AssignPageAttribute, - AssignPageAttributeVariables ->(assignPageAttributeMutation); export const unassignPageAttributeMutation = gql` - ${pageTypeDetailsFragment} - ${pageErrorFragment} mutation UnassignPageAttribute($id: ID!, $ids: [ID!]!) { pageAttributeUnassign(pageTypeId: $id, attributeIds: $ids) { errors { - ...PageErrorFragment + ...PageError } pageType { - ...PageTypeDetailsFragment + ...PageTypeDetails } } } `; -export const useUnassignPageAttributeMutation = makeMutation< - UnassignPageAttribute, - UnassignPageAttributeVariables ->(unassignPageAttributeMutation); export const pageTypeDeleteMutation = gql` - ${pageTypeDeleteErrorFragment} mutation PageTypeDelete($id: ID!) { pageTypeDelete(id: $id) { errors { @@ -125,13 +64,8 @@ export const pageTypeDeleteMutation = gql` } } `; -export const usePageTypeDeleteMutation = makeMutation< - PageTypeDelete, - PageTypeDeleteVariables ->(pageTypeDeleteMutation); export const pageTypeBulkDeleteMutation = gql` - ${pageTypeBulkDeleteErrorFragment} mutation PageTypeBulkDelete($ids: [ID!]!) { pageTypeBulkDelete(ids: $ids) { errors { @@ -140,26 +74,16 @@ export const pageTypeBulkDeleteMutation = gql` } } `; -export const usePageTypeBulkDeleteMutation = makeMutation< - PageTypeBulkDelete, - PageTypeBulkDeleteVariables ->(pageTypeBulkDeleteMutation); export const pageTypeAttributeReorder = gql` - ${pageTypeDetailsFragment} - ${pageErrorFragment} mutation PageTypeAttributeReorder($move: ReorderInput!, $pageTypeId: ID!) { pageTypeReorderAttributes(moves: [$move], pageTypeId: $pageTypeId) { errors { - ...PageErrorFragment + ...PageError } pageType { - ...PageTypeDetailsFragment + ...PageTypeDetails } } } `; -export const usePageTypeAttributeReorderMutation = makeMutation< - PageTypeAttributeReorder, - PageTypeAttributeReorderVariables ->(pageTypeAttributeReorder); diff --git a/src/pageTypes/queries.ts b/src/pageTypes/queries.ts index f586e95a7..06e851306 100644 --- a/src/pageTypes/queries.ts +++ b/src/pageTypes/queries.ts @@ -1,20 +1,6 @@ import { gql } from "@apollo/client"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; -import { - pageTypeDetailsFragment, - pageTypeFragment -} from "@saleor/fragments/pageTypes"; -import makeQuery from "@saleor/hooks/makeQuery"; - -import { - PageTypeDetails, - PageTypeDetailsVariables -} from "./types/PageTypeDetails"; -import { PageTypeList, PageTypeListVariables } from "./types/PageTypeList"; export const pageTypeListQuery = gql` - ${pageInfoFragment} - ${pageTypeFragment} query PageTypeList( $after: String $before: String @@ -33,31 +19,20 @@ export const pageTypeListQuery = gql` ) { edges { node { - ...PageTypeFragment - hasPages + ...PageType } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export const usePageTypeListQuery = makeQuery< - PageTypeList, - PageTypeListVariables ->(pageTypeListQuery); export const pageTypeDetailsQuery = gql` - ${pageTypeDetailsFragment} query PageTypeDetails($id: ID!) { pageType(id: $id) { - ...PageTypeDetailsFragment - hasPages + ...PageTypeDetails } } `; -export const usePageTypeDetailsQuery = makeQuery< - PageTypeDetails, - PageTypeDetailsVariables ->(pageTypeDetailsQuery); diff --git a/src/pageTypes/types/AssignPageAttribute.ts b/src/pageTypes/types/AssignPageAttribute.ts deleted file mode 100644 index b08527dc1..000000000 --- a/src/pageTypes/types/AssignPageAttribute.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PageErrorCode, AttributeTypeEnum, MeasurementUnitsEnum, AttributeInputTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AssignPageAttribute -// ==================================================== - -export interface AssignPageAttribute_pageAttributeAssign_errors { - __typename: "PageError"; - code: PageErrorCode; - field: string | null; - message: string | null; -} - -export interface AssignPageAttribute_pageAttributeAssign_pageType_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface AssignPageAttribute_pageAttributeAssign_pageType_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface AssignPageAttribute_pageAttributeAssign_pageType_attributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface AssignPageAttribute_pageAttributeAssign_pageType { - __typename: "PageType"; - id: string; - name: string; - metadata: (AssignPageAttribute_pageAttributeAssign_pageType_metadata | null)[]; - privateMetadata: (AssignPageAttribute_pageAttributeAssign_pageType_privateMetadata | null)[]; - attributes: (AssignPageAttribute_pageAttributeAssign_pageType_attributes | null)[] | null; -} - -export interface AssignPageAttribute_pageAttributeAssign { - __typename: "PageAttributeAssign"; - errors: AssignPageAttribute_pageAttributeAssign_errors[]; - pageType: AssignPageAttribute_pageAttributeAssign_pageType | null; -} - -export interface AssignPageAttribute { - pageAttributeAssign: AssignPageAttribute_pageAttributeAssign | null; -} - -export interface AssignPageAttributeVariables { - id: string; - ids: string[]; -} diff --git a/src/pageTypes/types/PageTypeAttributeReorder.ts b/src/pageTypes/types/PageTypeAttributeReorder.ts deleted file mode 100644 index 552ecc70e..000000000 --- a/src/pageTypes/types/PageTypeAttributeReorder.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ReorderInput, PageErrorCode, AttributeTypeEnum, MeasurementUnitsEnum, AttributeInputTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: PageTypeAttributeReorder -// ==================================================== - -export interface PageTypeAttributeReorder_pageTypeReorderAttributes_errors { - __typename: "PageError"; - code: PageErrorCode; - field: string | null; - message: string | null; -} - -export interface PageTypeAttributeReorder_pageTypeReorderAttributes_pageType_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface PageTypeAttributeReorder_pageTypeReorderAttributes_pageType_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface PageTypeAttributeReorder_pageTypeReorderAttributes_pageType_attributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface PageTypeAttributeReorder_pageTypeReorderAttributes_pageType { - __typename: "PageType"; - id: string; - name: string; - metadata: (PageTypeAttributeReorder_pageTypeReorderAttributes_pageType_metadata | null)[]; - privateMetadata: (PageTypeAttributeReorder_pageTypeReorderAttributes_pageType_privateMetadata | null)[]; - attributes: (PageTypeAttributeReorder_pageTypeReorderAttributes_pageType_attributes | null)[] | null; -} - -export interface PageTypeAttributeReorder_pageTypeReorderAttributes { - __typename: "PageTypeReorderAttributes"; - errors: PageTypeAttributeReorder_pageTypeReorderAttributes_errors[]; - pageType: PageTypeAttributeReorder_pageTypeReorderAttributes_pageType | null; -} - -export interface PageTypeAttributeReorder { - pageTypeReorderAttributes: PageTypeAttributeReorder_pageTypeReorderAttributes | null; -} - -export interface PageTypeAttributeReorderVariables { - move: ReorderInput; - pageTypeId: string; -} diff --git a/src/pageTypes/types/PageTypeBulkDelete.ts b/src/pageTypes/types/PageTypeBulkDelete.ts deleted file mode 100644 index 361dc7a9d..000000000 --- a/src/pageTypes/types/PageTypeBulkDelete.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PageErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: PageTypeBulkDelete -// ==================================================== - -export interface PageTypeBulkDelete_pageTypeBulkDelete_errors { - __typename: "PageError"; - code: PageErrorCode; - field: string | null; - message: string | null; -} - -export interface PageTypeBulkDelete_pageTypeBulkDelete { - __typename: "PageTypeBulkDelete"; - errors: PageTypeBulkDelete_pageTypeBulkDelete_errors[]; -} - -export interface PageTypeBulkDelete { - pageTypeBulkDelete: PageTypeBulkDelete_pageTypeBulkDelete | null; -} - -export interface PageTypeBulkDeleteVariables { - ids: string[]; -} diff --git a/src/pageTypes/types/PageTypeCreate.ts b/src/pageTypes/types/PageTypeCreate.ts deleted file mode 100644 index 3b60d7e1f..000000000 --- a/src/pageTypes/types/PageTypeCreate.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PageTypeCreateInput, PageErrorCode, AttributeTypeEnum, MeasurementUnitsEnum, AttributeInputTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: PageTypeCreate -// ==================================================== - -export interface PageTypeCreate_pageTypeCreate_errors { - __typename: "PageError"; - code: PageErrorCode; - field: string | null; - message: string | null; -} - -export interface PageTypeCreate_pageTypeCreate_pageType_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface PageTypeCreate_pageTypeCreate_pageType_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface PageTypeCreate_pageTypeCreate_pageType_attributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface PageTypeCreate_pageTypeCreate_pageType { - __typename: "PageType"; - id: string; - name: string; - metadata: (PageTypeCreate_pageTypeCreate_pageType_metadata | null)[]; - privateMetadata: (PageTypeCreate_pageTypeCreate_pageType_privateMetadata | null)[]; - attributes: (PageTypeCreate_pageTypeCreate_pageType_attributes | null)[] | null; -} - -export interface PageTypeCreate_pageTypeCreate { - __typename: "PageTypeCreate"; - errors: PageTypeCreate_pageTypeCreate_errors[]; - pageType: PageTypeCreate_pageTypeCreate_pageType | null; -} - -export interface PageTypeCreate { - pageTypeCreate: PageTypeCreate_pageTypeCreate | null; -} - -export interface PageTypeCreateVariables { - input: PageTypeCreateInput; -} diff --git a/src/pageTypes/types/PageTypeDelete.ts b/src/pageTypes/types/PageTypeDelete.ts deleted file mode 100644 index ce1f071e1..000000000 --- a/src/pageTypes/types/PageTypeDelete.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PageErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: PageTypeDelete -// ==================================================== - -export interface PageTypeDelete_pageTypeDelete_errors { - __typename: "PageError"; - code: PageErrorCode; - field: string | null; - message: string | null; -} - -export interface PageTypeDelete_pageTypeDelete_pageType { - __typename: "PageType"; - id: string; -} - -export interface PageTypeDelete_pageTypeDelete { - __typename: "PageTypeDelete"; - errors: PageTypeDelete_pageTypeDelete_errors[]; - pageType: PageTypeDelete_pageTypeDelete_pageType | null; -} - -export interface PageTypeDelete { - pageTypeDelete: PageTypeDelete_pageTypeDelete | null; -} - -export interface PageTypeDeleteVariables { - id: string; -} diff --git a/src/pageTypes/types/PageTypeDetails.ts b/src/pageTypes/types/PageTypeDetails.ts deleted file mode 100644 index 87f9e4ed0..000000000 --- a/src/pageTypes/types/PageTypeDetails.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeTypeEnum, MeasurementUnitsEnum, AttributeInputTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: PageTypeDetails -// ==================================================== - -export interface PageTypeDetails_pageType_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface PageTypeDetails_pageType_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface PageTypeDetails_pageType_attributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface PageTypeDetails_pageType { - __typename: "PageType"; - id: string; - name: string; - metadata: (PageTypeDetails_pageType_metadata | null)[]; - privateMetadata: (PageTypeDetails_pageType_privateMetadata | null)[]; - attributes: (PageTypeDetails_pageType_attributes | null)[] | null; - hasPages: boolean | null; -} - -export interface PageTypeDetails { - pageType: PageTypeDetails_pageType | null; -} - -export interface PageTypeDetailsVariables { - id: string; -} diff --git a/src/pageTypes/types/PageTypeList.ts b/src/pageTypes/types/PageTypeList.ts deleted file mode 100644 index 7d19b1854..000000000 --- a/src/pageTypes/types/PageTypeList.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PageTypeFilterInput, PageTypeSortingInput } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: PageTypeList -// ==================================================== - -export interface PageTypeList_pageTypes_edges_node { - __typename: "PageType"; - id: string; - name: string; - hasPages: boolean | null; -} - -export interface PageTypeList_pageTypes_edges { - __typename: "PageTypeCountableEdge"; - node: PageTypeList_pageTypes_edges_node; -} - -export interface PageTypeList_pageTypes_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface PageTypeList_pageTypes { - __typename: "PageTypeCountableConnection"; - edges: PageTypeList_pageTypes_edges[]; - pageInfo: PageTypeList_pageTypes_pageInfo; -} - -export interface PageTypeList { - pageTypes: PageTypeList_pageTypes | null; -} - -export interface PageTypeListVariables { - after?: string | null; - before?: string | null; - first?: number | null; - last?: number | null; - filter?: PageTypeFilterInput | null; - sort?: PageTypeSortingInput | null; -} diff --git a/src/pageTypes/types/PageTypeUpdate.ts b/src/pageTypes/types/PageTypeUpdate.ts deleted file mode 100644 index 321ecdd88..000000000 --- a/src/pageTypes/types/PageTypeUpdate.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PageTypeUpdateInput, PageErrorCode, AttributeTypeEnum, MeasurementUnitsEnum, AttributeInputTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: PageTypeUpdate -// ==================================================== - -export interface PageTypeUpdate_pageTypeUpdate_errors { - __typename: "PageError"; - code: PageErrorCode; - field: string | null; - message: string | null; -} - -export interface PageTypeUpdate_pageTypeUpdate_pageType_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface PageTypeUpdate_pageTypeUpdate_pageType_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface PageTypeUpdate_pageTypeUpdate_pageType_attributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface PageTypeUpdate_pageTypeUpdate_pageType { - __typename: "PageType"; - id: string; - name: string; - metadata: (PageTypeUpdate_pageTypeUpdate_pageType_metadata | null)[]; - privateMetadata: (PageTypeUpdate_pageTypeUpdate_pageType_privateMetadata | null)[]; - attributes: (PageTypeUpdate_pageTypeUpdate_pageType_attributes | null)[] | null; -} - -export interface PageTypeUpdate_pageTypeUpdate { - __typename: "PageTypeUpdate"; - errors: PageTypeUpdate_pageTypeUpdate_errors[]; - pageType: PageTypeUpdate_pageTypeUpdate_pageType | null; -} - -export interface PageTypeUpdate { - pageTypeUpdate: PageTypeUpdate_pageTypeUpdate | null; -} - -export interface PageTypeUpdateVariables { - id: string; - input: PageTypeUpdateInput; -} diff --git a/src/pageTypes/types/UnassignPageAttribute.ts b/src/pageTypes/types/UnassignPageAttribute.ts deleted file mode 100644 index 01d4a2c4d..000000000 --- a/src/pageTypes/types/UnassignPageAttribute.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PageErrorCode, AttributeTypeEnum, MeasurementUnitsEnum, AttributeInputTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: UnassignPageAttribute -// ==================================================== - -export interface UnassignPageAttribute_pageAttributeUnassign_errors { - __typename: "PageError"; - code: PageErrorCode; - field: string | null; - message: string | null; -} - -export interface UnassignPageAttribute_pageAttributeUnassign_pageType_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface UnassignPageAttribute_pageAttributeUnassign_pageType_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface UnassignPageAttribute_pageAttributeUnassign_pageType_attributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface UnassignPageAttribute_pageAttributeUnassign_pageType { - __typename: "PageType"; - id: string; - name: string; - metadata: (UnassignPageAttribute_pageAttributeUnassign_pageType_metadata | null)[]; - privateMetadata: (UnassignPageAttribute_pageAttributeUnassign_pageType_privateMetadata | null)[]; - attributes: (UnassignPageAttribute_pageAttributeUnassign_pageType_attributes | null)[] | null; -} - -export interface UnassignPageAttribute_pageAttributeUnassign { - __typename: "PageAttributeUnassign"; - errors: UnassignPageAttribute_pageAttributeUnassign_errors[]; - pageType: UnassignPageAttribute_pageAttributeUnassign_pageType | null; -} - -export interface UnassignPageAttribute { - pageAttributeUnassign: UnassignPageAttribute_pageAttributeUnassign | null; -} - -export interface UnassignPageAttributeVariables { - id: string; - ids: string[]; -} diff --git a/src/pageTypes/views/PageTypeCreate.tsx b/src/pageTypes/views/PageTypeCreate.tsx index 9827668f4..8ceb51df4 100644 --- a/src/pageTypes/views/PageTypeCreate.tsx +++ b/src/pageTypes/views/PageTypeCreate.tsx @@ -1,31 +1,30 @@ import { WindowTitle } from "@saleor/components/WindowTitle"; +import { + usePageTypeCreateMutation, + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { getMutationErrors } from "@saleor/misc"; import createMetadataCreateHandler from "@saleor/utils/handlers/metadataCreateHandler"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; import React from "react"; import { useIntl } from "react-intl"; import PageTypeCreatePage, { PageTypeForm } from "../components/PageTypeCreatePage"; -import { usePageTypeCreateMutation } from "../mutations"; -import { PageTypeCreate as PageTypeCreateMutation } from "../types/PageTypeCreate"; import { pageTypeListUrl, pageTypeUrl } from "../urls"; export const PageTypeCreate: React.FC = () => { const navigate = useNavigator(); const notify = useNotifier(); const intl = useIntl(); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); const [createPageType, createPageTypeOpts] = usePageTypeCreateMutation({ - onCompleted: (updateData: PageTypeCreateMutation) => { + onCompleted: updateData => { if (updateData.pageTypeCreate.errors.length === 0) { notify({ status: "success", diff --git a/src/pageTypes/views/PageTypeDetails.tsx b/src/pageTypes/views/PageTypeDetails.tsx index 57515717d..e65fbb1c8 100644 --- a/src/pageTypes/views/PageTypeDetails.tsx +++ b/src/pageTypes/views/PageTypeDetails.tsx @@ -6,36 +6,34 @@ import NotFoundPage from "@saleor/components/NotFoundPage"; import TypeDeleteWarningDialog from "@saleor/components/TypeDeleteWarningDialog"; import { WindowTitle } from "@saleor/components/WindowTitle"; import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; +import { + useAssignPageAttributeMutation, + usePageTypeAttributeReorderMutation, + usePageTypeDeleteMutation, + usePageTypeDetailsQuery, + usePageTypeUpdateMutation, + useUnassignPageAttributeMutation, + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation +} from "@saleor/graphql"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages } from "@saleor/intl"; import { Button } from "@saleor/macaw-ui"; import { getStringOrPlaceholder } from "@saleor/misc"; -import { - useAssignPageAttributeMutation, - usePageTypeAttributeReorderMutation, - usePageTypeDeleteMutation, - usePageTypeUpdateMutation, - useUnassignPageAttributeMutation -} from "@saleor/pageTypes/mutations"; import { ReorderEvent } from "@saleor/types"; import getPageErrorMessage from "@saleor/utils/errors/page"; import createMetadataUpdateHandler from "@saleor/utils/handlers/metadataUpdateHandler"; import { mapEdgesToItems } from "@saleor/utils/maps"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; +import useAvailablePageAttributeSearch from "../../searches/useAvailablePageAttributesSearch"; import PageTypeDetailsPage, { PageTypeForm } from "../components/PageTypeDetailsPage"; -import useAvailablePageAttributeSearch from "../hooks/useAvailablePageAttributeSearch"; import usePageTypeDelete from "../hooks/usePageTypeDelete"; -import { usePageTypeDetailsQuery } from "../queries"; import { pageTypeListUrl, pageTypeUrl, PageTypeUrlQueryParams } from "../urls"; interface PageTypeDetailsProps { @@ -108,8 +106,13 @@ export const PageTypeDetails: React.FC = ({ }); const [reorderAttribute] = usePageTypeAttributeReorderMutation({}); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); + const pageTypeDeleteData = usePageTypeDelete({ + singleId: id, + params + }); + + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); const handleBack = () => navigate(pageTypeListUrl()); @@ -186,11 +189,6 @@ export const PageTypeDetails: React.FC = ({ const loading = updatePageTypeOpts.loading || dataLoading; - const pageTypeDeleteData = usePageTypeDelete({ - singleId: id, - params - }); - return ( <> diff --git a/src/pageTypes/views/PageTypeList/PageTypeList.tsx b/src/pageTypes/views/PageTypeList/PageTypeList.tsx index 745b703c5..00e93b75c 100644 --- a/src/pageTypes/views/PageTypeList/PageTypeList.tsx +++ b/src/pageTypes/views/PageTypeList/PageTypeList.tsx @@ -3,6 +3,10 @@ import SaveFilterTabDialog, { SaveFilterTabDialogFormData } from "@saleor/components/SaveFilterTabDialog"; import TypeDeleteWarningDialog from "@saleor/components/TypeDeleteWarningDialog"; +import { + usePageTypeBulkDeleteMutation, + usePageTypeListQuery +} from "@saleor/graphql"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useListSettings from "@saleor/hooks/useListSettings"; import useNavigator from "@saleor/hooks/useNavigator"; @@ -15,7 +19,6 @@ import { commonMessages } from "@saleor/intl"; import { DeleteIcon, IconButton } from "@saleor/macaw-ui"; import { getStringOrPlaceholder } from "@saleor/misc"; import usePageTypeDelete from "@saleor/pageTypes/hooks/usePageTypeDelete"; -import { usePageTypeBulkDeleteMutation } from "@saleor/pageTypes/mutations"; import { ListViews } from "@saleor/types"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createSortHandler from "@saleor/utils/handlers/sortHandler"; @@ -26,7 +29,6 @@ import { useIntl } from "react-intl"; import { configurationMenuUrl } from "../../../configuration"; import PageTypeListPage from "../../components/PageTypeListPage"; -import { usePageTypeListQuery } from "../../queries"; import { pageTypeAddUrl, pageTypeListUrl, diff --git a/src/pageTypes/views/PageTypeList/filters.ts b/src/pageTypes/views/PageTypeList/filters.ts index 746ae0795..da4332915 100644 --- a/src/pageTypes/views/PageTypeList/filters.ts +++ b/src/pageTypes/views/PageTypeList/filters.ts @@ -1,4 +1,4 @@ -import { PageTypeFilterInput } from "@saleor/types/globalTypes"; +import { PageTypeFilterInput } from "@saleor/graphql"; import { createFilterTabUtils, diff --git a/src/pageTypes/views/PageTypeList/sort.ts b/src/pageTypes/views/PageTypeList/sort.ts index e7599295a..7c47615b6 100644 --- a/src/pageTypes/views/PageTypeList/sort.ts +++ b/src/pageTypes/views/PageTypeList/sort.ts @@ -1,5 +1,5 @@ +import { PageTypeSortField } from "@saleor/graphql"; import { PageTypeListUrlSortField } from "@saleor/pageTypes/urls"; -import { PageTypeSortField } from "@saleor/types/globalTypes"; import { createGetSortQueryVariables } from "@saleor/utils/sort"; export function getSortQueryField( diff --git a/src/pages/components/PageDetailsPage/PageDetailsPage.tsx b/src/pages/components/PageDetailsPage/PageDetailsPage.tsx index 3e021992a..9da4e2b88 100644 --- a/src/pages/components/PageDetailsPage/PageDetailsPage.tsx +++ b/src/pages/components/PageDetailsPage/PageDetailsPage.tsx @@ -12,23 +12,23 @@ import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; import SeoForm from "@saleor/components/SeoForm"; import VisibilityCard from "@saleor/components/VisibilityCard"; -import { PageErrorWithAttributesFragment } from "@saleor/fragments/types/PageErrorWithAttributesFragment"; +import { + PageDetailsFragment, + PageErrorWithAttributesFragment, + SearchAttributeValuesQuery, + SearchPagesQuery, + SearchPageTypesQuery, + SearchProductsQuery +} from "@saleor/graphql"; import useDateLocalize from "@saleor/hooks/useDateLocalize"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; -import { PageType_pageType } from "@saleor/pages/types/PageType"; -import { SearchAttributeValues_attribute_choices_edges_node } from "@saleor/searches/types/SearchAttributeValues"; -import { SearchPages_search_edges_node } from "@saleor/searches/types/SearchPages"; -import { SearchPageTypes_search_edges_node } from "@saleor/searches/types/SearchPageTypes"; -import { SearchProducts_search_edges_node } from "@saleor/searches/types/SearchProducts"; -import { FetchMoreProps } from "@saleor/types"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; +import { FetchMoreProps, RelayToFlat } from "@saleor/types"; import { mapNodeToChoice } from "@saleor/utils/maps"; import React from "react"; import { useIntl } from "react-intl"; -import { PageDetails_page } from "../../types/PageDetails"; import PageInfo from "../PageInfo"; import PageOrganizeContent from "../PageOrganizeContent"; import PageForm, { PageData, PageUpdateHandlers } from "./form"; @@ -36,14 +36,16 @@ import PageForm, { PageData, PageUpdateHandlers } from "./form"; export interface PageDetailsPageProps { loading: boolean; errors: PageErrorWithAttributesFragment[]; - page: PageDetails_page; - pageTypes?: SearchPageTypes_search_edges_node[]; - referencePages?: SearchPages_search_edges_node[]; - referenceProducts?: SearchProducts_search_edges_node[]; + page: PageDetailsFragment; + pageTypes?: RelayToFlat; + referencePages?: RelayToFlat; + referenceProducts?: RelayToFlat; allowEmptySlug?: boolean; saveButtonBarState: ConfirmButtonTransitionState; - selectedPageType?: PageType_pageType; - attributeValues: SearchAttributeValues_attribute_choices_edges_node[]; + selectedPageType?: PageDetailsFragment["pageType"]; + attributeValues: RelayToFlat< + SearchAttributeValuesQuery["attribute"]["choices"] + >; onBack: () => void; onRemove: () => void; onSubmit: (data: PageData) => SubmitPromise; diff --git a/src/pages/components/PageDetailsPage/form.tsx b/src/pages/components/PageDetailsPage/form.tsx index affa0b8bf..419f8a5cb 100644 --- a/src/pages/components/PageDetailsPage/form.tsx +++ b/src/pages/components/PageDetailsPage/form.tsx @@ -13,6 +13,12 @@ import { AttributeInput } from "@saleor/components/Attributes"; import { useExitFormDialog } from "@saleor/components/Form/useExitFormDialog"; import { MetadataFormData } from "@saleor/components/Metadata"; import { RichTextEditorChange } from "@saleor/components/RichTextEditor"; +import { + PageDetailsFragment, + SearchPagesQuery, + SearchPageTypesQuery, + SearchProductsQuery +} from "@saleor/graphql"; import useForm, { CommonUseFormResultWithHandlers, FormChange, @@ -23,20 +29,12 @@ import useFormset, { FormsetData } from "@saleor/hooks/useFormset"; import useHandleFormSubmit from "@saleor/hooks/useHandleFormSubmit"; -import { - PageDetails_page, - PageDetails_page_pageType -} from "@saleor/pages/types/PageDetails"; -import { PageType_pageType } from "@saleor/pages/types/PageType"; import { getAttributeInputFromPage, getAttributeInputFromPageType } from "@saleor/pages/utils/data"; import { createPageTypeSelectHandler } from "@saleor/pages/utils/handlers"; -import { SearchPages_search_edges_node } from "@saleor/searches/types/SearchPages"; -import { SearchPageTypes_search_edges_node } from "@saleor/searches/types/SearchPageTypes"; -import { SearchProducts_search_edges_node } from "@saleor/searches/types/SearchProducts"; -import { FetchMoreProps, ReorderEvent } from "@saleor/types"; +import { FetchMoreProps, RelayToFlat, ReorderEvent } from "@saleor/types"; import getPublicationData from "@saleor/utils/data/getPublicationData"; import { mapMetadataItemToInput } from "@saleor/utils/maps"; import getMetadata from "@saleor/utils/metadata/getMetadata"; @@ -51,7 +49,7 @@ export interface PageFormData extends MetadataFormData { seoTitle: string; slug: string; title: string; - pageType: PageType_pageType | PageDetails_page_pageType; + pageType: PageDetailsFragment["pageType"]; } export interface PageData extends PageFormData { attributes: AttributeInput[]; @@ -83,25 +81,25 @@ export interface UsePageUpdateFormResult } export interface UsePageFormOpts { - pageTypes?: SearchPageTypes_search_edges_node[]; - referencePages: SearchPages_search_edges_node[]; - referenceProducts: SearchProducts_search_edges_node[]; + pageTypes?: RelayToFlat; + referencePages: RelayToFlat; + referenceProducts: RelayToFlat; fetchReferencePages?: (data: string) => void; fetchMoreReferencePages?: FetchMoreProps; fetchReferenceProducts?: (data: string) => void; fetchMoreReferenceProducts?: FetchMoreProps; assignReferencesAttributeId?: string; - selectedPageType?: PageType_pageType; + selectedPageType?: PageDetailsFragment["pageType"]; onSelectPageType: (pageTypeId: string) => void; } export interface PageFormProps extends UsePageFormOpts { children: (props: UsePageUpdateFormResult) => React.ReactNode; - page: PageDetails_page; + page: PageDetailsFragment; onSubmit: (data: PageData) => SubmitPromise; } -const getInitialFormData = (page?: PageDetails_page): PageFormData => ({ +const getInitialFormData = (page?: PageDetailsFragment): PageFormData => ({ isPublished: page?.isPublished, metadata: page?.metadata?.map(mapMetadataItemToInput) || [], pageType: null, @@ -114,7 +112,7 @@ const getInitialFormData = (page?: PageDetails_page): PageFormData => ({ }); function usePageForm( - page: PageDetails_page, + page: PageDetailsFragment, onSubmit: (data: PageData) => SubmitPromise, opts: UsePageFormOpts ): UsePageUpdateFormResult { diff --git a/src/pages/components/PageInfo/PageInfo.tsx b/src/pages/components/PageInfo/PageInfo.tsx index bc3b2fb21..1bb2855fb 100644 --- a/src/pages/components/PageInfo/PageInfo.tsx +++ b/src/pages/components/PageInfo/PageInfo.tsx @@ -4,7 +4,7 @@ import FormSpacer from "@saleor/components/FormSpacer"; import RichTextEditor, { RichTextEditorChange } from "@saleor/components/RichTextEditor"; -import { PageErrorFragment } from "@saleor/fragments/types/PageErrorFragment"; +import { PageErrorFragment } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { makeStyles } from "@saleor/macaw-ui"; import { getFormErrors } from "@saleor/utils/errors"; diff --git a/src/pages/components/PageList/PageList.tsx b/src/pages/components/PageList/PageList.tsx index b4da48711..0691a5a15 100644 --- a/src/pages/components/PageList/PageList.tsx +++ b/src/pages/components/PageList/PageList.tsx @@ -11,6 +11,7 @@ import Skeleton from "@saleor/components/Skeleton"; import TableCellHeader from "@saleor/components/TableCellHeader"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; +import { PageFragment } from "@saleor/graphql"; import { makeStyles, Pill } from "@saleor/macaw-ui"; import { maybe, renderCollection } from "@saleor/misc"; import { PageListUrlSortField } from "@saleor/pages/urls"; @@ -19,13 +20,11 @@ import { getArrowDirection } from "@saleor/utils/sort"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { PageList_pages_edges_node } from "../../types/PageList"; - export interface PageListProps extends ListProps, ListActions, SortPage { - pages: PageList_pages_edges_node[]; + pages: PageFragment[]; } const useStyles = makeStyles( diff --git a/src/pages/components/PageListPage/PageListPage.tsx b/src/pages/components/PageListPage/PageListPage.tsx index 659865898..c231876f1 100644 --- a/src/pages/components/PageListPage/PageListPage.tsx +++ b/src/pages/components/PageListPage/PageListPage.tsx @@ -1,5 +1,6 @@ import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; +import { PageFragment } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { Button } from "@saleor/macaw-ui"; import { PageListUrlSortField } from "@saleor/pages/urls"; @@ -7,14 +8,13 @@ import { ListActions, PageListProps, SortPage } from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { PageList_pages_edges_node } from "../../types/PageList"; import PageList from "../PageList"; export interface PageListPageProps extends PageListProps, ListActions, SortPage { - pages: PageList_pages_edges_node[]; + pages: PageFragment[]; } const PageListPage: React.FC = ({ onAdd, ...listProps }) => { diff --git a/src/pages/components/PageOrganizeContent/PageOrganizeContent.tsx b/src/pages/components/PageOrganizeContent/PageOrganizeContent.tsx index 44323b508..cdf108a6f 100644 --- a/src/pages/components/PageOrganizeContent/PageOrganizeContent.tsx +++ b/src/pages/components/PageOrganizeContent/PageOrganizeContent.tsx @@ -3,8 +3,7 @@ import CardTitle from "@saleor/components/CardTitle"; import SingleAutocompleteSelectField, { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; -import { PageErrorFragment } from "@saleor/fragments/types/PageErrorFragment"; -import { PageTypeFragment } from "@saleor/fragments/types/PageTypeFragment"; +import { PageDetailsFragment, PageErrorFragment } from "@saleor/graphql"; import { FormChange } from "@saleor/hooks/useForm"; import { makeStyles } from "@saleor/macaw-ui"; import { FetchMoreProps } from "@saleor/types"; @@ -18,7 +17,7 @@ import { PageFormData } from "../PageDetailsPage/form"; export interface PageOrganizeContentProps { canChangeType: boolean; data: PageFormData; - pageType?: PageTypeFragment; + pageType?: PageDetailsFragment["pageType"]; pageTypeInputDisplayValue?: string; errors: PageErrorFragment[]; disabled: boolean; diff --git a/src/pages/fixtures.ts b/src/pages/fixtures.ts index b480fc56b..a98dfdc2a 100644 --- a/src/pages/fixtures.ts +++ b/src/pages/fixtures.ts @@ -1,13 +1,14 @@ -/* eslint-disable sort-keys */ -import { AttributeInputTypeEnum } from "@saleor/types/globalTypes"; +import { + AttributeInputTypeEnum, + PageDetailsFragment, + PageFragment +} from "@saleor/graphql"; import * as richTextEditorFixtures from "../components/RichTextEditor/fixtures.json"; -import { PageDetails_page } from "./types/PageDetails"; -import { PageList_pages_edges_node } from "./types/PageList"; const content = richTextEditorFixtures.richTextEditor; -export const pageList: PageList_pages_edges_node[] = [ +export const pageList: PageFragment[] = [ { __typename: "Page", id: "Jzx123sEt==", @@ -37,7 +38,7 @@ export const pageList: PageList_pages_edges_node[] = [ title: "About" } ]; -export const page: PageDetails_page = { +export const page: PageDetailsFragment = { __typename: "Page", attributes: [ { diff --git a/src/pages/mutations.ts b/src/pages/mutations.ts index 1d22cd581..999a2599e 100644 --- a/src/pages/mutations.ts +++ b/src/pages/mutations.ts @@ -1,31 +1,10 @@ import { gql } from "@apollo/client"; -import { - pageBulkRemoveErrorFragment, - pageErrorFragment, - pageErrorWithAttributesFragment -} from "@saleor/fragments/errors"; -import { pageDetailsFragment } from "@saleor/fragments/pages"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { TypedMutation } from "../mutations"; -import { - PageBulkPublish, - PageBulkPublishVariables -} from "./types/PageBulkPublish"; -import { - PageBulkRemove, - PageBulkRemoveVariables -} from "./types/PageBulkRemove"; -import { PageCreate, PageCreateVariables } from "./types/PageCreate"; -import { PageRemove, PageRemoveVariables } from "./types/PageRemove"; -import { PageUpdate, PageUpdateVariables } from "./types/PageUpdate"; - -const pageCreate = gql` - ${pageErrorWithAttributesFragment} +export const pageCreate = gql` mutation PageCreate($input: PageCreateInput!) { pageCreate(input: $input) { errors { - ...PageErrorWithAttributesFragment + ...PageErrorWithAttributes } page { id @@ -33,13 +12,8 @@ const pageCreate = gql` } } `; -export const TypedPageCreate = TypedMutation( - pageCreate -); -const pageUpdate = gql` - ${pageDetailsFragment} - ${pageErrorWithAttributesFragment} +export const pageUpdate = gql` mutation PageUpdate( $id: ID! $input: PageInput! @@ -50,35 +24,26 @@ const pageUpdate = gql` ) { pageUpdate(id: $id, input: $input) { errors { - ...PageErrorWithAttributesFragment + ...PageErrorWithAttributes } page { - ...PageDetailsFragment + ...PageDetails } } } `; -export const usePageUpdateMutation = makeMutation< - PageUpdate, - PageUpdateVariables ->(pageUpdate); -const pageRemove = gql` - ${pageErrorFragment} +export const pageRemove = gql` mutation PageRemove($id: ID!) { pageDelete(id: $id) { errors { - ...PageErrorFragment + ...PageError } } } `; -export const usePageRemoveMutation = makeMutation< - PageRemove, - PageRemoveVariables ->(pageRemove); -const pageBulkPublish = gql` +export const pageBulkPublish = gql` mutation PageBulkPublish($ids: [ID]!, $isPublished: Boolean!) { pageBulkPublish(ids: $ids, isPublished: $isPublished) { errors { @@ -87,13 +52,8 @@ const pageBulkPublish = gql` } } `; -export const TypedPageBulkPublish = TypedMutation< - PageBulkPublish, - PageBulkPublishVariables ->(pageBulkPublish); -const pageBulkRemove = gql` - ${pageBulkRemoveErrorFragment} +export const pageBulkRemove = gql` mutation PageBulkRemove($ids: [ID]!) { pageBulkDelete(ids: $ids) { errors { @@ -102,7 +62,3 @@ const pageBulkRemove = gql` } } `; -export const TypedPageBulkRemove = TypedMutation< - PageBulkRemove, - PageBulkRemoveVariables ->(pageBulkRemove); diff --git a/src/pages/queries.ts b/src/pages/queries.ts index ee2a154ba..752de57fd 100644 --- a/src/pages/queries.ts +++ b/src/pages/queries.ts @@ -1,15 +1,6 @@ import { gql } from "@apollo/client"; -import { attributeValueListFragment } from "@saleor/fragments/attributes"; -import { pageDetailsFragment, pageFragment } from "@saleor/fragments/pages"; -import makeQuery from "@saleor/hooks/makeQuery"; -import { PageCount, PageCountVariables } from "./types/PageCount"; -import { PageDetails, PageDetailsVariables } from "./types/PageDetails"; -import { PageList, PageListVariables } from "./types/PageList"; -import { PageType, PageTypeVariables } from "./types/PageType"; - -const pageList = gql` - ${pageFragment} +export const pageList = gql` query PageList( $first: Int $after: String @@ -26,7 +17,7 @@ const pageList = gql` ) { edges { node { - ...PageFragment + ...Page } } pageInfo { @@ -38,12 +29,8 @@ const pageList = gql` } } `; -export const usePageListQuery = makeQuery( - pageList -); -const pageDetails = gql` - ${pageDetailsFragment} +export const pageDetails = gql` query PageDetails( $id: ID! $firstValues: Int @@ -52,16 +39,12 @@ const pageDetails = gql` $beforeValues: String ) { page(id: $id) { - ...PageDetailsFragment + ...PageDetails } } `; -export const usePageDetailsQuery = makeQuery( - pageDetails -); -const pageTypeQuery = gql` - ${attributeValueListFragment} +export const pageTypeQuery = gql` query PageType( $id: ID! $firstValues: Int @@ -85,24 +68,17 @@ const pageTypeQuery = gql` last: $lastValues before: $beforeValues ) { - ...AttributeValueListFragment + ...AttributeValueList } } } } `; -export const usePageTypeQuery = makeQuery( - pageTypeQuery -); -const pageCountQuery = gql` +export const pageCountQuery = gql` query PageCount($filter: PageFilterInput) { pages(filter: $filter) { totalCount } } `; - -export const usePageCountQuery = makeQuery( - pageCountQuery -); diff --git a/src/pages/types/PageBulkPublish.ts b/src/pages/types/PageBulkPublish.ts deleted file mode 100644 index aa61df38d..000000000 --- a/src/pages/types/PageBulkPublish.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PageErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: PageBulkPublish -// ==================================================== - -export interface PageBulkPublish_pageBulkPublish_errors { - __typename: "PageError"; - code: PageErrorCode; - field: string | null; - message: string | null; -} - -export interface PageBulkPublish_pageBulkPublish { - __typename: "PageBulkPublish"; - errors: PageBulkPublish_pageBulkPublish_errors[]; -} - -export interface PageBulkPublish { - pageBulkPublish: PageBulkPublish_pageBulkPublish | null; -} - -export interface PageBulkPublishVariables { - ids: (string | null)[]; - isPublished: boolean; -} diff --git a/src/pages/types/PageBulkRemove.ts b/src/pages/types/PageBulkRemove.ts deleted file mode 100644 index 615ee8c51..000000000 --- a/src/pages/types/PageBulkRemove.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PageErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: PageBulkRemove -// ==================================================== - -export interface PageBulkRemove_pageBulkDelete_errors { - __typename: "PageError"; - code: PageErrorCode; - field: string | null; - message: string | null; -} - -export interface PageBulkRemove_pageBulkDelete { - __typename: "PageBulkDelete"; - errors: PageBulkRemove_pageBulkDelete_errors[]; -} - -export interface PageBulkRemove { - pageBulkDelete: PageBulkRemove_pageBulkDelete | null; -} - -export interface PageBulkRemoveVariables { - ids: (string | null)[]; -} diff --git a/src/pages/types/PageCount.ts b/src/pages/types/PageCount.ts deleted file mode 100644 index 19bb4d4e3..000000000 --- a/src/pages/types/PageCount.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PageFilterInput } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: PageCount -// ==================================================== - -export interface PageCount_pages { - __typename: "PageCountableConnection"; - totalCount: number | null; -} - -export interface PageCount { - pages: PageCount_pages | null; -} - -export interface PageCountVariables { - filter?: PageFilterInput | null; -} diff --git a/src/pages/types/PageCreate.ts b/src/pages/types/PageCreate.ts deleted file mode 100644 index ada6749e6..000000000 --- a/src/pages/types/PageCreate.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PageCreateInput, PageErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: PageCreate -// ==================================================== - -export interface PageCreate_pageCreate_errors { - __typename: "PageError"; - code: PageErrorCode; - field: string | null; - message: string | null; - attributes: string[] | null; -} - -export interface PageCreate_pageCreate_page { - __typename: "Page"; - id: string; -} - -export interface PageCreate_pageCreate { - __typename: "PageCreate"; - errors: PageCreate_pageCreate_errors[]; - page: PageCreate_pageCreate_page | null; -} - -export interface PageCreate { - pageCreate: PageCreate_pageCreate | null; -} - -export interface PageCreateVariables { - input: PageCreateInput; -} diff --git a/src/pages/types/PageDetails.ts b/src/pages/types/PageDetails.ts deleted file mode 100644 index 23c04afda..000000000 --- a/src/pages/types/PageDetails.ts +++ /dev/null @@ -1,185 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: PageDetails -// ==================================================== - -export interface PageDetails_page_attributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface PageDetails_page_attributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface PageDetails_page_attributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: PageDetails_page_attributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface PageDetails_page_attributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: PageDetails_page_attributes_attribute_choices_edges_node; -} - -export interface PageDetails_page_attributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: PageDetails_page_attributes_attribute_choices_pageInfo; - edges: PageDetails_page_attributes_attribute_choices_edges[]; -} - -export interface PageDetails_page_attributes_attribute { - __typename: "Attribute"; - id: string; - slug: string | null; - name: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: PageDetails_page_attributes_attribute_choices | null; -} - -export interface PageDetails_page_attributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface PageDetails_page_attributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: PageDetails_page_attributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface PageDetails_page_attributes { - __typename: "SelectedAttribute"; - attribute: PageDetails_page_attributes_attribute; - values: (PageDetails_page_attributes_values | null)[]; -} - -export interface PageDetails_page_pageType_attributes_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface PageDetails_page_pageType_attributes_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface PageDetails_page_pageType_attributes_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: PageDetails_page_pageType_attributes_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface PageDetails_page_pageType_attributes_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: PageDetails_page_pageType_attributes_choices_edges_node; -} - -export interface PageDetails_page_pageType_attributes_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: PageDetails_page_pageType_attributes_choices_pageInfo; - edges: PageDetails_page_pageType_attributes_choices_edges[]; -} - -export interface PageDetails_page_pageType_attributes { - __typename: "Attribute"; - id: string; - name: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - choices: PageDetails_page_pageType_attributes_choices | null; -} - -export interface PageDetails_page_pageType { - __typename: "PageType"; - id: string; - name: string; - attributes: (PageDetails_page_pageType_attributes | null)[] | null; -} - -export interface PageDetails_page_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface PageDetails_page_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface PageDetails_page { - __typename: "Page"; - id: string; - title: string; - slug: string; - isPublished: boolean; - attributes: PageDetails_page_attributes[]; - pageType: PageDetails_page_pageType; - metadata: (PageDetails_page_metadata | null)[]; - privateMetadata: (PageDetails_page_privateMetadata | null)[]; - content: any | null; - seoTitle: string | null; - seoDescription: string | null; - publicationDate: any | null; -} - -export interface PageDetails { - page: PageDetails_page | null; -} - -export interface PageDetailsVariables { - id: string; - firstValues?: number | null; - afterValues?: string | null; - lastValues?: number | null; - beforeValues?: string | null; -} diff --git a/src/pages/types/PageList.ts b/src/pages/types/PageList.ts deleted file mode 100644 index bca225c00..000000000 --- a/src/pages/types/PageList.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PageSortingInput } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: PageList -// ==================================================== - -export interface PageList_pages_edges_node { - __typename: "Page"; - id: string; - title: string; - slug: string; - isPublished: boolean; -} - -export interface PageList_pages_edges { - __typename: "PageCountableEdge"; - node: PageList_pages_edges_node; -} - -export interface PageList_pages_pageInfo { - __typename: "PageInfo"; - hasPreviousPage: boolean; - hasNextPage: boolean; - startCursor: string | null; - endCursor: string | null; -} - -export interface PageList_pages { - __typename: "PageCountableConnection"; - edges: PageList_pages_edges[]; - pageInfo: PageList_pages_pageInfo; -} - -export interface PageList { - pages: PageList_pages | null; -} - -export interface PageListVariables { - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; - sort?: PageSortingInput | null; -} diff --git a/src/pages/types/PageRemove.ts b/src/pages/types/PageRemove.ts deleted file mode 100644 index 992faa56f..000000000 --- a/src/pages/types/PageRemove.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PageErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: PageRemove -// ==================================================== - -export interface PageRemove_pageDelete_errors { - __typename: "PageError"; - code: PageErrorCode; - field: string | null; - message: string | null; -} - -export interface PageRemove_pageDelete { - __typename: "PageDelete"; - errors: PageRemove_pageDelete_errors[]; -} - -export interface PageRemove { - pageDelete: PageRemove_pageDelete | null; -} - -export interface PageRemoveVariables { - id: string; -} diff --git a/src/pages/types/PageType.ts b/src/pages/types/PageType.ts deleted file mode 100644 index 414924ae7..000000000 --- a/src/pages/types/PageType.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum, AttributeEntityTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: PageType -// ==================================================== - -export interface PageType_pageType_attributes_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface PageType_pageType_attributes_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface PageType_pageType_attributes_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: PageType_pageType_attributes_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface PageType_pageType_attributes_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: PageType_pageType_attributes_choices_edges_node; -} - -export interface PageType_pageType_attributes_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: PageType_pageType_attributes_choices_pageInfo; - edges: PageType_pageType_attributes_choices_edges[]; -} - -export interface PageType_pageType_attributes { - __typename: "Attribute"; - id: string; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - slug: string | null; - name: string | null; - valueRequired: boolean; - choices: PageType_pageType_attributes_choices | null; -} - -export interface PageType_pageType { - __typename: "PageType"; - id: string; - name: string; - attributes: (PageType_pageType_attributes | null)[] | null; -} - -export interface PageType { - pageType: PageType_pageType | null; -} - -export interface PageTypeVariables { - id: string; - firstValues?: number | null; - afterValues?: string | null; - lastValues?: number | null; - beforeValues?: string | null; -} diff --git a/src/pages/types/PageUpdate.ts b/src/pages/types/PageUpdate.ts deleted file mode 100644 index 243ed46ac..000000000 --- a/src/pages/types/PageUpdate.ts +++ /dev/null @@ -1,200 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PageInput, PageErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: PageUpdate -// ==================================================== - -export interface PageUpdate_pageUpdate_errors { - __typename: "PageError"; - code: PageErrorCode; - field: string | null; - message: string | null; - attributes: string[] | null; -} - -export interface PageUpdate_pageUpdate_page_attributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface PageUpdate_pageUpdate_page_attributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface PageUpdate_pageUpdate_page_attributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: PageUpdate_pageUpdate_page_attributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface PageUpdate_pageUpdate_page_attributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: PageUpdate_pageUpdate_page_attributes_attribute_choices_edges_node; -} - -export interface PageUpdate_pageUpdate_page_attributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: PageUpdate_pageUpdate_page_attributes_attribute_choices_pageInfo; - edges: PageUpdate_pageUpdate_page_attributes_attribute_choices_edges[]; -} - -export interface PageUpdate_pageUpdate_page_attributes_attribute { - __typename: "Attribute"; - id: string; - slug: string | null; - name: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: PageUpdate_pageUpdate_page_attributes_attribute_choices | null; -} - -export interface PageUpdate_pageUpdate_page_attributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface PageUpdate_pageUpdate_page_attributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: PageUpdate_pageUpdate_page_attributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface PageUpdate_pageUpdate_page_attributes { - __typename: "SelectedAttribute"; - attribute: PageUpdate_pageUpdate_page_attributes_attribute; - values: (PageUpdate_pageUpdate_page_attributes_values | null)[]; -} - -export interface PageUpdate_pageUpdate_page_pageType_attributes_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface PageUpdate_pageUpdate_page_pageType_attributes_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface PageUpdate_pageUpdate_page_pageType_attributes_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: PageUpdate_pageUpdate_page_pageType_attributes_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface PageUpdate_pageUpdate_page_pageType_attributes_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: PageUpdate_pageUpdate_page_pageType_attributes_choices_edges_node; -} - -export interface PageUpdate_pageUpdate_page_pageType_attributes_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: PageUpdate_pageUpdate_page_pageType_attributes_choices_pageInfo; - edges: PageUpdate_pageUpdate_page_pageType_attributes_choices_edges[]; -} - -export interface PageUpdate_pageUpdate_page_pageType_attributes { - __typename: "Attribute"; - id: string; - name: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - choices: PageUpdate_pageUpdate_page_pageType_attributes_choices | null; -} - -export interface PageUpdate_pageUpdate_page_pageType { - __typename: "PageType"; - id: string; - name: string; - attributes: (PageUpdate_pageUpdate_page_pageType_attributes | null)[] | null; -} - -export interface PageUpdate_pageUpdate_page_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface PageUpdate_pageUpdate_page_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface PageUpdate_pageUpdate_page { - __typename: "Page"; - id: string; - title: string; - slug: string; - isPublished: boolean; - attributes: PageUpdate_pageUpdate_page_attributes[]; - pageType: PageUpdate_pageUpdate_page_pageType; - metadata: (PageUpdate_pageUpdate_page_metadata | null)[]; - privateMetadata: (PageUpdate_pageUpdate_page_privateMetadata | null)[]; - content: any | null; - seoTitle: string | null; - seoDescription: string | null; - publicationDate: any | null; -} - -export interface PageUpdate_pageUpdate { - __typename: "PageUpdate"; - errors: PageUpdate_pageUpdate_errors[]; - page: PageUpdate_pageUpdate_page | null; -} - -export interface PageUpdate { - pageUpdate: PageUpdate_pageUpdate | null; -} - -export interface PageUpdateVariables { - id: string; - input: PageInput; - firstValues?: number | null; - afterValues?: string | null; - lastValues?: number | null; - beforeValues?: string | null; -} diff --git a/src/pages/utils/data.ts b/src/pages/utils/data.ts index 366c5d5d0..dfe462152 100644 --- a/src/pages/utils/data.ts +++ b/src/pages/utils/data.ts @@ -3,15 +3,11 @@ import { mergeChoicesWithValues } from "@saleor/attributes/utils/data"; import { AttributeInput } from "@saleor/components/Attributes"; +import { PageDetailsFragment } from "@saleor/graphql"; import { mapEdgesToItems } from "@saleor/utils/maps"; -import { - PageDetails_page, - PageDetails_page_pageType -} from "../types/PageDetails"; - export function getAttributeInputFromPage( - page: PageDetails_page + page: PageDetailsFragment ): AttributeInput[] { return page?.attributes.map(attribute => ({ data: { @@ -29,7 +25,7 @@ export function getAttributeInputFromPage( } export function getAttributeInputFromPageType( - pageType: PageDetails_page_pageType + pageType: PageDetailsFragment["pageType"] ): AttributeInput[] { return pageType?.attributes.map(attribute => ({ data: { diff --git a/src/pages/views/PageCreate.tsx b/src/pages/views/PageCreate.tsx index 32771cd17..7ec7a5f54 100644 --- a/src/pages/views/PageCreate.tsx +++ b/src/pages/views/PageCreate.tsx @@ -9,7 +9,13 @@ import { DEFAULT_INITIAL_SEARCH_DATA, VALUES_PAGINATE_BY } from "@saleor/config"; -import { useFileUploadMutation } from "@saleor/files/mutations"; +import { + useFileUploadMutation, + usePageCreateMutation, + usePageTypeQuery, + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { getMutationErrors } from "@saleor/misc"; @@ -19,19 +25,12 @@ import useProductSearch from "@saleor/searches/useProductSearch"; import useAttributeValueSearchHandler from "@saleor/utils/handlers/attributeValueSearchHandler"; import createMetadataCreateHandler from "@saleor/utils/handlers/metadataCreateHandler"; import { mapEdgesToItems } from "@saleor/utils/maps"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; import { getParsedDataForJsonStringField } from "@saleor/utils/richText/misc"; import React from "react"; import { useIntl } from "react-intl"; import PageDetailsPage from "../components/PageDetailsPage"; import { PageSubmitData } from "../components/PageDetailsPage/form"; -import { TypedPageCreate } from "../mutations"; -import { usePageTypeQuery } from "../queries"; -import { PageCreate as PageCreateData } from "../types/PageCreate"; import { pageCreateUrl, pageListUrl, @@ -48,8 +47,8 @@ export const PageCreate: React.FC = ({ params }) => { const navigate = useNavigator(); const notify = useNotifier(); const intl = useIntl(); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); const [selectedPageTypeId, setSelectedPageTypeId] = React.useState(); @@ -94,18 +93,64 @@ export const PageCreate: React.FC = ({ params }) => { const [uploadFile, uploadFileOpts] = useFileUploadMutation({}); - const handlePageCreate = (data: PageCreateData) => { - if (data.pageCreate.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage({ - defaultMessage: "Successfully created new page" - }) - }); - navigate(pageUrl(data.pageCreate.page.id)); + const [pageCreate, pageCreateOpts] = usePageCreateMutation({ + onCompleted: data => { + if (data.pageCreate.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage({ + defaultMessage: "Successfully created new page" + }) + }); + navigate(pageUrl(data.pageCreate.page.id)); + } } + }); + + const handleCreate = async (formData: PageSubmitData) => { + const uploadFilesResult = await handleUploadMultipleFiles( + formData.attributesWithNewFileValue, + variables => uploadFile({ variables }) + ); + + const updatedFileAttributes = getAttributesAfterFileAttributesUpdate( + formData.attributesWithNewFileValue, + uploadFilesResult + ); + + const result = await pageCreate({ + variables: { + input: { + attributes: prepareAttributesInput({ + attributes: formData.attributes, + updatedFileAttributes + }), + content: getParsedDataForJsonStringField(formData.content), + isPublished: formData.isPublished, + pageType: formData.pageType?.id, + publicationDate: formData.publicationDate, + seo: { + description: formData.seoDescription, + title: formData.seoTitle + }, + slug: formData.slug === "" ? null : formData.slug, + title: formData.title + } + } + }); + + return { + id: result.data.pageCreate.page?.id || null, + errors: getMutationErrors(result) + }; }; + const handleSubmit = createMetadataCreateHandler( + handleCreate, + updateMetadata, + updatePrivateMetadata + ); + const handleAssignAttributeReferenceClick = (attribute: AttributeInput) => navigate( pageCreateUrl({ @@ -137,99 +182,45 @@ export const PageCreate: React.FC = ({ params }) => { }; return ( - - {(pageCreate, pageCreateOpts) => { - const handleCreate = async (formData: PageSubmitData) => { - const uploadFilesResult = await handleUploadMultipleFiles( - formData.attributesWithNewFileValue, - variables => uploadFile({ variables }) - ); - - const updatedFileAttributes = getAttributesAfterFileAttributesUpdate( - formData.attributesWithNewFileValue, - uploadFilesResult - ); - - const result = await pageCreate({ - variables: { - input: { - attributes: prepareAttributesInput({ - attributes: formData.attributes, - updatedFileAttributes - }), - content: getParsedDataForJsonStringField(formData.content), - isPublished: formData.isPublished, - pageType: formData.pageType?.id, - publicationDate: formData.publicationDate, - seo: { - description: formData.seoDescription, - title: formData.seoTitle - }, - slug: formData.slug === "" ? null : formData.slug, - title: formData.title - } - } - }); - - return { - id: result.data.pageCreate.page?.id || null, - errors: getMutationErrors(result) - }; - }; - - const handleSubmit = createMetadataCreateHandler( - handleCreate, - updateMetadata, - updatePrivateMetadata - ); - - return ( - <> - - navigate(pageListUrl())} - onRemove={() => undefined} - onSubmit={handleSubmit} - fetchPageTypes={searchPageTypes} - fetchMorePageTypes={fetchMorePageTypes} - assignReferencesAttributeId={ - params.action === "assign-attribute-value" && params.id - } - onAssignReferencesClick={handleAssignAttributeReferenceClick} - referencePages={ - mapEdgesToItems(searchPagesOpts?.data?.search) || [] - } - referenceProducts={ - mapEdgesToItems(searchProductsOpts?.data?.search) || [] - } - fetchReferencePages={searchPages} - fetchMoreReferencePages={fetchMoreReferencePages} - fetchReferenceProducts={searchProducts} - fetchMoreReferenceProducts={fetchMoreReferenceProducts} - fetchAttributeValues={searchAttributeValues} - fetchMoreAttributeValues={fetchMoreAttributeValues} - onCloseDialog={() => navigate(pageCreateUrl())} - selectedPageType={selectedPageType?.pageType} - onSelectPageType={id => setSelectedPageTypeId(id)} - onAttributeSelectBlur={searchAttributeReset} - /> - - ); - }} - + <> + + navigate(pageListUrl())} + onRemove={() => undefined} + onSubmit={handleSubmit} + fetchPageTypes={searchPageTypes} + fetchMorePageTypes={fetchMorePageTypes} + assignReferencesAttributeId={ + params.action === "assign-attribute-value" && params.id + } + onAssignReferencesClick={handleAssignAttributeReferenceClick} + referencePages={mapEdgesToItems(searchPagesOpts?.data?.search) || []} + referenceProducts={ + mapEdgesToItems(searchProductsOpts?.data?.search) || [] + } + fetchReferencePages={searchPages} + fetchMoreReferencePages={fetchMoreReferencePages} + fetchReferenceProducts={searchProducts} + fetchMoreReferenceProducts={fetchMoreReferenceProducts} + fetchAttributeValues={searchAttributeValues} + fetchMoreAttributeValues={fetchMoreAttributeValues} + onCloseDialog={() => navigate(pageCreateUrl())} + selectedPageType={selectedPageType?.pageType} + onSelectPageType={id => setSelectedPageTypeId(id)} + onAttributeSelectBlur={searchAttributeReset} + /> + ); }; PageCreate.displayName = "PageCreate"; diff --git a/src/pages/views/PageDetails.tsx b/src/pages/views/PageDetails.tsx index 434805a2f..4d8742db6 100644 --- a/src/pages/views/PageDetails.tsx +++ b/src/pages/views/PageDetails.tsx @@ -1,5 +1,4 @@ import { DialogContentText } from "@material-ui/core"; -import { useAttributeValueDeleteMutation } from "@saleor/attributes/mutations"; import { getAttributesAfterFileAttributesUpdate, mergeAttributeValueDeleteErrors, @@ -17,10 +16,20 @@ import { DEFAULT_INITIAL_SEARCH_DATA, VALUES_PAGINATE_BY } from "@saleor/config"; -import { useFileUploadMutation } from "@saleor/files/mutations"; -import { AttributeErrorFragment } from "@saleor/fragments/types/AttributeErrorFragment"; -import { PageErrorFragment } from "@saleor/fragments/types/PageErrorFragment"; -import { UploadErrorFragment } from "@saleor/fragments/types/UploadErrorFragment"; +import { + AttributeErrorFragment, + AttributeValueInput, + PageErrorFragment, + PageInput, + UploadErrorFragment, + useAttributeValueDeleteMutation, + useFileUploadMutation, + usePageDetailsQuery, + usePageRemoveMutation, + usePageUpdateMutation, + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages } from "@saleor/intl"; @@ -29,21 +38,13 @@ import useProductSearch from "@saleor/searches/useProductSearch"; import useAttributeValueSearchHandler from "@saleor/utils/handlers/attributeValueSearchHandler"; import createMetadataUpdateHandler from "@saleor/utils/handlers/metadataUpdateHandler"; import { mapEdgesToItems } from "@saleor/utils/maps"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; import { getParsedDataForJsonStringField } from "@saleor/utils/richText/misc"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { getStringOrPlaceholder, maybe } from "../../misc"; -import { AttributeValueInput, PageInput } from "../../types/globalTypes"; import PageDetailsPage from "../components/PageDetailsPage"; import { PageData, PageSubmitData } from "../components/PageDetailsPage/form"; -import { usePageRemoveMutation, usePageUpdateMutation } from "../mutations"; -import { usePageDetailsQuery } from "../queries"; -import { PageRemove } from "../types/PageRemove"; import { pageListUrl, pageUrl, PageUrlQueryParams } from "../urls"; export interface PageDetailsProps { @@ -74,8 +75,8 @@ export const PageDetails: React.FC = ({ id, params }) => { const navigate = useNavigator(); const notify = useNotifier(); const intl = useIntl(); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); const pageDetails = usePageDetailsQuery({ variables: { @@ -94,7 +95,7 @@ export const PageDetails: React.FC = ({ id, params }) => { ] = useAttributeValueDeleteMutation({}); const [pageRemove, pageRemoveOpts] = usePageRemoveMutation({ - onCompleted: (data: PageRemove) => { + onCompleted: data => { if (data.pageDelete.errors.length === 0) { notify({ status: "success", diff --git a/src/pages/views/PageList/PageList.tsx b/src/pages/views/PageList/PageList.tsx index 5189e4a3c..f04e6ddda 100644 --- a/src/pages/views/PageList/PageList.tsx +++ b/src/pages/views/PageList/PageList.tsx @@ -1,5 +1,10 @@ import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; +import { + usePageBulkPublishMutation, + usePageBulkRemoveMutation, + usePageListQuery +} from "@saleor/graphql"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useListSettings from "@saleor/hooks/useListSettings"; import useNavigator from "@saleor/hooks/useNavigator"; @@ -19,10 +24,6 @@ import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import PageListPage from "../../components/PageListPage/PageListPage"; -import { TypedPageBulkPublish, TypedPageBulkRemove } from "../../mutations"; -import { usePageListQuery } from "../../queries"; -import { PageBulkPublish } from "../../types/PageBulkPublish"; -import { PageBulkRemove } from "../../types/PageBulkRemove"; import { pageCreateUrl, pageListUrl, @@ -75,191 +76,181 @@ export const PageList: React.FC = ({ params }) => { PageListUrlQueryParams >(navigate, pageListUrl, params); - const handlePageBulkPublish = (data: PageBulkPublish) => { - if (data.pageBulkPublish.errors.length === 0) { - closeModal(); - notify({ - status: "success", - text: intl.formatMessage({ - defaultMessage: "Published pages", - description: "notification" - }) - }); - reset(); - refetch(); + const [bulkPageRemove, bulkPageRemoveOpts] = usePageBulkRemoveMutation({ + onCompleted: data => { + if (data.pageBulkDelete.errors.length === 0) { + closeModal(); + notify({ + status: "success", + text: intl.formatMessage({ + defaultMessage: "Removed pages", + description: "notification" + }) + }); + reset(); + refetch(); + } } - }; + }); - const handlePageBulkRemove = (data: PageBulkRemove) => { - if (data.pageBulkDelete.errors.length === 0) { - closeModal(); - notify({ - status: "success", - text: intl.formatMessage({ - defaultMessage: "Removed pages", - description: "notification" - }) - }); - reset(); - refetch(); + const [bulkPagePublish, bulkPagePublishOpts] = usePageBulkPublishMutation({ + onCompleted: data => { + if (data.pageBulkPublish.errors.length === 0) { + closeModal(); + notify({ + status: "success", + text: intl.formatMessage({ + defaultMessage: "Published pages", + description: "notification" + }) + }); + reset(); + refetch(); + } } - }; + }); const handleSort = createSortHandler(navigate, pageListUrl, params); return ( - - {(bulkPageRemove, bulkPageRemoveOpts) => ( - - {(bulkPagePublish, bulkPagePublishOpts) => ( - <> - navigate(pageCreateUrl())} - onNextPage={loadNextPage} - onPreviousPage={loadPreviousPage} - onUpdateListSettings={updateListSettings} - onRowClick={id => () => navigate(pageUrl(id))} - onSort={handleSort} - toolbar={ - <> - - - - openModal("remove", { - ids: listElements - }) - } - > - - - - } - isChecked={isSelected} - selected={listElements.length} - sort={getSortParams(params)} - toggle={toggle} - toggleAll={toggleAll} + <> + navigate(pageCreateUrl())} + onNextPage={loadNextPage} + onPreviousPage={loadPreviousPage} + onUpdateListSettings={updateListSettings} + onRowClick={id => () => navigate(pageUrl(id))} + onSort={handleSort} + toolbar={ + <> + + + + openModal("remove", { + ids: listElements + }) + } + > + + + + } + isChecked={isSelected} + selected={listElements.length} + sort={getSortParams(params)} + toggle={toggle} + toggleAll={toggleAll} + /> + + bulkPagePublish({ + variables: { + ids: params.ids, + isPublished: true + } + }) + } + title={intl.formatMessage({ + defaultMessage: "Publish Pages", + description: "dialog header" + })} + > + + params.ids.length), + displayQuantity: {maybe(() => params.ids.length)} + }} + /> + + + + bulkPagePublish({ + variables: { + ids: params.ids, + isPublished: false + } + }) + } + title={intl.formatMessage({ + defaultMessage: "Unpublish Pages", + description: "dialog header" + })} + > + params.ids.length), + displayQuantity: {maybe(() => params.ids.length)} + }} + /> + + + bulkPageRemove({ + variables: { + ids: params.ids + } + }) + } + variant="delete" + title={intl.formatMessage({ + defaultMessage: "Delete Pages", + description: "dialog header" + })} + > + params.ids.length), + displayQuantity: {maybe(() => params.ids.length)} + }} + /> + + ); }; diff --git a/src/pages/views/PageList/sort.ts b/src/pages/views/PageList/sort.ts index cdb9d5e93..c0844353b 100644 --- a/src/pages/views/PageList/sort.ts +++ b/src/pages/views/PageList/sort.ts @@ -1,5 +1,5 @@ +import { PageSortField } from "@saleor/graphql"; import { PageListUrlSortField } from "@saleor/pages/urls"; -import { PageSortField } from "@saleor/types/globalTypes"; import { createGetSortQueryVariables } from "@saleor/utils/sort"; export function getSortQueryField(sort: PageListUrlSortField): PageSortField { diff --git a/src/permissionGroups/components/AssignMembersDialog/AssignMembersDialog.tsx b/src/permissionGroups/components/AssignMembersDialog/AssignMembersDialog.tsx index a1a86a24c..37c4f456d 100644 --- a/src/permissionGroups/components/AssignMembersDialog/AssignMembersDialog.tsx +++ b/src/permissionGroups/components/AssignMembersDialog/AssignMembersDialog.tsx @@ -16,6 +16,7 @@ import CardSpacer from "@saleor/components/CardSpacer"; import ConfirmButton from "@saleor/components/ConfirmButton"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; +import { SearchStaffMembersQuery } from "@saleor/graphql"; import useElementScroll, { isScrolledToBottom } from "@saleor/hooks/useElementScroll"; @@ -23,8 +24,12 @@ import useSearchQuery from "@saleor/hooks/useSearchQuery"; import { buttonMessages } from "@saleor/intl"; import { ConfirmButtonTransitionState, makeStyles } from "@saleor/macaw-ui"; import { getUserInitials, getUserName, renderCollection } from "@saleor/misc"; -import { SearchStaffMembers_search_edges_node } from "@saleor/searches/types/SearchStaffMembers"; -import { DialogProps, FetchMoreProps, SearchPageProps } from "@saleor/types"; +import { + DialogProps, + FetchMoreProps, + RelayToFlat, + SearchPageProps +} from "@saleor/types"; import classNames from "classnames"; import React from "react"; import InfiniteScroll from "react-infinite-scroll-component"; @@ -120,17 +125,19 @@ export interface AssignMembersDialogProps SearchPageProps { confirmButtonState: ConfirmButtonTransitionState; disabled: boolean; - staffMembers: SearchStaffMembers_search_edges_node[]; + staffMembers: RelayToFlat; hasMore: boolean; onFetchMore: () => void; - onSubmit: (data: SearchStaffMembers_search_edges_node[]) => void; + onSubmit: (data: RelayToFlat) => void; } function handleStaffMemberAssign( - member: SearchStaffMembers_search_edges_node, + member: RelayToFlat[0], isSelected: boolean, - selectedMembers: SearchStaffMembers_search_edges_node[], - setSelectedMembers: (data: SearchStaffMembers_search_edges_node[]) => void + selectedMembers: RelayToFlat, + setSelectedMembers: ( + data: RelayToFlat + ) => void ) { if (isSelected) { setSelectedMembers( @@ -160,7 +167,7 @@ const AssignMembersDialog: React.FC = ({ const [query, onQueryChange] = useSearchQuery(onSearchChange); const [selectedMembers, setSelectedMembers] = React.useState< - SearchStaffMembers_search_edges_node[] + RelayToFlat >([]); const anchor = React.useRef(); diff --git a/src/permissionGroups/components/PermissionGroupCreatePage/PermissionGroupCreatePage.tsx b/src/permissionGroups/components/PermissionGroupCreatePage/PermissionGroupCreatePage.tsx index c087200ae..9462d6082 100644 --- a/src/permissionGroups/components/PermissionGroupCreatePage/PermissionGroupCreatePage.tsx +++ b/src/permissionGroups/components/PermissionGroupCreatePage/PermissionGroupCreatePage.tsx @@ -3,12 +3,10 @@ import Container from "@saleor/components/Container"; import Form from "@saleor/components/Form"; import Grid from "@saleor/components/Grid"; import Savebar from "@saleor/components/Savebar"; -import { PermissionGroupErrorFragment } from "@saleor/fragments/types/PermissionGroupErrorFragment"; +import { PermissionEnum, PermissionGroupErrorFragment } from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; -import { PermissionEnum } from "@saleor/types/globalTypes"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { getFormErrors } from "@saleor/utils/errors"; import getPermissionGroupErrorMessage from "@saleor/utils/errors/permissionGroups"; import React from "react"; diff --git a/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.stories.tsx b/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.stories.tsx index 22c599f8d..f7c5e5ce8 100644 --- a/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.stories.tsx +++ b/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.stories.tsx @@ -1,9 +1,11 @@ -import { PermissionGroupErrorFragment } from "@saleor/fragments/types/PermissionGroupErrorFragment"; +import { + PermissionGroupErrorCode, + PermissionGroupErrorFragment +} from "@saleor/graphql"; import PermissionGroupDeleteDialog, { PermissionDeleteDialogProps } from "@saleor/permissionGroups/components/PermissionGroupDeleteDialog"; import Decorator from "@saleor/storybook/Decorator"; -import { PermissionGroupErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.tsx b/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.tsx index 117856d4f..bf31c0422 100644 --- a/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.tsx +++ b/src/permissionGroups/components/PermissionGroupDeleteDialog/PermissionGroupDeleteDialog.tsx @@ -1,8 +1,10 @@ import { DialogContentText, Typography } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; -import { PermissionGroupErrorFragment } from "@saleor/fragments/types/PermissionGroupErrorFragment"; +import { + PermissionGroupErrorCode, + PermissionGroupErrorFragment +} from "@saleor/graphql"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { PermissionGroupErrorCode } from "@saleor/types/globalTypes"; import getPermissionGroupErrorMessage from "@saleor/utils/errors/permissionGroups"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/permissionGroups/components/PermissionGroupDetailsPage/PermissionGroupDetailsPage.tsx b/src/permissionGroups/components/PermissionGroupDetailsPage/PermissionGroupDetailsPage.tsx index a8a865fa9..555ac5fe3 100644 --- a/src/permissionGroups/components/PermissionGroupDetailsPage/PermissionGroupDetailsPage.tsx +++ b/src/permissionGroups/components/PermissionGroupDetailsPage/PermissionGroupDetailsPage.tsx @@ -5,28 +5,26 @@ import FormSpacer from "@saleor/components/FormSpacer"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; -import { ShopInfo_shop_permissions } from "@saleor/components/Shop/types/ShopInfo"; -import { PermissionGroupErrorFragment } from "@saleor/fragments/types/PermissionGroupErrorFragment"; +import { + PermissionEnum, + PermissionGroupDetailsFragment, + PermissionGroupErrorFragment, + UserPermissionFragment +} from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { MembersListUrlSortField } from "@saleor/permissionGroups/urls"; import { extractPermissionCodes, isGroupFullAccess } from "@saleor/permissionGroups/utils"; import { ListActions, SortPage } from "@saleor/types"; -import { PermissionEnum } from "@saleor/types/globalTypes"; import { getFormErrors } from "@saleor/utils/errors"; import getPermissionGroupErrorMessage from "@saleor/utils/errors/permissionGroups"; import React from "react"; import { useIntl } from "react-intl"; -import { - PermissionGroupDetails_permissionGroup, - PermissionGroupDetails_permissionGroup_users -} from "../../types/PermissionGroupDetails"; import PermissionGroupInfo from "../PermissionGroupInfo"; import PermissionGroupMemberList from "../PermissionGroupMemberList"; @@ -35,10 +33,11 @@ export interface PermissionGroupDetailsPageFormData { hasFullAccess: boolean; isActive: boolean; permissions: PermissionEnum[]; - users: PermissionGroupDetails_permissionGroup_users[]; + users: PermissionGroupDetailsFragment["users"]; } -export interface PermissionData extends ShopInfo_shop_permissions { +export interface PermissionData + extends Omit { lastSource?: boolean; disabled?: boolean; } @@ -48,9 +47,9 @@ export interface PermissionGroupDetailsPageProps SortPage { disabled: boolean; errors: PermissionGroupErrorFragment[]; - members: PermissionGroupDetails_permissionGroup_users[]; + members: PermissionGroupDetailsFragment["users"]; membersModified: boolean; - permissionGroup: PermissionGroupDetails_permissionGroup; + permissionGroup: PermissionGroupDetailsFragment; permissions: PermissionData[]; permissionsExceeded: boolean; saveButtonBarState: ConfirmButtonTransitionState; diff --git a/src/permissionGroups/components/PermissionGroupInfo/PermissionGroupInfo.tsx b/src/permissionGroups/components/PermissionGroupInfo/PermissionGroupInfo.tsx index ef773d435..300a4b589 100644 --- a/src/permissionGroups/components/PermissionGroupInfo/PermissionGroupInfo.tsx +++ b/src/permissionGroups/components/PermissionGroupInfo/PermissionGroupInfo.tsx @@ -1,6 +1,6 @@ import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; -import { PermissionGroupErrorFragment } from "@saleor/fragments/types/PermissionGroupErrorFragment"; +import { PermissionGroupErrorFragment } from "@saleor/graphql"; import { FormChange } from "@saleor/hooks/useForm"; import { commonMessages } from "@saleor/intl"; import { getFieldError, getFormErrors } from "@saleor/utils/errors"; diff --git a/src/permissionGroups/components/PermissionGroupList/PermissionGroupList.tsx b/src/permissionGroups/components/PermissionGroupList/PermissionGroupList.tsx index 78b641f93..236c8f4fa 100644 --- a/src/permissionGroups/components/PermissionGroupList/PermissionGroupList.tsx +++ b/src/permissionGroups/components/PermissionGroupList/PermissionGroupList.tsx @@ -9,9 +9,9 @@ import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import TableCellHeader from "@saleor/components/TableCellHeader"; import TablePagination from "@saleor/components/TablePagination"; +import { PermissionGroupFragment } from "@saleor/graphql"; import { DeleteIcon, IconButton, makeStyles } from "@saleor/macaw-ui"; import { maybe, renderCollection, stopPropagation } from "@saleor/misc"; -import { PermissionGroupList_permissionGroups_edges_node } from "@saleor/permissionGroups/types/PermissionGroupList"; import { PermissionGroupListUrlSortField } from "@saleor/permissionGroups/urls"; import { ListProps, SortPage } from "@saleor/types"; import { getArrowDirection } from "@saleor/utils/sort"; @@ -55,7 +55,7 @@ const numberOfColumns = 3; interface PermissionGroupListProps extends ListProps, SortPage { - permissionGroups: PermissionGroupList_permissionGroups_edges_node[]; + permissionGroups: PermissionGroupFragment[]; onDelete: (id: string) => void; } diff --git a/src/permissionGroups/components/PermissionGroupListPage/PermissionGroupListPage.tsx b/src/permissionGroups/components/PermissionGroupListPage/PermissionGroupListPage.tsx index 4ac528d6e..641aabdc3 100644 --- a/src/permissionGroups/components/PermissionGroupListPage/PermissionGroupListPage.tsx +++ b/src/permissionGroups/components/PermissionGroupListPage/PermissionGroupListPage.tsx @@ -1,20 +1,20 @@ import { Card } from "@material-ui/core"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; +import { PermissionGroupFragment } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { Backlink, Button } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { PageListProps, SortPage } from "../../../types"; -import { PermissionGroupList_permissionGroups_edges_node } from "../../types/PermissionGroupList"; import { PermissionGroupListUrlSortField } from "../../urls"; import PermissionGroupList from "../PermissionGroupList"; export interface PermissionGroupListPageProps extends PageListProps, SortPage { - permissionGroups: PermissionGroupList_permissionGroups_edges_node[]; + permissionGroups: PermissionGroupFragment[]; onBack: () => void; onDelete: (id: string) => void; onRowClick: (id: string) => () => void; diff --git a/src/permissionGroups/components/PermissionGroupMemberList/PermissionGroupMemberList.tsx b/src/permissionGroups/components/PermissionGroupMemberList/PermissionGroupMemberList.tsx index e65766dc5..e8a655c80 100644 --- a/src/permissionGroups/components/PermissionGroupMemberList/PermissionGroupMemberList.tsx +++ b/src/permissionGroups/components/PermissionGroupMemberList/PermissionGroupMemberList.tsx @@ -12,6 +12,7 @@ import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import TableCellHeader from "@saleor/components/TableCellHeader"; import TableHead from "@saleor/components/TableHead"; +import { PermissionGroupMemberFragment } from "@saleor/graphql"; import { Button, DeleteIcon, IconButton, makeStyles } from "@saleor/macaw-ui"; import { getUserInitials, @@ -20,7 +21,6 @@ import { stopPropagation } from "@saleor/misc"; import { sortMembers } from "@saleor/permissionGroups/sort"; -import { PermissionGroupDetails_permissionGroup_users } from "@saleor/permissionGroups/types/PermissionGroupDetails"; import { MembersListUrlSortField } from "@saleor/permissionGroups/urls"; import { ListActions, SortPage } from "@saleor/types"; import { getArrowDirection } from "@saleor/utils/sort"; @@ -85,7 +85,7 @@ const numberOfColumns = 4; interface PermissionGroupProps extends ListActions, SortPage { - users: PermissionGroupDetails_permissionGroup_users[]; + users: PermissionGroupMemberFragment[]; disabled: boolean; onUnassign: (ida: string[]) => void; onAssign: () => void; diff --git a/src/permissionGroups/fixtures.ts b/src/permissionGroups/fixtures.ts index 25f19f64c..d0c876531 100644 --- a/src/permissionGroups/fixtures.ts +++ b/src/permissionGroups/fixtures.ts @@ -1,17 +1,16 @@ import * as avatarImg from "@assets/images/avatars/avatar1.png"; -import { PermissionGroupErrorFragment } from "@saleor/fragments/types/PermissionGroupErrorFragment"; -import { SearchStaffMembers_search_edges_node } from "@saleor/searches/types/SearchStaffMembers"; -import { StaffMemberDetails_user_permissionGroups } from "@saleor/staff/types/StaffMemberDetails"; -/* eslint-disable sort-keys */ import { PermissionEnum, - PermissionGroupErrorCode -} from "@saleor/types/globalTypes"; + PermissionGroupDetailsFragment, + PermissionGroupErrorCode, + PermissionGroupErrorFragment, + PermissionGroupFragment, + SearchStaffMembersQuery, + StaffMemberDetailsFragment +} from "@saleor/graphql"; +import { RelayToFlat } from "@saleor/types"; -import { PermissionGroupDetails_permissionGroup } from "./types/PermissionGroupDetails"; -import { PermissionGroupList_permissionGroups_edges_node } from "./types/PermissionGroupList"; - -export const permissionGroups: PermissionGroupList_permissionGroups_edges_node[] = [ +export const permissionGroups: PermissionGroupFragment[] = [ { node: { id: "R3JvdXA6Mg==", @@ -91,7 +90,7 @@ export const permissionGroups: PermissionGroupList_permissionGroups_edges_node[] } ].map(edge => edge.node); -export const userPermissionGroups: StaffMemberDetails_user_permissionGroups[] = [ +export const userPermissionGroups: StaffMemberDetailsFragment["permissionGroups"] = [ { id: "R3JvdXA6MQ==", name: "Full Access", @@ -106,7 +105,7 @@ export const userPermissionGroups: StaffMemberDetails_user_permissionGroups[] = } ]; -export const emptyPermissionGroup: PermissionGroupDetails_permissionGroup = { +export const emptyPermissionGroup: PermissionGroupDetailsFragment = { id: "R3JvdXA6Mw==", name: "Editors", userCanManage: true, @@ -136,7 +135,7 @@ export const errorsOfPermissionGroupCreate: PermissionGroupErrorFragment[] = [ } ]; -export const permissionGroup: PermissionGroupDetails_permissionGroup = { +export const permissionGroup: PermissionGroupDetailsFragment = { id: "R3JvdXA6Mw==", name: "Editors", userCanManage: true, @@ -170,7 +169,7 @@ export const permissionGroup: PermissionGroupDetails_permissionGroup = { ] }; -export const users: SearchStaffMembers_search_edges_node[] = [ +export const users: RelayToFlat = [ { node: { id: "VXNlcjoyMQ==", diff --git a/src/permissionGroups/mutations.ts b/src/permissionGroups/mutations.ts index 443eb51ca..5684e2f29 100644 --- a/src/permissionGroups/mutations.ts +++ b/src/permissionGroups/mutations.ts @@ -1,77 +1,40 @@ import { gql } from "@apollo/client"; -import { permissionGroupErrorFragment } from "@saleor/fragments/errors"; -import { permissionGroupDetailsFragment } from "@saleor/fragments/permissionGroups"; -import makeMutation from "@saleor/hooks/makeMutation"; - -import { - PermissionGroupCreate, - PermissionGroupCreateVariables -} from "./types/PermissionGroupCreate"; -import { - PermissionGroupDelete, - PermissionGroupDeleteVariables -} from "./types/PermissionGroupDelete"; -import { - PermissionGroupUpdate, - PermissionGroupUpdateVariables -} from "./types/PermissionGroupUpdate"; export const permissionGroupDelete = gql` - ${permissionGroupErrorFragment} mutation PermissionGroupDelete($id: ID!) { permissionGroupDelete(id: $id) { errors { - ...PermissionGroupErrorFragment + ...PermissionGroupError } } } `; -export const usePermissionGroupDelete = makeMutation< - PermissionGroupDelete, - PermissionGroupDeleteVariables ->(permissionGroupDelete); export const permissionGroupCreate = gql` - ${permissionGroupDetailsFragment} - ${permissionGroupErrorFragment} - mutation PermissionGroupCreate($input: PermissionGroupCreateInput!) { permissionGroupCreate(input: $input) { errors { - ...PermissionGroupErrorFragment + ...PermissionGroupError } group { - ...PermissionGroupDetailsFragment + ...PermissionGroupDetails } } } `; -export const usePermissionGroupCreate = makeMutation< - PermissionGroupCreate, - PermissionGroupCreateVariables ->(permissionGroupCreate); - export const permissionGroupUpdate = gql` - ${permissionGroupDetailsFragment} - ${permissionGroupErrorFragment} - mutation PermissionGroupUpdate( $id: ID! $input: PermissionGroupUpdateInput! ) { permissionGroupUpdate(id: $id, input: $input) { errors { - ...PermissionGroupErrorFragment + ...PermissionGroupError } group { - ...PermissionGroupDetailsFragment + ...PermissionGroupDetails } } } `; - -export const usePermissionGroupUpdate = makeMutation< - PermissionGroupUpdate, - PermissionGroupUpdateVariables ->(permissionGroupUpdate); diff --git a/src/permissionGroups/queries.ts b/src/permissionGroups/queries.ts index 10aa7ed9f..4c486ea11 100644 --- a/src/permissionGroups/queries.ts +++ b/src/permissionGroups/queries.ts @@ -1,23 +1,6 @@ import { gql } from "@apollo/client"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; -import { - permissionGroupDetailsFragment, - permissionGroupFragment -} from "@saleor/fragments/permissionGroups"; -import makeQuery from "@saleor/hooks/makeQuery"; - -import { - PermissionGroupDetails, - PermissionGroupDetailsVariables -} from "./types/PermissionGroupDetails"; -import { - PermissionGroupList, - PermissionGroupListVariables -} from "./types/PermissionGroupList"; export const permissionGroupListQuery = gql` - ${pageInfoFragment} - ${permissionGroupFragment} query PermissionGroupList( $after: String $before: String @@ -36,25 +19,20 @@ export const permissionGroupListQuery = gql` ) { edges { node { - ...PermissionGroupFragment + ...PermissionGroup } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export const usePermissionGroupListQuery = makeQuery< - PermissionGroupList, - PermissionGroupListVariables ->(permissionGroupListQuery); export const permissionGroupDetailsQuery = gql` - ${permissionGroupDetailsFragment} query PermissionGroupDetails($id: ID!, $userId: ID!) { permissionGroup(id: $id) { - ...PermissionGroupDetailsFragment + ...PermissionGroupDetails } user(id: $userId) { editableGroups { @@ -69,7 +47,3 @@ export const permissionGroupDetailsQuery = gql` } } `; -export const usePermissionGroupDetailsQuery = makeQuery< - PermissionGroupDetails, - PermissionGroupDetailsVariables ->(permissionGroupDetailsQuery); diff --git a/src/permissionGroups/sort.ts b/src/permissionGroups/sort.ts index fa3bb3992..e98772136 100644 --- a/src/permissionGroups/sort.ts +++ b/src/permissionGroups/sort.ts @@ -1,11 +1,11 @@ +import { StaffMemberFragment } from "@saleor/graphql"; import { getUserName } from "@saleor/misc"; -import { PermissionGroupDetails_permissionGroup_users } from "./types/PermissionGroupDetails"; import { MembersListUrlSortField } from "./urls"; export const sortMembers = (sort: string, asc: boolean) => ( - a: PermissionGroupDetails_permissionGroup_users, - b: PermissionGroupDetails_permissionGroup_users + a: StaffMemberFragment, + b: StaffMemberFragment ) => { let valueA; let valueB; diff --git a/src/permissionGroups/types/PermissionGroupCreate.ts b/src/permissionGroups/types/PermissionGroupCreate.ts deleted file mode 100644 index 5acc49bf8..000000000 --- a/src/permissionGroups/types/PermissionGroupCreate.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PermissionGroupCreateInput, PermissionGroupErrorCode, PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: PermissionGroupCreate -// ==================================================== - -export interface PermissionGroupCreate_permissionGroupCreate_errors { - __typename: "PermissionGroupError"; - code: PermissionGroupErrorCode; - field: string | null; - message: string | null; -} - -export interface PermissionGroupCreate_permissionGroupCreate_group_users_avatar { - __typename: "Image"; - url: string; -} - -export interface PermissionGroupCreate_permissionGroupCreate_group_users { - __typename: "User"; - id: string; - firstName: string; - lastName: string; - email: string; - isActive: boolean; - avatar: PermissionGroupCreate_permissionGroupCreate_group_users_avatar | null; -} - -export interface PermissionGroupCreate_permissionGroupCreate_group_permissions { - __typename: "Permission"; - code: PermissionEnum; - name: string; -} - -export interface PermissionGroupCreate_permissionGroupCreate_group { - __typename: "Group"; - id: string; - name: string; - userCanManage: boolean; - users: (PermissionGroupCreate_permissionGroupCreate_group_users | null)[] | null; - permissions: (PermissionGroupCreate_permissionGroupCreate_group_permissions | null)[] | null; -} - -export interface PermissionGroupCreate_permissionGroupCreate { - __typename: "PermissionGroupCreate"; - errors: PermissionGroupCreate_permissionGroupCreate_errors[]; - group: PermissionGroupCreate_permissionGroupCreate_group | null; -} - -export interface PermissionGroupCreate { - permissionGroupCreate: PermissionGroupCreate_permissionGroupCreate | null; -} - -export interface PermissionGroupCreateVariables { - input: PermissionGroupCreateInput; -} diff --git a/src/permissionGroups/types/PermissionGroupDelete.ts b/src/permissionGroups/types/PermissionGroupDelete.ts deleted file mode 100644 index 398e7995c..000000000 --- a/src/permissionGroups/types/PermissionGroupDelete.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PermissionGroupErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: PermissionGroupDelete -// ==================================================== - -export interface PermissionGroupDelete_permissionGroupDelete_errors { - __typename: "PermissionGroupError"; - code: PermissionGroupErrorCode; - field: string | null; - message: string | null; -} - -export interface PermissionGroupDelete_permissionGroupDelete { - __typename: "PermissionGroupDelete"; - errors: PermissionGroupDelete_permissionGroupDelete_errors[]; -} - -export interface PermissionGroupDelete { - permissionGroupDelete: PermissionGroupDelete_permissionGroupDelete | null; -} - -export interface PermissionGroupDeleteVariables { - id: string; -} diff --git a/src/permissionGroups/types/PermissionGroupDetails.ts b/src/permissionGroups/types/PermissionGroupDetails.ts deleted file mode 100644 index 777746d1b..000000000 --- a/src/permissionGroups/types/PermissionGroupDetails.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: PermissionGroupDetails -// ==================================================== - -export interface PermissionGroupDetails_permissionGroup_users_avatar { - __typename: "Image"; - url: string; -} - -export interface PermissionGroupDetails_permissionGroup_users { - __typename: "User"; - id: string; - firstName: string; - lastName: string; - email: string; - isActive: boolean; - avatar: PermissionGroupDetails_permissionGroup_users_avatar | null; -} - -export interface PermissionGroupDetails_permissionGroup_permissions { - __typename: "Permission"; - code: PermissionEnum; - name: string; -} - -export interface PermissionGroupDetails_permissionGroup { - __typename: "Group"; - id: string; - name: string; - userCanManage: boolean; - users: (PermissionGroupDetails_permissionGroup_users | null)[] | null; - permissions: (PermissionGroupDetails_permissionGroup_permissions | null)[] | null; -} - -export interface PermissionGroupDetails_user_editableGroups { - __typename: "Group"; - id: string; -} - -export interface PermissionGroupDetails_user_userPermissions_sourcePermissionGroups { - __typename: "Group"; - id: string; -} - -export interface PermissionGroupDetails_user_userPermissions { - __typename: "UserPermission"; - code: PermissionEnum; - sourcePermissionGroups: PermissionGroupDetails_user_userPermissions_sourcePermissionGroups[] | null; -} - -export interface PermissionGroupDetails_user { - __typename: "User"; - editableGroups: (PermissionGroupDetails_user_editableGroups | null)[] | null; - userPermissions: (PermissionGroupDetails_user_userPermissions | null)[] | null; -} - -export interface PermissionGroupDetails { - permissionGroup: PermissionGroupDetails_permissionGroup | null; - user: PermissionGroupDetails_user | null; -} - -export interface PermissionGroupDetailsVariables { - id: string; - userId: string; -} diff --git a/src/permissionGroups/types/PermissionGroupList.ts b/src/permissionGroups/types/PermissionGroupList.ts deleted file mode 100644 index 1126107e1..000000000 --- a/src/permissionGroups/types/PermissionGroupList.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PermissionGroupFilterInput, PermissionGroupSortingInput } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: PermissionGroupList -// ==================================================== - -export interface PermissionGroupList_permissionGroups_edges_node_users { - __typename: "User"; - id: string; - firstName: string; - lastName: string; -} - -export interface PermissionGroupList_permissionGroups_edges_node { - __typename: "Group"; - id: string; - name: string; - userCanManage: boolean; - users: (PermissionGroupList_permissionGroups_edges_node_users | null)[] | null; -} - -export interface PermissionGroupList_permissionGroups_edges { - __typename: "GroupCountableEdge"; - node: PermissionGroupList_permissionGroups_edges_node; -} - -export interface PermissionGroupList_permissionGroups_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface PermissionGroupList_permissionGroups { - __typename: "GroupCountableConnection"; - edges: PermissionGroupList_permissionGroups_edges[]; - pageInfo: PermissionGroupList_permissionGroups_pageInfo; -} - -export interface PermissionGroupList { - permissionGroups: PermissionGroupList_permissionGroups | null; -} - -export interface PermissionGroupListVariables { - after?: string | null; - before?: string | null; - first?: number | null; - last?: number | null; - filter?: PermissionGroupFilterInput | null; - sort?: PermissionGroupSortingInput | null; -} diff --git a/src/permissionGroups/types/PermissionGroupUpdate.ts b/src/permissionGroups/types/PermissionGroupUpdate.ts deleted file mode 100644 index e7e1d0aeb..000000000 --- a/src/permissionGroups/types/PermissionGroupUpdate.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PermissionGroupUpdateInput, PermissionGroupErrorCode, PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: PermissionGroupUpdate -// ==================================================== - -export interface PermissionGroupUpdate_permissionGroupUpdate_errors { - __typename: "PermissionGroupError"; - code: PermissionGroupErrorCode; - field: string | null; - message: string | null; -} - -export interface PermissionGroupUpdate_permissionGroupUpdate_group_users_avatar { - __typename: "Image"; - url: string; -} - -export interface PermissionGroupUpdate_permissionGroupUpdate_group_users { - __typename: "User"; - id: string; - firstName: string; - lastName: string; - email: string; - isActive: boolean; - avatar: PermissionGroupUpdate_permissionGroupUpdate_group_users_avatar | null; -} - -export interface PermissionGroupUpdate_permissionGroupUpdate_group_permissions { - __typename: "Permission"; - code: PermissionEnum; - name: string; -} - -export interface PermissionGroupUpdate_permissionGroupUpdate_group { - __typename: "Group"; - id: string; - name: string; - userCanManage: boolean; - users: (PermissionGroupUpdate_permissionGroupUpdate_group_users | null)[] | null; - permissions: (PermissionGroupUpdate_permissionGroupUpdate_group_permissions | null)[] | null; -} - -export interface PermissionGroupUpdate_permissionGroupUpdate { - __typename: "PermissionGroupUpdate"; - errors: PermissionGroupUpdate_permissionGroupUpdate_errors[]; - group: PermissionGroupUpdate_permissionGroupUpdate_group | null; -} - -export interface PermissionGroupUpdate { - permissionGroupUpdate: PermissionGroupUpdate_permissionGroupUpdate | null; -} - -export interface PermissionGroupUpdateVariables { - id: string; - input: PermissionGroupUpdateInput; -} diff --git a/src/permissionGroups/utils.ts b/src/permissionGroups/utils.ts index ce80d54b0..a46f565f9 100644 --- a/src/permissionGroups/utils.ts +++ b/src/permissionGroups/utils.ts @@ -1,16 +1,18 @@ -import { ShopInfo_shop_permissions } from "@saleor/components/Shop/types/ShopInfo"; -import { User } from "@saleor/fragments/types/User"; +import { + PermissionFragment, + PermissionGroupDetailsFragment, + UserFragment +} from "@saleor/graphql"; import difference from "lodash/difference"; import { PermissionGroupDetailsPageFormData } from "./components/PermissionGroupDetailsPage"; -import { PermissionGroupDetails_permissionGroup } from "./types/PermissionGroupDetails"; /** * Will return true if group has all permissions available in shop assigned. */ export const isGroupFullAccess = ( - permissionGroup: PermissionGroupDetails_permissionGroup, - shopPermissions: ShopInfo_shop_permissions[] + permissionGroup: PermissionGroupDetailsFragment, + shopPermissions: Array> ) => { const assignedCodes = extractPermissionCodes(permissionGroup); @@ -30,7 +32,7 @@ export const isGroupFullAccess = ( * Return list of codes which are assigned to the permission group. */ export const extractPermissionCodes = ( - permissionGroup: PermissionGroupDetails_permissionGroup + permissionGroup: PermissionGroupDetailsFragment ) => permissionGroup?.permissions ? permissionGroup.permissions.map(perm => perm.code) @@ -40,7 +42,7 @@ export const extractPermissionCodes = ( * Return lists of permissions which have to be added and removed from group. */ export const permissionsDiff = ( - permissionGroup: PermissionGroupDetails_permissionGroup, + permissionGroup: PermissionGroupDetailsFragment, formData: PermissionGroupDetailsPageFormData ) => { const newPermissions = formData.permissions; @@ -56,7 +58,7 @@ export const permissionsDiff = ( * Return lists of users which have to be added and removed from group. */ export const usersDiff = ( - permissionGroup: PermissionGroupDetails_permissionGroup, + permissionGroup: PermissionGroupDetailsFragment, formData: PermissionGroupDetailsPageFormData ) => { const newUsers = formData.users.map(u => u.id); @@ -72,8 +74,8 @@ export const usersDiff = ( * Permissions are exceeded when group has permission which is not handled by user */ export const arePermissionsExceeded = ( - permissionGroup: PermissionGroupDetails_permissionGroup, - user: User + permissionGroup: PermissionGroupDetailsFragment, + user: UserFragment ) => { const groupPermissions = extractPermissionCodes(permissionGroup); const userPermissions = user.userPermissions.map(p => p.code); diff --git a/src/permissionGroups/views/PermissionGroupCreate/PermissionGroupCreate.tsx b/src/permissionGroups/views/PermissionGroupCreate/PermissionGroupCreate.tsx index c48e075d8..d5fbac410 100644 --- a/src/permissionGroups/views/PermissionGroupCreate/PermissionGroupCreate.tsx +++ b/src/permissionGroups/views/PermissionGroupCreate/PermissionGroupCreate.tsx @@ -1,5 +1,6 @@ import { useUser } from "@saleor/auth"; import { WindowTitle } from "@saleor/components/WindowTitle"; +import { usePermissionGroupCreateMutation } from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; @@ -11,8 +12,6 @@ import { useIntl } from "react-intl"; import PermissionGroupCreatePage, { PermissionGroupCreateFormData } from "../../components/PermissionGroupCreatePage"; -import { usePermissionGroupCreate } from "../../mutations"; -import { PermissionGroupCreate } from "../../types/PermissionGroupCreate"; import { permissionGroupDetailsUrl, permissionGroupListUrl } from "../../urls"; const PermissionGroupCreateView: React.FC = () => { @@ -22,23 +21,23 @@ const PermissionGroupCreateView: React.FC = () => { const shop = useShop(); const user = useUser(); - const handleSuccess = (data: PermissionGroupCreate) => { - if (data?.permissionGroupCreate?.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage({ - defaultMessage: "Permission group created" - }) - }); - navigate(permissionGroupDetailsUrl(data.permissionGroupCreate.group.id)); - } - }; - const [ createPermissionGroup, createPermissionGroupResult - ] = usePermissionGroupCreate({ - onCompleted: handleSuccess + ] = usePermissionGroupCreateMutation({ + onCompleted: data => { + if (data?.permissionGroupCreate?.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage({ + defaultMessage: "Permission group created" + }) + }); + navigate( + permissionGroupDetailsUrl(data.permissionGroupCreate.group.id) + ); + } + } }); const errors = diff --git a/src/permissionGroups/views/PermissionGroupDetails/PermissionGroupDetails.tsx b/src/permissionGroups/views/PermissionGroupDetails/PermissionGroupDetails.tsx index a6d07721c..64f49c917 100644 --- a/src/permissionGroups/views/PermissionGroupDetails/PermissionGroupDetails.tsx +++ b/src/permissionGroups/views/PermissionGroupDetails/PermissionGroupDetails.tsx @@ -1,5 +1,9 @@ import { useUser } from "@saleor/auth"; import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; +import { + usePermissionGroupDetailsQuery, + usePermissionGroupUpdateMutation +} from "@saleor/graphql"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; @@ -27,9 +31,6 @@ import PermissionGroupDetailsPage, { PermissionGroupDetailsPageFormData } from "../../components/PermissionGroupDetailsPage"; import UnassignMembersDialog from "../../components/UnassignMembersDialog"; -import { usePermissionGroupUpdate } from "../../mutations"; -import { usePermissionGroupDetailsQuery } from "../../queries"; -import { PermissionGroupUpdate } from "../../types/PermissionGroupUpdate"; import { permissionGroupDetailsUrl, PermissionGroupDetailsUrlDialog, @@ -67,21 +68,6 @@ export const PermissionGroupDetails: React.FC = ({ variables: DEFAULT_INITIAL_SEARCH_DATA }); - const handleUpdateSuccess = (data: PermissionGroupUpdate) => { - if (data.permissionGroupUpdate.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - refetch(); - closeModal(); - } else if ( - data.permissionGroupUpdate.errors.some(e => e.field === "removeUsers") - ) { - openModal("unassignError"); - } - }; - const { isSelected, listElements, toggle, toggleAll } = useBulkActions( params.ids ); @@ -89,8 +75,21 @@ export const PermissionGroupDetails: React.FC = ({ const [ permissionGroupUpdate, permissionGroupUpdateResult - ] = usePermissionGroupUpdate({ - onCompleted: handleUpdateSuccess + ] = usePermissionGroupUpdateMutation({ + onCompleted: data => { + if (data.permissionGroupUpdate.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + refetch(); + closeModal(); + } else if ( + data.permissionGroupUpdate.errors.some(e => e.field === "removeUsers") + ) { + openModal("unassignError"); + } + } }); const [openModal, closeModal] = createDialogActionHandlers< diff --git a/src/permissionGroups/views/PermissionGroupList/PermissionGroupList.tsx b/src/permissionGroups/views/PermissionGroupList/PermissionGroupList.tsx index 8258f7e71..ddd5c01de 100644 --- a/src/permissionGroups/views/PermissionGroupList/PermissionGroupList.tsx +++ b/src/permissionGroups/views/PermissionGroupList/PermissionGroupList.tsx @@ -1,5 +1,9 @@ import { configurationMenuUrl } from "@saleor/configuration"; -import { PermissionGroupErrorFragment } from "@saleor/fragments/types/PermissionGroupErrorFragment"; +import { + PermissionGroupErrorFragment, + usePermissionGroupDeleteMutation, + usePermissionGroupListQuery +} from "@saleor/graphql"; import useListSettings from "@saleor/hooks/useListSettings"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; @@ -9,9 +13,6 @@ import usePaginator, { } from "@saleor/hooks/usePaginator"; import { getStringOrPlaceholder } from "@saleor/misc"; import PermissionGroupDeleteDialog from "@saleor/permissionGroups/components/PermissionGroupDeleteDialog"; -import { usePermissionGroupDelete } from "@saleor/permissionGroups/mutations"; -import { usePermissionGroupListQuery } from "@saleor/permissionGroups/queries"; -import { PermissionGroupDelete } from "@saleor/permissionGroups/types/PermissionGroupDelete"; import { ListViews } from "@saleor/types"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createSortHandler from "@saleor/utils/handlers/sortHandler"; @@ -82,24 +83,22 @@ export const PermissionGroupList: React.FC = ({ PermissionGroupErrorFragment >(); - const handleDeleteSuccess = (data: PermissionGroupDelete) => { - if (data.permissionGroupDelete.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage({ - defaultMessage: "Permission Group Deleted" - }) - }); - refetch(); - setDeleteError(undefined); - closeModal(); - } else { - setDeleteError(data.permissionGroupDelete.errors[0]); + const [permissionGroupDelete] = usePermissionGroupDeleteMutation({ + onCompleted: data => { + if (data.permissionGroupDelete.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage({ + defaultMessage: "Permission Group Deleted" + }) + }); + refetch(); + setDeleteError(undefined); + closeModal(); + } else { + setDeleteError(data.permissionGroupDelete.errors[0]); + } } - }; - - const [permissionGroupDelete] = usePermissionGroupDelete({ - onCompleted: handleDeleteSuccess }); return ( diff --git a/src/permissionGroups/views/PermissionGroupList/sort.ts b/src/permissionGroups/views/PermissionGroupList/sort.ts index db3b6832f..150394868 100644 --- a/src/permissionGroups/views/PermissionGroupList/sort.ts +++ b/src/permissionGroups/views/PermissionGroupList/sort.ts @@ -1,5 +1,5 @@ +import { PermissionGroupSortField } from "@saleor/graphql"; import { PermissionGroupListUrlSortField } from "@saleor/permissionGroups/urls"; -import { PermissionGroupSortField } from "@saleor/types/globalTypes"; import { createGetSortQueryVariables } from "@saleor/utils/sort"; export function getSortQueryField( diff --git a/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx b/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx index ce14141d4..8572eaefe 100644 --- a/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx +++ b/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx @@ -1,16 +1,18 @@ import { Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Hr from "@saleor/components/Hr"; -import { PluginConfigurationFragment_configuration } from "@saleor/fragments/types/PluginConfigurationFragment"; +import { + ConfigurationItemFragment, + ConfigurationTypeFieldEnum +} from "@saleor/graphql"; import { buttonMessages } from "@saleor/intl"; import { Button, makeStyles } from "@saleor/macaw-ui"; import { isSecretField } from "@saleor/plugins/utils"; -import { ConfigurationTypeFieldEnum } from "@saleor/types/globalTypes"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; interface PluginAuthorizationProps { - fields: PluginConfigurationFragment_configuration[]; + fields: ConfigurationItemFragment[]; onClear: (field: string) => void; onEdit: (field: string) => void; } diff --git a/src/plugins/components/PluginDetailsChannelsCard/PluginDetailsChannelsCardContent.tsx b/src/plugins/components/PluginDetailsChannelsCard/PluginDetailsChannelsCardContent.tsx index ab8abf3a3..42f142e92 100644 --- a/src/plugins/components/PluginDetailsChannelsCard/PluginDetailsChannelsCardContent.tsx +++ b/src/plugins/components/PluginDetailsChannelsCard/PluginDetailsChannelsCardContent.tsx @@ -1,11 +1,14 @@ +import { CardContent, Typography } from "@material-ui/core"; import CollectionWithDividers from "@saleor/components/CollectionWithDividers"; import Skeleton from "@saleor/components/Skeleton"; +import { PluginsDetailsFragment } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; -import { Plugin_plugin } from "@saleor/plugins/types/Plugin"; import { isPluginGlobal } from "@saleor/plugins/views/utils"; import React from "react"; import { FormattedMessage } from "react-intl"; +import { pluginDetailsChannelsCardMessages as messages } from "./messages"; + const useStyles = makeStyles( theme => ({ itemContainer: { @@ -26,13 +29,9 @@ const useStyles = makeStyles( export interface PluginDetailsChannelsCardProps { setSelectedChannelId: (channelId: string) => void; selectedChannelId: string; - plugin: Plugin_plugin; + plugin: PluginsDetailsFragment; } -import { CardContent, Typography } from "@material-ui/core"; - -import { pluginDetailsChannelsCardMessages as messages } from "./messages"; - const PluginDetailsChannelsCardContent: React.FC = ({ plugin, selectedChannelId, diff --git a/src/plugins/components/PluginInfo/PluginInfo.tsx b/src/plugins/components/PluginInfo/PluginInfo.tsx index 328028b8f..47a162f06 100644 --- a/src/plugins/components/PluginInfo/PluginInfo.tsx +++ b/src/plugins/components/PluginInfo/PluginInfo.tsx @@ -3,10 +3,9 @@ import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import FormSpacer from "@saleor/components/FormSpacer"; import Hr from "@saleor/components/Hr"; -import { PluginErrorFragment } from "@saleor/fragments/types/PluginErrorFragment"; +import { PluginErrorCode, PluginErrorFragment } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { makeStyles } from "@saleor/macaw-ui"; -import { PluginErrorCode } from "@saleor/types/globalTypes"; import getPluginErrorMessage from "@saleor/utils/errors/plugins"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.stories.tsx b/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.stories.tsx index d1caef19c..e41fafedc 100644 --- a/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.stories.tsx +++ b/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.stories.tsx @@ -1,4 +1,4 @@ -import { ConfigurationTypeFieldEnum } from "@saleor/types/globalTypes"; +import { ConfigurationTypeFieldEnum } from "@saleor/graphql"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx b/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx index b08c6a644..43d0a8de3 100644 --- a/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx +++ b/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx @@ -9,12 +9,14 @@ import BackButton from "@saleor/components/BackButton"; import ConfirmButton from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; import Skeleton from "@saleor/components/Skeleton"; -import { PluginConfigurationFragment_configuration } from "@saleor/fragments/types/PluginConfigurationFragment"; +import { + ConfigurationItemFragment, + ConfigurationTypeFieldEnum +} from "@saleor/graphql"; import { buttonMessages } from "@saleor/intl"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { maybe } from "@saleor/misc"; import { DialogProps } from "@saleor/types"; -import { ConfigurationTypeFieldEnum } from "@saleor/types/globalTypes"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -23,7 +25,7 @@ export interface PluginSecretFieldDialogFormData { } export interface PluginSecretFieldDialogProps extends DialogProps { confirmButtonState: ConfirmButtonTransitionState; - field: PluginConfigurationFragment_configuration; + field: ConfigurationItemFragment; onConfirm: (data: PluginSecretFieldDialogFormData) => void; } diff --git a/src/plugins/components/PluginSettings/PluginSettings.tsx b/src/plugins/components/PluginSettings/PluginSettings.tsx index 9a7c71b89..49a31bb65 100644 --- a/src/plugins/components/PluginSettings/PluginSettings.tsx +++ b/src/plugins/components/PluginSettings/PluginSettings.tsx @@ -8,10 +8,12 @@ import { import InfoIcon from "@material-ui/icons/Info"; import CardTitle from "@saleor/components/CardTitle"; import ControlledSwitch from "@saleor/components/ControlledSwitch"; -import { PluginConfigurationFragment_configuration } from "@saleor/fragments/types/PluginConfigurationFragment"; +import { + ConfigurationItemFragment, + ConfigurationTypeFieldEnum +} from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; import { UserError } from "@saleor/types"; -import { ConfigurationTypeFieldEnum } from "@saleor/types/globalTypes"; import { getFieldError } from "@saleor/utils/errors"; import React from "react"; import { useIntl } from "react-intl"; @@ -23,7 +25,7 @@ interface PluginSettingsProps { errors: UserError[]; disabled: boolean; onChange: (event: React.ChangeEvent) => void; - fields: PluginConfigurationFragment_configuration[]; + fields: ConfigurationItemFragment[]; } const useStyles = makeStyles( diff --git a/src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx b/src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx index bbe1873a4..a6d9e07bf 100644 --- a/src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx +++ b/src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx @@ -4,23 +4,24 @@ import Form from "@saleor/components/Form"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; -import { PluginErrorFragment } from "@saleor/fragments/types/PluginErrorFragment"; +import { + ConfigurationItemInput, + PluginConfigurationExtendedFragment, + PluginErrorFragment, + PluginsDetailsFragment +} from "@saleor/graphql"; import { ChangeEvent, SubmitPromise } from "@saleor/hooks/useForm"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { getStringOrPlaceholder } from "@saleor/misc"; import { isSecretField } from "@saleor/plugins/utils"; -import { ConfigurationItemInput } from "@saleor/types/globalTypes"; import React from "react"; import { useIntl } from "react-intl"; -import { Plugin_plugin } from "../../types/Plugin"; import PluginAuthorization from "../PluginAuthorization"; import PluginDetailsChannelsCard from "../PluginDetailsChannelsCard"; import PluginInfo from "../PluginInfo"; import PluginSettings from "../PluginSettings"; -import { PluginConfiguration } from "./types"; export interface PluginDetailsPageFormData { active: boolean; @@ -30,13 +31,13 @@ export interface PluginDetailsPageFormData { export interface PluginsDetailsPageProps { disabled: boolean; errors: PluginErrorFragment[]; - plugin?: Plugin_plugin; + plugin?: PluginsDetailsFragment; saveButtonBarState: ConfirmButtonTransitionState; onBack: () => void; onClear: (field: string) => void; onEdit: (field: string) => void; onSubmit: (data: PluginDetailsPageFormData) => SubmitPromise; - selectedConfig?: PluginConfiguration; + selectedConfig?: PluginConfigurationExtendedFragment; setSelectedChannelId: (channelId: string) => void; } diff --git a/src/plugins/components/PluginsDetailsPage/types.ts b/src/plugins/components/PluginsDetailsPage/types.ts deleted file mode 100644 index 11cd32490..000000000 --- a/src/plugins/components/PluginsDetailsPage/types.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { PluginConfigurationFragment } from "@saleor/fragments/types/PluginConfigurationFragment"; - -export type PluginConfiguration = PluginConfigurationFragment; diff --git a/src/plugins/components/PluginsList/PluginAvailabilityStatus.tsx b/src/plugins/components/PluginsList/PluginAvailabilityStatus.tsx index 5a5414fc1..43e4f71d5 100644 --- a/src/plugins/components/PluginsList/PluginAvailabilityStatus.tsx +++ b/src/plugins/components/PluginsList/PluginAvailabilityStatus.tsx @@ -1,15 +1,17 @@ +import { PluginBaseFragment } from "@saleor/graphql"; import { Pill } from "@saleor/macaw-ui"; -import { Plugins_plugins_edges_node } from "@saleor/plugins/types/Plugins"; import { isPluginGlobal } from "@saleor/plugins/views/utils"; import React from "react"; import { useIntl } from "react-intl"; -import { pluginStatusMessages } from "./messages"; -import { pluginAvailabilityStatusMessages as messages } from "./messages"; +import { + pluginAvailabilityStatusMessages as messages, + pluginStatusMessages +} from "./messages"; import { getActiveChannelConfigsCount } from "./utils"; interface PluginAvailabilityStatusProps { - plugin: Plugins_plugins_edges_node; + plugin: PluginBaseFragment; } const PluginAvailabilityStatus: React.FC = ({ diff --git a/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/GlobalConfigPluginPopupBody.tsx b/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/GlobalConfigPluginPopupBody.tsx index 79d305cf8..d728edf81 100644 --- a/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/GlobalConfigPluginPopupBody.tsx +++ b/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/GlobalConfigPluginPopupBody.tsx @@ -1,12 +1,14 @@ import { CardContent, Typography } from "@material-ui/core"; import CardSpacer from "@saleor/components/CardSpacer"; -import { PluginBaseFragment } from "@saleor/fragments/types/PluginBaseFragment"; +import { PluginBaseFragment } from "@saleor/graphql"; import { Pill } from "@saleor/macaw-ui"; import React from "react"; import { useIntl } from "react-intl"; -import { globalConfigPluginMessages as messages } from "../messages"; -import { pluginStatusMessages } from "../messages"; +import { + globalConfigPluginMessages as messages, + pluginStatusMessages +} from "../messages"; interface GlobalConfigPluginPopupBodyProps { plugin: PluginBaseFragment; diff --git a/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/PluginAvailabilityStatusPopup.tsx b/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/PluginAvailabilityStatusPopup.tsx index f7669bef9..b0cf8b575 100644 --- a/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/PluginAvailabilityStatusPopup.tsx +++ b/src/plugins/components/PluginsList/PluginAvailabilityStatusPopup/PluginAvailabilityStatusPopup.tsx @@ -1,6 +1,6 @@ import { Card, Popper } from "@material-ui/core"; import ChannelsAvailabilityMenuContent from "@saleor/components/ChannelsAvailabilityMenuContent"; -import { PluginBaseFragment } from "@saleor/fragments/types/PluginBaseFragment"; +import { PluginBaseFragment } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; import { isPluginGlobal } from "@saleor/plugins/views/utils"; import React from "react"; diff --git a/src/plugins/components/PluginsList/PluginChannelAvailabilityCell.tsx b/src/plugins/components/PluginsList/PluginChannelAvailabilityCell.tsx index b69234ea5..4547729b9 100644 --- a/src/plugins/components/PluginsList/PluginChannelAvailabilityCell.tsx +++ b/src/plugins/components/PluginsList/PluginChannelAvailabilityCell.tsx @@ -1,6 +1,6 @@ import { TableCell } from "@material-ui/core"; import Skeleton from "@saleor/components/Skeleton"; -import { PluginBaseFragment } from "@saleor/fragments/types/PluginBaseFragment"; +import { PluginBaseFragment } from "@saleor/graphql"; import React, { useRef, useState } from "react"; import PluginAvailabilityStatus from "./PluginAvailabilityStatus"; diff --git a/src/plugins/components/PluginsList/PluginChannelConfigurationCell.tsx b/src/plugins/components/PluginsList/PluginChannelConfigurationCell.tsx index 53a3b9100..d988a6d62 100644 --- a/src/plugins/components/PluginsList/PluginChannelConfigurationCell.tsx +++ b/src/plugins/components/PluginsList/PluginChannelConfigurationCell.tsx @@ -1,5 +1,5 @@ import { TableCell } from "@material-ui/core"; -import { PluginBaseFragment } from "@saleor/fragments/types/PluginBaseFragment"; +import { PluginBaseFragment } from "@saleor/graphql"; import { isPluginGlobal } from "@saleor/plugins/views/utils"; import React from "react"; import { FormattedMessage } from "react-intl"; diff --git a/src/plugins/components/PluginsList/PluginsList.tsx b/src/plugins/components/PluginsList/PluginsList.tsx index db1282758..86e15f443 100644 --- a/src/plugins/components/PluginsList/PluginsList.tsx +++ b/src/plugins/components/PluginsList/PluginsList.tsx @@ -2,6 +2,7 @@ import { TableBody, TableCell, TableFooter, TableRow } from "@material-ui/core"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import TablePagination from "@saleor/components/TablePagination"; +import { PluginBaseFragment } from "@saleor/graphql"; import { EditIcon, makeStyles } from "@saleor/macaw-ui"; import { renderCollection } from "@saleor/misc"; import { PluginListUrlSortField } from "@saleor/plugins/urls"; @@ -9,7 +10,6 @@ import { ListProps, SortPage } from "@saleor/types"; import React from "react"; import { useIntl } from "react-intl"; -import { Plugins_plugins_edges_node } from "../../types/Plugins"; import PluginChannelAvailabilityCell from "./PluginChannelAvailabilityCell"; import PluginChannelConfigurationCell from "./PluginChannelConfigurationCell"; import PluginListTableHead from "./PluginListTableHead"; @@ -26,7 +26,7 @@ export const useStyles = makeStyles( export interface PluginListProps extends ListProps, SortPage { - plugins: Plugins_plugins_edges_node[]; + plugins: PluginBaseFragment[]; } const totalColSpan = 10; diff --git a/src/plugins/components/PluginsList/utils.ts b/src/plugins/components/PluginsList/utils.ts index dfd261b35..57559f3cc 100644 --- a/src/plugins/components/PluginsList/utils.ts +++ b/src/plugins/components/PluginsList/utils.ts @@ -1,5 +1,5 @@ import { Pill } from "@saleor/components/ChannelsAvailabilityMenuContent"; -import { PluginConfigurationBaseFragment } from "@saleor/fragments/types/PluginConfigurationBaseFragment"; +import { PluginConfigurationBaseFragment } from "@saleor/graphql"; import { PillColor } from "@saleor/macaw-ui"; import { MessageDescriptor } from "react-intl"; diff --git a/src/plugins/components/PluginsListPage/PluginsListPage.tsx b/src/plugins/components/PluginsListPage/PluginsListPage.tsx index 3d4e75ac5..35a017ae3 100644 --- a/src/plugins/components/PluginsListPage/PluginsListPage.tsx +++ b/src/plugins/components/PluginsListPage/PluginsListPage.tsx @@ -2,6 +2,7 @@ import { Card } from "@material-ui/core"; import Container from "@saleor/components/Container"; import FilterBar from "@saleor/components/FilterBar"; import PageHeader from "@saleor/components/PageHeader"; +import { PluginBaseFragment } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { Backlink } from "@saleor/macaw-ui"; import { PluginListUrlSortField } from "@saleor/plugins/urls"; @@ -14,7 +15,6 @@ import { import React from "react"; import { useIntl } from "react-intl"; -import { Plugins_plugins_edges_node } from "../../types/Plugins"; import PluginsList from "../PluginsList/PluginsList"; import { createFilterStructure, @@ -28,7 +28,7 @@ export interface PluginsListPageProps FilterPageProps, SortPage, TabPageProps { - plugins: Plugins_plugins_edges_node[]; + plugins: PluginBaseFragment[]; onBack: () => void; } diff --git a/src/plugins/components/PluginsListPage/filters.ts b/src/plugins/components/PluginsListPage/filters.ts index ee70e5001..95f020f99 100644 --- a/src/plugins/components/PluginsListPage/filters.ts +++ b/src/plugins/components/PluginsListPage/filters.ts @@ -1,7 +1,7 @@ import { IFilter, IFilterElement } from "@saleor/components/Filter"; +import { PluginConfigurationType } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { AutocompleteFilterOpts, FilterOpts } from "@saleor/types"; -import { PluginConfigurationType } from "@saleor/types/globalTypes"; import { createAutocompleteField, createBooleanField, diff --git a/src/plugins/fixtures.ts b/src/plugins/fixtures.ts index b0844bc88..9fc65ebb4 100644 --- a/src/plugins/fixtures.ts +++ b/src/plugins/fixtures.ts @@ -1,9 +1,10 @@ -import { ConfigurationTypeFieldEnum } from "@saleor/types/globalTypes"; +import { + ConfigurationTypeFieldEnum, + PluginBaseFragment, + PluginsDetailsFragment +} from "@saleor/graphql"; -import { Plugin_plugin } from "./types/Plugin"; -import { Plugins_plugins_edges_node } from "./types/Plugins"; - -export const pluginList: Plugins_plugins_edges_node[] = [ +export const pluginList: PluginBaseFragment[] = [ { __typename: "Plugin", globalConfiguration: null, @@ -45,7 +46,7 @@ export const pluginList: Plugins_plugins_edges_node[] = [ name: "VatLayer" } ]; -export const plugin: Plugin_plugin = { +export const plugin: PluginsDetailsFragment = { __typename: "Plugin", globalConfiguration: null, channelConfigurations: [ diff --git a/src/plugins/mutations.ts b/src/plugins/mutations.ts index 5e3fc8ab1..399d97640 100644 --- a/src/plugins/mutations.ts +++ b/src/plugins/mutations.ts @@ -1,25 +1,14 @@ import { gql } from "@apollo/client"; -import { pluginErrorFragment } from "@saleor/fragments/errors"; -import { pluginsDetailsFragment } from "@saleor/fragments/plugins"; -import { TypedMutation } from "../mutations"; -import { PluginUpdate, PluginUpdateVariables } from "./types/PluginUpdate"; - -const pluginUpdate = gql` - ${pluginsDetailsFragment} - ${pluginErrorFragment} +export const pluginUpdate = gql` mutation PluginUpdate($channelId: ID, $id: ID!, $input: PluginUpdateInput!) { pluginUpdate(channelId: $channelId, id: $id, input: $input) { errors { - ...PluginErrorFragment + ...PluginError } plugin { - ...PluginsDetailsFragment + ...PluginsDetails } } } `; -export const TypedPluginUpdate = TypedMutation< - PluginUpdate, - PluginUpdateVariables ->(pluginUpdate); diff --git a/src/plugins/queries.ts b/src/plugins/queries.ts index b0a599bbb..3987a30ca 100644 --- a/src/plugins/queries.ts +++ b/src/plugins/queries.ts @@ -1,15 +1,6 @@ import { gql } from "@apollo/client"; -import { - pluginBaseFragment, - pluginsDetailsFragment -} from "@saleor/fragments/plugins"; -import makeQuery from "@saleor/hooks/makeQuery"; -import { Plugin, PluginVariables } from "./types/Plugin"; -import { Plugins, PluginsVariables } from "./types/Plugins"; - -const pluginsList = gql` - ${pluginBaseFragment} +export const pluginsList = gql` query Plugins( $first: Int $after: String @@ -28,7 +19,7 @@ const pluginsList = gql` ) { edges { node { - ...PluginBaseFragment + ...PluginBase } } pageInfo { @@ -40,19 +31,11 @@ const pluginsList = gql` } } `; -export const usePluginsListQuery = makeQuery( - pluginsList -); -const pluginsDetails = gql` - ${pluginsDetailsFragment} +export const pluginsDetails = gql` query Plugin($id: ID!) { plugin(id: $id) { - ...PluginsDetailsFragment + ...PluginsDetails } } `; - -export const usePluginDetails = makeQuery( - pluginsDetails -); diff --git a/src/plugins/types/Plugin.ts b/src/plugins/types/Plugin.ts deleted file mode 100644 index e4c0a9374..000000000 --- a/src/plugins/types/Plugin.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ConfigurationTypeFieldEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: Plugin -// ==================================================== - -export interface Plugin_plugin_globalConfiguration_channel { - __typename: "Channel"; - id: string; - name: string; - slug: string; -} - -export interface Plugin_plugin_globalConfiguration_configuration { - __typename: "ConfigurationItem"; - name: string; - value: string | null; - type: ConfigurationTypeFieldEnum | null; - helpText: string | null; - label: string | null; -} - -export interface Plugin_plugin_globalConfiguration { - __typename: "PluginConfiguration"; - active: boolean; - channel: Plugin_plugin_globalConfiguration_channel | null; - configuration: (Plugin_plugin_globalConfiguration_configuration | null)[] | null; -} - -export interface Plugin_plugin_channelConfigurations_channel { - __typename: "Channel"; - id: string; - name: string; - slug: string; -} - -export interface Plugin_plugin_channelConfigurations_configuration { - __typename: "ConfigurationItem"; - name: string; - value: string | null; - type: ConfigurationTypeFieldEnum | null; - helpText: string | null; - label: string | null; -} - -export interface Plugin_plugin_channelConfigurations { - __typename: "PluginConfiguration"; - active: boolean; - channel: Plugin_plugin_channelConfigurations_channel | null; - configuration: (Plugin_plugin_channelConfigurations_configuration | null)[] | null; -} - -export interface Plugin_plugin { - __typename: "Plugin"; - id: string; - name: string; - description: string; - globalConfiguration: Plugin_plugin_globalConfiguration | null; - channelConfigurations: Plugin_plugin_channelConfigurations[]; -} - -export interface Plugin { - plugin: Plugin_plugin | null; -} - -export interface PluginVariables { - id: string; -} diff --git a/src/plugins/types/PluginUpdate.ts b/src/plugins/types/PluginUpdate.ts deleted file mode 100644 index 4e433e0d6..000000000 --- a/src/plugins/types/PluginUpdate.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PluginUpdateInput, PluginErrorCode, ConfigurationTypeFieldEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: PluginUpdate -// ==================================================== - -export interface PluginUpdate_pluginUpdate_errors { - __typename: "PluginError"; - code: PluginErrorCode; - field: string | null; - message: string | null; -} - -export interface PluginUpdate_pluginUpdate_plugin_globalConfiguration_channel { - __typename: "Channel"; - id: string; - name: string; - slug: string; -} - -export interface PluginUpdate_pluginUpdate_plugin_globalConfiguration_configuration { - __typename: "ConfigurationItem"; - name: string; - value: string | null; - type: ConfigurationTypeFieldEnum | null; - helpText: string | null; - label: string | null; -} - -export interface PluginUpdate_pluginUpdate_plugin_globalConfiguration { - __typename: "PluginConfiguration"; - active: boolean; - channel: PluginUpdate_pluginUpdate_plugin_globalConfiguration_channel | null; - configuration: (PluginUpdate_pluginUpdate_plugin_globalConfiguration_configuration | null)[] | null; -} - -export interface PluginUpdate_pluginUpdate_plugin_channelConfigurations_channel { - __typename: "Channel"; - id: string; - name: string; - slug: string; -} - -export interface PluginUpdate_pluginUpdate_plugin_channelConfigurations_configuration { - __typename: "ConfigurationItem"; - name: string; - value: string | null; - type: ConfigurationTypeFieldEnum | null; - helpText: string | null; - label: string | null; -} - -export interface PluginUpdate_pluginUpdate_plugin_channelConfigurations { - __typename: "PluginConfiguration"; - active: boolean; - channel: PluginUpdate_pluginUpdate_plugin_channelConfigurations_channel | null; - configuration: (PluginUpdate_pluginUpdate_plugin_channelConfigurations_configuration | null)[] | null; -} - -export interface PluginUpdate_pluginUpdate_plugin { - __typename: "Plugin"; - id: string; - name: string; - description: string; - globalConfiguration: PluginUpdate_pluginUpdate_plugin_globalConfiguration | null; - channelConfigurations: PluginUpdate_pluginUpdate_plugin_channelConfigurations[]; -} - -export interface PluginUpdate_pluginUpdate { - __typename: "PluginUpdate"; - errors: PluginUpdate_pluginUpdate_errors[]; - plugin: PluginUpdate_pluginUpdate_plugin | null; -} - -export interface PluginUpdate { - pluginUpdate: PluginUpdate_pluginUpdate | null; -} - -export interface PluginUpdateVariables { - channelId?: string | null; - id: string; - input: PluginUpdateInput; -} diff --git a/src/plugins/types/Plugins.ts b/src/plugins/types/Plugins.ts deleted file mode 100644 index e45dfce4e..000000000 --- a/src/plugins/types/Plugins.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PluginFilterInput, PluginSortingInput } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: Plugins -// ==================================================== - -export interface Plugins_plugins_edges_node_channelConfigurations_channel { - __typename: "Channel"; - id: string; - name: string; - slug: string; -} - -export interface Plugins_plugins_edges_node_channelConfigurations { - __typename: "PluginConfiguration"; - active: boolean; - channel: Plugins_plugins_edges_node_channelConfigurations_channel | null; -} - -export interface Plugins_plugins_edges_node_globalConfiguration_channel { - __typename: "Channel"; - id: string; - name: string; - slug: string; -} - -export interface Plugins_plugins_edges_node_globalConfiguration { - __typename: "PluginConfiguration"; - active: boolean; - channel: Plugins_plugins_edges_node_globalConfiguration_channel | null; -} - -export interface Plugins_plugins_edges_node { - __typename: "Plugin"; - id: string; - name: string; - description: string; - channelConfigurations: Plugins_plugins_edges_node_channelConfigurations[]; - globalConfiguration: Plugins_plugins_edges_node_globalConfiguration | null; -} - -export interface Plugins_plugins_edges { - __typename: "PluginCountableEdge"; - node: Plugins_plugins_edges_node; -} - -export interface Plugins_plugins_pageInfo { - __typename: "PageInfo"; - hasPreviousPage: boolean; - hasNextPage: boolean; - startCursor: string | null; - endCursor: string | null; -} - -export interface Plugins_plugins { - __typename: "PluginCountableConnection"; - edges: Plugins_plugins_edges[]; - pageInfo: Plugins_plugins_pageInfo; -} - -export interface Plugins { - plugins: Plugins_plugins | null; -} - -export interface PluginsVariables { - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; - filter?: PluginFilterInput | null; - sort?: PluginSortingInput | null; -} diff --git a/src/plugins/utils.ts b/src/plugins/utils.ts index 16129fd96..4f9ef93ee 100644 --- a/src/plugins/utils.ts +++ b/src/plugins/utils.ts @@ -1,8 +1,10 @@ -import { PluginConfigurationFragment_configuration } from "@saleor/fragments/types/PluginConfigurationFragment"; -import { ConfigurationTypeFieldEnum } from "@saleor/types/globalTypes"; +import { + ConfigurationItemFragment, + ConfigurationTypeFieldEnum +} from "@saleor/graphql"; export function isSecretField( - config: PluginConfigurationFragment_configuration[], + config: ConfigurationItemFragment[], field: string ) { return [ diff --git a/src/plugins/views/PluginDetails.test.ts b/src/plugins/views/PluginDetails.test.ts index c1feb0644..c3c5b89f3 100644 --- a/src/plugins/views/PluginDetails.test.ts +++ b/src/plugins/views/PluginDetails.test.ts @@ -1,21 +1,18 @@ -import { PluginConfigurationFragment_configuration } from "@saleor/fragments/types/PluginConfigurationFragment"; - import { + ConfigurationItemFragment, ConfigurationItemInput, ConfigurationTypeFieldEnum -} from "../../types/globalTypes"; +} from "@saleor/graphql"; + import { getConfigurationInput } from "./PluginsDetails"; -const baseConfig: Omit< - PluginConfigurationFragment_configuration, - "name" | "type" | "value" -> = { +const baseConfig: Omit = { __typename: "ConfigurationItem", helpText: "", label: "" }; -const config: PluginConfigurationFragment_configuration[] = [ +const config: ConfigurationItemFragment[] = [ { ...baseConfig, name: "field-1", diff --git a/src/plugins/views/PluginList/PluginList.tsx b/src/plugins/views/PluginList/PluginList.tsx index 300c3641a..747ca336e 100644 --- a/src/plugins/views/PluginList/PluginList.tsx +++ b/src/plugins/views/PluginList/PluginList.tsx @@ -3,6 +3,7 @@ import SaveFilterTabDialog, { SaveFilterTabDialogFormData } from "@saleor/components/SaveFilterTabDialog"; import { configurationMenuUrl } from "@saleor/configuration"; +import { usePluginsQuery } from "@saleor/graphql"; import { useChannelsSearchWithLoadMore } from "@saleor/hooks/useChannelsSearchWithLoadMore"; import useListSettings from "@saleor/hooks/useListSettings"; import useNavigator from "@saleor/hooks/useNavigator"; @@ -20,7 +21,6 @@ import { getSortParams } from "@saleor/utils/sort"; import React from "react"; import PluginsListPage from "../../components/PluginsListPage/PluginsListPage"; -import { usePluginsListQuery } from "../../queries"; import { pluginListUrl, PluginListUrlDialog, @@ -61,7 +61,7 @@ export const PluginsList: React.FC = ({ params }) => { }), [params, settings.rowNumber] ); - const { data, loading } = usePluginsListQuery({ + const { data, loading } = usePluginsQuery({ displayLoader: true, variables: queryVariables }); diff --git a/src/plugins/views/PluginList/filters.test.ts b/src/plugins/views/PluginList/filters.test.ts index d1122e208..f41a25aec 100644 --- a/src/plugins/views/PluginList/filters.test.ts +++ b/src/plugins/views/PluginList/filters.test.ts @@ -1,9 +1,9 @@ +import { PluginConfigurationType } from "@saleor/graphql"; import { createFilterStructure, PluginFilterKeys } from "@saleor/plugins/components/PluginsListPage"; import { PluginListUrlFilters } from "@saleor/plugins/urls"; -import { PluginConfigurationType } from "@saleor/types/globalTypes"; import { getFilterQueryParams } from "@saleor/utils/filters"; import { stringifyQs } from "@saleor/utils/urls"; import { getExistingKeys } from "@test/filters"; diff --git a/src/plugins/views/PluginList/filters.ts b/src/plugins/views/PluginList/filters.ts index d3853d15b..6811e88f6 100644 --- a/src/plugins/views/PluginList/filters.ts +++ b/src/plugins/views/PluginList/filters.ts @@ -1,14 +1,11 @@ import { IFilterElement } from "@saleor/components/Filter"; +import { PluginConfigurationType, PluginFilterInput } from "@saleor/graphql"; import { ChannelsWithLoadMoreProps } from "@saleor/hooks/useChannelsSearch"; import { maybe, parseBoolean } from "@saleor/misc"; import { PluginFilterKeys, PluginListFilterOpts } from "@saleor/plugins/components/PluginsListPage"; -import { - PluginConfigurationType, - PluginFilterInput -} from "@saleor/types/globalTypes"; import { mapNodeToChoice } from "@saleor/utils/maps"; import { diff --git a/src/plugins/views/PluginList/sort.ts b/src/plugins/views/PluginList/sort.ts index 176ec8bde..e2074e072 100644 --- a/src/plugins/views/PluginList/sort.ts +++ b/src/plugins/views/PluginList/sort.ts @@ -1,5 +1,5 @@ +import { PluginSortField } from "@saleor/graphql"; import { PluginListUrlSortField } from "@saleor/plugins/urls"; -import { PluginSortField } from "@saleor/types/globalTypes"; import { createGetSortQueryVariables } from "@saleor/utils/sort"; export function getSortQueryField( diff --git a/src/plugins/views/PluginsDetails.tsx b/src/plugins/views/PluginsDetails.tsx index c1aec7868..350aad0ed 100644 --- a/src/plugins/views/PluginsDetails.tsx +++ b/src/plugins/views/PluginsDetails.tsx @@ -1,13 +1,17 @@ import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import { WindowTitle } from "@saleor/components/WindowTitle"; -import { PluginConfigurationFragment_configuration } from "@saleor/fragments/types/PluginConfigurationFragment"; +import { + ConfigurationItemFragment, + ConfigurationItemInput, + usePluginQuery, + usePluginUpdateMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; import { commonMessages } from "@saleor/intl"; import { extractMutationErrors } from "@saleor/misc"; -import { ConfigurationItemInput } from "@saleor/types/globalTypes"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -16,9 +20,6 @@ import PluginsDetailsPage, { PluginDetailsPageFormData } from "../components/PluginsDetailsPage"; import PluginSecretFieldDialog from "../components/PluginSecretFieldDialog"; -import { TypedPluginUpdate } from "../mutations"; -import { usePluginDetails } from "../queries"; -import { PluginUpdate } from "../types/PluginUpdate"; import { pluginListUrl, pluginUrl, @@ -26,8 +27,7 @@ import { PluginUrlQueryParams } from "../urls"; import { isSecretField } from "../utils"; -import { isPluginGlobal } from "./utils"; -import { getConfigByChannelId } from "./utils"; +import { getConfigByChannelId, isPluginGlobal } from "./utils"; export interface PluginsDetailsProps { id: string; @@ -35,7 +35,7 @@ export interface PluginsDetailsProps { } export function getConfigurationInput( - config: PluginConfigurationFragment_configuration[] | null, + config: ConfigurationItemFragment[] | null, input: ConfigurationItemInput[] | null ): ConfigurationItemInput[] | null { if (config === null || input === null) { @@ -58,7 +58,7 @@ export const PluginsDetails: React.FC = ({ const notify = useNotifier(); const intl = useIntl(); - const { data: pluginData, loading } = usePluginDetails({ + const { data: pluginData, loading } = usePluginQuery({ displayLoader: true, variables: { id } }); @@ -85,114 +85,110 @@ export const PluginsDetails: React.FC = ({ PluginUrlQueryParams >(navigate, params => pluginUrl(id, params), params); - const handleUpdate = (data: PluginUpdate) => { - if (data.pluginUpdate.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - closeModal(); + const [pluginUpdate, pluginUpdateOpts] = usePluginUpdateMutation({ + onCompleted: data => { + if (data.pluginUpdate.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + closeModal(); + } } - }; + }); + + const formErrors = pluginUpdateOpts.data?.pluginUpdate.errors || []; + + const handleFieldUpdate = (value: string) => + pluginUpdate({ + variables: { + channelId: selectedChannelId, + id, + input: { + configuration: [ + { + name: params.id, + value + } + ] + } + } + }); + + const handleSubmit = async (formData: PluginDetailsPageFormData) => + extractMutationErrors( + pluginUpdate({ + variables: { + channelId: selectedChannelId, + id, + input: { + active: formData.active, + configuration: getConfigurationInput( + selectedConfig?.configuration, + formData.configuration + ) + } + } + }) + ); return ( - - {(pluginUpdate, pluginUpdateOpts) => { - const formErrors = pluginUpdateOpts.data?.pluginUpdate.errors || []; - - const handleFieldUpdate = (value: string) => - pluginUpdate({ - variables: { - channelId: selectedChannelId, - id, - input: { - configuration: [ - { - name: params.id, - value - } - ] - } + <> + + navigate(pluginListUrl())} + onClear={id => + openModal("clear", { + id + }) + } + onEdit={id => + openModal("edit", { + id + }) + } + onSubmit={handleSubmit} + selectedConfig={selectedConfig} + setSelectedChannelId={setSelectedChannelId} + /> + {selectedConfig && ( + <> + - extractMutationErrors( - pluginUpdate({ - variables: { - channelId: selectedChannelId, - id, - input: { - active: formData.active, - configuration: getConfigurationInput( - selectedConfig?.configuration, - formData.configuration - ) - } - } - }) - ); - - return ( - <> - - navigate(pluginListUrl())} - onClear={id => - openModal("clear", { - id - }) - } - onEdit={id => - openModal("edit", { - id - }) - } - onSubmit={handleSubmit} - selectedConfig={selectedConfig} - setSelectedChannelId={setSelectedChannelId} - /> - {selectedConfig && ( - <> - handleFieldUpdate(null)} - > - - - - - field.name === params.id - )} - onClose={closeModal} - onConfirm={formData => handleFieldUpdate(formData.value)} - open={params.action === "edit" && !!params.id} - /> - + onClose={closeModal} + open={params.action === "clear" && !!params.id} + title={intl.formatMessage({ + defaultMessage: "Authorization Field Delete", + description: "header" + })} + onConfirm={() => handleFieldUpdate(null)} + > + + + + + field.name === params.id )} - - ); - }} - + onClose={closeModal} + onConfirm={formData => handleFieldUpdate(formData.value)} + open={params.action === "edit" && !!params.id} + /> + + )} + ); }; PluginsDetails.displayName = "PluginsDetails"; diff --git a/src/plugins/views/utils.ts b/src/plugins/views/utils.ts index 84850592a..52399e56d 100644 --- a/src/plugins/views/utils.ts +++ b/src/plugins/views/utils.ts @@ -1,4 +1,4 @@ -import { PluginConfigurationBaseFragment } from "@saleor/fragments/types/PluginConfigurationBaseFragment"; +import { PluginConfigurationBaseFragment } from "@saleor/graphql"; export const isPluginGlobal = ( globalConfiguration: PluginConfigurationBaseFragment diff --git a/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx b/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx index fa468b13b..4269b01f0 100644 --- a/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx +++ b/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.tsx @@ -8,18 +8,13 @@ import { SortableTableRow } from "@saleor/components/SortableTable"; import TableHead from "@saleor/components/TableHead"; +import { AttributeFragment, ProductAttributeType } from "@saleor/graphql"; import { Button, DeleteIcon, IconButton, makeStyles } from "@saleor/macaw-ui"; import { maybe, renderCollection, stopPropagation } from "@saleor/misc"; import { ListActions, ReorderAction } from "@saleor/types"; -import { ProductAttributeType } from "@saleor/types/globalTypes"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { - ProductTypeDetails_productType_productAttributes, - ProductTypeDetails_productType_variantAttributes -} from "../../types/ProductTypeDetails"; - const useStyles = makeStyles( { colAction: { @@ -46,9 +41,7 @@ const useStyles = makeStyles( ); interface ProductTypeAttributesProps extends ListActions { - attributes: - | ProductTypeDetails_productType_productAttributes[] - | ProductTypeDetails_productType_variantAttributes[]; + attributes: AttributeFragment[]; disabled: boolean; type: string; testId?: string; diff --git a/src/productTypes/components/ProductTypeCreatePage/ProductTypeCreatePage.tsx b/src/productTypes/components/ProductTypeCreatePage/ProductTypeCreatePage.tsx index c3754ac01..fcdc4b326 100644 --- a/src/productTypes/components/ProductTypeCreatePage/ProductTypeCreatePage.tsx +++ b/src/productTypes/components/ProductTypeCreatePage/ProductTypeCreatePage.tsx @@ -5,18 +5,17 @@ import Grid from "@saleor/components/Grid"; import Metadata, { MetadataFormData } from "@saleor/components/Metadata"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; +import { + ProductTypeDetailsQuery, + ProductTypeKindEnum, + WeightUnitsEnum +} from "@saleor/graphql"; import { ChangeEvent, FormChange, SubmitPromise } from "@saleor/hooks/useForm"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { makeProductTypeKindChangeHandler } from "@saleor/productTypes/handlers"; -import { ProductTypeDetails_taxTypes } from "@saleor/productTypes/types/ProductTypeDetails"; import { UserError } from "@saleor/types"; -import { - ProductTypeKindEnum, - WeightUnitsEnum -} from "@saleor/types/globalTypes"; import useMetadataChangeTrigger from "@saleor/utils/metadata/useMetadataChangeTrigger"; import React from "react"; import { useIntl } from "react-intl"; @@ -39,7 +38,7 @@ export interface ProductTypeCreatePageProps { disabled: boolean; pageTitle: string; saveButtonBarState: ConfirmButtonTransitionState; - taxTypes: ProductTypeDetails_taxTypes[]; + taxTypes: ProductTypeDetailsQuery["taxTypes"]; kind: ProductTypeKindEnum; onChangeKind: (kind: ProductTypeKindEnum) => void; onBack: () => void; @@ -58,7 +57,7 @@ const formInitialData: ProductTypeForm = { function handleTaxTypeChange( event: ChangeEvent, - taxTypes: ProductTypeDetails_taxTypes[], + taxTypes: ProductTypeDetailsQuery["taxTypes"], formChange: FormChange, displayChange: (name: string) => void ) { diff --git a/src/productTypes/components/ProductTypeDetails/ProductTypeDetails.tsx b/src/productTypes/components/ProductTypeDetails/ProductTypeDetails.tsx index c979260f2..ad6989a6d 100644 --- a/src/productTypes/components/ProductTypeDetails/ProductTypeDetails.tsx +++ b/src/productTypes/components/ProductTypeDetails/ProductTypeDetails.tsx @@ -8,10 +8,10 @@ import { import CardTitle from "@saleor/components/CardTitle"; import PreviewPill from "@saleor/components/PreviewPill"; import RadioGroupField from "@saleor/components/RadioGroupField"; +import { ProductTypeKindEnum } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { makeStyles } from "@saleor/macaw-ui"; import { UserError } from "@saleor/types"; -import { ProductTypeKindEnum } from "@saleor/types/globalTypes"; import { getFieldError } from "@saleor/utils/errors"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx b/src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx index a17bb9568..6a3f0a4c0 100644 --- a/src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx +++ b/src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx @@ -7,27 +7,23 @@ import Metadata from "@saleor/components/Metadata/Metadata"; import { MetadataFormData } from "@saleor/components/Metadata/types"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; +import { + ProductAttributeType, + ProductTypeDetailsQuery, + ProductTypeKindEnum, + WeightUnitsEnum +} from "@saleor/graphql"; import { ChangeEvent, FormChange, SubmitPromise } from "@saleor/hooks/useForm"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { maybe } from "@saleor/misc"; import { ListActions, ReorderEvent, UserError } from "@saleor/types"; -import { - ProductAttributeType, - ProductTypeKindEnum, - WeightUnitsEnum -} from "@saleor/types/globalTypes"; import { mapMetadataItemToInput } from "@saleor/utils/maps"; import useMetadataChangeTrigger from "@saleor/utils/metadata/useMetadataChangeTrigger"; import React from "react"; import { useIntl } from "react-intl"; -import { - ProductTypeDetails_productType, - ProductTypeDetails_taxTypes -} from "../../types/ProductTypeDetails"; import ProductTypeAttributes from "../ProductTypeAttributes/ProductTypeAttributes"; import ProductTypeDetails from "../ProductTypeDetails/ProductTypeDetails"; import ProductTypeShipping from "../ProductTypeShipping/ProductTypeShipping"; @@ -52,13 +48,13 @@ export interface ProductTypeForm extends MetadataFormData { export interface ProductTypeDetailsPageProps { errors: UserError[]; - productType: ProductTypeDetails_productType; + productType: ProductTypeDetailsQuery["productType"]; defaultWeightUnit: WeightUnitsEnum; disabled: boolean; pageTitle: string; productAttributeList: ListActions; saveButtonBarState: ConfirmButtonTransitionState; - taxTypes: ProductTypeDetails_taxTypes[]; + taxTypes: ProductTypeDetailsQuery["taxTypes"]; variantAttributeList: ListActions; onAttributeAdd: (type: ProductAttributeType) => void; onAttributeClick: (id: string) => void; @@ -74,7 +70,7 @@ export interface ProductTypeDetailsPageProps { function handleTaxTypeChange( event: ChangeEvent, - taxTypes: ProductTypeDetails_taxTypes[], + taxTypes: ProductTypeDetailsQuery["taxTypes"], formChange: FormChange, displayChange: (name: string) => void ) { diff --git a/src/productTypes/components/ProductTypeList/ProductTypeList.tsx b/src/productTypes/components/ProductTypeList/ProductTypeList.tsx index 63daf117a..7a5a8ddf9 100644 --- a/src/productTypes/components/ProductTypeList/ProductTypeList.tsx +++ b/src/productTypes/components/ProductTypeList/ProductTypeList.tsx @@ -11,6 +11,7 @@ import Skeleton from "@saleor/components/Skeleton"; import TableCellHeader from "@saleor/components/TableCellHeader"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; +import { ProductTypeFragment } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; import { ProductTypeListUrlSortField } from "@saleor/productTypes/urls"; import { getArrowDirection } from "@saleor/utils/sort"; @@ -19,7 +20,6 @@ import { FormattedMessage, useIntl } from "react-intl"; import { maybe, renderCollection } from "../../../misc"; import { ListActions, ListProps, SortPage } from "../../../types"; -import { ProductTypeList_productTypes_edges_node } from "../../types/ProductTypeList"; const useStyles = makeStyles( theme => ({ @@ -48,7 +48,7 @@ interface ProductTypeListProps extends ListProps, ListActions, SortPage { - productTypes: ProductTypeList_productTypes_edges_node[]; + productTypes: ProductTypeFragment[]; } const numberOfColumns = 4; diff --git a/src/productTypes/components/ProductTypeListPage/ProductTypeListPage.tsx b/src/productTypes/components/ProductTypeListPage/ProductTypeListPage.tsx index 07902b79d..bce11d498 100644 --- a/src/productTypes/components/ProductTypeListPage/ProductTypeListPage.tsx +++ b/src/productTypes/components/ProductTypeListPage/ProductTypeListPage.tsx @@ -2,6 +2,7 @@ import { Card } from "@material-ui/core"; import Container from "@saleor/components/Container"; import FilterBar from "@saleor/components/FilterBar"; import PageHeader from "@saleor/components/PageHeader"; +import { ProductTypeFragment } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { Backlink, Button } from "@saleor/macaw-ui"; import { ProductTypeListUrlSortField } from "@saleor/productTypes/urls"; @@ -15,7 +16,6 @@ import { SortPage, TabPageProps } from "../../../types"; -import { ProductTypeList_productTypes_edges_node } from "../../types/ProductTypeList"; import ProductTypeList from "../ProductTypeList"; import { createFilterStructure, @@ -29,7 +29,7 @@ export interface ProductTypeListPageProps FilterPageProps, SortPage, TabPageProps { - productTypes: ProductTypeList_productTypes_edges_node[]; + productTypes: ProductTypeFragment[]; onBack: () => void; } diff --git a/src/productTypes/components/ProductTypeListPage/filters.ts b/src/productTypes/components/ProductTypeListPage/filters.ts index 0ec157d8b..602b2e1bc 100644 --- a/src/productTypes/components/ProductTypeListPage/filters.ts +++ b/src/productTypes/components/ProductTypeListPage/filters.ts @@ -1,10 +1,7 @@ import { IFilter } from "@saleor/components/Filter"; +import { ProductTypeConfigurable, ProductTypeEnum } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { FilterOpts } from "@saleor/types"; -import { - ProductTypeConfigurable, - ProductTypeEnum -} from "@saleor/types/globalTypes"; import { createOptionsField } from "@saleor/utils/filters/fields"; import { defineMessages, IntlShape } from "react-intl"; diff --git a/src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx b/src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx index 9eb51926a..5a7150936 100644 --- a/src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx +++ b/src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx @@ -1,8 +1,8 @@ import { Card, CardContent } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import SingleAutocompleteSelectField from "@saleor/components/SingleAutocompleteSelectField"; +import { ProductTypeDetailsQuery } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; -import { ProductTypeDetails_taxTypes } from "@saleor/productTypes/types/ProductTypeDetails"; import React from "react"; import { useIntl } from "react-intl"; @@ -14,7 +14,7 @@ interface ProductTypeTaxesProps { taxType: string; }; taxTypeDisplayName: string; - taxTypes: ProductTypeDetails_taxTypes[]; + taxTypes: ProductTypeDetailsQuery["taxTypes"]; disabled: boolean; onChange: (event: React.ChangeEvent) => void; } diff --git a/src/productTypes/components/ProductTypeVariantAttributes/ProductTypeVariantAttributes.tsx b/src/productTypes/components/ProductTypeVariantAttributes/ProductTypeVariantAttributes.tsx index 0bb636fc1..a87dd4812 100644 --- a/src/productTypes/components/ProductTypeVariantAttributes/ProductTypeVariantAttributes.tsx +++ b/src/productTypes/components/ProductTypeVariantAttributes/ProductTypeVariantAttributes.tsx @@ -9,19 +9,14 @@ import { SortableTableRow } from "@saleor/components/SortableTable"; import TableHead from "@saleor/components/TableHead"; +import { ProductAttributeType, ProductTypeDetailsQuery } from "@saleor/graphql"; import { Button, DeleteIcon, IconButton, makeStyles } from "@saleor/macaw-ui"; import { maybe, renderCollection, stopPropagation } from "@saleor/misc"; import { ListActions, ReorderAction } from "@saleor/types"; -import { ProductAttributeType } from "@saleor/types/globalTypes"; import capitalize from "lodash/capitalize"; import React, { useEffect } from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { - ProductTypeDetails_productType_assignedVariantAttributes, - ProductTypeDetails_productType_variantAttributes -} from "../../types/ProductTypeDetails"; - const useStyles = makeStyles( { colAction: { @@ -64,7 +59,7 @@ const useStyles = makeStyles( ); interface ProductTypeVariantAttributesProps extends ListActions { - assignedVariantAttributes: ProductTypeDetails_productType_assignedVariantAttributes[]; + assignedVariantAttributes: ProductTypeDetailsQuery["productType"]["assignedVariantAttributes"]; disabled: boolean; type: string; testId?: string; @@ -163,9 +158,9 @@ const ProductTypeVariantAttributes: React.FC disabled={disabled} dragRows selected={selected} - items={ - (assignedVariantAttributes as unknown) as ProductTypeDetails_productType_variantAttributes[] - } + items={assignedVariantAttributes?.map( + selectedAttribute => selectedAttribute.attribute + )} toggleAll={toggleAll} toolbar={toolbar} > diff --git a/src/productTypes/containers/ProductTypeOperations.tsx b/src/productTypes/containers/ProductTypeOperations.tsx deleted file mode 100644 index cb27823cc..000000000 --- a/src/productTypes/containers/ProductTypeOperations.tsx +++ /dev/null @@ -1,158 +0,0 @@ -import { MutationFunction } from "@apollo/client"; -import { - ProductTypeDetailsFragment, - ProductTypeDetailsFragment_productAttributes -} from "@saleor/fragments/types/ProductTypeDetailsFragment"; -import { ProductAttributeType, ReorderInput } from "@saleor/types/globalTypes"; -import React from "react"; - -import { getMutationProviderData } from "../../misc"; -import { PartialMutationProviderOutput } from "../../types"; -import { - ProductTypeAttributeReorderMutation, - TypedAssignProductAttributeMutation, - TypedProductTypeDeleteMutation, - TypedUnassignProductAttributeMutation -} from "../mutations"; -import { - AssignProductAttribute, - AssignProductAttributeVariables -} from "../types/AssignProductAttribute"; -import { - ProductTypeAttributeReorder, - ProductTypeAttributeReorderVariables -} from "../types/ProductTypeAttributeReorder"; -import { - ProductTypeDelete, - ProductTypeDeleteVariables -} from "../types/ProductTypeDelete"; -import { - UnassignProductAttribute, - UnassignProductAttributeVariables -} from "../types/UnassignProductAttribute"; - -function moveAttribute( - attributes: ProductTypeDetailsFragment_productAttributes[], - move: ReorderInput -) { - const attributeIndex = attributes.findIndex( - attribute => attribute.id === move.id - ); - const newIndex = attributeIndex + move.sortOrder; - - const attributesWithoutMovedOne = [ - ...attributes.slice(0, attributeIndex), - ...attributes.slice(attributeIndex + 1) - ]; - - return [ - ...attributesWithoutMovedOne.slice(0, newIndex), - attributes[attributeIndex], - ...attributesWithoutMovedOne.slice(newIndex) - ]; -} - -interface ProductTypeOperationsProps { - children: (props: { - assignAttribute: PartialMutationProviderOutput< - AssignProductAttribute, - AssignProductAttributeVariables - >; - unassignAttribute: PartialMutationProviderOutput< - UnassignProductAttribute, - UnassignProductAttributeVariables - >; - deleteProductType: PartialMutationProviderOutput< - ProductTypeDelete, - ProductTypeDeleteVariables - >; - reorderAttribute: PartialMutationProviderOutput< - ProductTypeAttributeReorder, - ProductTypeAttributeReorderVariables - >; - }) => React.ReactNode; - productType: ProductTypeDetailsFragment; - onAssignAttribute: (data: AssignProductAttribute) => void; - onUnassignAttribute: (data: UnassignProductAttribute) => void; - onProductTypeAttributeReorder: (data: ProductTypeAttributeReorder) => void; - onProductTypeDelete: (data: ProductTypeDelete) => void; -} - -const ProductTypeOperations: React.FC = ({ - children, - productType, - onAssignAttribute, - onUnassignAttribute, - onProductTypeAttributeReorder, - onProductTypeDelete -}) => ( - - {(...deleteProductType) => ( - - {(...assignAttribute) => ( - - {(...unassignAttribute) => ( - - {(reorderAttributeMutation, reorderAttributeMutationResult) => { - const reorderAttributeMutationFn: MutationFunction< - ProductTypeAttributeReorder, - ProductTypeAttributeReorderVariables - > = opts => { - const optimisticResponse: ProductTypeAttributeReorder = { - productTypeReorderAttributes: { - __typename: "ProductTypeReorderAttributes" as "ProductTypeReorderAttributes", - errors: [], - productType: { - ...productType, - productAttributes: - opts.variables.type === ProductAttributeType.PRODUCT - ? moveAttribute( - productType.productAttributes, - opts.variables.move - ) - : productType.productAttributes, - variantAttributes: - opts.variables.type === ProductAttributeType.VARIANT - ? moveAttribute( - productType.variantAttributes, - opts.variables.move - ) - : productType.variantAttributes - } - } - }; - return reorderAttributeMutation({ - ...opts, - optimisticResponse - }); - }; - - return children({ - assignAttribute: getMutationProviderData( - ...assignAttribute - ), - deleteProductType: getMutationProviderData( - ...deleteProductType - ), - reorderAttribute: getMutationProviderData( - reorderAttributeMutationFn, - reorderAttributeMutationResult - ), - unassignAttribute: getMutationProviderData( - ...unassignAttribute - ) - }); - }} - - )} - - )} - - )} - -); -export default ProductTypeOperations; diff --git a/src/productTypes/fixtures.ts b/src/productTypes/fixtures.ts index df4f9e0b8..9e7227391 100644 --- a/src/productTypes/fixtures.ts +++ b/src/productTypes/fixtures.ts @@ -1,19 +1,16 @@ -import { - ProductType_productType, - ProductType_productType_productAttributes -} from "@saleor/products/types/ProductType"; -import { SearchProductTypes_search_edges_node } from "@saleor/searches/types/SearchProductTypes"; - import { AttributeInputTypeEnum, AttributeTypeEnum, + ProductTypeDetailsQuery, ProductTypeKindEnum, + ProductTypeListQuery, + ProductTypeQuery, + SearchProductTypesQuery, WeightUnitsEnum -} from "../types/globalTypes"; -import { ProductTypeDetails_productType } from "./types/ProductTypeDetails"; -import { ProductTypeList_productTypes_edges_node } from "./types/ProductTypeList"; +} from "@saleor/graphql"; +import { RelayToFlat } from "@saleor/types"; -export const attributes: ProductType_productType_productAttributes[] = [ +export const attributes: ProductTypeQuery["productType"]["productAttributes"] = [ { node: { __typename: "Attribute" as "Attribute", @@ -969,7 +966,7 @@ export const attributes: ProductType_productType_productAttributes[] = [ } ].map(edge => edge.node); -export const productTypeSearch: ProductType_productType = { +export const productTypeSearch: ProductTypeQuery["productType"] = { __typename: "ProductType" as "ProductType", hasVariants: true, id: "UHJvZHVjdFR5cGU6NA==", @@ -982,8 +979,10 @@ export const productTypeSearch: ProductType_productType = { } }; -export const productTypes: Array = [ +export const productTypes: Array[0] & + ProductTypeListQuery["productTypes"]["edges"][0]["node"]> = [ { __typename: "ProductType" as "ProductType", hasVariants: true, @@ -1064,7 +1063,7 @@ export const productTypes: Array( () => ({ filter: { diff --git a/src/productTypes/hooks/useProductTypeOperations.ts b/src/productTypes/hooks/useProductTypeOperations.ts new file mode 100644 index 000000000..f1f4524bf --- /dev/null +++ b/src/productTypes/hooks/useProductTypeOperations.ts @@ -0,0 +1,94 @@ +import { + AssignProductAttributeMutation, + ProductAttributeType, + ProductTypeAttributeReorderMutation, + ProductTypeDeleteMutation, + ProductTypeDetailsFragment, + ReorderInput, + UnassignProductAttributeMutation, + useAssignProductAttributeMutation, + useProductTypeAttributeReorderMutation, + useProductTypeDeleteMutation, + useUnassignProductAttributeMutation +} from "@saleor/graphql"; + +import { getMutationProviderData } from "../../misc"; + +function moveAttribute( + attributes: ProductTypeDetailsFragment["productAttributes"], + move: ReorderInput +) { + const attributeIndex = attributes.findIndex( + attribute => attribute.id === move.id + ); + const newIndex = attributeIndex + move.sortOrder; + + const attributesWithoutMovedOne = [ + ...attributes.slice(0, attributeIndex), + ...attributes.slice(attributeIndex + 1) + ]; + + return [ + ...attributesWithoutMovedOne.slice(0, newIndex), + attributes[attributeIndex], + ...attributesWithoutMovedOne.slice(newIndex) + ]; +} + +interface ProductTypeOperationsProps { + productType: ProductTypeDetailsFragment; + onAssignAttribute: (data: AssignProductAttributeMutation) => void; + onUnassignAttribute: (data: UnassignProductAttributeMutation) => void; + onProductTypeAttributeReorder: ( + data: ProductTypeAttributeReorderMutation + ) => void; + onProductTypeDelete: (data: ProductTypeDeleteMutation) => void; +} + +function useProductTypeOperations({ + onAssignAttribute, + onProductTypeAttributeReorder, + onProductTypeDelete, + onUnassignAttribute, + productType +}: ProductTypeOperationsProps) { + const deleteProductType = useProductTypeDeleteMutation({ + onCompleted: onProductTypeDelete + }); + const assignAttribute = useAssignProductAttributeMutation({ + onCompleted: onAssignAttribute + }); + const unassignAttribute = useUnassignProductAttributeMutation({ + onCompleted: onUnassignAttribute + }); + const [...reorderAttribute] = useProductTypeAttributeReorderMutation({ + onCompleted: onProductTypeAttributeReorder, + optimisticResponse: variables => ({ + __typename: "Mutation", + productTypeReorderAttributes: { + __typename: "ProductTypeReorderAttributes" as "ProductTypeReorderAttributes", + errors: [], + productType: { + ...productType, + productAttributes: + variables.type === ProductAttributeType.PRODUCT + ? moveAttribute(productType.productAttributes, variables.move) + : productType.productAttributes, + variantAttributes: + variables.type === ProductAttributeType.VARIANT + ? moveAttribute(productType.variantAttributes, variables.move) + : productType.variantAttributes + } + } + }) + }); + + return { + assignAttribute: getMutationProviderData(...assignAttribute), + deleteProductType: getMutationProviderData(...deleteProductType), + reorderAttribute: getMutationProviderData(...reorderAttribute), + unassignAttribute: getMutationProviderData(...unassignAttribute) + }; +} + +export default useProductTypeOperations; diff --git a/src/productTypes/mutations.ts b/src/productTypes/mutations.ts index 99228b4a8..a4fa3f549 100644 --- a/src/productTypes/mutations.ts +++ b/src/productTypes/mutations.ts @@ -1,53 +1,6 @@ import { gql } from "@apollo/client"; -import { - productAttributeAssignErrorFragment, - productAttributeAssignmentUpdateErrorFragment, - productAttributeUnassignErrorFragment, - productTypeBulkDeleteErrorFragment, - productTypeBulkUpdateErrorFragment, - productTypeCreateErrorFragment, - productTypeDeleteErrorFragment, - productTypeReorderAttributesErrorFragment -} from "@saleor/fragments/errors"; -import { productTypeDetailsFragment } from "@saleor/fragments/productTypes"; -import makeMutation from "@saleor/hooks/makeMutation"; - -import { TypedMutation } from "../mutations"; -import { - AssignProductAttribute, - AssignProductAttributeVariables -} from "./types/AssignProductAttribute"; -import { - ProductAttributeAssignmentUpdate, - ProductAttributeAssignmentUpdateVariables -} from "./types/ProductAttributeAssignmentUpdate"; -import { - ProductTypeAttributeReorder, - ProductTypeAttributeReorderVariables -} from "./types/ProductTypeAttributeReorder"; -import { - ProductTypeBulkDelete, - ProductTypeBulkDeleteVariables -} from "./types/ProductTypeBulkDelete"; -import { - ProductTypeCreate, - ProductTypeCreateVariables -} from "./types/ProductTypeCreate"; -import { - ProductTypeDelete, - ProductTypeDeleteVariables -} from "./types/ProductTypeDelete"; -import { - ProductTypeUpdate, - ProductTypeUpdateVariables -} from "./types/ProductTypeUpdate"; -import { - UnassignProductAttribute, - UnassignProductAttributeVariables -} from "./types/UnassignProductAttribute"; export const productTypeDeleteMutation = gql` - ${productTypeDeleteErrorFragment} mutation ProductTypeDelete($id: ID!) { productTypeDelete(id: $id) { errors { @@ -59,13 +12,8 @@ export const productTypeDeleteMutation = gql` } } `; -export const TypedProductTypeDeleteMutation = TypedMutation< - ProductTypeDelete, - ProductTypeDeleteVariables ->(productTypeDeleteMutation); export const productTypeBulkDeleteMutation = gql` - ${productTypeBulkDeleteErrorFragment} mutation ProductTypeBulkDelete($ids: [ID]!) { productTypeBulkDelete(ids: $ids) { errors { @@ -74,33 +22,21 @@ export const productTypeBulkDeleteMutation = gql` } } `; -export const TypedProductTypeBulkDeleteMutation = TypedMutation< - ProductTypeBulkDelete, - ProductTypeBulkDeleteVariables ->(productTypeBulkDeleteMutation); export const productTypeUpdateMutation = gql` - ${productTypeDetailsFragment} - ${productTypeBulkUpdateErrorFragment} mutation ProductTypeUpdate($id: ID!, $input: ProductTypeInput!) { productTypeUpdate(id: $id, input: $input) { errors { ...ProductTypeBulkUpdateErrorFragment } productType { - ...ProductTypeDetailsFragment + ...ProductTypeDetails } } } `; -export const useProductTypeUpdateMutation = makeMutation< - ProductTypeUpdate, - ProductTypeUpdateVariables ->(productTypeUpdateMutation); export const assignProductAttributeMutation = gql` - ${productAttributeAssignErrorFragment} - ${productTypeDetailsFragment} mutation AssignProductAttribute( $id: ID! $operations: [ProductAttributeAssignInput!]! @@ -110,57 +46,39 @@ export const assignProductAttributeMutation = gql` ...ProductAttributeAssignErrorFragment } productType { - ...ProductTypeDetailsFragment + ...ProductTypeDetails } } } `; -export const TypedAssignProductAttributeMutation = TypedMutation< - AssignProductAttribute, - AssignProductAttributeVariables ->(assignProductAttributeMutation); export const unassignProductAttributeMutation = gql` - ${productTypeDetailsFragment} - ${productAttributeUnassignErrorFragment} mutation UnassignProductAttribute($id: ID!, $ids: [ID]!) { productAttributeUnassign(productTypeId: $id, attributeIds: $ids) { errors { ...ProductAttributeUnassignErrorFragment } productType { - ...ProductTypeDetailsFragment + ...ProductTypeDetails } } } `; -export const TypedUnassignProductAttributeMutation = TypedMutation< - UnassignProductAttribute, - UnassignProductAttributeVariables ->(unassignProductAttributeMutation); export const productTypeCreateMutation = gql` - ${productTypeDetailsFragment} - ${productTypeCreateErrorFragment} mutation ProductTypeCreate($input: ProductTypeInput!) { productTypeCreate(input: $input) { errors { ...ProductTypeCreateErrorFragment } productType { - ...ProductTypeDetailsFragment + ...ProductTypeDetails } } } `; -export const TypedProductTypeCreateMutation = TypedMutation< - ProductTypeCreate, - ProductTypeCreateVariables ->(productTypeCreateMutation); -const productTypeAttributeReorder = gql` - ${productTypeDetailsFragment} - ${productTypeReorderAttributesErrorFragment} +export const productTypeAttributeReorder = gql` mutation ProductTypeAttributeReorder( $move: ReorderInput! $productTypeId: ID! @@ -175,19 +93,13 @@ const productTypeAttributeReorder = gql` ...ProductTypeReorderAttributesErrorFragment } productType { - ...ProductTypeDetailsFragment + ...ProductTypeDetails } } } `; -export const ProductTypeAttributeReorderMutation = TypedMutation< - ProductTypeAttributeReorder, - ProductTypeAttributeReorderVariables ->(productTypeAttributeReorder); export const productAttributeAssignmentUpdate = gql` - ${productTypeDetailsFragment} - ${productAttributeAssignmentUpdateErrorFragment} mutation ProductAttributeAssignmentUpdate( $operations: [ProductAttributeAssignmentUpdateInput]! $productTypeId: ID! @@ -200,13 +112,8 @@ export const productAttributeAssignmentUpdate = gql` ...ProductAttributeAssignmentUpdateErrorFragment } productType { - ...ProductTypeDetailsFragment + ...ProductTypeDetails } } } `; - -export const useProductAttributeAssignmentUpdateMutation = makeMutation< - ProductAttributeAssignmentUpdate, - ProductAttributeAssignmentUpdateVariables ->(productAttributeAssignmentUpdate); diff --git a/src/productTypes/queries.ts b/src/productTypes/queries.ts index d69a7853a..3679ec48a 100644 --- a/src/productTypes/queries.ts +++ b/src/productTypes/queries.ts @@ -1,25 +1,6 @@ import { gql } from "@apollo/client"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; -import { - productTypeDetailsFragment, - productTypeFragment -} from "@saleor/fragments/productTypes"; -import makeQuery from "@saleor/hooks/makeQuery"; - -import { TypedQuery } from "../queries"; -import { ProductTypeCreateData } from "./types/ProductTypeCreateData"; -import { - ProductTypeDetails, - ProductTypeDetailsVariables -} from "./types/ProductTypeDetails"; -import { - ProductTypeList, - ProductTypeListVariables -} from "./types/ProductTypeList"; export const productTypeListQuery = gql` - ${pageInfoFragment} - ${productTypeFragment} query ProductTypeList( $after: String $before: String @@ -38,25 +19,20 @@ export const productTypeListQuery = gql` ) { edges { node { - ...ProductTypeFragment + ...ProductType } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export const useProductTypeListQuery = makeQuery< - ProductTypeList, - ProductTypeListVariables ->(productTypeListQuery); export const productTypeDetailsQuery = gql` - ${productTypeDetailsFragment} query ProductTypeDetails($id: ID!) { productType(id: $id) { - ...ProductTypeDetailsFragment + ...ProductTypeDetails } shop { defaultWeightUnit @@ -67,10 +43,6 @@ export const productTypeDetailsQuery = gql` } } `; -export const TypedProductTypeDetailsQuery = TypedQuery< - ProductTypeDetails, - ProductTypeDetailsVariables ->(productTypeDetailsQuery); export const productTypeCreateDataQuery = gql` query ProductTypeCreateData { @@ -83,7 +55,3 @@ export const productTypeCreateDataQuery = gql` } } `; -export const TypedProductTypeCreateDataQuery = TypedQuery< - ProductTypeCreateData, - {} ->(productTypeCreateDataQuery); diff --git a/src/productTypes/types/AssignProductAttribute.ts b/src/productTypes/types/AssignProductAttribute.ts deleted file mode 100644 index f71363971..000000000 --- a/src/productTypes/types/AssignProductAttribute.ts +++ /dev/null @@ -1,117 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductAttributeAssignInput, ProductErrorCode, ProductTypeKindEnum, AttributeTypeEnum, MeasurementUnitsEnum, AttributeInputTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: AssignProductAttribute -// ==================================================== - -export interface AssignProductAttribute_productAttributeAssign_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface AssignProductAttribute_productAttributeAssign_productType_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface AssignProductAttribute_productAttributeAssign_productType_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface AssignProductAttribute_productAttributeAssign_productType_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface AssignProductAttribute_productAttributeAssign_productType_productAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface AssignProductAttribute_productAttributeAssign_productType_variantAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface AssignProductAttribute_productAttributeAssign_productType_assignedVariantAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface AssignProductAttribute_productAttributeAssign_productType_assignedVariantAttributes { - __typename: "AssignedVariantAttribute"; - attribute: AssignProductAttribute_productAttributeAssign_productType_assignedVariantAttributes_attribute; - variantSelection: boolean; -} - -export interface AssignProductAttribute_productAttributeAssign_productType_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface AssignProductAttribute_productAttributeAssign_productType { - __typename: "ProductType"; - id: string; - name: string; - kind: ProductTypeKindEnum; - hasVariants: boolean; - isShippingRequired: boolean; - taxType: AssignProductAttribute_productAttributeAssign_productType_taxType | null; - metadata: (AssignProductAttribute_productAttributeAssign_productType_metadata | null)[]; - privateMetadata: (AssignProductAttribute_productAttributeAssign_productType_privateMetadata | null)[]; - productAttributes: (AssignProductAttribute_productAttributeAssign_productType_productAttributes | null)[] | null; - variantAttributes: (AssignProductAttribute_productAttributeAssign_productType_variantAttributes | null)[] | null; - assignedVariantAttributes: (AssignProductAttribute_productAttributeAssign_productType_assignedVariantAttributes | null)[] | null; - weight: AssignProductAttribute_productAttributeAssign_productType_weight | null; -} - -export interface AssignProductAttribute_productAttributeAssign { - __typename: "ProductAttributeAssign"; - errors: AssignProductAttribute_productAttributeAssign_errors[]; - productType: AssignProductAttribute_productAttributeAssign_productType | null; -} - -export interface AssignProductAttribute { - productAttributeAssign: AssignProductAttribute_productAttributeAssign | null; -} - -export interface AssignProductAttributeVariables { - id: string; - operations: ProductAttributeAssignInput[]; -} diff --git a/src/productTypes/types/ProductAttributeAssignmentUpdate.ts b/src/productTypes/types/ProductAttributeAssignmentUpdate.ts deleted file mode 100644 index 8d869b957..000000000 --- a/src/productTypes/types/ProductAttributeAssignmentUpdate.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductAttributeAssignmentUpdateInput, ProductErrorCode, ProductTypeKindEnum, AttributeTypeEnum, MeasurementUnitsEnum, AttributeInputTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductAttributeAssignmentUpdate -// ==================================================== - -export interface ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; - attributes: string[] | null; -} - -export interface ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate_productType_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate_productType_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate_productType_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate_productType_productAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate_productType_variantAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate_productType_assignedVariantAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate_productType_assignedVariantAttributes { - __typename: "AssignedVariantAttribute"; - attribute: ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate_productType_assignedVariantAttributes_attribute; - variantSelection: boolean; -} - -export interface ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate_productType_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate_productType { - __typename: "ProductType"; - id: string; - name: string; - kind: ProductTypeKindEnum; - hasVariants: boolean; - isShippingRequired: boolean; - taxType: ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate_productType_taxType | null; - metadata: (ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate_productType_metadata | null)[]; - privateMetadata: (ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate_productType_privateMetadata | null)[]; - productAttributes: (ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate_productType_productAttributes | null)[] | null; - variantAttributes: (ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate_productType_variantAttributes | null)[] | null; - assignedVariantAttributes: (ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate_productType_assignedVariantAttributes | null)[] | null; - weight: ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate_productType_weight | null; -} - -export interface ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate { - __typename: "ProductAttributeAssignmentUpdate"; - errors: ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate_errors[]; - productType: ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate_productType | null; -} - -export interface ProductAttributeAssignmentUpdate { - productAttributeAssignmentUpdate: ProductAttributeAssignmentUpdate_productAttributeAssignmentUpdate | null; -} - -export interface ProductAttributeAssignmentUpdateVariables { - operations: (ProductAttributeAssignmentUpdateInput | null)[]; - productTypeId: string; -} diff --git a/src/productTypes/types/ProductTypeAttributeReorder.ts b/src/productTypes/types/ProductTypeAttributeReorder.ts deleted file mode 100644 index f8d6994aa..000000000 --- a/src/productTypes/types/ProductTypeAttributeReorder.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ReorderInput, ProductAttributeType, ProductErrorCode, ProductTypeKindEnum, AttributeTypeEnum, MeasurementUnitsEnum, AttributeInputTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductTypeAttributeReorder -// ==================================================== - -export interface ProductTypeAttributeReorder_productTypeReorderAttributes_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface ProductTypeAttributeReorder_productTypeReorderAttributes_productType_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface ProductTypeAttributeReorder_productTypeReorderAttributes_productType_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductTypeAttributeReorder_productTypeReorderAttributes_productType_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductTypeAttributeReorder_productTypeReorderAttributes_productType_productAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface ProductTypeAttributeReorder_productTypeReorderAttributes_productType_variantAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface ProductTypeAttributeReorder_productTypeReorderAttributes_productType_assignedVariantAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface ProductTypeAttributeReorder_productTypeReorderAttributes_productType_assignedVariantAttributes { - __typename: "AssignedVariantAttribute"; - attribute: ProductTypeAttributeReorder_productTypeReorderAttributes_productType_assignedVariantAttributes_attribute; - variantSelection: boolean; -} - -export interface ProductTypeAttributeReorder_productTypeReorderAttributes_productType_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ProductTypeAttributeReorder_productTypeReorderAttributes_productType { - __typename: "ProductType"; - id: string; - name: string; - kind: ProductTypeKindEnum; - hasVariants: boolean; - isShippingRequired: boolean; - taxType: ProductTypeAttributeReorder_productTypeReorderAttributes_productType_taxType | null; - metadata: (ProductTypeAttributeReorder_productTypeReorderAttributes_productType_metadata | null)[]; - privateMetadata: (ProductTypeAttributeReorder_productTypeReorderAttributes_productType_privateMetadata | null)[]; - productAttributes: (ProductTypeAttributeReorder_productTypeReorderAttributes_productType_productAttributes | null)[] | null; - variantAttributes: (ProductTypeAttributeReorder_productTypeReorderAttributes_productType_variantAttributes | null)[] | null; - assignedVariantAttributes: (ProductTypeAttributeReorder_productTypeReorderAttributes_productType_assignedVariantAttributes | null)[] | null; - weight: ProductTypeAttributeReorder_productTypeReorderAttributes_productType_weight | null; -} - -export interface ProductTypeAttributeReorder_productTypeReorderAttributes { - __typename: "ProductTypeReorderAttributes"; - errors: ProductTypeAttributeReorder_productTypeReorderAttributes_errors[]; - productType: ProductTypeAttributeReorder_productTypeReorderAttributes_productType | null; -} - -export interface ProductTypeAttributeReorder { - productTypeReorderAttributes: ProductTypeAttributeReorder_productTypeReorderAttributes | null; -} - -export interface ProductTypeAttributeReorderVariables { - move: ReorderInput; - productTypeId: string; - type: ProductAttributeType; -} diff --git a/src/productTypes/types/ProductTypeBulkDelete.ts b/src/productTypes/types/ProductTypeBulkDelete.ts deleted file mode 100644 index c022213ca..000000000 --- a/src/productTypes/types/ProductTypeBulkDelete.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductTypeBulkDelete -// ==================================================== - -export interface ProductTypeBulkDelete_productTypeBulkDelete_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface ProductTypeBulkDelete_productTypeBulkDelete { - __typename: "ProductTypeBulkDelete"; - errors: ProductTypeBulkDelete_productTypeBulkDelete_errors[]; -} - -export interface ProductTypeBulkDelete { - productTypeBulkDelete: ProductTypeBulkDelete_productTypeBulkDelete | null; -} - -export interface ProductTypeBulkDeleteVariables { - ids: (string | null)[]; -} diff --git a/src/productTypes/types/ProductTypeCreate.ts b/src/productTypes/types/ProductTypeCreate.ts deleted file mode 100644 index dda453934..000000000 --- a/src/productTypes/types/ProductTypeCreate.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductTypeInput, ProductErrorCode, ProductTypeKindEnum, AttributeTypeEnum, MeasurementUnitsEnum, AttributeInputTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductTypeCreate -// ==================================================== - -export interface ProductTypeCreate_productTypeCreate_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface ProductTypeCreate_productTypeCreate_productType_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface ProductTypeCreate_productTypeCreate_productType_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductTypeCreate_productTypeCreate_productType_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductTypeCreate_productTypeCreate_productType_productAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface ProductTypeCreate_productTypeCreate_productType_variantAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface ProductTypeCreate_productTypeCreate_productType_assignedVariantAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface ProductTypeCreate_productTypeCreate_productType_assignedVariantAttributes { - __typename: "AssignedVariantAttribute"; - attribute: ProductTypeCreate_productTypeCreate_productType_assignedVariantAttributes_attribute; - variantSelection: boolean; -} - -export interface ProductTypeCreate_productTypeCreate_productType_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ProductTypeCreate_productTypeCreate_productType { - __typename: "ProductType"; - id: string; - name: string; - kind: ProductTypeKindEnum; - hasVariants: boolean; - isShippingRequired: boolean; - taxType: ProductTypeCreate_productTypeCreate_productType_taxType | null; - metadata: (ProductTypeCreate_productTypeCreate_productType_metadata | null)[]; - privateMetadata: (ProductTypeCreate_productTypeCreate_productType_privateMetadata | null)[]; - productAttributes: (ProductTypeCreate_productTypeCreate_productType_productAttributes | null)[] | null; - variantAttributes: (ProductTypeCreate_productTypeCreate_productType_variantAttributes | null)[] | null; - assignedVariantAttributes: (ProductTypeCreate_productTypeCreate_productType_assignedVariantAttributes | null)[] | null; - weight: ProductTypeCreate_productTypeCreate_productType_weight | null; -} - -export interface ProductTypeCreate_productTypeCreate { - __typename: "ProductTypeCreate"; - errors: ProductTypeCreate_productTypeCreate_errors[]; - productType: ProductTypeCreate_productTypeCreate_productType | null; -} - -export interface ProductTypeCreate { - productTypeCreate: ProductTypeCreate_productTypeCreate | null; -} - -export interface ProductTypeCreateVariables { - input: ProductTypeInput; -} diff --git a/src/productTypes/types/ProductTypeCreateData.ts b/src/productTypes/types/ProductTypeCreateData.ts deleted file mode 100644 index 67a6c1efd..000000000 --- a/src/productTypes/types/ProductTypeCreateData.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { WeightUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ProductTypeCreateData -// ==================================================== - -export interface ProductTypeCreateData_shop { - __typename: "Shop"; - defaultWeightUnit: WeightUnitsEnum | null; -} - -export interface ProductTypeCreateData_taxTypes { - __typename: "TaxType"; - taxCode: string | null; - description: string | null; -} - -export interface ProductTypeCreateData { - shop: ProductTypeCreateData_shop; - taxTypes: (ProductTypeCreateData_taxTypes | null)[] | null; -} diff --git a/src/productTypes/types/ProductTypeDelete.ts b/src/productTypes/types/ProductTypeDelete.ts deleted file mode 100644 index 3697ccaec..000000000 --- a/src/productTypes/types/ProductTypeDelete.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductTypeDelete -// ==================================================== - -export interface ProductTypeDelete_productTypeDelete_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface ProductTypeDelete_productTypeDelete_productType { - __typename: "ProductType"; - id: string; -} - -export interface ProductTypeDelete_productTypeDelete { - __typename: "ProductTypeDelete"; - errors: ProductTypeDelete_productTypeDelete_errors[]; - productType: ProductTypeDelete_productTypeDelete_productType | null; -} - -export interface ProductTypeDelete { - productTypeDelete: ProductTypeDelete_productTypeDelete | null; -} - -export interface ProductTypeDeleteVariables { - id: string; -} diff --git a/src/productTypes/types/ProductTypeDetails.ts b/src/productTypes/types/ProductTypeDetails.ts deleted file mode 100644 index fdc258d40..000000000 --- a/src/productTypes/types/ProductTypeDetails.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductTypeKindEnum, AttributeTypeEnum, MeasurementUnitsEnum, AttributeInputTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ProductTypeDetails -// ==================================================== - -export interface ProductTypeDetails_productType_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface ProductTypeDetails_productType_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductTypeDetails_productType_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductTypeDetails_productType_productAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface ProductTypeDetails_productType_variantAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface ProductTypeDetails_productType_assignedVariantAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface ProductTypeDetails_productType_assignedVariantAttributes { - __typename: "AssignedVariantAttribute"; - attribute: ProductTypeDetails_productType_assignedVariantAttributes_attribute; - variantSelection: boolean; -} - -export interface ProductTypeDetails_productType_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ProductTypeDetails_productType { - __typename: "ProductType"; - id: string; - name: string; - kind: ProductTypeKindEnum; - hasVariants: boolean; - isShippingRequired: boolean; - taxType: ProductTypeDetails_productType_taxType | null; - metadata: (ProductTypeDetails_productType_metadata | null)[]; - privateMetadata: (ProductTypeDetails_productType_privateMetadata | null)[]; - productAttributes: (ProductTypeDetails_productType_productAttributes | null)[] | null; - variantAttributes: (ProductTypeDetails_productType_variantAttributes | null)[] | null; - assignedVariantAttributes: (ProductTypeDetails_productType_assignedVariantAttributes | null)[] | null; - weight: ProductTypeDetails_productType_weight | null; -} - -export interface ProductTypeDetails_shop { - __typename: "Shop"; - defaultWeightUnit: WeightUnitsEnum | null; -} - -export interface ProductTypeDetails_taxTypes { - __typename: "TaxType"; - taxCode: string | null; - description: string | null; -} - -export interface ProductTypeDetails { - productType: ProductTypeDetails_productType | null; - shop: ProductTypeDetails_shop; - taxTypes: (ProductTypeDetails_taxTypes | null)[] | null; -} - -export interface ProductTypeDetailsVariables { - id: string; -} diff --git a/src/productTypes/types/ProductTypeList.ts b/src/productTypes/types/ProductTypeList.ts deleted file mode 100644 index a6b97a12b..000000000 --- a/src/productTypes/types/ProductTypeList.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductTypeFilterInput, ProductTypeSortingInput, ProductTypeKindEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ProductTypeList -// ==================================================== - -export interface ProductTypeList_productTypes_edges_node_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface ProductTypeList_productTypes_edges_node { - __typename: "ProductType"; - id: string; - name: string; - kind: ProductTypeKindEnum; - hasVariants: boolean; - isShippingRequired: boolean; - taxType: ProductTypeList_productTypes_edges_node_taxType | null; -} - -export interface ProductTypeList_productTypes_edges { - __typename: "ProductTypeCountableEdge"; - node: ProductTypeList_productTypes_edges_node; -} - -export interface ProductTypeList_productTypes_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface ProductTypeList_productTypes { - __typename: "ProductTypeCountableConnection"; - edges: ProductTypeList_productTypes_edges[]; - pageInfo: ProductTypeList_productTypes_pageInfo; -} - -export interface ProductTypeList { - productTypes: ProductTypeList_productTypes | null; -} - -export interface ProductTypeListVariables { - after?: string | null; - before?: string | null; - first?: number | null; - last?: number | null; - filter?: ProductTypeFilterInput | null; - sort?: ProductTypeSortingInput | null; -} diff --git a/src/productTypes/types/ProductTypeUpdate.ts b/src/productTypes/types/ProductTypeUpdate.ts deleted file mode 100644 index c3b6a3fe2..000000000 --- a/src/productTypes/types/ProductTypeUpdate.ts +++ /dev/null @@ -1,117 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductTypeInput, ProductErrorCode, ProductTypeKindEnum, AttributeTypeEnum, MeasurementUnitsEnum, AttributeInputTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductTypeUpdate -// ==================================================== - -export interface ProductTypeUpdate_productTypeUpdate_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface ProductTypeUpdate_productTypeUpdate_productType_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface ProductTypeUpdate_productTypeUpdate_productType_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductTypeUpdate_productTypeUpdate_productType_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductTypeUpdate_productTypeUpdate_productType_productAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface ProductTypeUpdate_productTypeUpdate_productType_variantAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface ProductTypeUpdate_productTypeUpdate_productType_assignedVariantAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface ProductTypeUpdate_productTypeUpdate_productType_assignedVariantAttributes { - __typename: "AssignedVariantAttribute"; - attribute: ProductTypeUpdate_productTypeUpdate_productType_assignedVariantAttributes_attribute; - variantSelection: boolean; -} - -export interface ProductTypeUpdate_productTypeUpdate_productType_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ProductTypeUpdate_productTypeUpdate_productType { - __typename: "ProductType"; - id: string; - name: string; - kind: ProductTypeKindEnum; - hasVariants: boolean; - isShippingRequired: boolean; - taxType: ProductTypeUpdate_productTypeUpdate_productType_taxType | null; - metadata: (ProductTypeUpdate_productTypeUpdate_productType_metadata | null)[]; - privateMetadata: (ProductTypeUpdate_productTypeUpdate_productType_privateMetadata | null)[]; - productAttributes: (ProductTypeUpdate_productTypeUpdate_productType_productAttributes | null)[] | null; - variantAttributes: (ProductTypeUpdate_productTypeUpdate_productType_variantAttributes | null)[] | null; - assignedVariantAttributes: (ProductTypeUpdate_productTypeUpdate_productType_assignedVariantAttributes | null)[] | null; - weight: ProductTypeUpdate_productTypeUpdate_productType_weight | null; -} - -export interface ProductTypeUpdate_productTypeUpdate { - __typename: "ProductTypeUpdate"; - errors: ProductTypeUpdate_productTypeUpdate_errors[]; - productType: ProductTypeUpdate_productTypeUpdate_productType | null; -} - -export interface ProductTypeUpdate { - productTypeUpdate: ProductTypeUpdate_productTypeUpdate | null; -} - -export interface ProductTypeUpdateVariables { - id: string; - input: ProductTypeInput; -} diff --git a/src/productTypes/types/UnassignProductAttribute.ts b/src/productTypes/types/UnassignProductAttribute.ts deleted file mode 100644 index f13513c7c..000000000 --- a/src/productTypes/types/UnassignProductAttribute.ts +++ /dev/null @@ -1,117 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode, ProductTypeKindEnum, AttributeTypeEnum, MeasurementUnitsEnum, AttributeInputTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: UnassignProductAttribute -// ==================================================== - -export interface UnassignProductAttribute_productAttributeUnassign_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface UnassignProductAttribute_productAttributeUnassign_productType_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface UnassignProductAttribute_productAttributeUnassign_productType_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface UnassignProductAttribute_productAttributeUnassign_productType_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface UnassignProductAttribute_productAttributeUnassign_productType_productAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface UnassignProductAttribute_productAttributeUnassign_productType_variantAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface UnassignProductAttribute_productAttributeUnassign_productType_assignedVariantAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - type: AttributeTypeEnum | null; - visibleInStorefront: boolean; - filterableInDashboard: boolean; - filterableInStorefront: boolean; - unit: MeasurementUnitsEnum | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface UnassignProductAttribute_productAttributeUnassign_productType_assignedVariantAttributes { - __typename: "AssignedVariantAttribute"; - attribute: UnassignProductAttribute_productAttributeUnassign_productType_assignedVariantAttributes_attribute; - variantSelection: boolean; -} - -export interface UnassignProductAttribute_productAttributeUnassign_productType_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface UnassignProductAttribute_productAttributeUnassign_productType { - __typename: "ProductType"; - id: string; - name: string; - kind: ProductTypeKindEnum; - hasVariants: boolean; - isShippingRequired: boolean; - taxType: UnassignProductAttribute_productAttributeUnassign_productType_taxType | null; - metadata: (UnassignProductAttribute_productAttributeUnassign_productType_metadata | null)[]; - privateMetadata: (UnassignProductAttribute_productAttributeUnassign_productType_privateMetadata | null)[]; - productAttributes: (UnassignProductAttribute_productAttributeUnassign_productType_productAttributes | null)[] | null; - variantAttributes: (UnassignProductAttribute_productAttributeUnassign_productType_variantAttributes | null)[] | null; - assignedVariantAttributes: (UnassignProductAttribute_productAttributeUnassign_productType_assignedVariantAttributes | null)[] | null; - weight: UnassignProductAttribute_productAttributeUnassign_productType_weight | null; -} - -export interface UnassignProductAttribute_productAttributeUnassign { - __typename: "ProductAttributeUnassign"; - errors: UnassignProductAttribute_productAttributeUnassign_errors[]; - productType: UnassignProductAttribute_productAttributeUnassign_productType | null; -} - -export interface UnassignProductAttribute { - productAttributeUnassign: UnassignProductAttribute_productAttributeUnassign | null; -} - -export interface UnassignProductAttributeVariables { - id: string; - ids: (string | null)[]; -} diff --git a/src/productTypes/urls.ts b/src/productTypes/urls.ts index a34f55758..78705feda 100644 --- a/src/productTypes/urls.ts +++ b/src/productTypes/urls.ts @@ -1,4 +1,4 @@ -import { ProductTypeKindEnum } from "@saleor/types/globalTypes"; +import { ProductTypeKindEnum } from "@saleor/graphql"; import { stringifyQs } from "@saleor/utils/urls"; import urlJoin from "url-join"; diff --git a/src/productTypes/views/ProductTypeCreate.tsx b/src/productTypes/views/ProductTypeCreate.tsx index fe15a51f3..ace2eb7f0 100644 --- a/src/productTypes/views/ProductTypeCreate.tsx +++ b/src/productTypes/views/ProductTypeCreate.tsx @@ -1,22 +1,21 @@ import { WindowTitle } from "@saleor/components/WindowTitle"; +import { + ProductTypeKindEnum, + useProductTypeCreateDataQuery, + useProductTypeCreateMutation, + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; -import { ProductTypeKindEnum } from "@saleor/types/globalTypes"; import createMetadataCreateHandler from "@saleor/utils/handlers/metadataCreateHandler"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; import React from "react"; import { useIntl } from "react-intl"; -import { getMutationErrors, maybe } from "../../misc"; +import { getMutationErrors } from "../../misc"; import ProductTypeCreatePage, { ProductTypeForm } from "../components/ProductTypeCreatePage"; -import { TypedProductTypeCreateMutation } from "../mutations"; -import { TypedProductTypeCreateDataQuery } from "../queries"; -import { ProductTypeCreate as ProductTypeCreateMutation } from "../types/ProductTypeCreate"; import { productTypeAddUrl, ProductTypeAddUrlQueryParams, @@ -34,20 +33,8 @@ export const ProductTypeCreate: React.FC = ({ const navigate = useNavigator(); const notify = useNotifier(); const intl = useIntl(); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); - - const handleCreateSuccess = (updateData: ProductTypeCreateMutation) => { - if (updateData.productTypeCreate.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage({ - defaultMessage: "Successfully created product type" - }) - }); - navigate(productTypeUrl(updateData.productTypeCreate.productType.id)); - } - }; + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); const handleChangeKind = (kind: ProductTypeKindEnum) => navigate( @@ -57,70 +44,79 @@ export const ProductTypeCreate: React.FC = ({ }) ); + const { data, loading } = useProductTypeCreateDataQuery({ + displayLoader: true + }); + + const [ + createProductType, + createProductTypeOpts + ] = useProductTypeCreateMutation({ + onCompleted: data => { + if (data.productTypeCreate.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage({ + defaultMessage: "Successfully created product type" + }) + }); + navigate(productTypeUrl(data.productTypeCreate.productType.id)); + } + } + }); + + const handleCreate = async (formData: ProductTypeForm) => { + const result = await createProductType({ + variables: { + input: { + hasVariants: false, + isShippingRequired: formData.isShippingRequired, + name: formData.name, + kind: formData.kind, + taxCode: formData.taxType, + weight: formData.weight + } + } + }); + + return { + id: result.data?.productTypeCreate.productType?.id || null, + errors: getMutationErrors(result) + }; + }; + + const handleSubmit = createMetadataCreateHandler( + handleCreate, + updateMetadata, + updatePrivateMetadata + ); + return ( - - {(createProductType, createProductTypeOpts) => { - const handleCreate = async (formData: ProductTypeForm) => { - const result = await createProductType({ - variables: { - input: { - hasVariants: false, - isShippingRequired: formData.isShippingRequired, - name: formData.name, - kind: formData.kind, - taxCode: formData.taxType, - weight: formData.weight - } - } - }); - - return { - id: result.data?.productTypeCreate.productType?.id || null, - errors: getMutationErrors(result) - }; - }; - - const handleSubmit = createMetadataCreateHandler( - handleCreate, - updateMetadata, - updatePrivateMetadata - ); - - return ( - - {({ data, loading }) => ( - <> - - data.shop.defaultWeightUnit)} - disabled={loading} - errors={ - createProductTypeOpts.data?.productTypeCreate.errors || [] - } - pageTitle={intl.formatMessage({ - defaultMessage: "Create Product Type", - description: "header", - id: "productTypeCreatePageHeader" - })} - saveButtonBarState={createProductTypeOpts.status} - taxTypes={data?.taxTypes || []} - kind={params.kind} - onChangeKind={handleChangeKind} - onBack={() => navigate(productTypeListUrl())} - onSubmit={handleSubmit} - /> - - )} - - ); - }} - + <> + + navigate(productTypeListUrl())} + onSubmit={handleSubmit} + /> + ); }; export default ProductTypeCreate; diff --git a/src/productTypes/views/ProductTypeList/ProductTypeList.tsx b/src/productTypes/views/ProductTypeList/ProductTypeList.tsx index b7d409db3..3ab011898 100644 --- a/src/productTypes/views/ProductTypeList/ProductTypeList.tsx +++ b/src/productTypes/views/ProductTypeList/ProductTypeList.tsx @@ -2,6 +2,10 @@ import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { SaveFilterTabDialogFormData } from "@saleor/components/SaveFilterTabDialog"; +import { + useProductTypeBulkDeleteMutation, + useProductTypeListQuery +} from "@saleor/graphql"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useListSettings from "@saleor/hooks/useListSettings"; import useNavigator from "@saleor/hooks/useNavigator"; @@ -26,9 +30,6 @@ import TypeDeleteWarningDialog from "../../../components/TypeDeleteWarningDialog import { configurationMenuUrl } from "../../../configuration"; import { maybe } from "../../../misc"; import ProductTypeListPage from "../../components/ProductTypeListPage"; -import { TypedProductTypeBulkDeleteMutation } from "../../mutations"; -import { useProductTypeListQuery } from "../../queries"; -import { ProductTypeBulkDelete } from "../../types/ProductTypeBulkDelete"; import { productTypeAddUrl, productTypeListUrl, @@ -131,24 +132,6 @@ export const ProductTypeList: React.FC = ({ params }) => { params ); - const handleProductTypeBulkDelete = (data: ProductTypeBulkDelete) => { - if (data.productTypeBulkDelete.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - reset(); - refetch(); - navigate( - productTypeListUrl({ - ...params, - action: undefined, - ids: undefined - }) - ); - } - }; - const handleSort = createSortHandler(navigate, productTypeListUrl, params); const productTypeDeleteData = useProductTypeDelete({ @@ -158,86 +141,101 @@ export const ProductTypeList: React.FC = ({ params }) => { const productTypesData = mapEdgesToItems(data?.productTypes); - return ( - - {(productTypeBulkDelete, productTypeBulkDeleteOpts) => { - const onProductTypeBulkDelete = () => - productTypeBulkDelete({ - variables: { - ids: params.ids - } - }); - - return ( - <> - openModal("delete-search")} - onTabSave={() => openModal("save-search")} - tabs={tabs.map(tab => tab.name)} - disabled={loading} - productTypes={productTypesData} - pageInfo={pageInfo} - onAdd={() => navigate(productTypeAddUrl())} - onBack={() => navigate(configurationMenuUrl)} - onNextPage={loadNextPage} - onPreviousPage={loadPreviousPage} - onRowClick={id => () => navigate(productTypeUrl(id))} - onSort={handleSort} - isChecked={isSelected} - selected={selectedProductTypes.length} - sort={getSortParams(params)} - toggle={toggle} - toggleAll={toggleAll} - toolbar={ - - openModal("remove", { - ids: selectedProductTypes - }) - } - > - - - } - /> - {productTypesData && ( - - )} - - tabs[currentTab - 1].name, "...")} - /> - + const [ + productTypeBulkDelete, + productTypeBulkDeleteOpts + ] = useProductTypeBulkDeleteMutation({ + onCompleted: data => { + if (data.productTypeBulkDelete.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + reset(); + refetch(); + navigate( + productTypeListUrl({ + ...params, + action: undefined, + ids: undefined + }) ); - }} - + } + } + }); + + const onProductTypeBulkDelete = () => + productTypeBulkDelete({ + variables: { + ids: params.ids + } + }); + + return ( + <> + openModal("delete-search")} + onTabSave={() => openModal("save-search")} + tabs={tabs.map(tab => tab.name)} + disabled={loading} + productTypes={productTypesData} + pageInfo={pageInfo} + onAdd={() => navigate(productTypeAddUrl())} + onBack={() => navigate(configurationMenuUrl)} + onNextPage={loadNextPage} + onPreviousPage={loadPreviousPage} + onRowClick={id => () => navigate(productTypeUrl(id))} + onSort={handleSort} + isChecked={isSelected} + selected={selectedProductTypes.length} + sort={getSortParams(params)} + toggle={toggle} + toggleAll={toggleAll} + toolbar={ + + openModal("remove", { + ids: selectedProductTypes + }) + } + > + + + } + /> + {productTypesData && ( + + )} + + tabs[currentTab - 1].name, "...")} + /> + ); }; ProductTypeList.displayName = "ProductTypeList"; diff --git a/src/productTypes/views/ProductTypeList/filters.test.ts b/src/productTypes/views/ProductTypeList/filters.test.ts index ab81de88f..63f8eb1f5 100644 --- a/src/productTypes/views/ProductTypeList/filters.test.ts +++ b/src/productTypes/views/ProductTypeList/filters.test.ts @@ -1,9 +1,6 @@ +import { ProductTypeConfigurable, ProductTypeEnum } from "@saleor/graphql"; import { createFilterStructure } from "@saleor/productTypes/components/ProductTypeListPage"; import { ProductTypeListUrlFilters } from "@saleor/productTypes/urls"; -import { - ProductTypeConfigurable, - ProductTypeEnum -} from "@saleor/types/globalTypes"; import { getFilterQueryParams } from "@saleor/utils/filters"; import { stringifyQs } from "@saleor/utils/urls"; import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; diff --git a/src/productTypes/views/ProductTypeList/filters.ts b/src/productTypes/views/ProductTypeList/filters.ts index 65cd2a90f..7c54dc07f 100644 --- a/src/productTypes/views/ProductTypeList/filters.ts +++ b/src/productTypes/views/ProductTypeList/filters.ts @@ -1,14 +1,14 @@ import { IFilterElement } from "@saleor/components/Filter"; +import { + ProductTypeConfigurable, + ProductTypeEnum, + ProductTypeFilterInput +} from "@saleor/graphql"; import { findValueInEnum, maybe } from "@saleor/misc"; import { ProductTypeFilterKeys, ProductTypeListFilterOpts } from "@saleor/productTypes/components/ProductTypeListPage"; -import { - ProductTypeConfigurable, - ProductTypeEnum, - ProductTypeFilterInput -} from "@saleor/types/globalTypes"; import { createFilterTabUtils, diff --git a/src/productTypes/views/ProductTypeList/sort.ts b/src/productTypes/views/ProductTypeList/sort.ts index daabbce42..1bef40ea5 100644 --- a/src/productTypes/views/ProductTypeList/sort.ts +++ b/src/productTypes/views/ProductTypeList/sort.ts @@ -1,5 +1,5 @@ +import { ProductTypeSortField } from "@saleor/graphql"; import { ProductTypeListUrlSortField } from "@saleor/productTypes/urls"; -import { ProductTypeSortField } from "@saleor/types/globalTypes"; import { createGetSortQueryVariables } from "@saleor/utils/sort"; export function getSortQueryField( diff --git a/src/productTypes/views/ProductTypeUpdate/index.tsx b/src/productTypes/views/ProductTypeUpdate/index.tsx index 50c159751..296c29ef9 100644 --- a/src/productTypes/views/ProductTypeUpdate/index.tsx +++ b/src/productTypes/views/ProductTypeUpdate/index.tsx @@ -6,6 +6,17 @@ import NotFoundPage from "@saleor/components/NotFoundPage"; import TypeDeleteWarningDialog from "@saleor/components/TypeDeleteWarningDialog"; import { WindowTitle } from "@saleor/components/WindowTitle"; import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; +import { + AssignProductAttributeMutation, + ProductAttributeType, + ProductTypeDeleteMutation, + UnassignProductAttributeMutation, + useProductAttributeAssignmentUpdateMutation, + useProductTypeDetailsQuery, + useProductTypeUpdateMutation, + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation +} from "@saleor/graphql"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; @@ -13,30 +24,17 @@ import { commonMessages } from "@saleor/intl"; import { Button } from "@saleor/macaw-ui"; import { getStringOrPlaceholder, maybe } from "@saleor/misc"; import useProductTypeDelete from "@saleor/productTypes/hooks/useProductTypeDelete"; -import { - useProductAttributeAssignmentUpdateMutation, - useProductTypeUpdateMutation -} from "@saleor/productTypes/mutations"; +import useProductTypeOperations from "@saleor/productTypes/hooks/useProductTypeOperations"; +import useAvailableProductAttributeSearch from "@saleor/searches/useAvailableProductAttributeSearch"; import { ReorderEvent } from "@saleor/types"; -import { ProductAttributeType } from "@saleor/types/globalTypes"; import createMetadataUpdateHandler from "@saleor/utils/handlers/metadataUpdateHandler"; import { mapEdgesToItems } from "@saleor/utils/maps"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import ProductTypeDetailsPage, { ProductTypeForm } from "../../components/ProductTypeDetailsPage"; -import ProductTypeOperations from "../../containers/ProductTypeOperations"; -import useAvailableProductAttributeSearch from "../../hooks/useAvailableProductAttributeSearch"; -import { TypedProductTypeDetailsQuery } from "../../queries"; -import { AssignProductAttribute } from "../../types/AssignProductAttribute"; -import { ProductTypeDelete } from "../../types/ProductTypeDelete"; -import { UnassignProductAttribute } from "../../types/UnassignProductAttribute"; import { productTypeListUrl, productTypeUrl, @@ -110,8 +108,8 @@ export const ProductTypeUpdate: React.FC = ({ } }); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); const handleBack = () => navigate(productTypeListUrl()); const [ @@ -166,334 +164,323 @@ export const ProductTypeUpdate: React.FC = ({ params }); - return ( - - {({ data, loading: dataLoading }) => { - const productType = data?.productType; + const { data, loading: dataLoading } = useProductTypeDetailsQuery({ + displayLoader: true, + variables: { id } + }); - if (productType === null) { - return ; + const productType = data?.productType; + + const closeModal = () => navigate(productTypeUrl(id), { replace: true }); + + const handleAttributeAssignSuccess = ( + data: AssignProductAttributeMutation + ) => { + if (data.productAttributeAssign.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + closeModal(); + } else if ( + data.productAttributeAssign.errors !== null && + data.productAttributeAssign.errors.length > 0 + ) { + setErrors(prevErrors => ({ + ...prevErrors, + addAttributeErrors: data.productAttributeAssign.errors + })); + } + }; + const handleAttributeUnassignSuccess = ( + data: UnassignProductAttributeMutation + ) => { + if (data.productAttributeUnassign.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + closeModal(); + productAttributeListActions.reset(); + variantAttributeListActions.reset(); + } + }; + const handleProductTypeDeleteSuccess = ( + deleteData: ProductTypeDeleteMutation + ) => { + if (deleteData.productTypeDelete.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage({ + defaultMessage: "Product type deleted" + }) + }); + navigate(productTypeListUrl(), { replace: true }); + } + }; + + const { + assignAttribute, + deleteProductType, + unassignAttribute, + reorderAttribute + } = useProductTypeOperations({ + onAssignAttribute: handleAttributeAssignSuccess, + onProductTypeAttributeReorder: () => undefined, + onProductTypeDelete: handleProductTypeDeleteSuccess, + onUnassignAttribute: handleAttributeUnassignSuccess, + productType: data?.productType + }); + + const handleSubmit = createMetadataUpdateHandler( + data?.productType, + handleProductTypeUpdate, + variables => updateMetadata({ variables }), + variables => updatePrivateMetadata({ variables }) + ); + + const handleProductTypeDelete = () => deleteProductType.mutate({ id }); + const handleProductTypeVariantsToggle = (hasVariants: boolean) => + updateProductType({ + variables: { + id, + input: { + hasVariants } + } + }); + const handleAssignAttribute = () => + assignAttribute.mutate({ + id, + operations: params.ids.map(id => ({ + id, + type: ProductAttributeType[params.type] + })) + }); - const closeModal = () => - navigate(productTypeUrl(id), { replace: true }); + const handleAttributeUnassign = () => + unassignAttribute.mutate({ + id, + ids: [params.id] + }); - const handleAttributeAssignSuccess = (data: AssignProductAttribute) => { - if (data.productAttributeAssign.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - closeModal(); - } else if ( - data.productAttributeAssign.errors !== null && - data.productAttributeAssign.errors.length > 0 - ) { - setErrors(prevErrors => ({ - ...prevErrors, - addAttributeErrors: data.productAttributeAssign.errors - })); - } - }; - const handleAttributeUnassignSuccess = ( - data: UnassignProductAttribute - ) => { - if (data.productAttributeUnassign.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - closeModal(); - productAttributeListActions.reset(); - variantAttributeListActions.reset(); - } - }; - const handleProductTypeDeleteSuccess = ( - deleteData: ProductTypeDelete - ) => { - if (deleteData.productTypeDelete.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage({ - defaultMessage: "Product type deleted" - }) - }); - navigate(productTypeListUrl(), { replace: true }); - } - }; - const handleSubmit = createMetadataUpdateHandler( - data?.productType, - handleProductTypeUpdate, - variables => updateMetadata({ variables }), - variables => updatePrivateMetadata({ variables }) - ); + const handleBulkAttributeUnassign = () => + unassignAttribute.mutate({ + id, + ids: params.ids + }); - return ( - data.productType)} - onAssignAttribute={handleAttributeAssignSuccess} - onUnassignAttribute={handleAttributeUnassignSuccess} - onProductTypeDelete={handleProductTypeDeleteSuccess} - onProductTypeAttributeReorder={() => undefined} - > - {({ - assignAttribute, - deleteProductType, - unassignAttribute, - reorderAttribute - }) => { - const handleProductTypeDelete = () => - deleteProductType.mutate({ id }); - const handleProductTypeVariantsToggle = (hasVariants: boolean) => - updateProductType({ - variables: { - id, - input: { - hasVariants - } - } - }); - const handleAssignAttribute = () => - assignAttribute.mutate({ - id, - operations: params.ids.map(id => ({ - id, - type: ProductAttributeType[params.type] - })) - }); + const loading = + updateProductTypeOpts.loading || + updateProductAttributesOpts.loading || + dataLoading; - const handleAttributeUnassign = () => - unassignAttribute.mutate({ - id, - ids: [params.id] - }); + const handleAttributeReorder = ( + event: ReorderEvent, + type: ProductAttributeType + ) => { + const attributes = + type === ProductAttributeType.PRODUCT + ? data.productType.productAttributes + : data.productType.variantAttributes; - const handleBulkAttributeUnassign = () => - unassignAttribute.mutate({ - id, - ids: params.ids - }); + reorderAttribute.mutate({ + move: { + id: attributes[event.oldIndex].id, + sortOrder: event.newIndex - event.oldIndex + }, + productTypeId: id, + type + }); + }; - const loading = - updateProductTypeOpts.loading || - updateProductAttributesOpts.loading || - dataLoading; + if (productType === null) { + return ; + } - const handleAttributeReorder = ( - event: ReorderEvent, - type: ProductAttributeType - ) => { - const attributes = - type === ProductAttributeType.PRODUCT - ? data.productType.productAttributes - : data.productType.variantAttributes; + return ( + <> + data.productType.name)} /> + data.shop.defaultWeightUnit)} + disabled={loading} + errors={errors.formErrors} + pageTitle={maybe(() => data.productType.name)} + productType={maybe(() => data.productType)} + saveButtonBarState={ + updateProductTypeOpts.status || updateProductAttributesOpts.status + } + taxTypes={maybe(() => data.taxTypes, [])} + selectedVariantAttributes={selectedVariantAttributes} + setSelectedVariantAttributes={setSelectedVariantAttributes} + onAttributeAdd={type => + navigate( + productTypeUrl(id, { + action: "assign-attribute", + type + }) + ) + } + onAttributeClick={attributeId => navigate(attributeUrl(attributeId))} + onAttributeReorder={handleAttributeReorder} + onAttributeUnassign={attributeId => + navigate( + productTypeUrl(id, { + action: "unassign-attribute", + id: attributeId + }) + ) + } + onBack={handleBack} + onDelete={() => + navigate( + productTypeUrl(id, { + action: "remove" + }) + ) + } + onHasVariantsToggle={handleProductTypeVariantsToggle} + onSubmit={handleSubmit} + productAttributeList={{ + isChecked: productAttributeListActions.isSelected, + selected: productAttributeListActions.listElements.length, + toggle: productAttributeListActions.toggle, + toggleAll: productAttributeListActions.toggleAll, + toolbar: ( + + ) + }} + variantAttributeList={{ + isChecked: variantAttributeListActions.isSelected, + selected: variantAttributeListActions.listElements.length, + toggle: variantAttributeListActions.toggle, + toggleAll: variantAttributeListActions.toggleAll, + toolbar: ( + + ) + }} + /> + {!dataLoading && ( + <> + {Object.keys(ProductAttributeType).map(key => ( + + assignAttribute.opts.data.productAttributeAssign.errors.map( + err => err.message + ), + [] + )} + loading={result.loading} + onClose={closeModal} + onSubmit={handleAssignAttribute} + onFetch={search} + onFetchMore={loadMore} + onOpen={result.refetch} + hasMore={maybe( + () => + result.data.productType.availableAttributes.pageInfo + .hasNextPage, + false + )} + open={ + params.action === "assign-attribute" && + params.type === ProductAttributeType[key] + } + selected={maybe(() => params.ids, [])} + onToggle={attributeId => { + const ids = maybe(() => params.ids, []); + navigate( + productTypeUrl(id, { + ...params, + ids: ids.includes(attributeId) + ? params.ids.filter( + selectedId => selectedId !== attributeId + ) + : [...ids, attributeId] + }) + ); + }} + key={key} + /> + ))} + {productType && ( + + )} + + )} - reorderAttribute.mutate({ - move: { - id: attributes[event.oldIndex].id, - sortOrder: event.newIndex - event.oldIndex - }, - productTypeId: id, - type - }); - }; - - return ( - <> - data.productType.name)} /> - data.shop.defaultWeightUnit)} - disabled={loading} - errors={errors.formErrors} - pageTitle={maybe(() => data.productType.name)} - productType={maybe(() => data.productType)} - saveButtonBarState={ - updateProductTypeOpts.status || - updateProductAttributesOpts.status - } - taxTypes={maybe(() => data.taxTypes, [])} - selectedVariantAttributes={selectedVariantAttributes} - setSelectedVariantAttributes={setSelectedVariantAttributes} - onAttributeAdd={type => - navigate( - productTypeUrl(id, { - action: "assign-attribute", - type - }) - ) - } - onAttributeClick={attributeId => - navigate(attributeUrl(attributeId)) - } - onAttributeReorder={handleAttributeReorder} - onAttributeUnassign={attributeId => - navigate( - productTypeUrl(id, { - action: "unassign-attribute", - id: attributeId - }) - ) - } - onBack={handleBack} - onDelete={() => - navigate( - productTypeUrl(id, { - action: "remove" - }) - ) - } - onHasVariantsToggle={handleProductTypeVariantsToggle} - onSubmit={handleSubmit} - productAttributeList={{ - isChecked: productAttributeListActions.isSelected, - selected: productAttributeListActions.listElements.length, - toggle: productAttributeListActions.toggle, - toggleAll: productAttributeListActions.toggleAll, - toolbar: ( - - ) - }} - variantAttributeList={{ - isChecked: variantAttributeListActions.isSelected, - selected: variantAttributeListActions.listElements.length, - toggle: variantAttributeListActions.toggle, - toggleAll: variantAttributeListActions.toggleAll, - toolbar: ( - - ) - }} - /> - {!dataLoading && ( - <> - {Object.keys(ProductAttributeType).map(key => ( - - assignAttribute.opts.data.productAttributeAssign.errors.map( - err => err.message - ), - [] - )} - loading={result.loading} - onClose={closeModal} - onSubmit={handleAssignAttribute} - onFetch={search} - onFetchMore={loadMore} - onOpen={result.refetch} - hasMore={maybe( - () => - result.data.productType.availableAttributes - .pageInfo.hasNextPage, - false - )} - open={ - params.action === "assign-attribute" && - params.type === ProductAttributeType[key] - } - selected={maybe(() => params.ids, [])} - onToggle={attributeId => { - const ids = maybe(() => params.ids, []); - navigate( - productTypeUrl(id, { - ...params, - ids: ids.includes(attributeId) - ? params.ids.filter( - selectedId => selectedId !== attributeId - ) - : [...ids, attributeId] - }) - ); - }} - key={key} - /> - ))} - {productType && ( - - )} - - )} - - params.ids.length)} - confirmButtonState={unassignAttribute.opts.status} - onClose={closeModal} - onConfirm={handleBulkAttributeUnassign} - open={params.action === "unassign-attributes"} - itemTypeName={getStringOrPlaceholder( - data?.productType.name - )} - /> - - [ - ...data.productType.productAttributes, - ...data.productType.variantAttributes - ].find(attribute => attribute.id === params.id).name, - "..." - )} - confirmButtonState={unassignAttribute.opts.status} - onClose={closeModal} - onConfirm={handleAttributeUnassign} - open={params.action === "unassign-attribute"} - itemTypeName={getStringOrPlaceholder( - data?.productType.name - )} - /> - - ); - }} - - ); - }} - + params.ids.length)} + confirmButtonState={unassignAttribute.opts.status} + onClose={closeModal} + onConfirm={handleBulkAttributeUnassign} + open={params.action === "unassign-attributes"} + itemTypeName={getStringOrPlaceholder(data?.productType.name)} + /> + + [ + ...data.productType.productAttributes, + ...data.productType.variantAttributes + ].find(attribute => attribute.id === params.id).name, + "..." + )} + confirmButtonState={unassignAttribute.opts.status} + onClose={closeModal} + onConfirm={handleAttributeUnassign} + open={params.action === "unassign-attribute"} + itemTypeName={getStringOrPlaceholder(data?.productType.name)} + /> + ); }; export default ProductTypeUpdate; diff --git a/src/products/components/OrderDiscountProviders/OrderDiscountProvider.tsx b/src/products/components/OrderDiscountProviders/OrderDiscountProvider.tsx index baa266b57..053c39a6b 100644 --- a/src/products/components/OrderDiscountProviders/OrderDiscountProvider.tsx +++ b/src/products/components/OrderDiscountProviders/OrderDiscountProvider.tsx @@ -1,23 +1,22 @@ -/* eslint-disable sort-keys */ +import { + OrderDetailsFragment, + useOrderDiscountAddMutation, + useOrderDiscountDeleteMutation, + useOrderDiscountUpdateMutation +} from "@saleor/graphql"; import useNotifier from "@saleor/hooks/useNotifier"; import { getDefaultNotifierSuccessErrorData } from "@saleor/hooks/useNotifier/utils"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { OrderDiscountCommonInput } from "@saleor/orders/components/OrderDiscountCommonModal/types"; -import { - useOrderDiscountAddMutation, - useOrderDiscountDeleteMutation, - useOrderDiscountUpdateMutation -} from "@saleor/orders/mutations"; -import { OrderDetails_order } from "@saleor/orders/types/OrderDetails"; -import { OrderDiscountAdd } from "@saleor/orders/types/OrderDiscountAdd"; -import { OrderDiscountDelete } from "@saleor/orders/types/OrderDiscountDelete"; -import { OrderDiscountUpdate } from "@saleor/orders/types/OrderDiscountUpdate"; import React, { createContext } from "react"; import { useIntl } from "react-intl"; import { OrderDiscountConsumerCommonProps, OrderDiscountData } from "./types"; -import { useDiscountDialog } from "./utils"; -import { getManualOrderDiscount, getParsedDiscountData } from "./utils"; +import { + getManualOrderDiscount, + getParsedDiscountData, + useDiscountDialog +} from "./utils"; export interface OrderDiscountContextConsumerProps extends OrderDiscountConsumerCommonProps { @@ -30,7 +29,7 @@ export interface OrderDiscountContextConsumerProps interface OrderDiscountProviderProps { children: React.ReactNode; - order?: OrderDetails_order; + order?: OrderDetailsFragment; } export const OrderDiscountProvider: React.FC = ({ @@ -47,7 +46,7 @@ export const OrderDiscountProvider: React.FC = ({ const orderDiscount = getManualOrderDiscount(order); const [orderDiscountAdd, orderDiscountAddOpts] = useOrderDiscountAddMutation({ - onCompleted: ({ orderDiscountAdd: { errors } }: OrderDiscountAdd) => + onCompleted: ({ orderDiscountAdd: { errors } }) => handleDiscountDataSubmission(errors) }); @@ -55,7 +54,7 @@ export const OrderDiscountProvider: React.FC = ({ orderDiscountUpdate, orderDiscountUpdateOpts ] = useOrderDiscountUpdateMutation({ - onCompleted: ({ orderDiscountUpdate: { errors } }: OrderDiscountUpdate) => + onCompleted: ({ orderDiscountUpdate: { errors } }) => handleDiscountDataSubmission(errors) }); @@ -63,7 +62,7 @@ export const OrderDiscountProvider: React.FC = ({ orderDiscountRemove, orderDiscountRemoveOpts ] = useOrderDiscountDeleteMutation({ - onCompleted: ({ orderDiscountDelete: { errors } }: OrderDiscountDelete) => + onCompleted: ({ orderDiscountDelete: { errors } }) => handleDiscountDataSubmission(errors) }); diff --git a/src/products/components/OrderDiscountProviders/OrderLineDiscountProvider.tsx b/src/products/components/OrderDiscountProviders/OrderLineDiscountProvider.tsx index e183a768d..6836eabad 100644 --- a/src/products/components/OrderDiscountProviders/OrderLineDiscountProvider.tsx +++ b/src/products/components/OrderDiscountProviders/OrderLineDiscountProvider.tsx @@ -1,16 +1,13 @@ -/* eslint-disable sort-keys */ +import { + OrderDetailsFragment, + useOrderLineDiscountRemoveMutation, + useOrderLineDiscountUpdateMutation +} from "@saleor/graphql"; import useNotifier from "@saleor/hooks/useNotifier"; import { getDefaultNotifierSuccessErrorData } from "@saleor/hooks/useNotifier/utils"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { OrderDiscountCommonInput } from "@saleor/orders/components/OrderDiscountCommonModal/types"; import { getById } from "@saleor/orders/components/OrderReturnPage/utils"; -import { - useOrderLineDiscountRemoveMutation, - useOrderLineDiscountUpdateMutation -} from "@saleor/orders/mutations"; -import { OrderDetails_order } from "@saleor/orders/types/OrderDetails"; -import { OrderLineDiscountRemove } from "@saleor/orders/types/OrderLineDiscountRemove"; -import { OrderLineDiscountUpdate } from "@saleor/orders/types/OrderLineDiscountUpdate"; import React, { createContext, useState } from "react"; import { useIntl } from "react-intl"; @@ -20,8 +17,11 @@ import { OrderLineDiscountConsumerProps, OrderLineDiscountData } from "./types"; -import { useDiscountDialog } from "./utils"; -import { getOrderLineDiscount, getParsedDiscountData } from "./utils"; +import { + getOrderLineDiscount, + getParsedDiscountData, + useDiscountDialog +} from "./utils"; export interface OrderLineDiscountContextConsumerProps extends OrderDiscountConsumerCommonProps { @@ -34,7 +34,7 @@ export interface OrderLineDiscountContextConsumerProps interface DiscountProviderProps { children: React.ReactNode; - order: OrderDetails_order; + order: OrderDetailsFragment; } export const OrderLineDiscountContext = createContext< @@ -64,18 +64,16 @@ export const OrderLineDiscountProvider: React.FC = ({ orderLineDiscountAddOrUpdate, orderLineDiscountAddOrUpdateOpts ] = useOrderLineDiscountUpdateMutation({ - onCompleted: ({ - orderLineDiscountUpdate: { errors } - }: OrderLineDiscountUpdate) => handleDiscountDataSubmission(errors) + onCompleted: ({ orderLineDiscountUpdate: { errors } }) => + handleDiscountDataSubmission(errors) }); const [ orderLineDiscountRemove, orderLineDiscountRemoveOpts ] = useOrderLineDiscountRemoveMutation({ - onCompleted: ({ - orderLineDiscountRemove: { errors } - }: OrderLineDiscountRemove) => handleDiscountDataSubmission(errors) + onCompleted: ({ orderLineDiscountRemove: { errors } }) => + handleDiscountDataSubmission(errors) }); const handleDiscountDataSubmission = (errors: any[]) => { diff --git a/src/products/components/OrderDiscountProviders/types.ts b/src/products/components/OrderDiscountProviders/types.ts index a47dd978a..1359c50be 100644 --- a/src/products/components/OrderDiscountProviders/types.ts +++ b/src/products/components/OrderDiscountProviders/types.ts @@ -1,11 +1,10 @@ -import { Money } from "@saleor/fragments/types/Money"; +import { MoneyFragment, TaxedMoneyFragment } from "@saleor/graphql"; import { OrderDiscountCommonInput } from "@saleor/orders/components/OrderDiscountCommonModal/types"; -import { OrderDetails_order_lines_undiscountedUnitPrice } from "@saleor/orders/types/OrderDetails"; import { OrderLineDiscountContextConsumerProps } from "./OrderLineDiscountProvider"; export interface OrderDiscountData extends OrderDiscountCommonInput { - amount: Money; + amount: MoneyFragment; } export type GetOrderLineDiscountContextConsumerProps = ( @@ -13,16 +12,16 @@ export type GetOrderLineDiscountContextConsumerProps = ( ) => OrderLineDiscountContextConsumerProps; export interface OrderLineDiscountData extends OrderDiscountCommonInput { - moneyValue: Money; - undiscountedPrice: OrderDetails_order_lines_undiscountedUnitPrice; + moneyValue: MoneyFragment; + undiscountedPrice: TaxedMoneyFragment; } export interface OrderDiscountConsumerCommonProps { openDialog: () => void; closeDialog: () => void; isDialogOpen: boolean; - undiscountedPrice: Money; - discountedPrice: Money; + undiscountedPrice: MoneyFragment; + discountedPrice: MoneyFragment; } export interface OrderLineDiscountConsumerProps { diff --git a/src/products/components/OrderDiscountProviders/utils.ts b/src/products/components/OrderDiscountProviders/utils.ts index 64a8254b5..278c3c597 100644 --- a/src/products/components/OrderDiscountProviders/utils.ts +++ b/src/products/components/OrderDiscountProviders/utils.ts @@ -1,10 +1,5 @@ +import { OrderDetailsQuery, OrderDiscountType } from "@saleor/graphql"; import { OrderDiscountCommonInput } from "@saleor/orders/components/OrderDiscountCommonModal/types"; -import { - OrderDetails_order, - OrderDetails_order_discounts, - OrderDetails_order_lines -} from "@saleor/orders/types/OrderDetails"; -import { OrderDiscountType } from "@saleor/types/globalTypes"; import { useState } from "react"; import { OrderLineDiscountData } from "./types"; @@ -17,17 +12,17 @@ export const useDiscountDialog = () => { return { closeDialog, isDialogOpen, openDialog }; }; -export const getManualOrderDiscount = (order: OrderDetails_order) => +export const getManualOrderDiscount = (order: OrderDetailsQuery["order"]) => order ? getOrderDiscount(order, OrderDiscountType.MANUAL) : null; export const getOrderDiscount = ( - order: OrderDetails_order, + order: OrderDetailsQuery["order"], discountType: OrderDiscountType -): OrderDetails_order_discounts => +): OrderDetailsQuery["order"]["discounts"][0] => order.discounts.find(({ type }) => type === discountType); export const getOrderLineDiscount = ( - order: OrderDetails_order, + order: OrderDetailsQuery["order"], orderLineId: string ): OrderLineDiscountData => { const { @@ -37,7 +32,7 @@ export const getOrderLineDiscount = ( undiscountedUnitPrice: undiscountedPrice, unitDiscountType: calculationMode } = order.lines.find( - ({ id }: OrderDetails_order_lines) => id === orderLineId + ({ id }: OrderDetailsQuery["order"]["lines"][0]) => id === orderLineId ); if (!value) { diff --git a/src/products/components/ProductCreatePage/ProductCreatePage.tsx b/src/products/components/ProductCreatePage/ProductCreatePage.tsx index 6bd7593f7..f2b74d8c9 100644 --- a/src/products/components/ProductCreatePage/ProductCreatePage.tsx +++ b/src/products/components/ProductCreatePage/ProductCreatePage.tsx @@ -15,28 +15,29 @@ import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocomplet import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; import SeoForm from "@saleor/components/SeoForm"; -import { ProductChannelListingErrorFragment } from "@saleor/fragments/types/ProductChannelListingErrorFragment"; -import { ProductErrorWithAttributesFragment } from "@saleor/fragments/types/ProductErrorWithAttributesFragment"; -import { TaxTypeFragment } from "@saleor/fragments/types/TaxTypeFragment"; +import { + PermissionEnum, + ProductChannelListingErrorFragment, + ProductErrorWithAttributesFragment, + ProductTypeQuery, + SearchAttributeValuesQuery, + SearchCategoriesQuery, + SearchCollectionsQuery, + SearchPagesQuery, + SearchProductsQuery, + SearchProductTypesQuery, + SearchWarehousesQuery, + TaxTypeFragment +} from "@saleor/graphql"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import ProductVariantPrice from "@saleor/products/components/ProductVariantPrice"; -import { ProductType_productType } from "@saleor/products/types/ProductType"; import { getChoices } from "@saleor/products/utils/data"; -import { SearchAttributeValues_attribute_choices_edges_node } from "@saleor/searches/types/SearchAttributeValues"; -import { SearchCategories_search_edges_node } from "@saleor/searches/types/SearchCategories"; -import { SearchCollections_search_edges_node } from "@saleor/searches/types/SearchCollections"; -import { SearchPages_search_edges_node } from "@saleor/searches/types/SearchPages"; -import { SearchProducts_search_edges_node } from "@saleor/searches/types/SearchProducts"; -import { SearchProductTypes_search_edges_node } from "@saleor/searches/types/SearchProductTypes"; -import { SearchWarehouses_search_edges_node } from "@saleor/searches/types/SearchWarehouses"; -import { PermissionEnum } from "@saleor/types/globalTypes"; import React from "react"; import { useIntl } from "react-intl"; -import { FetchMoreProps } from "../../../types"; +import { FetchMoreProps, RelayToFlat } from "../../../types"; import ProductDetailsForm from "../ProductDetailsForm"; import ProductOrganization from "../ProductOrganization"; import ProductShipping from "../ProductShipping/ProductShipping"; @@ -53,24 +54,26 @@ interface ProductCreatePageProps { channelsErrors: ProductChannelListingErrorFragment[]; allChannelsCount: number; currentChannels: ChannelData[]; - collections: SearchCollections_search_edges_node[]; - categories: SearchCategories_search_edges_node[]; - attributeValues: SearchAttributeValues_attribute_choices_edges_node[]; + collections: RelayToFlat; + categories: RelayToFlat; + attributeValues: RelayToFlat< + SearchAttributeValuesQuery["attribute"]["choices"] + >; loading: boolean; fetchMoreCategories: FetchMoreProps; fetchMoreCollections: FetchMoreProps; fetchMoreProductTypes: FetchMoreProps; fetchMoreAttributeValues?: FetchMoreProps; initial?: Partial; - productTypes?: SearchProductTypes_search_edges_node[]; - referencePages?: SearchPages_search_edges_node[]; - referenceProducts?: SearchProducts_search_edges_node[]; + productTypes?: RelayToFlat; + referencePages?: RelayToFlat; + referenceProducts?: RelayToFlat; header: string; saveButtonBarState: ConfirmButtonTransitionState; weightUnit: string; - warehouses: SearchWarehouses_search_edges_node[]; + warehouses: RelayToFlat; taxTypes: TaxTypeFragment[]; - selectedProductType?: ProductType_productType; + selectedProductType?: ProductTypeQuery["productType"]; fetchCategories: (data: string) => void; fetchCollections: (data: string) => void; fetchProductTypes: (data: string) => void; diff --git a/src/products/components/ProductCreatePage/form.tsx b/src/products/components/ProductCreatePage/form.tsx index 1edba0bc9..f769ff01f 100644 --- a/src/products/components/ProductCreatePage/form.tsx +++ b/src/products/components/ProductCreatePage/form.tsx @@ -19,6 +19,13 @@ import { MetadataFormData } from "@saleor/components/Metadata"; import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; import { RichTextEditorChange } from "@saleor/components/RichTextEditor"; import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; +import { + ProductTypeQuery, + SearchPagesQuery, + SearchProductsQuery, + SearchProductTypesQuery, + SearchWarehousesQuery +} from "@saleor/graphql"; import useForm, { CommonUseFormResultWithHandlers, FormChange, @@ -31,7 +38,6 @@ import useFormset, { } from "@saleor/hooks/useFormset"; import useHandleFormSubmit from "@saleor/hooks/useHandleFormSubmit"; import { errorMessages } from "@saleor/intl"; -import { ProductType_productType } from "@saleor/products/types/ProductType"; import { getAttributeInputFromProductType, ProductType @@ -46,11 +52,7 @@ import { validatePrice } from "@saleor/products/utils/validation"; import { PRODUCT_CREATE_FORM_ID } from "@saleor/products/views/ProductCreate/consts"; -import { SearchPages_search_edges_node } from "@saleor/searches/types/SearchPages"; -import { SearchProducts_search_edges_node } from "@saleor/searches/types/SearchProducts"; -import { SearchProductTypes_search_edges_node } from "@saleor/searches/types/SearchProductTypes"; -import { SearchWarehouses_search_edges_node } from "@saleor/searches/types/SearchWarehouses"; -import { FetchMoreProps, ReorderEvent } from "@saleor/types"; +import { FetchMoreProps, RelayToFlat, ReorderEvent } from "@saleor/types"; import createMultiAutocompleteSelectHandler from "@saleor/utils/handlers/multiAutocompleteSelectChangeHandler"; import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; import useMetadataChangeTrigger from "@saleor/utils/metadata/useMetadataChangeTrigger"; @@ -143,17 +145,17 @@ export interface UseProductCreateFormOpts setSelectedTaxType: React.Dispatch>; setChannels: (channels: ChannelData[]) => void; selectedCollections: MultiAutocompleteChoiceType[]; - productTypes: SearchProductTypes_search_edges_node[]; - warehouses: SearchWarehouses_search_edges_node[]; + productTypes: RelayToFlat; + warehouses: RelayToFlat; currentChannels: ChannelData[]; - referencePages: SearchPages_search_edges_node[]; - referenceProducts: SearchProducts_search_edges_node[]; + referencePages: RelayToFlat; + referenceProducts: RelayToFlat; fetchReferencePages?: (data: string) => void; fetchMoreReferencePages?: FetchMoreProps; fetchReferenceProducts?: (data: string) => void; fetchMoreReferenceProducts?: FetchMoreProps; assignReferencesAttributeId?: string; - selectedProductType?: ProductType_productType; + selectedProductType?: ProductTypeQuery["productType"]; onSelectProductType: (productTypeId: string) => void; } diff --git a/src/products/components/ProductDetailsForm/ProductDetailsForm.tsx b/src/products/components/ProductDetailsForm/ProductDetailsForm.tsx index e5afd12f0..e6439d855 100644 --- a/src/products/components/ProductDetailsForm/ProductDetailsForm.tsx +++ b/src/products/components/ProductDetailsForm/ProductDetailsForm.tsx @@ -7,7 +7,7 @@ import Hr from "@saleor/components/Hr"; import RichTextEditor, { RichTextEditorChange } from "@saleor/components/RichTextEditor"; -import { ProductErrorFragment } from "@saleor/fragments/types/ProductErrorFragment"; +import { ProductErrorFragment } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { getFormErrors, getProductErrorMessage } from "@saleor/utils/errors"; import React from "react"; diff --git a/src/products/components/ProductExportDialog/ExportDialogSettings.tsx b/src/products/components/ProductExportDialog/ExportDialogSettings.tsx index d3a485274..b77fa9d00 100644 --- a/src/products/components/ProductExportDialog/ExportDialogSettings.tsx +++ b/src/products/components/ProductExportDialog/ExportDialogSettings.tsx @@ -2,14 +2,14 @@ import Hr from "@saleor/components/Hr"; import RadioGroupField, { RadioGroupFieldChoice } from "@saleor/components/RadioGroupField"; -import { ExportErrorFragment } from "@saleor/fragments/types/ExportErrorFragment"; -import { ChangeEvent } from "@saleor/hooks/useForm"; -import { makeStyles } from "@saleor/macaw-ui"; import { + ExportErrorFragment, ExportProductsInput, ExportScope, FileTypesEnum -} from "@saleor/types/globalTypes"; +} from "@saleor/graphql"; +import { ChangeEvent } from "@saleor/hooks/useForm"; +import { makeStyles } from "@saleor/macaw-ui"; import { getFormErrors } from "@saleor/utils/errors"; import getExportErrorMessage from "@saleor/utils/errors/export"; import React from "react"; diff --git a/src/products/components/ProductExportDialog/ProductExportDialog.stories.tsx b/src/products/components/ProductExportDialog/ProductExportDialog.stories.tsx index f29ec5c9f..9b4932558 100644 --- a/src/products/components/ProductExportDialog/ProductExportDialog.stories.tsx +++ b/src/products/components/ProductExportDialog/ProductExportDialog.stories.tsx @@ -1,9 +1,6 @@ import { channelsList } from "@saleor/channels/fixtures"; +import { ExportErrorCode, ExportProductsInput } from "@saleor/graphql"; import Decorator from "@saleor/storybook/Decorator"; -import { - ExportErrorCode, - ExportProductsInput -} from "@saleor/types/globalTypes"; import { warehouseList } from "@saleor/warehouses/fixtures"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/products/components/ProductExportDialog/ProductExportDialog.tsx b/src/products/components/ProductExportDialog/ProductExportDialog.tsx index d3a5b2b6f..a58c13ba1 100644 --- a/src/products/components/ProductExportDialog/ProductExportDialog.tsx +++ b/src/products/components/ProductExportDialog/ProductExportDialog.tsx @@ -8,21 +8,23 @@ import { import ConfirmButton from "@saleor/components/ConfirmButton"; import makeCreatorSteps, { Step } from "@saleor/components/CreatorSteps"; import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; -import { ChannelFragment } from "@saleor/fragments/types/ChannelFragment"; -import { ExportErrorFragment } from "@saleor/fragments/types/ExportErrorFragment"; +import { + ChannelFragment, + ExportErrorFragment, + ExportProductsInput, + SearchAttributesQuery, + WarehouseFragment +} from "@saleor/graphql"; import useForm, { FormChange } from "@saleor/hooks/useForm"; import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import useModalDialogOpen from "@saleor/hooks/useModalDialogOpen"; import useWizard from "@saleor/hooks/useWizard"; import { buttonMessages } from "@saleor/intl"; import { Button, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { SearchAttributes_search_edges_node } from "@saleor/searches/types/SearchAttributes"; -import { DialogProps, FetchMoreProps } from "@saleor/types"; -import { ExportProductsInput } from "@saleor/types/globalTypes"; +import { DialogProps, FetchMoreProps, RelayToFlat } from "@saleor/types"; import getExportErrorMessage from "@saleor/utils/errors/export"; import { toggle } from "@saleor/utils/lists"; import { mapNodeToChoice } from "@saleor/utils/maps"; -import { WarehouseList_warehouses_edges_node } from "@saleor/warehouses/types/WarehouseList"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -75,13 +77,13 @@ const initialForm: ExportProductsInput = { const ProductExportSteps = makeCreatorSteps(); export interface ProductExportDialogProps extends DialogProps, FetchMoreProps { - attributes: SearchAttributes_search_edges_node[]; + attributes: RelayToFlat; channels: ChannelFragment[]; confirmButtonState: ConfirmButtonTransitionState; errors: ExportErrorFragment[]; productQuantity: ExportItemsQuantity; selectedProducts: number; - warehouses: WarehouseList_warehouses_edges_node[]; + warehouses: WarehouseFragment[]; onFetch: (query: string) => void; onSubmit: (data: ExportProductsInput) => void; } diff --git a/src/products/components/ProductExportDialog/ProductExportDialogInfo.tsx b/src/products/components/ProductExportDialog/ProductExportDialogInfo.tsx index 3fca5025f..379ca6e45 100644 --- a/src/products/components/ProductExportDialog/ProductExportDialogInfo.tsx +++ b/src/products/components/ProductExportDialog/ProductExportDialogInfo.tsx @@ -13,20 +13,19 @@ import Checkbox from "@saleor/components/Checkbox"; import Chip from "@saleor/components/Chip"; import Hr from "@saleor/components/Hr"; import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; -import { ChannelFragment } from "@saleor/fragments/types/ChannelFragment"; +import { + ChannelFragment, + ExportProductsInput, + ProductFieldEnum +} from "@saleor/graphql"; import { ChangeEvent, FormChange } from "@saleor/hooks/useForm"; import useSearchQuery from "@saleor/hooks/useSearchQuery"; import { sectionNames } from "@saleor/intl"; import { makeStyles } from "@saleor/macaw-ui"; import { FetchMoreProps } from "@saleor/types"; -import { - ExportProductsInput, - ProductFieldEnum -} from "@saleor/types/globalTypes"; import { toggle } from "@saleor/utils/lists"; import React from "react"; -import { useIntl } from "react-intl"; -import { FormattedMessage } from "react-intl"; +import { FormattedMessage, useIntl } from "react-intl"; import useProductExportFieldMessages from "./messages"; diff --git a/src/products/components/ProductExportDialog/messages.ts b/src/products/components/ProductExportDialog/messages.ts index 518b6df84..13da4e47c 100644 --- a/src/products/components/ProductExportDialog/messages.ts +++ b/src/products/components/ProductExportDialog/messages.ts @@ -1,4 +1,4 @@ -import { ProductFieldEnum } from "@saleor/types/globalTypes"; +import { ProductFieldEnum } from "@saleor/graphql"; import { defineMessages, useIntl } from "react-intl"; export const productExportDialogMessages = defineMessages({ diff --git a/src/products/components/ProductExportDialog/types.ts b/src/products/components/ProductExportDialog/types.ts index 2f465fbbd..7827adc15 100644 --- a/src/products/components/ProductExportDialog/types.ts +++ b/src/products/components/ProductExportDialog/types.ts @@ -1,4 +1,4 @@ -import { ExportScope, FileTypesEnum } from "@saleor/types/globalTypes"; +import { ExportScope, FileTypesEnum } from "@saleor/graphql"; export interface ExportSettingsInput { scope: ExportScope; diff --git a/src/products/components/ProductExternalMediaDialog/ProductExternalMediaDialog.tsx b/src/products/components/ProductExternalMediaDialog/ProductExternalMediaDialog.tsx index fb21010e6..e53a4f211 100644 --- a/src/products/components/ProductExternalMediaDialog/ProductExternalMediaDialog.tsx +++ b/src/products/components/ProductExternalMediaDialog/ProductExternalMediaDialog.tsx @@ -9,14 +9,14 @@ import { import BackButton from "@saleor/components/BackButton"; import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; +import { ProductFragment } from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { Button } from "@saleor/macaw-ui"; -import { ProductDetails_product } from "@saleor/products/types/ProductDetails"; import React from "react"; import { defineMessages, FormattedMessage, useIntl } from "react-intl"; interface ProductExternalMediaDialogProps { - product: ProductDetails_product; + product: ProductFragment; open: boolean; onClose: () => void; onSubmit: (mediaUrl: string) => SubmitPromise; diff --git a/src/products/components/ProductList/ProductList.tsx b/src/products/components/ProductList/ProductList.tsx index 06c72e9fa..b4d7fdff2 100644 --- a/src/products/components/ProductList/ProductList.tsx +++ b/src/products/components/ProductList/ProductList.tsx @@ -23,17 +23,22 @@ import TablePagination from "@saleor/components/TablePagination"; import TooltipTableCellHeader from "@saleor/components/TooltipTableCellHeader"; import { commonTooltipMessages } from "@saleor/components/TooltipTableCellHeader/messages"; import { ProductListColumns } from "@saleor/config"; +import { GridAttributesQuery, ProductListQuery } from "@saleor/graphql"; import { makeStyles, Pill } from "@saleor/macaw-ui"; import { maybe, renderCollection } from "@saleor/misc"; import { getAttributeIdFromColumnValue, isAttributeColumnValue } from "@saleor/products/components/ProductListPage/utils"; -import { GridAttributes_grid_edges_node } from "@saleor/products/types/GridAttributes"; -import { ProductList_products_edges_node } from "@saleor/products/types/ProductList"; import { ProductListUrlSortField } from "@saleor/products/urls"; import { canBeSorted } from "@saleor/products/views/ProductList/sort"; -import { ChannelProps, ListActions, ListProps, SortPage } from "@saleor/types"; +import { + ChannelProps, + ListActions, + ListProps, + RelayToFlat, + SortPage +} from "@saleor/types"; import TDisplayColumn, { DisplayColumnProps } from "@saleor/utils/columns/DisplayColumn"; @@ -116,8 +121,8 @@ interface ProductListProps SortPage, ChannelProps { activeAttributeSortId: string; - gridAttributes: GridAttributes_grid_edges_node[]; - products: ProductList_products_edges_node[]; + gridAttributes: RelayToFlat; + products: RelayToFlat; loading: boolean; } diff --git a/src/products/components/ProductListPage/ProductListPage.tsx b/src/products/components/ProductListPage/ProductListPage.tsx index b8e5a0073..f26b5df6b 100644 --- a/src/products/components/ProductListPage/ProductListPage.tsx +++ b/src/products/components/ProductListPage/ProductListPage.tsx @@ -14,19 +14,22 @@ import { getByName } from "@saleor/components/Filter/utils"; import FilterBar from "@saleor/components/FilterBar"; import LimitReachedAlert from "@saleor/components/LimitReachedAlert"; import PageHeader from "@saleor/components/PageHeader"; -import { RefreshLimits_shop_limits } from "@saleor/components/Shop/types/RefreshLimits"; import { ProductListColumns } from "@saleor/config"; +import { + AvailableInGridAttributesQuery, + GridAttributesQuery, + ProductListQuery, + RefreshLimitsQuery +} from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { makeStyles } from "@saleor/macaw-ui"; -import { AvailableInGridAttributes_availableInGrid_edges_node } from "@saleor/products/types/AvailableInGridAttributes"; -import { GridAttributes_grid_edges_node } from "@saleor/products/types/GridAttributes"; -import { ProductList_products_edges_node } from "@saleor/products/types/ProductList"; import { ChannelProps, FetchMoreProps, FilterPageProps, ListActions, PageListProps, + RelayToFlat, SortPage } from "@saleor/types"; import { hasLimits, isLimitReached } from "@saleor/utils/limits"; @@ -50,13 +53,15 @@ export interface ProductListPageProps SortPage, ChannelProps { activeAttributeSortId: string; - availableInGridAttributes: AvailableInGridAttributes_availableInGrid_edges_node[]; + availableInGridAttributes: RelayToFlat< + AvailableInGridAttributesQuery["availableInGrid"] + >; channelsCount: number; currencySymbol: string; - gridAttributes: GridAttributes_grid_edges_node[]; - limits: RefreshLimits_shop_limits; + gridAttributes: RelayToFlat; + limits: RefreshLimitsQuery["shop"]["limits"]; totalGridAttributes: number; - products: ProductList_products_edges_node[]; + products: RelayToFlat; onExport: () => void; } diff --git a/src/products/components/ProductListPage/filters.ts b/src/products/components/ProductListPage/filters.ts index 9c6a39c2a..8175881e5 100644 --- a/src/products/components/ProductListPage/filters.ts +++ b/src/products/components/ProductListPage/filters.ts @@ -1,11 +1,8 @@ import { IFilter } from "@saleor/components/Filter"; import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; +import { AttributeInputTypeEnum, StockAvailability } from "@saleor/graphql"; import { commonMessages, sectionNames } from "@saleor/intl"; import { AutocompleteFilterOpts, FilterOpts, MinMax } from "@saleor/types"; -import { - AttributeInputTypeEnum, - StockAvailability -} from "@saleor/types/globalTypes"; import { createAutocompleteField, createBooleanField, diff --git a/src/products/components/ProductMedia/ProductMedia.tsx b/src/products/components/ProductMedia/ProductMedia.tsx index 221e0c04f..d3a7dbee3 100644 --- a/src/products/components/ProductMedia/ProductMedia.tsx +++ b/src/products/components/ProductMedia/ProductMedia.tsx @@ -2,11 +2,10 @@ import { Card, CardContent } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import ImageUpload from "@saleor/components/ImageUpload"; import MediaTile from "@saleor/components/MediaTile"; -import { ProductMediaFragment } from "@saleor/fragments/types/ProductMediaFragment"; +import { ProductMediaFragment, ProductMediaType } from "@saleor/graphql"; import { Button, makeStyles } from "@saleor/macaw-ui"; import { ProductMediaPopper } from "@saleor/products/components/ProductMediaPopper/ProductMediaPopper"; import { ReorderAction } from "@saleor/types"; -import { ProductMediaType } from "@saleor/types/globalTypes"; import createMultiFileUploadHandler from "@saleor/utils/handlers/multiFileUploadHandler"; import classNames from "classnames"; import React from "react"; diff --git a/src/products/components/ProductMediaPage/ProductMediaPage.tsx b/src/products/components/ProductMediaPage/ProductMediaPage.tsx index 3fdeb0c10..7c915f448 100644 --- a/src/products/components/ProductMediaPage/ProductMediaPage.tsx +++ b/src/products/components/ProductMediaPage/ProductMediaPage.tsx @@ -6,11 +6,13 @@ import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; import Skeleton from "@saleor/components/Skeleton"; +import { ProductMediaType } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; -import { makeStyles } from "@saleor/macaw-ui"; -import { ProductMediaType } from "@saleor/types/globalTypes"; +import { + Backlink, + ConfirmButtonTransitionState, + makeStyles +} from "@saleor/macaw-ui"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; diff --git a/src/products/components/ProductOrganization/ProductOrganization.tsx b/src/products/components/ProductOrganization/ProductOrganization.tsx index 812053929..6487a8c5d 100644 --- a/src/products/components/ProductOrganization/ProductOrganization.tsx +++ b/src/products/components/ProductOrganization/ProductOrganization.tsx @@ -10,7 +10,7 @@ import MultiAutocompleteSelectField, { import SingleAutocompleteSelectField, { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; -import { ProductErrorFragment } from "@saleor/fragments/types/ProductErrorFragment"; +import { ProductErrorFragment } from "@saleor/graphql"; import { ChangeEvent } from "@saleor/hooks/useForm"; import { makeStyles } from "@saleor/macaw-ui"; import { maybe } from "@saleor/misc"; diff --git a/src/products/components/ProductShipping/ProductShipping.tsx b/src/products/components/ProductShipping/ProductShipping.tsx index d39735cf9..8bbd719e6 100644 --- a/src/products/components/ProductShipping/ProductShipping.tsx +++ b/src/products/components/ProductShipping/ProductShipping.tsx @@ -6,7 +6,7 @@ import { } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Grid from "@saleor/components/Grid"; -import { ProductErrorFragment } from "@saleor/fragments/types/ProductErrorFragment"; +import { ProductErrorFragment } from "@saleor/graphql"; import { getFormErrors, getProductErrorMessage } from "@saleor/utils/errors"; import createNonNegativeValueChangeHandler from "@saleor/utils/handlers/nonNegativeValueChangeHandler"; import React from "react"; diff --git a/src/products/components/ProductStocks/ProductStocks.tsx b/src/products/components/ProductStocks/ProductStocks.tsx index df2f9223d..da066dbd3 100644 --- a/src/products/components/ProductStocks/ProductStocks.tsx +++ b/src/products/components/ProductStocks/ProductStocks.tsx @@ -25,18 +25,17 @@ import FormSpacer from "@saleor/components/FormSpacer"; import Hr from "@saleor/components/Hr"; import Link from "@saleor/components/Link"; import PreviewPill from "@saleor/components/PreviewPill"; -import { ProductErrorFragment } from "@saleor/fragments/types/ProductErrorFragment"; -import { WarehouseFragment } from "@saleor/fragments/types/WarehouseFragment"; +import { ProductErrorFragment, WarehouseFragment } from "@saleor/graphql"; import { FormChange, FormErrors } from "@saleor/hooks/useForm"; import { FormsetAtomicData, FormsetChange } from "@saleor/hooks/useFormset"; import { Button, DeleteIcon, IconButton, + ICONBUTTON_SIZE, makeStyles, PlusIcon } from "@saleor/macaw-ui"; -import { ICONBUTTON_SIZE } from "@saleor/macaw-ui"; import { renderCollection } from "@saleor/misc"; import { getFormErrors, getProductErrorMessage } from "@saleor/utils/errors"; import createNonNegativeValueChangeHandler from "@saleor/utils/handlers/nonNegativeValueChangeHandler"; diff --git a/src/products/components/ProductTaxes/ProductTaxes.tsx b/src/products/components/ProductTaxes/ProductTaxes.tsx index 50dda7310..6a49bdc28 100644 --- a/src/products/components/ProductTaxes/ProductTaxes.tsx +++ b/src/products/components/ProductTaxes/ProductTaxes.tsx @@ -3,7 +3,7 @@ import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import Hr from "@saleor/components/Hr"; import SingleAutocompleteSelectField from "@saleor/components/SingleAutocompleteSelectField"; -import { TaxTypeFragment } from "@saleor/fragments/types/TaxTypeFragment"; +import { TaxTypeFragment } from "@saleor/graphql"; import { FormChange } from "@saleor/hooks/useForm"; import { sectionNames } from "@saleor/intl"; import { makeStyles } from "@saleor/macaw-ui"; diff --git a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx index 76ef9155f..a40cf22bc 100644 --- a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx +++ b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx @@ -20,42 +20,41 @@ import Metadata from "@saleor/components/Metadata/Metadata"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; import SeoForm from "@saleor/components/SeoForm"; -import { RefreshLimits_shop_limits } from "@saleor/components/Shop/types/RefreshLimits"; -import { ProductChannelListingErrorFragment } from "@saleor/fragments/types/ProductChannelListingErrorFragment"; -import { ProductErrorWithAttributesFragment } from "@saleor/fragments/types/ProductErrorWithAttributesFragment"; -import { TaxTypeFragment } from "@saleor/fragments/types/TaxTypeFragment"; -import { WarehouseFragment } from "@saleor/fragments/types/WarehouseFragment"; +import { + PermissionEnum, + ProductChannelListingErrorFragment, + ProductDetailsVariantFragment, + ProductErrorWithAttributesFragment, + ProductFragment, + RefreshLimitsQuery, + SearchAttributeValuesQuery, + SearchCategoriesQuery, + SearchCollectionsQuery, + SearchPagesQuery, + SearchProductsQuery, + TaxTypeFragment, + WarehouseFragment +} from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { FormsetData } from "@saleor/hooks/useFormset"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { maybe } from "@saleor/misc"; import ProductExternalMediaDialog from "@saleor/products/components/ProductExternalMediaDialog"; import ProductVariantPrice from "@saleor/products/components/ProductVariantPrice"; import { ChannelsWithVariantsData } from "@saleor/products/views/ProductUpdate/types"; -import { SearchAttributeValues_attribute_choices_edges_node } from "@saleor/searches/types/SearchAttributeValues"; -import { SearchCategories_search_edges_node } from "@saleor/searches/types/SearchCategories"; -import { SearchCollections_search_edges_node } from "@saleor/searches/types/SearchCollections"; -import { SearchPages_search_edges_node } from "@saleor/searches/types/SearchPages"; -import { SearchProducts_search_edges_node } from "@saleor/searches/types/SearchProducts"; import { ChannelProps, FetchMoreProps, ListActions, + RelayToFlat, ReorderAction } from "@saleor/types"; -import { PermissionEnum } from "@saleor/types/globalTypes"; import React from "react"; import { useIntl } from "react-intl"; import ChannelsWithVariantsAvailabilityCard from "../../../channels/ChannelsWithVariantsAvailabilityCard/ChannelsWithVariantsAvailabilityCard"; -import { - ProductDetails_product, - ProductDetails_product_media, - ProductDetails_product_variants -} from "../../types/ProductDetails"; import { getChoices, ProductUpdatePageFormData } from "../../utils/data"; import ProductDetailsForm from "../ProductDetailsForm"; import ProductMedia from "../ProductMedia"; @@ -80,24 +79,26 @@ export interface ProductUpdatePageProps extends ListActions, ChannelProps { defaultWeightUnit: string; errors: ProductErrorWithAttributesFragment[]; placeholderImage: string; - collections: SearchCollections_search_edges_node[]; - categories: SearchCategories_search_edges_node[]; - attributeValues: SearchAttributeValues_attribute_choices_edges_node[]; + collections: RelayToFlat; + categories: RelayToFlat; + attributeValues: RelayToFlat< + SearchAttributeValuesQuery["attribute"]["choices"] + >; disabled: boolean; fetchMoreCategories: FetchMoreProps; fetchMoreCollections: FetchMoreProps; isMediaUrlModalVisible?: boolean; - limits: RefreshLimits_shop_limits; - variants: ProductDetails_product_variants[]; - media: ProductDetails_product_media[]; + limits: RefreshLimitsQuery["shop"]["limits"]; + variants: ProductDetailsVariantFragment[]; + media: ProductFragment["media"]; hasChannelChanged: boolean; - product: ProductDetails_product; + product: ProductFragment; header: string; saveButtonBarState: ConfirmButtonTransitionState; warehouses: WarehouseFragment[]; taxTypes: TaxTypeFragment[]; - referencePages?: SearchPages_search_edges_node[]; - referenceProducts?: SearchProducts_search_edges_node[]; + referencePages?: RelayToFlat; + referenceProducts?: RelayToFlat; assignReferencesAttributeId?: string; fetchMoreReferencePages?: FetchMoreProps; fetchMoreReferenceProducts?: FetchMoreProps; @@ -126,7 +127,7 @@ export interface ProductUpdatePageProps extends ListActions, ChannelProps { onMediaUrlUpload(mediaUrl: string); onSeoClick?(); onVariantAdd?(); - onSetDefaultVariant(variant: ProductDetails_product_variants); + onSetDefaultVariant(variant: ProductDetailsVariantFragment); onWarehouseConfigure(); } diff --git a/src/products/components/ProductUpdatePage/form.tsx b/src/products/components/ProductUpdatePage/form.tsx index a3d96fcac..8f247d5de 100644 --- a/src/products/components/ProductUpdatePage/form.tsx +++ b/src/products/components/ProductUpdatePage/form.tsx @@ -20,6 +20,12 @@ import { MetadataFormData } from "@saleor/components/Metadata"; import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; import { RichTextEditorChange } from "@saleor/components/RichTextEditor"; import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; +import { + ProductFragment, + SearchPagesQuery, + SearchProductsQuery, + SearchWarehousesQuery +} from "@saleor/graphql"; import useForm, { CommonUseFormResultWithHandlers, FormChange, @@ -33,7 +39,6 @@ import useFormset, { } from "@saleor/hooks/useFormset"; import useHandleFormSubmit from "@saleor/hooks/useHandleFormSubmit"; import { errorMessages } from "@saleor/intl"; -import { ProductDetails_product } from "@saleor/products/types/ProductDetails"; import { getAttributeInputFromProduct, getProductUpdatePageFormData, @@ -51,10 +56,7 @@ import { } from "@saleor/products/utils/validation"; import { PRODUCT_UPDATE_FORM_ID } from "@saleor/products/views/ProductUpdate/consts"; import { ChannelsWithVariantsData } from "@saleor/products/views/ProductUpdate/types"; -import { SearchPages_search_edges_node } from "@saleor/searches/types/SearchPages"; -import { SearchProducts_search_edges_node } from "@saleor/searches/types/SearchProducts"; -import { SearchWarehouses_search_edges_node } from "@saleor/searches/types/SearchWarehouses"; -import { FetchMoreProps, ReorderEvent } from "@saleor/types"; +import { FetchMoreProps, RelayToFlat, ReorderEvent } from "@saleor/types"; import { arrayDiff } from "@saleor/utils/arrays"; import createMultiAutocompleteSelectHandler from "@saleor/utils/handlers/multiAutocompleteSelectChangeHandler"; import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; @@ -170,14 +172,14 @@ export interface UseProductUpdateFormOpts >; setSelectedTaxType: React.Dispatch>; selectedCollections: MultiAutocompleteChoiceType[]; - warehouses: SearchWarehouses_search_edges_node[]; + warehouses: RelayToFlat; channelsData: ChannelData[]; hasVariants: boolean; currentChannels: ChannelData[]; setChannels: (data: ChannelData[]) => void; setChannelsData: (data: ChannelData[]) => void; - referencePages: SearchPages_search_edges_node[]; - referenceProducts: SearchProducts_search_edges_node[]; + referencePages: RelayToFlat; + referenceProducts: RelayToFlat; fetchReferencePages?: (data: string) => void; fetchMoreReferencePages?: FetchMoreProps; fetchReferenceProducts?: (data: string) => void; @@ -189,12 +191,12 @@ export interface UseProductUpdateFormOpts export interface ProductUpdateFormProps extends UseProductUpdateFormOpts { children: (props: UseProductUpdateFormResult) => React.ReactNode; - product: ProductDetails_product; + product: ProductFragment; onSubmit: (data: ProductUpdateSubmitData) => SubmitPromise; } const getStocksData = ( - product: ProductDetails_product, + product: ProductFragment, stocks: FormsetData ) => { if (product?.productType?.hasVariants) { @@ -218,7 +220,7 @@ const getStocksData = ( }; function useProductUpdateForm( - product: ProductDetails_product, + product: ProductFragment, onSubmit: (data: ProductUpdateSubmitData) => SubmitPromise, opts: UseProductUpdateFormOpts ): UseProductUpdateFormResult { diff --git a/src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx b/src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx index 7fc82659b..eefb98e65 100644 --- a/src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx +++ b/src/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx @@ -6,11 +6,10 @@ import SingleAutocompleteSelectField, { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; import Skeleton from "@saleor/components/Skeleton"; -import { ProductErrorWithAttributesFragment } from "@saleor/fragments/types/ProductErrorWithAttributesFragment"; import { - ProductVariant_nonSelectionAttributes_attribute_choices_edges, - ProductVariant_selectionAttributes_attribute_choices_edges -} from "@saleor/fragments/types/ProductVariant"; + ProductErrorWithAttributesFragment, + ProductVariantFragment +} from "@saleor/graphql"; import { FormsetAtomicData, FormsetChange } from "@saleor/hooks/useFormset"; import { commonMessages } from "@saleor/intl"; import { getProductVariantAttributeErrorMessage } from "@saleor/utils/errors/product"; @@ -19,8 +18,8 @@ import { useIntl } from "react-intl"; export interface VariantAttributeInputData { values: Array< - | ProductVariant_selectionAttributes_attribute_choices_edges - | ProductVariant_nonSelectionAttributes_attribute_choices_edges + | ProductVariantFragment["selectionAttributes"][0]["attribute"]["choices"]["edges"][0] + | ProductVariantFragment["nonSelectionAttributes"][0]["attribute"]["choices"]["edges"][0] >; } export type VariantAttributeInput = FormsetAtomicData< diff --git a/src/products/components/ProductVariantCheckoutSettings/ProductVariantCheckoutSettings.tsx b/src/products/components/ProductVariantCheckoutSettings/ProductVariantCheckoutSettings.tsx index 4dee52198..0e094fd2d 100644 --- a/src/products/components/ProductVariantCheckoutSettings/ProductVariantCheckoutSettings.tsx +++ b/src/products/components/ProductVariantCheckoutSettings/ProductVariantCheckoutSettings.tsx @@ -1,7 +1,7 @@ import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import PreviewPill from "@saleor/components/PreviewPill"; -import { ProductErrorFragment } from "@saleor/fragments/types/ProductErrorFragment"; +import { ProductErrorFragment } from "@saleor/graphql"; import { FormChange } from "@saleor/hooks/useForm"; import { getFormErrors } from "@saleor/utils/errors"; import React from "react"; diff --git a/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx b/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx index 0aee2e97e..b36c617a7 100644 --- a/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx +++ b/src/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx @@ -13,18 +13,19 @@ import Grid from "@saleor/components/Grid"; import Metadata from "@saleor/components/Metadata"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; -import { ProductErrorWithAttributesFragment } from "@saleor/fragments/types/ProductErrorWithAttributesFragment"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; -import { SearchAttributeValues_attribute_choices_edges_node } from "@saleor/searches/types/SearchAttributeValues"; -import { SearchPages_search_edges_node } from "@saleor/searches/types/SearchPages"; -import { SearchProducts_search_edges_node } from "@saleor/searches/types/SearchProducts"; -import { SearchWarehouses_search_edges_node } from "@saleor/searches/types/SearchWarehouses"; -import { FetchMoreProps, ReorderAction } from "@saleor/types"; +import { + ProductErrorWithAttributesFragment, + ProductVariantCreateDataQuery, + SearchAttributeValuesQuery, + SearchPagesQuery, + SearchProductsQuery, + SearchWarehousesQuery +} from "@saleor/graphql"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; +import { FetchMoreProps, RelayToFlat, ReorderAction } from "@saleor/types"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; -import { ProductVariantCreateData_product } from "../../types/ProductVariantCreateData"; import ProductShipping from "../ProductShipping/ProductShipping"; import ProductStocks from "../ProductStocks"; import ProductVariantCheckoutSettings from "../ProductVariantCheckoutSettings/ProductVariantCheckoutSettings"; @@ -63,13 +64,15 @@ interface ProductVariantCreatePageProps { disabled: boolean; errors: ProductErrorWithAttributesFragment[]; header: string; - product: ProductVariantCreateData_product; + product: ProductVariantCreateDataQuery["product"]; saveButtonBarState: ConfirmButtonTransitionState; - warehouses: SearchWarehouses_search_edges_node[]; + warehouses: RelayToFlat; weightUnit: string; - referencePages?: SearchPages_search_edges_node[]; - referenceProducts?: SearchProducts_search_edges_node[]; - attributeValues: SearchAttributeValues_attribute_choices_edges_node[]; + referencePages?: RelayToFlat; + referenceProducts?: RelayToFlat; + attributeValues: RelayToFlat< + SearchAttributeValuesQuery["attribute"]["choices"] + >; onBack: () => void; onSubmit: (data: ProductVariantCreateData) => void; onVariantClick: (variantId: string) => void; diff --git a/src/products/components/ProductVariantCreatePage/form.tsx b/src/products/components/ProductVariantCreatePage/form.tsx index e398c978c..a7f24924f 100644 --- a/src/products/components/ProductVariantCreatePage/form.tsx +++ b/src/products/components/ProductVariantCreatePage/form.tsx @@ -11,6 +11,12 @@ import { import { AttributeInput } from "@saleor/components/Attributes"; import { useExitFormDialog } from "@saleor/components/Form/useExitFormDialog"; import { MetadataFormData } from "@saleor/components/Metadata"; +import { + ProductVariantCreateDataQuery, + SearchPagesQuery, + SearchProductsQuery, + SearchWarehousesQuery +} from "@saleor/graphql"; import useForm, { CommonUseFormResultWithHandlers, FormChange, @@ -22,13 +28,9 @@ import useFormset, { } from "@saleor/hooks/useFormset"; import useHandleFormSubmit from "@saleor/hooks/useHandleFormSubmit"; import { errorMessages } from "@saleor/intl"; -import { ProductVariantCreateData_product } from "@saleor/products/types/ProductVariantCreateData"; import { getVariantAttributeInputFromProduct } from "@saleor/products/utils/data"; import { createPreorderEndDateChangeHandler } from "@saleor/products/utils/handlers"; -import { SearchPages_search_edges_node } from "@saleor/searches/types/SearchPages"; -import { SearchProducts_search_edges_node } from "@saleor/searches/types/SearchProducts"; -import { SearchWarehouses_search_edges_node } from "@saleor/searches/types/SearchWarehouses"; -import { FetchMoreProps, ReorderEvent } from "@saleor/types"; +import { FetchMoreProps, RelayToFlat, ReorderEvent } from "@saleor/types"; import useMetadataChangeTrigger from "@saleor/utils/metadata/useMetadataChangeTrigger"; import React, { useEffect } from "react"; import { useIntl } from "react-intl"; @@ -53,9 +55,9 @@ export interface ProductVariantCreateData extends ProductVariantCreateFormData { } export interface UseProductVariantCreateFormOpts { - warehouses: SearchWarehouses_search_edges_node[]; - referencePages: SearchPages_search_edges_node[]; - referenceProducts: SearchProducts_search_edges_node[]; + warehouses: RelayToFlat; + referencePages: RelayToFlat; + referenceProducts: RelayToFlat; fetchReferencePages?: (data: string) => void; fetchMoreReferencePages?: FetchMoreProps; fetchReferenceProducts?: (data: string) => void; @@ -90,7 +92,7 @@ export interface UseProductVariantCreateFormResult export interface ProductVariantCreateFormProps extends UseProductVariantCreateFormOpts { children: (props: UseProductVariantCreateFormResult) => React.ReactNode; - product: ProductVariantCreateData_product; + product: ProductVariantCreateDataQuery["product"]; onSubmit: (data: ProductVariantCreateData) => void; } @@ -109,7 +111,7 @@ const initial: ProductVariantCreateFormData = { }; function useProductVariantCreateForm( - product: ProductVariantCreateData_product, + product: ProductVariantCreateDataQuery["product"], onSubmit: (data: ProductVariantCreateData) => void, opts: UseProductVariantCreateFormOpts ): UseProductVariantCreateFormResult { diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreator.stories.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreator.stories.tsx index dcb278027..ee7e3db20 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreator.stories.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreator.stories.tsx @@ -2,8 +2,7 @@ import { attributes } from "@saleor/attributes/fixtures"; import { productChannels } from "@saleor/channels/fixtures"; import Container from "@saleor/components/Container"; import { fetchMoreProps, limitsReached } from "@saleor/fixtures"; -import { ProductVariantBulkCreate_productVariantBulkCreate_errors } from "@saleor/products/types/ProductVariantBulkCreate"; -import { ProductErrorCode } from "@saleor/types/globalTypes"; +import { BulkProductErrorFragment, ProductErrorCode } from "@saleor/graphql"; import { warehouseList } from "@saleor/warehouses/fixtures"; import { storiesOf } from "@storybook/react"; import React from "react"; @@ -68,7 +67,7 @@ const dataAttributes = selectedAttributes.map(attribute => ({ .filter((_, valueIndex) => valueIndex % 2 !== 1) })); -const errors: ProductVariantBulkCreate_productVariantBulkCreate_errors[] = [ +const errors: BulkProductErrorFragment[] = [ { __typename: "BulkProductError", channels: [channels[0].channelId], diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorContent.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorContent.tsx index a6368a42a..9bca40ecd 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorContent.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorContent.tsx @@ -1,9 +1,11 @@ import { ChannelPriceData } from "@saleor/channels/utils"; -import { WarehouseFragment } from "@saleor/fragments/types/WarehouseFragment"; -import { ProductDetails_product_productType_variantAttributes } from "@saleor/products/types/ProductDetails"; -import { ProductVariantBulkCreate_productVariantBulkCreate_errors } from "@saleor/products/types/ProductVariantBulkCreate"; -import { SearchAttributeValues_attribute_choices_edges_node } from "@saleor/searches/types/SearchAttributeValues"; -import { FetchMoreProps } from "@saleor/types"; +import { + BulkProductErrorFragment, + ProductVariantAttributesFragment, + SearchAttributeValuesQuery, + WarehouseFragment +} from "@saleor/graphql"; +import { FetchMoreProps, RelayToFlat } from "@saleor/types"; import { isSelected } from "@saleor/utils/lists"; import React from "react"; @@ -18,12 +20,14 @@ import { import { ProductVariantCreatorStep } from "./types"; export interface ProductVariantCreatorContentProps { - attributes: ProductDetails_product_productType_variantAttributes[]; - attributeValues: SearchAttributeValues_attribute_choices_edges_node[]; + attributes: ProductVariantAttributesFragment["productType"]["variantAttributes"]; + attributeValues: RelayToFlat< + SearchAttributeValuesQuery["attribute"]["choices"] + >; channelListings: ChannelPriceData[]; data: ProductVariantCreateFormData; dispatchFormDataAction: React.Dispatch; - errors: ProductVariantBulkCreate_productVariantBulkCreate_errors[]; + errors: BulkProductErrorFragment[]; step: ProductVariantCreatorStep; variantsLeft: number | null; warehouses: WarehouseFragment[]; diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPage.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPage.tsx index 3f967bce4..cd4485e0a 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPage.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPage.tsx @@ -2,7 +2,10 @@ import { Typography } from "@material-ui/core"; import Container from "@saleor/components/Container"; import Hr from "@saleor/components/Hr"; import PageHeader from "@saleor/components/PageHeader"; -import { RefreshLimits_shop_limits } from "@saleor/components/Shop/types/RefreshLimits"; +import { + ProductVariantBulkCreateInput, + RefreshLimitsQuery +} from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import useWizard from "@saleor/hooks/useWizard"; import { Button, makeStyles } from "@saleor/macaw-ui"; @@ -10,7 +13,6 @@ import { validatePrice } from "@saleor/products/utils/validation"; import React from "react"; import { FormattedMessage, IntlShape, useIntl } from "react-intl"; -import { ProductVariantBulkCreateInput } from "../../../types/globalTypes"; import { createInitialForm, ProductVariantCreateFormData } from "./form"; import ProductVariantCreatorContent, { ProductVariantCreatorContentProps @@ -91,7 +93,7 @@ export interface ProductVariantCreatePageProps ProductVariantCreatorContentProps, "data" | "dispatchFormDataAction" | "step" | "variantsLeft" | "onStepClick" > { - limits: RefreshLimits_shop_limits; + limits: RefreshLimitsQuery["shop"]["limits"]; onSubmit: (data: ProductVariantBulkCreateInput[]) => SubmitPromise; } diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPriceAndSku.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPriceAndSku.tsx index 21d5c7a5c..46589827b 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPriceAndSku.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPriceAndSku.tsx @@ -1,7 +1,9 @@ import { ChannelPriceData } from "@saleor/channels/utils"; import CardSpacer from "@saleor/components/CardSpacer"; -import { WarehouseFragment } from "@saleor/fragments/types/WarehouseFragment"; -import { ProductDetails_product_productType_variantAttributes } from "@saleor/products/types/ProductDetails"; +import { + ProductVariantAttributesFragment, + WarehouseFragment +} from "@saleor/graphql"; import React from "react"; import { @@ -13,7 +15,7 @@ import ProductVariantCreatorStock from "./ProductVariantCreatorStock"; export type PriceOrStock = "price" | "stock"; export interface ProductVariantCreatorPriceAndSkuProps { - attributes: ProductDetails_product_productType_variantAttributes[]; + attributes: ProductVariantAttributesFragment["productType"]["variantAttributes"]; channelListings: ChannelPriceData[]; data: ProductVariantCreateFormData; warehouses: WarehouseFragment[]; diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPrices.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPrices.tsx index 2be2361d4..c9672f4fa 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPrices.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorPrices.tsx @@ -13,8 +13,8 @@ import Grid from "@saleor/components/Grid"; import Hr from "@saleor/components/Hr"; import PriceField from "@saleor/components/PriceField"; import SingleSelectField from "@saleor/components/SingleSelectField"; +import { ProductVariantAttributesFragment } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; -import { ProductDetails_product_productType_variantAttributes } from "@saleor/products/types/ProductDetails"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -58,7 +58,7 @@ const useStyles = makeStyles( ); export interface ProductVariantCreatorPricesProps { - attributes: ProductDetails_product_productType_variantAttributes[]; + attributes: ProductVariantAttributesFragment["productType"]["variantAttributes"]; channelListings: ChannelPriceData[]; data: ProductVariantCreateFormData; onApplyToAllChange: (applyToAll: VariantCreatorPricesAndSkuMode) => void; diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorStock.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorStock.tsx index 86e0fa9b3..bf01d13f0 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorStock.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorStock.tsx @@ -13,9 +13,11 @@ import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import FormSpacer from "@saleor/components/FormSpacer"; import Hr from "@saleor/components/Hr"; import SingleSelectField from "@saleor/components/SingleSelectField"; -import { WarehouseFragment } from "@saleor/fragments/types/WarehouseFragment"; +import { + ProductVariantAttributesFragment, + WarehouseFragment +} from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; -import { ProductDetails_product_productType_variantAttributes } from "@saleor/products/types/ProductDetails"; import { isSelected } from "@saleor/utils/lists"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -82,7 +84,7 @@ const useStyles = makeStyles( ); export interface ProductVariantCreatorStockProps { - attributes: ProductDetails_product_productType_variantAttributes[]; + attributes: ProductVariantAttributesFragment["productType"]["variantAttributes"]; data: ProductVariantCreateFormData; warehouses: WarehouseFragment[]; onApplyToAllChange: (mode: VariantCreatorPricesAndSkuMode) => void; diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorSummary.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorSummary.tsx index b945f991d..998e80ec6 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorSummary.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorSummary.tsx @@ -8,24 +8,26 @@ import { ChannelPriceData } from "@saleor/channels/utils"; import CardTitle from "@saleor/components/CardTitle"; import Hr from "@saleor/components/Hr"; import PriceField from "@saleor/components/PriceField"; -import { WarehouseFragment } from "@saleor/fragments/types/WarehouseFragment"; +import { + BulkProductErrorFragment, + ProductFragment, + ProductVariantBulkCreateInput, + WarehouseFragment +} from "@saleor/graphql"; import { DeleteIcon, IconButton, makeStyles } from "@saleor/macaw-ui"; -import { ProductVariantBulkCreate_productVariantBulkCreate_errors } from "@saleor/products/types/ProductVariantBulkCreate"; -import { ProductVariantBulkCreateInput } from "@saleor/types/globalTypes"; import { getFormErrors } from "@saleor/utils/errors"; import { getBulkProductErrorMessage } from "@saleor/utils/errors/product"; import classNames from "classnames"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { ProductDetails_product_productType_variantAttributes } from "../../types/ProductDetails"; import { Attribute, ChannelPrice, ProductVariantCreateFormData } from "./form"; export interface ProductVariantCreatorSummaryProps { - attributes: ProductDetails_product_productType_variantAttributes[]; + attributes: ProductFragment["productType"]["variantAttributes"]; channelListings: ChannelPriceData[]; data: ProductVariantCreateFormData; - errors: ProductVariantBulkCreate_productVariantBulkCreate_errors[]; + errors: BulkProductErrorFragment[]; warehouses: WarehouseFragment[]; onVariantSkuChange: (variantIndex: number, value: string) => void; onVariantStockDataChange: ( diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorValues.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorValues.tsx index 6dee79cf3..0862de04f 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorValues.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreatorValues.tsx @@ -6,17 +6,19 @@ import CardTitle from "@saleor/components/CardTitle"; import LimitReachedAlert from "@saleor/components/LimitReachedAlert"; import MultiAutocompleteSelectField from "@saleor/components/MultiAutocompleteSelectField"; import Skeleton from "@saleor/components/Skeleton"; -import { AttributeValueFragment } from "@saleor/fragments/types/AttributeValueFragment"; +import { + AttributeInputTypeEnum, + AttributeValueFragment, + ProductVariantAttributesFragment, + SearchAttributeValuesQuery +} from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { getById } from "@saleor/orders/components/OrderReturnPage/utils"; import { getBasicAttributeValue, getBooleanAttributeValue } from "@saleor/products/components/ProductVariantCreatorPage/utils"; -import { ProductDetails_product_productType_variantAttributes } from "@saleor/products/types/ProductDetails"; -import { SearchAttributeValues_attribute_choices_edges_node } from "@saleor/searches/types/SearchAttributeValues"; -import { FetchMoreProps } from "@saleor/types"; -import { AttributeInputTypeEnum } from "@saleor/types/globalTypes"; +import { FetchMoreProps, RelayToFlat } from "@saleor/types"; import React from "react"; import { defineMessages, @@ -47,7 +49,7 @@ export function getVariantsNumber(data: ProductVariantCreateFormData): number { export function getMultiValues( attributes: Attribute[], - attribute: ProductDetails_product_productType_variantAttributes + attribute: ProductVariantAttributesFragment["productType"]["variantAttributes"][0] ) { return attributes .find(getById(attribute.id)) @@ -56,7 +58,7 @@ export function getMultiValues( export function getMultiDisplayValues( attributes: Attribute[], - attribute: ProductDetails_product_productType_variantAttributes + attribute: ProductVariantAttributesFragment["productType"]["variantAttributes"][0] ) { return attributes.find(getById(attribute.id))?.values.map(value => ({ label: value.value?.name, @@ -92,8 +94,10 @@ const getBooleanChoices = ( }; export interface ProductVariantCreatorValuesProps { - attributes: ProductDetails_product_productType_variantAttributes[]; - attributeValues: SearchAttributeValues_attribute_choices_edges_node[]; + attributes: ProductVariantAttributesFragment["productType"]["variantAttributes"]; + attributeValues: RelayToFlat< + SearchAttributeValuesQuery["attribute"]["choices"] + >; fetchAttributeValues: (query: string, attributeId: string) => void; fetchMoreAttributeValues?: FetchMoreProps; data: ProductVariantCreateFormData; diff --git a/src/products/components/ProductVariantCreatorPage/createVariants.ts b/src/products/components/ProductVariantCreatorPage/createVariants.ts index d78f15cb5..c3bf0b3ec 100644 --- a/src/products/components/ProductVariantCreatorPage/createVariants.ts +++ b/src/products/components/ProductVariantCreatorPage/createVariants.ts @@ -1,7 +1,7 @@ import { BulkAttributeValueInput, ProductVariantBulkCreateInput -} from "@saleor/types/globalTypes"; +} from "@saleor/graphql"; import { Attribute, diff --git a/src/products/components/ProductVariantCreatorPage/fixtures.ts b/src/products/components/ProductVariantCreatorPage/fixtures.ts index ea8783a66..0bdf61b13 100644 --- a/src/products/components/ProductVariantCreatorPage/fixtures.ts +++ b/src/products/components/ProductVariantCreatorPage/fixtures.ts @@ -1,5 +1,5 @@ import { ChannelPriceData } from "@saleor/channels/utils"; -import { WarehouseFragment } from "@saleor/fragments/types/WarehouseFragment"; +import { WarehouseFragment } from "@saleor/graphql"; import { createVariants } from "./createVariants"; import { diff --git a/src/products/components/ProductVariantCreatorPage/form.ts b/src/products/components/ProductVariantCreatorPage/form.ts index 7216d3f87..3da6d1ea3 100644 --- a/src/products/components/ProductVariantCreatorPage/form.ts +++ b/src/products/components/ProductVariantCreatorPage/form.ts @@ -1,9 +1,10 @@ import { ChannelPriceData } from "@saleor/channels/utils"; -import { AttributeValueFragment } from "@saleor/fragments/types/AttributeValueFragment"; -import { WarehouseFragment } from "@saleor/fragments/types/WarehouseFragment"; -import { ProductDetails_product_productType_variantAttributes } from "@saleor/products/types/ProductDetails"; - -import { ProductVariantBulkCreateInput } from "../../../types/globalTypes"; +import { + AttributeValueFragment, + ProductVariantAttributesFragment, + ProductVariantBulkCreateInput, + WarehouseFragment +} from "@saleor/graphql"; export interface ChannelPrice { channelId: string; @@ -41,7 +42,7 @@ export interface ProductVariantCreateFormData { } export const createInitialForm = ( - attributes: ProductDetails_product_productType_variantAttributes[], + attributes: ProductVariantAttributesFragment["productType"]["variantAttributes"], channels: ChannelPriceData[], warehouses: WarehouseFragment[] ): ProductVariantCreateFormData => { diff --git a/src/products/components/ProductVariantCreatorPage/reducer.ts b/src/products/components/ProductVariantCreatorPage/reducer.ts index 09d7d791b..7fe8023c9 100644 --- a/src/products/components/ProductVariantCreatorPage/reducer.ts +++ b/src/products/components/ProductVariantCreatorPage/reducer.ts @@ -1,5 +1,4 @@ -import { AttributeValueFragment } from "@saleor/fragments/types/AttributeValueFragment"; -import { StockInput } from "@saleor/types/globalTypes"; +import { AttributeValueFragment, StockInput } from "@saleor/graphql"; import { add, remove, diff --git a/src/products/components/ProductVariantCreatorPage/utils.ts b/src/products/components/ProductVariantCreatorPage/utils.ts index 9e3fe44a2..7373b38c5 100644 --- a/src/products/components/ProductVariantCreatorPage/utils.ts +++ b/src/products/components/ProductVariantCreatorPage/utils.ts @@ -1,17 +1,17 @@ -import { AttributeValueFragment } from "@saleor/fragments/types/AttributeValueFragment"; -import { getById } from "@saleor/orders/components/OrderReturnPage/utils"; import { - ProductDetails_product_productType_variantAttributes, - ProductDetails_product_productType_variantAttributes_choices_edges_node -} from "@saleor/products/types/ProductDetails"; -import { SearchAttributeValues_attribute_choices_edges_node } from "@saleor/searches/types/SearchAttributeValues"; + AttributeValueFragment, + ProductVariantAttributesFragment, + SearchAttributeValuesQuery +} from "@saleor/graphql"; +import { getById } from "@saleor/orders/components/OrderReturnPage/utils"; +import { RelayToFlat } from "@saleor/types"; import { AttributeValue, ProductVariantCreateFormData } from "./form"; export function getPriceAttributeValues( data: ProductVariantCreateFormData, - attributes: ProductDetails_product_productType_variantAttributes[] -): ProductDetails_product_productType_variantAttributes_choices_edges_node[] { + attributes: ProductVariantAttributesFragment["productType"]["variantAttributes"] +): AttributeValueFragment[] { return data.price.mode === "all" ? null : data.price.attribute @@ -30,8 +30,8 @@ export function getPriceAttributeValues( export function getStockAttributeValues( data: ProductVariantCreateFormData, - attributes: ProductDetails_product_productType_variantAttributes[] -): ProductDetails_product_productType_variantAttributes_choices_edges_node[] { + attributes: ProductVariantAttributesFragment["productType"]["variantAttributes"] +): AttributeValueFragment[] { return data.stock.mode === "all" ? null : data.stock.attribute @@ -65,7 +65,9 @@ export const getBooleanAttributeValue = ( export const getBasicAttributeValue = ( attributeId: string, attributeValue: string, - attributeValues: SearchAttributeValues_attribute_choices_edges_node[], + attributeValues: RelayToFlat< + SearchAttributeValuesQuery["attribute"]["choices"] + >, data: ProductVariantCreateFormData ): AttributeValue> => { const dataAttribute = data.attributes.find(getById(attributeId)); diff --git a/src/products/components/ProductVariantImageSelectDialog/ProductVariantMediaSelectDialog.tsx b/src/products/components/ProductVariantImageSelectDialog/ProductVariantMediaSelectDialog.tsx index ad5aba3f4..3991ba80a 100644 --- a/src/products/components/ProductVariantImageSelectDialog/ProductVariantMediaSelectDialog.tsx +++ b/src/products/components/ProductVariantImageSelectDialog/ProductVariantMediaSelectDialog.tsx @@ -5,7 +5,7 @@ import { DialogTitle } from "@material-ui/core"; import BackButton from "@saleor/components/BackButton"; -import { ProductMediaFragment } from "@saleor/fragments/types/ProductMediaFragment"; +import { ProductMediaFragment } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; import classNames from "classnames"; import React from "react"; diff --git a/src/products/components/ProductVariantMedia/ProductVariantMedia.tsx b/src/products/components/ProductVariantMedia/ProductVariantMedia.tsx index 02beeafeb..d65966b65 100644 --- a/src/products/components/ProductVariantMedia/ProductVariantMedia.tsx +++ b/src/products/components/ProductVariantMedia/ProductVariantMedia.tsx @@ -1,7 +1,7 @@ import { Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Skeleton from "@saleor/components/Skeleton"; -import { ProductMediaFragment } from "@saleor/fragments/types/ProductMediaFragment"; +import { ProductMediaFragment } from "@saleor/graphql"; import { Button, makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; diff --git a/src/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx b/src/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx index 984193fb4..4ed6e218c 100644 --- a/src/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx +++ b/src/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx @@ -8,6 +8,10 @@ import { SortableTableRow } from "@saleor/components/SortableTable"; import TableCellAvatar from "@saleor/components/TableCellAvatar"; +import { + ProductVariantCreateDataQuery, + ProductVariantDetailsQuery +} from "@saleor/graphql"; import { Button, makeStyles } from "@saleor/macaw-ui"; import { ReorderAction } from "@saleor/types"; import classNames from "classnames"; @@ -15,8 +19,6 @@ import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { renderCollection } from "../../../misc"; -import { ProductVariantCreateData_product_variants } from "../../types/ProductVariantCreateData"; -import { ProductVariantDetails_productVariant } from "../../types/ProductVariantDetails"; const useStyles = makeStyles( theme => ({ @@ -65,8 +67,8 @@ interface ProductVariantNavigationProps { defaultVariantId?: string; fallbackThumbnail: string; variants: - | ProductVariantDetails_productVariant[] - | ProductVariantCreateData_product_variants[]; + | Array + | ProductVariantCreateDataQuery["product"]["variants"]; onAdd?: () => void; onRowClick: (variantId: string) => void; onReorder: ReorderAction; diff --git a/src/products/components/ProductVariantPage/ProductVariantPage.tsx b/src/products/components/ProductVariantPage/ProductVariantPage.tsx index a3a0c4286..2b0732d07 100644 --- a/src/products/components/ProductVariantPage/ProductVariantPage.tsx +++ b/src/products/components/ProductVariantPage/ProductVariantPage.tsx @@ -15,17 +15,17 @@ import { MetadataFormData } from "@saleor/components/Metadata"; import Metadata from "@saleor/components/Metadata/Metadata"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; -import { ProductChannelListingErrorFragment } from "@saleor/fragments/types/ProductChannelListingErrorFragment"; -import { ProductErrorWithAttributesFragment } from "@saleor/fragments/types/ProductErrorWithAttributesFragment"; -import { ProductVariant } from "@saleor/fragments/types/ProductVariant"; -import { WarehouseFragment } from "@saleor/fragments/types/WarehouseFragment"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; -import { VariantUpdate_productVariantUpdate_errors } from "@saleor/products/types/VariantUpdate"; -import { SearchAttributeValues_attribute_choices_edges_node } from "@saleor/searches/types/SearchAttributeValues"; -import { SearchPages_search_edges_node } from "@saleor/searches/types/SearchPages"; -import { SearchProducts_search_edges_node } from "@saleor/searches/types/SearchProducts"; -import { FetchMoreProps, ReorderAction } from "@saleor/types"; +import { + ProductChannelListingErrorFragment, + ProductErrorWithAttributesFragment, + ProductVariantFragment, + SearchAttributeValuesQuery, + SearchPagesQuery, + SearchProductsQuery, + WarehouseFragment +} from "@saleor/graphql"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; +import { FetchMoreProps, RelayToFlat, ReorderAction } from "@saleor/types"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; @@ -77,20 +77,20 @@ interface ProductVariantPageProps { assignReferencesAttributeId?: string; defaultVariantId?: string; defaultWeightUnit: string; - errors: - | ProductErrorWithAttributesFragment[] - | VariantUpdate_productVariantUpdate_errors[]; + errors: ProductErrorWithAttributesFragment[]; header: string; channels: ChannelPriceData[]; channelErrors: ProductChannelListingErrorFragment[]; loading?: boolean; placeholderImage?: string; saveButtonBarState: ConfirmButtonTransitionState; - variant?: ProductVariant; + variant?: ProductVariantFragment; warehouses: WarehouseFragment[]; - referencePages?: SearchPages_search_edges_node[]; - referenceProducts?: SearchProducts_search_edges_node[]; - attributeValues: SearchAttributeValues_attribute_choices_edges_node[]; + referencePages?: RelayToFlat; + referenceProducts?: RelayToFlat; + attributeValues: RelayToFlat< + SearchAttributeValuesQuery["attribute"]["choices"] + >; fetchMoreReferencePages?: FetchMoreProps; fetchMoreReferenceProducts?: FetchMoreProps; fetchMoreAttributeValues?: FetchMoreProps; diff --git a/src/products/components/ProductVariantPage/VariantDetailsChannelsAvailabilityCard/index.tsx b/src/products/components/ProductVariantPage/VariantDetailsChannelsAvailabilityCard/index.tsx index 1495a51ad..ef533258e 100644 --- a/src/products/components/ProductVariantPage/VariantDetailsChannelsAvailabilityCard/index.tsx +++ b/src/products/components/ProductVariantPage/VariantDetailsChannelsAvailabilityCard/index.tsx @@ -6,7 +6,7 @@ import { Typography } from "@material-ui/core"; import Skeleton from "@saleor/components/Skeleton"; -import { ProductVariant } from "@saleor/fragments/types/ProductVariant"; +import { ProductVariantFragment } from "@saleor/graphql"; import useDateLocalize from "@saleor/hooks/useDateLocalize"; import IconChevronDown from "@saleor/icons/ChevronDown"; import { makeStyles } from "@saleor/macaw-ui"; @@ -67,7 +67,7 @@ const useSummaryStyles = makeStyles( ); interface VariantDetailsChannelsAvailabilityCardProps { - variant: ProductVariant; + variant: ProductVariantFragment; } const VariantDetailsChannelsAvailabilityCard: React.FC = ({ diff --git a/src/products/components/ProductVariantPage/form.tsx b/src/products/components/ProductVariantPage/form.tsx index 00d097018..6a3cc080c 100644 --- a/src/products/components/ProductVariantPage/form.tsx +++ b/src/products/components/ProductVariantPage/form.tsx @@ -15,7 +15,12 @@ import { import { AttributeInput } from "@saleor/components/Attributes"; import { useExitFormDialog } from "@saleor/components/Form/useExitFormDialog"; import { MetadataFormData } from "@saleor/components/Metadata"; -import { ProductVariant } from "@saleor/fragments/types/ProductVariant"; +import { + ProductVariantFragment, + SearchPagesQuery, + SearchProductsQuery, + SearchWarehousesQuery +} from "@saleor/graphql"; import useForm, { CommonUseFormResultWithHandlers, FormChange, @@ -40,10 +45,7 @@ import { validateCostPrice, validatePrice } from "@saleor/products/utils/validation"; -import { SearchPages_search_edges_node } from "@saleor/searches/types/SearchPages"; -import { SearchProducts_search_edges_node } from "@saleor/searches/types/SearchProducts"; -import { SearchWarehouses_search_edges_node } from "@saleor/searches/types/SearchWarehouses"; -import { FetchMoreProps, ReorderEvent } from "@saleor/types"; +import { FetchMoreProps, RelayToFlat, ReorderEvent } from "@saleor/types"; import { arrayDiff } from "@saleor/utils/arrays"; import { mapMetadataItemToInput } from "@saleor/utils/maps"; import getMetadata from "@saleor/utils/metadata/getMetadata"; @@ -86,10 +88,10 @@ export interface ProductVariantUpdateSubmitData } export interface UseProductVariantUpdateFormOpts { - warehouses: SearchWarehouses_search_edges_node[]; + warehouses: RelayToFlat; currentChannels: ChannelPriceAndPreorderData[]; - referencePages: SearchPages_search_edges_node[]; - referenceProducts: SearchProducts_search_edges_node[]; + referencePages: RelayToFlat; + referenceProducts: RelayToFlat; fetchReferencePages?: (data: string) => void; fetchMoreReferencePages?: FetchMoreProps; fetchReferenceProducts?: (data: string) => void; @@ -127,12 +129,12 @@ export interface UseProductVariantUpdateFormResult export interface ProductVariantUpdateFormProps extends UseProductVariantUpdateFormOpts { children: (props: UseProductVariantUpdateFormResult) => React.ReactNode; - variant: ProductVariant; + variant: ProductVariantFragment; onSubmit: (data: ProductVariantUpdateSubmitData) => SubmitPromise; } function useProductVariantUpdateForm( - variant: ProductVariant, + variant: ProductVariantFragment, onSubmit: (data: ProductVariantUpdateSubmitData) => SubmitPromise, opts: UseProductVariantUpdateFormOpts ): UseProductVariantUpdateFormResult { diff --git a/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx b/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx index 21e32299a..b9c559693 100644 --- a/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx +++ b/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx @@ -16,7 +16,7 @@ import CardTitle from "@saleor/components/CardTitle"; import PriceField from "@saleor/components/PriceField"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; -import { ProductChannelListingErrorFragment } from "@saleor/fragments/types/ProductChannelListingErrorFragment"; +import { ProductChannelListingErrorFragment } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; import { renderCollection } from "@saleor/misc"; import { diff --git a/src/products/components/ProductVariants/ProductVariants.tsx b/src/products/components/ProductVariants/ProductVariants.tsx index 3dd98fef4..73fdea8a0 100644 --- a/src/products/components/ProductVariants/ProductVariants.tsx +++ b/src/products/components/ProductVariants/ProductVariants.tsx @@ -12,7 +12,6 @@ import LimitReachedAlert from "@saleor/components/LimitReachedAlert"; import LinkChoice from "@saleor/components/LinkChoice"; import Money from "@saleor/components/Money"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; -import { RefreshLimits_shop_limits } from "@saleor/components/Shop/types/RefreshLimits"; import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; import Skeleton from "@saleor/components/Skeleton"; import { @@ -20,6 +19,11 @@ import { SortableTableRow } from "@saleor/components/SortableTable"; import TableHead from "@saleor/components/TableHead"; +import { + ProductDetailsVariantFragment, + ProductFragment, + RefreshLimitsQuery +} from "@saleor/graphql"; import { Button, makeStyles } from "@saleor/macaw-ui"; import { isLimitReached } from "@saleor/utils/limits"; import React from "react"; @@ -27,15 +31,12 @@ import { FormattedMessage, IntlShape, useIntl } from "react-intl"; import { maybe, renderCollection } from "../../../misc"; import { ChannelProps, ListActions, ReorderAction } from "../../../types"; -import { - ProductDetails_product, - ProductDetails_product_variants, - ProductDetails_product_variants_stocks_warehouse -} from "../../types/ProductDetails"; import ProductVariantSetDefault from "../ProductVariantSetDefault"; +type Warehouse = ProductDetailsVariantFragment[][0]["stocks"][0]["warehouse"]; + function getWarehouseChoices( - variants: ProductDetails_product_variants[], + variants: ProductDetailsVariantFragment[], intl: IntlShape ): SingleAutocompleteChoiceType[] { return [ @@ -47,12 +48,10 @@ function getWarehouseChoices( value: null }, ...variants - .reduce( + .reduce( (warehouses, variant) => [ ...warehouses, - ...variant.stocks.reduce< - ProductDetails_product_variants_stocks_warehouse[] - >((variantStocks, stock) => { + ...variant.stocks.reduce((variantStocks, stock) => { if (!!warehouses.find(w => w.id === stock.warehouse.id)) { return variantStocks; } @@ -133,7 +132,7 @@ const useStyles = makeStyles( function getAvailabilityLabel( intl: IntlShape, warehouse: string, - variant: ProductDetails_product_variants, + variant: ProductDetailsVariantFragment[][0], numAvailable: number ): string { if (variant.preorder) { @@ -206,12 +205,12 @@ function getAvailabilityLabel( interface ProductVariantsProps extends ListActions, ChannelProps { disabled: boolean; - limits: RefreshLimits_shop_limits; - product: ProductDetails_product; - variants: ProductDetails_product_variants[]; + limits: RefreshLimitsQuery["shop"]["limits"]; + product: ProductFragment; + variants: ProductDetailsVariantFragment[]; onVariantReorder: ReorderAction; onRowClick: (id: string) => () => void; - onSetDefaultVariant(variant: ProductDetails_product_variants); + onSetDefaultVariant(variant: ProductDetailsVariantFragment[][0]); onVariantAdd?(); onVariantsAdd?(); } diff --git a/src/products/containers/ProductImagesReorder.tsx b/src/products/containers/ProductImagesReorder.tsx deleted file mode 100644 index f11bfbdf9..000000000 --- a/src/products/containers/ProductImagesReorder.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import React from "react"; - -import { TypedMutationInnerProps } from "../../mutations"; -import { useProductMediaReorder } from "../mutations"; -import { - ProductMediaReorder, - ProductMediaReorderVariables -} from "../types/ProductMediaReorder"; - -interface ProductMediaReorderProviderProps - extends TypedMutationInnerProps< - ProductMediaReorder, - ProductMediaReorderVariables - > { - productId: string; - productMedia: Array<{ - id: string; - url: string; - }>; -} - -const ProductMediaReorderProvider: React.FC = ({ - children, - productId, - productMedia, - ...mutationProps -}) => { - const [mutate, mutationResult] = useProductMediaReorder(mutationProps); - - return ( - <> - {children(opts => { - const productMediaMap = productMedia.reduce((prev, curr) => { - prev[curr.id] = curr; - return prev; - }, {}); - const newProductMedia = opts.variables.mediaIds.map((id, index) => ({ - __typename: "ProductMedia", - ...productMediaMap[id], - sortOrder: index - })); - const optimisticResponse: typeof mutationResult["data"] = { - productMediaReorder: { - __typename: "ProductMediaReorder", - errors: null, - product: { - __typename: "Product", - id: productId, - media: newProductMedia - } - } - }; - - return mutate({ - ...opts, - optimisticResponse - }); - }, mutationResult)} - - ); -}; - -export default ProductMediaReorderProvider; diff --git a/src/products/fixtures.ts b/src/products/fixtures.ts index 28ad8508c..0ffc53e3b 100644 --- a/src/products/fixtures.ts +++ b/src/products/fixtures.ts @@ -1,22 +1,23 @@ -import { ProductVariant } from "@saleor/fragments/types/ProductVariant"; import { AttributeInputTypeEnum, + ProductFragment, + ProductListQuery, ProductMediaType, + ProductVariantCreateDataQuery, + ProductVariantFragment, WeightUnitsEnum -} from "@saleor/types/globalTypes"; +} from "@saleor/graphql"; +import { RelayToFlat } from "@saleor/types"; import { warehouseList } from "@saleor/warehouses/fixtures"; import * as richTextEditorFixtures from "../components/RichTextEditor/fixtures.json"; -import { ProductDetails_product } from "./types/ProductDetails"; -import { ProductList_products_edges_node } from "./types/ProductList"; -import { ProductVariantCreateData_product } from "./types/ProductVariantCreateData"; const content = richTextEditorFixtures.richTextEditor; export const product: ( placeholderImage: string -) => ProductDetails_product & - ProductVariantCreateData_product = placeholderImage => ({ +) => ProductFragment & + ProductVariantCreateDataQuery["product"] = placeholderImage => ({ __typename: "Product" as "Product", attributes: [ { @@ -741,7 +742,7 @@ export const product: ( }); export const products = ( placeholderImage: string -): ProductList_products_edges_node[] => [ +): RelayToFlat => [ { __typename: "Product", updatedAt: "2020-06-22T13:52:05.094636+00:00", @@ -2939,7 +2940,7 @@ export const products = ( } ]; -export const variant = (placeholderImage: string): ProductVariant => ({ +export const variant = (placeholderImage: string): ProductVariantFragment => ({ __typename: "ProductVariant", channelListings: [ { diff --git a/src/products/mutations.ts b/src/products/mutations.ts index dab644c88..ff4ed21b4 100644 --- a/src/products/mutations.ts +++ b/src/products/mutations.ts @@ -1,96 +1,6 @@ import { gql } from "@apollo/client"; -import { - bulkProductErrorFragment, - bulkStockErrorFragment, - exportErrorFragment, - productChannelListingErrorFragment, - productErrorFragment, - productErrorWithAttributesFragment, - productVariantStocksDeleteErrorFragment, - stockErrorFragment -} from "@saleor/fragments/errors"; -import { - channelListingProductVariantFragment, - channelListingProductWithoutPricingFragment, - exportFileFragment, - fragmentPreorder, - fragmentProductMedia, - fragmentVariant, - productFragmentDetails -} from "@saleor/fragments/products"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { - ProductMediaDelete, - ProductMediaDeleteVariables -} from "@saleor/products/types/ProductMediaDelete"; -import { - ProductMediaReorder, - ProductMediaReorderVariables -} from "@saleor/products/types/ProductMediaReorder"; -import { - ProductMediaUpdate, - ProductMediaUpdateVariables -} from "@saleor/products/types/ProductMediaUpdate"; -import { - VariantMediaAssign, - VariantMediaAssignVariables -} from "@saleor/products/types/VariantMediaAssign"; -import { - VariantMediaUnassign, - VariantMediaUnassignVariables -} from "@saleor/products/types/VariantMediaUnassign"; - -import { - productBulkDelete, - productBulkDeleteVariables -} from "./types/productBulkDelete"; -import { - ProductChannelListingUpdate, - ProductChannelListingUpdateVariables -} from "./types/ProductChannelListingUpdate"; -import { ProductCreate, ProductCreateVariables } from "./types/ProductCreate"; -import { ProductDelete, ProductDeleteVariables } from "./types/ProductDelete"; -import { ProductExport, ProductExportVariables } from "./types/ProductExport"; -import { - ProductMediaCreate, - ProductMediaCreateVariables -} from "./types/ProductMediaCreate"; -import { ProductUpdate, ProductUpdateVariables } from "./types/ProductUpdate"; -import { - ProductVariantBulkCreate, - ProductVariantBulkCreateVariables -} from "./types/ProductVariantBulkCreate"; -import { - ProductVariantBulkDelete, - ProductVariantBulkDeleteVariables -} from "./types/ProductVariantBulkDelete"; -import { - ProductVariantChannelListingUpdate, - ProductVariantChannelListingUpdateVariables -} from "./types/ProductVariantChannelListingUpdate"; -import { - ProductVariantPreorderDeactivate, - ProductVariantPreorderDeactivateVariables -} from "./types/ProductVariantPreorderDeactivate"; -import { - ProductVariantReorder, - ProductVariantReorderVariables -} from "./types/ProductVariantReorder"; -import { - ProductVariantSetDefault, - ProductVariantSetDefaultVariables -} from "./types/ProductVariantSetDefault"; -import { - SimpleProductUpdate, - SimpleProductUpdateVariables -} from "./types/SimpleProductUpdate"; -import { VariantCreate, VariantCreateVariables } from "./types/VariantCreate"; -import { VariantDelete, VariantDeleteVariables } from "./types/VariantDelete"; -import { VariantUpdate, VariantUpdateVariables } from "./types/VariantUpdate"; export const productMediaCreateMutation = gql` - ${productErrorFragment} - ${fragmentProductMedia} mutation ProductMediaCreate( $product: ID! $image: Upload @@ -106,28 +16,23 @@ export const productMediaCreateMutation = gql` } ) { errors { - ...ProductErrorFragment + ...ProductError } product { id media { - ...ProductMediaFragment + ...ProductMedia } } } } `; -export const useProductMediaCreateMutation = makeMutation< - ProductMediaCreate, - ProductMediaCreateVariables ->(productMediaCreateMutation); export const productDeleteMutation = gql` - ${productErrorFragment} mutation ProductDelete($id: ID!) { productDelete(id: $id) { errors { - ...ProductErrorFragment + ...ProductError } product { id @@ -135,17 +40,12 @@ export const productDeleteMutation = gql` } } `; -export const useProductDeleteMutation = makeMutation< - ProductDelete, - ProductDeleteVariables ->(productDeleteMutation); export const productMediaReorder = gql` - ${productErrorFragment} mutation ProductMediaReorder($productId: ID!, $mediaIds: [ID]!) { productMediaReorder(productId: $productId, mediaIds: $mediaIds) { errors { - ...ProductErrorFragment + ...ProductError } product { id @@ -159,17 +59,12 @@ export const productMediaReorder = gql` } } `; -export const useProductMediaReorder = makeMutation< - ProductMediaReorder, - ProductMediaReorderVariables ->(productMediaReorder); -const productVariantSetDefault = gql` - ${productErrorFragment} +export const productVariantSetDefault = gql` mutation ProductVariantSetDefault($productId: ID!, $variantId: ID!) { productVariantSetDefault(productId: $productId, variantId: $variantId) { errors { - ...ProductErrorFragment + ...ProductError } product { id @@ -186,14 +81,7 @@ const productVariantSetDefault = gql` } `; -export const useProductVariantSetDefaultMutation = makeMutation< - ProductVariantSetDefault, - ProductVariantSetDefaultVariables ->(productVariantSetDefault); - export const productUpdateMutation = gql` - ${productErrorWithAttributesFragment} - ${productFragmentDetails} mutation ProductUpdate( $id: ID! $input: ProductInput! @@ -204,7 +92,7 @@ export const productUpdateMutation = gql` ) { productUpdate(id: $id, input: $input) { errors { - ...ProductErrorWithAttributesFragment + ...ProductErrorWithAttributes } product { ...Product @@ -212,17 +100,8 @@ export const productUpdateMutation = gql` } } `; -export const useProductUpdateMutation = makeMutation< - ProductUpdate, - ProductUpdateVariables ->(productUpdateMutation); export const simpleProductUpdateMutation = gql` - ${bulkStockErrorFragment} - ${productErrorWithAttributesFragment} - ${productFragmentDetails} - ${stockErrorFragment} - ${fragmentVariant} mutation SimpleProductUpdate( $id: ID! $input: ProductInput! @@ -238,7 +117,7 @@ export const simpleProductUpdateMutation = gql` ) { productUpdate(id: $id, input: $input) { errors { - ...ProductErrorWithAttributesFragment + ...ProductErrorWithAttributes } product { ...Product @@ -246,7 +125,7 @@ export const simpleProductUpdateMutation = gql` } productVariantUpdate(id: $productVariantId, input: $productVariantInput) { errors { - ...ProductErrorWithAttributesFragment + ...ProductErrorWithAttributes } productVariant { ...ProductVariant @@ -257,7 +136,7 @@ export const simpleProductUpdateMutation = gql` variantId: $productVariantId ) { errors { - ...BulkStockErrorFragment + ...BulkStockError } productVariant { ...ProductVariant @@ -268,7 +147,7 @@ export const simpleProductUpdateMutation = gql` variantId: $productVariantId ) { errors { - ...StockErrorFragment + ...StockError } productVariant { ...ProductVariant @@ -279,7 +158,7 @@ export const simpleProductUpdateMutation = gql` variantId: $productVariantId ) { errors { - ...BulkStockErrorFragment + ...BulkStockError } productVariant { ...ProductVariant @@ -287,17 +166,12 @@ export const simpleProductUpdateMutation = gql` } } `; -export const useSimpleProductUpdateMutation = makeMutation< - SimpleProductUpdate, - SimpleProductUpdateVariables ->(simpleProductUpdateMutation); export const productCreateMutation = gql` - ${productErrorWithAttributesFragment} mutation ProductCreate($input: ProductCreateInput!) { productCreate(input: $input) { errors { - ...ProductErrorWithAttributesFragment + ...ProductErrorWithAttributes } product { id @@ -305,17 +179,12 @@ export const productCreateMutation = gql` } } `; -export const useProductCreateMutation = makeMutation< - ProductCreate, - ProductCreateVariables ->(productCreateMutation); export const variantDeleteMutation = gql` - ${productErrorFragment} mutation VariantDelete($id: ID!) { productVariantDelete(id: $id) { errors { - ...ProductErrorFragment + ...ProductError } productVariant { id @@ -323,16 +192,8 @@ export const variantDeleteMutation = gql` } } `; -export const useVariantDeleteMutation = makeMutation< - VariantDelete, - VariantDeleteVariables ->(variantDeleteMutation); export const variantUpdateMutation = gql` - ${bulkStockErrorFragment} - ${fragmentVariant} - ${productErrorWithAttributesFragment} - ${productVariantStocksDeleteErrorFragment} mutation VariantUpdate( $addStocks: [StockInput!]! $removeStocks: [ID!]! @@ -361,7 +222,7 @@ export const variantUpdateMutation = gql` } ) { errors { - ...ProductErrorWithAttributesFragment + ...ProductErrorWithAttributes } productVariant { ...ProductVariant @@ -369,7 +230,7 @@ export const variantUpdateMutation = gql` } productVariantStocksUpdate(stocks: $stocks, variantId: $id) { errors { - ...BulkStockErrorFragment + ...BulkStockError } productVariant { ...ProductVariant @@ -377,36 +238,30 @@ export const variantUpdateMutation = gql` } productVariantStocksCreate(stocks: $addStocks, variantId: $id) { errors { - ...BulkStockErrorFragment + ...BulkStockError } productVariant { id stocks { - ...StockFragment + ...Stock } } } productVariantStocksDelete(warehouseIds: $removeStocks, variantId: $id) { errors { - ...ProductVariantStocksDeleteErrorFragment + ...ProductVariantStocksDeleteError } productVariant { id stocks { - ...StockFragment + ...Stock } } } } `; -export const useVariantUpdateMutation = makeMutation< - VariantUpdate, - VariantUpdateVariables ->(variantUpdateMutation); export const variantCreateMutation = gql` - ${fragmentVariant} - ${productErrorWithAttributesFragment} mutation VariantCreate( $input: ProductVariantCreateInput! $firstValues: Int @@ -416,7 +271,7 @@ export const variantCreateMutation = gql` ) { productVariantCreate(input: $input) { errors { - ...ProductErrorWithAttributesFragment + ...ProductErrorWithAttributes } productVariant { ...ProductVariant @@ -424,17 +279,12 @@ export const variantCreateMutation = gql` } } `; -export const useVariantCreateMutation = makeMutation< - VariantCreate, - VariantCreateVariables ->(variantCreateMutation); export const productMediaDeleteMutation = gql` - ${productErrorFragment} mutation ProductMediaDelete($id: ID!) { productMediaDelete(id: $id) { errors { - ...ProductErrorFragment + ...ProductError } product { id @@ -445,57 +295,45 @@ export const productMediaDeleteMutation = gql` } } `; -export const useProductMediaDeleteMutation = makeMutation< - ProductMediaDelete, - ProductMediaDeleteVariables ->(productMediaDeleteMutation); export const productMediaUpdateMutation = gql` - ${productErrorFragment} - ${fragmentProductMedia} mutation ProductMediaUpdate($id: ID!, $alt: String!) { productMediaUpdate(id: $id, input: { alt: $alt }) { errors { - ...ProductErrorFragment + ...ProductError } product { id media { - ...ProductMediaFragment + ...ProductMedia } } } } `; -export const useProductMediaUpdateMutation = makeMutation< - ProductMediaUpdate, - ProductMediaUpdateVariables ->(productMediaUpdateMutation); export const variantMediaAssignMutation = gql` - ${fragmentProductMedia} - ${productErrorFragment} mutation VariantMediaAssign($variantId: ID!, $mediaId: ID!) { variantMediaAssign(variantId: $variantId, mediaId: $mediaId) { errors { - ...ProductErrorFragment + ...ProductError } productVariant { id media { - ...ProductMediaFragment + ...ProductMedia } product { id media { - ...ProductMediaFragment + ...ProductMedia } variants { id name sku media { - ...ProductMediaFragment + ...ProductMedia } } } @@ -503,35 +341,29 @@ export const variantMediaAssignMutation = gql` } } `; -export const useVariantMediaAssignMutation = makeMutation< - VariantMediaAssign, - VariantMediaAssignVariables ->(variantMediaAssignMutation); export const variantMediaUnassignMutation = gql` - ${fragmentProductMedia} - ${productErrorFragment} mutation VariantMediaUnassign($variantId: ID!, $mediaId: ID!) { variantMediaUnassign(variantId: $variantId, mediaId: $mediaId) { errors { - ...ProductErrorFragment + ...ProductError } productVariant { id media { - ...ProductMediaFragment + ...ProductMedia } product { id media { - ...ProductMediaFragment + ...ProductMedia } variants { id name sku media { - ...ProductMediaFragment + ...ProductMedia } } } @@ -539,82 +371,54 @@ export const variantMediaUnassignMutation = gql` } } `; -export const useVariantMediaUnassignMutation = makeMutation< - VariantMediaUnassign, - VariantMediaUnassignVariables ->(variantMediaUnassignMutation); export const productBulkDeleteMutation = gql` - ${productErrorFragment} mutation productBulkDelete($ids: [ID!]!) { productBulkDelete(ids: $ids) { errors { - ...ProductErrorFragment + ...ProductError } } } `; -export const useProductBulkDeleteMutation = makeMutation< - productBulkDelete, - productBulkDeleteVariables ->(productBulkDeleteMutation); export const ProductVariantBulkCreateMutation = gql` - ${bulkProductErrorFragment} mutation ProductVariantBulkCreate( $id: ID! $inputs: [ProductVariantBulkCreateInput]! ) { productVariantBulkCreate(product: $id, variants: $inputs) { errors { - ...BulkProductErrorFragment + ...BulkProductError } } } `; -export const useProductVariantBulkCreateMutation = makeMutation< - ProductVariantBulkCreate, - ProductVariantBulkCreateVariables ->(ProductVariantBulkCreateMutation); export const ProductVariantBulkDeleteMutation = gql` - ${productErrorFragment} mutation ProductVariantBulkDelete($ids: [ID!]!) { productVariantBulkDelete(ids: $ids) { errors { - ...ProductErrorFragment + ...ProductError } } } `; -export const useProductVariantBulkDeleteMutation = makeMutation< - ProductVariantBulkDelete, - ProductVariantBulkDeleteVariables ->(ProductVariantBulkDeleteMutation); export const productExportMutation = gql` - ${exportFileFragment} - ${exportErrorFragment} mutation ProductExport($input: ExportProductsInput!) { exportProducts(input: $input) { exportFile { - ...ExportFileFragment + ...ExportFile } errors { - ...ExportErrorFragment + ...ExportError } } } `; -export const useProductExport = makeMutation< - ProductExport, - ProductExportVariables ->(productExportMutation); export const ProductChannelListingUpdateMutation = gql` - ${channelListingProductWithoutPricingFragment} - ${channelListingProductVariantFragment} - ${productChannelListingErrorFragment} mutation ProductChannelListingUpdate( $id: ID! $input: ProductChannelListingUpdateInput! @@ -623,28 +427,27 @@ export const ProductChannelListingUpdateMutation = gql` product { id channelListings { - ...ChannelListingProductWithoutPricingFragment + ...ChannelListingProductWithoutPricing } variants { id channelListings { - ...ChannelListingProductVariantFragment + ...ChannelListingProductVariant } } } errors { - ...ProductChannelListingErrorFragment + ...ProductChannelListingError } } } `; -const productVariantReorder = gql` - ${productErrorFragment} +export const productVariantReorder = gql` mutation ProductVariantReorder($move: ReorderInput!, $productId: ID!) { productVariantReorder(moves: [$move], productId: $productId) { errors { - ...ProductErrorFragment + ...ProductError } product { id @@ -655,19 +458,8 @@ const productVariantReorder = gql` } } `; -export const useProductVariantReorderMutation = makeMutation< - ProductVariantReorder, - ProductVariantReorderVariables ->(productVariantReorder); -export const useProductChannelListingUpdate = makeMutation< - ProductChannelListingUpdate, - ProductChannelListingUpdateVariables ->(ProductChannelListingUpdateMutation); export const ProductVariantChannelListingUpdateMutation = gql` - ${channelListingProductVariantFragment} - ${channelListingProductWithoutPricingFragment} - ${productChannelListingErrorFragment} mutation ProductVariantChannelListingUpdate( $id: ID! $input: [ProductVariantChannelListingAddInput!]! @@ -676,45 +468,34 @@ export const ProductVariantChannelListingUpdateMutation = gql` variant { id channelListings { - ...ChannelListingProductVariantFragment + ...ChannelListingProductVariant } product { id channelListings { - ...ChannelListingProductWithoutPricingFragment + ...ChannelListingProductWithoutPricing } } } errors { - ...ProductChannelListingErrorFragment + ...ProductChannelListingError } } } `; -export const useProductVariantChannelListingUpdate = makeMutation< - ProductVariantChannelListingUpdate, - ProductVariantChannelListingUpdateVariables ->(ProductVariantChannelListingUpdateMutation); - export const ProductVariantPreorderDeactivateMutation = gql` - ${fragmentPreorder} - ${productErrorFragment} mutation ProductVariantPreorderDeactivate($id: ID!) { productVariantPreorderDeactivate(id: $id) { productVariant { id preorder { - ...PreorderFragment + ...Preorder } } errors { - ...ProductErrorFragment + ...ProductError } } } `; -export const useProductVariantPreorderDeactivateMutation = makeMutation< - ProductVariantPreorderDeactivate, - ProductVariantPreorderDeactivateVariables ->(ProductVariantPreorderDeactivateMutation); diff --git a/src/products/queries.ts b/src/products/queries.ts index 16663ca78..01c146eba 100644 --- a/src/products/queries.ts +++ b/src/products/queries.ts @@ -1,66 +1,6 @@ import { gql } from "@apollo/client"; -import { - attributeValueFragment, - attributeValueListFragment -} from "@saleor/fragments/attributes"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; -import { - fragmentVariant, - productFragment, - productFragmentDetails, - productVariantAttributesFragment, - variantAttributeFragment -} from "@saleor/fragments/products"; -import { taxTypeFragment } from "@saleor/fragments/taxes"; -import { warehouseFragment } from "@saleor/fragments/warehouses"; -import makeQuery from "@saleor/hooks/makeQuery"; -import { - ProductMediaById, - ProductMediaByIdVariables -} from "@saleor/products/types/ProductMediaById"; -import { - AvailableInGridAttributes, - AvailableInGridAttributesVariables -} from "./types/AvailableInGridAttributes"; -import { - CreateMultipleVariantsData, - CreateMultipleVariantsDataVariables -} from "./types/CreateMultipleVariantsData"; -import { - GridAttributes, - GridAttributesVariables -} from "./types/GridAttributes"; -import { InitialProductFilterAttributes } from "./types/InitialProductFilterAttributes"; -import { - InitialProductFilterCategories, - InitialProductFilterCategoriesVariables -} from "./types/InitialProductFilterCategories"; -import { - InitialProductFilterCollections, - InitialProductFilterCollectionsVariables -} from "./types/InitialProductFilterCollections"; -import { - InitialProductFilterProductTypes, - InitialProductFilterProductTypesVariables -} from "./types/InitialProductFilterProductTypes"; -import { ProductCount, ProductCountVariables } from "./types/ProductCount"; -import { - ProductDetails, - ProductDetailsVariables -} from "./types/ProductDetails"; -import { ProductList, ProductListVariables } from "./types/ProductList"; -import { ProductType, ProductTypeVariables } from "./types/ProductType"; -import { - ProductVariantCreateData, - ProductVariantCreateDataVariables -} from "./types/ProductVariantCreateData"; -import { - ProductVariantDetails, - ProductVariantDetailsVariables -} from "./types/ProductVariantDetails"; - -const initialProductFilterAttributesQuery = gql` +export const initialProductFilterAttributesQuery = gql` query InitialProductFilterAttributes { attributes( first: 100 @@ -78,12 +18,7 @@ const initialProductFilterAttributesQuery = gql` } `; -export const useInitialProductFilterAttributesQuery = makeQuery< - InitialProductFilterAttributes, - never ->(initialProductFilterAttributesQuery); - -const initialProductFilterCategoriesQuery = gql` +export const initialProductFilterCategoriesQuery = gql` query InitialProductFilterCategories($categories: [ID!]) { categories(first: 100, filter: { ids: $categories }) { edges { @@ -95,12 +30,8 @@ const initialProductFilterCategoriesQuery = gql` } } `; -export const useInitialProductFilterCategoriesQuery = makeQuery< - InitialProductFilterCategories, - InitialProductFilterCategoriesVariables ->(initialProductFilterCategoriesQuery); -const initialProductFilterCollectionsQuery = gql` +export const initialProductFilterCollectionsQuery = gql` query InitialProductFilterCollections($collections: [ID!]) { collections(first: 100, filter: { ids: $collections }) { edges { @@ -112,12 +43,8 @@ const initialProductFilterCollectionsQuery = gql` } } `; -export const useInitialProductFilterCollectionsQuery = makeQuery< - InitialProductFilterCollections, - InitialProductFilterCollectionsVariables ->(initialProductFilterCollectionsQuery); -const initialProductFilterProductTypesQuery = gql` +export const initialProductFilterProductTypesQuery = gql` query InitialProductFilterProductTypes($productTypes: [ID!]) { productTypes(first: 100, filter: { ids: $productTypes }) { edges { @@ -129,14 +56,8 @@ const initialProductFilterProductTypesQuery = gql` } } `; -export const useInitialProductFilterProductTypesQuery = makeQuery< - InitialProductFilterProductTypes, - InitialProductFilterProductTypesVariables ->(initialProductFilterProductTypesQuery); -const productListQuery = gql` - ${productFragment} - ${attributeValueFragment} +export const productListQuery = gql` query ProductList( $first: Int $after: String @@ -159,14 +80,14 @@ const productListQuery = gql` ) { edges { node { - ...ProductFragment + ...ProductWithChannelListings updatedAt attributes @include(if: $hasSelectedAttributes) { attribute { id } values { - ...AttributeValueFragment + ...AttributeValue } } } @@ -181,11 +102,7 @@ const productListQuery = gql` } } `; -export const useProductListQuery = makeQuery( - productListQuery -); - -const productCountQuery = gql` +export const productCountQuery = gql` query ProductCount($filter: ProductFilterInput, $channel: String) { products(filter: $filter, channel: $channel) { totalCount @@ -193,14 +110,7 @@ const productCountQuery = gql` } `; -export const useProductCountQuery = makeQuery< - ProductCount, - ProductCountVariables ->(productCountQuery); - -const productDetailsQuery = gql` - ${productFragmentDetails} - ${taxTypeFragment} +export const productDetailsQuery = gql` query ProductDetails( $id: ID! $channel: String @@ -213,18 +123,12 @@ const productDetailsQuery = gql` ...Product } taxTypes { - ...TaxTypeFragment + ...TaxType } } `; -export const useProductDetails = makeQuery< - ProductDetails, - ProductDetailsVariables ->(productDetailsQuery); -const productTypeQuery = gql` - ${taxTypeFragment} - ${attributeValueListFragment} +export const productTypeQuery = gql` query ProductType( $id: ID! $firstValues: Int @@ -250,21 +154,16 @@ const productTypeQuery = gql` last: $lastValues before: $beforeValues ) { - ...AttributeValueListFragment + ...AttributeValueList } } taxType { - ...TaxTypeFragment + ...TaxType } } } `; -export const useProductTypeQuery = makeQuery( - productTypeQuery -); - -const productVariantQuery = gql` - ${fragmentVariant} +export const productVariantQuery = gql` query ProductVariantDetails( $id: ID! $firstValues: Int @@ -277,13 +176,8 @@ const productVariantQuery = gql` } } `; -export const useProductVariantQuery = makeQuery< - ProductVariantDetails, - ProductVariantDetailsVariables ->(productVariantQuery); -const productVariantCreateQuery = gql` - ${variantAttributeFragment} +export const productVariantCreateQuery = gql` query ProductVariantCreateData( $id: ID! $firstValues: Int @@ -311,12 +205,12 @@ const productVariantCreateQuery = gql` selectionVariantAttributes: variantAttributes( variantSelection: VARIANT_SELECTION ) { - ...VariantAttributeFragment + ...VariantAttribute } nonSelectionVariantAttributes: variantAttributes( variantSelection: NOT_VARIANT_SELECTION ) { - ...VariantAttributeFragment + ...VariantAttribute } } thumbnail { @@ -335,12 +229,8 @@ const productVariantCreateQuery = gql` } } `; -export const useProductVariantCreateQuery = makeQuery< - ProductVariantCreateData, - ProductVariantCreateDataVariables ->(productVariantCreateQuery); -const productMediaQuery = gql` +export const productMediaQuery = gql` query ProductMediaById($productId: ID!, $mediaId: ID!) { product(id: $productId) { id @@ -362,13 +252,8 @@ const productMediaQuery = gql` } } `; -export const useProductMediaQuery = makeQuery< - ProductMediaById, - ProductMediaByIdVariables ->(productMediaQuery); -const availableInGridAttributes = gql` - ${pageInfoFragment} +export const availableInGridAttributes = gql` query AvailableInGridAttributes($first: Int!, $after: String) { availableInGrid: attributes( first: $first @@ -386,18 +271,14 @@ const availableInGridAttributes = gql` } } pageInfo { - ...PageInfoFragment + ...PageInfo } totalCount } } `; -export const useAvailableInGridAttributesQuery = makeQuery< - AvailableInGridAttributes, - AvailableInGridAttributesVariables ->(availableInGridAttributes); -const gridAttributes = gql` +export const gridAttributes = gql` query GridAttributes($ids: [ID!]!) { grid: attributes(first: 25, filter: { ids: $ids }) { edges { @@ -409,14 +290,8 @@ const gridAttributes = gql` } } `; -export const useGridAttributesQuery = makeQuery< - GridAttributes, - GridAttributesVariables ->(gridAttributes); -const createMultipleVariantsData = gql` - ${productVariantAttributesFragment} - ${warehouseFragment} +export const createMultipleVariantsData = gql` query CreateMultipleVariantsData( $id: ID! $firstValues: Int @@ -425,18 +300,14 @@ const createMultipleVariantsData = gql` $beforeValues: String ) { product(id: $id) { - ...ProductVariantAttributesFragment + ...ProductVariantAttributes } warehouses(first: 20) { edges { node { - ...WarehouseFragment + ...Warehouse } } } } `; -export const useCreateMultipleVariantsData = makeQuery< - CreateMultipleVariantsData, - CreateMultipleVariantsDataVariables ->(createMultipleVariantsData); diff --git a/src/products/types/AvailableInGridAttributes.ts b/src/products/types/AvailableInGridAttributes.ts deleted file mode 100644 index 36678ec47..000000000 --- a/src/products/types/AvailableInGridAttributes.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: AvailableInGridAttributes -// ==================================================== - -export interface AvailableInGridAttributes_availableInGrid_edges_node { - __typename: "Attribute"; - id: string; - name: string | null; -} - -export interface AvailableInGridAttributes_availableInGrid_edges { - __typename: "AttributeCountableEdge"; - node: AvailableInGridAttributes_availableInGrid_edges_node; -} - -export interface AvailableInGridAttributes_availableInGrid_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface AvailableInGridAttributes_availableInGrid { - __typename: "AttributeCountableConnection"; - edges: AvailableInGridAttributes_availableInGrid_edges[]; - pageInfo: AvailableInGridAttributes_availableInGrid_pageInfo; - totalCount: number | null; -} - -export interface AvailableInGridAttributes { - availableInGrid: AvailableInGridAttributes_availableInGrid | null; -} - -export interface AvailableInGridAttributesVariables { - first: number; - after?: string | null; -} diff --git a/src/products/types/CreateMultipleVariantsData.ts b/src/products/types/CreateMultipleVariantsData.ts deleted file mode 100644 index 352d4f40a..000000000 --- a/src/products/types/CreateMultipleVariantsData.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: CreateMultipleVariantsData -// ==================================================== - -export interface CreateMultipleVariantsData_product_attributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface CreateMultipleVariantsData_product_attributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface CreateMultipleVariantsData_product_attributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: CreateMultipleVariantsData_product_attributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface CreateMultipleVariantsData_product_attributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: CreateMultipleVariantsData_product_attributes_attribute_choices_edges_node; -} - -export interface CreateMultipleVariantsData_product_attributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: CreateMultipleVariantsData_product_attributes_attribute_choices_pageInfo; - edges: CreateMultipleVariantsData_product_attributes_attribute_choices_edges[]; -} - -export interface CreateMultipleVariantsData_product_attributes_attribute { - __typename: "Attribute"; - id: string; - slug: string | null; - name: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: CreateMultipleVariantsData_product_attributes_attribute_choices | null; -} - -export interface CreateMultipleVariantsData_product_attributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface CreateMultipleVariantsData_product_attributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: CreateMultipleVariantsData_product_attributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface CreateMultipleVariantsData_product_attributes { - __typename: "SelectedAttribute"; - attribute: CreateMultipleVariantsData_product_attributes_attribute; - values: (CreateMultipleVariantsData_product_attributes_values | null)[]; -} - -export interface CreateMultipleVariantsData_product_productType_variantAttributes_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface CreateMultipleVariantsData_product_productType_variantAttributes_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface CreateMultipleVariantsData_product_productType_variantAttributes_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: CreateMultipleVariantsData_product_productType_variantAttributes_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface CreateMultipleVariantsData_product_productType_variantAttributes_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: CreateMultipleVariantsData_product_productType_variantAttributes_choices_edges_node; -} - -export interface CreateMultipleVariantsData_product_productType_variantAttributes_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: CreateMultipleVariantsData_product_productType_variantAttributes_choices_pageInfo; - edges: CreateMultipleVariantsData_product_productType_variantAttributes_choices_edges[]; -} - -export interface CreateMultipleVariantsData_product_productType_variantAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - inputType: AttributeInputTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: CreateMultipleVariantsData_product_productType_variantAttributes_choices | null; -} - -export interface CreateMultipleVariantsData_product_productType { - __typename: "ProductType"; - id: string; - variantAttributes: (CreateMultipleVariantsData_product_productType_variantAttributes | null)[] | null; -} - -export interface CreateMultipleVariantsData_product_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface CreateMultipleVariantsData_product_channelListings { - __typename: "ProductChannelListing"; - channel: CreateMultipleVariantsData_product_channelListings_channel; -} - -export interface CreateMultipleVariantsData_product { - __typename: "Product"; - id: string; - attributes: CreateMultipleVariantsData_product_attributes[]; - productType: CreateMultipleVariantsData_product_productType; - channelListings: CreateMultipleVariantsData_product_channelListings[] | null; -} - -export interface CreateMultipleVariantsData_warehouses_edges_node { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface CreateMultipleVariantsData_warehouses_edges { - __typename: "WarehouseCountableEdge"; - node: CreateMultipleVariantsData_warehouses_edges_node; -} - -export interface CreateMultipleVariantsData_warehouses { - __typename: "WarehouseCountableConnection"; - edges: CreateMultipleVariantsData_warehouses_edges[]; -} - -export interface CreateMultipleVariantsData { - product: CreateMultipleVariantsData_product | null; - warehouses: CreateMultipleVariantsData_warehouses | null; -} - -export interface CreateMultipleVariantsDataVariables { - id: string; - firstValues?: number | null; - afterValues?: string | null; - lastValues?: number | null; - beforeValues?: string | null; -} diff --git a/src/products/types/GridAttributes.ts b/src/products/types/GridAttributes.ts deleted file mode 100644 index b864b5001..000000000 --- a/src/products/types/GridAttributes.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: GridAttributes -// ==================================================== - -export interface GridAttributes_grid_edges_node { - __typename: "Attribute"; - id: string; - name: string | null; -} - -export interface GridAttributes_grid_edges { - __typename: "AttributeCountableEdge"; - node: GridAttributes_grid_edges_node; -} - -export interface GridAttributes_grid { - __typename: "AttributeCountableConnection"; - edges: GridAttributes_grid_edges[]; -} - -export interface GridAttributes { - grid: GridAttributes_grid | null; -} - -export interface GridAttributesVariables { - ids: string[]; -} diff --git a/src/products/types/InitialProductFilterAttributes.ts b/src/products/types/InitialProductFilterAttributes.ts deleted file mode 100644 index 013d2d664..000000000 --- a/src/products/types/InitialProductFilterAttributes.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: InitialProductFilterAttributes -// ==================================================== - -export interface InitialProductFilterAttributes_attributes_edges_node { - __typename: "Attribute"; - id: string; - name: string | null; - inputType: AttributeInputTypeEnum | null; - slug: string | null; -} - -export interface InitialProductFilterAttributes_attributes_edges { - __typename: "AttributeCountableEdge"; - node: InitialProductFilterAttributes_attributes_edges_node; -} - -export interface InitialProductFilterAttributes_attributes { - __typename: "AttributeCountableConnection"; - edges: InitialProductFilterAttributes_attributes_edges[]; -} - -export interface InitialProductFilterAttributes { - attributes: InitialProductFilterAttributes_attributes | null; -} diff --git a/src/products/types/InitialProductFilterCategories.ts b/src/products/types/InitialProductFilterCategories.ts deleted file mode 100644 index be6dd629c..000000000 --- a/src/products/types/InitialProductFilterCategories.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: InitialProductFilterCategories -// ==================================================== - -export interface InitialProductFilterCategories_categories_edges_node { - __typename: "Category"; - id: string; - name: string; -} - -export interface InitialProductFilterCategories_categories_edges { - __typename: "CategoryCountableEdge"; - node: InitialProductFilterCategories_categories_edges_node; -} - -export interface InitialProductFilterCategories_categories { - __typename: "CategoryCountableConnection"; - edges: InitialProductFilterCategories_categories_edges[]; -} - -export interface InitialProductFilterCategories { - categories: InitialProductFilterCategories_categories | null; -} - -export interface InitialProductFilterCategoriesVariables { - categories?: string[] | null; -} diff --git a/src/products/types/InitialProductFilterCollections.ts b/src/products/types/InitialProductFilterCollections.ts deleted file mode 100644 index 0950099c8..000000000 --- a/src/products/types/InitialProductFilterCollections.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: InitialProductFilterCollections -// ==================================================== - -export interface InitialProductFilterCollections_collections_edges_node { - __typename: "Collection"; - id: string; - name: string; -} - -export interface InitialProductFilterCollections_collections_edges { - __typename: "CollectionCountableEdge"; - node: InitialProductFilterCollections_collections_edges_node; -} - -export interface InitialProductFilterCollections_collections { - __typename: "CollectionCountableConnection"; - edges: InitialProductFilterCollections_collections_edges[]; -} - -export interface InitialProductFilterCollections { - collections: InitialProductFilterCollections_collections | null; -} - -export interface InitialProductFilterCollectionsVariables { - collections?: string[] | null; -} diff --git a/src/products/types/InitialProductFilterProductTypes.ts b/src/products/types/InitialProductFilterProductTypes.ts deleted file mode 100644 index cb4ea60ac..000000000 --- a/src/products/types/InitialProductFilterProductTypes.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: InitialProductFilterProductTypes -// ==================================================== - -export interface InitialProductFilterProductTypes_productTypes_edges_node { - __typename: "ProductType"; - id: string; - name: string; -} - -export interface InitialProductFilterProductTypes_productTypes_edges { - __typename: "ProductTypeCountableEdge"; - node: InitialProductFilterProductTypes_productTypes_edges_node; -} - -export interface InitialProductFilterProductTypes_productTypes { - __typename: "ProductTypeCountableConnection"; - edges: InitialProductFilterProductTypes_productTypes_edges[]; -} - -export interface InitialProductFilterProductTypes { - productTypes: InitialProductFilterProductTypes_productTypes | null; -} - -export interface InitialProductFilterProductTypesVariables { - productTypes?: string[] | null; -} diff --git a/src/products/types/ProductChannelListingUpdate.ts b/src/products/types/ProductChannelListingUpdate.ts deleted file mode 100644 index 327c13b32..000000000 --- a/src/products/types/ProductChannelListingUpdate.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductChannelListingUpdateInput, ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductChannelListingUpdate -// ==================================================== - -export interface ProductChannelListingUpdate_productChannelListingUpdate_product_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ProductChannelListingUpdate_productChannelListingUpdate_product_channelListings { - __typename: "ProductChannelListing"; - isPublished: boolean; - publicationDate: any | null; - isAvailableForPurchase: boolean | null; - availableForPurchase: any | null; - visibleInListings: boolean; - channel: ProductChannelListingUpdate_productChannelListingUpdate_product_channelListings_channel; -} - -export interface ProductChannelListingUpdate_productChannelListingUpdate_product_variants_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ProductChannelListingUpdate_productChannelListingUpdate_product_variants_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductChannelListingUpdate_productChannelListingUpdate_product_variants_channelListings_costPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductChannelListingUpdate_productChannelListingUpdate_product_variants_channelListings_preorderThreshold { - __typename: "PreorderThreshold"; - quantity: number | null; - soldUnits: number; -} - -export interface ProductChannelListingUpdate_productChannelListingUpdate_product_variants_channelListings { - __typename: "ProductVariantChannelListing"; - channel: ProductChannelListingUpdate_productChannelListingUpdate_product_variants_channelListings_channel; - price: ProductChannelListingUpdate_productChannelListingUpdate_product_variants_channelListings_price | null; - costPrice: ProductChannelListingUpdate_productChannelListingUpdate_product_variants_channelListings_costPrice | null; - preorderThreshold: ProductChannelListingUpdate_productChannelListingUpdate_product_variants_channelListings_preorderThreshold | null; -} - -export interface ProductChannelListingUpdate_productChannelListingUpdate_product_variants { - __typename: "ProductVariant"; - id: string; - channelListings: ProductChannelListingUpdate_productChannelListingUpdate_product_variants_channelListings[] | null; -} - -export interface ProductChannelListingUpdate_productChannelListingUpdate_product { - __typename: "Product"; - id: string; - channelListings: ProductChannelListingUpdate_productChannelListingUpdate_product_channelListings[] | null; - variants: (ProductChannelListingUpdate_productChannelListingUpdate_product_variants | null)[] | null; -} - -export interface ProductChannelListingUpdate_productChannelListingUpdate_errors { - __typename: "ProductChannelListingError"; - code: ProductErrorCode; - field: string | null; - message: string | null; - channels: string[] | null; -} - -export interface ProductChannelListingUpdate_productChannelListingUpdate { - __typename: "ProductChannelListingUpdate"; - product: ProductChannelListingUpdate_productChannelListingUpdate_product | null; - errors: ProductChannelListingUpdate_productChannelListingUpdate_errors[]; -} - -export interface ProductChannelListingUpdate { - productChannelListingUpdate: ProductChannelListingUpdate_productChannelListingUpdate | null; -} - -export interface ProductChannelListingUpdateVariables { - id: string; - input: ProductChannelListingUpdateInput; -} diff --git a/src/products/types/ProductCount.ts b/src/products/types/ProductCount.ts deleted file mode 100644 index 302ae6b37..000000000 --- a/src/products/types/ProductCount.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductFilterInput } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ProductCount -// ==================================================== - -export interface ProductCount_products { - __typename: "ProductCountableConnection"; - totalCount: number | null; -} - -export interface ProductCount { - products: ProductCount_products | null; -} - -export interface ProductCountVariables { - filter?: ProductFilterInput | null; - channel?: string | null; -} diff --git a/src/products/types/ProductCreate.ts b/src/products/types/ProductCreate.ts deleted file mode 100644 index 676aa83b0..000000000 --- a/src/products/types/ProductCreate.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductCreateInput, ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductCreate -// ==================================================== - -export interface ProductCreate_productCreate_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; - attributes: string[] | null; -} - -export interface ProductCreate_productCreate_product { - __typename: "Product"; - id: string; -} - -export interface ProductCreate_productCreate { - __typename: "ProductCreate"; - errors: ProductCreate_productCreate_errors[]; - product: ProductCreate_productCreate_product | null; -} - -export interface ProductCreate { - productCreate: ProductCreate_productCreate | null; -} - -export interface ProductCreateVariables { - input: ProductCreateInput; -} diff --git a/src/products/types/ProductDelete.ts b/src/products/types/ProductDelete.ts deleted file mode 100644 index dd0df7c83..000000000 --- a/src/products/types/ProductDelete.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductDelete -// ==================================================== - -export interface ProductDelete_productDelete_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface ProductDelete_productDelete_product { - __typename: "Product"; - id: string; -} - -export interface ProductDelete_productDelete { - __typename: "ProductDelete"; - errors: ProductDelete_productDelete_errors[]; - product: ProductDelete_productDelete_product | null; -} - -export interface ProductDelete { - productDelete: ProductDelete_productDelete | null; -} - -export interface ProductDeleteVariables { - id: string; -} diff --git a/src/products/types/ProductDetails.ts b/src/products/types/ProductDetails.ts deleted file mode 100644 index 9c8d0e49c..000000000 --- a/src/products/types/ProductDetails.ts +++ /dev/null @@ -1,339 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ProductDetails -// ==================================================== - -export interface ProductDetails_product_attributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface ProductDetails_product_attributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductDetails_product_attributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductDetails_product_attributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface ProductDetails_product_attributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: ProductDetails_product_attributes_attribute_choices_edges_node; -} - -export interface ProductDetails_product_attributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: ProductDetails_product_attributes_attribute_choices_pageInfo; - edges: ProductDetails_product_attributes_attribute_choices_edges[]; -} - -export interface ProductDetails_product_attributes_attribute { - __typename: "Attribute"; - id: string; - slug: string | null; - name: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: ProductDetails_product_attributes_attribute_choices | null; -} - -export interface ProductDetails_product_attributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductDetails_product_attributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductDetails_product_attributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface ProductDetails_product_attributes { - __typename: "SelectedAttribute"; - attribute: ProductDetails_product_attributes_attribute; - values: (ProductDetails_product_attributes_values | null)[]; -} - -export interface ProductDetails_product_productType_variantAttributes_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface ProductDetails_product_productType_variantAttributes_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductDetails_product_productType_variantAttributes_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductDetails_product_productType_variantAttributes_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface ProductDetails_product_productType_variantAttributes_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: ProductDetails_product_productType_variantAttributes_choices_edges_node; -} - -export interface ProductDetails_product_productType_variantAttributes_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: ProductDetails_product_productType_variantAttributes_choices_pageInfo; - edges: ProductDetails_product_productType_variantAttributes_choices_edges[]; -} - -export interface ProductDetails_product_productType_variantAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - inputType: AttributeInputTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: ProductDetails_product_productType_variantAttributes_choices | null; -} - -export interface ProductDetails_product_productType_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface ProductDetails_product_productType { - __typename: "ProductType"; - id: string; - variantAttributes: (ProductDetails_product_productType_variantAttributes | null)[] | null; - name: string; - hasVariants: boolean; - taxType: ProductDetails_product_productType_taxType | null; -} - -export interface ProductDetails_product_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ProductDetails_product_channelListings { - __typename: "ProductChannelListing"; - channel: ProductDetails_product_channelListings_channel; - isPublished: boolean; - publicationDate: any | null; - isAvailableForPurchase: boolean | null; - availableForPurchase: any | null; - visibleInListings: boolean; -} - -export interface ProductDetails_product_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductDetails_product_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductDetails_product_defaultVariant { - __typename: "ProductVariant"; - id: string; -} - -export interface ProductDetails_product_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface ProductDetails_product_collections { - __typename: "Collection"; - id: string; - name: string; -} - -export interface ProductDetails_product_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface ProductDetails_product_variants_media { - __typename: "ProductMedia"; - url: string; -} - -export interface ProductDetails_product_variants_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface ProductDetails_product_variants_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: ProductDetails_product_variants_stocks_warehouse; -} - -export interface ProductDetails_product_variants_preorder { - __typename: "PreorderData"; - globalThreshold: number | null; - globalSoldUnits: number; - endDate: any | null; -} - -export interface ProductDetails_product_variants_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ProductDetails_product_variants_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductDetails_product_variants_channelListings_costPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductDetails_product_variants_channelListings_preorderThreshold { - __typename: "PreorderThreshold"; - quantity: number | null; - soldUnits: number; -} - -export interface ProductDetails_product_variants_channelListings { - __typename: "ProductVariantChannelListing"; - channel: ProductDetails_product_variants_channelListings_channel; - price: ProductDetails_product_variants_channelListings_price | null; - costPrice: ProductDetails_product_variants_channelListings_costPrice | null; - preorderThreshold: ProductDetails_product_variants_channelListings_preorderThreshold | null; -} - -export interface ProductDetails_product_variants { - __typename: "ProductVariant"; - id: string; - sku: string | null; - name: string; - margin: number | null; - media: ProductDetails_product_variants_media[] | null; - stocks: (ProductDetails_product_variants_stocks | null)[] | null; - trackInventory: boolean; - preorder: ProductDetails_product_variants_preorder | null; - channelListings: ProductDetails_product_variants_channelListings[] | null; - quantityLimitPerCustomer: number | null; -} - -export interface ProductDetails_product_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ProductDetails_product_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface ProductDetails_product { - __typename: "Product"; - id: string; - attributes: ProductDetails_product_attributes[]; - productType: ProductDetails_product_productType; - channelListings: ProductDetails_product_channelListings[] | null; - metadata: (ProductDetails_product_metadata | null)[]; - privateMetadata: (ProductDetails_product_privateMetadata | null)[]; - name: string; - slug: string; - description: any | null; - seoTitle: string | null; - seoDescription: string | null; - rating: number | null; - defaultVariant: ProductDetails_product_defaultVariant | null; - category: ProductDetails_product_category | null; - collections: (ProductDetails_product_collections | null)[] | null; - chargeTaxes: boolean; - media: ProductDetails_product_media[] | null; - isAvailable: boolean | null; - variants: (ProductDetails_product_variants | null)[] | null; - weight: ProductDetails_product_weight | null; - taxType: ProductDetails_product_taxType | null; -} - -export interface ProductDetails_taxTypes { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface ProductDetails { - product: ProductDetails_product | null; - taxTypes: (ProductDetails_taxTypes | null)[] | null; -} - -export interface ProductDetailsVariables { - id: string; - channel?: string | null; - firstValues?: number | null; - afterValues?: string | null; - lastValues?: number | null; - beforeValues?: string | null; -} diff --git a/src/products/types/ProductExport.ts b/src/products/types/ProductExport.ts deleted file mode 100644 index 5d0a2e7d3..000000000 --- a/src/products/types/ProductExport.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ExportProductsInput, JobStatusEnum, ExportErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductExport -// ==================================================== - -export interface ProductExport_exportProducts_exportFile { - __typename: "ExportFile"; - id: string; - status: JobStatusEnum; - url: string | null; -} - -export interface ProductExport_exportProducts_errors { - __typename: "ExportError"; - code: ExportErrorCode; - field: string | null; - message: string | null; -} - -export interface ProductExport_exportProducts { - __typename: "ExportProducts"; - exportFile: ProductExport_exportProducts_exportFile | null; - errors: ProductExport_exportProducts_errors[]; -} - -export interface ProductExport { - exportProducts: ProductExport_exportProducts | null; -} - -export interface ProductExportVariables { - input: ExportProductsInput; -} diff --git a/src/products/types/ProductImageCreate.ts b/src/products/types/ProductImageCreate.ts deleted file mode 100644 index 9297b016f..000000000 --- a/src/products/types/ProductImageCreate.ts +++ /dev/null @@ -1,291 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -import { ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductImageCreate -// ==================================================== - -export interface ProductImageCreate_productImageCreate_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; -} - -export interface ProductImageCreate_productImageCreate_product_attributes_attribute_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductImageCreate_productImageCreate_product_attributes_attribute_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductImageCreate_productImageCreate_product_attributes_attribute_values_file | null; - reference: string | null; -} - -export interface ProductImageCreate_productImageCreate_product_attributes_attribute { - __typename: "Attribute"; - id: string; - slug: string | null; - name: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - values: (ProductImageCreate_productImageCreate_product_attributes_attribute_values | null)[] | null; -} - -export interface ProductImageCreate_productImageCreate_product_attributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductImageCreate_productImageCreate_product_attributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductImageCreate_productImageCreate_product_attributes_values_file | null; - reference: string | null; -} - -export interface ProductImageCreate_productImageCreate_product_attributes { - __typename: "SelectedAttribute"; - attribute: ProductImageCreate_productImageCreate_product_attributes_attribute; - values: (ProductImageCreate_productImageCreate_product_attributes_values | null)[]; -} - -export interface ProductImageCreate_productImageCreate_product_productType_variantAttributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductImageCreate_productImageCreate_product_productType_variantAttributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductImageCreate_productImageCreate_product_productType_variantAttributes_values_file | null; - reference: string | null; -} - -export interface ProductImageCreate_productImageCreate_product_productType_variantAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - values: (ProductImageCreate_productImageCreate_product_productType_variantAttributes_values | null)[] | null; -} - -export interface ProductImageCreate_productImageCreate_product_productType_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface ProductImageCreate_productImageCreate_product_productType { - __typename: "ProductType"; - id: string; - variantAttributes: (ProductImageCreate_productImageCreate_product_productType_variantAttributes | null)[] | null; - name: string; - hasVariants: boolean; - taxType: ProductImageCreate_productImageCreate_product_productType_taxType | null; -} - -export interface ProductImageCreate_productImageCreate_product_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ProductImageCreate_productImageCreate_product_channelListings_pricing_priceRange_start_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductImageCreate_productImageCreate_product_channelListings_pricing_priceRange_start { - __typename: "TaxedMoney"; - net: ProductImageCreate_productImageCreate_product_channelListings_pricing_priceRange_start_net; -} - -export interface ProductImageCreate_productImageCreate_product_channelListings_pricing_priceRange_stop_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductImageCreate_productImageCreate_product_channelListings_pricing_priceRange_stop { - __typename: "TaxedMoney"; - net: ProductImageCreate_productImageCreate_product_channelListings_pricing_priceRange_stop_net; -} - -export interface ProductImageCreate_productImageCreate_product_channelListings_pricing_priceRange { - __typename: "TaxedMoneyRange"; - start: ProductImageCreate_productImageCreate_product_channelListings_pricing_priceRange_start | null; - stop: ProductImageCreate_productImageCreate_product_channelListings_pricing_priceRange_stop | null; -} - -export interface ProductImageCreate_productImageCreate_product_channelListings_pricing { - __typename: "ProductPricingInfo"; - priceRange: ProductImageCreate_productImageCreate_product_channelListings_pricing_priceRange | null; -} - -export interface ProductImageCreate_productImageCreate_product_channelListings { - __typename: "ProductChannelListing"; - channel: ProductImageCreate_productImageCreate_product_channelListings_channel; - pricing: ProductImageCreate_productImageCreate_product_channelListings_pricing | null; - isPublished: boolean; - publicationDate: any | null; - isAvailableForPurchase: boolean | null; - availableForPurchase: any | null; - visibleInListings: boolean; -} - -export interface ProductImageCreate_productImageCreate_product_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductImageCreate_productImageCreate_product_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductImageCreate_productImageCreate_product_defaultVariant { - __typename: "ProductVariant"; - id: string; -} - -export interface ProductImageCreate_productImageCreate_product_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface ProductImageCreate_productImageCreate_product_collections { - __typename: "Collection"; - id: string; - name: string; -} - -export interface ProductImageCreate_productImageCreate_product_images { - __typename: "ProductImage"; - id: string; - alt: string; - sortOrder: number | null; - url: string; -} - -export interface ProductImageCreate_productImageCreate_product_variants_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface ProductImageCreate_productImageCreate_product_variants_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: ProductImageCreate_productImageCreate_product_variants_stocks_warehouse; -} - -export interface ProductImageCreate_productImageCreate_product_variants_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ProductImageCreate_productImageCreate_product_variants_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductImageCreate_productImageCreate_product_variants_channelListings_costPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductImageCreate_productImageCreate_product_variants_channelListings { - __typename: "ProductVariantChannelListing"; - channel: ProductImageCreate_productImageCreate_product_variants_channelListings_channel; - price: ProductImageCreate_productImageCreate_product_variants_channelListings_price | null; - costPrice: ProductImageCreate_productImageCreate_product_variants_channelListings_costPrice | null; -} - -export interface ProductImageCreate_productImageCreate_product_variants { - __typename: "ProductVariant"; - id: string; - sku: string; - name: string; - margin: number | null; - stocks: (ProductImageCreate_productImageCreate_product_variants_stocks | null)[] | null; - trackInventory: boolean; - channelListings: ProductImageCreate_productImageCreate_product_variants_channelListings[] | null; -} - -export interface ProductImageCreate_productImageCreate_product_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ProductImageCreate_productImageCreate_product_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface ProductImageCreate_productImageCreate_product { - __typename: "Product"; - id: string; - attributes: ProductImageCreate_productImageCreate_product_attributes[]; - productType: ProductImageCreate_productImageCreate_product_productType; - channelListings: ProductImageCreate_productImageCreate_product_channelListings[] | null; - metadata: (ProductImageCreate_productImageCreate_product_metadata | null)[]; - privateMetadata: (ProductImageCreate_productImageCreate_product_privateMetadata | null)[]; - name: string; - slug: string; - description: any | null; - seoTitle: string | null; - seoDescription: string | null; - rating: number | null; - defaultVariant: ProductImageCreate_productImageCreate_product_defaultVariant | null; - category: ProductImageCreate_productImageCreate_product_category | null; - collections: (ProductImageCreate_productImageCreate_product_collections | null)[] | null; - chargeTaxes: boolean; - images: (ProductImageCreate_productImageCreate_product_images | null)[] | null; - isAvailable: boolean | null; - variants: (ProductImageCreate_productImageCreate_product_variants | null)[] | null; - weight: ProductImageCreate_productImageCreate_product_weight | null; - taxType: ProductImageCreate_productImageCreate_product_taxType | null; -} - -export interface ProductImageCreate_productImageCreate { - __typename: "ProductImageCreate"; - errors: ProductImageCreate_productImageCreate_errors[]; - product: ProductImageCreate_productImageCreate_product | null; -} - -export interface ProductImageCreate { - productImageCreate: ProductImageCreate_productImageCreate | null; -} - -export interface ProductImageCreateVariables { - product: string; - image: any; - alt?: string | null; -} diff --git a/src/products/types/ProductImageUpdate.ts b/src/products/types/ProductImageUpdate.ts deleted file mode 100644 index f66a65fc5..000000000 --- a/src/products/types/ProductImageUpdate.ts +++ /dev/null @@ -1,290 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -import { ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductImageUpdate -// ==================================================== - -export interface ProductImageUpdate_productImageUpdate_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; -} - -export interface ProductImageUpdate_productImageUpdate_product_attributes_attribute_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductImageUpdate_productImageUpdate_product_attributes_attribute_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductImageUpdate_productImageUpdate_product_attributes_attribute_values_file | null; - reference: string | null; -} - -export interface ProductImageUpdate_productImageUpdate_product_attributes_attribute { - __typename: "Attribute"; - id: string; - slug: string | null; - name: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - values: (ProductImageUpdate_productImageUpdate_product_attributes_attribute_values | null)[] | null; -} - -export interface ProductImageUpdate_productImageUpdate_product_attributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductImageUpdate_productImageUpdate_product_attributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductImageUpdate_productImageUpdate_product_attributes_values_file | null; - reference: string | null; -} - -export interface ProductImageUpdate_productImageUpdate_product_attributes { - __typename: "SelectedAttribute"; - attribute: ProductImageUpdate_productImageUpdate_product_attributes_attribute; - values: (ProductImageUpdate_productImageUpdate_product_attributes_values | null)[]; -} - -export interface ProductImageUpdate_productImageUpdate_product_productType_variantAttributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductImageUpdate_productImageUpdate_product_productType_variantAttributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductImageUpdate_productImageUpdate_product_productType_variantAttributes_values_file | null; - reference: string | null; -} - -export interface ProductImageUpdate_productImageUpdate_product_productType_variantAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - values: (ProductImageUpdate_productImageUpdate_product_productType_variantAttributes_values | null)[] | null; -} - -export interface ProductImageUpdate_productImageUpdate_product_productType_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface ProductImageUpdate_productImageUpdate_product_productType { - __typename: "ProductType"; - id: string; - variantAttributes: (ProductImageUpdate_productImageUpdate_product_productType_variantAttributes | null)[] | null; - name: string; - hasVariants: boolean; - taxType: ProductImageUpdate_productImageUpdate_product_productType_taxType | null; -} - -export interface ProductImageUpdate_productImageUpdate_product_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ProductImageUpdate_productImageUpdate_product_channelListings_pricing_priceRange_start_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductImageUpdate_productImageUpdate_product_channelListings_pricing_priceRange_start { - __typename: "TaxedMoney"; - net: ProductImageUpdate_productImageUpdate_product_channelListings_pricing_priceRange_start_net; -} - -export interface ProductImageUpdate_productImageUpdate_product_channelListings_pricing_priceRange_stop_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductImageUpdate_productImageUpdate_product_channelListings_pricing_priceRange_stop { - __typename: "TaxedMoney"; - net: ProductImageUpdate_productImageUpdate_product_channelListings_pricing_priceRange_stop_net; -} - -export interface ProductImageUpdate_productImageUpdate_product_channelListings_pricing_priceRange { - __typename: "TaxedMoneyRange"; - start: ProductImageUpdate_productImageUpdate_product_channelListings_pricing_priceRange_start | null; - stop: ProductImageUpdate_productImageUpdate_product_channelListings_pricing_priceRange_stop | null; -} - -export interface ProductImageUpdate_productImageUpdate_product_channelListings_pricing { - __typename: "ProductPricingInfo"; - priceRange: ProductImageUpdate_productImageUpdate_product_channelListings_pricing_priceRange | null; -} - -export interface ProductImageUpdate_productImageUpdate_product_channelListings { - __typename: "ProductChannelListing"; - channel: ProductImageUpdate_productImageUpdate_product_channelListings_channel; - pricing: ProductImageUpdate_productImageUpdate_product_channelListings_pricing | null; - isPublished: boolean; - publicationDate: any | null; - isAvailableForPurchase: boolean | null; - availableForPurchase: any | null; - visibleInListings: boolean; -} - -export interface ProductImageUpdate_productImageUpdate_product_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductImageUpdate_productImageUpdate_product_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductImageUpdate_productImageUpdate_product_defaultVariant { - __typename: "ProductVariant"; - id: string; -} - -export interface ProductImageUpdate_productImageUpdate_product_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface ProductImageUpdate_productImageUpdate_product_collections { - __typename: "Collection"; - id: string; - name: string; -} - -export interface ProductImageUpdate_productImageUpdate_product_images { - __typename: "ProductImage"; - id: string; - alt: string; - sortOrder: number | null; - url: string; -} - -export interface ProductImageUpdate_productImageUpdate_product_variants_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface ProductImageUpdate_productImageUpdate_product_variants_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: ProductImageUpdate_productImageUpdate_product_variants_stocks_warehouse; -} - -export interface ProductImageUpdate_productImageUpdate_product_variants_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ProductImageUpdate_productImageUpdate_product_variants_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductImageUpdate_productImageUpdate_product_variants_channelListings_costPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductImageUpdate_productImageUpdate_product_variants_channelListings { - __typename: "ProductVariantChannelListing"; - channel: ProductImageUpdate_productImageUpdate_product_variants_channelListings_channel; - price: ProductImageUpdate_productImageUpdate_product_variants_channelListings_price | null; - costPrice: ProductImageUpdate_productImageUpdate_product_variants_channelListings_costPrice | null; -} - -export interface ProductImageUpdate_productImageUpdate_product_variants { - __typename: "ProductVariant"; - id: string; - sku: string; - name: string; - margin: number | null; - stocks: (ProductImageUpdate_productImageUpdate_product_variants_stocks | null)[] | null; - trackInventory: boolean; - channelListings: ProductImageUpdate_productImageUpdate_product_variants_channelListings[] | null; -} - -export interface ProductImageUpdate_productImageUpdate_product_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ProductImageUpdate_productImageUpdate_product_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface ProductImageUpdate_productImageUpdate_product { - __typename: "Product"; - id: string; - attributes: ProductImageUpdate_productImageUpdate_product_attributes[]; - productType: ProductImageUpdate_productImageUpdate_product_productType; - channelListings: ProductImageUpdate_productImageUpdate_product_channelListings[] | null; - metadata: (ProductImageUpdate_productImageUpdate_product_metadata | null)[]; - privateMetadata: (ProductImageUpdate_productImageUpdate_product_privateMetadata | null)[]; - name: string; - slug: string; - description: any | null; - seoTitle: string | null; - seoDescription: string | null; - rating: number | null; - defaultVariant: ProductImageUpdate_productImageUpdate_product_defaultVariant | null; - category: ProductImageUpdate_productImageUpdate_product_category | null; - collections: (ProductImageUpdate_productImageUpdate_product_collections | null)[] | null; - chargeTaxes: boolean; - images: (ProductImageUpdate_productImageUpdate_product_images | null)[] | null; - isAvailable: boolean | null; - variants: (ProductImageUpdate_productImageUpdate_product_variants | null)[] | null; - weight: ProductImageUpdate_productImageUpdate_product_weight | null; - taxType: ProductImageUpdate_productImageUpdate_product_taxType | null; -} - -export interface ProductImageUpdate_productImageUpdate { - __typename: "ProductImageUpdate"; - errors: ProductImageUpdate_productImageUpdate_errors[]; - product: ProductImageUpdate_productImageUpdate_product | null; -} - -export interface ProductImageUpdate { - productImageUpdate: ProductImageUpdate_productImageUpdate | null; -} - -export interface ProductImageUpdateVariables { - id: string; - alt: string; -} diff --git a/src/products/types/ProductList.ts b/src/products/types/ProductList.ts deleted file mode 100644 index 5283799e3..000000000 --- a/src/products/types/ProductList.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductFilterInput, ProductOrder } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ProductList -// ==================================================== - -export interface ProductList_products_edges_node_thumbnail { - __typename: "Image"; - url: string; -} - -export interface ProductList_products_edges_node_productType { - __typename: "ProductType"; - id: string; - name: string; - hasVariants: boolean; -} - -export interface ProductList_products_edges_node_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ProductList_products_edges_node_channelListings_pricing_priceRange_start_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductList_products_edges_node_channelListings_pricing_priceRange_start { - __typename: "TaxedMoney"; - net: ProductList_products_edges_node_channelListings_pricing_priceRange_start_net; -} - -export interface ProductList_products_edges_node_channelListings_pricing_priceRange_stop_net { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductList_products_edges_node_channelListings_pricing_priceRange_stop { - __typename: "TaxedMoney"; - net: ProductList_products_edges_node_channelListings_pricing_priceRange_stop_net; -} - -export interface ProductList_products_edges_node_channelListings_pricing_priceRange { - __typename: "TaxedMoneyRange"; - start: ProductList_products_edges_node_channelListings_pricing_priceRange_start | null; - stop: ProductList_products_edges_node_channelListings_pricing_priceRange_stop | null; -} - -export interface ProductList_products_edges_node_channelListings_pricing { - __typename: "ProductPricingInfo"; - priceRange: ProductList_products_edges_node_channelListings_pricing_priceRange | null; -} - -export interface ProductList_products_edges_node_channelListings { - __typename: "ProductChannelListing"; - isPublished: boolean; - publicationDate: any | null; - isAvailableForPurchase: boolean | null; - availableForPurchase: any | null; - visibleInListings: boolean; - channel: ProductList_products_edges_node_channelListings_channel; - pricing: ProductList_products_edges_node_channelListings_pricing | null; -} - -export interface ProductList_products_edges_node_attributes_attribute { - __typename: "Attribute"; - id: string; -} - -export interface ProductList_products_edges_node_attributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductList_products_edges_node_attributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductList_products_edges_node_attributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; -} - -export interface ProductList_products_edges_node_attributes { - __typename: "SelectedAttribute"; - attribute: ProductList_products_edges_node_attributes_attribute; - values: (ProductList_products_edges_node_attributes_values | null)[]; -} - -export interface ProductList_products_edges_node { - __typename: "Product"; - id: string; - name: string; - thumbnail: ProductList_products_edges_node_thumbnail | null; - productType: ProductList_products_edges_node_productType; - channelListings: ProductList_products_edges_node_channelListings[] | null; - updatedAt: any | null; - attributes: ProductList_products_edges_node_attributes[]; -} - -export interface ProductList_products_edges { - __typename: "ProductCountableEdge"; - node: ProductList_products_edges_node; -} - -export interface ProductList_products_pageInfo { - __typename: "PageInfo"; - hasPreviousPage: boolean; - hasNextPage: boolean; - startCursor: string | null; - endCursor: string | null; -} - -export interface ProductList_products { - __typename: "ProductCountableConnection"; - edges: ProductList_products_edges[]; - pageInfo: ProductList_products_pageInfo; - totalCount: number | null; -} - -export interface ProductList { - products: ProductList_products | null; -} - -export interface ProductListVariables { - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; - filter?: ProductFilterInput | null; - channel?: string | null; - sort?: ProductOrder | null; - hasChannel: boolean; - hasSelectedAttributes: boolean; -} diff --git a/src/products/types/ProductMediaById.ts b/src/products/types/ProductMediaById.ts deleted file mode 100644 index ddc1136cb..000000000 --- a/src/products/types/ProductMediaById.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductMediaType } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ProductMediaById -// ==================================================== - -export interface ProductMediaById_product_mainImage { - __typename: "ProductMedia"; - id: string; - alt: string; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface ProductMediaById_product_media { - __typename: "ProductMedia"; - id: string; - url: string; - alt: string; - type: ProductMediaType; - oembedData: any; -} - -export interface ProductMediaById_product { - __typename: "Product"; - id: string; - name: string; - mainImage: ProductMediaById_product_mainImage | null; - media: ProductMediaById_product_media[] | null; -} - -export interface ProductMediaById { - product: ProductMediaById_product | null; -} - -export interface ProductMediaByIdVariables { - productId: string; - mediaId: string; -} diff --git a/src/products/types/ProductMediaCreate.ts b/src/products/types/ProductMediaCreate.ts deleted file mode 100644 index aec212570..000000000 --- a/src/products/types/ProductMediaCreate.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode, ProductMediaType } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductMediaCreate -// ==================================================== - -export interface ProductMediaCreate_productMediaCreate_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface ProductMediaCreate_productMediaCreate_product_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface ProductMediaCreate_productMediaCreate_product { - __typename: "Product"; - id: string; - media: ProductMediaCreate_productMediaCreate_product_media[] | null; -} - -export interface ProductMediaCreate_productMediaCreate { - __typename: "ProductMediaCreate"; - errors: ProductMediaCreate_productMediaCreate_errors[]; - product: ProductMediaCreate_productMediaCreate_product | null; -} - -export interface ProductMediaCreate { - productMediaCreate: ProductMediaCreate_productMediaCreate | null; -} - -export interface ProductMediaCreateVariables { - product: string; - image?: any | null; - alt?: string | null; - mediaUrl?: string | null; -} diff --git a/src/products/types/ProductMediaDelete.ts b/src/products/types/ProductMediaDelete.ts deleted file mode 100644 index 9409d308d..000000000 --- a/src/products/types/ProductMediaDelete.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductMediaDelete -// ==================================================== - -export interface ProductMediaDelete_productMediaDelete_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface ProductMediaDelete_productMediaDelete_product_media { - __typename: "ProductMedia"; - id: string; -} - -export interface ProductMediaDelete_productMediaDelete_product { - __typename: "Product"; - id: string; - media: ProductMediaDelete_productMediaDelete_product_media[] | null; -} - -export interface ProductMediaDelete_productMediaDelete { - __typename: "ProductMediaDelete"; - errors: ProductMediaDelete_productMediaDelete_errors[]; - product: ProductMediaDelete_productMediaDelete_product | null; -} - -export interface ProductMediaDelete { - productMediaDelete: ProductMediaDelete_productMediaDelete | null; -} - -export interface ProductMediaDeleteVariables { - id: string; -} diff --git a/src/products/types/ProductMediaReorder.ts b/src/products/types/ProductMediaReorder.ts deleted file mode 100644 index eef04517b..000000000 --- a/src/products/types/ProductMediaReorder.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductMediaReorder -// ==================================================== - -export interface ProductMediaReorder_productMediaReorder_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface ProductMediaReorder_productMediaReorder_product_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; -} - -export interface ProductMediaReorder_productMediaReorder_product { - __typename: "Product"; - id: string; - media: ProductMediaReorder_productMediaReorder_product_media[] | null; -} - -export interface ProductMediaReorder_productMediaReorder { - __typename: "ProductMediaReorder"; - errors: ProductMediaReorder_productMediaReorder_errors[]; - product: ProductMediaReorder_productMediaReorder_product | null; -} - -export interface ProductMediaReorder { - productMediaReorder: ProductMediaReorder_productMediaReorder | null; -} - -export interface ProductMediaReorderVariables { - productId: string; - mediaIds: (string | null)[]; -} diff --git a/src/products/types/ProductMediaUpdate.ts b/src/products/types/ProductMediaUpdate.ts deleted file mode 100644 index bc81bb1e0..000000000 --- a/src/products/types/ProductMediaUpdate.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode, ProductMediaType } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductMediaUpdate -// ==================================================== - -export interface ProductMediaUpdate_productMediaUpdate_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface ProductMediaUpdate_productMediaUpdate_product_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface ProductMediaUpdate_productMediaUpdate_product { - __typename: "Product"; - id: string; - media: ProductMediaUpdate_productMediaUpdate_product_media[] | null; -} - -export interface ProductMediaUpdate_productMediaUpdate { - __typename: "ProductMediaUpdate"; - errors: ProductMediaUpdate_productMediaUpdate_errors[]; - product: ProductMediaUpdate_productMediaUpdate_product | null; -} - -export interface ProductMediaUpdate { - productMediaUpdate: ProductMediaUpdate_productMediaUpdate | null; -} - -export interface ProductMediaUpdateVariables { - id: string; - alt: string; -} diff --git a/src/products/types/ProductType.ts b/src/products/types/ProductType.ts deleted file mode 100644 index 56ac256b5..000000000 --- a/src/products/types/ProductType.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ProductType -// ==================================================== - -export interface ProductType_productType_productAttributes_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface ProductType_productType_productAttributes_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductType_productType_productAttributes_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductType_productType_productAttributes_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface ProductType_productType_productAttributes_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: ProductType_productType_productAttributes_choices_edges_node; -} - -export interface ProductType_productType_productAttributes_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: ProductType_productType_productAttributes_choices_pageInfo; - edges: ProductType_productType_productAttributes_choices_edges[]; -} - -export interface ProductType_productType_productAttributes { - __typename: "Attribute"; - id: string; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - slug: string | null; - name: string | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: ProductType_productType_productAttributes_choices | null; -} - -export interface ProductType_productType_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface ProductType_productType { - __typename: "ProductType"; - id: string; - name: string; - hasVariants: boolean; - productAttributes: (ProductType_productType_productAttributes | null)[] | null; - taxType: ProductType_productType_taxType | null; -} - -export interface ProductType { - productType: ProductType_productType | null; -} - -export interface ProductTypeVariables { - id: string; - firstValues?: number | null; - afterValues?: string | null; - lastValues?: number | null; - beforeValues?: string | null; -} diff --git a/src/products/types/ProductUpdate.ts b/src/products/types/ProductUpdate.ts deleted file mode 100644 index c54bad826..000000000 --- a/src/products/types/ProductUpdate.ts +++ /dev/null @@ -1,346 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductInput, ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductUpdate -// ==================================================== - -export interface ProductUpdate_productUpdate_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; - attributes: string[] | null; -} - -export interface ProductUpdate_productUpdate_product_attributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface ProductUpdate_productUpdate_product_attributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductUpdate_productUpdate_product_attributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductUpdate_productUpdate_product_attributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface ProductUpdate_productUpdate_product_attributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: ProductUpdate_productUpdate_product_attributes_attribute_choices_edges_node; -} - -export interface ProductUpdate_productUpdate_product_attributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: ProductUpdate_productUpdate_product_attributes_attribute_choices_pageInfo; - edges: ProductUpdate_productUpdate_product_attributes_attribute_choices_edges[]; -} - -export interface ProductUpdate_productUpdate_product_attributes_attribute { - __typename: "Attribute"; - id: string; - slug: string | null; - name: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: ProductUpdate_productUpdate_product_attributes_attribute_choices | null; -} - -export interface ProductUpdate_productUpdate_product_attributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductUpdate_productUpdate_product_attributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductUpdate_productUpdate_product_attributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface ProductUpdate_productUpdate_product_attributes { - __typename: "SelectedAttribute"; - attribute: ProductUpdate_productUpdate_product_attributes_attribute; - values: (ProductUpdate_productUpdate_product_attributes_values | null)[]; -} - -export interface ProductUpdate_productUpdate_product_productType_variantAttributes_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface ProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface ProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: ProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges_node; -} - -export interface ProductUpdate_productUpdate_product_productType_variantAttributes_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: ProductUpdate_productUpdate_product_productType_variantAttributes_choices_pageInfo; - edges: ProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges[]; -} - -export interface ProductUpdate_productUpdate_product_productType_variantAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - inputType: AttributeInputTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: ProductUpdate_productUpdate_product_productType_variantAttributes_choices | null; -} - -export interface ProductUpdate_productUpdate_product_productType_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface ProductUpdate_productUpdate_product_productType { - __typename: "ProductType"; - id: string; - variantAttributes: (ProductUpdate_productUpdate_product_productType_variantAttributes | null)[] | null; - name: string; - hasVariants: boolean; - taxType: ProductUpdate_productUpdate_product_productType_taxType | null; -} - -export interface ProductUpdate_productUpdate_product_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ProductUpdate_productUpdate_product_channelListings { - __typename: "ProductChannelListing"; - channel: ProductUpdate_productUpdate_product_channelListings_channel; - isPublished: boolean; - publicationDate: any | null; - isAvailableForPurchase: boolean | null; - availableForPurchase: any | null; - visibleInListings: boolean; -} - -export interface ProductUpdate_productUpdate_product_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductUpdate_productUpdate_product_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductUpdate_productUpdate_product_defaultVariant { - __typename: "ProductVariant"; - id: string; -} - -export interface ProductUpdate_productUpdate_product_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface ProductUpdate_productUpdate_product_collections { - __typename: "Collection"; - id: string; - name: string; -} - -export interface ProductUpdate_productUpdate_product_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface ProductUpdate_productUpdate_product_variants_media { - __typename: "ProductMedia"; - url: string; -} - -export interface ProductUpdate_productUpdate_product_variants_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface ProductUpdate_productUpdate_product_variants_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: ProductUpdate_productUpdate_product_variants_stocks_warehouse; -} - -export interface ProductUpdate_productUpdate_product_variants_preorder { - __typename: "PreorderData"; - globalThreshold: number | null; - globalSoldUnits: number; - endDate: any | null; -} - -export interface ProductUpdate_productUpdate_product_variants_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ProductUpdate_productUpdate_product_variants_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductUpdate_productUpdate_product_variants_channelListings_costPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductUpdate_productUpdate_product_variants_channelListings_preorderThreshold { - __typename: "PreorderThreshold"; - quantity: number | null; - soldUnits: number; -} - -export interface ProductUpdate_productUpdate_product_variants_channelListings { - __typename: "ProductVariantChannelListing"; - channel: ProductUpdate_productUpdate_product_variants_channelListings_channel; - price: ProductUpdate_productUpdate_product_variants_channelListings_price | null; - costPrice: ProductUpdate_productUpdate_product_variants_channelListings_costPrice | null; - preorderThreshold: ProductUpdate_productUpdate_product_variants_channelListings_preorderThreshold | null; -} - -export interface ProductUpdate_productUpdate_product_variants { - __typename: "ProductVariant"; - id: string; - sku: string | null; - name: string; - margin: number | null; - media: ProductUpdate_productUpdate_product_variants_media[] | null; - stocks: (ProductUpdate_productUpdate_product_variants_stocks | null)[] | null; - trackInventory: boolean; - preorder: ProductUpdate_productUpdate_product_variants_preorder | null; - channelListings: ProductUpdate_productUpdate_product_variants_channelListings[] | null; - quantityLimitPerCustomer: number | null; -} - -export interface ProductUpdate_productUpdate_product_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ProductUpdate_productUpdate_product_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface ProductUpdate_productUpdate_product { - __typename: "Product"; - id: string; - attributes: ProductUpdate_productUpdate_product_attributes[]; - productType: ProductUpdate_productUpdate_product_productType; - channelListings: ProductUpdate_productUpdate_product_channelListings[] | null; - metadata: (ProductUpdate_productUpdate_product_metadata | null)[]; - privateMetadata: (ProductUpdate_productUpdate_product_privateMetadata | null)[]; - name: string; - slug: string; - description: any | null; - seoTitle: string | null; - seoDescription: string | null; - rating: number | null; - defaultVariant: ProductUpdate_productUpdate_product_defaultVariant | null; - category: ProductUpdate_productUpdate_product_category | null; - collections: (ProductUpdate_productUpdate_product_collections | null)[] | null; - chargeTaxes: boolean; - media: ProductUpdate_productUpdate_product_media[] | null; - isAvailable: boolean | null; - variants: (ProductUpdate_productUpdate_product_variants | null)[] | null; - weight: ProductUpdate_productUpdate_product_weight | null; - taxType: ProductUpdate_productUpdate_product_taxType | null; -} - -export interface ProductUpdate_productUpdate { - __typename: "ProductUpdate"; - errors: ProductUpdate_productUpdate_errors[]; - product: ProductUpdate_productUpdate_product | null; -} - -export interface ProductUpdate { - productUpdate: ProductUpdate_productUpdate | null; -} - -export interface ProductUpdateVariables { - id: string; - input: ProductInput; - firstValues?: number | null; - afterValues?: string | null; - lastValues?: number | null; - beforeValues?: string | null; -} diff --git a/src/products/types/ProductVariantBulkCreate.ts b/src/products/types/ProductVariantBulkCreate.ts deleted file mode 100644 index bd02281cc..000000000 --- a/src/products/types/ProductVariantBulkCreate.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductVariantBulkCreateInput, ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductVariantBulkCreate -// ==================================================== - -export interface ProductVariantBulkCreate_productVariantBulkCreate_errors { - __typename: "BulkProductError"; - field: string | null; - code: ProductErrorCode; - index: number | null; - channels: string[] | null; - message: string | null; -} - -export interface ProductVariantBulkCreate_productVariantBulkCreate { - __typename: "ProductVariantBulkCreate"; - errors: ProductVariantBulkCreate_productVariantBulkCreate_errors[]; -} - -export interface ProductVariantBulkCreate { - productVariantBulkCreate: ProductVariantBulkCreate_productVariantBulkCreate | null; -} - -export interface ProductVariantBulkCreateVariables { - id: string; - inputs: (ProductVariantBulkCreateInput | null)[]; -} diff --git a/src/products/types/ProductVariantBulkDelete.ts b/src/products/types/ProductVariantBulkDelete.ts deleted file mode 100644 index 34e2671e0..000000000 --- a/src/products/types/ProductVariantBulkDelete.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductVariantBulkDelete -// ==================================================== - -export interface ProductVariantBulkDelete_productVariantBulkDelete_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface ProductVariantBulkDelete_productVariantBulkDelete { - __typename: "ProductVariantBulkDelete"; - errors: ProductVariantBulkDelete_productVariantBulkDelete_errors[]; -} - -export interface ProductVariantBulkDelete { - productVariantBulkDelete: ProductVariantBulkDelete_productVariantBulkDelete | null; -} - -export interface ProductVariantBulkDeleteVariables { - ids: string[]; -} diff --git a/src/products/types/ProductVariantChannelListingUpdate.ts b/src/products/types/ProductVariantChannelListingUpdate.ts deleted file mode 100644 index 8c1fcae6c..000000000 --- a/src/products/types/ProductVariantChannelListingUpdate.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductVariantChannelListingAddInput, ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductVariantChannelListingUpdate -// ==================================================== - -export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_channelListings_costPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_channelListings_preorderThreshold { - __typename: "PreorderThreshold"; - quantity: number | null; - soldUnits: number; -} - -export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_channelListings { - __typename: "ProductVariantChannelListing"; - channel: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_channelListings_channel; - price: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_channelListings_price | null; - costPrice: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_channelListings_costPrice | null; - preorderThreshold: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_channelListings_preorderThreshold | null; -} - -export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings { - __typename: "ProductChannelListing"; - isPublished: boolean; - publicationDate: any | null; - isAvailableForPurchase: boolean | null; - availableForPurchase: any | null; - visibleInListings: boolean; - channel: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings_channel; -} - -export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product { - __typename: "Product"; - id: string; - channelListings: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings[] | null; -} - -export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant { - __typename: "ProductVariant"; - id: string; - channelListings: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_channelListings[] | null; - product: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product; -} - -export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_errors { - __typename: "ProductChannelListingError"; - code: ProductErrorCode; - field: string | null; - message: string | null; - channels: string[] | null; -} - -export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate { - __typename: "ProductVariantChannelListingUpdate"; - variant: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant | null; - errors: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_errors[]; -} - -export interface ProductVariantChannelListingUpdate { - productVariantChannelListingUpdate: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate | null; -} - -export interface ProductVariantChannelListingUpdateVariables { - id: string; - input: ProductVariantChannelListingAddInput[]; -} diff --git a/src/products/types/ProductVariantCreateData.ts b/src/products/types/ProductVariantCreateData.ts deleted file mode 100644 index 36f490164..000000000 --- a/src/products/types/ProductVariantCreateData.ts +++ /dev/null @@ -1,183 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum, ProductMediaType } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ProductVariantCreateData -// ==================================================== - -export interface ProductVariantCreateData_product_media { - __typename: "ProductMedia"; - id: string; - sortOrder: number | null; - url: string; -} - -export interface ProductVariantCreateData_product_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ProductVariantCreateData_product_channelListings { - __typename: "ProductChannelListing"; - channel: ProductVariantCreateData_product_channelListings_channel; -} - -export interface ProductVariantCreateData_product_productType_selectionVariantAttributes_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface ProductVariantCreateData_product_productType_selectionVariantAttributes_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductVariantCreateData_product_productType_selectionVariantAttributes_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductVariantCreateData_product_productType_selectionVariantAttributes_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface ProductVariantCreateData_product_productType_selectionVariantAttributes_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: ProductVariantCreateData_product_productType_selectionVariantAttributes_choices_edges_node; -} - -export interface ProductVariantCreateData_product_productType_selectionVariantAttributes_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: ProductVariantCreateData_product_productType_selectionVariantAttributes_choices_pageInfo; - edges: ProductVariantCreateData_product_productType_selectionVariantAttributes_choices_edges[]; -} - -export interface ProductVariantCreateData_product_productType_selectionVariantAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: ProductVariantCreateData_product_productType_selectionVariantAttributes_choices | null; -} - -export interface ProductVariantCreateData_product_productType_nonSelectionVariantAttributes_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface ProductVariantCreateData_product_productType_nonSelectionVariantAttributes_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductVariantCreateData_product_productType_nonSelectionVariantAttributes_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductVariantCreateData_product_productType_nonSelectionVariantAttributes_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface ProductVariantCreateData_product_productType_nonSelectionVariantAttributes_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: ProductVariantCreateData_product_productType_nonSelectionVariantAttributes_choices_edges_node; -} - -export interface ProductVariantCreateData_product_productType_nonSelectionVariantAttributes_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: ProductVariantCreateData_product_productType_nonSelectionVariantAttributes_choices_pageInfo; - edges: ProductVariantCreateData_product_productType_nonSelectionVariantAttributes_choices_edges[]; -} - -export interface ProductVariantCreateData_product_productType_nonSelectionVariantAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: ProductVariantCreateData_product_productType_nonSelectionVariantAttributes_choices | null; -} - -export interface ProductVariantCreateData_product_productType { - __typename: "ProductType"; - id: string; - selectionVariantAttributes: (ProductVariantCreateData_product_productType_selectionVariantAttributes | null)[] | null; - nonSelectionVariantAttributes: (ProductVariantCreateData_product_productType_nonSelectionVariantAttributes | null)[] | null; -} - -export interface ProductVariantCreateData_product_thumbnail { - __typename: "Image"; - url: string; -} - -export interface ProductVariantCreateData_product_variants_media { - __typename: "ProductMedia"; - id: string; - url: string; - type: ProductMediaType; -} - -export interface ProductVariantCreateData_product_variants { - __typename: "ProductVariant"; - id: string; - name: string; - sku: string | null; - media: ProductVariantCreateData_product_variants_media[] | null; -} - -export interface ProductVariantCreateData_product { - __typename: "Product"; - id: string; - media: ProductVariantCreateData_product_media[] | null; - channelListings: ProductVariantCreateData_product_channelListings[] | null; - name: string; - productType: ProductVariantCreateData_product_productType; - thumbnail: ProductVariantCreateData_product_thumbnail | null; - variants: (ProductVariantCreateData_product_variants | null)[] | null; -} - -export interface ProductVariantCreateData { - product: ProductVariantCreateData_product | null; -} - -export interface ProductVariantCreateDataVariables { - id: string; - firstValues?: number | null; - afterValues?: string | null; - lastValues?: number | null; - beforeValues?: string | null; -} diff --git a/src/products/types/ProductVariantDetails.ts b/src/products/types/ProductVariantDetails.ts deleted file mode 100644 index dccf12795..000000000 --- a/src/products/types/ProductVariantDetails.ts +++ /dev/null @@ -1,338 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ProductVariantDetails -// ==================================================== - -export interface ProductVariantDetails_productVariant_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductVariantDetails_productVariant_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ProductVariantDetails_productVariant_selectionAttributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface ProductVariantDetails_productVariant_selectionAttributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductVariantDetails_productVariant_selectionAttributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductVariantDetails_productVariant_selectionAttributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface ProductVariantDetails_productVariant_selectionAttributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: ProductVariantDetails_productVariant_selectionAttributes_attribute_choices_edges_node; -} - -export interface ProductVariantDetails_productVariant_selectionAttributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: ProductVariantDetails_productVariant_selectionAttributes_attribute_choices_pageInfo; - edges: ProductVariantDetails_productVariant_selectionAttributes_attribute_choices_edges[]; -} - -export interface ProductVariantDetails_productVariant_selectionAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: ProductVariantDetails_productVariant_selectionAttributes_attribute_choices | null; -} - -export interface ProductVariantDetails_productVariant_selectionAttributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductVariantDetails_productVariant_selectionAttributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductVariantDetails_productVariant_selectionAttributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface ProductVariantDetails_productVariant_selectionAttributes { - __typename: "SelectedAttribute"; - attribute: ProductVariantDetails_productVariant_selectionAttributes_attribute; - values: (ProductVariantDetails_productVariant_selectionAttributes_values | null)[]; -} - -export interface ProductVariantDetails_productVariant_nonSelectionAttributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface ProductVariantDetails_productVariant_nonSelectionAttributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductVariantDetails_productVariant_nonSelectionAttributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductVariantDetails_productVariant_nonSelectionAttributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface ProductVariantDetails_productVariant_nonSelectionAttributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: ProductVariantDetails_productVariant_nonSelectionAttributes_attribute_choices_edges_node; -} - -export interface ProductVariantDetails_productVariant_nonSelectionAttributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: ProductVariantDetails_productVariant_nonSelectionAttributes_attribute_choices_pageInfo; - edges: ProductVariantDetails_productVariant_nonSelectionAttributes_attribute_choices_edges[]; -} - -export interface ProductVariantDetails_productVariant_nonSelectionAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: ProductVariantDetails_productVariant_nonSelectionAttributes_attribute_choices | null; -} - -export interface ProductVariantDetails_productVariant_nonSelectionAttributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface ProductVariantDetails_productVariant_nonSelectionAttributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: ProductVariantDetails_productVariant_nonSelectionAttributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface ProductVariantDetails_productVariant_nonSelectionAttributes { - __typename: "SelectedAttribute"; - attribute: ProductVariantDetails_productVariant_nonSelectionAttributes_attribute; - values: (ProductVariantDetails_productVariant_nonSelectionAttributes_values | null)[]; -} - -export interface ProductVariantDetails_productVariant_media { - __typename: "ProductMedia"; - id: string; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface ProductVariantDetails_productVariant_product_defaultVariant { - __typename: "ProductVariant"; - id: string; -} - -export interface ProductVariantDetails_productVariant_product_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface ProductVariantDetails_productVariant_product_thumbnail { - __typename: "Image"; - url: string; -} - -export interface ProductVariantDetails_productVariant_product_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ProductVariantDetails_productVariant_product_channelListings { - __typename: "ProductChannelListing"; - publicationDate: any | null; - isPublished: boolean; - channel: ProductVariantDetails_productVariant_product_channelListings_channel; -} - -export interface ProductVariantDetails_productVariant_product_variants_media { - __typename: "ProductMedia"; - id: string; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface ProductVariantDetails_productVariant_product_variants { - __typename: "ProductVariant"; - id: string; - name: string; - sku: string | null; - media: ProductVariantDetails_productVariant_product_variants_media[] | null; -} - -export interface ProductVariantDetails_productVariant_product { - __typename: "Product"; - id: string; - defaultVariant: ProductVariantDetails_productVariant_product_defaultVariant | null; - media: ProductVariantDetails_productVariant_product_media[] | null; - name: string; - thumbnail: ProductVariantDetails_productVariant_product_thumbnail | null; - channelListings: ProductVariantDetails_productVariant_product_channelListings[] | null; - variants: (ProductVariantDetails_productVariant_product_variants | null)[] | null; -} - -export interface ProductVariantDetails_productVariant_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ProductVariantDetails_productVariant_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductVariantDetails_productVariant_channelListings_costPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ProductVariantDetails_productVariant_channelListings_preorderThreshold { - __typename: "PreorderThreshold"; - quantity: number | null; - soldUnits: number; -} - -export interface ProductVariantDetails_productVariant_channelListings { - __typename: "ProductVariantChannelListing"; - channel: ProductVariantDetails_productVariant_channelListings_channel; - price: ProductVariantDetails_productVariant_channelListings_price | null; - costPrice: ProductVariantDetails_productVariant_channelListings_costPrice | null; - preorderThreshold: ProductVariantDetails_productVariant_channelListings_preorderThreshold | null; -} - -export interface ProductVariantDetails_productVariant_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface ProductVariantDetails_productVariant_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: ProductVariantDetails_productVariant_stocks_warehouse; -} - -export interface ProductVariantDetails_productVariant_preorder { - __typename: "PreorderData"; - globalThreshold: number | null; - globalSoldUnits: number; - endDate: any | null; -} - -export interface ProductVariantDetails_productVariant_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ProductVariantDetails_productVariant { - __typename: "ProductVariant"; - id: string; - metadata: (ProductVariantDetails_productVariant_metadata | null)[]; - privateMetadata: (ProductVariantDetails_productVariant_privateMetadata | null)[]; - selectionAttributes: ProductVariantDetails_productVariant_selectionAttributes[]; - nonSelectionAttributes: ProductVariantDetails_productVariant_nonSelectionAttributes[]; - media: ProductVariantDetails_productVariant_media[] | null; - name: string; - product: ProductVariantDetails_productVariant_product; - channelListings: ProductVariantDetails_productVariant_channelListings[] | null; - sku: string | null; - stocks: (ProductVariantDetails_productVariant_stocks | null)[] | null; - trackInventory: boolean; - preorder: ProductVariantDetails_productVariant_preorder | null; - weight: ProductVariantDetails_productVariant_weight | null; - quantityLimitPerCustomer: number | null; -} - -export interface ProductVariantDetails { - productVariant: ProductVariantDetails_productVariant | null; -} - -export interface ProductVariantDetailsVariables { - id: string; - firstValues?: number | null; - afterValues?: string | null; - lastValues?: number | null; - beforeValues?: string | null; -} diff --git a/src/products/types/ProductVariantPreorderDeactivate.ts b/src/products/types/ProductVariantPreorderDeactivate.ts deleted file mode 100644 index b6b27f944..000000000 --- a/src/products/types/ProductVariantPreorderDeactivate.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductVariantPreorderDeactivate -// ==================================================== - -export interface ProductVariantPreorderDeactivate_productVariantPreorderDeactivate_productVariant_preorder { - __typename: "PreorderData"; - globalThreshold: number | null; - globalSoldUnits: number; - endDate: any | null; -} - -export interface ProductVariantPreorderDeactivate_productVariantPreorderDeactivate_productVariant { - __typename: "ProductVariant"; - id: string; - preorder: ProductVariantPreorderDeactivate_productVariantPreorderDeactivate_productVariant_preorder | null; -} - -export interface ProductVariantPreorderDeactivate_productVariantPreorderDeactivate_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface ProductVariantPreorderDeactivate_productVariantPreorderDeactivate { - __typename: "ProductVariantPreorderDeactivate"; - productVariant: ProductVariantPreorderDeactivate_productVariantPreorderDeactivate_productVariant | null; - errors: ProductVariantPreorderDeactivate_productVariantPreorderDeactivate_errors[]; -} - -export interface ProductVariantPreorderDeactivate { - productVariantPreorderDeactivate: ProductVariantPreorderDeactivate_productVariantPreorderDeactivate | null; -} - -export interface ProductVariantPreorderDeactivateVariables { - id: string; -} diff --git a/src/products/types/ProductVariantReorder.ts b/src/products/types/ProductVariantReorder.ts deleted file mode 100644 index 29f6ea575..000000000 --- a/src/products/types/ProductVariantReorder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ReorderInput, ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductVariantReorder -// ==================================================== - -export interface ProductVariantReorder_productVariantReorder_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface ProductVariantReorder_productVariantReorder_product_variants { - __typename: "ProductVariant"; - id: string; -} - -export interface ProductVariantReorder_productVariantReorder_product { - __typename: "Product"; - id: string; - variants: (ProductVariantReorder_productVariantReorder_product_variants | null)[] | null; -} - -export interface ProductVariantReorder_productVariantReorder { - __typename: "ProductVariantReorder"; - errors: ProductVariantReorder_productVariantReorder_errors[]; - product: ProductVariantReorder_productVariantReorder_product | null; -} - -export interface ProductVariantReorder { - productVariantReorder: ProductVariantReorder_productVariantReorder | null; -} - -export interface ProductVariantReorderVariables { - move: ReorderInput; - productId: string; -} diff --git a/src/products/types/ProductVariantSetDefault.ts b/src/products/types/ProductVariantSetDefault.ts deleted file mode 100644 index c2d35d312..000000000 --- a/src/products/types/ProductVariantSetDefault.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductVariantSetDefault -// ==================================================== - -export interface ProductVariantSetDefault_productVariantSetDefault_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface ProductVariantSetDefault_productVariantSetDefault_product_defaultVariant { - __typename: "ProductVariant"; - id: string; - name: string; -} - -export interface ProductVariantSetDefault_productVariantSetDefault_product_variants { - __typename: "ProductVariant"; - id: string; - name: string; -} - -export interface ProductVariantSetDefault_productVariantSetDefault_product { - __typename: "Product"; - id: string; - defaultVariant: ProductVariantSetDefault_productVariantSetDefault_product_defaultVariant | null; - variants: (ProductVariantSetDefault_productVariantSetDefault_product_variants | null)[] | null; -} - -export interface ProductVariantSetDefault_productVariantSetDefault { - __typename: "ProductVariantSetDefault"; - errors: ProductVariantSetDefault_productVariantSetDefault_errors[]; - product: ProductVariantSetDefault_productVariantSetDefault_product | null; -} - -export interface ProductVariantSetDefault { - productVariantSetDefault: ProductVariantSetDefault_productVariantSetDefault | null; -} - -export interface ProductVariantSetDefaultVariables { - productId: string; - variantId: string; -} diff --git a/src/products/types/SimpleProductUpdate.ts b/src/products/types/SimpleProductUpdate.ts deleted file mode 100644 index e32dc334d..000000000 --- a/src/products/types/SimpleProductUpdate.ts +++ /dev/null @@ -1,1674 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductInput, ProductVariantInput, StockInput, ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum, ProductMediaType, WeightUnitsEnum, StockErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: SimpleProductUpdate -// ==================================================== - -export interface SimpleProductUpdate_productUpdate_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; - attributes: string[] | null; -} - -export interface SimpleProductUpdate_productUpdate_product_attributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SimpleProductUpdate_productUpdate_product_attributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SimpleProductUpdate_productUpdate_product_attributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SimpleProductUpdate_productUpdate_product_attributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SimpleProductUpdate_productUpdate_product_attributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: SimpleProductUpdate_productUpdate_product_attributes_attribute_choices_edges_node; -} - -export interface SimpleProductUpdate_productUpdate_product_attributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: SimpleProductUpdate_productUpdate_product_attributes_attribute_choices_pageInfo; - edges: SimpleProductUpdate_productUpdate_product_attributes_attribute_choices_edges[]; -} - -export interface SimpleProductUpdate_productUpdate_product_attributes_attribute { - __typename: "Attribute"; - id: string; - slug: string | null; - name: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: SimpleProductUpdate_productUpdate_product_attributes_attribute_choices | null; -} - -export interface SimpleProductUpdate_productUpdate_product_attributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SimpleProductUpdate_productUpdate_product_attributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SimpleProductUpdate_productUpdate_product_attributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SimpleProductUpdate_productUpdate_product_attributes { - __typename: "SelectedAttribute"; - attribute: SimpleProductUpdate_productUpdate_product_attributes_attribute; - values: (SimpleProductUpdate_productUpdate_product_attributes_values | null)[]; -} - -export interface SimpleProductUpdate_productUpdate_product_productType_variantAttributes_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SimpleProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SimpleProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SimpleProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SimpleProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: SimpleProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges_node; -} - -export interface SimpleProductUpdate_productUpdate_product_productType_variantAttributes_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: SimpleProductUpdate_productUpdate_product_productType_variantAttributes_choices_pageInfo; - edges: SimpleProductUpdate_productUpdate_product_productType_variantAttributes_choices_edges[]; -} - -export interface SimpleProductUpdate_productUpdate_product_productType_variantAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - inputType: AttributeInputTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: SimpleProductUpdate_productUpdate_product_productType_variantAttributes_choices | null; -} - -export interface SimpleProductUpdate_productUpdate_product_productType_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface SimpleProductUpdate_productUpdate_product_productType { - __typename: "ProductType"; - id: string; - variantAttributes: (SimpleProductUpdate_productUpdate_product_productType_variantAttributes | null)[] | null; - name: string; - hasVariants: boolean; - taxType: SimpleProductUpdate_productUpdate_product_productType_taxType | null; -} - -export interface SimpleProductUpdate_productUpdate_product_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface SimpleProductUpdate_productUpdate_product_channelListings { - __typename: "ProductChannelListing"; - channel: SimpleProductUpdate_productUpdate_product_channelListings_channel; - isPublished: boolean; - publicationDate: any | null; - isAvailableForPurchase: boolean | null; - availableForPurchase: any | null; - visibleInListings: boolean; -} - -export interface SimpleProductUpdate_productUpdate_product_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface SimpleProductUpdate_productUpdate_product_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface SimpleProductUpdate_productUpdate_product_defaultVariant { - __typename: "ProductVariant"; - id: string; -} - -export interface SimpleProductUpdate_productUpdate_product_category { - __typename: "Category"; - id: string; - name: string; -} - -export interface SimpleProductUpdate_productUpdate_product_collections { - __typename: "Collection"; - id: string; - name: string; -} - -export interface SimpleProductUpdate_productUpdate_product_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface SimpleProductUpdate_productUpdate_product_variants_media { - __typename: "ProductMedia"; - url: string; -} - -export interface SimpleProductUpdate_productUpdate_product_variants_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface SimpleProductUpdate_productUpdate_product_variants_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: SimpleProductUpdate_productUpdate_product_variants_stocks_warehouse; -} - -export interface SimpleProductUpdate_productUpdate_product_variants_preorder { - __typename: "PreorderData"; - globalThreshold: number | null; - globalSoldUnits: number; - endDate: any | null; -} - -export interface SimpleProductUpdate_productUpdate_product_variants_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface SimpleProductUpdate_productUpdate_product_variants_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface SimpleProductUpdate_productUpdate_product_variants_channelListings_costPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface SimpleProductUpdate_productUpdate_product_variants_channelListings_preorderThreshold { - __typename: "PreorderThreshold"; - quantity: number | null; - soldUnits: number; -} - -export interface SimpleProductUpdate_productUpdate_product_variants_channelListings { - __typename: "ProductVariantChannelListing"; - channel: SimpleProductUpdate_productUpdate_product_variants_channelListings_channel; - price: SimpleProductUpdate_productUpdate_product_variants_channelListings_price | null; - costPrice: SimpleProductUpdate_productUpdate_product_variants_channelListings_costPrice | null; - preorderThreshold: SimpleProductUpdate_productUpdate_product_variants_channelListings_preorderThreshold | null; -} - -export interface SimpleProductUpdate_productUpdate_product_variants { - __typename: "ProductVariant"; - id: string; - sku: string | null; - name: string; - margin: number | null; - media: SimpleProductUpdate_productUpdate_product_variants_media[] | null; - stocks: (SimpleProductUpdate_productUpdate_product_variants_stocks | null)[] | null; - trackInventory: boolean; - preorder: SimpleProductUpdate_productUpdate_product_variants_preorder | null; - channelListings: SimpleProductUpdate_productUpdate_product_variants_channelListings[] | null; - quantityLimitPerCustomer: number | null; -} - -export interface SimpleProductUpdate_productUpdate_product_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface SimpleProductUpdate_productUpdate_product_taxType { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface SimpleProductUpdate_productUpdate_product { - __typename: "Product"; - id: string; - attributes: SimpleProductUpdate_productUpdate_product_attributes[]; - productType: SimpleProductUpdate_productUpdate_product_productType; - channelListings: SimpleProductUpdate_productUpdate_product_channelListings[] | null; - metadata: (SimpleProductUpdate_productUpdate_product_metadata | null)[]; - privateMetadata: (SimpleProductUpdate_productUpdate_product_privateMetadata | null)[]; - name: string; - slug: string; - description: any | null; - seoTitle: string | null; - seoDescription: string | null; - rating: number | null; - defaultVariant: SimpleProductUpdate_productUpdate_product_defaultVariant | null; - category: SimpleProductUpdate_productUpdate_product_category | null; - collections: (SimpleProductUpdate_productUpdate_product_collections | null)[] | null; - chargeTaxes: boolean; - media: SimpleProductUpdate_productUpdate_product_media[] | null; - isAvailable: boolean | null; - variants: (SimpleProductUpdate_productUpdate_product_variants | null)[] | null; - weight: SimpleProductUpdate_productUpdate_product_weight | null; - taxType: SimpleProductUpdate_productUpdate_product_taxType | null; -} - -export interface SimpleProductUpdate_productUpdate { - __typename: "ProductUpdate"; - errors: SimpleProductUpdate_productUpdate_errors[]; - product: SimpleProductUpdate_productUpdate_product | null; -} - -export interface SimpleProductUpdate_productVariantUpdate_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; - attributes: string[] | null; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_choices_edges_node; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_choices_pageInfo; - edges: SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_choices_edges[]; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_choices | null; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes { - __typename: "SelectedAttribute"; - attribute: SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute; - values: (SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes_values | null)[]; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges_node; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_choices_pageInfo; - edges: SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges[]; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_choices | null; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes { - __typename: "SelectedAttribute"; - attribute: SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute; - values: (SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_values | null)[]; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_media { - __typename: "ProductMedia"; - id: string; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_defaultVariant { - __typename: "ProductVariant"; - id: string; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_thumbnail { - __typename: "Image"; - url: string; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings { - __typename: "ProductChannelListing"; - publicationDate: any | null; - isPublished: boolean; - channel: SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings_channel; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_variants_media { - __typename: "ProductMedia"; - id: string; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_variants { - __typename: "ProductVariant"; - id: string; - name: string; - sku: string | null; - media: SimpleProductUpdate_productVariantUpdate_productVariant_product_variants_media[] | null; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_product { - __typename: "Product"; - id: string; - defaultVariant: SimpleProductUpdate_productVariantUpdate_productVariant_product_defaultVariant | null; - media: SimpleProductUpdate_productVariantUpdate_productVariant_product_media[] | null; - name: string; - thumbnail: SimpleProductUpdate_productVariantUpdate_productVariant_product_thumbnail | null; - channelListings: SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings[] | null; - variants: (SimpleProductUpdate_productVariantUpdate_productVariant_product_variants | null)[] | null; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_channelListings_costPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_channelListings_preorderThreshold { - __typename: "PreorderThreshold"; - quantity: number | null; - soldUnits: number; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_channelListings { - __typename: "ProductVariantChannelListing"; - channel: SimpleProductUpdate_productVariantUpdate_productVariant_channelListings_channel; - price: SimpleProductUpdate_productVariantUpdate_productVariant_channelListings_price | null; - costPrice: SimpleProductUpdate_productVariantUpdate_productVariant_channelListings_costPrice | null; - preorderThreshold: SimpleProductUpdate_productVariantUpdate_productVariant_channelListings_preorderThreshold | null; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: SimpleProductUpdate_productVariantUpdate_productVariant_stocks_warehouse; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_preorder { - __typename: "PreorderData"; - globalThreshold: number | null; - globalSoldUnits: number; - endDate: any | null; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface SimpleProductUpdate_productVariantUpdate_productVariant { - __typename: "ProductVariant"; - id: string; - metadata: (SimpleProductUpdate_productVariantUpdate_productVariant_metadata | null)[]; - privateMetadata: (SimpleProductUpdate_productVariantUpdate_productVariant_privateMetadata | null)[]; - selectionAttributes: SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes[]; - nonSelectionAttributes: SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes[]; - media: SimpleProductUpdate_productVariantUpdate_productVariant_media[] | null; - name: string; - product: SimpleProductUpdate_productVariantUpdate_productVariant_product; - channelListings: SimpleProductUpdate_productVariantUpdate_productVariant_channelListings[] | null; - sku: string | null; - stocks: (SimpleProductUpdate_productVariantUpdate_productVariant_stocks | null)[] | null; - trackInventory: boolean; - preorder: SimpleProductUpdate_productVariantUpdate_productVariant_preorder | null; - weight: SimpleProductUpdate_productVariantUpdate_productVariant_weight | null; - quantityLimitPerCustomer: number | null; -} - -export interface SimpleProductUpdate_productVariantUpdate { - __typename: "ProductVariantUpdate"; - errors: SimpleProductUpdate_productVariantUpdate_errors[]; - productVariant: SimpleProductUpdate_productVariantUpdate_productVariant | null; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_errors { - __typename: "BulkStockError"; - code: ProductErrorCode; - field: string | null; - index: number | null; - message: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute_choices_edges_node; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute_choices_pageInfo; - edges: SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute_choices_edges[]; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute_choices | null; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes { - __typename: "SelectedAttribute"; - attribute: SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_attribute; - values: (SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes_values | null)[]; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute_choices_edges_node; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute_choices_pageInfo; - edges: SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute_choices_edges[]; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute_choices | null; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes { - __typename: "SelectedAttribute"; - attribute: SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_attribute; - values: (SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_values | null)[]; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_media { - __typename: "ProductMedia"; - id: string; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_defaultVariant { - __typename: "ProductVariant"; - id: string; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_thumbnail { - __typename: "Image"; - url: string; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings { - __typename: "ProductChannelListing"; - publicationDate: any | null; - isPublished: boolean; - channel: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings_channel; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_variants_media { - __typename: "ProductMedia"; - id: string; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_variants { - __typename: "ProductVariant"; - id: string; - name: string; - sku: string | null; - media: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_variants_media[] | null; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product { - __typename: "Product"; - id: string; - defaultVariant: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_defaultVariant | null; - media: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_media[] | null; - name: string; - thumbnail: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_thumbnail | null; - channelListings: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings[] | null; - variants: (SimpleProductUpdate_productVariantStocksCreate_productVariant_product_variants | null)[] | null; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_channelListings_costPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_channelListings_preorderThreshold { - __typename: "PreorderThreshold"; - quantity: number | null; - soldUnits: number; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_channelListings { - __typename: "ProductVariantChannelListing"; - channel: SimpleProductUpdate_productVariantStocksCreate_productVariant_channelListings_channel; - price: SimpleProductUpdate_productVariantStocksCreate_productVariant_channelListings_price | null; - costPrice: SimpleProductUpdate_productVariantStocksCreate_productVariant_channelListings_costPrice | null; - preorderThreshold: SimpleProductUpdate_productVariantStocksCreate_productVariant_channelListings_preorderThreshold | null; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: SimpleProductUpdate_productVariantStocksCreate_productVariant_stocks_warehouse; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_preorder { - __typename: "PreorderData"; - globalThreshold: number | null; - globalSoldUnits: number; - endDate: any | null; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant { - __typename: "ProductVariant"; - id: string; - metadata: (SimpleProductUpdate_productVariantStocksCreate_productVariant_metadata | null)[]; - privateMetadata: (SimpleProductUpdate_productVariantStocksCreate_productVariant_privateMetadata | null)[]; - selectionAttributes: SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes[]; - nonSelectionAttributes: SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes[]; - media: SimpleProductUpdate_productVariantStocksCreate_productVariant_media[] | null; - name: string; - product: SimpleProductUpdate_productVariantStocksCreate_productVariant_product; - channelListings: SimpleProductUpdate_productVariantStocksCreate_productVariant_channelListings[] | null; - sku: string | null; - stocks: (SimpleProductUpdate_productVariantStocksCreate_productVariant_stocks | null)[] | null; - trackInventory: boolean; - preorder: SimpleProductUpdate_productVariantStocksCreate_productVariant_preorder | null; - weight: SimpleProductUpdate_productVariantStocksCreate_productVariant_weight | null; - quantityLimitPerCustomer: number | null; -} - -export interface SimpleProductUpdate_productVariantStocksCreate { - __typename: "ProductVariantStocksCreate"; - errors: SimpleProductUpdate_productVariantStocksCreate_errors[]; - productVariant: SimpleProductUpdate_productVariantStocksCreate_productVariant | null; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_errors { - __typename: "StockError"; - code: StockErrorCode; - field: string | null; - message: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute_choices_edges_node; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute_choices_pageInfo; - edges: SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute_choices_edges[]; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute_choices | null; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes { - __typename: "SelectedAttribute"; - attribute: SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_attribute; - values: (SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes_values | null)[]; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute_choices_edges_node; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute_choices_pageInfo; - edges: SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute_choices_edges[]; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute_choices | null; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes { - __typename: "SelectedAttribute"; - attribute: SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_attribute; - values: (SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_values | null)[]; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_media { - __typename: "ProductMedia"; - id: string; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_defaultVariant { - __typename: "ProductVariant"; - id: string; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_thumbnail { - __typename: "Image"; - url: string; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings { - __typename: "ProductChannelListing"; - publicationDate: any | null; - isPublished: boolean; - channel: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings_channel; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_variants_media { - __typename: "ProductMedia"; - id: string; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_variants { - __typename: "ProductVariant"; - id: string; - name: string; - sku: string | null; - media: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_variants_media[] | null; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product { - __typename: "Product"; - id: string; - defaultVariant: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_defaultVariant | null; - media: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_media[] | null; - name: string; - thumbnail: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_thumbnail | null; - channelListings: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings[] | null; - variants: (SimpleProductUpdate_productVariantStocksDelete_productVariant_product_variants | null)[] | null; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_channelListings_costPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_channelListings_preorderThreshold { - __typename: "PreorderThreshold"; - quantity: number | null; - soldUnits: number; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_channelListings { - __typename: "ProductVariantChannelListing"; - channel: SimpleProductUpdate_productVariantStocksDelete_productVariant_channelListings_channel; - price: SimpleProductUpdate_productVariantStocksDelete_productVariant_channelListings_price | null; - costPrice: SimpleProductUpdate_productVariantStocksDelete_productVariant_channelListings_costPrice | null; - preorderThreshold: SimpleProductUpdate_productVariantStocksDelete_productVariant_channelListings_preorderThreshold | null; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: SimpleProductUpdate_productVariantStocksDelete_productVariant_stocks_warehouse; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_preorder { - __typename: "PreorderData"; - globalThreshold: number | null; - globalSoldUnits: number; - endDate: any | null; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant { - __typename: "ProductVariant"; - id: string; - metadata: (SimpleProductUpdate_productVariantStocksDelete_productVariant_metadata | null)[]; - privateMetadata: (SimpleProductUpdate_productVariantStocksDelete_productVariant_privateMetadata | null)[]; - selectionAttributes: SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes[]; - nonSelectionAttributes: SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes[]; - media: SimpleProductUpdate_productVariantStocksDelete_productVariant_media[] | null; - name: string; - product: SimpleProductUpdate_productVariantStocksDelete_productVariant_product; - channelListings: SimpleProductUpdate_productVariantStocksDelete_productVariant_channelListings[] | null; - sku: string | null; - stocks: (SimpleProductUpdate_productVariantStocksDelete_productVariant_stocks | null)[] | null; - trackInventory: boolean; - preorder: SimpleProductUpdate_productVariantStocksDelete_productVariant_preorder | null; - weight: SimpleProductUpdate_productVariantStocksDelete_productVariant_weight | null; - quantityLimitPerCustomer: number | null; -} - -export interface SimpleProductUpdate_productVariantStocksDelete { - __typename: "ProductVariantStocksDelete"; - errors: SimpleProductUpdate_productVariantStocksDelete_errors[]; - productVariant: SimpleProductUpdate_productVariantStocksDelete_productVariant | null; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_errors { - __typename: "BulkStockError"; - code: ProductErrorCode; - field: string | null; - index: number | null; - message: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_choices_edges_node; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_choices_pageInfo; - edges: SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_choices_edges[]; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_choices | null; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes { - __typename: "SelectedAttribute"; - attribute: SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute; - values: (SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_values | null)[]; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges_node; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_choices_pageInfo; - edges: SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges[]; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_choices | null; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes { - __typename: "SelectedAttribute"; - attribute: SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute; - values: (SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_values | null)[]; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_media { - __typename: "ProductMedia"; - id: string; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_defaultVariant { - __typename: "ProductVariant"; - id: string; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_thumbnail { - __typename: "Image"; - url: string; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings { - __typename: "ProductChannelListing"; - publicationDate: any | null; - isPublished: boolean; - channel: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings_channel; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_variants_media { - __typename: "ProductMedia"; - id: string; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_variants { - __typename: "ProductVariant"; - id: string; - name: string; - sku: string | null; - media: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_variants_media[] | null; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product { - __typename: "Product"; - id: string; - defaultVariant: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_defaultVariant | null; - media: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_media[] | null; - name: string; - thumbnail: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_thumbnail | null; - channelListings: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings[] | null; - variants: (SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_variants | null)[] | null; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_channelListings_costPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_channelListings_preorderThreshold { - __typename: "PreorderThreshold"; - quantity: number | null; - soldUnits: number; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_channelListings { - __typename: "ProductVariantChannelListing"; - channel: SimpleProductUpdate_productVariantStocksUpdate_productVariant_channelListings_channel; - price: SimpleProductUpdate_productVariantStocksUpdate_productVariant_channelListings_price | null; - costPrice: SimpleProductUpdate_productVariantStocksUpdate_productVariant_channelListings_costPrice | null; - preorderThreshold: SimpleProductUpdate_productVariantStocksUpdate_productVariant_channelListings_preorderThreshold | null; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: SimpleProductUpdate_productVariantStocksUpdate_productVariant_stocks_warehouse; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_preorder { - __typename: "PreorderData"; - globalThreshold: number | null; - globalSoldUnits: number; - endDate: any | null; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant { - __typename: "ProductVariant"; - id: string; - metadata: (SimpleProductUpdate_productVariantStocksUpdate_productVariant_metadata | null)[]; - privateMetadata: (SimpleProductUpdate_productVariantStocksUpdate_productVariant_privateMetadata | null)[]; - selectionAttributes: SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes[]; - nonSelectionAttributes: SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes[]; - media: SimpleProductUpdate_productVariantStocksUpdate_productVariant_media[] | null; - name: string; - product: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product; - channelListings: SimpleProductUpdate_productVariantStocksUpdate_productVariant_channelListings[] | null; - sku: string | null; - stocks: (SimpleProductUpdate_productVariantStocksUpdate_productVariant_stocks | null)[] | null; - trackInventory: boolean; - preorder: SimpleProductUpdate_productVariantStocksUpdate_productVariant_preorder | null; - weight: SimpleProductUpdate_productVariantStocksUpdate_productVariant_weight | null; - quantityLimitPerCustomer: number | null; -} - -export interface SimpleProductUpdate_productVariantStocksUpdate { - __typename: "ProductVariantStocksUpdate"; - errors: SimpleProductUpdate_productVariantStocksUpdate_errors[]; - productVariant: SimpleProductUpdate_productVariantStocksUpdate_productVariant | null; -} - -export interface SimpleProductUpdate { - productUpdate: SimpleProductUpdate_productUpdate | null; - productVariantUpdate: SimpleProductUpdate_productVariantUpdate | null; - productVariantStocksCreate: SimpleProductUpdate_productVariantStocksCreate | null; - productVariantStocksDelete: SimpleProductUpdate_productVariantStocksDelete | null; - productVariantStocksUpdate: SimpleProductUpdate_productVariantStocksUpdate | null; -} - -export interface SimpleProductUpdateVariables { - id: string; - input: ProductInput; - productVariantId: string; - productVariantInput: ProductVariantInput; - addStocks: StockInput[]; - deleteStocks: string[]; - updateStocks: StockInput[]; - firstValues?: number | null; - afterValues?: string | null; - lastValues?: number | null; - beforeValues?: string | null; -} diff --git a/src/products/types/VariantCreate.ts b/src/products/types/VariantCreate.ts deleted file mode 100644 index 081e52973..000000000 --- a/src/products/types/VariantCreate.ts +++ /dev/null @@ -1,352 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductVariantCreateInput, ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: VariantCreate -// ==================================================== - -export interface VariantCreate_productVariantCreate_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; - attributes: string[] | null; -} - -export interface VariantCreate_productVariantCreate_productVariant_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface VariantCreate_productVariantCreate_productVariant_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface VariantCreate_productVariantCreate_productVariant_selectionAttributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface VariantCreate_productVariantCreate_productVariant_selectionAttributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface VariantCreate_productVariantCreate_productVariant_selectionAttributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: VariantCreate_productVariantCreate_productVariant_selectionAttributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface VariantCreate_productVariantCreate_productVariant_selectionAttributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: VariantCreate_productVariantCreate_productVariant_selectionAttributes_attribute_choices_edges_node; -} - -export interface VariantCreate_productVariantCreate_productVariant_selectionAttributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: VariantCreate_productVariantCreate_productVariant_selectionAttributes_attribute_choices_pageInfo; - edges: VariantCreate_productVariantCreate_productVariant_selectionAttributes_attribute_choices_edges[]; -} - -export interface VariantCreate_productVariantCreate_productVariant_selectionAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: VariantCreate_productVariantCreate_productVariant_selectionAttributes_attribute_choices | null; -} - -export interface VariantCreate_productVariantCreate_productVariant_selectionAttributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface VariantCreate_productVariantCreate_productVariant_selectionAttributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: VariantCreate_productVariantCreate_productVariant_selectionAttributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface VariantCreate_productVariantCreate_productVariant_selectionAttributes { - __typename: "SelectedAttribute"; - attribute: VariantCreate_productVariantCreate_productVariant_selectionAttributes_attribute; - values: (VariantCreate_productVariantCreate_productVariant_selectionAttributes_values | null)[]; -} - -export interface VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes_attribute_choices_edges_node; -} - -export interface VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes_attribute_choices_pageInfo; - edges: VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes_attribute_choices_edges[]; -} - -export interface VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes_attribute_choices | null; -} - -export interface VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes { - __typename: "SelectedAttribute"; - attribute: VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes_attribute; - values: (VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes_values | null)[]; -} - -export interface VariantCreate_productVariantCreate_productVariant_media { - __typename: "ProductMedia"; - id: string; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface VariantCreate_productVariantCreate_productVariant_product_defaultVariant { - __typename: "ProductVariant"; - id: string; -} - -export interface VariantCreate_productVariantCreate_productVariant_product_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface VariantCreate_productVariantCreate_productVariant_product_thumbnail { - __typename: "Image"; - url: string; -} - -export interface VariantCreate_productVariantCreate_productVariant_product_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface VariantCreate_productVariantCreate_productVariant_product_channelListings { - __typename: "ProductChannelListing"; - publicationDate: any | null; - isPublished: boolean; - channel: VariantCreate_productVariantCreate_productVariant_product_channelListings_channel; -} - -export interface VariantCreate_productVariantCreate_productVariant_product_variants_media { - __typename: "ProductMedia"; - id: string; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface VariantCreate_productVariantCreate_productVariant_product_variants { - __typename: "ProductVariant"; - id: string; - name: string; - sku: string | null; - media: VariantCreate_productVariantCreate_productVariant_product_variants_media[] | null; -} - -export interface VariantCreate_productVariantCreate_productVariant_product { - __typename: "Product"; - id: string; - defaultVariant: VariantCreate_productVariantCreate_productVariant_product_defaultVariant | null; - media: VariantCreate_productVariantCreate_productVariant_product_media[] | null; - name: string; - thumbnail: VariantCreate_productVariantCreate_productVariant_product_thumbnail | null; - channelListings: VariantCreate_productVariantCreate_productVariant_product_channelListings[] | null; - variants: (VariantCreate_productVariantCreate_productVariant_product_variants | null)[] | null; -} - -export interface VariantCreate_productVariantCreate_productVariant_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface VariantCreate_productVariantCreate_productVariant_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface VariantCreate_productVariantCreate_productVariant_channelListings_costPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface VariantCreate_productVariantCreate_productVariant_channelListings_preorderThreshold { - __typename: "PreorderThreshold"; - quantity: number | null; - soldUnits: number; -} - -export interface VariantCreate_productVariantCreate_productVariant_channelListings { - __typename: "ProductVariantChannelListing"; - channel: VariantCreate_productVariantCreate_productVariant_channelListings_channel; - price: VariantCreate_productVariantCreate_productVariant_channelListings_price | null; - costPrice: VariantCreate_productVariantCreate_productVariant_channelListings_costPrice | null; - preorderThreshold: VariantCreate_productVariantCreate_productVariant_channelListings_preorderThreshold | null; -} - -export interface VariantCreate_productVariantCreate_productVariant_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface VariantCreate_productVariantCreate_productVariant_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: VariantCreate_productVariantCreate_productVariant_stocks_warehouse; -} - -export interface VariantCreate_productVariantCreate_productVariant_preorder { - __typename: "PreorderData"; - globalThreshold: number | null; - globalSoldUnits: number; - endDate: any | null; -} - -export interface VariantCreate_productVariantCreate_productVariant_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface VariantCreate_productVariantCreate_productVariant { - __typename: "ProductVariant"; - id: string; - metadata: (VariantCreate_productVariantCreate_productVariant_metadata | null)[]; - privateMetadata: (VariantCreate_productVariantCreate_productVariant_privateMetadata | null)[]; - selectionAttributes: VariantCreate_productVariantCreate_productVariant_selectionAttributes[]; - nonSelectionAttributes: VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes[]; - media: VariantCreate_productVariantCreate_productVariant_media[] | null; - name: string; - product: VariantCreate_productVariantCreate_productVariant_product; - channelListings: VariantCreate_productVariantCreate_productVariant_channelListings[] | null; - sku: string | null; - stocks: (VariantCreate_productVariantCreate_productVariant_stocks | null)[] | null; - trackInventory: boolean; - preorder: VariantCreate_productVariantCreate_productVariant_preorder | null; - weight: VariantCreate_productVariantCreate_productVariant_weight | null; - quantityLimitPerCustomer: number | null; -} - -export interface VariantCreate_productVariantCreate { - __typename: "ProductVariantCreate"; - errors: VariantCreate_productVariantCreate_errors[]; - productVariant: VariantCreate_productVariantCreate_productVariant | null; -} - -export interface VariantCreate { - productVariantCreate: VariantCreate_productVariantCreate | null; -} - -export interface VariantCreateVariables { - input: ProductVariantCreateInput; - firstValues?: number | null; - afterValues?: string | null; - lastValues?: number | null; - beforeValues?: string | null; -} diff --git a/src/products/types/VariantDelete.ts b/src/products/types/VariantDelete.ts deleted file mode 100644 index 457e03750..000000000 --- a/src/products/types/VariantDelete.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: VariantDelete -// ==================================================== - -export interface VariantDelete_productVariantDelete_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface VariantDelete_productVariantDelete_productVariant { - __typename: "ProductVariant"; - id: string; -} - -export interface VariantDelete_productVariantDelete { - __typename: "ProductVariantDelete"; - errors: VariantDelete_productVariantDelete_errors[]; - productVariant: VariantDelete_productVariantDelete_productVariant | null; -} - -export interface VariantDelete { - productVariantDelete: VariantDelete_productVariantDelete | null; -} - -export interface VariantDeleteVariables { - id: string; -} diff --git a/src/products/types/VariantMediaAssign.ts b/src/products/types/VariantMediaAssign.ts deleted file mode 100644 index 8868d87db..000000000 --- a/src/products/types/VariantMediaAssign.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode, ProductMediaType } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: VariantMediaAssign -// ==================================================== - -export interface VariantMediaAssign_variantMediaAssign_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface VariantMediaAssign_variantMediaAssign_productVariant_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface VariantMediaAssign_variantMediaAssign_productVariant_product_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface VariantMediaAssign_variantMediaAssign_productVariant_product_variants_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface VariantMediaAssign_variantMediaAssign_productVariant_product_variants { - __typename: "ProductVariant"; - id: string; - name: string; - sku: string | null; - media: VariantMediaAssign_variantMediaAssign_productVariant_product_variants_media[] | null; -} - -export interface VariantMediaAssign_variantMediaAssign_productVariant_product { - __typename: "Product"; - id: string; - media: VariantMediaAssign_variantMediaAssign_productVariant_product_media[] | null; - variants: (VariantMediaAssign_variantMediaAssign_productVariant_product_variants | null)[] | null; -} - -export interface VariantMediaAssign_variantMediaAssign_productVariant { - __typename: "ProductVariant"; - id: string; - media: VariantMediaAssign_variantMediaAssign_productVariant_media[] | null; - product: VariantMediaAssign_variantMediaAssign_productVariant_product; -} - -export interface VariantMediaAssign_variantMediaAssign { - __typename: "VariantMediaAssign"; - errors: VariantMediaAssign_variantMediaAssign_errors[]; - productVariant: VariantMediaAssign_variantMediaAssign_productVariant | null; -} - -export interface VariantMediaAssign { - variantMediaAssign: VariantMediaAssign_variantMediaAssign | null; -} - -export interface VariantMediaAssignVariables { - variantId: string; - mediaId: string; -} diff --git a/src/products/types/VariantMediaUnassign.ts b/src/products/types/VariantMediaUnassign.ts deleted file mode 100644 index 0be9c59a8..000000000 --- a/src/products/types/VariantMediaUnassign.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode, ProductMediaType } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: VariantMediaUnassign -// ==================================================== - -export interface VariantMediaUnassign_variantMediaUnassign_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface VariantMediaUnassign_variantMediaUnassign_productVariant_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface VariantMediaUnassign_variantMediaUnassign_productVariant_product_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface VariantMediaUnassign_variantMediaUnassign_productVariant_product_variants_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface VariantMediaUnassign_variantMediaUnassign_productVariant_product_variants { - __typename: "ProductVariant"; - id: string; - name: string; - sku: string | null; - media: VariantMediaUnassign_variantMediaUnassign_productVariant_product_variants_media[] | null; -} - -export interface VariantMediaUnassign_variantMediaUnassign_productVariant_product { - __typename: "Product"; - id: string; - media: VariantMediaUnassign_variantMediaUnassign_productVariant_product_media[] | null; - variants: (VariantMediaUnassign_variantMediaUnassign_productVariant_product_variants | null)[] | null; -} - -export interface VariantMediaUnassign_variantMediaUnassign_productVariant { - __typename: "ProductVariant"; - id: string; - media: VariantMediaUnassign_variantMediaUnassign_productVariant_media[] | null; - product: VariantMediaUnassign_variantMediaUnassign_productVariant_product; -} - -export interface VariantMediaUnassign_variantMediaUnassign { - __typename: "VariantMediaUnassign"; - errors: VariantMediaUnassign_variantMediaUnassign_errors[]; - productVariant: VariantMediaUnassign_variantMediaUnassign_productVariant | null; -} - -export interface VariantMediaUnassign { - variantMediaUnassign: VariantMediaUnassign_variantMediaUnassign | null; -} - -export interface VariantMediaUnassignVariables { - variantId: string; - mediaId: string; -} diff --git a/src/products/types/VariantUpdate.ts b/src/products/types/VariantUpdate.ts deleted file mode 100644 index 6966cd63a..000000000 --- a/src/products/types/VariantUpdate.ts +++ /dev/null @@ -1,761 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { StockInput, AttributeValueInput, PreorderSettingsInput, ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum, ProductMediaType, WeightUnitsEnum, StockErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: VariantUpdate -// ==================================================== - -export interface VariantUpdate_productVariantUpdate_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; - attributes: string[] | null; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: VariantUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: VariantUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_choices_edges_node; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: VariantUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_choices_pageInfo; - edges: VariantUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_choices_edges[]; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: VariantUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute_choices | null; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_selectionAttributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_selectionAttributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: VariantUpdate_productVariantUpdate_productVariant_selectionAttributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_selectionAttributes { - __typename: "SelectedAttribute"; - attribute: VariantUpdate_productVariantUpdate_productVariant_selectionAttributes_attribute; - values: (VariantUpdate_productVariantUpdate_productVariant_selectionAttributes_values | null)[]; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges_node; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_choices_pageInfo; - edges: VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges[]; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute_choices | null; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes { - __typename: "SelectedAttribute"; - attribute: VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_attribute; - values: (VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_values | null)[]; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_media { - __typename: "ProductMedia"; - id: string; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_product_defaultVariant { - __typename: "ProductVariant"; - id: string; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_product_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_product_thumbnail { - __typename: "Image"; - url: string; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_product_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_product_channelListings { - __typename: "ProductChannelListing"; - publicationDate: any | null; - isPublished: boolean; - channel: VariantUpdate_productVariantUpdate_productVariant_product_channelListings_channel; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_product_variants_media { - __typename: "ProductMedia"; - id: string; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_product_variants { - __typename: "ProductVariant"; - id: string; - name: string; - sku: string | null; - media: VariantUpdate_productVariantUpdate_productVariant_product_variants_media[] | null; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_product { - __typename: "Product"; - id: string; - defaultVariant: VariantUpdate_productVariantUpdate_productVariant_product_defaultVariant | null; - media: VariantUpdate_productVariantUpdate_productVariant_product_media[] | null; - name: string; - thumbnail: VariantUpdate_productVariantUpdate_productVariant_product_thumbnail | null; - channelListings: VariantUpdate_productVariantUpdate_productVariant_product_channelListings[] | null; - variants: (VariantUpdate_productVariantUpdate_productVariant_product_variants | null)[] | null; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_channelListings_costPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_channelListings_preorderThreshold { - __typename: "PreorderThreshold"; - quantity: number | null; - soldUnits: number; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_channelListings { - __typename: "ProductVariantChannelListing"; - channel: VariantUpdate_productVariantUpdate_productVariant_channelListings_channel; - price: VariantUpdate_productVariantUpdate_productVariant_channelListings_price | null; - costPrice: VariantUpdate_productVariantUpdate_productVariant_channelListings_costPrice | null; - preorderThreshold: VariantUpdate_productVariantUpdate_productVariant_channelListings_preorderThreshold | null; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: VariantUpdate_productVariantUpdate_productVariant_stocks_warehouse; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_preorder { - __typename: "PreorderData"; - globalThreshold: number | null; - globalSoldUnits: number; - endDate: any | null; -} - -export interface VariantUpdate_productVariantUpdate_productVariant_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface VariantUpdate_productVariantUpdate_productVariant { - __typename: "ProductVariant"; - id: string; - metadata: (VariantUpdate_productVariantUpdate_productVariant_metadata | null)[]; - privateMetadata: (VariantUpdate_productVariantUpdate_productVariant_privateMetadata | null)[]; - selectionAttributes: VariantUpdate_productVariantUpdate_productVariant_selectionAttributes[]; - nonSelectionAttributes: VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes[]; - media: VariantUpdate_productVariantUpdate_productVariant_media[] | null; - name: string; - product: VariantUpdate_productVariantUpdate_productVariant_product; - channelListings: VariantUpdate_productVariantUpdate_productVariant_channelListings[] | null; - sku: string | null; - stocks: (VariantUpdate_productVariantUpdate_productVariant_stocks | null)[] | null; - trackInventory: boolean; - preorder: VariantUpdate_productVariantUpdate_productVariant_preorder | null; - weight: VariantUpdate_productVariantUpdate_productVariant_weight | null; - quantityLimitPerCustomer: number | null; -} - -export interface VariantUpdate_productVariantUpdate { - __typename: "ProductVariantUpdate"; - errors: VariantUpdate_productVariantUpdate_errors[]; - productVariant: VariantUpdate_productVariantUpdate_productVariant | null; -} - -export interface VariantUpdate_productVariantStocksUpdate_errors { - __typename: "BulkStockError"; - code: ProductErrorCode; - field: string | null; - index: number | null; - message: string | null; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: VariantUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: VariantUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_choices_edges_node; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: VariantUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_choices_pageInfo; - edges: VariantUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_choices_edges[]; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: VariantUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute_choices | null; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: VariantUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_selectionAttributes { - __typename: "SelectedAttribute"; - attribute: VariantUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_attribute; - values: (VariantUpdate_productVariantStocksUpdate_productVariant_selectionAttributes_values | null)[]; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges_node; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_choices_pageInfo; - edges: VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_choices_edges[]; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - slug: string | null; - inputType: AttributeInputTypeEnum | null; - entityType: AttributeEntityTypeEnum | null; - valueRequired: boolean; - unit: MeasurementUnitsEnum | null; - choices: VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute_choices | null; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_values_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_values_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes { - __typename: "SelectedAttribute"; - attribute: VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_attribute; - values: (VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_values | null)[]; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_media { - __typename: "ProductMedia"; - id: string; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_defaultVariant { - __typename: "ProductVariant"; - id: string; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_media { - __typename: "ProductMedia"; - id: string; - alt: string; - sortOrder: number | null; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_thumbnail { - __typename: "Image"; - url: string; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings { - __typename: "ProductChannelListing"; - publicationDate: any | null; - isPublished: boolean; - channel: VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings_channel; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_variants_media { - __typename: "ProductMedia"; - id: string; - url: string; - type: ProductMediaType; - oembedData: any; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_variants { - __typename: "ProductVariant"; - id: string; - name: string; - sku: string | null; - media: VariantUpdate_productVariantStocksUpdate_productVariant_product_variants_media[] | null; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_product { - __typename: "Product"; - id: string; - defaultVariant: VariantUpdate_productVariantStocksUpdate_productVariant_product_defaultVariant | null; - media: VariantUpdate_productVariantStocksUpdate_productVariant_product_media[] | null; - name: string; - thumbnail: VariantUpdate_productVariantStocksUpdate_productVariant_product_thumbnail | null; - channelListings: VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings[] | null; - variants: (VariantUpdate_productVariantStocksUpdate_productVariant_product_variants | null)[] | null; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_channelListings_costPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_channelListings_preorderThreshold { - __typename: "PreorderThreshold"; - quantity: number | null; - soldUnits: number; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_channelListings { - __typename: "ProductVariantChannelListing"; - channel: VariantUpdate_productVariantStocksUpdate_productVariant_channelListings_channel; - price: VariantUpdate_productVariantStocksUpdate_productVariant_channelListings_price | null; - costPrice: VariantUpdate_productVariantStocksUpdate_productVariant_channelListings_costPrice | null; - preorderThreshold: VariantUpdate_productVariantStocksUpdate_productVariant_channelListings_preorderThreshold | null; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: VariantUpdate_productVariantStocksUpdate_productVariant_stocks_warehouse; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_preorder { - __typename: "PreorderData"; - globalThreshold: number | null; - globalSoldUnits: number; - endDate: any | null; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant_weight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface VariantUpdate_productVariantStocksUpdate_productVariant { - __typename: "ProductVariant"; - id: string; - metadata: (VariantUpdate_productVariantStocksUpdate_productVariant_metadata | null)[]; - privateMetadata: (VariantUpdate_productVariantStocksUpdate_productVariant_privateMetadata | null)[]; - selectionAttributes: VariantUpdate_productVariantStocksUpdate_productVariant_selectionAttributes[]; - nonSelectionAttributes: VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes[]; - media: VariantUpdate_productVariantStocksUpdate_productVariant_media[] | null; - name: string; - product: VariantUpdate_productVariantStocksUpdate_productVariant_product; - channelListings: VariantUpdate_productVariantStocksUpdate_productVariant_channelListings[] | null; - sku: string | null; - stocks: (VariantUpdate_productVariantStocksUpdate_productVariant_stocks | null)[] | null; - trackInventory: boolean; - preorder: VariantUpdate_productVariantStocksUpdate_productVariant_preorder | null; - weight: VariantUpdate_productVariantStocksUpdate_productVariant_weight | null; - quantityLimitPerCustomer: number | null; -} - -export interface VariantUpdate_productVariantStocksUpdate { - __typename: "ProductVariantStocksUpdate"; - errors: VariantUpdate_productVariantStocksUpdate_errors[]; - productVariant: VariantUpdate_productVariantStocksUpdate_productVariant | null; -} - -export interface VariantUpdate_productVariantStocksCreate_errors { - __typename: "BulkStockError"; - code: ProductErrorCode; - field: string | null; - index: number | null; - message: string | null; -} - -export interface VariantUpdate_productVariantStocksCreate_productVariant_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface VariantUpdate_productVariantStocksCreate_productVariant_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: VariantUpdate_productVariantStocksCreate_productVariant_stocks_warehouse; -} - -export interface VariantUpdate_productVariantStocksCreate_productVariant { - __typename: "ProductVariant"; - id: string; - stocks: (VariantUpdate_productVariantStocksCreate_productVariant_stocks | null)[] | null; -} - -export interface VariantUpdate_productVariantStocksCreate { - __typename: "ProductVariantStocksCreate"; - errors: VariantUpdate_productVariantStocksCreate_errors[]; - productVariant: VariantUpdate_productVariantStocksCreate_productVariant | null; -} - -export interface VariantUpdate_productVariantStocksDelete_errors { - __typename: "StockError"; - code: StockErrorCode; - field: string | null; - message: string | null; -} - -export interface VariantUpdate_productVariantStocksDelete_productVariant_stocks_warehouse { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface VariantUpdate_productVariantStocksDelete_productVariant_stocks { - __typename: "Stock"; - id: string; - quantity: number; - quantityAllocated: number; - warehouse: VariantUpdate_productVariantStocksDelete_productVariant_stocks_warehouse; -} - -export interface VariantUpdate_productVariantStocksDelete_productVariant { - __typename: "ProductVariant"; - id: string; - stocks: (VariantUpdate_productVariantStocksDelete_productVariant_stocks | null)[] | null; -} - -export interface VariantUpdate_productVariantStocksDelete { - __typename: "ProductVariantStocksDelete"; - errors: VariantUpdate_productVariantStocksDelete_errors[]; - productVariant: VariantUpdate_productVariantStocksDelete_productVariant | null; -} - -export interface VariantUpdate { - productVariantUpdate: VariantUpdate_productVariantUpdate | null; - productVariantStocksUpdate: VariantUpdate_productVariantStocksUpdate | null; - productVariantStocksCreate: VariantUpdate_productVariantStocksCreate | null; - productVariantStocksDelete: VariantUpdate_productVariantStocksDelete | null; -} - -export interface VariantUpdateVariables { - addStocks: StockInput[]; - removeStocks: string[]; - id: string; - attributes?: AttributeValueInput[] | null; - sku?: string | null; - quantityLimitPerCustomer?: number | null; - trackInventory: boolean; - stocks: StockInput[]; - preorder?: PreorderSettingsInput | null; - weight?: any | null; - firstValues?: number | null; - afterValues?: string | null; - lastValues?: number | null; - beforeValues?: string | null; -} diff --git a/src/products/types/productBulkDelete.ts b/src/products/types/productBulkDelete.ts deleted file mode 100644 index 8fc90185e..000000000 --- a/src/products/types/productBulkDelete.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: productBulkDelete -// ==================================================== - -export interface productBulkDelete_productBulkDelete_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface productBulkDelete_productBulkDelete { - __typename: "ProductBulkDelete"; - errors: productBulkDelete_productBulkDelete_errors[]; -} - -export interface productBulkDelete { - productBulkDelete: productBulkDelete_productBulkDelete | null; -} - -export interface productBulkDeleteVariables { - ids: string[]; -} diff --git a/src/products/utils/data.ts b/src/products/utils/data.ts index 8d2831d9c..852d04972 100644 --- a/src/products/utils/data.ts +++ b/src/products/utils/data.ts @@ -10,23 +10,22 @@ import { } from "@saleor/components/Attributes"; import { MetadataFormData } from "@saleor/components/Metadata/types"; import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; -import { ProductVariant } from "@saleor/fragments/types/ProductVariant"; -import { SelectedVariantAttributeFragment } from "@saleor/fragments/types/SelectedVariantAttributeFragment"; -import { VariantAttributeFragment } from "@saleor/fragments/types/VariantAttributeFragment"; +import { + ProductDetailsVariantFragment, + ProductFragment, + ProductTypeQuery, + ProductVariantCreateDataQuery, + ProductVariantFragment, + SelectedVariantAttributeFragment, + StockInput, + VariantAttributeFragment +} from "@saleor/graphql"; import { FormsetAtomicData } from "@saleor/hooks/useFormset"; import { maybe } from "@saleor/misc"; -import { - ProductDetails_product, - ProductDetails_product_collections, - ProductDetails_product_variants -} from "@saleor/products/types/ProductDetails"; -import { StockInput } from "@saleor/types/globalTypes"; import { mapEdgesToItems, mapMetadataItemToInput } from "@saleor/utils/maps"; import moment from "moment"; import { ProductStockInput } from "../components/ProductStocks"; -import { ProductType_productType_productAttributes } from "../types/ProductType"; -import { ProductVariantCreateData_product } from "../types/ProductVariantCreateData"; import { ChannelsWithVariantsData } from "../views/ProductUpdate/types"; export interface Collection { @@ -43,11 +42,11 @@ export interface ProductType { hasVariants: boolean; id: string; name: string; - productAttributes: ProductType_productType_productAttributes[]; + productAttributes: ProductTypeQuery["productType"]["productAttributes"]; } export function getAttributeInputFromProduct( - product: ProductDetails_product + product: ProductFragment ): AttributeInput[] { return ( product?.attributes?.map(attribute => ({ @@ -123,7 +122,7 @@ export function getAttributeInputFromSelectedAttributes( } export function getAttributeInputFromVariant( - variant: ProductVariant + variant: ProductVariantFragment ): AttributeInput[] { const selectionAttributeInput = getAttributeInputFromSelectedAttributes( variant?.selectionAttributes, @@ -140,7 +139,7 @@ export function getAttributeInputFromVariant( } export function getVariantAttributeInputFromProduct( - product: ProductVariantCreateData_product + product: ProductVariantCreateDataQuery["product"] ): AttributeInput[] { const selectionAttributeInput = getAttributeInputFromAttributes( product?.productType?.selectionVariantAttributes, @@ -158,7 +157,7 @@ export function getVariantAttributeInputFromProduct( } export function getStockInputFromVariant( - variant: ProductVariant + variant: ProductVariantFragment ): ProductStockInput[] { return ( variant?.stocks.map(stock => ({ @@ -173,7 +172,7 @@ export function getStockInputFromVariant( } export function getStockInputFromProduct( - product: ProductDetails_product + product: ProductFragment ): ProductStockInput[] { return product?.variants[0]?.stocks.map(stock => ({ data: { @@ -186,7 +185,7 @@ export function getStockInputFromProduct( } export function getCollectionInput( - productCollections: ProductDetails_product_collections[] + productCollections: ProductFragment["collections"] ): Collection[] { return maybe( () => @@ -235,8 +234,8 @@ export interface ProductUpdatePageFormData extends MetadataFormData { } export function getProductUpdatePageFormData( - product: ProductDetails_product, - variants: ProductDetails_product_variants[], + product: ProductFragment, + variants: ProductDetailsVariantFragment[], currentChannels: ChannelData[], channelsData: ChannelData[], channelsWithVariants: ChannelsWithVariantsData diff --git a/src/products/views/ProductCreate/ProductCreate.tsx b/src/products/views/ProductCreate/ProductCreate.tsx index 9e04bcacc..149b9ab97 100644 --- a/src/products/views/ProductCreate/ProductCreate.tsx +++ b/src/products/views/ProductCreate/ProductCreate.tsx @@ -7,7 +7,19 @@ import { DEFAULT_INITIAL_SEARCH_DATA, VALUES_PAGINATE_BY } from "@saleor/config"; -import { useFileUploadMutation } from "@saleor/files/mutations"; +import { + useFileUploadMutation, + useProductChannelListingUpdateMutation, + useProductCreateMutation, + useProductDeleteMutation, + useProductTypeQuery, + useProductVariantChannelListingUpdateMutation, + useTaxTypeListQuery, + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation, + useVariantCreateMutation, + useWarehouseListQuery +} from "@saleor/graphql"; import useChannels from "@saleor/hooks/useChannels"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; @@ -15,14 +27,6 @@ import useShop from "@saleor/hooks/useShop"; import ProductCreatePage, { ProductCreateData } from "@saleor/products/components/ProductCreatePage"; -import { - useProductChannelListingUpdate, - useProductDeleteMutation, - useProductVariantChannelListingUpdate, - useVariantCreateMutation -} from "@saleor/products/mutations"; -import { useProductCreateMutation } from "@saleor/products/mutations"; -import { useProductTypeQuery } from "@saleor/products/queries"; import { productAddUrl, ProductCreateUrlDialog, @@ -35,17 +39,11 @@ import useCollectionSearch from "@saleor/searches/useCollectionSearch"; import usePageSearch from "@saleor/searches/usePageSearch"; import useProductSearch from "@saleor/searches/useProductSearch"; import useProductTypeSearch from "@saleor/searches/useProductTypeSearch"; -import { useTaxTypeList } from "@saleor/taxes/queries"; import { getProductErrorMessage } from "@saleor/utils/errors"; import useAttributeValueSearchHandler from "@saleor/utils/handlers/attributeValueSearchHandler"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createMetadataCreateHandler from "@saleor/utils/handlers/metadataCreateHandler"; import { mapEdgesToItems } from "@saleor/utils/maps"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; -import { useWarehouseList } from "@saleor/warehouses/queries"; import { warehouseAddPath } from "@saleor/warehouses/urls"; import React from "react"; import { useIntl } from "react-intl"; @@ -115,15 +113,15 @@ export const ProductCreateView: React.FC = ({ params }) => { result: searchAttributeValuesOpts, reset: searchAttributeReset } = useAttributeValueSearchHandler(DEFAULT_INITIAL_SEARCH_DATA); - const warehouses = useWarehouseList({ + const warehouses = useWarehouseListQuery({ displayLoader: true, variables: { first: 50 } }); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); - const taxTypes = useTaxTypeList({}); + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); + const taxTypes = useTaxTypeListQuery({}); const { data: selectedProductType } = useProductTypeQuery({ variables: { id: selectedProductTypeId, @@ -175,13 +173,14 @@ export const ProductCreateView: React.FC = ({ params }) => { const [uploadFile, uploadFileOpts] = useFileUploadMutation({}); - const [updateChannels, updateChannelsOpts] = useProductChannelListingUpdate( - {} - ); + const [ + updateChannels, + updateChannelsOpts + ] = useProductChannelListingUpdateMutation({}); const [ updateVariantChannels, updateVariantChannelsOpts - ] = useProductVariantChannelListingUpdate({}); + ] = useProductVariantChannelListingUpdateMutation({}); const handleBack = () => navigate(productListUrl()); diff --git a/src/products/views/ProductCreate/handlers.ts b/src/products/views/ProductCreate/handlers.ts index 1a0f96ca3..29533ea32 100644 --- a/src/products/views/ProductCreate/handlers.ts +++ b/src/products/views/ProductCreate/handlers.ts @@ -9,34 +9,24 @@ import { } from "@saleor/attributes/utils/handlers"; import { ChannelData } from "@saleor/channels/utils"; import { - FileUpload, - FileUploadVariables -} from "@saleor/files/types/FileUpload"; -import { AttributeErrorFragment } from "@saleor/fragments/types/AttributeErrorFragment"; -import { UploadErrorFragment } from "@saleor/fragments/types/UploadErrorFragment"; + AttributeErrorFragment, + FileUploadMutation, + FileUploadMutationVariables, + ProductChannelListingUpdateMutation, + ProductChannelListingUpdateMutationVariables, + ProductCreateMutation, + ProductCreateMutationVariables, + ProductDeleteMutation, + ProductDeleteMutationVariables, + ProductTypeQuery, + ProductVariantChannelListingUpdateMutation, + ProductVariantChannelListingUpdateMutationVariables, + UploadErrorFragment, + VariantCreateMutation, + VariantCreateMutationVariables +} from "@saleor/graphql"; import { weight } from "@saleor/misc"; import { ProductCreateData } from "@saleor/products/components/ProductCreatePage/form"; -import { - ProductChannelListingUpdate, - ProductChannelListingUpdateVariables -} from "@saleor/products/types/ProductChannelListingUpdate"; -import { - ProductCreate, - ProductCreateVariables -} from "@saleor/products/types/ProductCreate"; -import { - ProductDelete, - ProductDeleteVariables -} from "@saleor/products/types/ProductDelete"; -import { ProductType_productType } from "@saleor/products/types/ProductType"; -import { - ProductVariantChannelListingUpdate, - ProductVariantChannelListingUpdateVariables -} from "@saleor/products/types/ProductVariantChannelListingUpdate"; -import { - VariantCreate, - VariantCreateVariables -} from "@saleor/products/types/VariantCreate"; import { getAvailabilityVariables } from "@saleor/products/utils/handlers"; import { getParsedDataForJsonStringField } from "@saleor/utils/richText/misc"; @@ -74,25 +64,25 @@ const getSimpleProductVariables = ( }); export function createHandler( - productType: ProductType_productType, + productType: ProductTypeQuery["productType"], uploadFile: ( - variables: FileUploadVariables - ) => Promise>, + variables: FileUploadMutationVariables + ) => Promise>, productCreate: ( - variables: ProductCreateVariables - ) => Promise>, + variables: ProductCreateMutationVariables + ) => Promise>, productVariantCreate: ( - variables: VariantCreateVariables - ) => Promise>, + variables: VariantCreateMutationVariables + ) => Promise>, updateChannels: (options: { - variables: ProductChannelListingUpdateVariables; - }) => Promise>, + variables: ProductChannelListingUpdateMutationVariables; + }) => Promise>, updateVariantChannels: (options: { - variables: ProductVariantChannelListingUpdateVariables; - }) => Promise>, + variables: ProductVariantChannelListingUpdateMutationVariables; + }) => Promise>, productDelete: (options: { - variables: ProductDeleteVariables; - }) => Promise> + variables: ProductDeleteMutationVariables; + }) => Promise> ) { return async (formData: ProductCreateData) => { let errors: Array = []; @@ -108,7 +98,7 @@ export function createHandler( uploadFilesResult ); - const productVariables: ProductCreateVariables = { + const productVariables: ProductCreateMutationVariables = { input: { attributes: prepareAttributesInput({ attributes: formData.attributes, diff --git a/src/products/views/ProductImage.tsx b/src/products/views/ProductImage.tsx index 2edb42a78..df7e1e980 100644 --- a/src/products/views/ProductImage.tsx +++ b/src/products/views/ProductImage.tsx @@ -1,6 +1,11 @@ import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import NotFoundPage from "@saleor/components/NotFoundPage"; +import { + useProductMediaByIdQuery, + useProductMediaDeleteMutation, + useProductMediaUpdateMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages } from "@saleor/intl"; @@ -8,11 +13,6 @@ import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import ProductMediaPage from "../components/ProductMediaPage"; -import { - useProductMediaDeleteMutation, - useProductMediaUpdateMutation -} from "../mutations"; -import { useProductMediaQuery } from "../queries"; import { productImageUrl, ProductImageUrlQueryParams, @@ -37,7 +37,7 @@ export const ProductImage: React.FC = ({ const handleBack = () => navigate(productUrl(productId)); - const { data, loading } = useProductMediaQuery({ + const { data, loading } = useProductMediaByIdQuery({ displayLoader: true, variables: { mediaId, diff --git a/src/products/views/ProductList/ProductList.tsx b/src/products/views/ProductList/ProductList.tsx index f722e776a..1a41b4b87 100644 --- a/src/products/views/ProductList/ProductList.tsx +++ b/src/products/views/ProductList/ProductList.tsx @@ -5,7 +5,7 @@ import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { SaveFilterTabDialogFormData } from "@saleor/components/SaveFilterTabDialog"; -import { useShopLimitsQuery } from "@saleor/components/Shop/query"; +import { useShopLimitsQuery } from "@saleor/components/Shop/queries"; import { DEFAULT_INITIAL_PAGINATION_DATA, DEFAULT_INITIAL_SEARCH_DATA, @@ -13,6 +13,20 @@ import { ProductListColumns } from "@saleor/config"; import { Task } from "@saleor/containers/BackgroundTasks/types"; +import { + ProductListQueryVariables, + useAvailableInGridAttributesQuery, + useGridAttributesQuery, + useInitialProductFilterAttributesQuery, + useInitialProductFilterCategoriesQuery, + useInitialProductFilterCollectionsQuery, + useInitialProductFilterProductTypesQuery, + useProductBulkDeleteMutation, + useProductCountQuery, + useProductExportMutation, + useProductListQuery, + useWarehouseListQuery +} from "@saleor/graphql"; import useBackgroundTask from "@saleor/hooks/useBackgroundTask"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useListSettings from "@saleor/hooks/useListSettings"; @@ -30,17 +44,6 @@ import { getAttributeIdFromColumnValue, isAttributeColumnValue } from "@saleor/products/components/ProductListPage/utils"; -import { - useAvailableInGridAttributesQuery, - useGridAttributesQuery, - useInitialProductFilterAttributesQuery, - useInitialProductFilterCategoriesQuery, - useInitialProductFilterCollectionsQuery, - useInitialProductFilterProductTypesQuery, - useProductCountQuery, - useProductListQuery -} from "@saleor/products/queries"; -import { ProductListVariables } from "@saleor/products/types/ProductList"; import { productAddUrl, productListUrl, @@ -59,15 +62,10 @@ import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandl import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; import { mapEdgesToItems, mapNodeToChoice } from "@saleor/utils/maps"; import { getSortUrlVariables } from "@saleor/utils/sort"; -import { useWarehouseList } from "@saleor/warehouses/queries"; import React, { useEffect, useState } from "react"; import { FormattedMessage, useIntl } from "react-intl"; import ProductListPage from "../../components/ProductListPage"; -import { - useProductBulkDeleteMutation, - useProductExport -} from "../../mutations"; import { deleteFilterTab, getActiveFilters, @@ -160,7 +158,7 @@ export const ProductList: React.FC = ({ params }) => { }, skip: !focusedAttribute }); - const warehouses = useWarehouseList({ + const warehouses = useWarehouseListQuery({ variables: { first: 100 }, @@ -191,7 +189,7 @@ export const ProductList: React.FC = ({ params }) => { skip: params.action !== "export" }); - const [exportProducts, exportProductsOpts] = useProductExport({ + const [exportProducts, exportProductsOpts] = useProductExportMutation({ onCompleted: data => { if (data.exportProducts.errors.length === 0) { notify({ @@ -290,7 +288,7 @@ export const ProductList: React.FC = ({ params }) => { const filter = getFilterVariables(params, !!selectedChannel); const sort = getSortQueryVariables(params, !!selectedChannel); const queryVariables = React.useMemo< - Omit + Omit >( () => ({ ...paginationState, diff --git a/src/products/views/ProductList/filters.test.ts b/src/products/views/ProductList/filters.test.ts index 4002e525f..76ddaaba5 100644 --- a/src/products/views/ProductList/filters.test.ts +++ b/src/products/views/ProductList/filters.test.ts @@ -1,6 +1,6 @@ +import { StockAvailability } from "@saleor/graphql"; import { createFilterStructure } from "@saleor/products/components/ProductListPage"; import { ProductListUrlFilters } from "@saleor/products/urls"; -import { StockAvailability } from "@saleor/types/globalTypes"; import { getFilterQueryParams } from "@saleor/utils/filters"; import { stringifyQs } from "@saleor/utils/urls"; import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; diff --git a/src/products/views/ProductList/filters.ts b/src/products/views/ProductList/filters.ts index f83a2454e..e42cee3f0 100644 --- a/src/products/views/ProductList/filters.ts +++ b/src/products/views/ProductList/filters.ts @@ -1,30 +1,27 @@ import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; +import { + InitialProductFilterAttributesQuery, + InitialProductFilterCategoriesQuery, + InitialProductFilterCollectionsQuery, + InitialProductFilterProductTypesQuery, + ProductFilterInput, + SearchAttributeValuesQuery, + SearchAttributeValuesQueryVariables, + SearchCategoriesQuery, + SearchCategoriesQueryVariables, + SearchCollectionsQuery, + SearchCollectionsQueryVariables, + SearchProductTypesQuery, + SearchProductTypesQueryVariables, + StockAvailability +} from "@saleor/graphql"; import { UseSearchResult } from "@saleor/hooks/makeSearch"; import { findValueInEnum, maybe } from "@saleor/misc"; import { ProductFilterKeys, ProductListFilterOpts } from "@saleor/products/components/ProductListPage"; -import { InitialProductFilterAttributes_attributes_edges_node } from "@saleor/products/types/InitialProductFilterAttributes"; -import { InitialProductFilterCategories_categories_edges_node } from "@saleor/products/types/InitialProductFilterCategories"; -import { InitialProductFilterCollections_collections_edges_node } from "@saleor/products/types/InitialProductFilterCollections"; -import { InitialProductFilterProductTypes_productTypes_edges_node } from "@saleor/products/types/InitialProductFilterProductTypes"; -import { - SearchAttributeValues, - SearchAttributeValuesVariables -} from "@saleor/searches/types/SearchAttributeValues"; -import { - SearchCategories, - SearchCategoriesVariables -} from "@saleor/searches/types/SearchCategories"; -import { - SearchCollections, - SearchCollectionsVariables -} from "@saleor/searches/types/SearchCollections"; -import { - SearchProductTypes, - SearchProductTypesVariables -} from "@saleor/searches/types/SearchProductTypes"; +import { RelayToFlat } from "@saleor/types"; import { mapEdgesToItems, mapNodeToChoice, @@ -34,10 +31,6 @@ import isArray from "lodash/isArray"; import moment from "moment-timezone"; import { IFilterElement } from "../../../components/Filter"; -import { - ProductFilterInput, - StockAvailability -} from "../../../types/globalTypes"; import { createFilterTabUtils, createFilterUtils, @@ -61,22 +54,31 @@ export const PRODUCT_FILTERS_KEY = "productFilters"; export function getFilterOpts( params: ProductListUrlFilters, - attributes: InitialProductFilterAttributes_attributes_edges_node[], + attributes: RelayToFlat, focusedAttributeChoices: UseSearchResult< - SearchAttributeValues, - SearchAttributeValuesVariables + SearchAttributeValuesQuery, + SearchAttributeValuesQueryVariables >, categories: { - initial: InitialProductFilterCategories_categories_edges_node[]; - search: UseSearchResult; + initial: RelayToFlat; + search: UseSearchResult< + SearchCategoriesQuery, + SearchCategoriesQueryVariables + >; }, collections: { - initial: InitialProductFilterCollections_collections_edges_node[]; - search: UseSearchResult; + initial: RelayToFlat; + search: UseSearchResult< + SearchCollectionsQuery, + SearchCollectionsQueryVariables + >; }, productTypes: { - initial: InitialProductFilterProductTypes_productTypes_edges_node[]; - search: UseSearchResult; + initial: RelayToFlat; + search: UseSearchResult< + SearchProductTypesQuery, + SearchProductTypesQueryVariables + >; }, productKind: SingleAutocompleteChoiceType[], channels: SingleAutocompleteChoiceType[] diff --git a/src/products/views/ProductList/fixtures.ts b/src/products/views/ProductList/fixtures.ts index c2fb7cb45..43c0b938d 100644 --- a/src/products/views/ProductList/fixtures.ts +++ b/src/products/views/ProductList/fixtures.ts @@ -2,9 +2,9 @@ import { attributes } from "@saleor/attributes/fixtures"; import { categories } from "@saleor/categories/fixtures"; import { collections } from "@saleor/collections/fixtures"; import { fetchMoreProps, searchPageProps } from "@saleor/fixtures"; +import { StockAvailability } from "@saleor/graphql"; import { ProductListFilterOpts } from "@saleor/products/components/ProductListPage"; import { productTypes } from "@saleor/productTypes/fixtures"; -import { StockAvailability } from "@saleor/types/globalTypes"; import { mapEdgesToItems, mapSlugNodeToChoice } from "@saleor/utils/maps"; export const productListFilterOpts: ProductListFilterOpts = { diff --git a/src/products/views/ProductList/sort.ts b/src/products/views/ProductList/sort.ts index cb1704a40..bb5562eda 100644 --- a/src/products/views/ProductList/sort.ts +++ b/src/products/views/ProductList/sort.ts @@ -1,8 +1,8 @@ +import { ProductOrder, ProductOrderField } from "@saleor/graphql"; import { ProductListUrlQueryParams, ProductListUrlSortField } from "@saleor/products/urls"; -import { ProductOrder, ProductOrderField } from "@saleor/types/globalTypes"; import { getOrderDirection } from "@saleor/utils/sort"; export const DEFAULT_SORT_KEY = ProductListUrlSortField.name; diff --git a/src/products/views/ProductList/utils.ts b/src/products/views/ProductList/utils.ts index 4b11e4ee9..52e8f8987 100644 --- a/src/products/views/ProductList/utils.ts +++ b/src/products/views/ProductList/utils.ts @@ -1,5 +1,5 @@ +import { ProductTypeKindEnum } from "@saleor/graphql"; import { isInEnum } from "@saleor/misc"; -import { ProductTypeKindEnum } from "@saleor/types/globalTypes"; import { IntlShape } from "react-intl"; import { productKindMessages as messages } from "./messages"; diff --git a/src/products/views/ProductUpdate/ProductUpdate.tsx b/src/products/views/ProductUpdate/ProductUpdate.tsx index b22185dc4..06388481b 100644 --- a/src/products/views/ProductUpdate/ProductUpdate.tsx +++ b/src/products/views/ProductUpdate/ProductUpdate.tsx @@ -1,6 +1,5 @@ import placeholderImg from "@assets/images/placeholder255x255.png"; import { DialogContentText } from "@material-ui/core"; -import { useAttributeValueDeleteMutation } from "@saleor/attributes/mutations"; import ChannelsWithVariantsAvailabilityDialog from "@saleor/channels/components/ChannelsWithVariantsAvailabilityDialog"; import { ChannelData, @@ -12,13 +11,34 @@ import useAppChannel from "@saleor/components/AppLayout/AppChannelContext"; import { AttributeInput } from "@saleor/components/Attributes"; import ChannelsAvailabilityDialog from "@saleor/components/ChannelsAvailabilityDialog"; import NotFoundPage from "@saleor/components/NotFoundPage"; -import { useShopLimitsQuery } from "@saleor/components/Shop/query"; +import { useShopLimitsQuery } from "@saleor/components/Shop/queries"; import { WindowTitle } from "@saleor/components/WindowTitle"; import { DEFAULT_INITIAL_SEARCH_DATA, VALUES_PAGINATE_BY } from "@saleor/config"; -import { useFileUploadMutation } from "@saleor/files/mutations"; +import { + ProductMediaCreateMutationVariables, + ProductUpdateMutation, + useAttributeValueDeleteMutation, + useFileUploadMutation, + useProductChannelListingUpdateMutation, + useProductDeleteMutation, + useProductDetailsQuery, + useProductMediaCreateMutation, + useProductMediaDeleteMutation, + useProductMediaReorderMutation, + useProductUpdateMutation, + useProductVariantBulkDeleteMutation, + useProductVariantChannelListingUpdateMutation, + useProductVariantPreorderDeactivateMutation, + useProductVariantReorderMutation, + useSimpleProductUpdateMutation, + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation, + useVariantCreateMutation, + useWarehouseListQuery +} from "@saleor/graphql"; import { getSearchFetchMoreProps } from "@saleor/hooks/makeTopLevelSearch/utils"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useChannels from "@saleor/hooks/useChannels"; @@ -31,20 +51,6 @@ import { commonMessages, errorMessages } from "@saleor/intl"; import { DeleteIcon, IconButton } from "@saleor/macaw-ui"; import ProductVariantCreateDialog from "@saleor/products/components/ProductVariantCreateDialog"; import ProductVariantEndPreorderDialog from "@saleor/products/components/ProductVariantEndPreorderDialog"; -import { - useProductChannelListingUpdate, - useProductDeleteMutation, - useProductMediaCreateMutation, - useProductMediaDeleteMutation, - useProductMediaReorder, - useProductUpdateMutation, - useProductVariantBulkDeleteMutation, - useProductVariantChannelListingUpdate, - useProductVariantPreorderDeactivateMutation, - useProductVariantReorderMutation, - useSimpleProductUpdateMutation, - useVariantCreateMutation -} from "@saleor/products/mutations"; import useCategorySearch from "@saleor/searches/useCategorySearch"; import useCollectionSearch from "@saleor/searches/useCollectionSearch"; import usePageSearch from "@saleor/searches/usePageSearch"; @@ -54,20 +60,12 @@ import useAttributeValueSearchHandler from "@saleor/utils/handlers/attributeValu import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createMetadataUpdateHandler from "@saleor/utils/handlers/metadataUpdateHandler"; import { mapEdgesToItems } from "@saleor/utils/maps"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; -import { useWarehouseList } from "@saleor/warehouses/queries"; import { warehouseAddPath } from "@saleor/warehouses/urls"; import React from "react"; import { defineMessages, FormattedMessage, useIntl } from "react-intl"; import { getMutationState } from "../../../misc"; import ProductUpdatePage from "../../components/ProductUpdatePage"; -import { useProductDetails } from "../../queries"; -import { ProductMediaCreateVariables } from "../../types/ProductMediaCreate"; -import { ProductUpdate as ProductUpdateMutationResult } from "../../types/ProductUpdate"; import { productImageUrl, productListUrl, @@ -78,8 +76,10 @@ import { productVariantCreatorUrl, productVariantEditUrl } from "../../urls"; -import { CHANNELS_AVAILIABILITY_MODAL_SELECTOR } from "./consts"; -import { PRODUCT_UPDATE_FORM_ID } from "./consts"; +import { + CHANNELS_AVAILIABILITY_MODAL_SELECTOR, + PRODUCT_UPDATE_FORM_ID +} from "./consts"; import { createImageReorderHandler, createImageUploadHandler, @@ -154,21 +154,21 @@ export const ProductUpdate: React.FC = ({ id, params }) => { result: searchAttributeValuesOpts, reset: searchAttributeReset } = useAttributeValueSearchHandler(DEFAULT_INITIAL_SEARCH_DATA); - const warehouses = useWarehouseList({ + const warehouses = useWarehouseListQuery({ displayLoader: true, variables: { first: 50 } }); const shop = useShop(); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); const [ productVariantCreate, productVariantCreateOpts ] = useVariantCreateMutation({}); - const { data, loading, refetch } = useProductDetails({ + const { data, loading, refetch } = useProductDetailsQuery({ displayLoader: true, variables: { id, @@ -188,7 +188,7 @@ export const ProductUpdate: React.FC = ({ id, params }) => { const [uploadFile, uploadFileOpts] = useFileUploadMutation({}); - const handleUpdate = (data: ProductUpdateMutationResult) => { + const handleUpdate = (data: ProductUpdateMutation) => { if (data.productUpdate.errors.length === 0) { notify({ status: "success", @@ -209,7 +209,7 @@ export const ProductUpdate: React.FC = ({ id, params }) => { const [ reorderProductImages, reorderProductImagesOpts - ] = useProductMediaReorder({}); + ] = useProductMediaReorderMutation({}); const [deleteProduct, deleteProductOpts] = useProductDeleteMutation({ onCompleted: () => { @@ -229,7 +229,8 @@ export const ProductUpdate: React.FC = ({ id, params }) => { ] = useProductMediaCreateMutation({ onCompleted: data => { const imageError = data.productMediaCreate.errors.find( - error => error.field === ("image" as keyof ProductMediaCreateVariables) + error => + error.field === ("image" as keyof ProductMediaCreateMutationVariables) ); if (imageError) { notify({ @@ -315,7 +316,10 @@ export const ProductUpdate: React.FC = ({ id, params }) => { { formId: PRODUCT_UPDATE_FORM_ID } ); - const [updateChannels, updateChannelsOpts] = useProductChannelListingUpdate({ + const [ + updateChannels, + updateChannelsOpts + ] = useProductChannelListingUpdateMutation({ onCompleted: data => { if (!!data.productChannelListingUpdate.errors.length) { data.productChannelListingUpdate.errors.forEach(error => @@ -331,7 +335,7 @@ export const ProductUpdate: React.FC = ({ id, params }) => { const [ updateVariantChannels, updateVariantChannelsOpts - ] = useProductVariantChannelListingUpdate({}); + ] = useProductVariantChannelListingUpdateMutation({}); const [ createProductMedia, diff --git a/src/products/views/ProductUpdate/handlers/index.ts b/src/products/views/ProductUpdate/handlers/index.ts index 08acaa099..3e5be7b47 100644 --- a/src/products/views/ProductUpdate/handlers/index.ts +++ b/src/products/views/ProductUpdate/handlers/index.ts @@ -1,8 +1,4 @@ import { FetchResult } from "@apollo/client"; -import { - AttributeValueDelete, - AttributeValueDeleteVariables -} from "@saleor/attributes/types/AttributeValueDelete"; import { getAttributesAfterFileAttributesUpdate, mergeAttributeValueDeleteErrors, @@ -16,45 +12,33 @@ import { import { ChannelData } from "@saleor/channels/utils"; import { VALUES_PAGINATE_BY } from "@saleor/config"; import { - FileUpload, - FileUploadVariables -} from "@saleor/files/types/FileUpload"; -import { AttributeErrorFragment } from "@saleor/fragments/types/AttributeErrorFragment"; -import { BulkStockErrorFragment } from "@saleor/fragments/types/BulkStockErrorFragment"; -import { ProductChannelListingErrorFragment } from "@saleor/fragments/types/ProductChannelListingErrorFragment"; -import { ProductErrorFragment } from "@saleor/fragments/types/ProductErrorFragment"; -import { StockErrorFragment } from "@saleor/fragments/types/StockErrorFragment"; -import { UploadErrorFragment } from "@saleor/fragments/types/UploadErrorFragment"; + AttributeErrorFragment, + AttributeValueDeleteMutation, + AttributeValueDeleteMutationVariables, + BulkStockErrorFragment, + FileUploadMutation, + FileUploadMutationVariables, + Node, + ProductChannelListingErrorFragment, + ProductChannelListingUpdateMutation, + ProductChannelListingUpdateMutationVariables, + ProductErrorFragment, + ProductFragment, + ProductMediaCreateMutationVariables, + ProductMediaReorderMutationVariables, + ProductUpdateMutation, + ProductUpdateMutationVariables, + ProductVariantChannelListingUpdateMutation, + ProductVariantChannelListingUpdateMutationVariables, + ProductVariantReorderMutationVariables, + SimpleProductUpdateMutation, + SimpleProductUpdateMutationVariables, + StockErrorFragment, + UploadErrorFragment, + VariantCreateMutation, + VariantCreateMutationVariables +} from "@saleor/graphql"; import { ProductUpdatePageSubmitData } from "@saleor/products/components/ProductUpdatePage"; -import { - ProductChannelListingUpdate, - ProductChannelListingUpdateVariables -} from "@saleor/products/types/ProductChannelListingUpdate"; -import { - ProductDetails_product, - ProductDetails_product_variants -} from "@saleor/products/types/ProductDetails"; -import { ProductMediaCreateVariables } from "@saleor/products/types/ProductMediaCreate"; -import { ProductMediaReorderVariables } from "@saleor/products/types/ProductMediaReorder"; -import { - ProductUpdate, - ProductUpdateVariables -} from "@saleor/products/types/ProductUpdate"; -import { - ProductVariantChannelListingUpdate, - ProductVariantChannelListingUpdateVariables -} from "@saleor/products/types/ProductVariantChannelListingUpdate"; -import { ProductVariantCreateData_product } from "@saleor/products/types/ProductVariantCreateData"; -import { ProductVariantDetails_productVariant_product } from "@saleor/products/types/ProductVariantDetails"; -import { ProductVariantReorderVariables } from "@saleor/products/types/ProductVariantReorder"; -import { - SimpleProductUpdate, - SimpleProductUpdateVariables -} from "@saleor/products/types/SimpleProductUpdate"; -import { - VariantCreate, - VariantCreateVariables -} from "@saleor/products/types/VariantCreate"; import { mapFormsetStockToStockInput } from "@saleor/products/utils/data"; import { ReorderEvent } from "@saleor/types"; import { move } from "@saleor/utils/lists"; @@ -79,29 +63,29 @@ type SubmitErrors = Array< >; export function createUpdateHandler( - product: ProductDetails_product, + product: ProductFragment, allChannels: ChannelData[], uploadFile: ( - variables: FileUploadVariables - ) => Promise>, + variables: FileUploadMutationVariables + ) => Promise>, updateProduct: ( - variables: ProductUpdateVariables - ) => Promise>, + variables: ProductUpdateMutationVariables + ) => Promise>, updateSimpleProduct: ( - variables: SimpleProductUpdateVariables - ) => Promise>, + variables: SimpleProductUpdateMutationVariables + ) => Promise>, updateChannels: (options: { - variables: ProductChannelListingUpdateVariables; - }) => Promise>, + variables: ProductChannelListingUpdateMutationVariables; + }) => Promise>, updateVariantChannels: (options: { - variables: ProductVariantChannelListingUpdateVariables; - }) => Promise>, + variables: ProductVariantChannelListingUpdateMutationVariables; + }) => Promise>, productVariantCreate: (options: { - variables: VariantCreateVariables; - }) => Promise>, + variables: VariantCreateMutationVariables; + }) => Promise>, deleteAttributeValue: ( - variables: AttributeValueDeleteVariables - ) => Promise> + variables: AttributeValueDeleteMutationVariables + ) => Promise> ) { return async (data: ProductUpdatePageSubmitData) => { let errors: SubmitErrors = []; @@ -127,7 +111,7 @@ export function createUpdateHandler( uploadFilesResult ); - const productVariables: ProductUpdateVariables = { + const productVariables: ProductUpdateMutationVariables = { id: product.id, input: { attributes: prepareAttributesInput({ @@ -223,7 +207,7 @@ export function createUpdateHandler( export function createImageUploadHandler( id: string, - createProductImage: (variables: ProductMediaCreateVariables) => void + createProductImage: (variables: ProductMediaCreateMutationVariables) => void ) { return (file: File) => createProductImage({ @@ -234,8 +218,10 @@ export function createImageUploadHandler( } export function createImageReorderHandler( - product: ProductDetails_product, - reorderProductImages: (variables: ProductMediaReorderVariables) => void + product: ProductFragment, + reorderProductImages: ( + variables: ProductMediaReorderMutationVariables + ) => void ) { return ({ newIndex, oldIndex }: ReorderEvent) => { let ids = product.media.map(image => image.id); @@ -247,30 +233,28 @@ export function createImageReorderHandler( }; } -function areVariantsEqual( - a: ProductDetails_product_variants, - b: ProductDetails_product_variants -) { +function areVariantsEqual(a: Node, b: Node) { return a.id === b.id; } -export function createVariantReorderHandler( - product: - | ProductDetails_product - | ProductVariantDetails_productVariant_product - | ProductVariantCreateData_product, - reorderProductVariants: (variables: ProductVariantReorderVariables) => void +export function createVariantReorderHandler< + T extends { id: string; variants: any[] } +>( + product: T, + reorderProductVariants: ( + variables: ProductVariantReorderMutationVariables + ) => void ) { return ({ newIndex, oldIndex }: ReorderEvent) => { const oldVariantOrder = [...product.variants]; product.variants = [ - ...(move( + ...move( product.variants[oldIndex], product!.variants, areVariantsEqual, newIndex - ) as ProductDetails_product_variants[]) + ) ]; reorderProductVariants({ diff --git a/src/products/views/ProductUpdate/handlers/utils.ts b/src/products/views/ProductUpdate/handlers/utils.ts index fa92b28a8..6d26d7b01 100644 --- a/src/products/views/ProductUpdate/handlers/utils.ts +++ b/src/products/views/ProductUpdate/handlers/utils.ts @@ -2,19 +2,19 @@ import { ChannelData, createSortedChannelsDataFromProduct } from "@saleor/channels/utils"; +import { + ProductChannelListingAddInput, + ProductDetailsVariantFragment, + ProductFragment, + ProductUpdateMutationVariables, + SimpleProductUpdateMutation +} from "@saleor/graphql"; import { weight } from "@saleor/misc"; import { getById } from "@saleor/orders/components/OrderReturnPage/utils"; import { ProductUpdatePageSubmitData } from "@saleor/products/components/ProductUpdatePage"; import { ProductUpdateSubmitData } from "@saleor/products/components/ProductUpdatePage/form"; -import { - ProductDetails_product, - ProductDetails_product_variants -} from "@saleor/products/types/ProductDetails"; -import { ProductUpdateVariables } from "@saleor/products/types/ProductUpdate"; -import { SimpleProductUpdate } from "@saleor/products/types/SimpleProductUpdate"; import { mapFormsetStockToStockInput } from "@saleor/products/utils/data"; import { getAvailabilityVariables } from "@saleor/products/utils/handlers"; -import { ProductChannelListingAddInput } from "@saleor/types/globalTypes"; import { arrayDiff } from "@saleor/utils/arrays"; import isEqual from "lodash/isEqual"; @@ -22,7 +22,7 @@ import { ChannelsWithVariantsData, ChannelWithVariantData } from "../types"; import { getParsedChannelsWithVariantsDataFromChannels } from "../utils"; export const getSimpleProductVariables = ( - productVariables: ProductUpdateVariables, + productVariables: ProductUpdateMutationVariables, data: ProductUpdatePageSubmitData, productId: string ) => ({ @@ -49,7 +49,7 @@ export const getSimpleProductVariables = ( updateStocks: data.updateStocks.map(mapFormsetStockToStockInput) }); -export const getSimpleProductErrors = (data: SimpleProductUpdate) => [ +export const getSimpleProductErrors = (data: SimpleProductUpdateMutation) => [ ...data.productUpdate.errors, ...data.productVariantStocksCreate.errors, ...data.productVariantStocksDelete.errors, @@ -95,19 +95,19 @@ const getParsedChannelsData = ( ) ); -const shouldRemoveChannel = ( - allVariants: ProductDetails_product_variants[] -) => ({ removeVariants }: ProductChannelListingAddInput) => +const shouldRemoveChannel = (allVariants: ProductDetailsVariantFragment[]) => ({ + removeVariants +}: ProductChannelListingAddInput) => isRemovingAllVariants(allVariants, removeVariants); const isRemovingAllVariants = ( - allVariants: ProductDetails_product_variants[], + allVariants: ProductDetailsVariantFragment[], removeVariants: string[] ) => !!removeVariants.length && removeVariants.length === allVariants.length; const shouldUpdateChannel = ( initialChannelWithVariantData, - allVariants: ProductDetails_product_variants[], + allVariants: ProductDetailsVariantFragment[], allChannels: ChannelData[] ) => ({ removeVariants, @@ -132,7 +132,7 @@ const shouldUpdateChannel = ( }; export const getChannelsVariables = ( - { id, variants }: ProductDetails_product, + { id, variants }: ProductFragment, allChannels: ChannelData[], { channelsWithVariants, channelsData }: ProductUpdateSubmitData ) => { @@ -169,7 +169,7 @@ export const getChannelsVariables = ( export const getSimpleChannelsVariables = ( data: ProductUpdatePageSubmitData, - product: ProductDetails_product + product: ProductFragment ) => { const productChannels = createSortedChannelsDataFromProduct(product); const existingChannelIDs = productChannels.map(channel => channel.id); diff --git a/src/products/views/ProductVariant.tsx b/src/products/views/ProductVariant.tsx index 9f453c757..ffc300749 100644 --- a/src/products/views/ProductVariant.tsx +++ b/src/products/views/ProductVariant.tsx @@ -1,5 +1,4 @@ import placeholderImg from "@assets/images/placeholder255x255.png"; -import { useAttributeValueDeleteMutation } from "@saleor/attributes/mutations"; import { getAttributesAfterFileAttributesUpdate, mergeAttributeValueDeleteErrors, @@ -15,28 +14,34 @@ import { AttributeInput } from "@saleor/components/Attributes"; import NotFoundPage from "@saleor/components/NotFoundPage"; import { WindowTitle } from "@saleor/components/WindowTitle"; import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; -import { useFileUploadMutation } from "@saleor/files/mutations"; +import { + ProductErrorWithAttributesFragment, + ProductVariantFragment, + useAttributeValueDeleteMutation, + useFileUploadMutation, + useProductVariantChannelListingUpdateMutation, + useProductVariantDetailsQuery, + useProductVariantPreorderDeactivateMutation, + useProductVariantReorderMutation, + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation, + useVariantDeleteMutation, + useVariantMediaAssignMutation, + useVariantMediaUnassignMutation, + useVariantUpdateMutation, + useWarehouseListQuery +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useOnSetDefaultVariant from "@saleor/hooks/useOnSetDefaultVariant"; import useShop from "@saleor/hooks/useShop"; import { commonMessages } from "@saleor/intl"; -import { - useProductVariantChannelListingUpdate, - useProductVariantPreorderDeactivateMutation -} from "@saleor/products/mutations"; -import { ProductVariantDetails_productVariant } from "@saleor/products/types/ProductVariantDetails"; import usePageSearch from "@saleor/searches/usePageSearch"; import useProductSearch from "@saleor/searches/useProductSearch"; import useAttributeValueSearchHandler from "@saleor/utils/handlers/attributeValueSearchHandler"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createMetadataUpdateHandler from "@saleor/utils/handlers/metadataUpdateHandler"; import { mapEdgesToItems } from "@saleor/utils/maps"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; -import { useWarehouseList } from "@saleor/warehouses/queries"; import { warehouseAddPath } from "@saleor/warehouses/urls"; import React, { useEffect, useState } from "react"; import { useIntl } from "react-intl"; @@ -45,15 +50,6 @@ import { extractMutationErrors, weight } from "../../misc"; import ProductVariantDeleteDialog from "../components/ProductVariantDeleteDialog"; import ProductVariantPage from "../components/ProductVariantPage"; import { ProductVariantUpdateSubmitData } from "../components/ProductVariantPage/form"; -import { - useProductVariantReorderMutation, - useVariantDeleteMutation, - useVariantMediaAssignMutation, - useVariantMediaUnassignMutation, - useVariantUpdateMutation -} from "../mutations"; -import { useProductVariantQuery } from "../queries"; -import { VariantUpdate_productVariantUpdate_errors } from "../types/VariantUpdate"; import { productUrl, productVariantAddUrl, @@ -79,34 +75,34 @@ export const ProductVariant: React.FC = ({ const navigate = useNavigator(); const notify = useNotifier(); const intl = useIntl(); - const [errors, setErrors] = useState< - VariantUpdate_productVariantUpdate_errors[] - >([]); + const [errors, setErrors] = useState( + [] + ); useEffect(() => { setErrors([]); }, [variantId]); - const warehouses = useWarehouseList({ + const warehouses = useWarehouseListQuery({ displayLoader: true, variables: { first: 50 } }); - const { data, loading } = useProductVariantQuery({ + const { data, loading } = useProductVariantDetailsQuery({ displayLoader: true, variables: { id: variantId, firstValues: 10 } }); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); const [ updateChannels, updateChannelsOpts - ] = useProductVariantChannelListingUpdate({}); + ] = useProductVariantChannelListingUpdateMutation({}); const [openModal] = createDialogActionHandlers< ProductVariantEditUrlDialog, @@ -156,7 +152,7 @@ export const ProductVariant: React.FC = ({ const handleSubmitChannels = async ( data: ProductVariantUpdateSubmitData, - variant: ProductVariantDetails_productVariant + variant: ProductVariantFragment ) => { const channelsHaveChanged = data.channelListings.some(channel => { const variantChannel = variant.channelListings.find( diff --git a/src/products/views/ProductVariantCreate.tsx b/src/products/views/ProductVariantCreate.tsx index baa7865ef..3d8007220 100644 --- a/src/products/views/ProductVariantCreate.tsx +++ b/src/products/views/ProductVariantCreate.tsx @@ -7,7 +7,15 @@ import { AttributeInput } from "@saleor/components/Attributes"; import NotFoundPage from "@saleor/components/NotFoundPage"; import { WindowTitle } from "@saleor/components/WindowTitle"; import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; -import { useFileUploadMutation } from "@saleor/files/mutations"; +import { + useFileUploadMutation, + useProductVariantCreateDataQuery, + useProductVariantReorderMutation, + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation, + useVariantCreateMutation, + useWarehouseListQuery +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; @@ -16,11 +24,6 @@ import useProductSearch from "@saleor/searches/useProductSearch"; import useAttributeValueSearchHandler from "@saleor/utils/handlers/attributeValueSearchHandler"; import createMetadataCreateHandler from "@saleor/utils/handlers/metadataCreateHandler"; import { mapEdgesToItems } from "@saleor/utils/maps"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; -import { useWarehouseList } from "@saleor/warehouses/queries"; import { warehouseAddPath } from "@saleor/warehouses/urls"; import React from "react"; import { useIntl } from "react-intl"; @@ -28,12 +31,6 @@ import { useIntl } from "react-intl"; import { getMutationErrors, weight } from "../../misc"; import ProductVariantCreatePage from "../components/ProductVariantCreatePage"; import { ProductVariantCreateData } from "../components/ProductVariantCreatePage/form"; -import { - useProductVariantReorderMutation, - useVariantCreateMutation -} from "../mutations"; -import { useProductVariantCreateQuery } from "../queries"; -import { VariantCreate } from "../types/VariantCreate"; import { productListUrl, productUrl, @@ -58,14 +55,14 @@ export const ProductVariant: React.FC = ({ const shop = useShop(); const intl = useIntl(); - const warehouses = useWarehouseList({ + const warehouses = useWarehouseListQuery({ displayLoader: true, variables: { first: 50 } }); - const { data, loading: productLoading } = useProductVariantCreateQuery({ + const { data, loading: productLoading } = useProductVariantCreateDataQuery({ displayLoader: true, variables: { id: productId, @@ -77,24 +74,22 @@ export const ProductVariant: React.FC = ({ const product = data?.product; - const handleVariantCreationSuccess = (data: VariantCreate) => { - const variantId = data.productVariantCreate.productVariant.id; - - notify({ - status: "success", - text: intl.formatMessage(messages.variantCreatedSuccess) - }); - navigate(productVariantEditUrl(productId, variantId), { - resetScroll: true - }); - }; - const [variantCreate, variantCreateResult] = useVariantCreateMutation({ - onCompleted: handleVariantCreationSuccess + onCompleted: data => { + const variantId = data.productVariantCreate.productVariant.id; + + notify({ + status: "success", + text: intl.formatMessage(messages.variantCreatedSuccess) + }); + navigate(productVariantEditUrl(productId, variantId), { + resetScroll: true + }); + } }); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); if (product === null) { return navigate(productListUrl())} />; diff --git a/src/products/views/ProductVariantCreator/ProductVariantCreator.tsx b/src/products/views/ProductVariantCreator/ProductVariantCreator.tsx index 60abf357e..1e3396461 100644 --- a/src/products/views/ProductVariantCreator/ProductVariantCreator.tsx +++ b/src/products/views/ProductVariantCreator/ProductVariantCreator.tsx @@ -1,10 +1,12 @@ -import { useShopLimitsQuery } from "@saleor/components/Shop/query"; +import { useShopLimitsQuery } from "@saleor/components/Shop/queries"; import { WindowTitle } from "@saleor/components/WindowTitle"; import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; +import { + useCreateMultipleVariantsDataQuery, + useProductVariantBulkCreateMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; -import { useProductVariantBulkCreateMutation } from "@saleor/products/mutations"; -import { useCreateMultipleVariantsData } from "@saleor/products/queries"; import { productUrl } from "@saleor/products/urls"; import useAttributeValueSearchHandler from "@saleor/utils/handlers/attributeValueSearchHandler"; import { mapEdgesToItems } from "@saleor/utils/maps"; @@ -23,7 +25,7 @@ const ProductVariantCreator: React.FC = ({ const navigate = useNavigator(); const notify = useNotifier(); const intl = useIntl(); - const { data } = useCreateMultipleVariantsData({ + const { data } = useCreateMultipleVariantsDataQuery({ displayLoader: true, variables: { id, diff --git a/src/queries.tsx b/src/queries.tsx deleted file mode 100644 index fb72347af..000000000 --- a/src/queries.tsx +++ /dev/null @@ -1,144 +0,0 @@ -import { ApolloQueryResult, QueryResult } from "@apollo/client"; -import { Query } from "@apollo/client/react/components"; -import { DocumentNode } from "graphql"; -import React from "react"; -import { useIntl } from "react-intl"; - -import { handleQueryAuthError, useUser } from "./auth"; -import useAppState from "./hooks/useAppState"; -import useNotifier from "./hooks/useNotifier"; -import { RequireAtLeastOne } from "./misc"; - -export interface LoadMore { - loadMore: ( - mergeFunc: (prev: TData, next: TData) => TData, - extraVariables: Partial - ) => Promise>; -} - -export type TypedQueryResult = QueryResult< - TData, - TVariables -> & - LoadMore; - -export interface TypedQueryInnerProps { - children: (result: TypedQueryResult) => React.ReactNode; - displayLoader?: boolean; - skip?: boolean; - variables?: TVariables; -} - -interface QueryProgressProps { - loading: boolean; - onLoading: () => void; - onCompleted: () => void; -} - -class QueryProgress extends React.Component { - componentDidMount() { - const { loading, onLoading } = this.props; - if (loading) { - onLoading(); - } - } - - componentDidUpdate(prevProps) { - const { loading, onLoading, onCompleted } = this.props; - if (prevProps.loading !== loading) { - if (loading) { - onLoading(); - } else { - onCompleted(); - } - } - } - - render() { - return this.props.children; - } -} - -// For some reason Query returns () => Element instead of () => ReactNode -export function TypedQuery( - query: DocumentNode -): React.FC> { - return ({ children, displayLoader, skip, variables }) => { - const notify = useNotifier(); - const [, dispatchAppState] = useAppState(); - const intl = useIntl(); - const user = useUser(); - - return ( - - handleQueryAuthError(error, notify, user.logout, intl) - } - > - {(queryData: QueryResult) => { - const loadMore = ( - mergeFunc: ( - previousResults: TData, - fetchMoreResult: TData - ) => TData, - extraVariables: RequireAtLeastOne - ) => - queryData.fetchMore({ - query, - updateQuery: (previousResults, { fetchMoreResult }) => { - if (!fetchMoreResult) { - return previousResults; - } - return mergeFunc(previousResults, fetchMoreResult); - }, - variables: { ...variables, ...extraVariables } - }); - - if (displayLoader) { - return ( - - dispatchAppState({ - payload: { - value: false - }, - type: "displayLoader" - }) - } - onLoading={() => - dispatchAppState({ - payload: { - value: true - }, - type: "displayLoader" - }) - } - > - {children({ - ...queryData, - loadMore - })} - - ); - } - - return ( - <> - {children({ - ...queryData, - loadMore - })} - - ); - }} - - ); - }; -} diff --git a/src/searches/types/SearchAttributeValues.ts b/src/searches/types/SearchAttributeValues.ts deleted file mode 100644 index b00c03c08..000000000 --- a/src/searches/types/SearchAttributeValues.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: SearchAttributeValues -// ==================================================== - -export interface SearchAttributeValues_attribute_choices_edges_node_file { - __typename: "File"; - url: string; - contentType: string | null; -} - -export interface SearchAttributeValues_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - slug: string | null; - file: SearchAttributeValues_attribute_choices_edges_node_file | null; - reference: string | null; - boolean: boolean | null; - date: any | null; - dateTime: any | null; - value: string | null; - richText: any | null; -} - -export interface SearchAttributeValues_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - node: SearchAttributeValues_attribute_choices_edges_node; -} - -export interface SearchAttributeValues_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SearchAttributeValues_attribute_choices { - __typename: "AttributeValueCountableConnection"; - edges: SearchAttributeValues_attribute_choices_edges[]; - pageInfo: SearchAttributeValues_attribute_choices_pageInfo; -} - -export interface SearchAttributeValues_attribute { - __typename: "Attribute"; - id: string; - choices: SearchAttributeValues_attribute_choices | null; -} - -export interface SearchAttributeValues { - attribute: SearchAttributeValues_attribute | null; -} - -export interface SearchAttributeValuesVariables { - id?: string | null; - after?: string | null; - first: number; - query: string; -} diff --git a/src/searches/types/SearchAttributes.ts b/src/searches/types/SearchAttributes.ts deleted file mode 100644 index 093770160..000000000 --- a/src/searches/types/SearchAttributes.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: SearchAttributes -// ==================================================== - -export interface SearchAttributes_search_edges_node { - __typename: "Attribute"; - id: string; - name: string | null; -} - -export interface SearchAttributes_search_edges { - __typename: "AttributeCountableEdge"; - node: SearchAttributes_search_edges_node; -} - -export interface SearchAttributes_search_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SearchAttributes_search { - __typename: "AttributeCountableConnection"; - edges: SearchAttributes_search_edges[]; - pageInfo: SearchAttributes_search_pageInfo; -} - -export interface SearchAttributes { - search: SearchAttributes_search | null; -} - -export interface SearchAttributesVariables { - after?: string | null; - first: number; - query: string; -} diff --git a/src/searches/types/SearchCategories.ts b/src/searches/types/SearchCategories.ts deleted file mode 100644 index bddd287c9..000000000 --- a/src/searches/types/SearchCategories.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: SearchCategories -// ==================================================== - -export interface SearchCategories_search_edges_node { - __typename: "Category"; - id: string; - name: string; -} - -export interface SearchCategories_search_edges { - __typename: "CategoryCountableEdge"; - node: SearchCategories_search_edges_node; -} - -export interface SearchCategories_search_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SearchCategories_search { - __typename: "CategoryCountableConnection"; - edges: SearchCategories_search_edges[]; - pageInfo: SearchCategories_search_pageInfo; -} - -export interface SearchCategories { - search: SearchCategories_search | null; -} - -export interface SearchCategoriesVariables { - after?: string | null; - first: number; - query: string; -} diff --git a/src/searches/types/SearchCollections.ts b/src/searches/types/SearchCollections.ts deleted file mode 100644 index 7f2f50f3c..000000000 --- a/src/searches/types/SearchCollections.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: SearchCollections -// ==================================================== - -export interface SearchCollections_search_edges_node { - __typename: "Collection"; - id: string; - name: string; -} - -export interface SearchCollections_search_edges { - __typename: "CollectionCountableEdge"; - node: SearchCollections_search_edges_node; -} - -export interface SearchCollections_search_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SearchCollections_search { - __typename: "CollectionCountableConnection"; - edges: SearchCollections_search_edges[]; - pageInfo: SearchCollections_search_pageInfo; -} - -export interface SearchCollections { - search: SearchCollections_search | null; -} - -export interface SearchCollectionsVariables { - after?: string | null; - first: number; - query: string; -} diff --git a/src/searches/types/SearchCustomers.ts b/src/searches/types/SearchCustomers.ts deleted file mode 100644 index 61c118074..000000000 --- a/src/searches/types/SearchCustomers.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: SearchCustomers -// ==================================================== - -export interface SearchCustomers_search_edges_node { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; -} - -export interface SearchCustomers_search_edges { - __typename: "UserCountableEdge"; - node: SearchCustomers_search_edges_node; -} - -export interface SearchCustomers_search_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SearchCustomers_search { - __typename: "UserCountableConnection"; - edges: SearchCustomers_search_edges[]; - pageInfo: SearchCustomers_search_pageInfo; -} - -export interface SearchCustomers { - search: SearchCustomers_search | null; -} - -export interface SearchCustomersVariables { - after?: string | null; - first: number; - query: string; -} diff --git a/src/searches/types/SearchPageTypes.ts b/src/searches/types/SearchPageTypes.ts deleted file mode 100644 index a95f8098a..000000000 --- a/src/searches/types/SearchPageTypes.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: SearchPageTypes -// ==================================================== - -export interface SearchPageTypes_search_edges_node { - __typename: "PageType"; - id: string; - name: string; -} - -export interface SearchPageTypes_search_edges { - __typename: "PageTypeCountableEdge"; - node: SearchPageTypes_search_edges_node; -} - -export interface SearchPageTypes_search_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SearchPageTypes_search { - __typename: "PageTypeCountableConnection"; - edges: SearchPageTypes_search_edges[]; - pageInfo: SearchPageTypes_search_pageInfo; -} - -export interface SearchPageTypes { - search: SearchPageTypes_search | null; -} - -export interface SearchPageTypesVariables { - after?: string | null; - first: number; - query: string; -} diff --git a/src/searches/types/SearchPages.ts b/src/searches/types/SearchPages.ts deleted file mode 100644 index 691e17922..000000000 --- a/src/searches/types/SearchPages.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: SearchPages -// ==================================================== - -export interface SearchPages_search_edges_node { - __typename: "Page"; - id: string; - title: string; -} - -export interface SearchPages_search_edges { - __typename: "PageCountableEdge"; - node: SearchPages_search_edges_node; -} - -export interface SearchPages_search_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SearchPages_search { - __typename: "PageCountableConnection"; - edges: SearchPages_search_edges[]; - pageInfo: SearchPages_search_pageInfo; -} - -export interface SearchPages { - search: SearchPages_search | null; -} - -export interface SearchPagesVariables { - after?: string | null; - first: number; - query: string; -} diff --git a/src/searches/types/SearchPermissionGroups.ts b/src/searches/types/SearchPermissionGroups.ts deleted file mode 100644 index 884951755..000000000 --- a/src/searches/types/SearchPermissionGroups.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: SearchPermissionGroups -// ==================================================== - -export interface SearchPermissionGroups_search_edges_node { - __typename: "Group"; - id: string; - name: string; - userCanManage: boolean; -} - -export interface SearchPermissionGroups_search_edges { - __typename: "GroupCountableEdge"; - node: SearchPermissionGroups_search_edges_node; -} - -export interface SearchPermissionGroups_search_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SearchPermissionGroups_search { - __typename: "GroupCountableConnection"; - edges: SearchPermissionGroups_search_edges[]; - pageInfo: SearchPermissionGroups_search_pageInfo; -} - -export interface SearchPermissionGroups { - search: SearchPermissionGroups_search | null; -} - -export interface SearchPermissionGroupsVariables { - after?: string | null; - first: number; - query: string; -} diff --git a/src/searches/types/SearchProductTypes.ts b/src/searches/types/SearchProductTypes.ts deleted file mode 100644 index d5cea4e33..000000000 --- a/src/searches/types/SearchProductTypes.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: SearchProductTypes -// ==================================================== - -export interface SearchProductTypes_search_edges_node { - __typename: "ProductType"; - id: string; - name: string; -} - -export interface SearchProductTypes_search_edges { - __typename: "ProductTypeCountableEdge"; - node: SearchProductTypes_search_edges_node; -} - -export interface SearchProductTypes_search_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SearchProductTypes_search { - __typename: "ProductTypeCountableConnection"; - edges: SearchProductTypes_search_edges[]; - pageInfo: SearchProductTypes_search_pageInfo; -} - -export interface SearchProductTypes { - search: SearchProductTypes_search | null; -} - -export interface SearchProductTypesVariables { - after?: string | null; - first: number; - query: string; -} diff --git a/src/searches/types/SearchProducts.ts b/src/searches/types/SearchProducts.ts deleted file mode 100644 index 168ff72ff..000000000 --- a/src/searches/types/SearchProducts.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: SearchProducts -// ==================================================== - -export interface SearchProducts_search_edges_node_thumbnail { - __typename: "Image"; - url: string; -} - -export interface SearchProducts_search_edges_node_variants_channelListings_channel { - __typename: "Channel"; - id: string; - isActive: boolean; - name: string; - currencyCode: string; -} - -export interface SearchProducts_search_edges_node_variants_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface SearchProducts_search_edges_node_variants_channelListings { - __typename: "ProductVariantChannelListing"; - channel: SearchProducts_search_edges_node_variants_channelListings_channel; - price: SearchProducts_search_edges_node_variants_channelListings_price | null; -} - -export interface SearchProducts_search_edges_node_variants { - __typename: "ProductVariant"; - id: string; - name: string; - sku: string | null; - channelListings: SearchProducts_search_edges_node_variants_channelListings[] | null; -} - -export interface SearchProducts_search_edges_node { - __typename: "Product"; - id: string; - name: string; - thumbnail: SearchProducts_search_edges_node_thumbnail | null; - variants: (SearchProducts_search_edges_node_variants | null)[] | null; -} - -export interface SearchProducts_search_edges { - __typename: "ProductCountableEdge"; - node: SearchProducts_search_edges_node; -} - -export interface SearchProducts_search_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SearchProducts_search { - __typename: "ProductCountableConnection"; - edges: SearchProducts_search_edges[]; - pageInfo: SearchProducts_search_pageInfo; -} - -export interface SearchProducts { - search: SearchProducts_search | null; -} - -export interface SearchProductsVariables { - after?: string | null; - first: number; - query: string; -} diff --git a/src/searches/types/SearchShippingZones.ts b/src/searches/types/SearchShippingZones.ts deleted file mode 100644 index ccef17280..000000000 --- a/src/searches/types/SearchShippingZones.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: SearchShippingZones -// ==================================================== - -export interface SearchShippingZones_search_edges_node { - __typename: "ShippingZone"; - id: string; - name: string; -} - -export interface SearchShippingZones_search_edges { - __typename: "ShippingZoneCountableEdge"; - node: SearchShippingZones_search_edges_node; -} - -export interface SearchShippingZones_search_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SearchShippingZones_search { - __typename: "ShippingZoneCountableConnection"; - totalCount: number | null; - edges: SearchShippingZones_search_edges[]; - pageInfo: SearchShippingZones_search_pageInfo; -} - -export interface SearchShippingZones { - search: SearchShippingZones_search | null; -} - -export interface SearchShippingZonesVariables { - query: string; - first: number; - after?: string | null; - last?: number | null; - before?: string | null; -} diff --git a/src/searches/types/SearchStaffMembers.ts b/src/searches/types/SearchStaffMembers.ts deleted file mode 100644 index c25e9b51c..000000000 --- a/src/searches/types/SearchStaffMembers.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: SearchStaffMembers -// ==================================================== - -export interface SearchStaffMembers_search_edges_node_avatar { - __typename: "Image"; - alt: string | null; - url: string; -} - -export interface SearchStaffMembers_search_edges_node { - __typename: "User"; - id: string; - email: string; - firstName: string; - lastName: string; - isActive: boolean; - avatar: SearchStaffMembers_search_edges_node_avatar | null; -} - -export interface SearchStaffMembers_search_edges { - __typename: "UserCountableEdge"; - node: SearchStaffMembers_search_edges_node; -} - -export interface SearchStaffMembers_search_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SearchStaffMembers_search { - __typename: "UserCountableConnection"; - edges: SearchStaffMembers_search_edges[]; - pageInfo: SearchStaffMembers_search_pageInfo; -} - -export interface SearchStaffMembers { - search: SearchStaffMembers_search | null; -} - -export interface SearchStaffMembersVariables { - after?: string | null; - first: number; - query: string; -} diff --git a/src/searches/types/SearchVariants.ts b/src/searches/types/SearchVariants.ts deleted file mode 100644 index 5aaa889bb..000000000 --- a/src/searches/types/SearchVariants.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: SearchVariants -// ==================================================== - -export interface SearchVariants_search_edges_node_product_thumbnail { - __typename: "Image"; - url: string; -} - -export interface SearchVariants_search_edges_node_product { - __typename: "Product"; - name: string; - thumbnail: SearchVariants_search_edges_node_product_thumbnail | null; -} - -export interface SearchVariants_search_edges_node { - __typename: "ProductVariant"; - id: string; - name: string; - product: SearchVariants_search_edges_node_product; -} - -export interface SearchVariants_search_edges { - __typename: "ProductVariantCountableEdge"; - node: SearchVariants_search_edges_node; -} - -export interface SearchVariants_search_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SearchVariants_search { - __typename: "ProductVariantCountableConnection"; - edges: SearchVariants_search_edges[]; - pageInfo: SearchVariants_search_pageInfo; -} - -export interface SearchVariants { - search: SearchVariants_search | null; -} - -export interface SearchVariantsVariables { - after?: string | null; - first: number; - query: string; -} diff --git a/src/searches/types/SearchWarehouses.ts b/src/searches/types/SearchWarehouses.ts deleted file mode 100644 index 530e1a49b..000000000 --- a/src/searches/types/SearchWarehouses.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: SearchWarehouses -// ==================================================== - -export interface SearchWarehouses_search_edges_node { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface SearchWarehouses_search_edges { - __typename: "WarehouseCountableEdge"; - node: SearchWarehouses_search_edges_node; -} - -export interface SearchWarehouses_search_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SearchWarehouses_search { - __typename: "WarehouseCountableConnection"; - edges: SearchWarehouses_search_edges[]; - pageInfo: SearchWarehouses_search_pageInfo; -} - -export interface SearchWarehouses { - search: SearchWarehouses_search | null; -} - -export interface SearchWarehousesVariables { - after?: string | null; - first: number; - query: string; -} diff --git a/src/searches/useAttributeSearch.ts b/src/searches/useAttributeSearch.ts index cac74d917..f17499cb1 100644 --- a/src/searches/useAttributeSearch.ts +++ b/src/searches/useAttributeSearch.ts @@ -1,14 +1,12 @@ import { gql } from "@apollo/client"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; +import { + SearchAttributesDocument, + SearchAttributesQuery, + SearchAttributesQueryVariables +} from "@saleor/graphql"; import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; -import { - SearchAttributes, - SearchAttributesVariables -} from "./types/SearchAttributes"; - export const searchAttributes = gql` - ${pageInfoFragment} query SearchAttributes($after: String, $first: Int!, $query: String!) { search: attributes( after: $after @@ -22,12 +20,13 @@ export const searchAttributes = gql` } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export default makeTopLevelSearch( - searchAttributes -); +export default makeTopLevelSearch< + SearchAttributesQuery, + SearchAttributesQueryVariables +>(SearchAttributesDocument); diff --git a/src/searches/useAttributeValueSearch.ts b/src/searches/useAttributeValueSearch.ts index 7f6739050..3b179859a 100644 --- a/src/searches/useAttributeValueSearch.ts +++ b/src/searches/useAttributeValueSearch.ts @@ -1,16 +1,12 @@ import { gql } from "@apollo/client"; -import { attributeValueDetailsFragment } from "@saleor/fragments/attributes"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; +import { + SearchAttributeValuesDocument, + SearchAttributeValuesQuery, + SearchAttributeValuesQueryVariables +} from "@saleor/graphql"; import makeSearch from "@saleor/hooks/makeSearch"; -import { - SearchAttributeValues, - SearchAttributeValuesVariables -} from "./types/SearchAttributeValues"; - export const searchAttributeValues = gql` - ${pageInfoFragment} - ${attributeValueDetailsFragment} query SearchAttributeValues( $id: ID $after: String @@ -22,11 +18,11 @@ export const searchAttributeValues = gql` choices(after: $after, first: $first, filter: { search: $query }) { edges { node { - ...AttributeValueDetailsFragment + ...AttributeValueDetails } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } @@ -34,9 +30,9 @@ export const searchAttributeValues = gql` `; export default makeSearch< - SearchAttributeValues, - SearchAttributeValuesVariables ->(searchAttributeValues, result => { + SearchAttributeValuesQuery, + SearchAttributeValuesQueryVariables +>(SearchAttributeValuesDocument, result => { if (result.data?.attribute.choices.pageInfo.hasNextPage) { result.loadMore( (prev, next) => { diff --git a/src/pageTypes/hooks/useAvailablePageAttributeSearch/index.tsx b/src/searches/useAvailablePageAttributesSearch.ts similarity index 71% rename from src/pageTypes/hooks/useAvailablePageAttributeSearch/index.tsx rename to src/searches/useAvailablePageAttributesSearch.ts index d1d928175..7b01eaa4a 100644 --- a/src/pageTypes/hooks/useAvailablePageAttributeSearch/index.tsx +++ b/src/searches/useAvailablePageAttributesSearch.ts @@ -1,16 +1,12 @@ import { gql } from "@apollo/client"; -import { availableAttributeFragment } from "@saleor/fragments/attributes"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; +import { + SearchAvailablePageAttributesDocument, + SearchAvailablePageAttributesQuery, + SearchAvailablePageAttributesQueryVariables +} from "@saleor/graphql"; import makeSearch from "@saleor/hooks/makeSearch"; -import { - SearchAvailablePageAttributes, - SearchAvailablePageAttributesVariables -} from "./types/SearchAvailablePageAttributes"; - export const searchPageAttributes = gql` - ${pageInfoFragment} - ${availableAttributeFragment} query SearchAvailablePageAttributes( $id: ID! $after: String @@ -26,11 +22,11 @@ export const searchPageAttributes = gql` ) { edges { node { - ...AvailableAttributeFragment + ...AvailableAttribute } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } @@ -38,9 +34,9 @@ export const searchPageAttributes = gql` `; export default makeSearch< - SearchAvailablePageAttributes, - SearchAvailablePageAttributesVariables ->(searchPageAttributes, result => + SearchAvailablePageAttributesQuery, + SearchAvailablePageAttributesQueryVariables +>(SearchAvailablePageAttributesDocument, result => result.loadMore( (prev, next) => { if ( diff --git a/src/productTypes/hooks/useAvailableProductAttributeSearch/index.tsx b/src/searches/useAvailableProductAttributeSearch.ts similarity index 71% rename from src/productTypes/hooks/useAvailableProductAttributeSearch/index.tsx rename to src/searches/useAvailableProductAttributeSearch.ts index b06af92b1..a0ab8b909 100644 --- a/src/productTypes/hooks/useAvailableProductAttributeSearch/index.tsx +++ b/src/searches/useAvailableProductAttributeSearch.ts @@ -1,16 +1,12 @@ import { gql } from "@apollo/client"; -import { availableAttributeFragment } from "@saleor/fragments/attributes"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; +import { + SearchAvailableProductAttributesDocument, + SearchAvailableProductAttributesQuery, + SearchAvailableProductAttributesQueryVariables +} from "@saleor/graphql"; import makeSearch from "@saleor/hooks/makeSearch"; -import { - SearchAvailableProductAttributes, - SearchAvailableProductAttributesVariables -} from "./types/SearchAvailableProductAttributes"; - export const searchProductAttributes = gql` - ${pageInfoFragment} - ${availableAttributeFragment} query SearchAvailableProductAttributes( $id: ID! $after: String @@ -26,11 +22,11 @@ export const searchProductAttributes = gql` ) { edges { node { - ...AvailableAttributeFragment + ...AvailableAttribute } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } @@ -38,9 +34,9 @@ export const searchProductAttributes = gql` `; export default makeSearch< - SearchAvailableProductAttributes, - SearchAvailableProductAttributesVariables ->(searchProductAttributes, result => + SearchAvailableProductAttributesQuery, + SearchAvailableProductAttributesQueryVariables +>(SearchAvailableProductAttributesDocument, result => result.loadMore( (prev, next) => { if ( diff --git a/src/searches/useCategorySearch.ts b/src/searches/useCategorySearch.ts index 7381f2d0a..7ad3dd774 100644 --- a/src/searches/useCategorySearch.ts +++ b/src/searches/useCategorySearch.ts @@ -1,14 +1,12 @@ import { gql } from "@apollo/client"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; +import { + SearchCategoriesDocument, + SearchCategoriesQuery, + SearchCategoriesQueryVariables +} from "@saleor/graphql"; import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; -import { - SearchCategories, - SearchCategoriesVariables -} from "./types/SearchCategories"; - export const searchCategories = gql` - ${pageInfoFragment} query SearchCategories($after: String, $first: Int!, $query: String!) { search: categories( after: $after @@ -22,12 +20,13 @@ export const searchCategories = gql` } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export default makeTopLevelSearch( - searchCategories -); +export default makeTopLevelSearch< + SearchCategoriesQuery, + SearchCategoriesQueryVariables +>(SearchCategoriesDocument); diff --git a/src/searches/useCollectionSearch.ts b/src/searches/useCollectionSearch.ts index 37f767d4d..8f40f632c 100644 --- a/src/searches/useCollectionSearch.ts +++ b/src/searches/useCollectionSearch.ts @@ -1,14 +1,12 @@ import { gql } from "@apollo/client"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; +import { + SearchCollectionsDocument, + SearchCollectionsQuery, + SearchCollectionsQueryVariables +} from "@saleor/graphql"; import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; -import { - SearchCollections, - SearchCollectionsVariables -} from "./types/SearchCollections"; - export const searchCollections = gql` - ${pageInfoFragment} query SearchCollections($after: String, $first: Int!, $query: String!) { search: collections( after: $after @@ -22,13 +20,13 @@ export const searchCollections = gql` } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; export default makeTopLevelSearch< - SearchCollections, - SearchCollectionsVariables ->(searchCollections); + SearchCollectionsQuery, + SearchCollectionsQueryVariables +>(SearchCollectionsDocument); diff --git a/src/searches/useCustomerSearch.ts b/src/searches/useCustomerSearch.ts index 25e34732d..09e3dfa6a 100644 --- a/src/searches/useCustomerSearch.ts +++ b/src/searches/useCustomerSearch.ts @@ -1,14 +1,12 @@ import { gql } from "@apollo/client"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; +import { + SearchCustomersDocument, + SearchCustomersQuery, + SearchCustomersQueryVariables +} from "@saleor/graphql"; import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; -import { - SearchCustomers, - SearchCustomersVariables -} from "./types/SearchCustomers"; - export const searchCustomers = gql` - ${pageInfoFragment} query SearchCustomers($after: String, $first: Int!, $query: String!) { search: customers( after: $after @@ -24,12 +22,13 @@ export const searchCustomers = gql` } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export default makeTopLevelSearch( - searchCustomers -); +export default makeTopLevelSearch< + SearchCustomersQuery, + SearchCustomersQueryVariables +>(SearchCustomersDocument); diff --git a/src/giftCards/components/GiftCardTagInput/useGiftCardTagsSearch.ts b/src/searches/useGiftCardTagsSearch.ts similarity index 64% rename from src/giftCards/components/GiftCardTagInput/useGiftCardTagsSearch.ts rename to src/searches/useGiftCardTagsSearch.ts index 82854ccc2..0101522cb 100644 --- a/src/giftCards/components/GiftCardTagInput/useGiftCardTagsSearch.ts +++ b/src/searches/useGiftCardTagsSearch.ts @@ -1,14 +1,12 @@ import { gql } from "@apollo/client"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; +import { + SearchGiftCardTagsDocument, + SearchGiftCardTagsQuery, + SearchGiftCardTagsQueryVariables +} from "@saleor/graphql"; import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; -import { - SearchGiftCardTags, - SearchGiftCardTagsVariables -} from "./types/SearchGiftCardTags"; - -const searchGiftCardTags = gql` - ${pageInfoFragment} +export const searchGiftCardTags = gql` query SearchGiftCardTags( $query: String! $first: Int! @@ -31,13 +29,13 @@ const searchGiftCardTags = gql` } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; export default makeTopLevelSearch< - SearchGiftCardTags, - SearchGiftCardTagsVariables ->(searchGiftCardTags); + SearchGiftCardTagsQuery, + SearchGiftCardTagsQueryVariables +>(SearchGiftCardTagsDocument); diff --git a/src/searches/useOrderVariantSearch.ts b/src/searches/useOrderVariantSearch.ts new file mode 100644 index 000000000..90cb6a6fd --- /dev/null +++ b/src/searches/useOrderVariantSearch.ts @@ -0,0 +1,75 @@ +import { gql } from "@apollo/client"; +import { + SearchOrderVariantDocument, + SearchOrderVariantQuery, + SearchOrderVariantQueryVariables +} from "@saleor/graphql"; +import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; + +export const searchOrderVariant = gql` + query SearchOrderVariant( + $channel: String! + $first: Int! + $query: String! + $after: String + $address: AddressInput + ) { + search: products( + first: $first + after: $after + filter: { search: $query } + channel: $channel + ) { + edges { + node { + id + name + thumbnail { + url + } + variants { + id + name + sku + pricing(address: $address) { + priceUndiscounted { + gross { + ...Money + } + } + price { + gross { + ...Money + } + } + onSale + } + channelListings { + channel { + id + isActive + name + currencyCode + } + price { + amount + currency + } + } + } + } + } + pageInfo { + endCursor + hasNextPage + hasPreviousPage + startCursor + } + } + } +`; + +export const useOrderVariantSearch = makeTopLevelSearch< + SearchOrderVariantQuery, + SearchOrderVariantQueryVariables +>(SearchOrderVariantDocument); diff --git a/src/searches/usePageSearch.ts b/src/searches/usePageSearch.ts index d095744c4..76801dba5 100644 --- a/src/searches/usePageSearch.ts +++ b/src/searches/usePageSearch.ts @@ -1,11 +1,12 @@ import { gql } from "@apollo/client"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; +import { + SearchPagesDocument, + SearchPagesQuery, + SearchPagesQueryVariables +} from "@saleor/graphql"; import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; -import { SearchPages, SearchPagesVariables } from "./types/SearchPages"; - export const searchPages = gql` - ${pageInfoFragment} query SearchPages($after: String, $first: Int!, $query: String!) { search: pages(after: $after, first: $first, filter: { search: $query }) { edges { @@ -15,12 +16,12 @@ export const searchPages = gql` } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export default makeTopLevelSearch( - searchPages +export default makeTopLevelSearch( + SearchPagesDocument ); diff --git a/src/searches/usePageTypeSearch.ts b/src/searches/usePageTypeSearch.ts index fa0eaf2d7..f6ea375ff 100644 --- a/src/searches/usePageTypeSearch.ts +++ b/src/searches/usePageTypeSearch.ts @@ -1,14 +1,12 @@ import { gql } from "@apollo/client"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; +import { + SearchPageTypesDocument, + SearchPageTypesQuery, + SearchPageTypesQueryVariables +} from "@saleor/graphql"; import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; -import { - SearchPageTypes, - SearchPageTypesVariables -} from "./types/SearchPageTypes"; - export const searchPageTypes = gql` - ${pageInfoFragment} query SearchPageTypes($after: String, $first: Int!, $query: String!) { search: pageTypes( after: $after @@ -22,12 +20,13 @@ export const searchPageTypes = gql` } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export default makeTopLevelSearch( - searchPageTypes -); +export default makeTopLevelSearch< + SearchPageTypesQuery, + SearchPageTypesQueryVariables +>(SearchPageTypesDocument); diff --git a/src/searches/usePermissionGroupSearch.ts b/src/searches/usePermissionGroupSearch.ts index 8e5dfa8fd..ffb2bdd7f 100644 --- a/src/searches/usePermissionGroupSearch.ts +++ b/src/searches/usePermissionGroupSearch.ts @@ -1,14 +1,12 @@ import { gql } from "@apollo/client"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; +import { + SearchPermissionGroupsDocument, + SearchPermissionGroupsQuery, + SearchPermissionGroupsQueryVariables +} from "@saleor/graphql"; import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; -import { - SearchPermissionGroups, - SearchPermissionGroupsVariables -} from "./types/SearchPermissionGroups"; - export const searchPermissionGroups = gql` - ${pageInfoFragment} query SearchPermissionGroups($after: String, $first: Int!, $query: String!) { search: permissionGroups( after: $after @@ -23,13 +21,13 @@ export const searchPermissionGroups = gql` } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; export default makeTopLevelSearch< - SearchPermissionGroups, - SearchPermissionGroupsVariables ->(searchPermissionGroups); + SearchPermissionGroupsQuery, + SearchPermissionGroupsQueryVariables +>(SearchPermissionGroupsDocument); diff --git a/src/searches/useProductSearch.ts b/src/searches/useProductSearch.ts index 6fad9bff2..2753005c1 100644 --- a/src/searches/useProductSearch.ts +++ b/src/searches/useProductSearch.ts @@ -1,14 +1,12 @@ import { gql } from "@apollo/client"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; +import { + SearchProductsDocument, + SearchProductsQuery, + SearchProductsQueryVariables +} from "@saleor/graphql"; import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; -import { - SearchProducts, - SearchProductsVariables -} from "./types/SearchProducts"; - export const searchProducts = gql` - ${pageInfoFragment} query SearchProducts($after: String, $first: Int!, $query: String!) { search: products(after: $after, first: $first, filter: { search: $query }) { edges { @@ -38,12 +36,13 @@ export const searchProducts = gql` } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export default makeTopLevelSearch( - searchProducts -); +export default makeTopLevelSearch< + SearchProductsQuery, + SearchProductsQueryVariables +>(SearchProductsDocument); diff --git a/src/searches/useProductTypeSearch.ts b/src/searches/useProductTypeSearch.ts index a2f4bcca2..b82f74392 100644 --- a/src/searches/useProductTypeSearch.ts +++ b/src/searches/useProductTypeSearch.ts @@ -1,14 +1,12 @@ import { gql } from "@apollo/client"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; +import { + SearchProductTypesDocument, + SearchProductTypesQuery, + SearchProductTypesQueryVariables +} from "@saleor/graphql"; import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; -import { - SearchProductTypes, - SearchProductTypesVariables -} from "./types/SearchProductTypes"; - export const searchProductTypes = gql` - ${pageInfoFragment} query SearchProductTypes($after: String, $first: Int!, $query: String!) { search: productTypes( after: $after @@ -22,13 +20,13 @@ export const searchProductTypes = gql` } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; export default makeTopLevelSearch< - SearchProductTypes, - SearchProductTypesVariables ->(searchProductTypes); + SearchProductTypesQuery, + SearchProductTypesQueryVariables +>(SearchProductTypesDocument); diff --git a/src/searches/useShippingZonesSearch.ts b/src/searches/useShippingZonesSearch.ts index a97478bcd..b9cc7bae8 100644 --- a/src/searches/useShippingZonesSearch.ts +++ b/src/searches/useShippingZonesSearch.ts @@ -1,14 +1,12 @@ import { gql } from "@apollo/client"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; +import { + SearchShippingZonesDocument, + SearchShippingZonesQuery, + SearchShippingZonesQueryVariables +} from "@saleor/graphql"; import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; -import { - SearchShippingZones, - SearchShippingZonesVariables -} from "./types/SearchShippingZones"; - -const searchShippingZones = gql` - ${pageInfoFragment} +export const searchShippingZones = gql` query SearchShippingZones( $query: String! $first: Int! @@ -31,13 +29,13 @@ const searchShippingZones = gql` } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; export default makeTopLevelSearch< - SearchShippingZones, - SearchShippingZonesVariables ->(searchShippingZones); + SearchShippingZonesQuery, + SearchShippingZonesQueryVariables +>(SearchShippingZonesDocument); diff --git a/src/searches/useStaffMemberSearch.ts b/src/searches/useStaffMemberSearch.ts index 04666061d..fac173733 100644 --- a/src/searches/useStaffMemberSearch.ts +++ b/src/searches/useStaffMemberSearch.ts @@ -1,14 +1,12 @@ import { gql } from "@apollo/client"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; +import { + SearchStaffMembersDocument, + SearchStaffMembersQuery, + SearchStaffMembersQueryVariables +} from "@saleor/graphql"; import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; -import { - SearchStaffMembers, - SearchStaffMembersVariables -} from "./types/SearchStaffMembers"; - export const searchStaffMembers = gql` - ${pageInfoFragment} query SearchStaffMembers($after: String, $first: Int!, $query: String!) { search: staffUsers( after: $after @@ -29,13 +27,13 @@ export const searchStaffMembers = gql` } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; export default makeTopLevelSearch< - SearchStaffMembers, - SearchStaffMembersVariables ->(searchStaffMembers); + SearchStaffMembersQuery, + SearchStaffMembersQueryVariables +>(SearchStaffMembersDocument); diff --git a/src/searches/useWarehouseSearch.ts b/src/searches/useWarehouseSearch.ts index d7b5d8381..90ee47c22 100644 --- a/src/searches/useWarehouseSearch.ts +++ b/src/searches/useWarehouseSearch.ts @@ -1,14 +1,12 @@ import { gql } from "@apollo/client"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; +import { + SearchWarehousesDocument, + SearchWarehousesQuery, + SearchWarehousesQueryVariables +} from "@saleor/graphql"; import makeTopLevelSearch from "@saleor/hooks/makeTopLevelSearch"; -import { - SearchWarehouses, - SearchWarehousesVariables -} from "./types/SearchWarehouses"; - export const searchWarehouses = gql` - ${pageInfoFragment} query SearchWarehouses($after: String, $first: Int!, $query: String!) { search: warehouses( after: $after @@ -22,12 +20,13 @@ export const searchWarehouses = gql` } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export default makeTopLevelSearch( - searchWarehouses -); +export default makeTopLevelSearch< + SearchWarehousesQuery, + SearchWarehousesQueryVariables +>(SearchWarehousesDocument); diff --git a/src/shipping/components/OrderValue/OrderValue.tsx b/src/shipping/components/OrderValue/OrderValue.tsx index adaba7cbf..d6452e161 100644 --- a/src/shipping/components/OrderValue/OrderValue.tsx +++ b/src/shipping/components/OrderValue/OrderValue.tsx @@ -12,7 +12,7 @@ import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import PriceField from "@saleor/components/PriceField"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import TableHead from "@saleor/components/TableHead"; -import { ShippingChannelsErrorFragment } from "@saleor/fragments/types/ShippingChannelsErrorFragment"; +import { ShippingChannelsErrorFragment } from "@saleor/graphql"; import { ChangeEvent } from "@saleor/hooks/useForm"; import { getFormChannelError, diff --git a/src/shipping/components/OrderWeight/OrderWeight.stories.tsx b/src/shipping/components/OrderWeight/OrderWeight.stories.tsx index 79cfd6442..5b12bb077 100644 --- a/src/shipping/components/OrderWeight/OrderWeight.stories.tsx +++ b/src/shipping/components/OrderWeight/OrderWeight.stories.tsx @@ -1,5 +1,5 @@ +import { ShippingErrorCode } from "@saleor/graphql"; import Decorator from "@saleor/storybook//Decorator"; -import { ShippingErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/shipping/components/OrderWeight/OrderWeight.tsx b/src/shipping/components/OrderWeight/OrderWeight.tsx index 4d90c6cb7..c96130b33 100644 --- a/src/shipping/components/OrderWeight/OrderWeight.tsx +++ b/src/shipping/components/OrderWeight/OrderWeight.tsx @@ -8,7 +8,7 @@ import { import VerticalSpacer from "@saleor/apps/components/VerticalSpacer"; import CardTitle from "@saleor/components/CardTitle"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; -import { ShippingErrorFragment } from "@saleor/fragments/types/ShippingErrorFragment"; +import { ShippingErrorFragment } from "@saleor/graphql"; import { ChangeEvent } from "@saleor/hooks/useForm"; import useShop from "@saleor/hooks/useShop"; import { getShippingWeightRateErrorMessage } from "@saleor/shipping/errors"; diff --git a/src/shipping/components/PricingCard/PricingCard.tsx b/src/shipping/components/PricingCard/PricingCard.tsx index 962cec3db..bf79cad26 100644 --- a/src/shipping/components/PricingCard/PricingCard.tsx +++ b/src/shipping/components/PricingCard/PricingCard.tsx @@ -11,7 +11,7 @@ import CardTitle from "@saleor/components/CardTitle"; import PriceField from "@saleor/components/PriceField"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import TableHead from "@saleor/components/TableHead"; -import { ShippingChannelsErrorFragment } from "@saleor/fragments/types/ShippingChannelsErrorFragment"; +import { ShippingChannelsErrorFragment } from "@saleor/graphql"; import { getFormChannelError, getFormChannelErrors diff --git a/src/shipping/components/ShippingMethodProducts/ShippingMethodProducts.tsx b/src/shipping/components/ShippingMethodProducts/ShippingMethodProducts.tsx index 8038af456..bdf487524 100644 --- a/src/shipping/components/ShippingMethodProducts/ShippingMethodProducts.tsx +++ b/src/shipping/components/ShippingMethodProducts/ShippingMethodProducts.tsx @@ -13,10 +13,10 @@ import Skeleton from "@saleor/components/Skeleton"; import TableCellAvatar from "@saleor/components/TableCellAvatar"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; +import { ShippingZoneQuery } from "@saleor/graphql"; import { Button, DeleteIcon, IconButton, makeStyles } from "@saleor/macaw-ui"; import { renderCollection } from "@saleor/misc"; -import { ShippingZone_shippingZone_shippingMethods_excludedProducts_edges_node } from "@saleor/shipping/types/ShippingZone"; -import { ListActions, ListProps } from "@saleor/types"; +import { ListActions, ListProps, RelayToFlat } from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -45,7 +45,9 @@ const useStyles = makeStyles( export interface ShippingMethodProductsProps extends Pick>, ListActions { - products: ShippingZone_shippingZone_shippingMethods_excludedProducts_edges_node[]; + products: RelayToFlat< + ShippingZoneQuery["shippingZone"]["shippingMethods"][0]["excludedProducts"] + >; onProductAssign: () => void; onProductUnassign: (ids: string[]) => void; } diff --git a/src/shipping/components/ShippingMethodProductsAddDialog/ShippingMethodProductsAddDialog.tsx b/src/shipping/components/ShippingMethodProductsAddDialog/ShippingMethodProductsAddDialog.tsx index cb4238765..b9a1b600a 100644 --- a/src/shipping/components/ShippingMethodProductsAddDialog/ShippingMethodProductsAddDialog.tsx +++ b/src/shipping/components/ShippingMethodProductsAddDialog/ShippingMethodProductsAddDialog.tsx @@ -16,13 +16,15 @@ import ConfirmButton from "@saleor/components/ConfirmButton"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import TableCellAvatar from "@saleor/components/TableCellAvatar"; +import { + SearchProductsQuery, + ShippingPriceExcludeProductMutation +} from "@saleor/graphql"; import useSearchQuery from "@saleor/hooks/useSearchQuery"; import { buttonMessages } from "@saleor/intl"; import { ConfirmButtonTransitionState, makeStyles } from "@saleor/macaw-ui"; import { renderCollection } from "@saleor/misc"; -import { SearchProducts_search_edges_node } from "@saleor/searches/types/SearchProducts"; -import { ShippingPriceExcludeProduct } from "@saleor/shipping/types/ShippingPriceExcludeProduct"; -import { FetchMoreProps } from "@saleor/types"; +import { FetchMoreProps, RelayToFlat } from "@saleor/types"; import React from "react"; import InfiniteScroll from "react-infinite-scroll-component"; import { FormattedMessage, useIntl } from "react-intl"; @@ -66,19 +68,21 @@ const useStyles = makeStyles( export interface ShippingMethodProductsAddDialogProps extends FetchMoreProps { confirmButtonState: ConfirmButtonTransitionState; open: boolean; - products: SearchProducts_search_edges_node[]; + products: RelayToFlat; onClose: () => void; onFetch: (query: string) => void; onSubmit: ( ids: string[] - ) => Promise>; + ) => Promise>; } const handleProductAssign = ( - product: SearchProducts_search_edges_node, + product: RelayToFlat[0], isSelected: boolean, - selectedProducts: SearchProducts_search_edges_node[], - setSelectedProducts: (data: SearchProducts_search_edges_node[]) => void + selectedProducts: RelayToFlat, + setSelectedProducts: ( + data: RelayToFlat + ) => void ) => { if (isSelected) { setSelectedProducts( @@ -110,7 +114,7 @@ const ShippingMethodProductsAddDialog: React.FC >([]); const handleSubmit = () => { diff --git a/src/shipping/components/ShippingRateInfo/ShippingRateInfo.tsx b/src/shipping/components/ShippingRateInfo/ShippingRateInfo.tsx index 50d3cd2a1..5582bd23a 100644 --- a/src/shipping/components/ShippingRateInfo/ShippingRateInfo.tsx +++ b/src/shipping/components/ShippingRateInfo/ShippingRateInfo.tsx @@ -5,7 +5,7 @@ import CardTitle from "@saleor/components/CardTitle"; import RichTextEditor, { RichTextEditorChange } from "@saleor/components/RichTextEditor"; -import { ShippingErrorFragment } from "@saleor/fragments/types/ShippingErrorFragment"; +import { ShippingErrorFragment } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { makeStyles } from "@saleor/macaw-ui"; import { getFormErrors } from "@saleor/utils/errors"; diff --git a/src/shipping/components/ShippingWeightUnitForm/ShippingWeightUnitForm.tsx b/src/shipping/components/ShippingWeightUnitForm/ShippingWeightUnitForm.tsx index 27fb08b76..43dfa9173 100644 --- a/src/shipping/components/ShippingWeightUnitForm/ShippingWeightUnitForm.tsx +++ b/src/shipping/components/ShippingWeightUnitForm/ShippingWeightUnitForm.tsx @@ -2,14 +2,13 @@ import { Card, CardActions, CardContent } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import Form from "@saleor/components/Form"; import SingleSelectField from "@saleor/components/SingleSelectField"; +import { WeightUnitsEnum } from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { buttonMessages, sectionNames } from "@saleor/intl"; import { Button } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { WeightUnitsEnum } from "../../../types/globalTypes"; - export interface FormData { unit: WeightUnitsEnum; } diff --git a/src/shipping/components/ShippingZoneAddWarehouseDialog/ShippingZoneAddWarehouseDialog.tsx b/src/shipping/components/ShippingZoneAddWarehouseDialog/ShippingZoneAddWarehouseDialog.tsx index 68c747ea0..c9a57d9e1 100644 --- a/src/shipping/components/ShippingZoneAddWarehouseDialog/ShippingZoneAddWarehouseDialog.tsx +++ b/src/shipping/components/ShippingZoneAddWarehouseDialog/ShippingZoneAddWarehouseDialog.tsx @@ -11,9 +11,11 @@ import ConfirmButton from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; import Hr from "@saleor/components/Hr"; -import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo"; import { AddressTypeInput } from "@saleor/customers/types"; -import { WarehouseErrorFragment } from "@saleor/fragments/types/WarehouseErrorFragment"; +import { + CountryWithCodeFragment, + WarehouseErrorFragment +} from "@saleor/graphql"; import useAddressValidation from "@saleor/hooks/useAddressValidation"; import { SubmitPromise } from "@saleor/hooks/useForm"; import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; @@ -33,7 +35,7 @@ export interface ShippingZoneAddWarehouseDialogSubmitData } export interface ShippingZoneAddWarehouseDialogProps extends DialogProps { confirmButtonState: ConfirmButtonTransitionState; - countries: ShopInfo_shop_countries[]; + countries: CountryWithCodeFragment[]; disabled: boolean; errors: WarehouseErrorFragment[]; onSubmit: (data: ShippingZoneAddWarehouseDialogSubmitData) => SubmitPromise; diff --git a/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.tsx b/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.tsx index 579b6986f..c8c0be231 100644 --- a/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.tsx +++ b/src/shipping/components/ShippingZoneCountriesAssignDialog/ShippingZoneCountriesAssignDialog.tsx @@ -16,7 +16,7 @@ import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; import Hr from "@saleor/components/Hr"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; -import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo"; +import { CountryWithCodeFragment } from "@saleor/graphql"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { getCountrySelectionMap, @@ -41,7 +41,7 @@ interface FormData { export interface ShippingZoneCountriesAssignDialogProps { confirmButtonState: ConfirmButtonTransitionState; - countries: ShopInfo_shop_countries[]; + countries: CountryWithCodeFragment[]; restWorldCountries: string[]; initial: string[]; open: boolean; diff --git a/src/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.tsx b/src/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.tsx index 2e258edc3..303fd1f54 100644 --- a/src/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.tsx +++ b/src/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.tsx @@ -5,12 +5,10 @@ import Form from "@saleor/components/Form"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; -import { CountryFragment } from "@saleor/fragments/types/CountryFragment"; -import { ShippingErrorFragment } from "@saleor/fragments/types/ShippingErrorFragment"; +import { CountryFragment, ShippingErrorFragment } from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; diff --git a/src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.tsx b/src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.tsx index 0d9cd498d..ed4d55d59 100644 --- a/src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.tsx +++ b/src/shipping/components/ShippingZoneDetailsPage/ShippingZoneDetailsPage.tsx @@ -1,4 +1,3 @@ -import { BaseChannels_channels } from "@saleor/channels/types/BaseChannels"; import CardSpacer from "@saleor/components/CardSpacer"; import Container from "@saleor/components/Container"; import CountryList from "@saleor/components/CountryList"; @@ -9,13 +8,16 @@ import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocomplet import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; -import { ShippingErrorFragment } from "@saleor/fragments/types/ShippingErrorFragment"; -import { ShippingZoneDetailsFragment_warehouses } from "@saleor/fragments/types/ShippingZoneDetailsFragment"; +import { + ChannelFragment, + ShippingErrorFragment, + ShippingMethodTypeEnum, + ShippingZoneDetailsFragment, + ShippingZoneQuery +} from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; -import { ShippingZone_shippingZone } from "@saleor/shipping/types/ShippingZone"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import createMultiAutocompleteSelectHandler from "@saleor/utils/handlers/multiAutocompleteSelectChangeHandler"; import { mapNodeToChoice } from "@saleor/utils/maps"; import useMetadataChangeTrigger from "@saleor/utils/metadata/useMetadataChangeTrigger"; @@ -24,7 +26,6 @@ import { defineMessages, FormattedMessage, useIntl } from "react-intl"; import { getStringOrPlaceholder } from "../../../misc"; import { ChannelProps, FetchMoreProps, SearchProps } from "../../../types"; -import { ShippingMethodTypeEnum } from "../../../types/globalTypes"; import { ShippingZoneUpdateFormData } from "../../components/ShippingZoneDetailsPage/types"; import ShippingZoneInfo from "../ShippingZoneInfo"; import ShippingZoneRates from "../ShippingZoneRates"; @@ -53,8 +54,8 @@ export interface ShippingZoneDetailsPageProps disabled: boolean; errors: ShippingErrorFragment[]; saveButtonBarState: ConfirmButtonTransitionState; - shippingZone: ShippingZone_shippingZone; - warehouses: ShippingZoneDetailsFragment_warehouses[]; + shippingZone: ShippingZoneQuery["shippingZone"]; + warehouses: ShippingZoneDetailsFragment["warehouses"]; onBack: () => void; onCountryAdd: () => void; onCountryRemove: (code: string) => void; @@ -66,7 +67,7 @@ export interface ShippingZoneDetailsPageProps onWarehouseAdd: () => void; onWeightRateAdd: () => void; onWeightRateEdit: (id: string) => void; - allChannels?: BaseChannels_channels[]; + allChannels?: ChannelFragment[]; } function warehouseToChoice( diff --git a/src/shipping/components/ShippingZoneDetailsPage/utils.ts b/src/shipping/components/ShippingZoneDetailsPage/utils.ts index 0eb830f0c..d7743a2ed 100644 --- a/src/shipping/components/ShippingZoneDetailsPage/utils.ts +++ b/src/shipping/components/ShippingZoneDetailsPage/utils.ts @@ -1,10 +1,10 @@ -import { ShippingZone_shippingZone } from "@saleor/shipping/types/ShippingZone"; +import { ShippingZoneQuery } from "@saleor/graphql"; import { mapMetadataItemToInput } from "@saleor/utils/maps"; import { ShippingZoneUpdateFormData } from "./types"; export const getInitialFormData = ( - shippingZone?: ShippingZone_shippingZone + shippingZone?: ShippingZoneQuery["shippingZone"] ): ShippingZoneUpdateFormData => ({ description: shippingZone?.description || "", metadata: shippingZone?.metadata.map(mapMetadataItemToInput), diff --git a/src/shipping/components/ShippingZoneInfo/ShippingZoneInfo.tsx b/src/shipping/components/ShippingZoneInfo/ShippingZoneInfo.tsx index 90f80acb2..ccbfe933b 100644 --- a/src/shipping/components/ShippingZoneInfo/ShippingZoneInfo.tsx +++ b/src/shipping/components/ShippingZoneInfo/ShippingZoneInfo.tsx @@ -1,7 +1,7 @@ import { Card, CardContent, TextField } from "@material-ui/core"; import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; -import { ShippingErrorFragment } from "@saleor/fragments/types/ShippingErrorFragment"; +import { ShippingErrorFragment } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { makeStyles } from "@saleor/macaw-ui"; import { getFormErrors } from "@saleor/utils/errors"; diff --git a/src/shipping/components/ShippingZonePostalCodes/ShippingZonePostalCodes.tsx b/src/shipping/components/ShippingZonePostalCodes/ShippingZonePostalCodes.tsx index 9aa2db30e..c707ecf37 100644 --- a/src/shipping/components/ShippingZonePostalCodes/ShippingZonePostalCodes.tsx +++ b/src/shipping/components/ShippingZonePostalCodes/ShippingZonePostalCodes.tsx @@ -11,11 +11,13 @@ import CardTitle from "@saleor/components/CardTitle"; import RadioGroupField from "@saleor/components/RadioGroupField"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; -import { ShippingMethodTypeFragment_postalCodeRules } from "@saleor/fragments/types/ShippingMethodTypeFragment"; +import { + PostalCodeRuleInclusionTypeEnum, + ShippingMethodTypeFragment +} from "@saleor/graphql"; import ArrowDropdown from "@saleor/icons/ArrowDropdown"; import { Button, DeleteIcon, IconButton, makeStyles } from "@saleor/macaw-ui"; import { renderCollection } from "@saleor/misc"; -import { PostalCodeRuleInclusionTypeEnum } from "@saleor/types/globalTypes"; import classNames from "classnames"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -23,12 +25,12 @@ import { FormattedMessage, useIntl } from "react-intl"; export interface ShippingZonePostalCodesProps { disabled: boolean; initialExpanded?: boolean; - postalCodes: ShippingMethodTypeFragment_postalCodeRules[] | undefined; + postalCodes: ShippingMethodTypeFragment["postalCodeRules"] | undefined; onPostalCodeInclusionChange: ( inclusion: PostalCodeRuleInclusionTypeEnum ) => void; onPostalCodeDelete: ( - code: ShippingMethodTypeFragment_postalCodeRules + code: ShippingMethodTypeFragment["postalCodeRules"][0] ) => void; onPostalCodeRangeAdd: () => void; } @@ -90,7 +92,7 @@ const ShippingZonePostalCodes: React.FC = ({ }; const getPostalCodeRangeLabel = ( - postalCodeRange: ShippingMethodTypeFragment_postalCodeRules + postalCodeRange: ShippingMethodTypeFragment["postalCodeRules"][0] ) => { if (!postalCodeRange?.start) { return ; diff --git a/src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx b/src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx index b0148e16a..e48d67ced 100644 --- a/src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx +++ b/src/shipping/components/ShippingZoneRates/ShippingZoneRates.tsx @@ -13,9 +13,13 @@ import MoneyRange from "@saleor/components/MoneyRange"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import WeightRange from "@saleor/components/WeightRange"; -import { ShippingZoneDetailsFragment_shippingMethods } from "@saleor/fragments/types/ShippingZoneDetailsFragment"; -import { Button, DeleteIcon, makeStyles } from "@saleor/macaw-ui"; -import { ICONBUTTON_SIZE } from "@saleor/macaw-ui"; +import { ShippingZoneDetailsFragment } from "@saleor/graphql"; +import { + Button, + DeleteIcon, + ICONBUTTON_SIZE, + makeStyles +} from "@saleor/macaw-ui"; import { ChannelProps } from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -24,7 +28,7 @@ import { maybe, renderCollection } from "../../../misc"; export interface ShippingZoneRatesProps extends ChannelProps { disabled: boolean; - rates: ShippingZoneDetailsFragment_shippingMethods[]; + rates: ShippingZoneDetailsFragment["shippingMethods"]; variant: "price" | "weight"; testId?: string; onRateAdd: () => void; diff --git a/src/shipping/components/ShippingZoneRatesCreatePage/ShippingZoneRatesCreatePage.stories.tsx b/src/shipping/components/ShippingZoneRatesCreatePage/ShippingZoneRatesCreatePage.stories.tsx index b012fee2b..edeb0a2ff 100644 --- a/src/shipping/components/ShippingZoneRatesCreatePage/ShippingZoneRatesCreatePage.stories.tsx +++ b/src/shipping/components/ShippingZoneRatesCreatePage/ShippingZoneRatesCreatePage.stories.tsx @@ -1,8 +1,8 @@ -import Decorator from "@saleor/storybook//Decorator"; import { PostalCodeRuleInclusionTypeEnum, ShippingMethodTypeEnum -} from "@saleor/types/globalTypes"; +} from "@saleor/graphql"; +import Decorator from "@saleor/storybook//Decorator"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/shipping/components/ShippingZoneRatesCreatePage/ShippingZoneRatesCreatePage.tsx b/src/shipping/components/ShippingZoneRatesCreatePage/ShippingZoneRatesCreatePage.tsx index ffc823d89..c9aaeeed4 100644 --- a/src/shipping/components/ShippingZoneRatesCreatePage/ShippingZoneRatesCreatePage.tsx +++ b/src/shipping/components/ShippingZoneRatesCreatePage/ShippingZoneRatesCreatePage.tsx @@ -8,23 +8,22 @@ import { WithFormId } from "@saleor/components/Form/ExitFormDialogProvider"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; -import { ShippingChannelsErrorFragment } from "@saleor/fragments/types/ShippingChannelsErrorFragment"; -import { ShippingErrorFragment } from "@saleor/fragments/types/ShippingErrorFragment"; -import { ShippingMethodTypeFragment_postalCodeRules } from "@saleor/fragments/types/ShippingMethodTypeFragment"; +import { + PermissionEnum, + PostalCodeRuleInclusionTypeEnum, + ShippingChannelsErrorFragment, + ShippingErrorFragment, + ShippingMethodTypeEnum, + ShippingMethodTypeFragment +} from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { validatePrice } from "@saleor/products/utils/validation"; import OrderValue from "@saleor/shipping/components/OrderValue"; import OrderWeight from "@saleor/shipping/components/OrderWeight"; import PricingCard from "@saleor/shipping/components/PricingCard"; import ShippingRateInfo from "@saleor/shipping/components/ShippingRateInfo"; import { createChannelsChangeHandler } from "@saleor/shipping/handlers"; -import { - PermissionEnum, - PostalCodeRuleInclusionTypeEnum, - ShippingMethodTypeEnum -} from "@saleor/types/globalTypes"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -36,7 +35,7 @@ export interface ShippingZoneRatesCreatePageProps extends WithFormId { shippingChannels: ChannelShippingData[]; disabled: boolean; hasChannelChanged?: boolean; - postalCodes?: ShippingMethodTypeFragment_postalCodeRules[]; + postalCodes?: ShippingMethodTypeFragment["postalCodeRules"]; channelErrors: ShippingChannelsErrorFragment[]; errors: ShippingErrorFragment[]; saveButtonBarState: ConfirmButtonTransitionState; diff --git a/src/shipping/components/ShippingZoneRatesPage/ShippingZoneRatesPage.stories.tsx b/src/shipping/components/ShippingZoneRatesPage/ShippingZoneRatesPage.stories.tsx index 345eec5d5..ece8114b8 100644 --- a/src/shipping/components/ShippingZoneRatesPage/ShippingZoneRatesPage.stories.tsx +++ b/src/shipping/components/ShippingZoneRatesPage/ShippingZoneRatesPage.stories.tsx @@ -1,6 +1,6 @@ +import { ShippingMethodTypeEnum } from "@saleor/graphql"; import { shippingZone } from "@saleor/shipping/fixtures"; import Decorator from "@saleor/storybook//Decorator"; -import { ShippingMethodTypeEnum } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/shipping/components/ShippingZoneRatesPage/ShippingZoneRatesPage.tsx b/src/shipping/components/ShippingZoneRatesPage/ShippingZoneRatesPage.tsx index ffb426648..42de4f5fa 100644 --- a/src/shipping/components/ShippingZoneRatesPage/ShippingZoneRatesPage.tsx +++ b/src/shipping/components/ShippingZoneRatesPage/ShippingZoneRatesPage.tsx @@ -9,12 +9,17 @@ import Grid from "@saleor/components/Grid"; import Metadata from "@saleor/components/Metadata/Metadata"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; -import { ShippingChannelsErrorFragment } from "@saleor/fragments/types/ShippingChannelsErrorFragment"; -import { ShippingErrorFragment } from "@saleor/fragments/types/ShippingErrorFragment"; -import { ShippingMethodTypeFragment_postalCodeRules } from "@saleor/fragments/types/ShippingMethodTypeFragment"; +import { + PermissionEnum, + PostalCodeRuleInclusionTypeEnum, + ShippingChannelsErrorFragment, + ShippingErrorFragment, + ShippingMethodTypeEnum, + ShippingMethodTypeFragment, + ShippingZoneQuery +} from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { validatePrice } from "@saleor/products/utils/validation"; import OrderValue from "@saleor/shipping/components/OrderValue"; import OrderWeight from "@saleor/shipping/components/OrderWeight"; @@ -22,16 +27,7 @@ import PricingCard from "@saleor/shipping/components/PricingCard"; import ShippingMethodProducts from "@saleor/shipping/components/ShippingMethodProducts"; import ShippingRateInfo from "@saleor/shipping/components/ShippingRateInfo"; import { createChannelsChangeHandler } from "@saleor/shipping/handlers"; -import { - ShippingZone_shippingZone_shippingMethods, - ShippingZone_shippingZone_shippingMethods_postalCodeRules -} from "@saleor/shipping/types/ShippingZone"; import { ListActions, ListProps } from "@saleor/types"; -import { - PermissionEnum, - PostalCodeRuleInclusionTypeEnum, - ShippingMethodTypeEnum -} from "@saleor/types/globalTypes"; import { mapEdgesToItems, mapMetadataItemToInput } from "@saleor/utils/maps"; import useMetadataChangeTrigger from "@saleor/utils/metadata/useMetadataChangeTrigger"; import React from "react"; @@ -49,11 +45,11 @@ export interface ShippingZoneRatesPageProps disabled: boolean; hasChannelChanged?: boolean; havePostalCodesChanged?: boolean; - rate: ShippingZone_shippingZone_shippingMethods; + rate: ShippingZoneQuery["shippingZone"]["shippingMethods"][0]; channelErrors: ShippingChannelsErrorFragment[]; errors: ShippingErrorFragment[]; saveButtonBarState: ConfirmButtonTransitionState; - postalCodeRules: ShippingZone_shippingZone_shippingMethods_postalCodeRules[]; + postalCodeRules: ShippingZoneQuery["shippingZone"]["shippingMethods"][0]["postalCodeRules"]; onBack: () => void; onDelete?: () => void; onSubmit: (data: ShippingZoneRateUpdateFormData) => SubmitPromise; @@ -62,7 +58,7 @@ export interface ShippingZoneRatesPageProps ) => void; onPostalCodeAssign: () => void; onPostalCodeUnassign: ( - code: ShippingMethodTypeFragment_postalCodeRules + code: ShippingMethodTypeFragment["postalCodeRules"][0] ) => void; onChannelsChange: (data: ChannelShippingData[]) => void; openChannelsModal: () => void; diff --git a/src/shipping/components/ShippingZoneRatesPage/types.ts b/src/shipping/components/ShippingZoneRatesPage/types.ts index 8e032f39e..4682566ba 100644 --- a/src/shipping/components/ShippingZoneRatesPage/types.ts +++ b/src/shipping/components/ShippingZoneRatesPage/types.ts @@ -1,7 +1,7 @@ import { OutputData } from "@editorjs/editorjs"; import { ChannelShippingData } from "@saleor/channels/utils"; import { MetadataFormData } from "@saleor/components/Metadata"; -import { ShippingMethodTypeEnum } from "@saleor/types/globalTypes"; +import { ShippingMethodTypeEnum } from "@saleor/graphql"; export interface ShippingZoneRateCommonFormData { channelListings: ChannelShippingData[]; diff --git a/src/shipping/components/ShippingZoneSettingsCard/ChannelsSection.tsx b/src/shipping/components/ShippingZoneSettingsCard/ChannelsSection.tsx index bafee7b71..6e2c15593 100644 --- a/src/shipping/components/ShippingZoneSettingsCard/ChannelsSection.tsx +++ b/src/shipping/components/ShippingZoneSettingsCard/ChannelsSection.tsx @@ -1,14 +1,13 @@ -import { BaseChannels_channels } from "@saleor/channels/types/BaseChannels"; import CardSpacer from "@saleor/components/CardSpacer"; import MultiAutocompleteSelectField, { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; +import { ChannelFragment } from "@saleor/graphql"; import { useChannelsSearch } from "@saleor/hooks/useChannelsSearch"; import { FormChange } from "@saleor/hooks/useForm"; import { mapNodeToChoice } from "@saleor/utils/maps"; import React from "react"; -import { useIntl } from "react-intl"; -import { defineMessages, FormattedMessage } from "react-intl"; +import { defineMessages, FormattedMessage, useIntl } from "react-intl"; const messages = defineMessages({ subtitle: { @@ -30,7 +29,7 @@ const messages = defineMessages({ interface ChannelsSectionProps { onChange: FormChange; selectedChannels: string[]; - allChannels?: BaseChannels_channels[]; + allChannels?: ChannelFragment[]; channelsDisplayValues: MultiAutocompleteChoiceType[]; } diff --git a/src/shipping/components/ShippingZoneSettingsCard/ShippingZoneSettingsCard.stories.tsx b/src/shipping/components/ShippingZoneSettingsCard/ShippingZoneSettingsCard.stories.tsx index c531e4910..3efdb06f6 100644 --- a/src/shipping/components/ShippingZoneSettingsCard/ShippingZoneSettingsCard.stories.tsx +++ b/src/shipping/components/ShippingZoneSettingsCard/ShippingZoneSettingsCard.stories.tsx @@ -1,4 +1,4 @@ -import { Channels_channels } from "@saleor/channels/types/Channels"; +import { ChannelDetailsFragment } from "@saleor/graphql"; import CentralPlacementDecorator from "@saleor/storybook/CentralPlacementDecorator"; import CommonDecorator from "@saleor/storybook/Decorator"; import { storiesOf } from "@storybook/react"; @@ -42,10 +42,9 @@ const props: ShippingZoneSettingsCardProps = { ], allChannels: [ { __typename: "Channel", id: "channel1", name: "GBP" }, - { __typename: "Channel", id: "channel2", name: "PLN" }, { __typename: "Channel", id: "channel3", name: "USD" } - ] as Channels_channels[], + ] as ChannelDetailsFragment[], channelsDisplayValues: [ { value: "channel1", diff --git a/src/shipping/components/ShippingZoneSettingsCard/ShippingZoneSettingsCard.tsx b/src/shipping/components/ShippingZoneSettingsCard/ShippingZoneSettingsCard.tsx index 0c69083e0..954423143 100644 --- a/src/shipping/components/ShippingZoneSettingsCard/ShippingZoneSettingsCard.tsx +++ b/src/shipping/components/ShippingZoneSettingsCard/ShippingZoneSettingsCard.tsx @@ -1,7 +1,7 @@ import { Card, CardContent, Divider } from "@material-ui/core"; -import { BaseChannels_channels } from "@saleor/channels/types/BaseChannels"; import CardTitle from "@saleor/components/CardTitle"; import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; +import { ChannelFragment } from "@saleor/graphql"; import { FormChange } from "@saleor/hooks/useForm"; import React from "react"; import { defineMessages, useIntl } from "react-intl"; @@ -28,7 +28,7 @@ export interface ShippingZoneSettingsCardProps { onWarehousesSearchChange: (query: string) => void; channelsDisplayValues: MultiAutocompleteChoiceType[]; onChannelChange: FormChange; - allChannels?: BaseChannels_channels[]; + allChannels?: ChannelFragment[]; loading: boolean; } diff --git a/src/shipping/components/ShippingZoneSettingsCard/WarehousesSection.tsx b/src/shipping/components/ShippingZoneSettingsCard/WarehousesSection.tsx index 8a0df12bf..51fa72870 100644 --- a/src/shipping/components/ShippingZoneSettingsCard/WarehousesSection.tsx +++ b/src/shipping/components/ShippingZoneSettingsCard/WarehousesSection.tsx @@ -5,8 +5,7 @@ import MultiAutocompleteSelectField, { import { FormChange } from "@saleor/hooks/useForm"; import { FetchMoreProps, SearchProps } from "@saleor/types"; import React from "react"; -import { useIntl } from "react-intl"; -import { defineMessages, FormattedMessage } from "react-intl"; +import { defineMessages, FormattedMessage, useIntl } from "react-intl"; const messages = defineMessages({ subtitle: { diff --git a/src/shipping/components/ShippingZonesList/ShippingZonesList.tsx b/src/shipping/components/ShippingZonesList/ShippingZonesList.tsx index 9881afe6c..c4aaf7df0 100644 --- a/src/shipping/components/ShippingZonesList/ShippingZonesList.tsx +++ b/src/shipping/components/ShippingZonesList/ShippingZonesList.tsx @@ -11,7 +11,7 @@ import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import TableHead from "@saleor/components/TableHead"; import TablePagination from "@saleor/components/TablePagination"; -import { ShippingZoneFragment } from "@saleor/fragments/types/ShippingZoneFragment"; +import { ShippingZoneFragment } from "@saleor/graphql"; import { Button, DeleteIcon, IconButton, makeStyles } from "@saleor/macaw-ui"; import { maybe, renderCollection } from "@saleor/misc"; import { ListActions, ListProps } from "@saleor/types"; diff --git a/src/shipping/components/ShippingZonesListPage/ShippingZonesListPage.tsx b/src/shipping/components/ShippingZonesListPage/ShippingZonesListPage.tsx index 1c7128b70..72960eba6 100644 --- a/src/shipping/components/ShippingZonesListPage/ShippingZonesListPage.tsx +++ b/src/shipping/components/ShippingZonesListPage/ShippingZonesListPage.tsx @@ -2,12 +2,15 @@ import Container from "@saleor/components/Container"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import RequirePermissions from "@saleor/components/RequirePermissions"; -import { ShippingZoneFragment } from "@saleor/fragments/types/ShippingZoneFragment"; +import { + PermissionEnum, + ShippingZoneFragment, + WeightUnitsEnum +} from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { sectionNames } from "@saleor/intl"; import { Backlink } from "@saleor/macaw-ui"; import { ListActions, PageListProps, UserPermissionProps } from "@saleor/types"; -import { PermissionEnum, WeightUnitsEnum } from "@saleor/types/globalTypes"; import React from "react"; import { useIntl } from "react-intl"; diff --git a/src/shipping/errors.ts b/src/shipping/errors.ts index 74c590a7e..435196475 100644 --- a/src/shipping/errors.ts +++ b/src/shipping/errors.ts @@ -1,5 +1,4 @@ -import { ShippingErrorFragment } from "@saleor/fragments/types/ShippingErrorFragment"; -import { ShippingErrorCode } from "@saleor/types/globalTypes"; +import { ShippingErrorCode, ShippingErrorFragment } from "@saleor/graphql"; import getShippingErrorMessage from "@saleor/utils/errors/shipping"; import { defineMessages, IntlShape } from "react-intl"; diff --git a/src/shipping/fixtures.ts b/src/shipping/fixtures.ts index 8c95a5399..562f9474c 100644 --- a/src/shipping/fixtures.ts +++ b/src/shipping/fixtures.ts @@ -1,12 +1,12 @@ -import { ShippingZoneFragment } from "@saleor/fragments/types/ShippingZoneFragment"; -import { SearchProducts_search_edges_node } from "@saleor/searches/types/SearchProducts"; -import { ShippingZone_shippingZone } from "@saleor/shipping/types/ShippingZone"; - import { PostalCodeRuleInclusionTypeEnum, + SearchProductsQuery, ShippingMethodTypeEnum, + ShippingZoneFragment, + ShippingZoneQuery, WeightUnitsEnum -} from "../types/globalTypes"; +} from "@saleor/graphql"; +import { RelayToFlat } from "@saleor/types"; export const shippingZones: ShippingZoneFragment[] = [ { @@ -1302,8 +1302,9 @@ export const shippingZones: ShippingZoneFragment[] = [ } ]; -export const shippingZone: ShippingZone_shippingZone = { +export const shippingZone: ShippingZoneQuery["shippingZone"] = { __typename: "ShippingZone", + default: true, channels: [ { __typename: "Channel", id: "channel1", name: "GBP", currencyCode: "GBP" }, @@ -1864,7 +1865,7 @@ export const shippingZone: ShippingZone_shippingZone = { ] }; -export const products: SearchProducts_search_edges_node[] = [ +export const products: RelayToFlat = [ { __typename: "Product", id: "1", diff --git a/src/shipping/handlers.ts b/src/shipping/handlers.ts index 0dfa2f02f..08b979303 100644 --- a/src/shipping/handlers.ts +++ b/src/shipping/handlers.ts @@ -1,28 +1,26 @@ import { ChannelShippingData } from "@saleor/channels/utils"; -import { CountryFragment } from "@saleor/fragments/types/CountryFragment"; -import { ShippingMethodTypeFragment_postalCodeRules } from "@saleor/fragments/types/ShippingMethodTypeFragment"; +import { + CountryFragment, + CreateShippingRateMutationVariables, + PostalCodeRuleInclusionTypeEnum, + ShippingMethodChannelListingUpdateMutationVariables, + ShippingMethodTypeEnum, + ShippingMethodTypeFragment, + ShippingPostalCodeRulesCreateInputRange, + UpdateShippingRateMutationVariables, + useCreateShippingRateMutation, + useDeleteShippingRateMutation, + useShippingMethodChannelListingUpdateMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages } from "@saleor/intl"; import { extractMutationErrors, getMutationState } from "@saleor/misc"; -import { CreateShippingRateVariables } from "@saleor/shipping/types/CreateShippingRate"; -import { ShippingMethodChannelListingUpdateVariables } from "@saleor/shipping/types/ShippingMethodChannelListingUpdate"; -import { UpdateShippingRateVariables } from "@saleor/shipping/types/UpdateShippingRate"; -import { - PostalCodeRuleInclusionTypeEnum, - ShippingMethodTypeEnum, - ShippingPostalCodeRulesCreateInputRange -} from "@saleor/types/globalTypes"; import { getParsedDataForJsonStringField } from "@saleor/utils/richText/misc"; import differenceBy from "lodash/differenceBy"; import { useIntl } from "react-intl"; import { ShippingZoneRateCommonFormData } from "./components/ShippingZoneRatesPage/types"; -import { - useShippingMethodChannelListingUpdate, - useShippingRateCreate, - useShippingRateDelete -} from "./mutations"; import { shippingRateEditUrl } from "./urls"; export const createChannelsChangeHandler = ( @@ -49,7 +47,7 @@ export const createChannelsChangeHandler = ( }; const getPostalCodeRulesToAdd = ( - rules: ShippingMethodTypeFragment_postalCodeRules[] + rules: ShippingMethodTypeFragment["postalCodeRules"] ) => rules .filter(code => !code.id || code.id === "0") @@ -64,9 +62,9 @@ const getPostalCodeRulesToAdd = ( export function getCreateShippingPriceRateVariables( data: ShippingZoneRateCommonFormData, id: string, - addPostalCodeRules: ShippingMethodTypeFragment_postalCodeRules[], + addPostalCodeRules: ShippingMethodTypeFragment["postalCodeRules"], inclusionType: PostalCodeRuleInclusionTypeEnum -): CreateShippingRateVariables { +): CreateShippingRateMutationVariables { const parsedMinDays = parseInt(data.minDays, 10); const parsedMaxDays = parseInt(data.maxDays, 10); const postalCodeRules = getPostalCodeRulesToAdd(addPostalCodeRules); @@ -87,9 +85,9 @@ export function getCreateShippingPriceRateVariables( export function getCreateShippingWeightRateVariables( data: ShippingZoneRateCommonFormData, id: string, - addPostalCodeRules: ShippingMethodTypeFragment_postalCodeRules[], + addPostalCodeRules: ShippingMethodTypeFragment["postalCodeRules"], inclusionType: PostalCodeRuleInclusionTypeEnum -): CreateShippingRateVariables { +): CreateShippingRateMutationVariables { const parsedMinValue = parseFloat(data.minValue); const parsedMaxValue = parseFloat(data.maxValue); const parsedMinDays = parseInt(data.minDays, 10); @@ -116,9 +114,9 @@ export function getUpdateShippingPriceRateVariables( data: ShippingZoneRateCommonFormData, id: string, rateId: string, - addPostalCodeRules: ShippingMethodTypeFragment_postalCodeRules[], + addPostalCodeRules: ShippingMethodTypeFragment["postalCodeRules"], deletePostalCodeRules: string[] -): UpdateShippingRateVariables { +): UpdateShippingRateMutationVariables { const parsedMinDays = parseInt(data.minDays, 10); const parsedMaxDays = parseInt(data.maxDays, 10); const postalCodeRules = getPostalCodeRulesToAdd(addPostalCodeRules); @@ -144,9 +142,9 @@ export function getUpdateShippingWeightRateVariables( data: ShippingZoneRateCommonFormData, id: string, rateId: string, - addPostalCodeRules: ShippingMethodTypeFragment_postalCodeRules[], + addPostalCodeRules: ShippingMethodTypeFragment["postalCodeRules"], deletePostalCodeRules: string[] -): UpdateShippingRateVariables { +): UpdateShippingRateMutationVariables { const parsedMinValue = parseFloat(data.minValue); const parsedMaxValue = parseFloat(data.maxValue); const parsedMinDays = parseInt(data.minDays, 10); @@ -177,7 +175,7 @@ export function getShippingMethodChannelVariables( orderValueRestricted: boolean, formChannels: ChannelShippingData[], prevChannels?: ChannelShippingData[] -): ShippingMethodChannelListingUpdateVariables { +): ShippingMethodChannelListingUpdateMutationVariables { const removeChannels = prevChannels ? differenceBy(prevChannels, formChannels, "id").map(({ id }) => id) : []; @@ -202,7 +200,7 @@ export function getShippingMethodChannelVariables( export function useShippingRateCreator( shippingZoneId: string, type: ShippingMethodTypeEnum, - postalCodes: ShippingMethodTypeFragment_postalCodeRules[], + postalCodes: ShippingMethodTypeFragment["postalCodeRules"], inclusionType: PostalCodeRuleInclusionTypeEnum ) { const intl = useIntl(); @@ -211,12 +209,12 @@ export function useShippingRateCreator( const [ createBaseShippingRate, createBaseShippingRateOpts - ] = useShippingRateCreate({}); + ] = useCreateShippingRateMutation({}); const [ updateShippingMethodChannelListing, updateShippingMethodChannelListingOpts - ] = useShippingMethodChannelListingUpdate({}); - const [deleteShippingRate] = useShippingRateDelete({}); + ] = useShippingMethodChannelListingUpdateMutation({}); + const [deleteShippingRate] = useDeleteShippingRateMutation({}); const getVariables = type === ShippingMethodTypeEnum.PRICE diff --git a/src/shipping/mutations.ts b/src/shipping/mutations.ts index 2d5c3fe46..d577f959e 100644 --- a/src/shipping/mutations.ts +++ b/src/shipping/mutations.ts @@ -1,97 +1,26 @@ import { gql } from "@apollo/client"; -import { - shippingChannelsErrorFragment, - shippingErrorFragment, - shopSettingsUpdateErrorFragment -} from "@saleor/fragments/errors"; -import { - shippingMethodTypeFragment, - shippingZoneDetailsFragment -} from "@saleor/fragments/shipping"; -import { countryFragment } from "@saleor/fragments/taxes"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { - BulkDeleteShippingRate, - BulkDeleteShippingRateVariables -} from "./types/BulkDeleteShippingRate"; -import { - BulkDeleteShippingZone, - BulkDeleteShippingZoneVariables -} from "./types/BulkDeleteShippingZone"; -import { - CreateShippingRate, - CreateShippingRateVariables -} from "./types/CreateShippingRate"; -import { - CreateShippingZone, - CreateShippingZoneVariables -} from "./types/CreateShippingZone"; -import { - DeleteShippingRate, - DeleteShippingRateVariables -} from "./types/DeleteShippingRate"; -import { - DeleteShippingZone, - DeleteShippingZoneVariables -} from "./types/DeleteShippingZone"; -import { - ShippingMethodChannelListingUpdate, - ShippingMethodChannelListingUpdateVariables -} from "./types/ShippingMethodChannelListingUpdate"; -import { - ShippingPriceExcludeProduct, - ShippingPriceExcludeProductVariables -} from "./types/ShippingPriceExcludeProduct"; -import { - ShippingPriceRemoveProductFromExclude, - ShippingPriceRemoveProductFromExcludeVariables -} from "./types/ShippingPriceRemoveProductFromExclude"; -import { - UpdateDefaultWeightUnit, - UpdateDefaultWeightUnitVariables -} from "./types/UpdateDefaultWeightUnit"; -import { - UpdateShippingRate, - UpdateShippingRateVariables -} from "./types/UpdateShippingRate"; -import { - UpdateShippingZone, - UpdateShippingZoneVariables -} from "./types/UpdateShippingZone"; - -const deleteShippingZone = gql` - ${shippingErrorFragment} +export const deleteShippingZone = gql` mutation DeleteShippingZone($id: ID!) { shippingZoneDelete(id: $id) { errors { - ...ShippingErrorFragment + ...ShippingError } } } `; -export const useShippingZoneDelete = makeMutation< - DeleteShippingZone, - DeleteShippingZoneVariables ->(deleteShippingZone); -const bulkDeleteShippingZone = gql` - ${shippingErrorFragment} +export const bulkDeleteShippingZone = gql` mutation BulkDeleteShippingZone($ids: [ID]!) { shippingZoneBulkDelete(ids: $ids) { errors { - ...ShippingErrorFragment + ...ShippingError } } } `; -export const useShippingZoneBulkDelete = makeMutation< - BulkDeleteShippingZone, - BulkDeleteShippingZoneVariables ->(bulkDeleteShippingZone); -const updateDefaultWeightUnit = gql` - ${shopSettingsUpdateErrorFragment} +export const updateDefaultWeightUnit = gql` mutation UpdateDefaultWeightUnit($unit: WeightUnitsEnum) { shopSettingsUpdate(input: { defaultWeightUnit: $unit }) { errors { @@ -103,22 +32,16 @@ const updateDefaultWeightUnit = gql` } } `; -export const useDefaultWeightUnitUpdate = makeMutation< - UpdateDefaultWeightUnit, - UpdateDefaultWeightUnitVariables ->(updateDefaultWeightUnit); -const createShippingZone = gql` - ${countryFragment} - ${shippingErrorFragment} +export const createShippingZone = gql` mutation CreateShippingZone($input: ShippingZoneCreateInput!) { shippingZoneCreate(input: $input) { errors { - ...ShippingErrorFragment + ...ShippingError } shippingZone { countries { - ...CountryFragment + ...Country } id name @@ -126,22 +49,16 @@ const createShippingZone = gql` } } `; -export const useShippingZoneCreate = makeMutation< - CreateShippingZone, - CreateShippingZoneVariables ->(createShippingZone); -const updateShippingZone = gql` - ${countryFragment} - ${shippingErrorFragment} +export const updateShippingZone = gql` mutation UpdateShippingZone($id: ID!, $input: ShippingZoneUpdateInput!) { shippingZoneUpdate(id: $id, input: $input) { errors { - ...ShippingErrorFragment + ...ShippingError } shippingZone { countries { - ...CountryFragment + ...Country } id name @@ -149,141 +66,94 @@ const updateShippingZone = gql` } } `; -export const useShippingZoneUpdate = makeMutation< - UpdateShippingZone, - UpdateShippingZoneVariables ->(updateShippingZone); -const updateShippingRate = gql` - ${shippingErrorFragment} - ${shippingMethodTypeFragment} +export const updateShippingRate = gql` mutation UpdateShippingRate($id: ID!, $input: ShippingPriceInput!) { shippingPriceUpdate(id: $id, input: $input) { errors { - ...ShippingErrorFragment + ...ShippingError } shippingMethod { - ...ShippingMethodTypeFragment + ...ShippingMethodType } } } `; -export const useShippingRateUpdate = makeMutation< - UpdateShippingRate, - UpdateShippingRateVariables ->(updateShippingRate); -const createShippingRate = gql` - ${shippingErrorFragment} - ${shippingMethodTypeFragment} - ${shippingZoneDetailsFragment} +export const createShippingRate = gql` mutation CreateShippingRate($input: ShippingPriceInput!) { shippingPriceCreate(input: $input) { errors { - ...ShippingErrorFragment + ...ShippingError } shippingZone { - ...ShippingZoneDetailsFragment + ...ShippingZoneDetails } shippingMethod { - ...ShippingMethodTypeFragment + ...ShippingMethodType } } } `; -export const useShippingRateCreate = makeMutation< - CreateShippingRate, - CreateShippingRateVariables ->(createShippingRate); -const deleteShippingRate = gql` - ${shippingErrorFragment} - ${shippingZoneDetailsFragment} +export const deleteShippingRate = gql` mutation DeleteShippingRate($id: ID!) { shippingPriceDelete(id: $id) { errors { - ...ShippingErrorFragment + ...ShippingError } shippingZone { - ...ShippingZoneDetailsFragment + ...ShippingZoneDetails } } } `; -export const useShippingRateDelete = makeMutation< - DeleteShippingRate, - DeleteShippingRateVariables ->(deleteShippingRate); -const bulkDeleteShippingRate = gql` - ${shippingErrorFragment} +export const bulkDeleteShippingRate = gql` mutation BulkDeleteShippingRate($ids: [ID]!) { shippingPriceBulkDelete(ids: $ids) { errors { - ...ShippingErrorFragment + ...ShippingError } } } `; -export const useShippingRateBulkDelete = makeMutation< - BulkDeleteShippingRate, - BulkDeleteShippingRateVariables ->(bulkDeleteShippingRate); export const shippingMethodChannelListingUpdate = gql` - ${shippingChannelsErrorFragment} - ${shippingMethodTypeFragment} mutation ShippingMethodChannelListingUpdate( $id: ID! $input: ShippingMethodChannelListingInput! ) { shippingMethodChannelListingUpdate(id: $id, input: $input) { shippingMethod { - ...ShippingMethodTypeFragment + ...ShippingMethodType } errors { - ...ShippingChannelsErrorFragment + ...ShippingChannelsError } } } `; -export const useShippingMethodChannelListingUpdate = makeMutation< - ShippingMethodChannelListingUpdate, - ShippingMethodChannelListingUpdateVariables ->(shippingMethodChannelListingUpdate); - export const shippingPriceExcludeProducts = gql` - ${shippingErrorFragment} mutation ShippingPriceExcludeProduct( $id: ID! $input: ShippingPriceExcludeProductsInput! ) { shippingPriceExcludeProducts(id: $id, input: $input) { errors { - ...ShippingErrorFragment + ...ShippingError } } } `; -export const useShippingPriceExcludeProduct = makeMutation< - ShippingPriceExcludeProduct, - ShippingPriceExcludeProductVariables ->(shippingPriceExcludeProducts); - export const shippingPriceRemoveProductsFromExclude = gql` - ${shippingErrorFragment} mutation ShippingPriceRemoveProductFromExclude($id: ID!, $products: [ID]!) { shippingPriceRemoveProductFromExclude(id: $id, products: $products) { errors { - ...ShippingErrorFragment + ...ShippingError } } } `; - -export const useShippingPriceRemoveProductsFromExclude = makeMutation< - ShippingPriceRemoveProductFromExclude, - ShippingPriceRemoveProductFromExcludeVariables ->(shippingPriceRemoveProductsFromExclude); diff --git a/src/shipping/queries.ts b/src/shipping/queries.ts index 2bbf97d62..bda8819e4 100644 --- a/src/shipping/queries.ts +++ b/src/shipping/queries.ts @@ -1,25 +1,6 @@ import { gql } from "@apollo/client"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; -import { - shippingMethodWithExcludedProductsFragment, - shippingZoneFragment -} from "@saleor/fragments/shipping"; -import makeQuery from "@saleor/hooks/makeQuery"; -import { - ChannelShippingZones, - ChannelShippingZonesVariables -} from "./types/ChannelShippingZones"; -import { ShippingZone, ShippingZoneVariables } from "./types/ShippingZone"; -import { - ShippingZoneChannels, - ShippingZoneChannelsVariables -} from "./types/ShippingZoneChannels"; -import { ShippingZones, ShippingZonesVariables } from "./types/ShippingZones"; - -const shippingZones = gql` - ${pageInfoFragment} - ${shippingZoneFragment} +export const shippingZones = gql` query ShippingZones( $first: Int $after: String @@ -29,23 +10,17 @@ const shippingZones = gql` shippingZones(first: $first, after: $after, last: $last, before: $before) { edges { node { - ...ShippingZoneFragment + ...ShippingZone } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export const useShippingZoneList = makeQuery< - ShippingZones, - ShippingZonesVariables ->(shippingZones); -const shippingZone = gql` - ${shippingZoneFragment} - ${shippingMethodWithExcludedProductsFragment} +export const shippingZone = gql` query ShippingZone( $id: ID! $before: String @@ -54,9 +29,10 @@ const shippingZone = gql` $last: Int ) { shippingZone(id: $id) { - ...ShippingZoneFragment + ...ShippingZone + default shippingMethods { - ...ShippingMethodWithExcludedProductsFragment + ...ShippingMethodWithExcludedProducts } channels { id @@ -70,11 +46,7 @@ const shippingZone = gql` } } `; -export const useShippingZone = makeQuery( - shippingZone -); - -const shippingZoneChannels = gql` +export const shippingZoneChannels = gql` query ShippingZoneChannels($id: ID!) { shippingZone(id: $id) { id @@ -87,13 +59,8 @@ const shippingZoneChannels = gql` } `; -export const useShippingZoneChannels = makeQuery< - ShippingZoneChannels, - ShippingZoneChannelsVariables ->(shippingZoneChannels); - // first: 100 - to be removed when we implement pagintion in ui for this query -const channelShippingZones = gql` +export const channelShippingZones = gql` query ChannelShippingZones($filter: ShippingZoneFilterInput) { shippingZones(filter: $filter, first: 100) { edges { @@ -105,8 +72,3 @@ const channelShippingZones = gql` } } `; - -export const useChannelShippingZones = makeQuery< - ChannelShippingZones, - ChannelShippingZonesVariables ->(channelShippingZones); diff --git a/src/shipping/types/BulkDeleteShippingRate.ts b/src/shipping/types/BulkDeleteShippingRate.ts deleted file mode 100644 index b0b78e08c..000000000 --- a/src/shipping/types/BulkDeleteShippingRate.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ShippingErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: BulkDeleteShippingRate -// ==================================================== - -export interface BulkDeleteShippingRate_shippingPriceBulkDelete_errors { - __typename: "ShippingError"; - code: ShippingErrorCode; - field: string | null; - message: string | null; -} - -export interface BulkDeleteShippingRate_shippingPriceBulkDelete { - __typename: "ShippingPriceBulkDelete"; - errors: BulkDeleteShippingRate_shippingPriceBulkDelete_errors[]; -} - -export interface BulkDeleteShippingRate { - shippingPriceBulkDelete: BulkDeleteShippingRate_shippingPriceBulkDelete | null; -} - -export interface BulkDeleteShippingRateVariables { - ids: (string | null)[]; -} diff --git a/src/shipping/types/BulkDeleteShippingZone.ts b/src/shipping/types/BulkDeleteShippingZone.ts deleted file mode 100644 index ee75c668d..000000000 --- a/src/shipping/types/BulkDeleteShippingZone.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ShippingErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: BulkDeleteShippingZone -// ==================================================== - -export interface BulkDeleteShippingZone_shippingZoneBulkDelete_errors { - __typename: "ShippingError"; - code: ShippingErrorCode; - field: string | null; - message: string | null; -} - -export interface BulkDeleteShippingZone_shippingZoneBulkDelete { - __typename: "ShippingZoneBulkDelete"; - errors: BulkDeleteShippingZone_shippingZoneBulkDelete_errors[]; -} - -export interface BulkDeleteShippingZone { - shippingZoneBulkDelete: BulkDeleteShippingZone_shippingZoneBulkDelete | null; -} - -export interface BulkDeleteShippingZoneVariables { - ids: (string | null)[]; -} diff --git a/src/shipping/types/ChannelShippingZones.ts b/src/shipping/types/ChannelShippingZones.ts deleted file mode 100644 index a73329241..000000000 --- a/src/shipping/types/ChannelShippingZones.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ShippingZoneFilterInput } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ChannelShippingZones -// ==================================================== - -export interface ChannelShippingZones_shippingZones_edges_node { - __typename: "ShippingZone"; - id: string; - name: string; -} - -export interface ChannelShippingZones_shippingZones_edges { - __typename: "ShippingZoneCountableEdge"; - node: ChannelShippingZones_shippingZones_edges_node; -} - -export interface ChannelShippingZones_shippingZones { - __typename: "ShippingZoneCountableConnection"; - edges: ChannelShippingZones_shippingZones_edges[]; -} - -export interface ChannelShippingZones { - shippingZones: ChannelShippingZones_shippingZones | null; -} - -export interface ChannelShippingZonesVariables { - filter?: ShippingZoneFilterInput | null; -} diff --git a/src/shipping/types/CreateShippingRate.ts b/src/shipping/types/CreateShippingRate.ts deleted file mode 100644 index 7f5e8f985..000000000 --- a/src/shipping/types/CreateShippingRate.ts +++ /dev/null @@ -1,232 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ShippingPriceInput, ShippingErrorCode, PostalCodeRuleInclusionTypeEnum, WeightUnitsEnum, ShippingMethodTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: CreateShippingRate -// ==================================================== - -export interface CreateShippingRate_shippingPriceCreate_errors { - __typename: "ShippingError"; - code: ShippingErrorCode; - field: string | null; - message: string | null; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingZone_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingZone_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingZone_countries { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_postalCodeRules { - __typename: "ShippingMethodPostalCodeRule"; - id: string; - inclusionType: PostalCodeRuleInclusionTypeEnum | null; - start: string | null; - end: string | null; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_minimumOrderWeight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_maximumOrderWeight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_channelListings_minimumOrderPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_channelListings_maximumOrderPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_channelListings { - __typename: "ShippingMethodChannelListing"; - id: string; - channel: CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_channelListings_channel; - price: CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_channelListings_price | null; - minimumOrderPrice: CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_channelListings_minimumOrderPrice | null; - maximumOrderPrice: CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_channelListings_maximumOrderPrice | null; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods { - __typename: "ShippingMethodType"; - id: string; - postalCodeRules: (CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_postalCodeRules | null)[] | null; - metadata: (CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_metadata | null)[]; - privateMetadata: (CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_privateMetadata | null)[]; - minimumOrderWeight: CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_minimumOrderWeight | null; - maximumOrderWeight: CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_maximumOrderWeight | null; - minimumDeliveryDays: number | null; - maximumDeliveryDays: number | null; - name: string; - description: any | null; - type: ShippingMethodTypeEnum | null; - channelListings: CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_channelListings[] | null; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingZone_warehouses { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingZone { - __typename: "ShippingZone"; - metadata: (CreateShippingRate_shippingPriceCreate_shippingZone_metadata | null)[]; - privateMetadata: (CreateShippingRate_shippingPriceCreate_shippingZone_privateMetadata | null)[]; - id: string; - countries: (CreateShippingRate_shippingPriceCreate_shippingZone_countries | null)[] | null; - name: string; - description: string | null; - shippingMethods: (CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods | null)[] | null; - warehouses: CreateShippingRate_shippingPriceCreate_shippingZone_warehouses[]; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingMethod_postalCodeRules { - __typename: "ShippingMethodPostalCodeRule"; - id: string; - inclusionType: PostalCodeRuleInclusionTypeEnum | null; - start: string | null; - end: string | null; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingMethod_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingMethod_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingMethod_minimumOrderWeight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingMethod_maximumOrderWeight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingMethod_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingMethod_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingMethod_channelListings_minimumOrderPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingMethod_channelListings_maximumOrderPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingMethod_channelListings { - __typename: "ShippingMethodChannelListing"; - id: string; - channel: CreateShippingRate_shippingPriceCreate_shippingMethod_channelListings_channel; - price: CreateShippingRate_shippingPriceCreate_shippingMethod_channelListings_price | null; - minimumOrderPrice: CreateShippingRate_shippingPriceCreate_shippingMethod_channelListings_minimumOrderPrice | null; - maximumOrderPrice: CreateShippingRate_shippingPriceCreate_shippingMethod_channelListings_maximumOrderPrice | null; -} - -export interface CreateShippingRate_shippingPriceCreate_shippingMethod { - __typename: "ShippingMethodType"; - id: string; - postalCodeRules: (CreateShippingRate_shippingPriceCreate_shippingMethod_postalCodeRules | null)[] | null; - metadata: (CreateShippingRate_shippingPriceCreate_shippingMethod_metadata | null)[]; - privateMetadata: (CreateShippingRate_shippingPriceCreate_shippingMethod_privateMetadata | null)[]; - minimumOrderWeight: CreateShippingRate_shippingPriceCreate_shippingMethod_minimumOrderWeight | null; - maximumOrderWeight: CreateShippingRate_shippingPriceCreate_shippingMethod_maximumOrderWeight | null; - minimumDeliveryDays: number | null; - maximumDeliveryDays: number | null; - name: string; - description: any | null; - type: ShippingMethodTypeEnum | null; - channelListings: CreateShippingRate_shippingPriceCreate_shippingMethod_channelListings[] | null; -} - -export interface CreateShippingRate_shippingPriceCreate { - __typename: "ShippingPriceCreate"; - errors: CreateShippingRate_shippingPriceCreate_errors[]; - shippingZone: CreateShippingRate_shippingPriceCreate_shippingZone | null; - shippingMethod: CreateShippingRate_shippingPriceCreate_shippingMethod | null; -} - -export interface CreateShippingRate { - shippingPriceCreate: CreateShippingRate_shippingPriceCreate | null; -} - -export interface CreateShippingRateVariables { - input: ShippingPriceInput; -} diff --git a/src/shipping/types/CreateShippingZone.ts b/src/shipping/types/CreateShippingZone.ts deleted file mode 100644 index add852252..000000000 --- a/src/shipping/types/CreateShippingZone.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ShippingZoneCreateInput, ShippingErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: CreateShippingZone -// ==================================================== - -export interface CreateShippingZone_shippingZoneCreate_errors { - __typename: "ShippingError"; - code: ShippingErrorCode; - field: string | null; - message: string | null; -} - -export interface CreateShippingZone_shippingZoneCreate_shippingZone_countries { - __typename: "CountryDisplay"; - country: string; - code: string; -} - -export interface CreateShippingZone_shippingZoneCreate_shippingZone { - __typename: "ShippingZone"; - countries: (CreateShippingZone_shippingZoneCreate_shippingZone_countries | null)[] | null; - id: string; - name: string; -} - -export interface CreateShippingZone_shippingZoneCreate { - __typename: "ShippingZoneCreate"; - errors: CreateShippingZone_shippingZoneCreate_errors[]; - shippingZone: CreateShippingZone_shippingZoneCreate_shippingZone | null; -} - -export interface CreateShippingZone { - shippingZoneCreate: CreateShippingZone_shippingZoneCreate | null; -} - -export interface CreateShippingZoneVariables { - input: ShippingZoneCreateInput; -} diff --git a/src/shipping/types/DeleteShippingRate.ts b/src/shipping/types/DeleteShippingRate.ts deleted file mode 100644 index 335db2fec..000000000 --- a/src/shipping/types/DeleteShippingRate.ts +++ /dev/null @@ -1,149 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ShippingErrorCode, PostalCodeRuleInclusionTypeEnum, WeightUnitsEnum, ShippingMethodTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: DeleteShippingRate -// ==================================================== - -export interface DeleteShippingRate_shippingPriceDelete_errors { - __typename: "ShippingError"; - code: ShippingErrorCode; - field: string | null; - message: string | null; -} - -export interface DeleteShippingRate_shippingPriceDelete_shippingZone_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface DeleteShippingRate_shippingPriceDelete_shippingZone_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface DeleteShippingRate_shippingPriceDelete_shippingZone_countries { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_postalCodeRules { - __typename: "ShippingMethodPostalCodeRule"; - id: string; - inclusionType: PostalCodeRuleInclusionTypeEnum | null; - start: string | null; - end: string | null; -} - -export interface DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_minimumOrderWeight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_maximumOrderWeight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_channelListings_minimumOrderPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_channelListings_maximumOrderPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_channelListings { - __typename: "ShippingMethodChannelListing"; - id: string; - channel: DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_channelListings_channel; - price: DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_channelListings_price | null; - minimumOrderPrice: DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_channelListings_minimumOrderPrice | null; - maximumOrderPrice: DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_channelListings_maximumOrderPrice | null; -} - -export interface DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods { - __typename: "ShippingMethodType"; - id: string; - postalCodeRules: (DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_postalCodeRules | null)[] | null; - metadata: (DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_metadata | null)[]; - privateMetadata: (DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_privateMetadata | null)[]; - minimumOrderWeight: DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_minimumOrderWeight | null; - maximumOrderWeight: DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_maximumOrderWeight | null; - minimumDeliveryDays: number | null; - maximumDeliveryDays: number | null; - name: string; - description: any | null; - type: ShippingMethodTypeEnum | null; - channelListings: DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_channelListings[] | null; -} - -export interface DeleteShippingRate_shippingPriceDelete_shippingZone_warehouses { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface DeleteShippingRate_shippingPriceDelete_shippingZone { - __typename: "ShippingZone"; - metadata: (DeleteShippingRate_shippingPriceDelete_shippingZone_metadata | null)[]; - privateMetadata: (DeleteShippingRate_shippingPriceDelete_shippingZone_privateMetadata | null)[]; - id: string; - countries: (DeleteShippingRate_shippingPriceDelete_shippingZone_countries | null)[] | null; - name: string; - description: string | null; - shippingMethods: (DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods | null)[] | null; - warehouses: DeleteShippingRate_shippingPriceDelete_shippingZone_warehouses[]; -} - -export interface DeleteShippingRate_shippingPriceDelete { - __typename: "ShippingPriceDelete"; - errors: DeleteShippingRate_shippingPriceDelete_errors[]; - shippingZone: DeleteShippingRate_shippingPriceDelete_shippingZone | null; -} - -export interface DeleteShippingRate { - shippingPriceDelete: DeleteShippingRate_shippingPriceDelete | null; -} - -export interface DeleteShippingRateVariables { - id: string; -} diff --git a/src/shipping/types/DeleteShippingZone.ts b/src/shipping/types/DeleteShippingZone.ts deleted file mode 100644 index a38ce9233..000000000 --- a/src/shipping/types/DeleteShippingZone.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ShippingErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: DeleteShippingZone -// ==================================================== - -export interface DeleteShippingZone_shippingZoneDelete_errors { - __typename: "ShippingError"; - code: ShippingErrorCode; - field: string | null; - message: string | null; -} - -export interface DeleteShippingZone_shippingZoneDelete { - __typename: "ShippingZoneDelete"; - errors: DeleteShippingZone_shippingZoneDelete_errors[]; -} - -export interface DeleteShippingZone { - shippingZoneDelete: DeleteShippingZone_shippingZoneDelete | null; -} - -export interface DeleteShippingZoneVariables { - id: string; -} diff --git a/src/shipping/types/ShippingMethodChannelListingUpdate.ts b/src/shipping/types/ShippingMethodChannelListingUpdate.ts deleted file mode 100644 index 011311e1c..000000000 --- a/src/shipping/types/ShippingMethodChannelListingUpdate.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ShippingMethodChannelListingInput, PostalCodeRuleInclusionTypeEnum, WeightUnitsEnum, ShippingMethodTypeEnum, ShippingErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ShippingMethodChannelListingUpdate -// ==================================================== - -export interface ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_postalCodeRules { - __typename: "ShippingMethodPostalCodeRule"; - id: string; - inclusionType: PostalCodeRuleInclusionTypeEnum | null; - start: string | null; - end: string | null; -} - -export interface ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_minimumOrderWeight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_maximumOrderWeight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_channelListings_minimumOrderPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_channelListings_maximumOrderPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_channelListings { - __typename: "ShippingMethodChannelListing"; - id: string; - channel: ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_channelListings_channel; - price: ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_channelListings_price | null; - minimumOrderPrice: ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_channelListings_minimumOrderPrice | null; - maximumOrderPrice: ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_channelListings_maximumOrderPrice | null; -} - -export interface ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod { - __typename: "ShippingMethodType"; - id: string; - postalCodeRules: (ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_postalCodeRules | null)[] | null; - metadata: (ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_metadata | null)[]; - privateMetadata: (ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_privateMetadata | null)[]; - minimumOrderWeight: ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_minimumOrderWeight | null; - maximumOrderWeight: ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_maximumOrderWeight | null; - minimumDeliveryDays: number | null; - maximumDeliveryDays: number | null; - name: string; - description: any | null; - type: ShippingMethodTypeEnum | null; - channelListings: ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_channelListings[] | null; -} - -export interface ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_errors { - __typename: "ShippingError"; - code: ShippingErrorCode; - field: string | null; - channels: string[] | null; - message: string | null; -} - -export interface ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate { - __typename: "ShippingMethodChannelListingUpdate"; - shippingMethod: ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod | null; - errors: ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_errors[]; -} - -export interface ShippingMethodChannelListingUpdate { - shippingMethodChannelListingUpdate: ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate | null; -} - -export interface ShippingMethodChannelListingUpdateVariables { - id: string; - input: ShippingMethodChannelListingInput; -} diff --git a/src/shipping/types/ShippingPriceExcludeProduct.ts b/src/shipping/types/ShippingPriceExcludeProduct.ts deleted file mode 100644 index 08cf62a0f..000000000 --- a/src/shipping/types/ShippingPriceExcludeProduct.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ShippingPriceExcludeProductsInput, ShippingErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ShippingPriceExcludeProduct -// ==================================================== - -export interface ShippingPriceExcludeProduct_shippingPriceExcludeProducts_errors { - __typename: "ShippingError"; - code: ShippingErrorCode; - field: string | null; - message: string | null; -} - -export interface ShippingPriceExcludeProduct_shippingPriceExcludeProducts { - __typename: "ShippingPriceExcludeProducts"; - errors: ShippingPriceExcludeProduct_shippingPriceExcludeProducts_errors[]; -} - -export interface ShippingPriceExcludeProduct { - shippingPriceExcludeProducts: ShippingPriceExcludeProduct_shippingPriceExcludeProducts | null; -} - -export interface ShippingPriceExcludeProductVariables { - id: string; - input: ShippingPriceExcludeProductsInput; -} diff --git a/src/shipping/types/ShippingPriceRemoveProductFromExclude.ts b/src/shipping/types/ShippingPriceRemoveProductFromExclude.ts deleted file mode 100644 index b52a22171..000000000 --- a/src/shipping/types/ShippingPriceRemoveProductFromExclude.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ShippingErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ShippingPriceRemoveProductFromExclude -// ==================================================== - -export interface ShippingPriceRemoveProductFromExclude_shippingPriceRemoveProductFromExclude_errors { - __typename: "ShippingError"; - code: ShippingErrorCode; - field: string | null; - message: string | null; -} - -export interface ShippingPriceRemoveProductFromExclude_shippingPriceRemoveProductFromExclude { - __typename: "ShippingPriceRemoveProductFromExclude"; - errors: ShippingPriceRemoveProductFromExclude_shippingPriceRemoveProductFromExclude_errors[]; -} - -export interface ShippingPriceRemoveProductFromExclude { - shippingPriceRemoveProductFromExclude: ShippingPriceRemoveProductFromExclude_shippingPriceRemoveProductFromExclude | null; -} - -export interface ShippingPriceRemoveProductFromExcludeVariables { - id: string; - products: (string | null)[]; -} diff --git a/src/shipping/types/ShippingZone.ts b/src/shipping/types/ShippingZone.ts deleted file mode 100644 index 8fb43027e..000000000 --- a/src/shipping/types/ShippingZone.ts +++ /dev/null @@ -1,180 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PostalCodeRuleInclusionTypeEnum, WeightUnitsEnum, ShippingMethodTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ShippingZone -// ==================================================== - -export interface ShippingZone_shippingZone_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingZone_shippingZone_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingZone_shippingZone_countries { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface ShippingZone_shippingZone_shippingMethods_postalCodeRules { - __typename: "ShippingMethodPostalCodeRule"; - id: string; - inclusionType: PostalCodeRuleInclusionTypeEnum | null; - start: string | null; - end: string | null; -} - -export interface ShippingZone_shippingZone_shippingMethods_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingZone_shippingZone_shippingMethods_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingZone_shippingZone_shippingMethods_minimumOrderWeight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ShippingZone_shippingZone_shippingMethods_maximumOrderWeight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ShippingZone_shippingZone_shippingMethods_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ShippingZone_shippingZone_shippingMethods_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ShippingZone_shippingZone_shippingMethods_channelListings_minimumOrderPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ShippingZone_shippingZone_shippingMethods_channelListings_maximumOrderPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ShippingZone_shippingZone_shippingMethods_channelListings { - __typename: "ShippingMethodChannelListing"; - id: string; - channel: ShippingZone_shippingZone_shippingMethods_channelListings_channel; - price: ShippingZone_shippingZone_shippingMethods_channelListings_price | null; - minimumOrderPrice: ShippingZone_shippingZone_shippingMethods_channelListings_minimumOrderPrice | null; - maximumOrderPrice: ShippingZone_shippingZone_shippingMethods_channelListings_maximumOrderPrice | null; -} - -export interface ShippingZone_shippingZone_shippingMethods_excludedProducts_pageInfo { - __typename: "PageInfo"; - hasNextPage: boolean; - hasPreviousPage: boolean; - endCursor: string | null; - startCursor: string | null; -} - -export interface ShippingZone_shippingZone_shippingMethods_excludedProducts_edges_node_thumbnail { - __typename: "Image"; - url: string; -} - -export interface ShippingZone_shippingZone_shippingMethods_excludedProducts_edges_node { - __typename: "Product"; - id: string; - name: string; - thumbnail: ShippingZone_shippingZone_shippingMethods_excludedProducts_edges_node_thumbnail | null; -} - -export interface ShippingZone_shippingZone_shippingMethods_excludedProducts_edges { - __typename: "ProductCountableEdge"; - node: ShippingZone_shippingZone_shippingMethods_excludedProducts_edges_node; -} - -export interface ShippingZone_shippingZone_shippingMethods_excludedProducts { - __typename: "ProductCountableConnection"; - pageInfo: ShippingZone_shippingZone_shippingMethods_excludedProducts_pageInfo; - edges: ShippingZone_shippingZone_shippingMethods_excludedProducts_edges[]; -} - -export interface ShippingZone_shippingZone_shippingMethods { - __typename: "ShippingMethodType"; - id: string; - postalCodeRules: (ShippingZone_shippingZone_shippingMethods_postalCodeRules | null)[] | null; - metadata: (ShippingZone_shippingZone_shippingMethods_metadata | null)[]; - privateMetadata: (ShippingZone_shippingZone_shippingMethods_privateMetadata | null)[]; - minimumOrderWeight: ShippingZone_shippingZone_shippingMethods_minimumOrderWeight | null; - maximumOrderWeight: ShippingZone_shippingZone_shippingMethods_maximumOrderWeight | null; - minimumDeliveryDays: number | null; - maximumDeliveryDays: number | null; - name: string; - description: any | null; - type: ShippingMethodTypeEnum | null; - channelListings: ShippingZone_shippingZone_shippingMethods_channelListings[] | null; - excludedProducts: ShippingZone_shippingZone_shippingMethods_excludedProducts | null; -} - -export interface ShippingZone_shippingZone_channels { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ShippingZone_shippingZone_warehouses { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface ShippingZone_shippingZone { - __typename: "ShippingZone"; - metadata: (ShippingZone_shippingZone_metadata | null)[]; - privateMetadata: (ShippingZone_shippingZone_privateMetadata | null)[]; - id: string; - countries: (ShippingZone_shippingZone_countries | null)[] | null; - name: string; - description: string | null; - shippingMethods: (ShippingZone_shippingZone_shippingMethods | null)[] | null; - channels: ShippingZone_shippingZone_channels[]; - warehouses: ShippingZone_shippingZone_warehouses[]; -} - -export interface ShippingZone { - shippingZone: ShippingZone_shippingZone | null; -} - -export interface ShippingZoneVariables { - id: string; - before?: string | null; - after?: string | null; - first?: number | null; - last?: number | null; -} diff --git a/src/shipping/types/ShippingZoneChannels.ts b/src/shipping/types/ShippingZoneChannels.ts deleted file mode 100644 index 5a5dbed33..000000000 --- a/src/shipping/types/ShippingZoneChannels.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: ShippingZoneChannels -// ==================================================== - -export interface ShippingZoneChannels_shippingZone_channels { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ShippingZoneChannels_shippingZone { - __typename: "ShippingZone"; - id: string; - channels: ShippingZoneChannels_shippingZone_channels[]; -} - -export interface ShippingZoneChannels { - shippingZone: ShippingZoneChannels_shippingZone | null; -} - -export interface ShippingZoneChannelsVariables { - id: string; -} diff --git a/src/shipping/types/ShippingZoneDetails.ts b/src/shipping/types/ShippingZoneDetails.ts deleted file mode 100644 index 0619eb021..000000000 --- a/src/shipping/types/ShippingZoneDetails.ts +++ /dev/null @@ -1,176 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PostalCodeRuleInclusionTypeEnum, WeightUnitsEnum, ShippingMethodTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ShippingZoneDetails -// ==================================================== - -export interface ShippingZoneDetails_shippingZone_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingZoneDetails_shippingZone_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingZoneDetails_shippingZone_countries { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface ShippingZoneDetails_shippingZone_shippingMethods_postalCodeRules { - __typename: "ShippingMethodPostalCodeRule"; - id: string; - inclusionType: PostalCodeRuleInclusionTypeEnum | null; - start: string | null; - end: string | null; -} - -export interface ShippingZoneDetails_shippingZone_shippingMethods_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingZoneDetails_shippingZone_shippingMethods_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingZoneDetails_shippingZone_shippingMethods_minimumOrderWeight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ShippingZoneDetails_shippingZone_shippingMethods_maximumOrderWeight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface ShippingZoneDetails_shippingZone_shippingMethods_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ShippingZoneDetails_shippingZone_shippingMethods_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ShippingZoneDetails_shippingZone_shippingMethods_channelListings_minimumOrderPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ShippingZoneDetails_shippingZone_shippingMethods_channelListings_maximumOrderPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface ShippingZoneDetails_shippingZone_shippingMethods_channelListings { - __typename: "ShippingMethodChannelListing"; - id: string; - channel: ShippingZoneDetails_shippingZone_shippingMethods_channelListings_channel; - price: ShippingZoneDetails_shippingZone_shippingMethods_channelListings_price | null; - minimumOrderPrice: ShippingZoneDetails_shippingZone_shippingMethods_channelListings_minimumOrderPrice | null; - maximumOrderPrice: ShippingZoneDetails_shippingZone_shippingMethods_channelListings_maximumOrderPrice | null; -} - -export interface ShippingZoneDetails_shippingZone_shippingMethods_excludedProducts_pageInfo { - __typename: "PageInfo"; - hasNextPage: boolean; - hasPreviousPage: boolean; - endCursor: string | null; - startCursor: string | null; -} - -export interface ShippingZoneDetails_shippingZone_shippingMethods_excludedProducts_edges_node_thumbnail { - __typename: "Image"; - url: string; -} - -export interface ShippingZoneDetails_shippingZone_shippingMethods_excludedProducts_edges_node { - __typename: "Product"; - id: string; - name: string; - thumbnail: ShippingZoneDetails_shippingZone_shippingMethods_excludedProducts_edges_node_thumbnail | null; -} - -export interface ShippingZoneDetails_shippingZone_shippingMethods_excludedProducts_edges { - __typename: "ProductCountableEdge"; - node: ShippingZoneDetails_shippingZone_shippingMethods_excludedProducts_edges_node; -} - -export interface ShippingZoneDetails_shippingZone_shippingMethods_excludedProducts { - __typename: "ProductCountableConnection"; - pageInfo: ShippingZoneDetails_shippingZone_shippingMethods_excludedProducts_pageInfo; - edges: ShippingZoneDetails_shippingZone_shippingMethods_excludedProducts_edges[]; -} - -export interface ShippingZoneDetails_shippingZone_shippingMethods { - __typename: "ShippingMethodType"; - id: string; - postalCodeRules: (ShippingZoneDetails_shippingZone_shippingMethods_postalCodeRules | null)[] | null; - metadata: (ShippingZoneDetails_shippingZone_shippingMethods_metadata | null)[]; - privateMetadata: (ShippingZoneDetails_shippingZone_shippingMethods_privateMetadata | null)[]; - minimumOrderWeight: ShippingZoneDetails_shippingZone_shippingMethods_minimumOrderWeight | null; - maximumOrderWeight: ShippingZoneDetails_shippingZone_shippingMethods_maximumOrderWeight | null; - minimumDeliveryDays: number | null; - maximumDeliveryDays: number | null; - name: string; - type: ShippingMethodTypeEnum | null; - channelListings: ShippingZoneDetails_shippingZone_shippingMethods_channelListings[] | null; - excludedProducts: ShippingZoneDetails_shippingZone_shippingMethods_excludedProducts | null; -} - -export interface ShippingZoneDetails_shippingZone_channels { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface ShippingZoneDetails_shippingZone_warehouses { - __typename: "Warehouse"; - id: string; - name: string; -} - -export interface ShippingZoneDetails_shippingZone { - __typename: "ShippingZone"; - metadata: (ShippingZoneDetails_shippingZone_metadata | null)[]; - privateMetadata: (ShippingZoneDetails_shippingZone_privateMetadata | null)[]; - id: string; - countries: (ShippingZoneDetails_shippingZone_countries | null)[] | null; - name: string; - description: string | null; - default: boolean; - shippingMethods: (ShippingZoneDetails_shippingZone_shippingMethods | null)[] | null; - channels: ShippingZoneDetails_shippingZone_channels[]; - warehouses: ShippingZoneDetails_shippingZone_warehouses[]; -} - -export interface ShippingZoneDetails { - shippingZone: ShippingZoneDetails_shippingZone | null; -} - -export interface ShippingZoneDetailsVariables { - id: string; -} diff --git a/src/shipping/types/ShippingZones.ts b/src/shipping/types/ShippingZones.ts deleted file mode 100644 index 8e36282a1..000000000 --- a/src/shipping/types/ShippingZones.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: ShippingZones -// ==================================================== - -export interface ShippingZones_shippingZones_edges_node_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingZones_shippingZones_edges_node_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface ShippingZones_shippingZones_edges_node_countries { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface ShippingZones_shippingZones_edges_node { - __typename: "ShippingZone"; - metadata: (ShippingZones_shippingZones_edges_node_metadata | null)[]; - privateMetadata: (ShippingZones_shippingZones_edges_node_privateMetadata | null)[]; - id: string; - countries: (ShippingZones_shippingZones_edges_node_countries | null)[] | null; - name: string; - description: string | null; -} - -export interface ShippingZones_shippingZones_edges { - __typename: "ShippingZoneCountableEdge"; - node: ShippingZones_shippingZones_edges_node; -} - -export interface ShippingZones_shippingZones_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface ShippingZones_shippingZones { - __typename: "ShippingZoneCountableConnection"; - edges: ShippingZones_shippingZones_edges[]; - pageInfo: ShippingZones_shippingZones_pageInfo; -} - -export interface ShippingZones { - shippingZones: ShippingZones_shippingZones | null; -} - -export interface ShippingZonesVariables { - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; -} diff --git a/src/shipping/types/UpdateDefaultWeightUnit.ts b/src/shipping/types/UpdateDefaultWeightUnit.ts deleted file mode 100644 index 0d2a09d34..000000000 --- a/src/shipping/types/UpdateDefaultWeightUnit.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { WeightUnitsEnum, ShopErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: UpdateDefaultWeightUnit -// ==================================================== - -export interface UpdateDefaultWeightUnit_shopSettingsUpdate_errors { - __typename: "ShopError"; - code: ShopErrorCode; - field: string | null; - message: string | null; -} - -export interface UpdateDefaultWeightUnit_shopSettingsUpdate_shop { - __typename: "Shop"; - defaultWeightUnit: WeightUnitsEnum | null; -} - -export interface UpdateDefaultWeightUnit_shopSettingsUpdate { - __typename: "ShopSettingsUpdate"; - errors: UpdateDefaultWeightUnit_shopSettingsUpdate_errors[]; - shop: UpdateDefaultWeightUnit_shopSettingsUpdate_shop | null; -} - -export interface UpdateDefaultWeightUnit { - shopSettingsUpdate: UpdateDefaultWeightUnit_shopSettingsUpdate | null; -} - -export interface UpdateDefaultWeightUnitVariables { - unit?: WeightUnitsEnum | null; -} diff --git a/src/shipping/types/UpdateShippingRate.ts b/src/shipping/types/UpdateShippingRate.ts deleted file mode 100644 index 1d10bb3ec..000000000 --- a/src/shipping/types/UpdateShippingRate.ts +++ /dev/null @@ -1,114 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ShippingPriceInput, ShippingErrorCode, PostalCodeRuleInclusionTypeEnum, WeightUnitsEnum, ShippingMethodTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: UpdateShippingRate -// ==================================================== - -export interface UpdateShippingRate_shippingPriceUpdate_errors { - __typename: "ShippingError"; - code: ShippingErrorCode; - field: string | null; - message: string | null; -} - -export interface UpdateShippingRate_shippingPriceUpdate_shippingMethod_postalCodeRules { - __typename: "ShippingMethodPostalCodeRule"; - id: string; - inclusionType: PostalCodeRuleInclusionTypeEnum | null; - start: string | null; - end: string | null; -} - -export interface UpdateShippingRate_shippingPriceUpdate_shippingMethod_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface UpdateShippingRate_shippingPriceUpdate_shippingMethod_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface UpdateShippingRate_shippingPriceUpdate_shippingMethod_minimumOrderWeight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface UpdateShippingRate_shippingPriceUpdate_shippingMethod_maximumOrderWeight { - __typename: "Weight"; - unit: WeightUnitsEnum; - value: number; -} - -export interface UpdateShippingRate_shippingPriceUpdate_shippingMethod_channelListings_channel { - __typename: "Channel"; - id: string; - name: string; - currencyCode: string; -} - -export interface UpdateShippingRate_shippingPriceUpdate_shippingMethod_channelListings_price { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface UpdateShippingRate_shippingPriceUpdate_shippingMethod_channelListings_minimumOrderPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface UpdateShippingRate_shippingPriceUpdate_shippingMethod_channelListings_maximumOrderPrice { - __typename: "Money"; - amount: number; - currency: string; -} - -export interface UpdateShippingRate_shippingPriceUpdate_shippingMethod_channelListings { - __typename: "ShippingMethodChannelListing"; - id: string; - channel: UpdateShippingRate_shippingPriceUpdate_shippingMethod_channelListings_channel; - price: UpdateShippingRate_shippingPriceUpdate_shippingMethod_channelListings_price | null; - minimumOrderPrice: UpdateShippingRate_shippingPriceUpdate_shippingMethod_channelListings_minimumOrderPrice | null; - maximumOrderPrice: UpdateShippingRate_shippingPriceUpdate_shippingMethod_channelListings_maximumOrderPrice | null; -} - -export interface UpdateShippingRate_shippingPriceUpdate_shippingMethod { - __typename: "ShippingMethodType"; - id: string; - postalCodeRules: (UpdateShippingRate_shippingPriceUpdate_shippingMethod_postalCodeRules | null)[] | null; - metadata: (UpdateShippingRate_shippingPriceUpdate_shippingMethod_metadata | null)[]; - privateMetadata: (UpdateShippingRate_shippingPriceUpdate_shippingMethod_privateMetadata | null)[]; - minimumOrderWeight: UpdateShippingRate_shippingPriceUpdate_shippingMethod_minimumOrderWeight | null; - maximumOrderWeight: UpdateShippingRate_shippingPriceUpdate_shippingMethod_maximumOrderWeight | null; - minimumDeliveryDays: number | null; - maximumDeliveryDays: number | null; - name: string; - description: any | null; - type: ShippingMethodTypeEnum | null; - channelListings: UpdateShippingRate_shippingPriceUpdate_shippingMethod_channelListings[] | null; -} - -export interface UpdateShippingRate_shippingPriceUpdate { - __typename: "ShippingPriceUpdate"; - errors: UpdateShippingRate_shippingPriceUpdate_errors[]; - shippingMethod: UpdateShippingRate_shippingPriceUpdate_shippingMethod | null; -} - -export interface UpdateShippingRate { - shippingPriceUpdate: UpdateShippingRate_shippingPriceUpdate | null; -} - -export interface UpdateShippingRateVariables { - id: string; - input: ShippingPriceInput; -} diff --git a/src/shipping/types/UpdateShippingZone.ts b/src/shipping/types/UpdateShippingZone.ts deleted file mode 100644 index 94c4c8d5e..000000000 --- a/src/shipping/types/UpdateShippingZone.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ShippingZoneUpdateInput, ShippingErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: UpdateShippingZone -// ==================================================== - -export interface UpdateShippingZone_shippingZoneUpdate_errors { - __typename: "ShippingError"; - code: ShippingErrorCode; - field: string | null; - message: string | null; -} - -export interface UpdateShippingZone_shippingZoneUpdate_shippingZone_countries { - __typename: "CountryDisplay"; - country: string; - code: string; -} - -export interface UpdateShippingZone_shippingZoneUpdate_shippingZone { - __typename: "ShippingZone"; - countries: (UpdateShippingZone_shippingZoneUpdate_shippingZone_countries | null)[] | null; - id: string; - name: string; -} - -export interface UpdateShippingZone_shippingZoneUpdate { - __typename: "ShippingZoneUpdate"; - errors: UpdateShippingZone_shippingZoneUpdate_errors[]; - shippingZone: UpdateShippingZone_shippingZoneUpdate_shippingZone | null; -} - -export interface UpdateShippingZone { - shippingZoneUpdate: UpdateShippingZone_shippingZoneUpdate | null; -} - -export interface UpdateShippingZoneVariables { - id: string; - input: ShippingZoneUpdateInput; -} diff --git a/src/shipping/urls.ts b/src/shipping/urls.ts index c107d4388..6157674bb 100644 --- a/src/shipping/urls.ts +++ b/src/shipping/urls.ts @@ -1,9 +1,9 @@ import { ChannelsAction } from "@saleor/channels/urls"; +import { ShippingMethodTypeEnum } from "@saleor/graphql"; import { stringifyQs } from "@saleor/utils/urls"; import urlJoin from "url-join"; import { BulkAction, Dialog, Pagination, SingleAction } from "../types"; -import { ShippingMethodTypeEnum } from "../types/globalTypes"; export const shippingSection = "/shipping/"; diff --git a/src/shipping/views/RateCreate.tsx b/src/shipping/views/RateCreate.tsx index 8d99936dd..7296d60fc 100644 --- a/src/shipping/views/RateCreate.tsx +++ b/src/shipping/views/RateCreate.tsx @@ -1,13 +1,16 @@ import { createSortedShippingChannels } from "@saleor/channels/utils"; import ChannelsAvailabilityDialog from "@saleor/components/ChannelsAvailabilityDialog"; import { WindowTitle } from "@saleor/components/WindowTitle"; +import { + PostalCodeRuleInclusionTypeEnum, + useShippingZoneChannelsQuery +} from "@saleor/graphql"; import useChannels from "@saleor/hooks/useChannels"; import useNavigator from "@saleor/hooks/useNavigator"; import { sectionNames } from "@saleor/intl"; import ShippingZonePostalCodeRangeDialog from "@saleor/shipping/components/ShippingZonePostalCodeRangeDialog"; import ShippingZoneRatesCreatePage from "@saleor/shipping/components/ShippingZoneRatesCreatePage"; import { useShippingRateCreator } from "@saleor/shipping/handlers"; -import { useShippingZoneChannels } from "@saleor/shipping/queries"; import { shippingRateCreateUrl, ShippingRateCreateUrlDialog, @@ -21,7 +24,6 @@ import { getRuleObject } from "@saleor/shipping/views/utils"; import { MinMax } from "@saleor/types"; -import { PostalCodeRuleInclusionTypeEnum } from "@saleor/types/globalTypes"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import React from "react"; import { useIntl } from "react-intl"; @@ -45,7 +47,7 @@ export const RateCreate: React.FC = ({ id, params }) => { const { data: shippingZoneData, loading: channelsLoading - } = useShippingZoneChannels({ + } = useShippingZoneChannelsQuery({ displayLoader: true, variables: { id } }); diff --git a/src/shipping/views/RateUpdate.tsx b/src/shipping/views/RateUpdate.tsx index 04cfdf9bd..2de29737b 100644 --- a/src/shipping/views/RateUpdate.tsx +++ b/src/shipping/views/RateUpdate.tsx @@ -4,8 +4,19 @@ import { } from "@saleor/channels/utils"; import ChannelsAvailabilityDialog from "@saleor/components/ChannelsAvailabilityDialog"; import { WindowTitle } from "@saleor/components/WindowTitle"; -import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; -import { PAGINATE_BY } from "@saleor/config"; +import { DEFAULT_INITIAL_SEARCH_DATA, PAGINATE_BY } from "@saleor/config"; +import { + PostalCodeRuleInclusionTypeEnum, + ShippingMethodTypeEnum, + useDeleteShippingRateMutation, + useShippingMethodChannelListingUpdateMutation, + useShippingPriceExcludeProductMutation, + useShippingPriceRemoveProductFromExcludeMutation, + useShippingZoneQuery, + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation, + useUpdateShippingRateMutation +} from "@saleor/graphql"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useChannels from "@saleor/hooks/useChannels"; import useLocalPaginator, { @@ -13,8 +24,7 @@ import useLocalPaginator, { } from "@saleor/hooks/useLocalPaginator"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; -import { sectionNames } from "@saleor/intl"; -import { commonMessages } from "@saleor/intl"; +import { commonMessages, sectionNames } from "@saleor/intl"; import { Button } from "@saleor/macaw-ui"; import { getById, @@ -32,14 +42,6 @@ import { getUpdateShippingPriceRateVariables, getUpdateShippingWeightRateVariables } from "@saleor/shipping/handlers"; -import { - useShippingMethodChannelListingUpdate, - useShippingPriceExcludeProduct, - useShippingPriceRemoveProductsFromExclude, - useShippingRateDelete, - useShippingRateUpdate -} from "@saleor/shipping/mutations"; -import { useShippingZone } from "@saleor/shipping/queries"; import { shippingRateEditUrl, ShippingRateUrlDialog, @@ -53,17 +55,9 @@ import { getRuleObject } from "@saleor/shipping/views/utils"; import { MinMax } from "@saleor/types"; -import { - PostalCodeRuleInclusionTypeEnum, - ShippingMethodTypeEnum -} from "@saleor/types/globalTypes"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createMetadataUpdateHandler from "@saleor/utils/handlers/metadataUpdateHandler"; import { mapEdgesToItems } from "@saleor/utils/maps"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -89,7 +83,7 @@ export const RateUpdate: React.FC = ({ ); const paginate = useLocalPaginator(setPaginationState); - const { data, loading, refetch } = useShippingZone({ + const { data, loading, refetch } = useShippingZoneQuery({ displayLoader: true, variables: { id, ...paginationState } }); @@ -121,12 +115,12 @@ export const RateUpdate: React.FC = ({ const [ updateShippingMethodChannelListing, updateShippingMethodChannelListingOpts - ] = useShippingMethodChannelListingUpdate({}); + ] = useShippingMethodChannelListingUpdateMutation({}); const [ unassignProduct, unassignProductOpts - ] = useShippingPriceRemoveProductsFromExclude({ + ] = useShippingPriceRemoveProductFromExcludeMutation({ onCompleted: data => { if (data.shippingPriceRemoveProductFromExclude.errors.length === 0) { handleSuccess(); @@ -136,7 +130,10 @@ export const RateUpdate: React.FC = ({ } }); - const [assignProduct, assignProductOpts] = useShippingPriceExcludeProduct({ + const [ + assignProduct, + assignProductOpts + ] = useShippingPriceExcludeProductMutation({ onCompleted: data => { if (data.shippingPriceExcludeProducts.errors.length === 0) { handleSuccess(); @@ -168,9 +165,10 @@ export const RateUpdate: React.FC = ({ { formId: FORM_ID } ); - const [updateShippingRate, updateShippingRateOpts] = useShippingRateUpdate( - {} - ); + const [ + updateShippingRate, + updateShippingRateOpts + ] = useUpdateShippingRateMutation({}); const handleSuccess = () => { notify({ @@ -178,7 +176,10 @@ export const RateUpdate: React.FC = ({ text: intl.formatMessage(commonMessages.savedChanges) }); }; - const [deleteShippingRate, deleteShippingRateOpts] = useShippingRateDelete({ + const [ + deleteShippingRate, + deleteShippingRateOpts + ] = useDeleteShippingRateMutation({ onCompleted: data => { if (data.shippingPriceDelete.errors.length === 0) { handleSuccess(); @@ -187,8 +188,8 @@ export const RateUpdate: React.FC = ({ } }); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); const [state, dispatch] = React.useReducer(postalCodesReducer, { codesToDelete: [], diff --git a/src/shipping/views/ShippingZoneCreate.tsx b/src/shipping/views/ShippingZoneCreate.tsx index 956888aaa..c7c8ec665 100644 --- a/src/shipping/views/ShippingZoneCreate.tsx +++ b/src/shipping/views/ShippingZoneCreate.tsx @@ -1,4 +1,7 @@ -import { useShopCountries } from "@saleor/components/Shop/query"; +import { + useCreateShippingZoneMutation, + useShopCountriesQuery +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; @@ -11,7 +14,6 @@ import { useIntl } from "react-intl"; import ShippingZoneCreatePage, { ShippingZoneCreateFormData } from "../components/ShippingZoneCreatePage"; -import { useShippingZoneCreate } from "../mutations"; import { shippingZonesListUrl, shippingZoneUrl } from "../urls"; const ShippingZoneCreate: React.FC<{}> = () => { @@ -20,7 +22,7 @@ const ShippingZoneCreate: React.FC<{}> = () => { const shop = useShop(); const intl = useIntl(); - const { data: restWorldCountries } = useShopCountries({ + const { data: restWorldCountries } = useShopCountriesQuery({ variables: { filter: { attachedToShippingZones: false @@ -28,7 +30,10 @@ const ShippingZoneCreate: React.FC<{}> = () => { } }); - const [createShippingZone, createShippingZoneOpts] = useShippingZoneCreate({ + const [ + createShippingZone, + createShippingZoneOpts + ] = useCreateShippingZoneMutation({ onCompleted: data => { if (data.shippingZoneCreate.errors.length === 0) { notify({ diff --git a/src/shipping/views/ShippingZoneDetails/index.tsx b/src/shipping/views/ShippingZoneDetails/index.tsx index 793659c24..a27ca207d 100644 --- a/src/shipping/views/ShippingZoneDetails/index.tsx +++ b/src/shipping/views/ShippingZoneDetails/index.tsx @@ -2,9 +2,20 @@ import { DialogContentText } from "@material-ui/core"; import ActionDialog from "@saleor/components/ActionDialog"; import useAppChannel from "@saleor/components/AppLayout/AppChannelContext"; import NotFoundPage from "@saleor/components/NotFoundPage"; -import { useShopCountries } from "@saleor/components/Shop/query"; -import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; -import { PAGINATE_BY } from "@saleor/config"; +import { DEFAULT_INITIAL_SEARCH_DATA, PAGINATE_BY } from "@saleor/config"; +import { + CountryCode, + ShippingMethodTypeEnum, + ShippingZoneUpdateInput, + useDeleteShippingRateMutation, + useDeleteShippingZoneMutation, + useShippingZoneQuery, + useShopCountriesQuery, + useUpdateMetadataMutation, + useUpdatePrivateMetadataMutation, + useUpdateShippingZoneMutation, + useWarehouseCreateMutation +} from "@saleor/graphql"; import { useLocalPaginationState } from "@saleor/hooks/useLocalPaginator"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; @@ -15,11 +26,6 @@ import useWarehouseSearch from "@saleor/searches/useWarehouseSearch"; import DeleteShippingRateDialog from "@saleor/shipping/components/DeleteShippingRateDialog"; import ShippingZoneAddWarehouseDialog from "@saleor/shipping/components/ShippingZoneAddWarehouseDialog"; import ShippingZoneCountriesAssignDialog from "@saleor/shipping/components/ShippingZoneCountriesAssignDialog"; -import { - useShippingRateDelete, - useShippingZoneDelete, - useShippingZoneUpdate -} from "@saleor/shipping/mutations"; import { arrayDiff } from "@saleor/utils/arrays"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import createMetadataUpdateHandler from "@saleor/utils/handlers/metadataUpdateHandler"; @@ -27,11 +33,6 @@ import { mapCountriesToCountriesCodes, mapEdgesToItems } from "@saleor/utils/maps"; -import { - useMetadataUpdate, - usePrivateMetadataUpdate -} from "@saleor/utils/metadata/updateMetadata"; -import { useWarehouseCreate } from "@saleor/warehouses/mutations"; import { diff } from "fast-array-diff"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -41,14 +42,8 @@ import { findValueInEnum, getStringOrPlaceholder } from "../../../misc"; -import { - CountryCode, - ShippingMethodTypeEnum, - ShippingZoneUpdateInput -} from "../../../types/globalTypes"; import ShippingZoneDetailsPage from "../../components/ShippingZoneDetailsPage"; import { ShippingZoneUpdateFormData } from "../../components/ShippingZoneDetailsPage/types"; -import { useShippingZone } from "../../queries"; import { shippingRateCreateUrl, shippingRateEditUrl, @@ -75,7 +70,7 @@ const ShippingZoneDetails: React.FC = ({ const { data: restWorldCountries, refetch: refetchRestWorldCountries - } = useShopCountries({ + } = useShopCountriesQuery({ variables: { filter: { attachedToShippingZones: false @@ -91,7 +86,7 @@ const ShippingZoneDetails: React.FC = ({ } ); - const { data, loading } = useShippingZone({ + const { data, loading } = useShippingZoneQuery({ displayLoader: true, variables: { id, ...paginationState } }); @@ -103,7 +98,10 @@ const ShippingZoneDetails: React.FC = ({ >(navigate, params => shippingZoneUrl(id, params), params); const rate = data?.shippingZone?.shippingMethods?.find(getById(params.id)); - const [deleteShippingRate, deleteShippingRateOpts] = useShippingRateDelete({ + const [ + deleteShippingRate, + deleteShippingRateOpts + ] = useDeleteShippingRateMutation({ onCompleted: data => { if (data.shippingPriceDelete.errors.length === 0) { notify({ @@ -115,7 +113,10 @@ const ShippingZoneDetails: React.FC = ({ } }); - const [deleteShippingZone, deleteShippingZoneOpts] = useShippingZoneDelete({ + const [ + deleteShippingZone, + deleteShippingZoneOpts + ] = useDeleteShippingZoneMutation({ onCompleted: data => { if (data.shippingZoneDelete.errors.length === 0) { notify({ @@ -127,7 +128,10 @@ const ShippingZoneDetails: React.FC = ({ } }); - const [updateShippingZone, updateShippingZoneOpts] = useShippingZoneUpdate({ + const [ + updateShippingZone, + updateShippingZoneOpts + ] = useUpdateShippingZoneMutation({ onCompleted: data => { if (data.shippingZoneUpdate.errors.length === 0) { notify({ @@ -140,7 +144,7 @@ const ShippingZoneDetails: React.FC = ({ } }); - const [createWarehouse, createWarehouseOpts] = useWarehouseCreate({ + const [createWarehouse, createWarehouseOpts] = useWarehouseCreateMutation({ onCompleted: data => { if (data.createWarehouse.errors.length === 0) { notify({ @@ -152,8 +156,8 @@ const ShippingZoneDetails: React.FC = ({ } }); - const [updateMetadata] = useMetadataUpdate({}); - const [updatePrivateMetadata] = usePrivateMetadataUpdate({}); + const [updateMetadata] = useUpdateMetadataMutation({}); + const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); const getParsedUpdateInput = ( submitData: ShippingZoneUpdateFormData diff --git a/src/shipping/views/ShippingZonesList.tsx b/src/shipping/views/ShippingZonesList.tsx index bb25706bc..f529eaf20 100644 --- a/src/shipping/views/ShippingZonesList.tsx +++ b/src/shipping/views/ShippingZonesList.tsx @@ -2,6 +2,12 @@ import { DialogContentText } from "@material-ui/core"; import { useUser } from "@saleor/auth"; import ActionDialog from "@saleor/components/ActionDialog"; import { configurationMenuUrl } from "@saleor/configuration"; +import { + useBulkDeleteShippingZoneMutation, + useDeleteShippingZoneMutation, + useShippingZonesQuery, + useUpdateDefaultWeightUnitMutation +} from "@saleor/graphql"; import useBulkActions from "@saleor/hooks/useBulkActions"; import useListSettings from "@saleor/hooks/useListSettings"; import useNavigator from "@saleor/hooks/useNavigator"; @@ -26,12 +32,6 @@ import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import ShippingZonesListPage from "../components/ShippingZonesListPage"; -import { - useDefaultWeightUnitUpdate, - useShippingZoneBulkDelete, - useShippingZoneDelete -} from "../mutations"; -import { useShippingZoneList } from "../queries"; import { shippingZoneAddUrl, shippingZonesListUrl, @@ -77,12 +77,15 @@ export const ShippingZonesList: React.FC = ({ ShippingZonesListUrlQueryParams >(navigate, shippingZonesListUrl, params); - const { data, loading, refetch } = useShippingZoneList({ + const { data, loading, refetch } = useShippingZonesQuery({ displayLoader: true, variables: queryVariables }); - const [deleteShippingZone, deleteShippingZoneOpts] = useShippingZoneDelete({ + const [ + deleteShippingZone, + deleteShippingZoneOpts + ] = useDeleteShippingZoneMutation({ onCompleted: data => { if (data.shippingZoneDelete.errors.length === 0) { notify({ @@ -98,7 +101,7 @@ export const ShippingZonesList: React.FC = ({ const [ updateDefaultWeightUnit, updateDefaultWeightUnitOpts - ] = useDefaultWeightUnitUpdate({ + ] = useUpdateDefaultWeightUnitMutation({ onCompleted: data => { if (data.shopSettingsUpdate.errors.length === 0) { notify({ @@ -112,7 +115,7 @@ export const ShippingZonesList: React.FC = ({ const [ bulkDeleteShippingZone, bulkDeleteShippingZoneOpts - ] = useShippingZoneBulkDelete({ + ] = useBulkDeleteShippingZoneMutation({ onCompleted: data => { if (data.shippingZoneBulkDelete.errors.length === 0) { notify({ diff --git a/src/shipping/views/reducer.tsx b/src/shipping/views/reducer.tsx index f6a45eb9d..894b22486 100644 --- a/src/shipping/views/reducer.tsx +++ b/src/shipping/views/reducer.tsx @@ -1,12 +1,14 @@ -import { ShippingZone_shippingZone_shippingMethods_postalCodeRules } from "@saleor/shipping/types/ShippingZone"; -import { PostalCodeRuleInclusionTypeEnum } from "@saleor/types/globalTypes"; +import { + PostalCodeRuleInclusionTypeEnum, + ShippingMethodWithPostalCodesFragment +} from "@saleor/graphql"; export interface PostalCodesState { codesToDelete?: string[]; havePostalCodesChanged?: boolean; inclusionType?: PostalCodeRuleInclusionTypeEnum; - originalCodes?: ShippingZone_shippingZone_shippingMethods_postalCodeRules[]; - postalCodeRules?: ShippingZone_shippingZone_shippingMethods_postalCodeRules[]; + originalCodes?: ShippingMethodWithPostalCodesFragment["postalCodeRules"]; + postalCodeRules?: ShippingMethodWithPostalCodesFragment["postalCodeRules"]; } function postalCodesReducer( diff --git a/src/shipping/views/utils.tsx b/src/shipping/views/utils.tsx index 74ce49a1a..1f87811f0 100644 --- a/src/shipping/views/utils.tsx +++ b/src/shipping/views/utils.tsx @@ -1,5 +1,5 @@ +import { PostalCodeRuleInclusionTypeEnum } from "@saleor/graphql"; import { MinMax } from "@saleor/types"; -import { PostalCodeRuleInclusionTypeEnum } from "@saleor/types/globalTypes"; export const filterPostalCodes = (postalCodes, codeToFilterOut) => postalCodes.filter( diff --git a/src/siteSettings/components/SiteCheckoutSettingsCard/SiteCheckoutSettingsCard.tsx b/src/siteSettings/components/SiteCheckoutSettingsCard/SiteCheckoutSettingsCard.tsx index 2dd7f38e2..ccb229043 100644 --- a/src/siteSettings/components/SiteCheckoutSettingsCard/SiteCheckoutSettingsCard.tsx +++ b/src/siteSettings/components/SiteCheckoutSettingsCard/SiteCheckoutSettingsCard.tsx @@ -1,7 +1,7 @@ import { Card, CardContent, TextField, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; -import { ShopErrorFragment } from "@saleor/fragments/types/ShopErrorFragment"; +import { ShopErrorFragment } from "@saleor/graphql"; import { getFormErrors } from "@saleor/utils/errors"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; diff --git a/src/siteSettings/components/SiteDetailsSettingsCard/SiteDetailsSettingsCard.tsx b/src/siteSettings/components/SiteDetailsSettingsCard/SiteDetailsSettingsCard.tsx index db99679ea..77be54ba3 100644 --- a/src/siteSettings/components/SiteDetailsSettingsCard/SiteDetailsSettingsCard.tsx +++ b/src/siteSettings/components/SiteDetailsSettingsCard/SiteDetailsSettingsCard.tsx @@ -2,7 +2,7 @@ import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; import { IS_CLOUD_INSTANCE } from "@saleor/config"; -import { ShopErrorFragment } from "@saleor/fragments/types/ShopErrorFragment"; +import { ShopErrorFragment } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { getFormErrors } from "@saleor/utils/errors"; import getShopErrorMessage from "@saleor/utils/errors/shop"; diff --git a/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx b/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx index 6821ef0bc..28427d3b0 100644 --- a/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx +++ b/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx @@ -6,20 +6,21 @@ import Hr from "@saleor/components/Hr"; import PageHeader from "@saleor/components/PageHeader"; import PageSectionHeader from "@saleor/components/PageSectionHeader"; import Savebar from "@saleor/components/Savebar"; -import { ShopErrorFragment } from "@saleor/fragments/types/ShopErrorFragment"; +import { ShopErrorFragment, SiteSettingsQuery } from "@saleor/graphql"; import useAddressValidation from "@saleor/hooks/useAddressValidation"; import { SubmitPromise } from "@saleor/hooks/useForm"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; import { commonMessages, sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; -import { makeStyles } from "@saleor/macaw-ui"; +import { + Backlink, + ConfirmButtonTransitionState, + makeStyles +} from "@saleor/macaw-ui"; import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; import { mapCountriesToChoices } from "@saleor/utils/maps"; import React from "react"; import { useIntl } from "react-intl"; -import { SiteSettings_shop } from "../../types/SiteSettings"; import SiteCheckoutSettingsCard from "../SiteCheckoutSettingsCard"; import SiteSettingsDetailsCard from "../SiteDetailsSettingsCard"; import { messages } from "./messages"; @@ -48,7 +49,7 @@ export interface SiteSettingsPageFormData export interface SiteSettingsPageProps { disabled: boolean; errors: ShopErrorFragment[]; - shop: SiteSettings_shop; + shop: SiteSettingsQuery["shop"]; saveButtonBarState: ConfirmButtonTransitionState; onBack: () => void; onSubmit: (data: SiteSettingsPageFormData) => SubmitPromise; diff --git a/src/siteSettings/fixtures.ts b/src/siteSettings/fixtures.ts index 443c97999..1c52f83d8 100644 --- a/src/siteSettings/fixtures.ts +++ b/src/siteSettings/fixtures.ts @@ -1,6 +1,6 @@ -import { SiteSettings_shop } from "./types/SiteSettings"; +import { SiteSettingsQuery } from "@saleor/graphql"; -export const shop: SiteSettings_shop = { +export const shop: SiteSettingsQuery["shop"] = { __typename: "Shop", companyAddress: { __typename: "Address", diff --git a/src/siteSettings/mutations.ts b/src/siteSettings/mutations.ts index 392d64516..0aaf6c893 100644 --- a/src/siteSettings/mutations.ts +++ b/src/siteSettings/mutations.ts @@ -1,18 +1,6 @@ import { gql } from "@apollo/client"; -import { fragmentAddress } from "@saleor/fragments/address"; -import { shopErrorFragment } from "@saleor/fragments/errors"; -import { shopFragment } from "@saleor/fragments/shop"; -import { TypedMutation } from "../mutations"; -import { - ShopSettingsUpdate, - ShopSettingsUpdateVariables -} from "./types/ShopSettingsUpdate"; - -const shopSettingsUpdate = gql` - ${shopErrorFragment} - ${shopFragment} - ${fragmentAddress} +export const shopSettingsUpdate = gql` mutation ShopSettingsUpdate( $shopDomainInput: SiteDomainInput! $shopSettingsInput: ShopSettingsInput! @@ -21,15 +9,15 @@ const shopSettingsUpdate = gql` ) { shopSettingsUpdate(input: $shopSettingsInput) { errors { - ...ShopErrorFragment + ...ShopError } shop { - ...ShopFragment + ...Shop } } shopDomainUpdate(input: $shopDomainInput) @skip(if: $isCloudInstance) { errors { - ...ShopErrorFragment + ...ShopError } shop { domain { @@ -40,17 +28,13 @@ const shopSettingsUpdate = gql` } shopAddressUpdate(input: $addressInput) { errors { - ...ShopErrorFragment + ...ShopError } shop { companyAddress { - ...AddressFragment + ...Address } } } } `; -export const TypedShopSettingsUpdate = TypedMutation< - ShopSettingsUpdate, - ShopSettingsUpdateVariables ->(shopSettingsUpdate); diff --git a/src/siteSettings/queries.ts b/src/siteSettings/queries.ts index 02b1d3d11..67ca2255c 100644 --- a/src/siteSettings/queries.ts +++ b/src/siteSettings/queries.ts @@ -1,17 +1,9 @@ import { gql } from "@apollo/client"; -import { shopFragment } from "@saleor/fragments/shop"; -import { TypedQuery } from "../queries"; -import { SiteSettings } from "./types/SiteSettings"; - -const siteSettings = gql` - ${shopFragment} +export const siteSettings = gql` query SiteSettings { shop { - ...ShopFragment + ...Shop } } `; -export const TypedSiteSettingsQuery = TypedQuery( - siteSettings -); diff --git a/src/siteSettings/types/ShopSettingsUpdate.ts b/src/siteSettings/types/ShopSettingsUpdate.ts deleted file mode 100644 index c3ab6bf19..000000000 --- a/src/siteSettings/types/ShopSettingsUpdate.ts +++ /dev/null @@ -1,148 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { SiteDomainInput, ShopSettingsInput, AddressInput, ShopErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ShopSettingsUpdate -// ==================================================== - -export interface ShopSettingsUpdate_shopSettingsUpdate_errors { - __typename: "ShopError"; - code: ShopErrorCode; - field: string | null; - message: string | null; -} - -export interface ShopSettingsUpdate_shopSettingsUpdate_shop_companyAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface ShopSettingsUpdate_shopSettingsUpdate_shop_companyAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: ShopSettingsUpdate_shopSettingsUpdate_shop_companyAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface ShopSettingsUpdate_shopSettingsUpdate_shop_countries { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface ShopSettingsUpdate_shopSettingsUpdate_shop_domain { - __typename: "Domain"; - host: string; -} - -export interface ShopSettingsUpdate_shopSettingsUpdate_shop { - __typename: "Shop"; - companyAddress: ShopSettingsUpdate_shopSettingsUpdate_shop_companyAddress | null; - countries: ShopSettingsUpdate_shopSettingsUpdate_shop_countries[]; - customerSetPasswordUrl: string | null; - defaultMailSenderAddress: string | null; - defaultMailSenderName: string | null; - description: string | null; - domain: ShopSettingsUpdate_shopSettingsUpdate_shop_domain; - name: string; - reserveStockDurationAnonymousUser: number | null; - reserveStockDurationAuthenticatedUser: number | null; - limitQuantityPerCheckout: number | null; -} - -export interface ShopSettingsUpdate_shopSettingsUpdate { - __typename: "ShopSettingsUpdate"; - errors: ShopSettingsUpdate_shopSettingsUpdate_errors[]; - shop: ShopSettingsUpdate_shopSettingsUpdate_shop | null; -} - -export interface ShopSettingsUpdate_shopDomainUpdate_errors { - __typename: "ShopError"; - code: ShopErrorCode; - 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[]; - shop: ShopSettingsUpdate_shopDomainUpdate_shop | null; -} - -export interface ShopSettingsUpdate_shopAddressUpdate_errors { - __typename: "ShopError"; - code: ShopErrorCode; - field: string | null; - message: string | null; -} - -export interface ShopSettingsUpdate_shopAddressUpdate_shop_companyAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface ShopSettingsUpdate_shopAddressUpdate_shop_companyAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: ShopSettingsUpdate_shopAddressUpdate_shop_companyAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface ShopSettingsUpdate_shopAddressUpdate_shop { - __typename: "Shop"; - companyAddress: ShopSettingsUpdate_shopAddressUpdate_shop_companyAddress | null; -} - -export interface ShopSettingsUpdate_shopAddressUpdate { - __typename: "ShopAddressUpdate"; - errors: ShopSettingsUpdate_shopAddressUpdate_errors[]; - shop: ShopSettingsUpdate_shopAddressUpdate_shop | null; -} - -export interface ShopSettingsUpdate { - shopSettingsUpdate: ShopSettingsUpdate_shopSettingsUpdate | null; - shopDomainUpdate: ShopSettingsUpdate_shopDomainUpdate | null; - shopAddressUpdate: ShopSettingsUpdate_shopAddressUpdate | null; -} - -export interface ShopSettingsUpdateVariables { - shopDomainInput: SiteDomainInput; - shopSettingsInput: ShopSettingsInput; - addressInput?: AddressInput | null; - isCloudInstance: boolean; -} diff --git a/src/siteSettings/types/SiteSettings.ts b/src/siteSettings/types/SiteSettings.ts deleted file mode 100644 index 41977fd52..000000000 --- a/src/siteSettings/types/SiteSettings.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: SiteSettings -// ==================================================== - -export interface SiteSettings_shop_companyAddress_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface SiteSettings_shop_companyAddress { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: SiteSettings_shop_companyAddress_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface SiteSettings_shop_countries { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface SiteSettings_shop_domain { - __typename: "Domain"; - host: string; -} - -export interface SiteSettings_shop { - __typename: "Shop"; - companyAddress: SiteSettings_shop_companyAddress | null; - countries: SiteSettings_shop_countries[]; - customerSetPasswordUrl: string | null; - defaultMailSenderAddress: string | null; - defaultMailSenderName: string | null; - description: string | null; - domain: SiteSettings_shop_domain; - name: string; - reserveStockDurationAnonymousUser: number | null; - reserveStockDurationAuthenticatedUser: number | null; - limitQuantityPerCheckout: number | null; -} - -export interface SiteSettings { - shop: SiteSettings_shop; -} diff --git a/src/siteSettings/views/index.tsx b/src/siteSettings/views/index.tsx index 7e2e37dd7..72078cbf8 100644 --- a/src/siteSettings/views/index.tsx +++ b/src/siteSettings/views/index.tsx @@ -1,5 +1,10 @@ import { WindowTitle } from "@saleor/components/WindowTitle"; import { IS_CLOUD_INSTANCE } from "@saleor/config"; +import { + CountryCode, + useShopSettingsUpdateMutation, + useSiteSettingsQuery +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages, sectionNames } from "@saleor/intl"; @@ -8,14 +13,10 @@ import { useIntl } from "react-intl"; import { configurationMenuUrl } from "../../configuration"; import { extractMutationErrors, findInEnum } from "../../misc"; -import { CountryCode } from "../../types/globalTypes"; import SiteSettingsPage, { areAddressInputFieldsModified, SiteSettingsPageFormData } from "../components/SiteSettingsPage"; -import { TypedShopSettingsUpdate } from "../mutations"; -import { TypedSiteSettingsQuery } from "../queries"; -import { ShopSettingsUpdate } from "../types/ShopSettingsUpdate"; import { SiteSettingsUrlQueryParams } from "../urls"; export interface SiteSettingsProps { @@ -27,92 +28,86 @@ export const SiteSettings: React.FC = () => { const notify = useNotifier(); const intl = useIntl(); - const handleSiteSettingsSuccess = (data: ShopSettingsUpdate) => { - if ( - [ - ...data.shopAddressUpdate.errors, - ...data.shopSettingsUpdate.errors, - ...(data.shopDomainUpdate?.errors || []) - ].length === 0 - ) { - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); + const siteSettings = useSiteSettingsQuery({ + displayLoader: true + }); + + const [ + updateShopSettings, + updateShopSettingsOpts + ] = useShopSettingsUpdateMutation({ + onCompleted: data => { + if ( + [ + ...data.shopAddressUpdate.errors, + ...data.shopSettingsUpdate.errors, + ...(data.shopDomainUpdate?.errors || []) + ].length === 0 + ) { + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + } } + }); + + const errors = [ + ...(updateShopSettingsOpts.data?.shopDomainUpdate?.errors || []), + ...(updateShopSettingsOpts.data?.shopSettingsUpdate.errors || []), + ...(updateShopSettingsOpts.data?.shopAddressUpdate.errors || []) + ]; + const loading = siteSettings.loading || updateShopSettingsOpts.loading; + + const handleUpdateShopSettings = async (data: SiteSettingsPageFormData) => { + const addressInput = areAddressInputFieldsModified(data) + ? { + city: data.city, + companyName: data.companyName, + country: findInEnum(data.country, CountryCode), + countryArea: data.countryArea, + phone: data.phone, + postalCode: data.postalCode, + streetAddress1: data.streetAddress1, + streetAddress2: data.streetAddress2 + } + : { + companyName: data.companyName + }; + + return extractMutationErrors( + updateShopSettings({ + variables: { + addressInput, + shopDomainInput: { + domain: data.domain, + name: data.name + }, + shopSettingsInput: { + description: data.description, + reserveStockDurationAnonymousUser: + data.reserveStockDurationAnonymousUser || null, + reserveStockDurationAuthenticatedUser: + data.reserveStockDurationAuthenticatedUser || null + }, + isCloudInstance: IS_CLOUD_INSTANCE + } + }) + ); }; return ( - - {siteSettings => ( - - {(updateShopSettings, updateShopSettingsOpts) => { - const errors = [ - ...(updateShopSettingsOpts.data?.shopDomainUpdate?.errors || []), - ...(updateShopSettingsOpts.data?.shopSettingsUpdate.errors || []), - ...(updateShopSettingsOpts.data?.shopAddressUpdate.errors || []) - ]; - const loading = - siteSettings.loading || updateShopSettingsOpts.loading; - - const handleUpdateShopSettings = async ( - data: SiteSettingsPageFormData - ) => { - const addressInput = areAddressInputFieldsModified(data) - ? { - city: data.city, - companyName: data.companyName, - country: findInEnum(data.country, CountryCode), - countryArea: data.countryArea, - phone: data.phone, - postalCode: data.postalCode, - streetAddress1: data.streetAddress1, - streetAddress2: data.streetAddress2 - } - : { - companyName: data.companyName - }; - - return extractMutationErrors( - updateShopSettings({ - variables: { - addressInput, - shopDomainInput: { - domain: data.domain, - name: data.name - }, - shopSettingsInput: { - description: data.description, - reserveStockDurationAnonymousUser: - data.reserveStockDurationAnonymousUser || null, - reserveStockDurationAuthenticatedUser: - data.reserveStockDurationAuthenticatedUser || null - }, - isCloudInstance: IS_CLOUD_INSTANCE - } - }) - ); - }; - - return ( - <> - - navigate(configurationMenuUrl)} - onSubmit={handleUpdateShopSettings} - saveButtonBarState={updateShopSettingsOpts.status} - /> - - ); - }} - - )} - + <> + + navigate(configurationMenuUrl)} + onSubmit={handleUpdateShopSettings} + saveButtonBarState={updateShopSettingsOpts.status} + /> + ); }; export default SiteSettings; diff --git a/src/staff/components/StaffAddMemberDialog/StaffAddMemberDialog.tsx b/src/staff/components/StaffAddMemberDialog/StaffAddMemberDialog.tsx index b76c9a738..d3499ab6a 100644 --- a/src/staff/components/StaffAddMemberDialog/StaffAddMemberDialog.tsx +++ b/src/staff/components/StaffAddMemberDialog/StaffAddMemberDialog.tsx @@ -9,13 +9,15 @@ import BackButton from "@saleor/components/BackButton"; import ConfirmButton from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; -import { StaffErrorFragment } from "@saleor/fragments/types/StaffErrorFragment"; +import { + SearchPermissionGroupsQuery, + StaffErrorFragment +} from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import { commonMessages } from "@saleor/intl"; import { ConfirmButtonTransitionState, makeStyles } from "@saleor/macaw-ui"; -import { SearchPermissionGroups_search_edges_node } from "@saleor/searches/types/SearchPermissionGroups"; -import { FetchMoreProps, SearchPageProps } from "@saleor/types"; +import { FetchMoreProps, RelayToFlat, SearchPageProps } from "@saleor/types"; import { getFormErrors } from "@saleor/utils/errors"; import getStaffErrorMessage from "@saleor/utils/errors/staff"; import React from "react"; @@ -58,7 +60,7 @@ const useStyles = makeStyles( ); interface StaffAddMemberDialogProps extends SearchPageProps { - availablePermissionGroups: SearchPermissionGroups_search_edges_node[]; + availablePermissionGroups: RelayToFlat; confirmButtonState: ConfirmButtonTransitionState; disabled: boolean; errors: StaffErrorFragment[]; diff --git a/src/staff/components/StaffDetailsPage/StaffDetailsPage.tsx b/src/staff/components/StaffDetailsPage/StaffDetailsPage.tsx index 8baba1c0d..93be2dac9 100644 --- a/src/staff/components/StaffDetailsPage/StaffDetailsPage.tsx +++ b/src/staff/components/StaffDetailsPage/StaffDetailsPage.tsx @@ -8,22 +8,23 @@ import Grid from "@saleor/components/Grid"; import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; -import { StaffErrorFragment } from "@saleor/fragments/types/StaffErrorFragment"; +import { + SearchPermissionGroupsQuery, + StaffErrorFragment, + StaffMemberDetailsFragment +} from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import useLocale from "@saleor/hooks/useLocale"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { getUserName } from "@saleor/misc"; -import { SearchPermissionGroups_search_edges_node } from "@saleor/searches/types/SearchPermissionGroups"; import UserStatus from "@saleor/staff/components/UserStatus"; -import { FetchMoreProps, SearchPageProps } from "@saleor/types"; +import { FetchMoreProps, RelayToFlat, SearchPageProps } from "@saleor/types"; import createMultiAutocompleteSelectHandler from "@saleor/utils/handlers/multiAutocompleteSelectChangeHandler"; import React from "react"; import { useIntl } from "react-intl"; -import { StaffMemberDetails_user } from "../../types/StaffMemberDetails"; import StaffPassword from "../StaffPassword/StaffPassword"; import StaffPreferences from "../StaffPreferences"; import StaffProperties from "../StaffProperties/StaffProperties"; @@ -39,7 +40,7 @@ export interface StaffDetailsFormData { } export interface StaffDetailsPageProps extends SearchPageProps { - availablePermissionGroups: SearchPermissionGroups_search_edges_node[]; + availablePermissionGroups: RelayToFlat; canEditAvatar: boolean; canEditPreferences: boolean; canEditStatus: boolean; @@ -47,7 +48,7 @@ export interface StaffDetailsPageProps extends SearchPageProps { disabled: boolean; fetchMorePermissionGroups: FetchMoreProps; saveButtonBarState: ConfirmButtonTransitionState; - staffMember: StaffMemberDetails_user; + staffMember: StaffMemberDetailsFragment; errors: StaffErrorFragment[]; onBack: () => void; onChangePassword: () => void; diff --git a/src/staff/components/StaffList/StaffList.tsx b/src/staff/components/StaffList/StaffList.tsx index b8e29ac2c..181ff3870 100644 --- a/src/staff/components/StaffList/StaffList.tsx +++ b/src/staff/components/StaffList/StaffList.tsx @@ -10,6 +10,7 @@ import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import TableCellHeader from "@saleor/components/TableCellHeader"; import TablePagination from "@saleor/components/TablePagination"; +import { StaffListQuery } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; import { getUserInitials, @@ -18,14 +19,12 @@ import { renderCollection } from "@saleor/misc"; import { StaffListUrlSortField } from "@saleor/staff/urls"; -import { ListProps, SortPage } from "@saleor/types"; +import { ListProps, RelayToFlat, SortPage } from "@saleor/types"; import { getArrowDirection } from "@saleor/utils/sort"; import classNames from "classnames"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { StaffList_staffUsers_edges_node } from "../../types/StaffList"; - const useStyles = makeStyles( theme => ({ avatar: { @@ -70,7 +69,7 @@ const useStyles = makeStyles( ); interface StaffListProps extends ListProps, SortPage { - staffMembers: StaffList_staffUsers_edges_node[]; + staffMembers: RelayToFlat; } const numberOfColumns = 2; diff --git a/src/staff/components/StaffListPage/StaffListPage.stories.tsx b/src/staff/components/StaffListPage/StaffListPage.stories.tsx index 46b073165..045af271d 100644 --- a/src/staff/components/StaffListPage/StaffListPage.stories.tsx +++ b/src/staff/components/StaffListPage/StaffListPage.stories.tsx @@ -7,10 +7,10 @@ import { sortPageProps, tabPageProps } from "@saleor/fixtures"; +import { StaffMemberStatus } from "@saleor/graphql"; import { staffMembers } from "@saleor/staff/fixtures"; import { StaffListUrlSortField } from "@saleor/staff/urls"; import Decorator from "@saleor/storybook/Decorator"; -import { StaffMemberStatus } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/staff/components/StaffListPage/StaffListPage.tsx b/src/staff/components/StaffListPage/StaffListPage.tsx index 043c4a047..b975a94cb 100644 --- a/src/staff/components/StaffListPage/StaffListPage.tsx +++ b/src/staff/components/StaffListPage/StaffListPage.tsx @@ -3,13 +3,14 @@ import { Container } from "@saleor/components/Container"; import FilterBar from "@saleor/components/FilterBar"; import LimitReachedAlert from "@saleor/components/LimitReachedAlert"; import PageHeader from "@saleor/components/PageHeader"; -import { RefreshLimits_shop_limits } from "@saleor/components/Shop/types/RefreshLimits"; +import { RefreshLimitsQuery, StaffListQuery } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { Backlink, Button } from "@saleor/macaw-ui"; import { StaffListUrlSortField } from "@saleor/staff/urls"; import { FilterPageProps, ListProps, + RelayToFlat, SortPage, TabPageProps } from "@saleor/types"; @@ -17,7 +18,6 @@ import { hasLimits, isLimitReached } from "@saleor/utils/limits"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { StaffList_staffUsers_edges_node } from "../../types/StaffList"; import StaffList from "../StaffList/StaffList"; import { createFilterStructure, @@ -30,8 +30,8 @@ export interface StaffListPageProps FilterPageProps, SortPage, TabPageProps { - limits: RefreshLimits_shop_limits; - staffMembers: StaffList_staffUsers_edges_node[]; + limits: RefreshLimitsQuery["shop"]["limits"]; + staffMembers: RelayToFlat; onAdd: () => void; onBack: () => void; } diff --git a/src/staff/components/StaffListPage/filters.ts b/src/staff/components/StaffListPage/filters.ts index 19f3338f2..a9d1c88fd 100644 --- a/src/staff/components/StaffListPage/filters.ts +++ b/src/staff/components/StaffListPage/filters.ts @@ -1,6 +1,6 @@ import { IFilter } from "@saleor/components/Filter"; +import { StaffMemberStatus } from "@saleor/graphql"; import { FilterOpts } from "@saleor/types"; -import { StaffMemberStatus } from "@saleor/types/globalTypes"; import { createOptionsField } from "@saleor/utils/filters/fields"; import { defineMessages, IntlShape } from "react-intl"; diff --git a/src/staff/components/StaffPasswordResetDialog/StaffPasswordResetDialog.tsx b/src/staff/components/StaffPasswordResetDialog/StaffPasswordResetDialog.tsx index 40506ac56..3012f0d0e 100644 --- a/src/staff/components/StaffPasswordResetDialog/StaffPasswordResetDialog.tsx +++ b/src/staff/components/StaffPasswordResetDialog/StaffPasswordResetDialog.tsx @@ -9,7 +9,7 @@ import BackButton from "@saleor/components/BackButton"; import ConfirmButton from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; -import { AccountErrorFragment } from "@saleor/fragments/types/AccountErrorFragment"; +import { AccountErrorFragment } from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors"; import { buttonMessages } from "@saleor/intl"; diff --git a/src/staff/components/StaffProperties/StaffProperties.tsx b/src/staff/components/StaffProperties/StaffProperties.tsx index 4016ff398..d1e650d9e 100644 --- a/src/staff/components/StaffProperties/StaffProperties.tsx +++ b/src/staff/components/StaffProperties/StaffProperties.tsx @@ -1,7 +1,10 @@ import photoIcon from "@assets/images/photo-icon.svg"; import { Card, CardContent, TextField, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; -import { StaffErrorFragment } from "@saleor/fragments/types/StaffErrorFragment"; +import { + StaffErrorFragment, + StaffMemberDetailsFragment +} from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { makeStyles } from "@saleor/macaw-ui"; import { getFormErrors } from "@saleor/utils/errors"; @@ -11,7 +14,6 @@ import SVG from "react-inlinesvg"; import { FormattedMessage, useIntl } from "react-intl"; import { getUserInitials } from "../../../misc"; -import { StaffMemberDetails_user } from "../../types/StaffMemberDetails"; const useStyles = makeStyles( theme => ({ @@ -103,7 +105,7 @@ interface StaffPropertiesProps { }; errors: StaffErrorFragment[]; disabled: boolean; - staffMember: StaffMemberDetails_user; + staffMember: StaffMemberDetailsFragment; onChange: (event: React.ChangeEvent) => void; onImageDelete: () => void; onImageUpload: (file: File) => void; diff --git a/src/staff/fixtures.ts b/src/staff/fixtures.ts index 27ddc0081..e17961fb3 100644 --- a/src/staff/fixtures.ts +++ b/src/staff/fixtures.ts @@ -1,10 +1,9 @@ import avatarImage from "@assets/images/avatars/avatar1.png"; import { permissions } from "@saleor/fixtures"; +import { StaffListQuery, StaffMemberDetailsFragment } from "@saleor/graphql"; +import { RelayToFlat } from "@saleor/types"; -import { StaffList_staffUsers_edges_node } from "./types/StaffList"; -import { StaffMemberDetails_user } from "./types/StaffMemberDetails"; - -export const staffMembers: StaffList_staffUsers_edges_node[] = [ +export const staffMembers: RelayToFlat = [ { avatar: { __typename: "Image" as "Image", @@ -138,7 +137,7 @@ export const staffMembers: StaffList_staffUsers_edges_node[] = [ lastName: "Smith" } ].map(staffMember => ({ __typename: "User" as "User", ...staffMember })); -export const staffMember: StaffMemberDetails_user = { +export const staffMember: StaffMemberDetailsFragment = { __typename: "User", avatar: { __typename: "Image" as "Image", url: avatarImage }, email: "admin@example.com", diff --git a/src/staff/mutations.ts b/src/staff/mutations.ts index b25c7de39..95c4a1454 100644 --- a/src/staff/mutations.ts +++ b/src/staff/mutations.ts @@ -1,93 +1,46 @@ import { gql } from "@apollo/client"; -import { - accountErrorFragment, - staffErrorFragment -} from "@saleor/fragments/errors"; -import { staffMemberDetailsFragment } from "@saleor/fragments/staff"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { TypedMutation } from "../mutations"; -import { - ChangeStaffPassword, - ChangeStaffPasswordVariables -} from "./types/ChangeStaffPassword"; -import { StaffAvatarDelete } from "./types/StaffAvatarDelete"; -import { - StaffAvatarUpdate, - StaffAvatarUpdateVariables -} from "./types/StaffAvatarUpdate"; -import { - StaffMemberAdd, - StaffMemberAddVariables -} from "./types/StaffMemberAdd"; -import { - StaffMemberDelete, - StaffMemberDeleteVariables -} from "./types/StaffMemberDelete"; -import { - StaffMemberUpdate, - StaffMemberUpdateVariables -} from "./types/StaffMemberUpdate"; - -const staffMemberAddMutation = gql` - ${staffErrorFragment} - ${staffMemberDetailsFragment} +export const staffMemberAddMutation = gql` mutation StaffMemberAdd($input: StaffCreateInput!) { staffCreate(input: $input) { errors { - ...StaffErrorFragment + ...StaffError } user { - ...StaffMemberDetailsFragment + ...StaffMemberDetails } } } `; -export const useStaffMemberAddMutation = makeMutation< - StaffMemberAdd, - StaffMemberAddVariables ->(staffMemberAddMutation); -const staffMemberUpdateMutation = gql` - ${staffErrorFragment} - ${staffMemberDetailsFragment} +export const staffMemberUpdateMutation = gql` mutation StaffMemberUpdate($id: ID!, $input: StaffUpdateInput!) { staffUpdate(id: $id, input: $input) { errors { - ...StaffErrorFragment + ...StaffError } user { - ...StaffMemberDetailsFragment + ...StaffMemberDetails } } } `; -export const useStaffMemberUpdateMutation = makeMutation< - StaffMemberUpdate, - StaffMemberUpdateVariables ->(staffMemberUpdateMutation); -const staffMemberDeleteMutation = gql` - ${staffErrorFragment} +export const staffMemberDeleteMutation = gql` mutation StaffMemberDelete($id: ID!) { staffDelete(id: $id) { errors { - ...StaffErrorFragment + ...StaffError } } } `; -export const TypedStaffMemberDeleteMutation = TypedMutation< - StaffMemberDelete, - StaffMemberDeleteVariables ->(staffMemberDeleteMutation); -const staffAvatarUpdateMutation = gql` - ${accountErrorFragment} +export const staffAvatarUpdateMutation = gql` mutation StaffAvatarUpdate($image: Upload!) { userAvatarUpdate(image: $image) { errors { - ...AccountErrorFragment + ...AccountError } user { id @@ -98,17 +51,12 @@ const staffAvatarUpdateMutation = gql` } } `; -export const TypedStaffAvatarUpdateMutation = TypedMutation< - StaffAvatarUpdate, - StaffAvatarUpdateVariables ->(staffAvatarUpdateMutation); -const staffAvatarDeleteMutation = gql` - ${accountErrorFragment} +export const staffAvatarDeleteMutation = gql` mutation StaffAvatarDelete { userAvatarDelete { errors { - ...AccountErrorFragment + ...AccountError } user { id @@ -119,22 +67,13 @@ const staffAvatarDeleteMutation = gql` } } `; -export const TypedStaffAvatarDeleteMutation = TypedMutation< - StaffAvatarDelete, - StaffMemberDeleteVariables ->(staffAvatarDeleteMutation); -const changeStaffPassword = gql` - ${accountErrorFragment} +export const changeStaffPassword = gql` mutation ChangeStaffPassword($newPassword: String!, $oldPassword: String!) { passwordChange(newPassword: $newPassword, oldPassword: $oldPassword) { errors { - ...AccountErrorFragment + ...AccountError } } } `; -export const useChangeStaffPassword = makeMutation< - ChangeStaffPassword, - ChangeStaffPasswordVariables ->(changeStaffPassword); diff --git a/src/staff/queries.ts b/src/staff/queries.ts index 6a33fb2e4..a5eb027bd 100644 --- a/src/staff/queries.ts +++ b/src/staff/queries.ts @@ -1,19 +1,6 @@ import { gql } from "@apollo/client"; -import { - staffMemberDetailsFragment, - staffMemberFragment -} from "@saleor/fragments/staff"; -import makeQuery from "@saleor/hooks/makeQuery"; -import { TypedQuery } from "../queries"; -import { StaffList, StaffListVariables } from "./types/StaffList"; -import { - StaffMemberDetails, - StaffMemberDetailsVariables -} from "./types/StaffMemberDetails"; - -const staffList = gql` - ${staffMemberFragment} +export const staffList = gql` query StaffList( $first: Int $after: String @@ -33,7 +20,7 @@ const staffList = gql` edges { cursor node { - ...StaffMemberFragment + ...StaffMember avatar(size: 48) { url } @@ -48,19 +35,11 @@ const staffList = gql` } } `; -export const useStaffListQuery = makeQuery( - staffList -); export const staffMemberDetails = gql` - ${staffMemberDetailsFragment} query StaffMemberDetails($id: ID!) { user(id: $id) { - ...StaffMemberDetailsFragment + ...StaffMemberDetails } } `; -export const TypedStaffMemberDetailsQuery = TypedQuery< - StaffMemberDetails, - StaffMemberDetailsVariables ->(staffMemberDetails); diff --git a/src/staff/types/ChangeStaffPassword.ts b/src/staff/types/ChangeStaffPassword.ts deleted file mode 100644 index 686f0579c..000000000 --- a/src/staff/types/ChangeStaffPassword.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AccountErrorCode, AddressTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ChangeStaffPassword -// ==================================================== - -export interface ChangeStaffPassword_passwordChange_errors { - __typename: "AccountError"; - code: AccountErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface ChangeStaffPassword_passwordChange { - __typename: "PasswordChange"; - errors: ChangeStaffPassword_passwordChange_errors[]; -} - -export interface ChangeStaffPassword { - passwordChange: ChangeStaffPassword_passwordChange | null; -} - -export interface ChangeStaffPasswordVariables { - newPassword: string; - oldPassword: string; -} diff --git a/src/staff/types/StaffAvatarDelete.ts b/src/staff/types/StaffAvatarDelete.ts deleted file mode 100644 index 203ffef95..000000000 --- a/src/staff/types/StaffAvatarDelete.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AccountErrorCode, AddressTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: StaffAvatarDelete -// ==================================================== - -export interface StaffAvatarDelete_userAvatarDelete_errors { - __typename: "AccountError"; - code: AccountErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface StaffAvatarDelete_userAvatarDelete_user_avatar { - __typename: "Image"; - url: string; -} - -export interface StaffAvatarDelete_userAvatarDelete_user { - __typename: "User"; - id: string; - avatar: StaffAvatarDelete_userAvatarDelete_user_avatar | null; -} - -export interface StaffAvatarDelete_userAvatarDelete { - __typename: "UserAvatarDelete"; - errors: StaffAvatarDelete_userAvatarDelete_errors[]; - user: StaffAvatarDelete_userAvatarDelete_user | null; -} - -export interface StaffAvatarDelete { - userAvatarDelete: StaffAvatarDelete_userAvatarDelete | null; -} diff --git a/src/staff/types/StaffAvatarUpdate.ts b/src/staff/types/StaffAvatarUpdate.ts deleted file mode 100644 index 286405d8a..000000000 --- a/src/staff/types/StaffAvatarUpdate.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AccountErrorCode, AddressTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: StaffAvatarUpdate -// ==================================================== - -export interface StaffAvatarUpdate_userAvatarUpdate_errors { - __typename: "AccountError"; - code: AccountErrorCode; - field: string | null; - addressType: AddressTypeEnum | null; - message: string | null; -} - -export interface StaffAvatarUpdate_userAvatarUpdate_user_avatar { - __typename: "Image"; - url: string; -} - -export interface StaffAvatarUpdate_userAvatarUpdate_user { - __typename: "User"; - id: string; - avatar: StaffAvatarUpdate_userAvatarUpdate_user_avatar | null; -} - -export interface StaffAvatarUpdate_userAvatarUpdate { - __typename: "UserAvatarUpdate"; - errors: StaffAvatarUpdate_userAvatarUpdate_errors[]; - user: StaffAvatarUpdate_userAvatarUpdate_user | null; -} - -export interface StaffAvatarUpdate { - userAvatarUpdate: StaffAvatarUpdate_userAvatarUpdate | null; -} - -export interface StaffAvatarUpdateVariables { - image: any; -} diff --git a/src/staff/types/StaffList.ts b/src/staff/types/StaffList.ts deleted file mode 100644 index 3003b52fc..000000000 --- a/src/staff/types/StaffList.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { StaffUserInput, UserSortingInput } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: StaffList -// ==================================================== - -export interface StaffList_staffUsers_edges_node_avatar { - __typename: "Image"; - url: string; -} - -export interface StaffList_staffUsers_edges_node { - __typename: "User"; - id: string; - email: string; - firstName: string; - isActive: boolean; - lastName: string; - avatar: StaffList_staffUsers_edges_node_avatar | null; -} - -export interface StaffList_staffUsers_edges { - __typename: "UserCountableEdge"; - cursor: string; - node: StaffList_staffUsers_edges_node; -} - -export interface StaffList_staffUsers_pageInfo { - __typename: "PageInfo"; - hasPreviousPage: boolean; - hasNextPage: boolean; - startCursor: string | null; - endCursor: string | null; -} - -export interface StaffList_staffUsers { - __typename: "UserCountableConnection"; - edges: StaffList_staffUsers_edges[]; - pageInfo: StaffList_staffUsers_pageInfo; -} - -export interface StaffList { - staffUsers: StaffList_staffUsers | null; -} - -export interface StaffListVariables { - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; - filter?: StaffUserInput | null; - sort?: UserSortingInput | null; -} diff --git a/src/staff/types/StaffMemberAdd.ts b/src/staff/types/StaffMemberAdd.ts deleted file mode 100644 index 9531bb227..000000000 --- a/src/staff/types/StaffMemberAdd.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { StaffCreateInput, AccountErrorCode, PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: StaffMemberAdd -// ==================================================== - -export interface StaffMemberAdd_staffCreate_errors { - __typename: "StaffError"; - code: AccountErrorCode; - field: string | null; - message: string | null; -} - -export interface StaffMemberAdd_staffCreate_user_permissionGroups { - __typename: "Group"; - id: string; - name: string; - userCanManage: boolean; -} - -export interface StaffMemberAdd_staffCreate_user_userPermissions { - __typename: "UserPermission"; - code: PermissionEnum; - name: string; -} - -export interface StaffMemberAdd_staffCreate_user_avatar { - __typename: "Image"; - url: string; -} - -export interface StaffMemberAdd_staffCreate_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - isActive: boolean; - lastName: string; - permissionGroups: (StaffMemberAdd_staffCreate_user_permissionGroups | null)[] | null; - userPermissions: (StaffMemberAdd_staffCreate_user_userPermissions | null)[] | null; - avatar: StaffMemberAdd_staffCreate_user_avatar | null; -} - -export interface StaffMemberAdd_staffCreate { - __typename: "StaffCreate"; - errors: StaffMemberAdd_staffCreate_errors[]; - user: StaffMemberAdd_staffCreate_user | null; -} - -export interface StaffMemberAdd { - staffCreate: StaffMemberAdd_staffCreate | null; -} - -export interface StaffMemberAddVariables { - input: StaffCreateInput; -} diff --git a/src/staff/types/StaffMemberDelete.ts b/src/staff/types/StaffMemberDelete.ts deleted file mode 100644 index 8f94ea150..000000000 --- a/src/staff/types/StaffMemberDelete.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AccountErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: StaffMemberDelete -// ==================================================== - -export interface StaffMemberDelete_staffDelete_errors { - __typename: "StaffError"; - code: AccountErrorCode; - field: string | null; - message: string | null; -} - -export interface StaffMemberDelete_staffDelete { - __typename: "StaffDelete"; - errors: StaffMemberDelete_staffDelete_errors[]; -} - -export interface StaffMemberDelete { - staffDelete: StaffMemberDelete_staffDelete | null; -} - -export interface StaffMemberDeleteVariables { - id: string; -} diff --git a/src/staff/types/StaffMemberDetails.ts b/src/staff/types/StaffMemberDetails.ts deleted file mode 100644 index c4e407c7d..000000000 --- a/src/staff/types/StaffMemberDetails.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: StaffMemberDetails -// ==================================================== - -export interface StaffMemberDetails_user_permissionGroups { - __typename: "Group"; - id: string; - name: string; - userCanManage: boolean; -} - -export interface StaffMemberDetails_user_userPermissions { - __typename: "UserPermission"; - code: PermissionEnum; - name: string; -} - -export interface StaffMemberDetails_user_avatar { - __typename: "Image"; - url: string; -} - -export interface StaffMemberDetails_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - isActive: boolean; - lastName: string; - permissionGroups: (StaffMemberDetails_user_permissionGroups | null)[] | null; - userPermissions: (StaffMemberDetails_user_userPermissions | null)[] | null; - avatar: StaffMemberDetails_user_avatar | null; -} - -export interface StaffMemberDetails { - user: StaffMemberDetails_user | null; -} - -export interface StaffMemberDetailsVariables { - id: string; -} diff --git a/src/staff/types/StaffMemberUpdate.ts b/src/staff/types/StaffMemberUpdate.ts deleted file mode 100644 index a54e66e39..000000000 --- a/src/staff/types/StaffMemberUpdate.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { StaffUpdateInput, AccountErrorCode, PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: StaffMemberUpdate -// ==================================================== - -export interface StaffMemberUpdate_staffUpdate_errors { - __typename: "StaffError"; - code: AccountErrorCode; - field: string | null; - message: string | null; -} - -export interface StaffMemberUpdate_staffUpdate_user_permissionGroups { - __typename: "Group"; - id: string; - name: string; - userCanManage: boolean; -} - -export interface StaffMemberUpdate_staffUpdate_user_userPermissions { - __typename: "UserPermission"; - code: PermissionEnum; - name: string; -} - -export interface StaffMemberUpdate_staffUpdate_user_avatar { - __typename: "Image"; - url: string; -} - -export interface StaffMemberUpdate_staffUpdate_user { - __typename: "User"; - id: string; - email: string; - firstName: string; - isActive: boolean; - lastName: string; - permissionGroups: (StaffMemberUpdate_staffUpdate_user_permissionGroups | null)[] | null; - userPermissions: (StaffMemberUpdate_staffUpdate_user_userPermissions | null)[] | null; - avatar: StaffMemberUpdate_staffUpdate_user_avatar | null; -} - -export interface StaffMemberUpdate_staffUpdate { - __typename: "StaffUpdate"; - errors: StaffMemberUpdate_staffUpdate_errors[]; - user: StaffMemberUpdate_staffUpdate_user | null; -} - -export interface StaffMemberUpdate { - staffUpdate: StaffMemberUpdate_staffUpdate | null; -} - -export interface StaffMemberUpdateVariables { - id: string; - input: StaffUpdateInput; -} diff --git a/src/staff/utils.ts b/src/staff/utils.ts index dbe92eaab..5b7b21525 100644 --- a/src/staff/utils.ts +++ b/src/staff/utils.ts @@ -1,13 +1,13 @@ +import { StaffMemberDetailsFragment } from "@saleor/graphql"; import difference from "lodash/difference"; import { StaffDetailsFormData } from "./components/StaffDetailsPage"; -import { StaffMemberDetails_user } from "./types/StaffMemberDetails"; /** * Return lists of groups which have to be added and removed from user. */ export const groupsDiff = ( - user: StaffMemberDetails_user, + user: StaffMemberDetailsFragment, formData: StaffDetailsFormData ) => { const newGroups = formData.permissionGroups; diff --git a/src/staff/views/StaffDetails.tsx b/src/staff/views/StaffDetails.tsx index 81638d667..00662acc4 100644 --- a/src/staff/views/StaffDetails.tsx +++ b/src/staff/views/StaffDetails.tsx @@ -4,6 +4,14 @@ import ActionDialog from "@saleor/components/ActionDialog"; import NotFoundPage from "@saleor/components/NotFoundPage"; import { WindowTitle } from "@saleor/components/WindowTitle"; import { DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; +import { + useChangeStaffPasswordMutation, + useStaffAvatarDeleteMutation, + useStaffAvatarUpdateMutation, + useStaffMemberDeleteMutation, + useStaffMemberDetailsQuery, + useStaffMemberUpdateMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages, errorMessages } from "@saleor/intl"; @@ -21,19 +29,6 @@ import StaffDetailsPage, { StaffDetailsFormData } from "../components/StaffDetailsPage/StaffDetailsPage"; import StaffPasswordResetDialog from "../components/StaffPasswordResetDialog"; -import { - TypedStaffAvatarDeleteMutation, - TypedStaffAvatarUpdateMutation, - TypedStaffMemberDeleteMutation, - useChangeStaffPassword, - useStaffMemberUpdateMutation -} from "../mutations"; -import { TypedStaffMemberDetailsQuery } from "../queries"; -import { ChangeStaffPassword } from "../types/ChangeStaffPassword"; -import { StaffAvatarDelete } from "../types/StaffAvatarDelete"; -import { StaffAvatarUpdate } from "../types/StaffAvatarUpdate"; -import { StaffMemberDelete } from "../types/StaffMemberDelete"; -import { StaffMemberUpdate } from "../types/StaffMemberUpdate"; import { staffListUrl, staffMemberDetailsUrl, @@ -59,21 +54,26 @@ export const StaffDetails: React.FC = ({ id, params }) => { action: undefined }) ); + const handleBack = () => navigate(staffListUrl()); - const handleChangePassword = (data: ChangeStaffPassword) => { - if (data.passwordChange.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - closeModal(); - } - }; - const [changePassword, changePasswordOpts] = useChangeStaffPassword({ - onCompleted: handleChangePassword + const { data, loading, refetch } = useStaffMemberDetailsQuery({ + displayLoader: true, + variables: { id } }); - const handleBack = () => navigate(staffListUrl()); + const staffMember = data?.user; + + const [changePassword, changePasswordOpts] = useChangeStaffPasswordMutation({ + onCompleted: data => { + if (data.passwordChange.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + closeModal(); + } + } + }); const { loadMore: loadMorePermissionGroups, @@ -83,236 +83,192 @@ export const StaffDetails: React.FC = ({ id, params }) => { variables: DEFAULT_INITIAL_SEARCH_DATA }); - const handleStaffMemberUpdateComplete = (data: StaffMemberUpdate) => { - if (!maybe(() => data.staffUpdate.errors.length !== 0)) { - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - } - }; - const [ updateStaffMember, updateStaffMemberOpts ] = useStaffMemberUpdateMutation({ - onCompleted: handleStaffMemberUpdateComplete + onCompleted: data => { + if (!maybe(() => data.staffUpdate.errors.length !== 0)) { + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + } + } }); - return ( - - {({ data, loading, refetch }) => { - const staffMember = data?.user; + const [deleteStaffMember, deleteResult] = useStaffMemberDeleteMutation({ + onCompleted: data => { + if (!maybe(() => data.staffDelete.errors.length !== 0)) { + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + navigate(staffListUrl()); + } + } + }); - if (staffMember === null) { - return ; + const [updateStaffAvatar] = useStaffAvatarUpdateMutation({ + onCompleted: data => { + if (!maybe(() => data.userAvatarUpdate.errors.length !== 0)) { + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + refetch(); + } else { + notify({ + status: "error", + title: intl.formatMessage(errorMessages.imgageUploadErrorTitle), + text: intl.formatMessage(errorMessages.imageUploadErrorText) + }); + } + } + }); + + const [deleteStaffAvatar, deleteAvatarResult] = useStaffAvatarDeleteMutation({ + onCompleted: data => { + if (!maybe(() => data.userAvatarDelete.errors.length !== 0)) { + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + navigate(staffMemberDetailsUrl(id)); + refetch(); + } + } + }); + + if (staffMember === null) { + return ; + } + + const handleUpdate = (formData: StaffDetailsFormData) => + extractMutationErrors( + updateStaffMember({ + variables: { + id, + input: { + email: formData.email, + firstName: formData.firstName, + isActive: formData.isActive, + lastName: formData.lastName, + ...groupsDiff(data?.user, formData) + } } + }) + ); - const handleStaffMemberDelete = (data: StaffMemberDelete) => { - if (!maybe(() => data.staffDelete.errors.length !== 0)) { - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - navigate(staffListUrl()); - } - }; - const handleStaffMemberAvatarUpdate = (data: StaffAvatarUpdate) => { - if (!maybe(() => data.userAvatarUpdate.errors.length !== 0)) { - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - refetch(); - } else { - notify({ - status: "error", - title: intl.formatMessage(errorMessages.imgageUploadErrorTitle), - text: intl.formatMessage(errorMessages.imageUploadErrorText) - }); - } - }; - const handleStaffMemberAvatarDelete = (data: StaffAvatarDelete) => { - if (!maybe(() => data.userAvatarDelete.errors.length !== 0)) { - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - navigate(staffMemberDetailsUrl(id)); - refetch(); - } - }; + const isUserSameAsViewer = user.user?.id === data?.user?.id; - const handleUpdate = (formData: StaffDetailsFormData) => - extractMutationErrors( - updateStaffMember({ - variables: { - id, - input: { - email: formData.email, - firstName: formData.firstName, - isActive: formData.isActive, - lastName: formData.lastName, - ...groupsDiff(data?.user, formData) - } - } + return ( + <> + + + navigate( + staffMemberDetailsUrl(id, { + action: "change-password" }) - ); - - // return ( - // - // {(updateStaffMember, updateResult) => { - - return ( - - {(deleteStaffMember, deleteResult) => ( - - {updateStaffAvatar => ( - - {(deleteStaffAvatar, deleteAvatarResult) => { - const isUserSameAsViewer = - user.user?.id === data?.user?.id; - - return ( - <> - - - navigate( - staffMemberDetailsUrl(id, { - action: "change-password" - }) - ) - } - onDelete={() => - navigate( - staffMemberDetailsUrl(id, { - action: "remove" - }) - ) - } - onSubmit={handleUpdate} - onImageUpload={file => - updateStaffAvatar({ - variables: { - image: file - } - }) - } - onImageDelete={() => - navigate( - staffMemberDetailsUrl(id, { - action: "remove-avatar" - }) - ) - } - availablePermissionGroups={mapEdgesToItems( - searchPermissionGroupsOpts?.data?.search - )} - staffMember={staffMember} - saveButtonBarState={updateStaffMemberOpts.status} - fetchMorePermissionGroups={{ - hasMore: - searchPermissionGroupsOpts.data?.search.pageInfo - .hasNextPage, - loading: searchPermissionGroupsOpts.loading, - onFetchMore: loadMorePermissionGroups - }} - onSearchChange={searchPermissionGroups} - /> - - - - - - - - - {getStringOrPlaceholder( - data?.user?.email - )} - - ) - }} - /> - - - - changePassword({ - variables: data - }) - } - /> - - ); - }} - - )} - - )} - - ); - }} - + ) + } + onDelete={() => + navigate( + staffMemberDetailsUrl(id, { + action: "remove" + }) + ) + } + onSubmit={handleUpdate} + onImageUpload={file => + updateStaffAvatar({ + variables: { + image: file + } + }) + } + onImageDelete={() => + navigate( + staffMemberDetailsUrl(id, { + action: "remove-avatar" + }) + ) + } + availablePermissionGroups={mapEdgesToItems( + searchPermissionGroupsOpts?.data?.search + )} + staffMember={staffMember} + saveButtonBarState={updateStaffMemberOpts.status} + fetchMorePermissionGroups={{ + hasMore: searchPermissionGroupsOpts.data?.search.pageInfo.hasNextPage, + loading: searchPermissionGroupsOpts.loading, + onFetchMore: loadMorePermissionGroups + }} + onSearchChange={searchPermissionGroups} + /> + + + + + + + + {getStringOrPlaceholder(data?.user?.email)} + ) + }} + /> + + + + changePassword({ + variables: data + }) + } + /> + ); }; diff --git a/src/staff/views/StaffList/StaffList.tsx b/src/staff/views/StaffList/StaffList.tsx index f9661cda9..6d977dede 100644 --- a/src/staff/views/StaffList/StaffList.tsx +++ b/src/staff/views/StaffList/StaffList.tsx @@ -3,9 +3,10 @@ import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { SaveFilterTabDialogFormData } from "@saleor/components/SaveFilterTabDialog"; -import { useShopLimitsQuery } from "@saleor/components/Shop/query"; +import { useShopLimitsQuery } from "@saleor/components/Shop/queries"; import { APP_MOUNT_URI, DEFAULT_INITIAL_SEARCH_DATA } from "@saleor/config"; import { configurationMenuUrl } from "@saleor/configuration"; +import { useStaffListQuery, useStaffMemberAddMutation } from "@saleor/graphql"; import useListSettings from "@saleor/hooks/useListSettings"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; @@ -30,8 +31,6 @@ import StaffAddMemberDialog, { AddMemberFormData } from "../../components/StaffAddMemberDialog"; import StaffListPage from "../../components/StaffListPage"; -import { useStaffMemberAddMutation } from "../../mutations"; -import { useStaffListQuery } from "../../queries"; import { staffListUrl, StaffListUrlDialog, diff --git a/src/staff/views/StaffList/filters.test.ts b/src/staff/views/StaffList/filters.test.ts index b6e64b431..fc6b319ab 100644 --- a/src/staff/views/StaffList/filters.test.ts +++ b/src/staff/views/StaffList/filters.test.ts @@ -1,6 +1,6 @@ +import { StaffMemberStatus } from "@saleor/graphql"; import { createFilterStructure } from "@saleor/staff/components/StaffListPage"; import { StaffListUrlFilters } from "@saleor/staff/urls"; -import { StaffMemberStatus } from "@saleor/types/globalTypes"; import { getFilterQueryParams } from "@saleor/utils/filters"; import { stringifyQs } from "@saleor/utils/urls"; import { getExistingKeys, setFilterOptsStatus } from "@test/filters"; diff --git a/src/staff/views/StaffList/filters.ts b/src/staff/views/StaffList/filters.ts index 50fac86cf..4bcfb0b3c 100644 --- a/src/staff/views/StaffList/filters.ts +++ b/src/staff/views/StaffList/filters.ts @@ -1,10 +1,10 @@ import { IFilterElement } from "@saleor/components/Filter"; +import { StaffMemberStatus, StaffUserInput } from "@saleor/graphql"; import { findValueInEnum, maybe } from "@saleor/misc"; import { StaffFilterKeys, StaffListFilterOpts } from "@saleor/staff/components/StaffListPage"; -import { StaffMemberStatus, StaffUserInput } from "@saleor/types/globalTypes"; import { createFilterTabUtils, diff --git a/src/staff/views/StaffList/sort.ts b/src/staff/views/StaffList/sort.ts index cdda48321..94bdce667 100644 --- a/src/staff/views/StaffList/sort.ts +++ b/src/staff/views/StaffList/sort.ts @@ -1,5 +1,5 @@ +import { UserSortField } from "@saleor/graphql"; import { StaffListUrlSortField } from "@saleor/staff/urls"; -import { UserSortField } from "@saleor/types/globalTypes"; import { createGetSortQueryVariables } from "@saleor/utils/sort"; export function getSortQueryField(sort: StaffListUrlSortField): UserSortField { diff --git a/src/storybook/UserDecorator.tsx b/src/storybook/UserDecorator.tsx index dffad43bc..9cf3b44a8 100644 --- a/src/storybook/UserDecorator.tsx +++ b/src/storybook/UserDecorator.tsx @@ -1,8 +1,8 @@ import { UserContext } from "@saleor/auth"; -import { User } from "@saleor/fragments/types/User"; +import { UserFragment } from "@saleor/graphql"; import React from "react"; -export const UserDecorator = (user: User) => storyFn => ( +export const UserDecorator = (user: UserFragment) => storyFn => ( = ({ user }) => { +const Story: React.FC<{ user: UserFragment }> = ({ user }) => { const intl = useIntl(); return ( diff --git a/src/storybook/stories/customers/CustomerCreatePage.tsx b/src/storybook/stories/customers/CustomerCreatePage.tsx index 528fabf8c..ee95165f5 100644 --- a/src/storybook/stories/customers/CustomerCreatePage.tsx +++ b/src/storybook/stories/customers/CustomerCreatePage.tsx @@ -1,4 +1,4 @@ -import { AccountErrorCode } from "@saleor/types/globalTypes"; +import { AccountErrorCode } from "@saleor/graphql"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/customers/CustomerDetailsPage.tsx b/src/storybook/stories/customers/CustomerDetailsPage.tsx index 97bccb1cd..d988deeb4 100644 --- a/src/storybook/stories/customers/CustomerDetailsPage.tsx +++ b/src/storybook/stories/customers/CustomerDetailsPage.tsx @@ -1,4 +1,4 @@ -import { AccountErrorCode } from "@saleor/types/globalTypes"; +import { AccountErrorCode } from "@saleor/graphql"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/customers/MockedUserProvider.tsx b/src/storybook/stories/customers/MockedUserProvider.tsx index a4d8eb17f..2d15efff7 100644 --- a/src/storybook/stories/customers/MockedUserProvider.tsx +++ b/src/storybook/stories/customers/MockedUserProvider.tsx @@ -1,10 +1,10 @@ import { UserContext } from "@saleor/auth"; import { adminUserPermissions } from "@saleor/fixtures"; -import { User_userPermissions } from "@saleor/fragments/types/User"; +import { UserFragment } from "@saleor/graphql"; import * as React from "react"; export const MockedUserProvider: React.FC<{ - customPermissions?: User_userPermissions[]; + customPermissions?: UserFragment["userPermissions"]; }> = ({ customPermissions, children }) => ( { +export const getDiscountsProvidersWrapper = ( + order: OrderDetailsQuery["order"] +) => { const mockedCommonDiscountProviderValues = { openDialog: () => {}, closeDialog: () => {}, diff --git a/src/storybook/stories/orders/OrderFulfillmentCancelDialog.tsx b/src/storybook/stories/orders/OrderFulfillmentCancelDialog.tsx index f9422c0bb..37a6279e8 100644 --- a/src/storybook/stories/orders/OrderFulfillmentCancelDialog.tsx +++ b/src/storybook/stories/orders/OrderFulfillmentCancelDialog.tsx @@ -1,4 +1,4 @@ -import { OrderErrorCode } from "@saleor/types/globalTypes"; +import { OrderErrorCode } from "@saleor/graphql"; import { warehouseList } from "@saleor/warehouses/fixtures"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/orders/OrderFulfillmentTrackingDialog.tsx b/src/storybook/stories/orders/OrderFulfillmentTrackingDialog.tsx index ec88aed17..a9186f13e 100644 --- a/src/storybook/stories/orders/OrderFulfillmentTrackingDialog.tsx +++ b/src/storybook/stories/orders/OrderFulfillmentTrackingDialog.tsx @@ -1,4 +1,4 @@ -import { OrderErrorCode } from "@saleor/types/globalTypes"; +import { OrderErrorCode } from "@saleor/graphql"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/orders/OrderListPage.tsx b/src/storybook/stories/orders/OrderListPage.tsx index ff0397482..05c04ab05 100644 --- a/src/storybook/stories/orders/OrderListPage.tsx +++ b/src/storybook/stories/orders/OrderListPage.tsx @@ -1,12 +1,9 @@ +import { OrderStatusFilter, PaymentChargeStatusEnum } from "@saleor/graphql"; import OrderListPage, { OrderFilterGiftCard, OrderListPageProps } from "@saleor/orders/components/OrderListPage"; import { OrderListUrlSortField } from "@saleor/orders/urls"; -import { - OrderStatusFilter, - PaymentChargeStatusEnum -} from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/orders/OrderMarkAsPaidDialog.tsx b/src/storybook/stories/orders/OrderMarkAsPaidDialog.tsx index a128cf00d..712515e04 100644 --- a/src/storybook/stories/orders/OrderMarkAsPaidDialog.tsx +++ b/src/storybook/stories/orders/OrderMarkAsPaidDialog.tsx @@ -1,4 +1,4 @@ -import { OrderErrorCode } from "@saleor/types/globalTypes"; +import { OrderErrorCode } from "@saleor/graphql"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/orders/OrderPaymentDialog.tsx b/src/storybook/stories/orders/OrderPaymentDialog.tsx index 30a42175d..046917987 100644 --- a/src/storybook/stories/orders/OrderPaymentDialog.tsx +++ b/src/storybook/stories/orders/OrderPaymentDialog.tsx @@ -1,4 +1,4 @@ -import { OrderErrorCode } from "@saleor/types/globalTypes"; +import { OrderErrorCode } from "@saleor/graphql"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/orders/OrderPaymentVoidDialog.tsx b/src/storybook/stories/orders/OrderPaymentVoidDialog.tsx index d9249b890..b62926fff 100644 --- a/src/storybook/stories/orders/OrderPaymentVoidDialog.tsx +++ b/src/storybook/stories/orders/OrderPaymentVoidDialog.tsx @@ -1,4 +1,4 @@ -import { OrderErrorCode } from "@saleor/types/globalTypes"; +import { OrderErrorCode } from "@saleor/graphql"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/orders/OrderProductAddDialog.tsx b/src/storybook/stories/orders/OrderProductAddDialog.tsx index 4ddecaaa1..7157b841f 100644 --- a/src/storybook/stories/orders/OrderProductAddDialog.tsx +++ b/src/storybook/stories/orders/OrderProductAddDialog.tsx @@ -1,6 +1,6 @@ import placeholderImage from "@assets/images/placeholder60x60.png"; import { fetchMoreProps } from "@saleor/fixtures"; -import { OrderErrorCode } from "@saleor/types/globalTypes"; +import { OrderErrorCode } from "@saleor/graphql"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/orders/OrderShippingMethodEditDialog.tsx b/src/storybook/stories/orders/OrderShippingMethodEditDialog.tsx index 528d32e9f..f850b6435 100644 --- a/src/storybook/stories/orders/OrderShippingMethodEditDialog.tsx +++ b/src/storybook/stories/orders/OrderShippingMethodEditDialog.tsx @@ -1,4 +1,4 @@ -import { OrderErrorCode } from "@saleor/types/globalTypes"; +import { OrderErrorCode } from "@saleor/graphql"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/pages/PageDetailsPage.tsx b/src/storybook/stories/pages/PageDetailsPage.tsx index 7974619f2..0a3bb4779 100644 --- a/src/storybook/stories/pages/PageDetailsPage.tsx +++ b/src/storybook/stories/pages/PageDetailsPage.tsx @@ -1,6 +1,6 @@ import { fetchMoreProps } from "@saleor/fixtures"; +import { PageErrorCode } from "@saleor/graphql"; import { PageData } from "@saleor/pages/components/PageDetailsPage/form"; -import { PageErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/plugins/PluginDetailsPage.tsx b/src/storybook/stories/plugins/PluginDetailsPage.tsx index e9eb667ef..a2016f074 100644 --- a/src/storybook/stories/plugins/PluginDetailsPage.tsx +++ b/src/storybook/stories/plugins/PluginDetailsPage.tsx @@ -1,4 +1,4 @@ -import { PluginErrorCode } from "@saleor/types/globalTypes"; +import { PluginErrorCode } from "@saleor/graphql"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/plugins/PluginsListPage.tsx b/src/storybook/stories/plugins/PluginsListPage.tsx index 453a0bb5b..ea6a24504 100644 --- a/src/storybook/stories/plugins/PluginsListPage.tsx +++ b/src/storybook/stories/plugins/PluginsListPage.tsx @@ -1,5 +1,5 @@ +import { PluginConfigurationType } from "@saleor/graphql"; import { PluginListUrlSortField } from "@saleor/plugins/urls"; -import { PluginConfigurationType } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/productTypes/ProductTypeCreatePage.tsx b/src/storybook/stories/productTypes/ProductTypeCreatePage.tsx index 9b103a28e..500c015f2 100644 --- a/src/storybook/stories/productTypes/ProductTypeCreatePage.tsx +++ b/src/storybook/stories/productTypes/ProductTypeCreatePage.tsx @@ -1,3 +1,4 @@ +import { ProductTypeKindEnum, WeightUnitsEnum } from "@saleor/graphql"; import { formError } from "@saleor/storybook/misc"; import { storiesOf } from "@storybook/react"; import React from "react"; @@ -6,10 +7,6 @@ import ProductTypeCreatePage, { ProductTypeCreatePageProps, ProductTypeForm } from "../../../productTypes/components/ProductTypeCreatePage"; -import { - ProductTypeKindEnum, - WeightUnitsEnum -} from "../../../types/globalTypes"; import Decorator from "../../Decorator"; const props: Omit = { diff --git a/src/storybook/stories/productTypes/ProductTypeDetailsPage.tsx b/src/storybook/stories/productTypes/ProductTypeDetailsPage.tsx index 0dab482b0..10a9e3702 100644 --- a/src/storybook/stories/productTypes/ProductTypeDetailsPage.tsx +++ b/src/storybook/stories/productTypes/ProductTypeDetailsPage.tsx @@ -1,4 +1,5 @@ import { listActionsProps } from "@saleor/fixtures"; +import { WeightUnitsEnum } from "@saleor/graphql"; import { formError } from "@saleor/storybook/misc"; import { storiesOf } from "@storybook/react"; import React from "react"; @@ -8,7 +9,6 @@ import ProductTypeDetailsPage, { ProductTypeForm } from "../../../productTypes/components/ProductTypeDetailsPage"; import { productType } from "../../../productTypes/fixtures"; -import { WeightUnitsEnum } from "../../../types/globalTypes"; import Decorator from "../../Decorator"; const props: Omit = { diff --git a/src/storybook/stories/productTypes/ProductTypeListPage.tsx b/src/storybook/stories/productTypes/ProductTypeListPage.tsx index 2e42afba0..3d464699c 100644 --- a/src/storybook/stories/productTypes/ProductTypeListPage.tsx +++ b/src/storybook/stories/productTypes/ProductTypeListPage.tsx @@ -1,8 +1,5 @@ +import { ProductTypeConfigurable, ProductTypeEnum } from "@saleor/graphql"; import { ProductTypeListUrlSortField } from "@saleor/productTypes/urls"; -import { - ProductTypeConfigurable, - ProductTypeEnum -} from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/products/ProductCreatePage.tsx b/src/storybook/stories/products/ProductCreatePage.tsx index 5d17009e8..0f03b12a3 100644 --- a/src/storybook/stories/products/ProductCreatePage.tsx +++ b/src/storybook/stories/products/ProductCreatePage.tsx @@ -1,7 +1,7 @@ import { channelsList } from "@saleor/channels/fixtures"; import { createChannelsData } from "@saleor/channels/utils"; import { fetchMoreProps } from "@saleor/fixtures"; -import { ProductErrorCode } from "@saleor/types/globalTypes"; +import { ProductErrorCode } from "@saleor/graphql"; import { warehouseList } from "@saleor/warehouses/fixtures"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/products/ProductImagePage.tsx b/src/storybook/stories/products/ProductImagePage.tsx index 594c83af9..85f54bea2 100644 --- a/src/storybook/stories/products/ProductImagePage.tsx +++ b/src/storybook/stories/products/ProductImagePage.tsx @@ -1,5 +1,5 @@ import placeholder from "@assets/images/placeholder1080x1080.png"; -import { ProductMediaType } from "@saleor/types/globalTypes"; +import { ProductMediaType } from "@saleor/graphql"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/products/ProductUpdatePage.tsx b/src/storybook/stories/products/ProductUpdatePage.tsx index 9b7f897f3..e23c549e5 100644 --- a/src/storybook/stories/products/ProductUpdatePage.tsx +++ b/src/storybook/stories/products/ProductUpdatePage.tsx @@ -8,12 +8,12 @@ import { limitsReached, listActionsProps } from "@saleor/fixtures"; +import { ProductErrorCode } from "@saleor/graphql"; import ProductUpdatePage, { ProductUpdatePageProps } from "@saleor/products/components/ProductUpdatePage"; import { product as productFixture } from "@saleor/products/fixtures"; import { ProductUpdatePageFormData } from "@saleor/products/utils/data"; -import { ProductErrorCode } from "@saleor/types/globalTypes"; import { warehouseList } from "@saleor/warehouses/fixtures"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/products/ProductVariantCreatePage.tsx b/src/storybook/stories/products/ProductVariantCreatePage.tsx index abe222b9f..b219ae088 100644 --- a/src/storybook/stories/products/ProductVariantCreatePage.tsx +++ b/src/storybook/stories/products/ProductVariantCreatePage.tsx @@ -1,5 +1,5 @@ import placeholderImage from "@assets/images/placeholder255x255.png"; -import { ProductErrorCode } from "@saleor/types/globalTypes"; +import { ProductErrorCode } from "@saleor/graphql"; import { warehouseList } from "@saleor/warehouses/fixtures"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/products/ProductVariantPage.tsx b/src/storybook/stories/products/ProductVariantPage.tsx index 792e61cdc..ee61020c7 100644 --- a/src/storybook/stories/products/ProductVariantPage.tsx +++ b/src/storybook/stories/products/ProductVariantPage.tsx @@ -1,6 +1,6 @@ import placeholderImage from "@assets/images/placeholder60x60.png"; import { createVariantChannels } from "@saleor/channels/utils"; -import { ProductErrorCode } from "@saleor/types/globalTypes"; +import { ProductErrorCode } from "@saleor/graphql"; import { warehouseList } from "@saleor/warehouses/fixtures"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/shipping/ShippingZoneCreatePage.tsx b/src/storybook/stories/shipping/ShippingZoneCreatePage.tsx index 066f98ca2..d05a7a187 100644 --- a/src/storybook/stories/shipping/ShippingZoneCreatePage.tsx +++ b/src/storybook/stories/shipping/ShippingZoneCreatePage.tsx @@ -1,4 +1,4 @@ -import { ShippingErrorCode } from "@saleor/types/globalTypes"; +import { ShippingErrorCode } from "@saleor/graphql"; import { mapCountriesToCountriesCodes } from "@saleor/utils/maps"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/shipping/ShippingZoneDetailsPage.tsx b/src/storybook/stories/shipping/ShippingZoneDetailsPage.tsx index e953a6259..606e3b10c 100644 --- a/src/storybook/stories/shipping/ShippingZoneDetailsPage.tsx +++ b/src/storybook/stories/shipping/ShippingZoneDetailsPage.tsx @@ -1,5 +1,5 @@ import { fetchMoreProps, searchPageProps } from "@saleor/fixtures"; -import { ShippingErrorCode } from "@saleor/types/globalTypes"; +import { ShippingErrorCode } from "@saleor/graphql"; import { warehouseList } from "@saleor/warehouses/fixtures"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/shipping/ShippingZonesListPage.tsx b/src/storybook/stories/shipping/ShippingZonesListPage.tsx index 308fbcc50..22b6da266 100644 --- a/src/storybook/stories/shipping/ShippingZonesListPage.tsx +++ b/src/storybook/stories/shipping/ShippingZonesListPage.tsx @@ -1,3 +1,4 @@ +import { WeightUnitsEnum } from "@saleor/graphql"; import { storiesOf } from "@storybook/react"; import React from "react"; @@ -10,7 +11,6 @@ import ShippingZonesListPage, { ShippingZonesListPageProps } from "../../../shipping/components/ShippingZonesListPage"; import { shippingZones } from "../../../shipping/fixtures"; -import { WeightUnitsEnum } from "../../../types/globalTypes"; import Decorator from "../../Decorator"; const props: ShippingZonesListPageProps = { diff --git a/src/storybook/stories/siteSettings/SiteSettingsPage.tsx b/src/storybook/stories/siteSettings/SiteSettingsPage.tsx index 80f14b52f..ad86db733 100644 --- a/src/storybook/stories/siteSettings/SiteSettingsPage.tsx +++ b/src/storybook/stories/siteSettings/SiteSettingsPage.tsx @@ -1,4 +1,4 @@ -import { ShopErrorCode } from "@saleor/types/globalTypes"; +import { ShopErrorCode } from "@saleor/graphql"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/storybook/stories/taxes/fixtures.ts b/src/storybook/stories/taxes/fixtures.ts index c5ca64596..813b1cbe7 100644 --- a/src/storybook/stories/taxes/fixtures.ts +++ b/src/storybook/stories/taxes/fixtures.ts @@ -1,8 +1,6 @@ -import { TaxTypeFragment } from "@saleor/fragments/types/TaxTypeFragment"; +import { CountryListQuery, TaxTypeFragment } from "@saleor/graphql"; -import { CountryList_shop_countries } from "../../../taxes/types/CountryList"; - -type CountryList = CountryList_shop_countries[]; +type CountryList = CountryListQuery["shop"]["countries"]; export const countries: CountryList = [ { @@ -2716,7 +2714,6 @@ export const countries: CountryList = [ } ].filter(country => country.vat); -/* eslint-disable sort-keys */ export const taxTypes: TaxTypeFragment[] = [ { description: "accommodation", diff --git a/src/storybook/stories/translations/TranslationsEntitiesListPage.tsx b/src/storybook/stories/translations/TranslationsEntitiesListPage.tsx index de91dd547..d7e09d8ff 100644 --- a/src/storybook/stories/translations/TranslationsEntitiesListPage.tsx +++ b/src/storybook/stories/translations/TranslationsEntitiesListPage.tsx @@ -1,3 +1,4 @@ +import { LanguageCodeEnum } from "@saleor/graphql"; import { storiesOf } from "@storybook/react"; import React from "react"; @@ -6,7 +7,6 @@ import TranslationsEntitiesList from "../../../translations/components/Translati import TranslationsEntitiesListPage, { TranslationsEntitiesListPageProps } from "../../../translations/components/TranslationsEntitiesListPage"; -import { LanguageCodeEnum } from "../../../types/globalTypes"; import Decorator from "../../Decorator"; const props: TranslationsEntitiesListPageProps = { diff --git a/src/taxes/components/CountryList/CountryList.tsx b/src/taxes/components/CountryList/CountryList.tsx index 3d4c832c5..3406b415b 100644 --- a/src/taxes/components/CountryList/CountryList.tsx +++ b/src/taxes/components/CountryList/CountryList.tsx @@ -7,13 +7,13 @@ import { } from "@material-ui/core"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; +import { CountryListQuery } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; import classNames from "classnames"; import React from "react"; import { FormattedMessage } from "react-intl"; import { maybe, renderCollection } from "../../../misc"; -import { CountryList_shop_countries } from "../../types/CountryList"; const useStyles = makeStyles( { @@ -28,7 +28,7 @@ const useStyles = makeStyles( ); interface CountryListProps { - countries: CountryList_shop_countries[]; + countries: CountryListQuery["shop"]["countries"]; onRowClick: (code: string) => void; } diff --git a/src/taxes/components/CountryListPage/CountryListPage.tsx b/src/taxes/components/CountryListPage/CountryListPage.tsx index a4ee273a9..811d0cae4 100644 --- a/src/taxes/components/CountryListPage/CountryListPage.tsx +++ b/src/taxes/components/CountryListPage/CountryListPage.tsx @@ -3,15 +3,14 @@ import Form from "@saleor/components/Form"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; +import { CountryListQuery } from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import React from "react"; import { useIntl } from "react-intl"; import { maybe } from "../../../misc"; -import { CountryList_shop } from "../../types/CountryList"; import CountryList from "../CountryList"; import TaxConfiguration from "../TaxConfiguration"; @@ -23,7 +22,7 @@ export interface TaxesConfigurationFormData { export interface CountryListPageProps { disabled: boolean; saveButtonBarState: ConfirmButtonTransitionState; - shop: CountryList_shop; + shop: CountryListQuery["shop"]; onBack: () => void; onRowClick: (code: string) => void; onSubmit: (data: TaxesConfigurationFormData) => SubmitPromise; diff --git a/src/taxes/components/CountryTaxesPage/CountryTaxesPage.tsx b/src/taxes/components/CountryTaxesPage/CountryTaxesPage.tsx index e156e8328..c1f8a32fd 100644 --- a/src/taxes/components/CountryTaxesPage/CountryTaxesPage.tsx +++ b/src/taxes/components/CountryTaxesPage/CountryTaxesPage.tsx @@ -10,14 +10,13 @@ import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; +import { CountryListQuery } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; -import { Backlink } from "@saleor/macaw-ui"; -import { makeStyles } from "@saleor/macaw-ui"; +import { Backlink, makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { maybe, renderCollection } from "../../../misc"; -import { CountryList_shop_countries_vat_reducedRates } from "../../types/CountryList"; const useStyles = makeStyles( { @@ -30,7 +29,7 @@ const useStyles = makeStyles( export interface CountryTaxesPageProps { countryName: string; - taxCategories: CountryList_shop_countries_vat_reducedRates[]; + taxCategories: CountryListQuery["shop"]["countries"][0]["vat"]["reducedRates"]; onBack: () => void; } diff --git a/src/taxes/mutations.ts b/src/taxes/mutations.ts index 1aab6b084..8bb6951d2 100644 --- a/src/taxes/mutations.ts +++ b/src/taxes/mutations.ts @@ -1,41 +1,19 @@ import { gql } from "@apollo/client"; -import { - shopFetchTaxRatesErrorFragment, - shopSettingsUpdateErrorFragment -} from "@saleor/fragments/errors"; -import { countryFragment, shopTaxesFragment } from "@saleor/fragments/taxes"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { TypedMutation } from "../mutations"; -import { FetchTaxes } from "./types/FetchTaxes"; -import { - UpdateTaxSettings, - UpdateTaxSettingsVariables -} from "./types/UpdateTaxSettings"; - -const updateTaxSettings = gql` - ${shopSettingsUpdateErrorFragment} - ${shopTaxesFragment} +export const updateTaxSettings = gql` mutation UpdateTaxSettings($input: ShopSettingsInput!) { shopSettingsUpdate(input: $input) { errors { ...ShopSettingsUpdateErrorFragment } shop { - ...ShopTaxesFragment + ...ShopTaxes } } } `; -export const useTaxSettingsUpdateMutation = makeMutation< - UpdateTaxSettings, - UpdateTaxSettingsVariables ->(updateTaxSettings); - -const fetchTaxes = gql` - ${countryFragment} - ${shopFetchTaxRatesErrorFragment} +export const fetchTaxes = gql` mutation FetchTaxes { shopFetchTaxRates { errors { @@ -43,10 +21,9 @@ const fetchTaxes = gql` } shop { countries { - ...CountryFragment + ...Country } } } } `; -export const TypedFetchTaxes = TypedMutation(fetchTaxes); diff --git a/src/taxes/queries.ts b/src/taxes/queries.ts index 22cabf557..d78683a2c 100644 --- a/src/taxes/queries.ts +++ b/src/taxes/queries.ts @@ -1,35 +1,20 @@ import { gql } from "@apollo/client"; -import { - countryWithTaxesFragment, - shopTaxesFragment, - taxTypeFragment -} from "@saleor/fragments/taxes"; -import makeQuery from "@saleor/hooks/makeQuery"; -import { TypedQuery } from "../queries"; -import { CountryList } from "./types/CountryList"; -import { TaxTypeList } from "./types/TaxTypeList"; - -const countryList = gql` - ${countryWithTaxesFragment} - ${shopTaxesFragment} +export const countryList = gql` query CountryList { shop { - ...ShopTaxesFragment + ...ShopTaxes countries { - ...CountryWithTaxesFragment + ...CountryWithTaxes } } } `; -export const TypedCountryListQuery = TypedQuery(countryList); -const taxTypeList = gql` - ${taxTypeFragment} +export const taxTypeList = gql` query TaxTypeList { taxTypes { - ...TaxTypeFragment + ...TaxType } } `; -export const useTaxTypeList = makeQuery(taxTypeList); diff --git a/src/taxes/types/CountryList.ts b/src/taxes/types/CountryList.ts deleted file mode 100644 index 6513e863b..000000000 --- a/src/taxes/types/CountryList.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: CountryList -// ==================================================== - -export interface CountryList_shop_countries_vat_reducedRates { - __typename: "ReducedRate"; - rateType: string; - rate: number; -} - -export interface CountryList_shop_countries_vat { - __typename: "VAT"; - standardRate: number | null; - reducedRates: (CountryList_shop_countries_vat_reducedRates | null)[]; -} - -export interface CountryList_shop_countries { - __typename: "CountryDisplay"; - country: string; - code: string; - vat: CountryList_shop_countries_vat | null; -} - -export interface CountryList_shop { - __typename: "Shop"; - chargeTaxesOnShipping: boolean; - includeTaxesInPrices: boolean; - displayGrossPrices: boolean; - countries: CountryList_shop_countries[]; -} - -export interface CountryList { - shop: CountryList_shop; -} diff --git a/src/taxes/types/FetchTaxes.ts b/src/taxes/types/FetchTaxes.ts deleted file mode 100644 index 2a46c0d07..000000000 --- a/src/taxes/types/FetchTaxes.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ShopErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: FetchTaxes -// ==================================================== - -export interface FetchTaxes_shopFetchTaxRates_errors { - __typename: "ShopError"; - code: ShopErrorCode; - field: string | null; - message: string | null; -} - -export interface FetchTaxes_shopFetchTaxRates_shop_countries { - __typename: "CountryDisplay"; - country: string; - code: string; -} - -export interface FetchTaxes_shopFetchTaxRates_shop { - __typename: "Shop"; - countries: FetchTaxes_shopFetchTaxRates_shop_countries[]; -} - -export interface FetchTaxes_shopFetchTaxRates { - __typename: "ShopFetchTaxRates"; - errors: FetchTaxes_shopFetchTaxRates_errors[]; - shop: FetchTaxes_shopFetchTaxRates_shop | null; -} - -export interface FetchTaxes { - shopFetchTaxRates: FetchTaxes_shopFetchTaxRates | null; -} diff --git a/src/taxes/types/TaxTypeList.ts b/src/taxes/types/TaxTypeList.ts deleted file mode 100644 index 6a6fa494a..000000000 --- a/src/taxes/types/TaxTypeList.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: TaxTypeList -// ==================================================== - -export interface TaxTypeList_taxTypes { - __typename: "TaxType"; - description: string | null; - taxCode: string | null; -} - -export interface TaxTypeList { - taxTypes: (TaxTypeList_taxTypes | null)[] | null; -} diff --git a/src/taxes/types/UpdateTaxSettings.ts b/src/taxes/types/UpdateTaxSettings.ts deleted file mode 100644 index e1e87eaac..000000000 --- a/src/taxes/types/UpdateTaxSettings.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ShopSettingsInput, ShopErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: UpdateTaxSettings -// ==================================================== - -export interface UpdateTaxSettings_shopSettingsUpdate_errors { - __typename: "ShopError"; - code: ShopErrorCode; - field: string | null; - message: string | null; -} - -export interface UpdateTaxSettings_shopSettingsUpdate_shop { - __typename: "Shop"; - chargeTaxesOnShipping: boolean; - includeTaxesInPrices: boolean; - displayGrossPrices: boolean; -} - -export interface UpdateTaxSettings_shopSettingsUpdate { - __typename: "ShopSettingsUpdate"; - errors: UpdateTaxSettings_shopSettingsUpdate_errors[]; - shop: UpdateTaxSettings_shopSettingsUpdate_shop | null; -} - -export interface UpdateTaxSettings { - shopSettingsUpdate: UpdateTaxSettings_shopSettingsUpdate | null; -} - -export interface UpdateTaxSettingsVariables { - input: ShopSettingsInput; -} diff --git a/src/taxes/views/CountryList.tsx b/src/taxes/views/CountryList.tsx index 461d2e7dd..94a6c7924 100644 --- a/src/taxes/views/CountryList.tsx +++ b/src/taxes/views/CountryList.tsx @@ -1,3 +1,8 @@ +import { + useCountryListQuery, + useFetchTaxesMutation, + useUpdateTaxSettingsMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages } from "@saleor/intl"; @@ -9,10 +14,6 @@ import { extractMutationErrors, maybe } from "../../misc"; import CountryListPage, { TaxesConfigurationFormData } from "../components/CountryListPage"; -import { TypedFetchTaxes, useTaxSettingsUpdateMutation } from "../mutations"; -import { TypedCountryListQuery } from "../queries"; -import { FetchTaxes } from "../types/FetchTaxes"; -import { UpdateTaxSettings } from "../types/UpdateTaxSettings"; import { countryTaxRatesUrl } from "../urls"; export const CountryList: React.FC = () => { @@ -20,35 +21,41 @@ export const CountryList: React.FC = () => { const navigate = useNavigator(); const notify = useNotifier(); - const handleUpdateTaxSettings = (data: UpdateTaxSettings) => { - if (data.shopSettingsUpdate.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - } - }; + const { data, loading } = useCountryListQuery({ + displayLoader: true + }); - const handleFetchTaxes = (data: FetchTaxes) => { - if (data.shopFetchTaxRates.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage({ - defaultMessage: "Successfully fetched tax rates" - }) - }); - } else { - notify({ - status: "error", - text: intl.formatMessage(commonMessages.somethingWentWrong) - }); + const [fetchTaxes, fetchTaxesOpts] = useFetchTaxesMutation({ + onCompleted: data => { + if (data.shopFetchTaxRates.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage({ + defaultMessage: "Successfully fetched tax rates" + }) + }); + } else { + notify({ + status: "error", + text: intl.formatMessage(commonMessages.somethingWentWrong) + }); + } } - }; + }); const [ updateTaxSettings, updateTaxSettingsOpts - ] = useTaxSettingsUpdateMutation({ onCompleted: handleUpdateTaxSettings }); + ] = useUpdateTaxSettingsMutation({ + onCompleted: data => { + if (data.shopSettingsUpdate.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + } + } + }); const handleSubmit = (data: TaxesConfigurationFormData) => extractMutationErrors( @@ -64,30 +71,20 @@ export const CountryList: React.FC = () => { ); return ( - - {(fetchTaxes, fetchTaxesOpts) => ( - - {({ data, loading }) => ( - navigate(configurationMenuUrl)} - onRowClick={code => navigate(countryTaxRatesUrl(code))} - onSubmit={handleSubmit} - onTaxFetch={fetchTaxes} - saveButtonBarState={updateTaxSettingsOpts.status} - shop={maybe(() => ({ - ...data.shop, - countries: data.shop.countries.filter(country => country.vat) - }))} - /> - )} - - )} - + navigate(configurationMenuUrl)} + onRowClick={code => navigate(countryTaxRatesUrl(code))} + onSubmit={handleSubmit} + onTaxFetch={fetchTaxes} + saveButtonBarState={updateTaxSettingsOpts.status} + shop={maybe(() => ({ + ...data.shop, + countries: data.shop.countries.filter(country => country.vat) + }))} + /> ); }; diff --git a/src/taxes/views/CountryTaxes.tsx b/src/taxes/views/CountryTaxes.tsx index d8f328606..e4ec09e56 100644 --- a/src/taxes/views/CountryTaxes.tsx +++ b/src/taxes/views/CountryTaxes.tsx @@ -1,9 +1,8 @@ +import { useCountryListQuery } from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import React from "react"; -import { maybe } from "../../misc"; import CountryTaxesPage from "../components/CountryTaxesPage"; -import { TypedCountryListQuery } from "../queries"; import { countryListUrl } from "../urls"; export interface CountryTaxesParams { @@ -13,21 +12,18 @@ export interface CountryTaxesParams { export const CountryTaxes: React.FC = ({ code }) => { const navigate = useNavigator(); + const { data } = useCountryListQuery({ + displayLoader: true + }); + + const country = data?.shop.countries.find(country => country.code === code); + return ( - - {({ data }) => { - const country = maybe(() => - data.shop.countries.find(country => country.code === code) - ); - return ( - country.country)} - taxCategories={maybe(() => country.vat.reducedRates)} - onBack={() => navigate(countryListUrl)} - /> - ); - }} - + navigate(countryListUrl)} + /> ); }; export default CountryTaxes; diff --git a/src/translations/components/ProductContextSwitcher/ProductContextSwitcher.tsx b/src/translations/components/ProductContextSwitcher/ProductContextSwitcher.tsx index f971d54f6..18cfabc0e 100644 --- a/src/translations/components/ProductContextSwitcher/ProductContextSwitcher.tsx +++ b/src/translations/components/ProductContextSwitcher/ProductContextSwitcher.tsx @@ -9,6 +9,7 @@ import { Typography } from "@material-ui/core"; import ArrowDropDown from "@material-ui/icons/ArrowDropDown"; +import { useProductVariantListQuery } from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import { makeStyles } from "@saleor/macaw-ui"; import { @@ -20,8 +21,6 @@ import classNames from "classnames"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { useProductVariantList } from "../../queries"; - export interface ProductContextSwitcherProps { productId: string; selectedId: string; @@ -75,7 +74,7 @@ const ProductContextSwitcher: React.FC = ({ const classes = useStyles(); const navigate = useNavigator(); const intl = useIntl(); - const { data } = useProductVariantList({ + const { data } = useProductVariantListQuery({ variables: { id: productId } }); diff --git a/src/translations/components/TranslationFields/TranslationFields.tsx b/src/translations/components/TranslationFields/TranslationFields.tsx index 030625f3a..fa98d442d 100644 --- a/src/translations/components/TranslationFields/TranslationFields.tsx +++ b/src/translations/components/TranslationFields/TranslationFields.tsx @@ -8,8 +8,12 @@ import Skeleton from "@saleor/components/Skeleton"; import TablePagination from "@saleor/components/TablePagination"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { buttonMessages } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Button, IconButton, makeStyles } from "@saleor/macaw-ui"; +import { + Button, + ConfirmButtonTransitionState, + IconButton, + makeStyles +} from "@saleor/macaw-ui"; import { TranslationField } from "@saleor/translations/types"; import { ListProps } from "@saleor/types"; import classNames from "classnames"; diff --git a/src/translations/components/TranslationsAttributesPage/TranslationsAttributesPage.tsx b/src/translations/components/TranslationsAttributesPage/TranslationsAttributesPage.tsx index 5cea56b27..76f0c2922 100644 --- a/src/translations/components/TranslationsAttributesPage/TranslationsAttributesPage.tsx +++ b/src/translations/components/TranslationsAttributesPage/TranslationsAttributesPage.tsx @@ -3,7 +3,10 @@ import Container from "@saleor/components/Container"; import LanguageSwitch from "@saleor/components/LanguageSwitch"; import PageHeader from "@saleor/components/PageHeader"; import { ListSettingsUpdate } from "@saleor/components/TablePagination"; -import { AttributeTranslationDetailsFragment } from "@saleor/fragments/types/AttributeTranslationDetailsFragment"; +import { + AttributeTranslationDetailsFragment, + LanguageCodeEnum +} from "@saleor/graphql"; import { commonMessages, sectionNames } from "@saleor/intl"; import { Backlink } from "@saleor/macaw-ui"; import { getStringOrPlaceholder } from "@saleor/misc"; @@ -12,7 +15,6 @@ import { ListSettings } from "@saleor/types"; import React from "react"; import { useIntl } from "react-intl"; -import { LanguageCodeEnum } from "../../../types/globalTypes"; import { getTranslationFields } from "../../utils"; import TranslationFields from "../TranslationFields"; import { transtionsAttributesPageFieldsMessages as messages } from "./messages"; diff --git a/src/translations/components/TranslationsCategoriesPage/TranslationsCategoriesPage.tsx b/src/translations/components/TranslationsCategoriesPage/TranslationsCategoriesPage.tsx index 00155ee82..231fa74d9 100644 --- a/src/translations/components/TranslationsCategoriesPage/TranslationsCategoriesPage.tsx +++ b/src/translations/components/TranslationsCategoriesPage/TranslationsCategoriesPage.tsx @@ -2,7 +2,7 @@ import CardSpacer from "@saleor/components/CardSpacer"; import Container from "@saleor/components/Container"; import LanguageSwitch from "@saleor/components/LanguageSwitch"; import PageHeader from "@saleor/components/PageHeader"; -import { CategoryTranslationFragment } from "@saleor/fragments/types/CategoryTranslationFragment"; +import { CategoryTranslationFragment, LanguageCodeEnum } from "@saleor/graphql"; import { commonMessages, sectionNames } from "@saleor/intl"; import { Backlink } from "@saleor/macaw-ui"; import { getStringOrPlaceholder } from "@saleor/misc"; @@ -13,7 +13,6 @@ import { import React from "react"; import { useIntl } from "react-intl"; -import { LanguageCodeEnum } from "../../../types/globalTypes"; import TranslationFields from "../TranslationFields"; export interface TranslationsCategoriesPageProps diff --git a/src/translations/components/TranslationsCollectionsPage/TranslationsCollectionsPage.tsx b/src/translations/components/TranslationsCollectionsPage/TranslationsCollectionsPage.tsx index 31593309c..b4fc2b478 100644 --- a/src/translations/components/TranslationsCollectionsPage/TranslationsCollectionsPage.tsx +++ b/src/translations/components/TranslationsCollectionsPage/TranslationsCollectionsPage.tsx @@ -2,7 +2,10 @@ import CardSpacer from "@saleor/components/CardSpacer"; import Container from "@saleor/components/Container"; import LanguageSwitch from "@saleor/components/LanguageSwitch"; import PageHeader from "@saleor/components/PageHeader"; -import { CollectionTranslationFragment } from "@saleor/fragments/types/CollectionTranslationFragment"; +import { + CollectionTranslationFragment, + LanguageCodeEnum +} from "@saleor/graphql"; import { commonMessages, sectionNames } from "@saleor/intl"; import { Backlink } from "@saleor/macaw-ui"; import { getStringOrPlaceholder } from "@saleor/misc"; @@ -13,7 +16,6 @@ import { import React from "react"; import { useIntl } from "react-intl"; -import { LanguageCodeEnum } from "../../../types/globalTypes"; import TranslationFields from "../TranslationFields"; export interface TranslationsCollectionsPageProps diff --git a/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.tsx b/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.tsx index cd21bbfc8..7bb990d26 100644 --- a/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.tsx +++ b/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.tsx @@ -1,8 +1,8 @@ import { Card } from "@material-ui/core"; import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; -import { ShopInfo_shop_languages } from "@saleor/components/Shop/types/ShopInfo"; import FilterTabs, { FilterTab } from "@saleor/components/TableFilter"; +import { LanguageFragment } from "@saleor/graphql"; import { Backlink } from "@saleor/macaw-ui"; import { maybe } from "@saleor/misc"; import React from "react"; @@ -13,7 +13,7 @@ import { TranslatableEntities } from "../../urls"; export interface TranslationsEntitiesListPageProps { children: React.ReactNode; filters: TranslationsEntitiesFilters; - language: ShopInfo_shop_languages; + language: LanguageFragment; onBack: () => void; } diff --git a/src/translations/components/TranslationsLanguageList/TranslationsLanguageList.tsx b/src/translations/components/TranslationsLanguageList/TranslationsLanguageList.tsx index eb0abaa3a..52180355c 100644 --- a/src/translations/components/TranslationsLanguageList/TranslationsLanguageList.tsx +++ b/src/translations/components/TranslationsLanguageList/TranslationsLanguageList.tsx @@ -6,8 +6,8 @@ import { TableRow } from "@material-ui/core"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; -import { ShopInfo_shop_languages } from "@saleor/components/Shop/types/ShopInfo"; import Skeleton from "@saleor/components/Skeleton"; +import { LanguageFragment } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage } from "react-intl"; @@ -15,7 +15,7 @@ import { FormattedMessage } from "react-intl"; import { maybe, renderCollection } from "../../../misc"; export interface TranslationsLanguageListProps { - languages: ShopInfo_shop_languages[]; + languages: LanguageFragment[]; onRowClick: (code: string) => void; } diff --git a/src/translations/components/TranslationsLanguageListPage/TranslationsLanguageListPage.tsx b/src/translations/components/TranslationsLanguageListPage/TranslationsLanguageListPage.tsx index 0b7721dda..5b84440e9 100644 --- a/src/translations/components/TranslationsLanguageListPage/TranslationsLanguageListPage.tsx +++ b/src/translations/components/TranslationsLanguageListPage/TranslationsLanguageListPage.tsx @@ -1,14 +1,14 @@ import Container from "@saleor/components/Container"; import PageHeader from "@saleor/components/PageHeader"; // tslint:disable no-submodule-imports -import { ShopInfo_shop_languages } from "@saleor/components/Shop/types/ShopInfo"; +import { LanguageFragment } from "@saleor/graphql"; import React from "react"; import { useIntl } from "react-intl"; import TranslationsLanguageList from "../TranslationsLanguageList"; export interface TranslationsLanguageListPageProps { - languages: ShopInfo_shop_languages[]; + languages: LanguageFragment[]; // onAdd: () => void; onRowClick: (code: string) => void; } diff --git a/src/translations/components/TranslationsPagesPage/TranslationsPagesPage.tsx b/src/translations/components/TranslationsPagesPage/TranslationsPagesPage.tsx index 1fc1b084c..819d16f2d 100644 --- a/src/translations/components/TranslationsPagesPage/TranslationsPagesPage.tsx +++ b/src/translations/components/TranslationsPagesPage/TranslationsPagesPage.tsx @@ -2,7 +2,7 @@ import CardSpacer from "@saleor/components/CardSpacer"; import Container from "@saleor/components/Container"; import LanguageSwitch from "@saleor/components/LanguageSwitch"; import PageHeader from "@saleor/components/PageHeader"; -import { PageTranslationFragment } from "@saleor/fragments/types/PageTranslationFragment"; +import { LanguageCodeEnum, PageTranslationFragment } from "@saleor/graphql"; import { commonMessages, sectionNames } from "@saleor/intl"; import { Backlink } from "@saleor/macaw-ui"; import { getStringOrPlaceholder } from "@saleor/misc"; @@ -13,7 +13,6 @@ import { import React from "react"; import { useIntl } from "react-intl"; -import { LanguageCodeEnum } from "../../../types/globalTypes"; import TranslationFields from "../TranslationFields"; export interface TranslationsPagesPageProps diff --git a/src/translations/components/TranslationsProductVariantsPage/TranslationsProductVariantsPage.tsx b/src/translations/components/TranslationsProductVariantsPage/TranslationsProductVariantsPage.tsx index bead55b65..3b0c6d8f4 100644 --- a/src/translations/components/TranslationsProductVariantsPage/TranslationsProductVariantsPage.tsx +++ b/src/translations/components/TranslationsProductVariantsPage/TranslationsProductVariantsPage.tsx @@ -2,7 +2,10 @@ import CardSpacer from "@saleor/components/CardSpacer"; import Container from "@saleor/components/Container"; import LanguageSwitch from "@saleor/components/LanguageSwitch"; import PageHeader from "@saleor/components/PageHeader"; -import { ProductVariantTranslationFragment } from "@saleor/fragments/types/ProductVariantTranslationFragment"; +import { + LanguageCodeEnum, + ProductVariantTranslationFragment +} from "@saleor/graphql"; import { commonMessages, sectionNames } from "@saleor/intl"; import { Backlink } from "@saleor/macaw-ui"; import { getStringOrPlaceholder } from "@saleor/misc"; @@ -13,7 +16,6 @@ import { import React from "react"; import { useIntl } from "react-intl"; -import { LanguageCodeEnum } from "../../../types/globalTypes"; import ProductContextSwitcher from "../ProductContextSwitcher"; import TranslationFields from "../TranslationFields"; diff --git a/src/translations/components/TranslationsProductsPage/TranslationsProductsPage.tsx b/src/translations/components/TranslationsProductsPage/TranslationsProductsPage.tsx index 89c87bc9d..72899dac5 100644 --- a/src/translations/components/TranslationsProductsPage/TranslationsProductsPage.tsx +++ b/src/translations/components/TranslationsProductsPage/TranslationsProductsPage.tsx @@ -2,7 +2,7 @@ import CardSpacer from "@saleor/components/CardSpacer"; import Container from "@saleor/components/Container"; import LanguageSwitch from "@saleor/components/LanguageSwitch"; import PageHeader from "@saleor/components/PageHeader"; -import { ProductTranslationFragment } from "@saleor/fragments/types/ProductTranslationFragment"; +import { LanguageCodeEnum, ProductTranslationFragment } from "@saleor/graphql"; import { commonMessages, sectionNames } from "@saleor/intl"; import { Backlink } from "@saleor/macaw-ui"; import { getStringOrPlaceholder } from "@saleor/misc"; @@ -13,7 +13,6 @@ import { import React from "react"; import { useIntl } from "react-intl"; -import { LanguageCodeEnum } from "../../../types/globalTypes"; import ProductContextSwitcher from "../ProductContextSwitcher"; import TranslationFields from "../TranslationFields"; diff --git a/src/translations/components/TranslationsSalesPage/TranslationsSalesPage.tsx b/src/translations/components/TranslationsSalesPage/TranslationsSalesPage.tsx index 14597333f..5dc9c2652 100644 --- a/src/translations/components/TranslationsSalesPage/TranslationsSalesPage.tsx +++ b/src/translations/components/TranslationsSalesPage/TranslationsSalesPage.tsx @@ -1,7 +1,7 @@ import Container from "@saleor/components/Container"; import LanguageSwitch from "@saleor/components/LanguageSwitch"; import PageHeader from "@saleor/components/PageHeader"; -import { SaleTranslationFragment } from "@saleor/fragments/types/SaleTranslationFragment"; +import { LanguageCodeEnum, SaleTranslationFragment } from "@saleor/graphql"; import { commonMessages, sectionNames } from "@saleor/intl"; import { Backlink } from "@saleor/macaw-ui"; import { getStringOrPlaceholder } from "@saleor/misc"; @@ -9,7 +9,6 @@ import { TranslationsEntitiesPageProps } from "@saleor/translations/types"; import React from "react"; import { useIntl } from "react-intl"; -import { LanguageCodeEnum } from "../../../types/globalTypes"; import TranslationFields from "../TranslationFields"; export interface TranslationsSalesPageProps diff --git a/src/translations/components/TranslationsShippingMethodPage/TranslationsShippingMethodPage.tsx b/src/translations/components/TranslationsShippingMethodPage/TranslationsShippingMethodPage.tsx index 4bad81107..0ec67307b 100644 --- a/src/translations/components/TranslationsShippingMethodPage/TranslationsShippingMethodPage.tsx +++ b/src/translations/components/TranslationsShippingMethodPage/TranslationsShippingMethodPage.tsx @@ -1,7 +1,10 @@ import Container from "@saleor/components/Container"; import LanguageSwitch from "@saleor/components/LanguageSwitch"; import PageHeader from "@saleor/components/PageHeader"; -import { ShippingMethodTranslationFragment } from "@saleor/fragments/types/ShippingMethodTranslationFragment"; +import { + LanguageCodeEnum, + ShippingMethodTranslationFragment +} from "@saleor/graphql"; import { commonMessages, sectionNames } from "@saleor/intl"; import { Backlink } from "@saleor/macaw-ui"; import { getStringOrPlaceholder } from "@saleor/misc"; @@ -12,7 +15,6 @@ import { import React from "react"; import { useIntl } from "react-intl"; -import { LanguageCodeEnum } from "../../../types/globalTypes"; import TranslationFields from "../TranslationFields"; export interface TranslationsShippingMethodPageProps diff --git a/src/translations/components/TranslationsVouchersPage/TranslationsVouchersPage.tsx b/src/translations/components/TranslationsVouchersPage/TranslationsVouchersPage.tsx index 34341fe6e..795416a6e 100644 --- a/src/translations/components/TranslationsVouchersPage/TranslationsVouchersPage.tsx +++ b/src/translations/components/TranslationsVouchersPage/TranslationsVouchersPage.tsx @@ -1,7 +1,7 @@ import Container from "@saleor/components/Container"; import LanguageSwitch from "@saleor/components/LanguageSwitch"; import PageHeader from "@saleor/components/PageHeader"; -import { VoucherTranslationFragment } from "@saleor/fragments/types/VoucherTranslationFragment"; +import { LanguageCodeEnum, VoucherTranslationFragment } from "@saleor/graphql"; import { commonMessages, sectionNames } from "@saleor/intl"; import { Backlink } from "@saleor/macaw-ui"; import { getStringOrPlaceholder } from "@saleor/misc"; @@ -9,7 +9,6 @@ import { TranslationsEntitiesPageProps } from "@saleor/translations/types"; import React from "react"; import { useIntl } from "react-intl"; -import { LanguageCodeEnum } from "../../../types/globalTypes"; import TranslationFields from "../TranslationFields"; export interface TranslationsVouchersPageProps diff --git a/src/translations/fixtures.ts b/src/translations/fixtures.ts index 3bc5c982b..53d39b142 100644 --- a/src/translations/fixtures.ts +++ b/src/translations/fixtures.ts @@ -1,7 +1,6 @@ -import { ShopInfo_shop_languages } from "../components/Shop/types/ShopInfo"; -import { LanguageCodeEnum } from "../types/globalTypes"; +import { LanguageCodeEnum, LanguageFragment } from "@saleor/graphql"; -export const languages: ShopInfo_shop_languages[] = [ +export const languages: LanguageFragment[] = [ { __typename: "LanguageDisplay", code: LanguageCodeEnum.DE, diff --git a/src/translations/index.tsx b/src/translations/index.tsx index 2ec435f38..b50c9d615 100644 --- a/src/translations/index.tsx +++ b/src/translations/index.tsx @@ -1,3 +1,4 @@ +import { LanguageCodeEnum } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { parse as parseQs } from "qs"; import React from "react"; @@ -5,7 +6,6 @@ import { useIntl } from "react-intl"; import { Route, RouteComponentProps, Switch } from "react-router-dom"; import { WindowTitle } from "../components/WindowTitle"; -import { LanguageCodeEnum } from "../types/globalTypes"; import { languageEntitiesPath, languageEntityPath, diff --git a/src/translations/mutations.ts b/src/translations/mutations.ts index c08f062e4..42131cee3 100644 --- a/src/translations/mutations.ts +++ b/src/translations/mutations.ts @@ -1,62 +1,6 @@ import { gql } from "@apollo/client"; -import { - attributeTranslateErrorFragment, - attributeValueTranslateErrorFragment, - categoryTranslateErrorFragment, - collectionTranslateErrorFragment, - pageTranslateErrorFragment, - productTranslateErrorFragment, - productVariantTranslateErrorFragment, - saleTranslateErrorFragment, - shippingPriceTranslateErrorFragment, - voucherTranslateErrorFragment -} from "@saleor/fragments/errors"; -import { pageTranslationFragment } from "@saleor/fragments/translations"; -import { TypedMutation } from "../mutations"; -import { - UpdateAttributeTranslations, - UpdateAttributeTranslationsVariables -} from "./types/UpdateAttributeTranslations"; -import { - UpdateAttributeValueTranslations, - UpdateAttributeValueTranslationsVariables -} from "./types/UpdateAttributeValueTranslations"; -import { - UpdateCategoryTranslations, - UpdateCategoryTranslationsVariables -} from "./types/UpdateCategoryTranslations"; -import { - UpdateCollectionTranslations, - UpdateCollectionTranslationsVariables -} from "./types/UpdateCollectionTranslations"; -import { - UpdatePageTranslations, - UpdatePageTranslationsVariables -} from "./types/UpdatePageTranslations"; -import { - UpdateProductTranslations, - UpdateProductTranslationsVariables -} from "./types/UpdateProductTranslations"; -import { - UpdateProductVariantTranslations, - UpdateProductVariantTranslationsVariables -} from "./types/UpdateProductVariantTranslations"; -import { - UpdateSaleTranslations, - UpdateSaleTranslationsVariables -} from "./types/UpdateSaleTranslations"; -import { - UpdateShippingMethodTranslations, - UpdateShippingMethodTranslationsVariables -} from "./types/UpdateShippingMethodTranslations"; -import { - UpdateVoucherTranslations, - UpdateVoucherTranslationsVariables -} from "./types/UpdateVoucherTranslations"; - -const updateProductTranslations = gql` - ${productTranslateErrorFragment} +export const updateProductTranslations = gql` mutation UpdateProductTranslations( $id: ID! $input: TranslationInput! @@ -87,13 +31,8 @@ const updateProductTranslations = gql` } } `; -export const TypedUpdateProductTranslations = TypedMutation< - UpdateProductTranslations, - UpdateProductTranslationsVariables ->(updateProductTranslations); -const updateProductVariantTranslations = gql` - ${productVariantTranslateErrorFragment} +export const updateProductVariantTranslations = gql` mutation UpdateProductVariantTranslations( $id: ID! $input: NameTranslationInput! @@ -118,13 +57,8 @@ const updateProductVariantTranslations = gql` } } `; -export const TypedUpdateProductVariantTranslations = TypedMutation< - UpdateProductVariantTranslations, - UpdateProductVariantTranslationsVariables ->(updateProductVariantTranslations); -const updateCategoryTranslations = gql` - ${categoryTranslateErrorFragment} +export const updateCategoryTranslations = gql` mutation UpdateCategoryTranslations( $id: ID! $input: TranslationInput! @@ -155,13 +89,7 @@ const updateCategoryTranslations = gql` } `; -export const TypedUpdateCategoryTranslations = TypedMutation< - UpdateCategoryTranslations, - UpdateCategoryTranslationsVariables ->(updateCategoryTranslations); - -const updateCollectionTranslations = gql` - ${collectionTranslateErrorFragment} +export const updateCollectionTranslations = gql` mutation UpdateCollectionTranslations( $id: ID! $input: TranslationInput! @@ -192,14 +120,7 @@ const updateCollectionTranslations = gql` } `; -export const TypedUpdateCollectionTranslations = TypedMutation< - UpdateCollectionTranslations, - UpdateCollectionTranslationsVariables ->(updateCollectionTranslations); - -const updatePageTranslations = gql` - ${pageTranslateErrorFragment} - ${pageTranslationFragment} +export const updatePageTranslations = gql` mutation UpdatePageTranslations( $id: ID! $input: PageTranslationInput! @@ -210,18 +131,13 @@ const updatePageTranslations = gql` ...PageTranslateErrorFragment } page { - ...PageTranslationFragment + ...PageTranslation } } } `; -export const TypedUpdatePageTranslations = TypedMutation< - UpdatePageTranslations, - UpdatePageTranslationsVariables ->(updatePageTranslations); -const updateVoucherTranslations = gql` - ${voucherTranslateErrorFragment} +export const updateVoucherTranslations = gql` mutation UpdateVoucherTranslations( $id: ID! $input: NameTranslationInput! @@ -246,13 +162,8 @@ const updateVoucherTranslations = gql` } } `; -export const TypedUpdateVoucherTranslations = TypedMutation< - UpdateVoucherTranslations, - UpdateVoucherTranslationsVariables ->(updateVoucherTranslations); -const updateSaleTranslations = gql` - ${saleTranslateErrorFragment} +export const updateSaleTranslations = gql` mutation UpdateSaleTranslations( $id: ID! $input: NameTranslationInput! @@ -277,13 +188,8 @@ const updateSaleTranslations = gql` } } `; -export const TypedUpdateSaleTranslations = TypedMutation< - UpdateSaleTranslations, - UpdateSaleTranslationsVariables ->(updateSaleTranslations); -const updateAttributeTranslations = gql` - ${attributeTranslateErrorFragment} +export const updateAttributeTranslations = gql` mutation UpdateAttributeTranslations( $id: ID! $input: NameTranslationInput! @@ -304,13 +210,8 @@ const updateAttributeTranslations = gql` } } `; -export const TypedUpdateAttributeTranslations = TypedMutation< - UpdateAttributeTranslations, - UpdateAttributeTranslationsVariables ->(updateAttributeTranslations); -const updateAttributeValueTranslations = gql` - ${attributeValueTranslateErrorFragment} +export const updateAttributeValueTranslations = gql` mutation UpdateAttributeValueTranslations( $id: ID! $input: AttributeValueTranslationInput! @@ -333,13 +234,8 @@ const updateAttributeValueTranslations = gql` } } `; -export const TypedUpdateAttributeValueTranslations = TypedMutation< - UpdateAttributeValueTranslations, - UpdateAttributeValueTranslationsVariables ->(updateAttributeValueTranslations); -const updateShippingMethodTranslations = gql` - ${shippingPriceTranslateErrorFragment} +export const updateShippingMethodTranslations = gql` mutation UpdateShippingMethodTranslations( $id: ID! $input: ShippingPriceTranslationInput! @@ -365,8 +261,3 @@ const updateShippingMethodTranslations = gql` } } `; - -export const TypedUpdateShippingMethodTranslations = TypedMutation< - UpdateShippingMethodTranslations, - UpdateShippingMethodTranslationsVariables ->(updateShippingMethodTranslations); diff --git a/src/translations/queries.ts b/src/translations/queries.ts index 34f4ec40a..0e6774bd1 100644 --- a/src/translations/queries.ts +++ b/src/translations/queries.ts @@ -1,96 +1,6 @@ import { gql } from "@apollo/client"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; -import { - attributeTranslationDetailsFragment, - attributeTranslationFragment, - categoryTranslationFragment, - collectionTranslationFragment, - pageTranslationFragment, - productTranslationFragment, - productVariantTranslationFragment, - saleTranslationFragment, - shippingMethodTranslationFragment, - voucherTranslationFragment -} from "@saleor/fragments/translations"; -import makeQuery from "@saleor/hooks/makeQuery"; -import { TypedQuery } from "../queries"; -import { - AttributeTranslationDetails, - AttributeTranslationDetailsVariables -} from "./types/AttributeTranslationDetails"; -import { - AttributeTranslations, - AttributeTranslationsVariables -} from "./types/AttributeTranslations"; -import { - CategoryTranslationDetails, - CategoryTranslationDetailsVariables -} from "./types/CategoryTranslationDetails"; -import { - CategoryTranslations, - CategoryTranslationsVariables -} from "./types/CategoryTranslations"; -import { - CollectionTranslationDetails, - CollectionTranslationDetailsVariables -} from "./types/CollectionTranslationDetails"; -import { - CollectionTranslations, - CollectionTranslationsVariables -} from "./types/CollectionTranslations"; -import { - PageTranslationDetails, - PageTranslationDetailsVariables -} from "./types/PageTranslationDetails"; -import { - PageTranslations, - PageTranslationsVariables -} from "./types/PageTranslations"; -import { - ProductTranslationDetails, - ProductTranslationDetailsVariables -} from "./types/ProductTranslationDetails"; -import { - ProductTranslations, - ProductTranslationsVariables -} from "./types/ProductTranslations"; -import { - ProductVariantList, - ProductVariantListVariables -} from "./types/ProductVariantList"; -import { - ProductVariantTranslationDetails, - ProductVariantTranslationDetailsVariables -} from "./types/ProductVariantTranslationDetails"; -import { - SaleTranslationDetails, - SaleTranslationDetailsVariables -} from "./types/SaleTranslationDetails"; -import { - SaleTranslations, - SaleTranslationsVariables -} from "./types/SaleTranslations"; -import { - ShippingMethodTranslationDetails, - ShippingMethodTranslationDetailsVariables -} from "./types/ShippingMethodTranslationDetails"; -import { - ShippingMethodTranslations, - ShippingMethodTranslationsVariables -} from "./types/ShippingMethodTranslations"; -import { - VoucherTranslationDetails, - VoucherTranslationDetailsVariables -} from "./types/VoucherTranslationDetails"; -import { - VoucherTranslations, - VoucherTranslationsVariables -} from "./types/VoucherTranslations"; - -const categoryTranslations = gql` - ${pageInfoFragment} - ${categoryTranslationFragment} +export const categoryTranslations = gql` query CategoryTranslations( $language: LanguageCodeEnum! $first: Int @@ -107,23 +17,17 @@ const categoryTranslations = gql` ) { edges { node { - ...CategoryTranslationFragment + ...CategoryTranslation } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export const TypedCategoryTranslations = TypedQuery< - CategoryTranslations, - CategoryTranslationsVariables ->(categoryTranslations); -const collectionTranslations = gql` - ${pageInfoFragment} - ${collectionTranslationFragment} +export const collectionTranslations = gql` query CollectionTranslations( $language: LanguageCodeEnum! $first: Int @@ -140,23 +44,17 @@ const collectionTranslations = gql` ) { edges { node { - ...CollectionTranslationFragment + ...CollectionTranslation } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export const TypedCollectionTranslations = TypedQuery< - CollectionTranslations, - CollectionTranslationsVariables ->(collectionTranslations); -const productTranslations = gql` - ${pageInfoFragment} - ${productTranslationFragment} +export const productTranslations = gql` query ProductTranslations( $language: LanguageCodeEnum! $first: Int @@ -173,23 +71,17 @@ const productTranslations = gql` ) { edges { node { - ...ProductTranslationFragment + ...ProductTranslation } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export const TypedProductTranslations = TypedQuery< - ProductTranslations, - ProductTranslationsVariables ->(productTranslations); -const pageTranslations = gql` - ${pageInfoFragment} - ${pageTranslationFragment} +export const pageTranslations = gql` query PageTranslations( $language: LanguageCodeEnum! $first: Int @@ -206,23 +98,17 @@ const pageTranslations = gql` ) { edges { node { - ...PageTranslationFragment + ...PageTranslation } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export const TypedPageTranslations = TypedQuery< - PageTranslations, - PageTranslationsVariables ->(pageTranslations); -const voucherTranslations = gql` - ${pageInfoFragment} - ${voucherTranslationFragment} +export const voucherTranslations = gql` query VoucherTranslations( $language: LanguageCodeEnum! $first: Int @@ -239,23 +125,17 @@ const voucherTranslations = gql` ) { edges { node { - ...VoucherTranslationFragment + ...VoucherTranslation } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export const TypedVoucherTranslations = TypedQuery< - VoucherTranslations, - VoucherTranslationsVariables ->(voucherTranslations); -const saleTranslations = gql` - ${pageInfoFragment} - ${saleTranslationFragment} +export const saleTranslations = gql` query SaleTranslations( $language: LanguageCodeEnum! $first: Int @@ -272,23 +152,17 @@ const saleTranslations = gql` ) { edges { node { - ...SaleTranslationFragment + ...SaleTranslation } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export const TypedSaleTranslations = TypedQuery< - SaleTranslations, - SaleTranslationsVariables ->(saleTranslations); -const attributeTranslations = gql` - ${pageInfoFragment} - ${attributeTranslationFragment} +export const attributeTranslations = gql` query AttributeTranslations( $language: LanguageCodeEnum! $first: Int @@ -305,23 +179,17 @@ const attributeTranslations = gql` ) { edges { node { - ...AttributeTranslationFragment + ...AttributeTranslation } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export const TypedAttributeTranslations = TypedQuery< - AttributeTranslations, - AttributeTranslationsVariables ->(attributeTranslations); -const shippingMethodTranslations = gql` - ${pageInfoFragment} - ${shippingMethodTranslationFragment} +export const shippingMethodTranslations = gql` query ShippingMethodTranslations( $language: LanguageCodeEnum! $first: Int @@ -338,34 +206,25 @@ const shippingMethodTranslations = gql` ) { edges { node { - ...ShippingMethodTranslationFragment + ...ShippingMethodTranslation } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export const TypedShippingMethodTranslations = TypedQuery< - ShippingMethodTranslations, - ShippingMethodTranslationsVariables ->(shippingMethodTranslations); -const productTranslationDetails = gql` - ${productTranslationFragment} +export const productTranslationDetails = gql` query ProductTranslationDetails($id: ID!, $language: LanguageCodeEnum!) { translation(kind: PRODUCT, id: $id) { - ...ProductTranslationFragment + ...ProductTranslation } } `; -export const useProductTranslationDetails = makeQuery< - ProductTranslationDetails, - ProductTranslationDetailsVariables ->(productTranslationDetails); -const productVariantList = gql` +export const productVariantList = gql` query ProductVariantList($id: ID!) { product(id: $id) { id @@ -377,94 +236,59 @@ const productVariantList = gql` } } `; -export const useProductVariantList = makeQuery< - ProductVariantList, - ProductVariantListVariables ->(productVariantList); -const productVariantTranslationDetails = gql` - ${productVariantTranslationFragment} +export const productVariantTranslationDetails = gql` query ProductVariantTranslationDetails( $id: ID! $language: LanguageCodeEnum! ) { translation(kind: VARIANT, id: $id) { - ...ProductVariantTranslationFragment + ...ProductVariantTranslation } } `; -export const useProductVariantTranslationDetails = makeQuery< - ProductVariantTranslationDetails, - ProductVariantTranslationDetailsVariables ->(productVariantTranslationDetails); -const categoryTranslationDetails = gql` - ${categoryTranslationFragment} +export const categoryTranslationDetails = gql` query CategoryTranslationDetails($id: ID!, $language: LanguageCodeEnum!) { translation(kind: CATEGORY, id: $id) { - ...CategoryTranslationFragment + ...CategoryTranslation } } `; -export const useCategoryTranslationDetails = makeQuery< - CategoryTranslationDetails, - CategoryTranslationDetailsVariables ->(categoryTranslationDetails); -const collectionTranslationDetails = gql` - ${collectionTranslationFragment} +export const collectionTranslationDetails = gql` query CollectionTranslationDetails($id: ID!, $language: LanguageCodeEnum!) { translation(id: $id, kind: COLLECTION) { - ...CollectionTranslationFragment + ...CollectionTranslation } } `; -export const useCollectionTranslationDetails = makeQuery< - CollectionTranslationDetails, - CollectionTranslationDetailsVariables ->(collectionTranslationDetails); -const pageTranslationDetails = gql` - ${pageTranslationFragment} +export const pageTranslationDetails = gql` query PageTranslationDetails($id: ID!, $language: LanguageCodeEnum!) { translation(id: $id, kind: PAGE) { - ...PageTranslationFragment + ...PageTranslation } } `; -export const usePageTranslationDetails = makeQuery< - PageTranslationDetails, - PageTranslationDetailsVariables ->(pageTranslationDetails); -const saleTranslationDetails = gql` - ${saleTranslationFragment} +export const saleTranslationDetails = gql` query SaleTranslationDetails($id: ID!, $language: LanguageCodeEnum!) { translation(kind: SALE, id: $id) { - ...SaleTranslationFragment + ...SaleTranslation } } `; -export const useSaleTranslationDetails = makeQuery< - SaleTranslationDetails, - SaleTranslationDetailsVariables ->(saleTranslationDetails); -const voucherTranslationDetails = gql` - ${voucherTranslationFragment} +export const voucherTranslationDetails = gql` query VoucherTranslationDetails($id: ID!, $language: LanguageCodeEnum!) { translation(kind: VOUCHER, id: $id) { - ...VoucherTranslationFragment + ...VoucherTranslation } } `; -export const useVoucherTranslationDetails = makeQuery< - VoucherTranslationDetails, - VoucherTranslationDetailsVariables ->(voucherTranslationDetails); -const attributeTranslationDetails = gql` - ${attributeTranslationDetailsFragment} +export const attributeTranslationDetails = gql` query AttributeTranslationDetails( $id: ID! $language: LanguageCodeEnum! @@ -474,27 +298,18 @@ const attributeTranslationDetails = gql` $beforeValues: String ) { translation(kind: ATTRIBUTE, id: $id) { - ...AttributeTranslationDetailsFragment + ...AttributeTranslationDetails } } `; -export const useAttributeTranslationDetails = makeQuery< - AttributeTranslationDetails, - AttributeTranslationDetailsVariables ->(attributeTranslationDetails); -const shippingMethodTranslationDetails = gql` - ${shippingMethodTranslationFragment} +export const shippingMethodTranslationDetails = gql` query ShippingMethodTranslationDetails( $id: ID! $language: LanguageCodeEnum! ) { translation(kind: SHIPPING_METHOD, id: $id) { - ...ShippingMethodTranslationFragment + ...ShippingMethodTranslation } } `; -export const useShippingMethodTranslationDetails = makeQuery< - ShippingMethodTranslationDetails, - ShippingMethodTranslationDetailsVariables ->(shippingMethodTranslationDetails); diff --git a/src/translations/types.ts b/src/translations/types.ts index 0a076a3fa..daf4b36b5 100644 --- a/src/translations/types.ts +++ b/src/translations/types.ts @@ -1,5 +1,5 @@ import { OutputData } from "@editorjs/editorjs"; -import { ShopInfo_shop_languages } from "@saleor/components/Shop/types/ShopInfo"; +import { LanguageFragment } from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; @@ -32,7 +32,7 @@ export interface TranslationsEntitiesPageProps { activeField: string; disabled: boolean; languageCode: string; - languages: ShopInfo_shop_languages[]; + languages: LanguageFragment[]; saveButtonState: ConfirmButtonTransitionState; onBack: () => void; onEdit: (field: string) => void; diff --git a/src/translations/types/AttributeTranslationDetails.ts b/src/translations/types/AttributeTranslationDetails.ts deleted file mode 100644 index 6f384f555..000000000 --- a/src/translations/types/AttributeTranslationDetails.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum, AttributeInputTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: AttributeTranslationDetails -// ==================================================== - -export interface AttributeTranslationDetails_translation_ProductTranslatableContent { - __typename: "ProductTranslatableContent" | "CollectionTranslatableContent" | "CategoryTranslatableContent" | "AttributeValueTranslatableContent" | "ProductVariantTranslatableContent" | "PageTranslatableContent" | "ShippingMethodTranslatableContent" | "SaleTranslatableContent" | "VoucherTranslatableContent" | "MenuItemTranslatableContent"; -} - -export interface AttributeTranslationDetails_translation_AttributeTranslatableContent_translation { - __typename: "AttributeTranslation"; - id: string; - name: string; -} - -export interface AttributeTranslationDetails_translation_AttributeTranslatableContent_attribute_choices_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface AttributeTranslationDetails_translation_AttributeTranslatableContent_attribute_choices_edges_node_translation { - __typename: "AttributeValueTranslation"; - id: string; - name: string; - richText: any | null; -} - -export interface AttributeTranslationDetails_translation_AttributeTranslatableContent_attribute_choices_edges_node { - __typename: "AttributeValue"; - id: string; - name: string | null; - richText: any | null; - inputType: AttributeInputTypeEnum | null; - translation: AttributeTranslationDetails_translation_AttributeTranslatableContent_attribute_choices_edges_node_translation | null; -} - -export interface AttributeTranslationDetails_translation_AttributeTranslatableContent_attribute_choices_edges { - __typename: "AttributeValueCountableEdge"; - cursor: string; - node: AttributeTranslationDetails_translation_AttributeTranslatableContent_attribute_choices_edges_node; -} - -export interface AttributeTranslationDetails_translation_AttributeTranslatableContent_attribute_choices { - __typename: "AttributeValueCountableConnection"; - pageInfo: AttributeTranslationDetails_translation_AttributeTranslatableContent_attribute_choices_pageInfo; - edges: AttributeTranslationDetails_translation_AttributeTranslatableContent_attribute_choices_edges[]; -} - -export interface AttributeTranslationDetails_translation_AttributeTranslatableContent_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - inputType: AttributeInputTypeEnum | null; - withChoices: boolean; - choices: AttributeTranslationDetails_translation_AttributeTranslatableContent_attribute_choices | null; -} - -export interface AttributeTranslationDetails_translation_AttributeTranslatableContent { - __typename: "AttributeTranslatableContent"; - translation: AttributeTranslationDetails_translation_AttributeTranslatableContent_translation | null; - attribute: AttributeTranslationDetails_translation_AttributeTranslatableContent_attribute | null; -} - -export type AttributeTranslationDetails_translation = AttributeTranslationDetails_translation_ProductTranslatableContent | AttributeTranslationDetails_translation_AttributeTranslatableContent; - -export interface AttributeTranslationDetails { - translation: AttributeTranslationDetails_translation | null; -} - -export interface AttributeTranslationDetailsVariables { - id: string; - language: LanguageCodeEnum; - firstValues?: number | null; - afterValues?: string | null; - lastValues?: number | null; - beforeValues?: string | null; -} diff --git a/src/translations/types/AttributeTranslations.ts b/src/translations/types/AttributeTranslations.ts deleted file mode 100644 index 2bf219fc1..000000000 --- a/src/translations/types/AttributeTranslations.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum, AttributeInputTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: AttributeTranslations -// ==================================================== - -export interface AttributeTranslations_translations_edges_node_ProductTranslatableContent { - __typename: "ProductTranslatableContent" | "CollectionTranslatableContent" | "CategoryTranslatableContent" | "AttributeValueTranslatableContent" | "ProductVariantTranslatableContent" | "PageTranslatableContent" | "ShippingMethodTranslatableContent" | "SaleTranslatableContent" | "VoucherTranslatableContent" | "MenuItemTranslatableContent"; -} - -export interface AttributeTranslations_translations_edges_node_AttributeTranslatableContent_translation { - __typename: "AttributeTranslation"; - id: string; - name: string; -} - -export interface AttributeTranslations_translations_edges_node_AttributeTranslatableContent_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - inputType: AttributeInputTypeEnum | null; -} - -export interface AttributeTranslations_translations_edges_node_AttributeTranslatableContent { - __typename: "AttributeTranslatableContent"; - id: string; - name: string; - translation: AttributeTranslations_translations_edges_node_AttributeTranslatableContent_translation | null; - attribute: AttributeTranslations_translations_edges_node_AttributeTranslatableContent_attribute | null; -} - -export type AttributeTranslations_translations_edges_node = AttributeTranslations_translations_edges_node_ProductTranslatableContent | AttributeTranslations_translations_edges_node_AttributeTranslatableContent; - -export interface AttributeTranslations_translations_edges { - __typename: "TranslatableItemEdge"; - node: AttributeTranslations_translations_edges_node; -} - -export interface AttributeTranslations_translations_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface AttributeTranslations_translations { - __typename: "TranslatableItemConnection"; - edges: AttributeTranslations_translations_edges[]; - pageInfo: AttributeTranslations_translations_pageInfo; -} - -export interface AttributeTranslations { - translations: AttributeTranslations_translations | null; -} - -export interface AttributeTranslationsVariables { - language: LanguageCodeEnum; - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; -} diff --git a/src/translations/types/CategoryTranslationDetails.ts b/src/translations/types/CategoryTranslationDetails.ts deleted file mode 100644 index 10eaf57aa..000000000 --- a/src/translations/types/CategoryTranslationDetails.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: CategoryTranslationDetails -// ==================================================== - -export interface CategoryTranslationDetails_translation_ProductTranslatableContent { - __typename: "ProductTranslatableContent" | "CollectionTranslatableContent" | "AttributeTranslatableContent" | "AttributeValueTranslatableContent" | "ProductVariantTranslatableContent" | "PageTranslatableContent" | "ShippingMethodTranslatableContent" | "SaleTranslatableContent" | "VoucherTranslatableContent" | "MenuItemTranslatableContent"; -} - -export interface CategoryTranslationDetails_translation_CategoryTranslatableContent_translation_language { - __typename: "LanguageDisplay"; - language: string; -} - -export interface CategoryTranslationDetails_translation_CategoryTranslatableContent_translation { - __typename: "CategoryTranslation"; - id: string; - description: any | null; - language: CategoryTranslationDetails_translation_CategoryTranslatableContent_translation_language; - name: string | null; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface CategoryTranslationDetails_translation_CategoryTranslatableContent_category { - __typename: "Category"; - id: string; - name: string; - description: any | null; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface CategoryTranslationDetails_translation_CategoryTranslatableContent { - __typename: "CategoryTranslatableContent"; - translation: CategoryTranslationDetails_translation_CategoryTranslatableContent_translation | null; - category: CategoryTranslationDetails_translation_CategoryTranslatableContent_category | null; -} - -export type CategoryTranslationDetails_translation = CategoryTranslationDetails_translation_ProductTranslatableContent | CategoryTranslationDetails_translation_CategoryTranslatableContent; - -export interface CategoryTranslationDetails { - translation: CategoryTranslationDetails_translation | null; -} - -export interface CategoryTranslationDetailsVariables { - id: string; - language: LanguageCodeEnum; -} diff --git a/src/translations/types/CategoryTranslations.ts b/src/translations/types/CategoryTranslations.ts deleted file mode 100644 index 6d4c947e2..000000000 --- a/src/translations/types/CategoryTranslations.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: CategoryTranslations -// ==================================================== - -export interface CategoryTranslations_translations_edges_node_ProductTranslatableContent { - __typename: "ProductTranslatableContent" | "CollectionTranslatableContent" | "AttributeTranslatableContent" | "AttributeValueTranslatableContent" | "ProductVariantTranslatableContent" | "PageTranslatableContent" | "ShippingMethodTranslatableContent" | "SaleTranslatableContent" | "VoucherTranslatableContent" | "MenuItemTranslatableContent"; -} - -export interface CategoryTranslations_translations_edges_node_CategoryTranslatableContent_translation_language { - __typename: "LanguageDisplay"; - language: string; -} - -export interface CategoryTranslations_translations_edges_node_CategoryTranslatableContent_translation { - __typename: "CategoryTranslation"; - id: string; - description: any | null; - language: CategoryTranslations_translations_edges_node_CategoryTranslatableContent_translation_language; - name: string | null; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface CategoryTranslations_translations_edges_node_CategoryTranslatableContent_category { - __typename: "Category"; - id: string; - name: string; - description: any | null; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface CategoryTranslations_translations_edges_node_CategoryTranslatableContent { - __typename: "CategoryTranslatableContent"; - translation: CategoryTranslations_translations_edges_node_CategoryTranslatableContent_translation | null; - category: CategoryTranslations_translations_edges_node_CategoryTranslatableContent_category | null; -} - -export type CategoryTranslations_translations_edges_node = CategoryTranslations_translations_edges_node_ProductTranslatableContent | CategoryTranslations_translations_edges_node_CategoryTranslatableContent; - -export interface CategoryTranslations_translations_edges { - __typename: "TranslatableItemEdge"; - node: CategoryTranslations_translations_edges_node; -} - -export interface CategoryTranslations_translations_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface CategoryTranslations_translations { - __typename: "TranslatableItemConnection"; - edges: CategoryTranslations_translations_edges[]; - pageInfo: CategoryTranslations_translations_pageInfo; -} - -export interface CategoryTranslations { - translations: CategoryTranslations_translations | null; -} - -export interface CategoryTranslationsVariables { - language: LanguageCodeEnum; - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; -} diff --git a/src/translations/types/CollectionTranslationDetails.ts b/src/translations/types/CollectionTranslationDetails.ts deleted file mode 100644 index 505563da5..000000000 --- a/src/translations/types/CollectionTranslationDetails.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: CollectionTranslationDetails -// ==================================================== - -export interface CollectionTranslationDetails_translation_ProductTranslatableContent { - __typename: "ProductTranslatableContent" | "CategoryTranslatableContent" | "AttributeTranslatableContent" | "AttributeValueTranslatableContent" | "ProductVariantTranslatableContent" | "PageTranslatableContent" | "ShippingMethodTranslatableContent" | "SaleTranslatableContent" | "VoucherTranslatableContent" | "MenuItemTranslatableContent"; -} - -export interface CollectionTranslationDetails_translation_CollectionTranslatableContent_collection { - __typename: "Collection"; - id: string; - name: string; - description: any | null; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface CollectionTranslationDetails_translation_CollectionTranslatableContent_translation_language { - __typename: "LanguageDisplay"; - language: string; -} - -export interface CollectionTranslationDetails_translation_CollectionTranslatableContent_translation { - __typename: "CollectionTranslation"; - id: string; - description: any | null; - language: CollectionTranslationDetails_translation_CollectionTranslatableContent_translation_language; - name: string | null; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface CollectionTranslationDetails_translation_CollectionTranslatableContent { - __typename: "CollectionTranslatableContent"; - collection: CollectionTranslationDetails_translation_CollectionTranslatableContent_collection | null; - translation: CollectionTranslationDetails_translation_CollectionTranslatableContent_translation | null; -} - -export type CollectionTranslationDetails_translation = CollectionTranslationDetails_translation_ProductTranslatableContent | CollectionTranslationDetails_translation_CollectionTranslatableContent; - -export interface CollectionTranslationDetails { - translation: CollectionTranslationDetails_translation | null; -} - -export interface CollectionTranslationDetailsVariables { - id: string; - language: LanguageCodeEnum; -} diff --git a/src/translations/types/CollectionTranslations.ts b/src/translations/types/CollectionTranslations.ts deleted file mode 100644 index 4b8ab0c1e..000000000 --- a/src/translations/types/CollectionTranslations.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: CollectionTranslations -// ==================================================== - -export interface CollectionTranslations_translations_edges_node_ProductTranslatableContent { - __typename: "ProductTranslatableContent" | "CategoryTranslatableContent" | "AttributeTranslatableContent" | "AttributeValueTranslatableContent" | "ProductVariantTranslatableContent" | "PageTranslatableContent" | "ShippingMethodTranslatableContent" | "SaleTranslatableContent" | "VoucherTranslatableContent" | "MenuItemTranslatableContent"; -} - -export interface CollectionTranslations_translations_edges_node_CollectionTranslatableContent_collection { - __typename: "Collection"; - id: string; - name: string; - description: any | null; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface CollectionTranslations_translations_edges_node_CollectionTranslatableContent_translation_language { - __typename: "LanguageDisplay"; - language: string; -} - -export interface CollectionTranslations_translations_edges_node_CollectionTranslatableContent_translation { - __typename: "CollectionTranslation"; - id: string; - description: any | null; - language: CollectionTranslations_translations_edges_node_CollectionTranslatableContent_translation_language; - name: string | null; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface CollectionTranslations_translations_edges_node_CollectionTranslatableContent { - __typename: "CollectionTranslatableContent"; - collection: CollectionTranslations_translations_edges_node_CollectionTranslatableContent_collection | null; - translation: CollectionTranslations_translations_edges_node_CollectionTranslatableContent_translation | null; -} - -export type CollectionTranslations_translations_edges_node = CollectionTranslations_translations_edges_node_ProductTranslatableContent | CollectionTranslations_translations_edges_node_CollectionTranslatableContent; - -export interface CollectionTranslations_translations_edges { - __typename: "TranslatableItemEdge"; - node: CollectionTranslations_translations_edges_node; -} - -export interface CollectionTranslations_translations_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface CollectionTranslations_translations { - __typename: "TranslatableItemConnection"; - edges: CollectionTranslations_translations_edges[]; - pageInfo: CollectionTranslations_translations_pageInfo; -} - -export interface CollectionTranslations { - translations: CollectionTranslations_translations | null; -} - -export interface CollectionTranslationsVariables { - language: LanguageCodeEnum; - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; -} diff --git a/src/translations/types/PageTranslationDetails.ts b/src/translations/types/PageTranslationDetails.ts deleted file mode 100644 index c1d617df7..000000000 --- a/src/translations/types/PageTranslationDetails.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: PageTranslationDetails -// ==================================================== - -export interface PageTranslationDetails_translation_ProductTranslatableContent { - __typename: "ProductTranslatableContent" | "CollectionTranslatableContent" | "CategoryTranslatableContent" | "AttributeTranslatableContent" | "AttributeValueTranslatableContent" | "ProductVariantTranslatableContent" | "ShippingMethodTranslatableContent" | "SaleTranslatableContent" | "VoucherTranslatableContent" | "MenuItemTranslatableContent"; -} - -export interface PageTranslationDetails_translation_PageTranslatableContent_page { - __typename: "Page"; - id: string; - content: any | null; - seoDescription: string | null; - seoTitle: string | null; - title: string; -} - -export interface PageTranslationDetails_translation_PageTranslatableContent_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface PageTranslationDetails_translation_PageTranslatableContent_translation { - __typename: "PageTranslation"; - id: string; - content: any | null; - seoDescription: string | null; - seoTitle: string | null; - title: string | null; - language: PageTranslationDetails_translation_PageTranslatableContent_translation_language; -} - -export interface PageTranslationDetails_translation_PageTranslatableContent_attributeValues_attributeValue { - __typename: "AttributeValue"; - id: string; -} - -export interface PageTranslationDetails_translation_PageTranslatableContent_attributeValues_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface PageTranslationDetails_translation_PageTranslatableContent_attributeValues_translation { - __typename: "AttributeValueTranslation"; - id: string; - name: string; - richText: any | null; - language: PageTranslationDetails_translation_PageTranslatableContent_attributeValues_translation_language; -} - -export interface PageTranslationDetails_translation_PageTranslatableContent_attributeValues { - __typename: "AttributeValueTranslatableContent"; - id: string; - name: string; - richText: any | null; - attributeValue: PageTranslationDetails_translation_PageTranslatableContent_attributeValues_attributeValue | null; - translation: PageTranslationDetails_translation_PageTranslatableContent_attributeValues_translation | null; -} - -export interface PageTranslationDetails_translation_PageTranslatableContent { - __typename: "PageTranslatableContent"; - page: PageTranslationDetails_translation_PageTranslatableContent_page | null; - translation: PageTranslationDetails_translation_PageTranslatableContent_translation | null; - attributeValues: PageTranslationDetails_translation_PageTranslatableContent_attributeValues[]; -} - -export type PageTranslationDetails_translation = PageTranslationDetails_translation_ProductTranslatableContent | PageTranslationDetails_translation_PageTranslatableContent; - -export interface PageTranslationDetails { - translation: PageTranslationDetails_translation | null; -} - -export interface PageTranslationDetailsVariables { - id: string; - language: LanguageCodeEnum; -} diff --git a/src/translations/types/PageTranslations.ts b/src/translations/types/PageTranslations.ts deleted file mode 100644 index b15b5fe81..000000000 --- a/src/translations/types/PageTranslations.ts +++ /dev/null @@ -1,107 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: PageTranslations -// ==================================================== - -export interface PageTranslations_translations_edges_node_ProductTranslatableContent { - __typename: "ProductTranslatableContent" | "CollectionTranslatableContent" | "CategoryTranslatableContent" | "AttributeTranslatableContent" | "AttributeValueTranslatableContent" | "ProductVariantTranslatableContent" | "ShippingMethodTranslatableContent" | "SaleTranslatableContent" | "VoucherTranslatableContent" | "MenuItemTranslatableContent"; -} - -export interface PageTranslations_translations_edges_node_PageTranslatableContent_page { - __typename: "Page"; - id: string; - content: any | null; - seoDescription: string | null; - seoTitle: string | null; - title: string; -} - -export interface PageTranslations_translations_edges_node_PageTranslatableContent_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface PageTranslations_translations_edges_node_PageTranslatableContent_translation { - __typename: "PageTranslation"; - id: string; - content: any | null; - seoDescription: string | null; - seoTitle: string | null; - title: string | null; - language: PageTranslations_translations_edges_node_PageTranslatableContent_translation_language; -} - -export interface PageTranslations_translations_edges_node_PageTranslatableContent_attributeValues_attributeValue { - __typename: "AttributeValue"; - id: string; -} - -export interface PageTranslations_translations_edges_node_PageTranslatableContent_attributeValues_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface PageTranslations_translations_edges_node_PageTranslatableContent_attributeValues_translation { - __typename: "AttributeValueTranslation"; - id: string; - name: string; - richText: any | null; - language: PageTranslations_translations_edges_node_PageTranslatableContent_attributeValues_translation_language; -} - -export interface PageTranslations_translations_edges_node_PageTranslatableContent_attributeValues { - __typename: "AttributeValueTranslatableContent"; - id: string; - name: string; - richText: any | null; - attributeValue: PageTranslations_translations_edges_node_PageTranslatableContent_attributeValues_attributeValue | null; - translation: PageTranslations_translations_edges_node_PageTranslatableContent_attributeValues_translation | null; -} - -export interface PageTranslations_translations_edges_node_PageTranslatableContent { - __typename: "PageTranslatableContent"; - page: PageTranslations_translations_edges_node_PageTranslatableContent_page | null; - translation: PageTranslations_translations_edges_node_PageTranslatableContent_translation | null; - attributeValues: PageTranslations_translations_edges_node_PageTranslatableContent_attributeValues[]; -} - -export type PageTranslations_translations_edges_node = PageTranslations_translations_edges_node_ProductTranslatableContent | PageTranslations_translations_edges_node_PageTranslatableContent; - -export interface PageTranslations_translations_edges { - __typename: "TranslatableItemEdge"; - node: PageTranslations_translations_edges_node; -} - -export interface PageTranslations_translations_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface PageTranslations_translations { - __typename: "TranslatableItemConnection"; - edges: PageTranslations_translations_edges[]; - pageInfo: PageTranslations_translations_pageInfo; -} - -export interface PageTranslations { - translations: PageTranslations_translations | null; -} - -export interface PageTranslationsVariables { - language: LanguageCodeEnum; - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; -} diff --git a/src/translations/types/ProductTranslationDetails.ts b/src/translations/types/ProductTranslationDetails.ts deleted file mode 100644 index d1b76ae81..000000000 --- a/src/translations/types/ProductTranslationDetails.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ProductTranslationDetails -// ==================================================== - -export interface ProductTranslationDetails_translation_CollectionTranslatableContent { - __typename: "CollectionTranslatableContent" | "CategoryTranslatableContent" | "AttributeTranslatableContent" | "AttributeValueTranslatableContent" | "ProductVariantTranslatableContent" | "PageTranslatableContent" | "ShippingMethodTranslatableContent" | "SaleTranslatableContent" | "VoucherTranslatableContent" | "MenuItemTranslatableContent"; -} - -export interface ProductTranslationDetails_translation_ProductTranslatableContent_product { - __typename: "Product"; - id: string; - name: string; - description: any | null; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface ProductTranslationDetails_translation_ProductTranslatableContent_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface ProductTranslationDetails_translation_ProductTranslatableContent_translation { - __typename: "ProductTranslation"; - id: string; - seoTitle: string | null; - seoDescription: string | null; - name: string | null; - description: any | null; - language: ProductTranslationDetails_translation_ProductTranslatableContent_translation_language; -} - -export interface ProductTranslationDetails_translation_ProductTranslatableContent_attributeValues_attributeValue { - __typename: "AttributeValue"; - id: string; -} - -export interface ProductTranslationDetails_translation_ProductTranslatableContent_attributeValues_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface ProductTranslationDetails_translation_ProductTranslatableContent_attributeValues_translation { - __typename: "AttributeValueTranslation"; - id: string; - name: string; - richText: any | null; - language: ProductTranslationDetails_translation_ProductTranslatableContent_attributeValues_translation_language; -} - -export interface ProductTranslationDetails_translation_ProductTranslatableContent_attributeValues { - __typename: "AttributeValueTranslatableContent"; - id: string; - name: string; - richText: any | null; - attributeValue: ProductTranslationDetails_translation_ProductTranslatableContent_attributeValues_attributeValue | null; - translation: ProductTranslationDetails_translation_ProductTranslatableContent_attributeValues_translation | null; -} - -export interface ProductTranslationDetails_translation_ProductTranslatableContent { - __typename: "ProductTranslatableContent"; - product: ProductTranslationDetails_translation_ProductTranslatableContent_product | null; - translation: ProductTranslationDetails_translation_ProductTranslatableContent_translation | null; - attributeValues: ProductTranslationDetails_translation_ProductTranslatableContent_attributeValues[]; -} - -export type ProductTranslationDetails_translation = ProductTranslationDetails_translation_CollectionTranslatableContent | ProductTranslationDetails_translation_ProductTranslatableContent; - -export interface ProductTranslationDetails { - translation: ProductTranslationDetails_translation | null; -} - -export interface ProductTranslationDetailsVariables { - id: string; - language: LanguageCodeEnum; -} diff --git a/src/translations/types/ProductTranslations.ts b/src/translations/types/ProductTranslations.ts deleted file mode 100644 index 76d43977e..000000000 --- a/src/translations/types/ProductTranslations.ts +++ /dev/null @@ -1,107 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ProductTranslations -// ==================================================== - -export interface ProductTranslations_translations_edges_node_CollectionTranslatableContent { - __typename: "CollectionTranslatableContent" | "CategoryTranslatableContent" | "AttributeTranslatableContent" | "AttributeValueTranslatableContent" | "ProductVariantTranslatableContent" | "PageTranslatableContent" | "ShippingMethodTranslatableContent" | "SaleTranslatableContent" | "VoucherTranslatableContent" | "MenuItemTranslatableContent"; -} - -export interface ProductTranslations_translations_edges_node_ProductTranslatableContent_product { - __typename: "Product"; - id: string; - name: string; - description: any | null; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface ProductTranslations_translations_edges_node_ProductTranslatableContent_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface ProductTranslations_translations_edges_node_ProductTranslatableContent_translation { - __typename: "ProductTranslation"; - id: string; - seoTitle: string | null; - seoDescription: string | null; - name: string | null; - description: any | null; - language: ProductTranslations_translations_edges_node_ProductTranslatableContent_translation_language; -} - -export interface ProductTranslations_translations_edges_node_ProductTranslatableContent_attributeValues_attributeValue { - __typename: "AttributeValue"; - id: string; -} - -export interface ProductTranslations_translations_edges_node_ProductTranslatableContent_attributeValues_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface ProductTranslations_translations_edges_node_ProductTranslatableContent_attributeValues_translation { - __typename: "AttributeValueTranslation"; - id: string; - name: string; - richText: any | null; - language: ProductTranslations_translations_edges_node_ProductTranslatableContent_attributeValues_translation_language; -} - -export interface ProductTranslations_translations_edges_node_ProductTranslatableContent_attributeValues { - __typename: "AttributeValueTranslatableContent"; - id: string; - name: string; - richText: any | null; - attributeValue: ProductTranslations_translations_edges_node_ProductTranslatableContent_attributeValues_attributeValue | null; - translation: ProductTranslations_translations_edges_node_ProductTranslatableContent_attributeValues_translation | null; -} - -export interface ProductTranslations_translations_edges_node_ProductTranslatableContent { - __typename: "ProductTranslatableContent"; - product: ProductTranslations_translations_edges_node_ProductTranslatableContent_product | null; - translation: ProductTranslations_translations_edges_node_ProductTranslatableContent_translation | null; - attributeValues: ProductTranslations_translations_edges_node_ProductTranslatableContent_attributeValues[]; -} - -export type ProductTranslations_translations_edges_node = ProductTranslations_translations_edges_node_CollectionTranslatableContent | ProductTranslations_translations_edges_node_ProductTranslatableContent; - -export interface ProductTranslations_translations_edges { - __typename: "TranslatableItemEdge"; - node: ProductTranslations_translations_edges_node; -} - -export interface ProductTranslations_translations_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface ProductTranslations_translations { - __typename: "TranslatableItemConnection"; - edges: ProductTranslations_translations_edges[]; - pageInfo: ProductTranslations_translations_pageInfo; -} - -export interface ProductTranslations { - translations: ProductTranslations_translations | null; -} - -export interface ProductTranslationsVariables { - language: LanguageCodeEnum; - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; -} diff --git a/src/translations/types/ProductVariantList.ts b/src/translations/types/ProductVariantList.ts deleted file mode 100644 index c49c38a11..000000000 --- a/src/translations/types/ProductVariantList.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: ProductVariantList -// ==================================================== - -export interface ProductVariantList_product_variants { - __typename: "ProductVariant"; - id: string; - name: string; - sku: string | null; -} - -export interface ProductVariantList_product { - __typename: "Product"; - id: string; - variants: (ProductVariantList_product_variants | null)[] | null; -} - -export interface ProductVariantList { - product: ProductVariantList_product | null; -} - -export interface ProductVariantListVariables { - id: string; -} diff --git a/src/translations/types/ProductVariantTranslationDetails.ts b/src/translations/types/ProductVariantTranslationDetails.ts deleted file mode 100644 index fd4a47978..000000000 --- a/src/translations/types/ProductVariantTranslationDetails.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ProductVariantTranslationDetails -// ==================================================== - -export interface ProductVariantTranslationDetails_translation_ProductTranslatableContent { - __typename: "ProductTranslatableContent" | "CollectionTranslatableContent" | "CategoryTranslatableContent" | "AttributeTranslatableContent" | "AttributeValueTranslatableContent" | "PageTranslatableContent" | "ShippingMethodTranslatableContent" | "SaleTranslatableContent" | "VoucherTranslatableContent" | "MenuItemTranslatableContent"; -} - -export interface ProductVariantTranslationDetails_translation_ProductVariantTranslatableContent_productVariant { - __typename: "ProductVariant"; - id: string; -} - -export interface ProductVariantTranslationDetails_translation_ProductVariantTranslatableContent_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface ProductVariantTranslationDetails_translation_ProductVariantTranslatableContent_translation { - __typename: "ProductVariantTranslation"; - id: string; - name: string; - language: ProductVariantTranslationDetails_translation_ProductVariantTranslatableContent_translation_language; -} - -export interface ProductVariantTranslationDetails_translation_ProductVariantTranslatableContent_attributeValues_attributeValue { - __typename: "AttributeValue"; - id: string; -} - -export interface ProductVariantTranslationDetails_translation_ProductVariantTranslatableContent_attributeValues_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface ProductVariantTranslationDetails_translation_ProductVariantTranslatableContent_attributeValues_translation { - __typename: "AttributeValueTranslation"; - id: string; - name: string; - richText: any | null; - language: ProductVariantTranslationDetails_translation_ProductVariantTranslatableContent_attributeValues_translation_language; -} - -export interface ProductVariantTranslationDetails_translation_ProductVariantTranslatableContent_attributeValues { - __typename: "AttributeValueTranslatableContent"; - id: string; - name: string; - richText: any | null; - attributeValue: ProductVariantTranslationDetails_translation_ProductVariantTranslatableContent_attributeValues_attributeValue | null; - translation: ProductVariantTranslationDetails_translation_ProductVariantTranslatableContent_attributeValues_translation | null; -} - -export interface ProductVariantTranslationDetails_translation_ProductVariantTranslatableContent { - __typename: "ProductVariantTranslatableContent"; - productVariant: ProductVariantTranslationDetails_translation_ProductVariantTranslatableContent_productVariant | null; - name: string; - translation: ProductVariantTranslationDetails_translation_ProductVariantTranslatableContent_translation | null; - attributeValues: ProductVariantTranslationDetails_translation_ProductVariantTranslatableContent_attributeValues[]; -} - -export type ProductVariantTranslationDetails_translation = ProductVariantTranslationDetails_translation_ProductTranslatableContent | ProductVariantTranslationDetails_translation_ProductVariantTranslatableContent; - -export interface ProductVariantTranslationDetails { - translation: ProductVariantTranslationDetails_translation | null; -} - -export interface ProductVariantTranslationDetailsVariables { - id: string; - language: LanguageCodeEnum; -} diff --git a/src/translations/types/SaleTranslationDetails.ts b/src/translations/types/SaleTranslationDetails.ts deleted file mode 100644 index 80d6a89d1..000000000 --- a/src/translations/types/SaleTranslationDetails.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: SaleTranslationDetails -// ==================================================== - -export interface SaleTranslationDetails_translation_ProductTranslatableContent { - __typename: "ProductTranslatableContent" | "CollectionTranslatableContent" | "CategoryTranslatableContent" | "AttributeTranslatableContent" | "AttributeValueTranslatableContent" | "ProductVariantTranslatableContent" | "PageTranslatableContent" | "ShippingMethodTranslatableContent" | "VoucherTranslatableContent" | "MenuItemTranslatableContent"; -} - -export interface SaleTranslationDetails_translation_SaleTranslatableContent_sale { - __typename: "Sale"; - id: string; - name: string; -} - -export interface SaleTranslationDetails_translation_SaleTranslatableContent_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface SaleTranslationDetails_translation_SaleTranslatableContent_translation { - __typename: "SaleTranslation"; - id: string; - language: SaleTranslationDetails_translation_SaleTranslatableContent_translation_language; - name: string | null; -} - -export interface SaleTranslationDetails_translation_SaleTranslatableContent { - __typename: "SaleTranslatableContent"; - sale: SaleTranslationDetails_translation_SaleTranslatableContent_sale | null; - translation: SaleTranslationDetails_translation_SaleTranslatableContent_translation | null; -} - -export type SaleTranslationDetails_translation = SaleTranslationDetails_translation_ProductTranslatableContent | SaleTranslationDetails_translation_SaleTranslatableContent; - -export interface SaleTranslationDetails { - translation: SaleTranslationDetails_translation | null; -} - -export interface SaleTranslationDetailsVariables { - id: string; - language: LanguageCodeEnum; -} diff --git a/src/translations/types/SaleTranslations.ts b/src/translations/types/SaleTranslations.ts deleted file mode 100644 index 74ab637bb..000000000 --- a/src/translations/types/SaleTranslations.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: SaleTranslations -// ==================================================== - -export interface SaleTranslations_translations_edges_node_ProductTranslatableContent { - __typename: "ProductTranslatableContent" | "CollectionTranslatableContent" | "CategoryTranslatableContent" | "AttributeTranslatableContent" | "AttributeValueTranslatableContent" | "ProductVariantTranslatableContent" | "PageTranslatableContent" | "ShippingMethodTranslatableContent" | "VoucherTranslatableContent" | "MenuItemTranslatableContent"; -} - -export interface SaleTranslations_translations_edges_node_SaleTranslatableContent_sale { - __typename: "Sale"; - id: string; - name: string; -} - -export interface SaleTranslations_translations_edges_node_SaleTranslatableContent_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface SaleTranslations_translations_edges_node_SaleTranslatableContent_translation { - __typename: "SaleTranslation"; - id: string; - language: SaleTranslations_translations_edges_node_SaleTranslatableContent_translation_language; - name: string | null; -} - -export interface SaleTranslations_translations_edges_node_SaleTranslatableContent { - __typename: "SaleTranslatableContent"; - sale: SaleTranslations_translations_edges_node_SaleTranslatableContent_sale | null; - translation: SaleTranslations_translations_edges_node_SaleTranslatableContent_translation | null; -} - -export type SaleTranslations_translations_edges_node = SaleTranslations_translations_edges_node_ProductTranslatableContent | SaleTranslations_translations_edges_node_SaleTranslatableContent; - -export interface SaleTranslations_translations_edges { - __typename: "TranslatableItemEdge"; - node: SaleTranslations_translations_edges_node; -} - -export interface SaleTranslations_translations_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SaleTranslations_translations { - __typename: "TranslatableItemConnection"; - edges: SaleTranslations_translations_edges[]; - pageInfo: SaleTranslations_translations_pageInfo; -} - -export interface SaleTranslations { - translations: SaleTranslations_translations | null; -} - -export interface SaleTranslationsVariables { - language: LanguageCodeEnum; - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; -} diff --git a/src/translations/types/ShippingMethodTranslationDetails.ts b/src/translations/types/ShippingMethodTranslationDetails.ts deleted file mode 100644 index 25d6fb488..000000000 --- a/src/translations/types/ShippingMethodTranslationDetails.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ShippingMethodTranslationDetails -// ==================================================== - -export interface ShippingMethodTranslationDetails_translation_ProductTranslatableContent { - __typename: "ProductTranslatableContent" | "CollectionTranslatableContent" | "CategoryTranslatableContent" | "AttributeTranslatableContent" | "AttributeValueTranslatableContent" | "ProductVariantTranslatableContent" | "PageTranslatableContent" | "SaleTranslatableContent" | "VoucherTranslatableContent" | "MenuItemTranslatableContent"; -} - -export interface ShippingMethodTranslationDetails_translation_ShippingMethodTranslatableContent_shippingMethod { - __typename: "ShippingMethodType"; - id: string; -} - -export interface ShippingMethodTranslationDetails_translation_ShippingMethodTranslatableContent_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface ShippingMethodTranslationDetails_translation_ShippingMethodTranslatableContent_translation { - __typename: "ShippingMethodTranslation"; - id: string; - language: ShippingMethodTranslationDetails_translation_ShippingMethodTranslatableContent_translation_language; - name: string | null; - description: any | null; -} - -export interface ShippingMethodTranslationDetails_translation_ShippingMethodTranslatableContent { - __typename: "ShippingMethodTranslatableContent"; - id: string; - name: string; - description: any | null; - shippingMethod: ShippingMethodTranslationDetails_translation_ShippingMethodTranslatableContent_shippingMethod | null; - translation: ShippingMethodTranslationDetails_translation_ShippingMethodTranslatableContent_translation | null; -} - -export type ShippingMethodTranslationDetails_translation = ShippingMethodTranslationDetails_translation_ProductTranslatableContent | ShippingMethodTranslationDetails_translation_ShippingMethodTranslatableContent; - -export interface ShippingMethodTranslationDetails { - translation: ShippingMethodTranslationDetails_translation | null; -} - -export interface ShippingMethodTranslationDetailsVariables { - id: string; - language: LanguageCodeEnum; -} diff --git a/src/translations/types/ShippingMethodTranslations.ts b/src/translations/types/ShippingMethodTranslations.ts deleted file mode 100644 index 7cb670345..000000000 --- a/src/translations/types/ShippingMethodTranslations.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ShippingMethodTranslations -// ==================================================== - -export interface ShippingMethodTranslations_translations_edges_node_ProductTranslatableContent { - __typename: "ProductTranslatableContent" | "CollectionTranslatableContent" | "CategoryTranslatableContent" | "AttributeTranslatableContent" | "AttributeValueTranslatableContent" | "ProductVariantTranslatableContent" | "PageTranslatableContent" | "SaleTranslatableContent" | "VoucherTranslatableContent" | "MenuItemTranslatableContent"; -} - -export interface ShippingMethodTranslations_translations_edges_node_ShippingMethodTranslatableContent_shippingMethod { - __typename: "ShippingMethodType"; - id: string; -} - -export interface ShippingMethodTranslations_translations_edges_node_ShippingMethodTranslatableContent_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface ShippingMethodTranslations_translations_edges_node_ShippingMethodTranslatableContent_translation { - __typename: "ShippingMethodTranslation"; - id: string; - language: ShippingMethodTranslations_translations_edges_node_ShippingMethodTranslatableContent_translation_language; - name: string | null; - description: any | null; -} - -export interface ShippingMethodTranslations_translations_edges_node_ShippingMethodTranslatableContent { - __typename: "ShippingMethodTranslatableContent"; - id: string; - name: string; - description: any | null; - shippingMethod: ShippingMethodTranslations_translations_edges_node_ShippingMethodTranslatableContent_shippingMethod | null; - translation: ShippingMethodTranslations_translations_edges_node_ShippingMethodTranslatableContent_translation | null; -} - -export type ShippingMethodTranslations_translations_edges_node = ShippingMethodTranslations_translations_edges_node_ProductTranslatableContent | ShippingMethodTranslations_translations_edges_node_ShippingMethodTranslatableContent; - -export interface ShippingMethodTranslations_translations_edges { - __typename: "TranslatableItemEdge"; - node: ShippingMethodTranslations_translations_edges_node; -} - -export interface ShippingMethodTranslations_translations_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface ShippingMethodTranslations_translations { - __typename: "TranslatableItemConnection"; - edges: ShippingMethodTranslations_translations_edges[]; - pageInfo: ShippingMethodTranslations_translations_pageInfo; -} - -export interface ShippingMethodTranslations { - translations: ShippingMethodTranslations_translations | null; -} - -export interface ShippingMethodTranslationsVariables { - language: LanguageCodeEnum; - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; -} diff --git a/src/translations/types/UpdateAttributeTranslations.ts b/src/translations/types/UpdateAttributeTranslations.ts deleted file mode 100644 index fa5af7da3..000000000 --- a/src/translations/types/UpdateAttributeTranslations.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { NameTranslationInput, LanguageCodeEnum, TranslationErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: UpdateAttributeTranslations -// ==================================================== - -export interface UpdateAttributeTranslations_attributeTranslate_errors { - __typename: "TranslationError"; - code: TranslationErrorCode; - field: string | null; - message: string | null; -} - -export interface UpdateAttributeTranslations_attributeTranslate_attribute_translation { - __typename: "AttributeTranslation"; - id: string; - name: string; -} - -export interface UpdateAttributeTranslations_attributeTranslate_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - translation: UpdateAttributeTranslations_attributeTranslate_attribute_translation | null; -} - -export interface UpdateAttributeTranslations_attributeTranslate { - __typename: "AttributeTranslate"; - errors: UpdateAttributeTranslations_attributeTranslate_errors[]; - attribute: UpdateAttributeTranslations_attributeTranslate_attribute | null; -} - -export interface UpdateAttributeTranslations { - attributeTranslate: UpdateAttributeTranslations_attributeTranslate | null; -} - -export interface UpdateAttributeTranslationsVariables { - id: string; - input: NameTranslationInput; - language: LanguageCodeEnum; -} diff --git a/src/translations/types/UpdateAttributeValueTranslations.ts b/src/translations/types/UpdateAttributeValueTranslations.ts deleted file mode 100644 index 92cf671d6..000000000 --- a/src/translations/types/UpdateAttributeValueTranslations.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { AttributeValueTranslationInput, LanguageCodeEnum, TranslationErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: UpdateAttributeValueTranslations -// ==================================================== - -export interface UpdateAttributeValueTranslations_attributeValueTranslate_errors { - __typename: "TranslationError"; - code: TranslationErrorCode; - field: string | null; - message: string | null; -} - -export interface UpdateAttributeValueTranslations_attributeValueTranslate_attributeValue_translation { - __typename: "AttributeValueTranslation"; - id: string; - name: string; - richText: any | null; -} - -export interface UpdateAttributeValueTranslations_attributeValueTranslate_attributeValue { - __typename: "AttributeValue"; - id: string; - name: string | null; - richText: any | null; - translation: UpdateAttributeValueTranslations_attributeValueTranslate_attributeValue_translation | null; -} - -export interface UpdateAttributeValueTranslations_attributeValueTranslate { - __typename: "AttributeValueTranslate"; - errors: UpdateAttributeValueTranslations_attributeValueTranslate_errors[]; - attributeValue: UpdateAttributeValueTranslations_attributeValueTranslate_attributeValue | null; -} - -export interface UpdateAttributeValueTranslations { - attributeValueTranslate: UpdateAttributeValueTranslations_attributeValueTranslate | null; -} - -export interface UpdateAttributeValueTranslationsVariables { - id: string; - input: AttributeValueTranslationInput; - language: LanguageCodeEnum; -} diff --git a/src/translations/types/UpdateCategoryTranslations.ts b/src/translations/types/UpdateCategoryTranslations.ts deleted file mode 100644 index 5fd42ddc3..000000000 --- a/src/translations/types/UpdateCategoryTranslations.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { TranslationInput, LanguageCodeEnum, TranslationErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: UpdateCategoryTranslations -// ==================================================== - -export interface UpdateCategoryTranslations_categoryTranslate_errors { - __typename: "TranslationError"; - code: TranslationErrorCode; - field: string | null; - message: string | null; -} - -export interface UpdateCategoryTranslations_categoryTranslate_category_translation_language { - __typename: "LanguageDisplay"; - language: string; -} - -export interface UpdateCategoryTranslations_categoryTranslate_category_translation { - __typename: "CategoryTranslation"; - id: string; - description: any | null; - language: UpdateCategoryTranslations_categoryTranslate_category_translation_language; - name: string | null; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface UpdateCategoryTranslations_categoryTranslate_category { - __typename: "Category"; - id: string; - name: string; - description: any | null; - seoDescription: string | null; - seoTitle: string | null; - translation: UpdateCategoryTranslations_categoryTranslate_category_translation | null; -} - -export interface UpdateCategoryTranslations_categoryTranslate { - __typename: "CategoryTranslate"; - errors: UpdateCategoryTranslations_categoryTranslate_errors[]; - category: UpdateCategoryTranslations_categoryTranslate_category | null; -} - -export interface UpdateCategoryTranslations { - categoryTranslate: UpdateCategoryTranslations_categoryTranslate | null; -} - -export interface UpdateCategoryTranslationsVariables { - id: string; - input: TranslationInput; - language: LanguageCodeEnum; -} diff --git a/src/translations/types/UpdateCollectionTranslations.ts b/src/translations/types/UpdateCollectionTranslations.ts deleted file mode 100644 index 038c8d806..000000000 --- a/src/translations/types/UpdateCollectionTranslations.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { TranslationInput, LanguageCodeEnum, TranslationErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: UpdateCollectionTranslations -// ==================================================== - -export interface UpdateCollectionTranslations_collectionTranslate_errors { - __typename: "TranslationError"; - code: TranslationErrorCode; - field: string | null; - message: string | null; -} - -export interface UpdateCollectionTranslations_collectionTranslate_collection_translation_language { - __typename: "LanguageDisplay"; - language: string; -} - -export interface UpdateCollectionTranslations_collectionTranslate_collection_translation { - __typename: "CollectionTranslation"; - id: string; - description: any | null; - language: UpdateCollectionTranslations_collectionTranslate_collection_translation_language; - name: string | null; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface UpdateCollectionTranslations_collectionTranslate_collection { - __typename: "Collection"; - id: string; - name: string; - description: any | null; - seoDescription: string | null; - seoTitle: string | null; - translation: UpdateCollectionTranslations_collectionTranslate_collection_translation | null; -} - -export interface UpdateCollectionTranslations_collectionTranslate { - __typename: "CollectionTranslate"; - errors: UpdateCollectionTranslations_collectionTranslate_errors[]; - collection: UpdateCollectionTranslations_collectionTranslate_collection | null; -} - -export interface UpdateCollectionTranslations { - collectionTranslate: UpdateCollectionTranslations_collectionTranslate | null; -} - -export interface UpdateCollectionTranslationsVariables { - id: string; - input: TranslationInput; - language: LanguageCodeEnum; -} diff --git a/src/translations/types/UpdatePageTranslations.ts b/src/translations/types/UpdatePageTranslations.ts deleted file mode 100644 index 46c7dfbd7..000000000 --- a/src/translations/types/UpdatePageTranslations.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { PageTranslationInput, LanguageCodeEnum, TranslationErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: UpdatePageTranslations -// ==================================================== - -export interface UpdatePageTranslations_pageTranslate_errors { - __typename: "TranslationError"; - code: TranslationErrorCode; - field: string | null; - message: string | null; -} - -export interface UpdatePageTranslations_pageTranslate_page_page { - __typename: "Page"; - id: string; - content: any | null; - seoDescription: string | null; - seoTitle: string | null; - title: string; -} - -export interface UpdatePageTranslations_pageTranslate_page_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface UpdatePageTranslations_pageTranslate_page_translation { - __typename: "PageTranslation"; - id: string; - content: any | null; - seoDescription: string | null; - seoTitle: string | null; - title: string | null; - language: UpdatePageTranslations_pageTranslate_page_translation_language; -} - -export interface UpdatePageTranslations_pageTranslate_page_attributeValues_attributeValue { - __typename: "AttributeValue"; - id: string; -} - -export interface UpdatePageTranslations_pageTranslate_page_attributeValues_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface UpdatePageTranslations_pageTranslate_page_attributeValues_translation { - __typename: "AttributeValueTranslation"; - id: string; - name: string; - richText: any | null; - language: UpdatePageTranslations_pageTranslate_page_attributeValues_translation_language; -} - -export interface UpdatePageTranslations_pageTranslate_page_attributeValues { - __typename: "AttributeValueTranslatableContent"; - id: string; - name: string; - richText: any | null; - attributeValue: UpdatePageTranslations_pageTranslate_page_attributeValues_attributeValue | null; - translation: UpdatePageTranslations_pageTranslate_page_attributeValues_translation | null; -} - -export interface UpdatePageTranslations_pageTranslate_page { - __typename: "PageTranslatableContent"; - page: UpdatePageTranslations_pageTranslate_page_page | null; - translation: UpdatePageTranslations_pageTranslate_page_translation | null; - attributeValues: UpdatePageTranslations_pageTranslate_page_attributeValues[]; -} - -export interface UpdatePageTranslations_pageTranslate { - __typename: "PageTranslate"; - errors: UpdatePageTranslations_pageTranslate_errors[]; - page: UpdatePageTranslations_pageTranslate_page | null; -} - -export interface UpdatePageTranslations { - pageTranslate: UpdatePageTranslations_pageTranslate | null; -} - -export interface UpdatePageTranslationsVariables { - id: string; - input: PageTranslationInput; - language: LanguageCodeEnum; -} diff --git a/src/translations/types/UpdateProductTranslations.ts b/src/translations/types/UpdateProductTranslations.ts deleted file mode 100644 index cff3fb24d..000000000 --- a/src/translations/types/UpdateProductTranslations.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { TranslationInput, LanguageCodeEnum, TranslationErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: UpdateProductTranslations -// ==================================================== - -export interface UpdateProductTranslations_productTranslate_errors { - __typename: "TranslationError"; - code: TranslationErrorCode; - field: string | null; - message: string | null; -} - -export interface UpdateProductTranslations_productTranslate_product_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface UpdateProductTranslations_productTranslate_product_translation { - __typename: "ProductTranslation"; - id: string; - description: any | null; - language: UpdateProductTranslations_productTranslate_product_translation_language; - name: string | null; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface UpdateProductTranslations_productTranslate_product { - __typename: "Product"; - id: string; - name: string; - description: any | null; - seoDescription: string | null; - seoTitle: string | null; - translation: UpdateProductTranslations_productTranslate_product_translation | null; -} - -export interface UpdateProductTranslations_productTranslate { - __typename: "ProductTranslate"; - errors: UpdateProductTranslations_productTranslate_errors[]; - product: UpdateProductTranslations_productTranslate_product | null; -} - -export interface UpdateProductTranslations { - productTranslate: UpdateProductTranslations_productTranslate | null; -} - -export interface UpdateProductTranslationsVariables { - id: string; - input: TranslationInput; - language: LanguageCodeEnum; -} diff --git a/src/translations/types/UpdateProductVariantTranslations.ts b/src/translations/types/UpdateProductVariantTranslations.ts deleted file mode 100644 index 7202a3f30..000000000 --- a/src/translations/types/UpdateProductVariantTranslations.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { NameTranslationInput, LanguageCodeEnum, TranslationErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: UpdateProductVariantTranslations -// ==================================================== - -export interface UpdateProductVariantTranslations_productVariantTranslate_errors { - __typename: "TranslationError"; - code: TranslationErrorCode; - field: string | null; - message: string | null; -} - -export interface UpdateProductVariantTranslations_productVariantTranslate_productVariant_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface UpdateProductVariantTranslations_productVariantTranslate_productVariant_translation { - __typename: "ProductVariantTranslation"; - id: string; - name: string; - language: UpdateProductVariantTranslations_productVariantTranslate_productVariant_translation_language; -} - -export interface UpdateProductVariantTranslations_productVariantTranslate_productVariant { - __typename: "ProductVariant"; - id: string; - name: string; - translation: UpdateProductVariantTranslations_productVariantTranslate_productVariant_translation | null; -} - -export interface UpdateProductVariantTranslations_productVariantTranslate { - __typename: "ProductVariantTranslate"; - errors: UpdateProductVariantTranslations_productVariantTranslate_errors[]; - productVariant: UpdateProductVariantTranslations_productVariantTranslate_productVariant | null; -} - -export interface UpdateProductVariantTranslations { - productVariantTranslate: UpdateProductVariantTranslations_productVariantTranslate | null; -} - -export interface UpdateProductVariantTranslationsVariables { - id: string; - input: NameTranslationInput; - language: LanguageCodeEnum; -} diff --git a/src/translations/types/UpdateSaleTranslations.ts b/src/translations/types/UpdateSaleTranslations.ts deleted file mode 100644 index 17475dafa..000000000 --- a/src/translations/types/UpdateSaleTranslations.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { NameTranslationInput, LanguageCodeEnum, TranslationErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: UpdateSaleTranslations -// ==================================================== - -export interface UpdateSaleTranslations_saleTranslate_errors { - __typename: "TranslationError"; - code: TranslationErrorCode; - field: string | null; - message: string | null; -} - -export interface UpdateSaleTranslations_saleTranslate_sale_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface UpdateSaleTranslations_saleTranslate_sale_translation { - __typename: "SaleTranslation"; - id: string; - language: UpdateSaleTranslations_saleTranslate_sale_translation_language; - name: string | null; -} - -export interface UpdateSaleTranslations_saleTranslate_sale { - __typename: "Sale"; - id: string; - name: string; - translation: UpdateSaleTranslations_saleTranslate_sale_translation | null; -} - -export interface UpdateSaleTranslations_saleTranslate { - __typename: "SaleTranslate"; - errors: UpdateSaleTranslations_saleTranslate_errors[]; - sale: UpdateSaleTranslations_saleTranslate_sale | null; -} - -export interface UpdateSaleTranslations { - saleTranslate: UpdateSaleTranslations_saleTranslate | null; -} - -export interface UpdateSaleTranslationsVariables { - id: string; - input: NameTranslationInput; - language: LanguageCodeEnum; -} diff --git a/src/translations/types/UpdateShippingMethodTranslations.ts b/src/translations/types/UpdateShippingMethodTranslations.ts deleted file mode 100644 index 5f78f80d3..000000000 --- a/src/translations/types/UpdateShippingMethodTranslations.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { ShippingPriceTranslationInput, LanguageCodeEnum, TranslationErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: UpdateShippingMethodTranslations -// ==================================================== - -export interface UpdateShippingMethodTranslations_shippingPriceTranslate_errors { - __typename: "TranslationError"; - code: TranslationErrorCode; - field: string | null; - message: string | null; -} - -export interface UpdateShippingMethodTranslations_shippingPriceTranslate_shippingMethod_translation_language { - __typename: "LanguageDisplay"; - language: string; -} - -export interface UpdateShippingMethodTranslations_shippingPriceTranslate_shippingMethod_translation { - __typename: "ShippingMethodTranslation"; - id: string; - language: UpdateShippingMethodTranslations_shippingPriceTranslate_shippingMethod_translation_language; - name: string | null; - description: any | null; -} - -export interface UpdateShippingMethodTranslations_shippingPriceTranslate_shippingMethod { - __typename: "ShippingMethodType"; - id: string; - name: string; - description: any | null; - translation: UpdateShippingMethodTranslations_shippingPriceTranslate_shippingMethod_translation | null; -} - -export interface UpdateShippingMethodTranslations_shippingPriceTranslate { - __typename: "ShippingPriceTranslate"; - errors: UpdateShippingMethodTranslations_shippingPriceTranslate_errors[]; - shippingMethod: UpdateShippingMethodTranslations_shippingPriceTranslate_shippingMethod | null; -} - -export interface UpdateShippingMethodTranslations { - shippingPriceTranslate: UpdateShippingMethodTranslations_shippingPriceTranslate | null; -} - -export interface UpdateShippingMethodTranslationsVariables { - id: string; - input: ShippingPriceTranslationInput; - language: LanguageCodeEnum; -} diff --git a/src/translations/types/UpdateVoucherTranslations.ts b/src/translations/types/UpdateVoucherTranslations.ts deleted file mode 100644 index 7c8d03fb5..000000000 --- a/src/translations/types/UpdateVoucherTranslations.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { NameTranslationInput, LanguageCodeEnum, TranslationErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: UpdateVoucherTranslations -// ==================================================== - -export interface UpdateVoucherTranslations_voucherTranslate_errors { - __typename: "TranslationError"; - code: TranslationErrorCode; - field: string | null; - message: string | null; -} - -export interface UpdateVoucherTranslations_voucherTranslate_voucher_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface UpdateVoucherTranslations_voucherTranslate_voucher_translation { - __typename: "VoucherTranslation"; - id: string; - language: UpdateVoucherTranslations_voucherTranslate_voucher_translation_language; - name: string | null; -} - -export interface UpdateVoucherTranslations_voucherTranslate_voucher { - __typename: "Voucher"; - id: string; - name: string | null; - translation: UpdateVoucherTranslations_voucherTranslate_voucher_translation | null; -} - -export interface UpdateVoucherTranslations_voucherTranslate { - __typename: "VoucherTranslate"; - errors: UpdateVoucherTranslations_voucherTranslate_errors[]; - voucher: UpdateVoucherTranslations_voucherTranslate_voucher | null; -} - -export interface UpdateVoucherTranslations { - voucherTranslate: UpdateVoucherTranslations_voucherTranslate | null; -} - -export interface UpdateVoucherTranslationsVariables { - id: string; - input: NameTranslationInput; - language: LanguageCodeEnum; -} diff --git a/src/translations/types/VoucherTranslationDetails.ts b/src/translations/types/VoucherTranslationDetails.ts deleted file mode 100644 index 1eb9b374d..000000000 --- a/src/translations/types/VoucherTranslationDetails.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: VoucherTranslationDetails -// ==================================================== - -export interface VoucherTranslationDetails_translation_ProductTranslatableContent { - __typename: "ProductTranslatableContent" | "CollectionTranslatableContent" | "CategoryTranslatableContent" | "AttributeTranslatableContent" | "AttributeValueTranslatableContent" | "ProductVariantTranslatableContent" | "PageTranslatableContent" | "ShippingMethodTranslatableContent" | "SaleTranslatableContent" | "MenuItemTranslatableContent"; -} - -export interface VoucherTranslationDetails_translation_VoucherTranslatableContent_voucher { - __typename: "Voucher"; - id: string; - name: string | null; -} - -export interface VoucherTranslationDetails_translation_VoucherTranslatableContent_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface VoucherTranslationDetails_translation_VoucherTranslatableContent_translation { - __typename: "VoucherTranslation"; - id: string; - language: VoucherTranslationDetails_translation_VoucherTranslatableContent_translation_language; - name: string | null; -} - -export interface VoucherTranslationDetails_translation_VoucherTranslatableContent { - __typename: "VoucherTranslatableContent"; - name: string | null; - voucher: VoucherTranslationDetails_translation_VoucherTranslatableContent_voucher | null; - translation: VoucherTranslationDetails_translation_VoucherTranslatableContent_translation | null; -} - -export type VoucherTranslationDetails_translation = VoucherTranslationDetails_translation_ProductTranslatableContent | VoucherTranslationDetails_translation_VoucherTranslatableContent; - -export interface VoucherTranslationDetails { - translation: VoucherTranslationDetails_translation | null; -} - -export interface VoucherTranslationDetailsVariables { - id: string; - language: LanguageCodeEnum; -} diff --git a/src/translations/types/VoucherTranslations.ts b/src/translations/types/VoucherTranslations.ts deleted file mode 100644 index 47152d657..000000000 --- a/src/translations/types/VoucherTranslations.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: VoucherTranslations -// ==================================================== - -export interface VoucherTranslations_translations_edges_node_ProductTranslatableContent { - __typename: "ProductTranslatableContent" | "CollectionTranslatableContent" | "CategoryTranslatableContent" | "AttributeTranslatableContent" | "AttributeValueTranslatableContent" | "ProductVariantTranslatableContent" | "PageTranslatableContent" | "ShippingMethodTranslatableContent" | "SaleTranslatableContent" | "MenuItemTranslatableContent"; -} - -export interface VoucherTranslations_translations_edges_node_VoucherTranslatableContent_voucher { - __typename: "Voucher"; - id: string; - name: string | null; -} - -export interface VoucherTranslations_translations_edges_node_VoucherTranslatableContent_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface VoucherTranslations_translations_edges_node_VoucherTranslatableContent_translation { - __typename: "VoucherTranslation"; - id: string; - language: VoucherTranslations_translations_edges_node_VoucherTranslatableContent_translation_language; - name: string | null; -} - -export interface VoucherTranslations_translations_edges_node_VoucherTranslatableContent { - __typename: "VoucherTranslatableContent"; - name: string | null; - voucher: VoucherTranslations_translations_edges_node_VoucherTranslatableContent_voucher | null; - translation: VoucherTranslations_translations_edges_node_VoucherTranslatableContent_translation | null; -} - -export type VoucherTranslations_translations_edges_node = VoucherTranslations_translations_edges_node_ProductTranslatableContent | VoucherTranslations_translations_edges_node_VoucherTranslatableContent; - -export interface VoucherTranslations_translations_edges { - __typename: "TranslatableItemEdge"; - node: VoucherTranslations_translations_edges_node; -} - -export interface VoucherTranslations_translations_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface VoucherTranslations_translations { - __typename: "TranslatableItemConnection"; - edges: VoucherTranslations_translations_edges[]; - pageInfo: VoucherTranslations_translations_pageInfo; -} - -export interface VoucherTranslations { - translations: VoucherTranslations_translations | null; -} - -export interface VoucherTranslationsVariables { - language: LanguageCodeEnum; - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; -} diff --git a/src/translations/utils.ts b/src/translations/utils.ts index 8c40f3409..cb50d848d 100644 --- a/src/translations/utils.ts +++ b/src/translations/utils.ts @@ -1,5 +1,5 @@ import { OutputData } from "@editorjs/editorjs"; -import { AttributeTranslationDetailsFragment_attribute_choices } from "@saleor/fragments/types/AttributeTranslationDetailsFragment"; +import { AttributeTranslationDetailsFragment } from "@saleor/graphql"; import { TranslationField } from "@saleor/translations/types"; import { mapEdgesToItems } from "@saleor/utils/maps"; import { getParsedDataForJsonStringField } from "@saleor/utils/richText/misc"; @@ -34,7 +34,7 @@ export const getParsedTranslationInputData = ({ }; export const getTranslationFields = ( - fields: AttributeTranslationDetailsFragment_attribute_choices, + fields: AttributeTranslationDetailsFragment["attribute"]["choices"], intl: IntlShape ) => mapEdgesToItems(fields).map( diff --git a/src/translations/views/EntityLists/TranslationsAttributeList.tsx b/src/translations/views/EntityLists/TranslationsAttributeList.tsx new file mode 100644 index 000000000..cf36b7d1f --- /dev/null +++ b/src/translations/views/EntityLists/TranslationsAttributeList.tsx @@ -0,0 +1,59 @@ +import { useAttributeTranslationsQuery } from "@saleor/graphql"; +import useNavigator from "@saleor/hooks/useNavigator"; +import usePaginator from "@saleor/hooks/usePaginator"; +import TranslationsEntitiesList from "@saleor/translations/components/TranslationsEntitiesList"; +import { + languageEntityUrl, + TranslatableEntities +} from "@saleor/translations/urls"; +import { mapEdgesToItems } from "@saleor/utils/maps"; +import React from "react"; + +import { TranslationsEntityListProps } from "./types"; + +const TranslationsAttributeList: React.FC = ({ + params, + variables +}) => { + const navigate = useNavigator(); + const paginate = usePaginator(); + + const { data, loading } = useAttributeTranslationsQuery({ + displayLoader: true, + variables + }); + + const { loadNextPage, loadPreviousPage, pageInfo } = paginate( + data?.translations?.pageInfo, + variables, + params + ); + + return ( + + node.__typename === "AttributeTranslatableContent" && { + completion: null, + id: node?.attribute.id, + name: node?.attribute.name + } + )} + onRowClick={id => + navigate( + languageEntityUrl( + variables.language, + TranslatableEntities.attributes, + id + ) + ) + } + onNextPage={loadNextPage} + onPreviousPage={loadPreviousPage} + pageInfo={pageInfo} + /> + ); +}; + +export default TranslationsAttributeList; diff --git a/src/translations/views/EntityLists/TranslationsCategoryList.tsx b/src/translations/views/EntityLists/TranslationsCategoryList.tsx new file mode 100644 index 000000000..63b6be6bc --- /dev/null +++ b/src/translations/views/EntityLists/TranslationsCategoryList.tsx @@ -0,0 +1,68 @@ +import { useCategoryTranslationsQuery } from "@saleor/graphql"; +import useNavigator from "@saleor/hooks/useNavigator"; +import usePaginator from "@saleor/hooks/usePaginator"; +import TranslationsEntitiesList from "@saleor/translations/components/TranslationsEntitiesList"; +import { + languageEntityUrl, + TranslatableEntities +} from "@saleor/translations/urls"; +import { mapEdgesToItems } from "@saleor/utils/maps"; +import React from "react"; + +import { TranslationsEntityListProps } from "./types"; +import { sumCompleted } from "./utils"; + +const TranslationsCategoryList: React.FC = ({ + params, + variables +}) => { + const navigate = useNavigator(); + const paginate = usePaginator(); + + const { data, loading } = useCategoryTranslationsQuery({ + displayLoader: true, + variables + }); + + const { loadNextPage, loadPreviousPage, pageInfo } = paginate( + data?.translations?.pageInfo, + variables, + params + ); + + return ( + + node.__typename === "CategoryTranslatableContent" && { + completion: { + current: sumCompleted([ + node.translation?.description, + node.translation?.name, + node.translation?.seoDescription, + node.translation?.seoTitle + ]), + max: 4 + }, + id: node?.category?.id, + name: node?.category?.name + } + )} + onRowClick={id => + navigate( + languageEntityUrl( + variables.language, + TranslatableEntities.categories, + id + ) + ) + } + onNextPage={loadNextPage} + onPreviousPage={loadPreviousPage} + pageInfo={pageInfo} + /> + ); +}; + +export default TranslationsCategoryList; diff --git a/src/translations/views/EntityLists/TranslationsCollectionList.tsx b/src/translations/views/EntityLists/TranslationsCollectionList.tsx new file mode 100644 index 000000000..8a8353242 --- /dev/null +++ b/src/translations/views/EntityLists/TranslationsCollectionList.tsx @@ -0,0 +1,68 @@ +import { useCollectionTranslationsQuery } from "@saleor/graphql"; +import useNavigator from "@saleor/hooks/useNavigator"; +import usePaginator from "@saleor/hooks/usePaginator"; +import TranslationsEntitiesList from "@saleor/translations/components/TranslationsEntitiesList"; +import { + languageEntityUrl, + TranslatableEntities +} from "@saleor/translations/urls"; +import { mapEdgesToItems } from "@saleor/utils/maps"; +import React from "react"; + +import { TranslationsEntityListProps } from "./types"; +import { sumCompleted } from "./utils"; + +const TranslationsCollectionList: React.FC = ({ + params, + variables +}) => { + const navigate = useNavigator(); + const paginate = usePaginator(); + + const { data, loading } = useCollectionTranslationsQuery({ + displayLoader: true, + variables + }); + + const { loadNextPage, loadPreviousPage, pageInfo } = paginate( + data?.translations?.pageInfo, + variables, + params + ); + + return ( + + node.__typename === "CollectionTranslatableContent" && { + completion: { + current: sumCompleted([ + node.translation?.description, + node.translation?.name, + node.translation?.seoDescription, + node.translation?.seoTitle + ]), + max: 4 + }, + id: node.collection.id, + name: node.collection.name + } + )} + onRowClick={id => + navigate( + languageEntityUrl( + variables.language, + TranslatableEntities.collections, + id + ) + ) + } + onNextPage={loadNextPage} + onPreviousPage={loadPreviousPage} + pageInfo={pageInfo} + /> + ); +}; + +export default TranslationsCollectionList; diff --git a/src/translations/views/EntityLists/TranslationsPageList.tsx b/src/translations/views/EntityLists/TranslationsPageList.tsx new file mode 100644 index 000000000..38d612355 --- /dev/null +++ b/src/translations/views/EntityLists/TranslationsPageList.tsx @@ -0,0 +1,64 @@ +import { usePageTranslationsQuery } from "@saleor/graphql"; +import useNavigator from "@saleor/hooks/useNavigator"; +import usePaginator from "@saleor/hooks/usePaginator"; +import TranslationsEntitiesList from "@saleor/translations/components/TranslationsEntitiesList"; +import { + languageEntityUrl, + TranslatableEntities +} from "@saleor/translations/urls"; +import { mapEdgesToItems } from "@saleor/utils/maps"; +import React from "react"; + +import { TranslationsEntityListProps } from "./types"; +import { sumCompleted } from "./utils"; + +const TranslationsPageList: React.FC = ({ + params, + variables +}) => { + const navigate = useNavigator(); + const paginate = usePaginator(); + + const { data, loading } = usePageTranslationsQuery({ + displayLoader: true, + variables + }); + + const { loadNextPage, loadPreviousPage, pageInfo } = paginate( + data?.translations?.pageInfo, + variables, + params + ); + + return ( + + node.__typename === "PageTranslatableContent" && { + completion: { + current: sumCompleted([ + node.translation?.content, + node.translation?.seoDescription, + node.translation?.seoTitle, + node.translation?.title + ]), + max: 4 + }, + id: node?.page.id, + name: node?.page.title + } + )} + onRowClick={id => + navigate( + languageEntityUrl(variables.language, TranslatableEntities.pages, id) + ) + } + onNextPage={loadNextPage} + onPreviousPage={loadPreviousPage} + pageInfo={pageInfo} + /> + ); +}; + +export default TranslationsPageList; diff --git a/src/translations/views/EntityLists/TranslationsProductList.tsx b/src/translations/views/EntityLists/TranslationsProductList.tsx new file mode 100644 index 000000000..50b24abda --- /dev/null +++ b/src/translations/views/EntityLists/TranslationsProductList.tsx @@ -0,0 +1,71 @@ +import { useProductTranslationsQuery } from "@saleor/graphql"; +import useNavigator from "@saleor/hooks/useNavigator"; +import usePaginator from "@saleor/hooks/usePaginator"; +import TranslationsEntitiesList from "@saleor/translations/components/TranslationsEntitiesList"; +import { + languageEntityUrl, + TranslatableEntities +} from "@saleor/translations/urls"; +import { mapEdgesToItems } from "@saleor/utils/maps"; +import React from "react"; + +import { TranslationsEntityListProps } from "./types"; +import { sumCompleted } from "./utils"; + +const TranslationsProductList: React.FC = ({ + params, + variables +}) => { + const navigate = useNavigator(); + const paginate = usePaginator(); + + const { data, loading } = useProductTranslationsQuery({ + displayLoader: true, + variables + }); + + const { loadNextPage, loadPreviousPage, pageInfo } = paginate( + data?.translations?.pageInfo, + variables, + params + ); + + return ( + + node.__typename === "ProductTranslatableContent" && { + completion: { + current: sumCompleted([ + node.translation?.description, + node.translation?.name, + node.translation?.seoDescription, + node.translation?.seoTitle, + ...(node.attributeValues?.map( + ({ translation }) => translation?.richText + ) || []) + ]), + max: 4 + (node.attributeValues?.length || 0) + }, + id: node?.product?.id, + name: node?.product?.name + } + )} + onRowClick={id => + navigate( + languageEntityUrl( + variables.language, + TranslatableEntities.products, + id + ) + ) + } + onNextPage={loadNextPage} + onPreviousPage={loadPreviousPage} + pageInfo={pageInfo} + /> + ); +}; + +export default TranslationsProductList; diff --git a/src/translations/views/EntityLists/TranslationsSaleList.tsx b/src/translations/views/EntityLists/TranslationsSaleList.tsx new file mode 100644 index 000000000..099326b0b --- /dev/null +++ b/src/translations/views/EntityLists/TranslationsSaleList.tsx @@ -0,0 +1,59 @@ +import { useSaleTranslationsQuery } from "@saleor/graphql"; +import useNavigator from "@saleor/hooks/useNavigator"; +import usePaginator from "@saleor/hooks/usePaginator"; +import TranslationsEntitiesList from "@saleor/translations/components/TranslationsEntitiesList"; +import { + languageEntityUrl, + TranslatableEntities +} from "@saleor/translations/urls"; +import { mapEdgesToItems } from "@saleor/utils/maps"; +import React from "react"; + +import { TranslationsEntityListProps } from "./types"; +import { sumCompleted } from "./utils"; + +const TranslationsSaleList: React.FC = ({ + params, + variables +}) => { + const navigate = useNavigator(); + const paginate = usePaginator(); + + const { data, loading } = useSaleTranslationsQuery({ + displayLoader: true, + variables + }); + + const { loadNextPage, loadPreviousPage, pageInfo } = paginate( + data?.translations?.pageInfo, + variables, + params + ); + + return ( + + node.__typename === "SaleTranslatableContent" && { + completion: { + current: sumCompleted([node.translation?.name]), + max: 1 + }, + id: node.sale?.id, + name: node.sale?.name + } + )} + onRowClick={id => + navigate( + languageEntityUrl(variables.language, TranslatableEntities.sales, id) + ) + } + onNextPage={loadNextPage} + onPreviousPage={loadPreviousPage} + pageInfo={pageInfo} + /> + ); +}; + +export default TranslationsSaleList; diff --git a/src/translations/views/EntityLists/TranslationsShippingMethodList.tsx b/src/translations/views/EntityLists/TranslationsShippingMethodList.tsx new file mode 100644 index 000000000..5e5301cb8 --- /dev/null +++ b/src/translations/views/EntityLists/TranslationsShippingMethodList.tsx @@ -0,0 +1,66 @@ +import { useShippingMethodTranslationsQuery } from "@saleor/graphql"; +import useNavigator from "@saleor/hooks/useNavigator"; +import usePaginator from "@saleor/hooks/usePaginator"; +import TranslationsEntitiesList from "@saleor/translations/components/TranslationsEntitiesList"; +import { + languageEntityUrl, + TranslatableEntities +} from "@saleor/translations/urls"; +import { mapEdgesToItems } from "@saleor/utils/maps"; +import React from "react"; + +import { TranslationsEntityListProps } from "./types"; +import { sumCompleted } from "./utils"; + +const TranslationsShippingMethodList: React.FC = ({ + params, + variables +}) => { + const navigate = useNavigator(); + const paginate = usePaginator(); + + const { data, loading } = useShippingMethodTranslationsQuery({ + displayLoader: true, + variables + }); + + const { loadNextPage, loadPreviousPage, pageInfo } = paginate( + data?.translations?.pageInfo, + variables, + params + ); + + return ( + + node.__typename === "ShippingMethodTranslatableContent" && { + completion: { + current: sumCompleted([ + node.translation?.name, + node.translation?.description + ]), + max: 2 + }, + id: node?.shippingMethod.id, + name: node?.name + } + )} + onRowClick={id => + navigate( + languageEntityUrl( + variables.language, + TranslatableEntities.shippingMethods, + id + ) + ) + } + onNextPage={loadNextPage} + onPreviousPage={loadPreviousPage} + pageInfo={pageInfo} + /> + ); +}; + +export default TranslationsShippingMethodList; diff --git a/src/translations/views/EntityLists/TranslationsVoucherList.tsx b/src/translations/views/EntityLists/TranslationsVoucherList.tsx new file mode 100644 index 000000000..026b04271 --- /dev/null +++ b/src/translations/views/EntityLists/TranslationsVoucherList.tsx @@ -0,0 +1,63 @@ +import { useVoucherTranslationsQuery } from "@saleor/graphql"; +import useNavigator from "@saleor/hooks/useNavigator"; +import usePaginator from "@saleor/hooks/usePaginator"; +import TranslationsEntitiesList from "@saleor/translations/components/TranslationsEntitiesList"; +import { + languageEntityUrl, + TranslatableEntities +} from "@saleor/translations/urls"; +import { mapEdgesToItems } from "@saleor/utils/maps"; +import React from "react"; + +import { TranslationsEntityListProps } from "./types"; +import { sumCompleted } from "./utils"; + +const TranslationsVoucherList: React.FC = ({ + params, + variables +}) => { + const navigate = useNavigator(); + const paginate = usePaginator(); + + const { data, loading } = useVoucherTranslationsQuery({ + displayLoader: true, + variables + }); + + const { loadNextPage, loadPreviousPage, pageInfo } = paginate( + data?.translations?.pageInfo, + variables, + params + ); + + return ( + + node.__typename === "VoucherTranslatableContent" && { + completion: { + current: sumCompleted([node.translation?.name]), + max: 1 + }, + id: node.voucher?.id, + name: node.voucher?.name || "-" + } + )} + onRowClick={id => + navigate( + languageEntityUrl( + variables.language, + TranslatableEntities.vouchers, + id + ) + ) + } + onNextPage={loadNextPage} + onPreviousPage={loadPreviousPage} + pageInfo={pageInfo} + /> + ); +}; + +export default TranslationsVoucherList; diff --git a/src/translations/views/EntityLists/types.ts b/src/translations/views/EntityLists/types.ts new file mode 100644 index 000000000..b3c5f1309 --- /dev/null +++ b/src/translations/views/EntityLists/types.ts @@ -0,0 +1,8 @@ +import { LanguageCodeEnum } from "@saleor/graphql"; +import { PaginationState } from "@saleor/hooks/usePaginator"; +import { LanguageEntitiesUrlQueryParams } from "@saleor/translations/urls"; + +export interface TranslationsEntityListProps { + params: LanguageEntitiesUrlQueryParams; + variables: PaginationState & { language: LanguageCodeEnum }; +} diff --git a/src/translations/views/EntityLists/utils.ts b/src/translations/views/EntityLists/utils.ts new file mode 100644 index 000000000..b8f4107a1 --- /dev/null +++ b/src/translations/views/EntityLists/utils.ts @@ -0,0 +1,3 @@ +export function sumCompleted(list: any[]): number { + return list.reduce((acc, field) => acc + (field ? 1 : 0), 0); +} diff --git a/src/translations/views/TranslationsAttributes.tsx b/src/translations/views/TranslationsAttributes.tsx index 1c5eac4f6..e54f0d25c 100644 --- a/src/translations/views/TranslationsAttributes.tsx +++ b/src/translations/views/TranslationsAttributes.tsx @@ -1,4 +1,10 @@ import { OutputData } from "@editorjs/editorjs"; +import { + LanguageCodeEnum, + useAttributeTranslationDetailsQuery, + useUpdateAttributeTranslationsMutation, + useUpdateAttributeValueTranslationsMutation +} from "@saleor/graphql"; import useListSettings from "@saleor/hooks/useListSettings"; import useLocalPaginator, { useLocalPaginationState @@ -13,18 +19,10 @@ import React from "react"; import { useIntl } from "react-intl"; import { extractMutationErrors, getMutationState, maybe } from "../../misc"; -import { LanguageCodeEnum } from "../../types/globalTypes"; import TranslationsAttributesPage, { fieldNames } from "../components/TranslationsAttributesPage"; -import { - TypedUpdateAttributeTranslations, - TypedUpdateAttributeValueTranslations -} from "../mutations"; -import { useAttributeTranslationDetails } from "../queries"; import { TranslationField } from "../types"; -import { UpdateAttributeTranslations } from "../types/UpdateAttributeTranslations"; -import { UpdateAttributeValueTranslations } from "../types/UpdateAttributeValueTranslations"; import { languageEntitiesUrl, languageEntityUrl, @@ -58,7 +56,7 @@ const TranslationsAttributes: React.FC = ({ setValuesPaginationState ] = useLocalPaginationState(settings?.rowNumber); - const attributeTranslations = useAttributeTranslationDetails({ + const attributeTranslations = useAttributeTranslationDetailsQuery({ variables: { id, language: languageCode, @@ -80,6 +78,38 @@ const TranslationsAttributes: React.FC = ({ valuesPaginationState ); + const [ + updateAttributeTranslations, + updateAttributeTranslationsOpts + ] = useUpdateAttributeTranslationsMutation({ + onCompleted: data => { + if (data.attributeTranslate.errors.length === 0) { + attributeTranslations.refetch(); + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + navigate("?", { replace: true }); + } + } + }); + + const [ + updateAttributeValueTranslations, + updateAttributeValueTranslationsOpts + ] = useUpdateAttributeValueTranslationsMutation({ + onCompleted: data => { + if (data.attributeValueTranslate.errors.length === 0) { + attributeTranslations.refetch(); + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + navigate("?", { replace: true }); + } + } + }); + const onEdit = (field: string) => navigate( "?" + @@ -88,130 +118,92 @@ const TranslationsAttributes: React.FC = ({ }), { replace: true } ); - const onAttributeUpdate = (data: UpdateAttributeTranslations) => { - if (data.attributeTranslate.errors.length === 0) { - attributeTranslations.refetch(); - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - navigate("?", { replace: true }); - } - }; - const onAttributeValueUpdate = (data: UpdateAttributeValueTranslations) => { - if (data.attributeValueTranslate.errors.length === 0) { - attributeTranslations.refetch(); - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - navigate("?", { replace: true }); - } - }; + const onDiscard = () => { navigate("?", { replace: true }); }; + const handleSubmit = ( + { name }: TranslationField, + data: string | OutputData + ) => { + const [fieldName, fieldId] = name.split(":"); + + if (fieldName === fieldNames.attribute) { + updateAttributeTranslations({ + variables: { + id: fieldId, + input: { name: data as string }, + language: languageCode + } + }); + } else if ( + [fieldNames.value, fieldNames.richTextValue].includes(fieldName) + ) { + const isRichText = fieldName === fieldNames.richTextValue; + + return extractMutationErrors( + updateAttributeValueTranslations({ + variables: { + id: fieldId, + input: isRichText + ? { richText: JSON.stringify(data) } + : { name: data as string }, + language: languageCode + } + }) + ); + } + }; + + const saveButtonState = getMutationState( + updateAttributeTranslationsOpts.called || + updateAttributeValueTranslationsOpts.called, + updateAttributeTranslationsOpts.loading || + updateAttributeValueTranslationsOpts.loading, + maybe( + () => updateAttributeTranslationsOpts.data.attributeTranslate.errors, + [] + ), + maybe( + () => + updateAttributeValueTranslationsOpts.data.attributeValueTranslate + .errors, + [] + ) + ); + return ( - - {(updateAttributeTranslations, updateAttributeTranslationsOpts) => ( - - {( - updateAttributeValueTranslations, - updateAttributeValueTranslationsOpts - ) => { - const handleSubmit = ( - { name }: TranslationField, - data: string | OutputData - ) => { - const [fieldName, fieldId] = name.split(":"); - - if (fieldName === fieldNames.attribute) { - updateAttributeTranslations({ - variables: { - id: fieldId, - input: { name: data as string }, - language: languageCode - } - }); - } else if ( - [fieldNames.value, fieldNames.richTextValue].includes(fieldName) - ) { - const isRichText = fieldName === fieldNames.richTextValue; - - return extractMutationErrors( - updateAttributeValueTranslations({ - variables: { - id: fieldId, - input: isRichText - ? { richText: JSON.stringify(data) } - : { name: data as string }, - language: languageCode - } - }) - ); - } - }; - - const saveButtonState = getMutationState( - updateAttributeTranslationsOpts.called || - updateAttributeValueTranslationsOpts.called, - updateAttributeTranslationsOpts.loading || - updateAttributeValueTranslationsOpts.loading, - maybe( - () => - updateAttributeTranslationsOpts.data.attributeTranslate - .errors, - [] - ), - maybe( - () => - updateAttributeValueTranslationsOpts.data - .attributeValueTranslate.errors, - [] - ) - ); - - return ( - shop.languages, [])} - saveButtonState={saveButtonState} - onBack={() => - navigate( - languageEntitiesUrl(languageCode, { - tab: TranslatableEntities.attributes - }) - ) - } - onEdit={onEdit} - onDiscard={onDiscard} - onLanguageChange={lang => - navigate( - languageEntityUrl(lang, TranslatableEntities.attributes, id) - ) - } - onSubmit={handleSubmit} - data={translation} - settings={settings} - onUpdateListSettings={updateListSettings} - pageInfo={pageInfo} - onNextPage={loadNextPage} - onPreviousPage={loadPreviousPage} - /> - ); - }} - - )} - + shop.languages, [])} + saveButtonState={saveButtonState} + onBack={() => + navigate( + languageEntitiesUrl(languageCode, { + tab: TranslatableEntities.attributes + }) + ) + } + onEdit={onEdit} + onDiscard={onDiscard} + onLanguageChange={lang => + navigate(languageEntityUrl(lang, TranslatableEntities.attributes, id)) + } + onSubmit={handleSubmit} + data={translation} + settings={settings} + onUpdateListSettings={updateListSettings} + pageInfo={pageInfo} + onNextPage={loadNextPage} + onPreviousPage={loadPreviousPage} + /> ); }; TranslationsAttributes.displayName = "TranslationsAttributes"; diff --git a/src/translations/views/TranslationsCategories.tsx b/src/translations/views/TranslationsCategories.tsx index 6605211e8..834016b84 100644 --- a/src/translations/views/TranslationsCategories.tsx +++ b/src/translations/views/TranslationsCategories.tsx @@ -1,4 +1,9 @@ import { OutputData } from "@editorjs/editorjs"; +import { + LanguageCodeEnum, + useCategoryTranslationDetailsQuery, + useUpdateCategoryTranslationsMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; @@ -8,12 +13,8 @@ import { stringifyQs } from "@saleor/utils/urls"; import React from "react"; import { useIntl } from "react-intl"; -import { LanguageCodeEnum } from "../../types/globalTypes"; import TranslationsCategoriesPage from "../components/TranslationsCategoriesPage"; -import { TypedUpdateCategoryTranslations } from "../mutations"; -import { useCategoryTranslationDetails } from "../queries"; import { TranslationField, TranslationInputFieldName } from "../types"; -import { UpdateCategoryTranslations } from "../types/UpdateCategoryTranslations"; import { languageEntitiesUrl, languageEntityUrl, @@ -40,10 +41,26 @@ const TranslationsCategories: React.FC = ({ const shop = useShop(); const intl = useIntl(); - const categoryTranslations = useCategoryTranslationDetails({ + const categoryTranslations = useCategoryTranslationDetailsQuery({ variables: { id, language: languageCode } }); + const [ + updateTranslations, + updateTranslationsOpts + ] = useUpdateCategoryTranslationsMutation({ + onCompleted: data => { + if (data.categoryTranslate.errors.length === 0) { + categoryTranslations.refetch(); + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + navigate("?", { replace: true }); + } + } + }); + const onEdit = (field: string) => navigate( "?" + @@ -52,75 +69,56 @@ const TranslationsCategories: React.FC = ({ }), { replace: true } ); - const onUpdate = (data: UpdateCategoryTranslations) => { - if (data.categoryTranslate.errors.length === 0) { - categoryTranslations.refetch(); - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - navigate("?", { replace: true }); - } - }; + const onDiscard = () => { navigate("?", { replace: true }); }; + const handleSubmit = ( + { name: fieldName }: TranslationField, + data: string | OutputData + ) => + extractMutationErrors( + updateTranslations({ + variables: { + id, + input: getParsedTranslationInputData({ + data, + fieldName + }), + language: languageCode + } + }) + ); + + const translation = categoryTranslations?.data?.translation; + return ( - - {(updateTranslations, updateTranslationsOpts) => { - const handleSubmit = ( - { name: fieldName }: TranslationField, - data: string | OutputData - ) => - extractMutationErrors( - updateTranslations({ - variables: { - id, - input: getParsedTranslationInputData({ - data, - fieldName - }), - language: languageCode - } - }) - ); - - const translation = categoryTranslations?.data?.translation; - - return ( - - navigate( - languageEntitiesUrl(languageCode, { - tab: TranslatableEntities.categories - }) - ) - } - onEdit={onEdit} - onDiscard={onDiscard} - onLanguageChange={lang => - navigate( - languageEntityUrl(lang, TranslatableEntities.categories, id) - ) - } - onSubmit={handleSubmit} - data={ - translation?.__typename === "CategoryTranslatableContent" - ? translation - : null - } - /> - ); - }} - + + navigate( + languageEntitiesUrl(languageCode, { + tab: TranslatableEntities.categories + }) + ) + } + onEdit={onEdit} + onDiscard={onDiscard} + onLanguageChange={lang => + navigate(languageEntityUrl(lang, TranslatableEntities.categories, id)) + } + onSubmit={handleSubmit} + data={ + translation?.__typename === "CategoryTranslatableContent" + ? translation + : null + } + /> ); }; TranslationsCategories.displayName = "TranslationsCategories"; diff --git a/src/translations/views/TranslationsCollections.tsx b/src/translations/views/TranslationsCollections.tsx index 0440f2b90..9eba18c5b 100644 --- a/src/translations/views/TranslationsCollections.tsx +++ b/src/translations/views/TranslationsCollections.tsx @@ -1,3 +1,8 @@ +import { + LanguageCodeEnum, + useCollectionTranslationDetailsQuery, + useUpdateCollectionTranslationsMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; @@ -7,12 +12,8 @@ import React from "react"; import { useIntl } from "react-intl"; import { extractMutationErrors, maybe } from "../../misc"; -import { LanguageCodeEnum } from "../../types/globalTypes"; import TranslationsCollectionsPage from "../components/TranslationsCollectionsPage"; -import { TypedUpdateCollectionTranslations } from "../mutations"; -import { useCollectionTranslationDetails } from "../queries"; import { TranslationField, TranslationInputFieldName } from "../types"; -import { UpdateCollectionTranslations } from "../types/UpdateCollectionTranslations"; import { languageEntitiesUrl, languageEntityUrl, @@ -39,10 +40,26 @@ const TranslationsCollections: React.FC = ({ const shop = useShop(); const intl = useIntl(); - const collectionTranslations = useCollectionTranslationDetails({ + const collectionTranslations = useCollectionTranslationDetailsQuery({ variables: { id, language: languageCode } }); + const [ + updateTranslations, + updateTranslationsOpts + ] = useUpdateCollectionTranslationsMutation({ + onCompleted: data => { + if (data.collectionTranslate.errors.length === 0) { + collectionTranslations.refetch(); + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + navigate("?", { replace: true }); + } + } + }); + const onEdit = (field: string) => navigate( "?" + @@ -51,74 +68,57 @@ const TranslationsCollections: React.FC = ({ }), { replace: true } ); - const onUpdate = (data: UpdateCollectionTranslations) => { - if (data.collectionTranslate.errors.length === 0) { - collectionTranslations.refetch(); - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - navigate("?", { replace: true }); - } - }; + const onDiscard = () => { navigate("?", { replace: true }); }; const translation = collectionTranslations?.data?.translation; - return ( - - {(updateTranslations, updateTranslationsOpts) => { - const handleSubmit = ( - { name: fieldName }: TranslationField, - data: string - ) => - extractMutationErrors( - updateTranslations({ - variables: { - id, - input: getParsedTranslationInputData({ - data, - fieldName - }), - language: languageCode - } - }) - ); + const handleSubmit = ( + { name: fieldName }: TranslationField, + data: string + ) => + extractMutationErrors( + updateTranslations({ + variables: { + id, + input: getParsedTranslationInputData({ + data, + fieldName + }), + language: languageCode + } + }) + ); - return ( - shop.languages, [])} - saveButtonState={updateTranslationsOpts.status} - onEdit={onEdit} - onDiscard={onDiscard} - onBack={() => - navigate( - languageEntitiesUrl(languageCode, { - tab: TranslatableEntities.collections - }) - ) - } - onLanguageChange={lang => - navigate( - languageEntityUrl(lang, TranslatableEntities.collections, id) - ) - } - onSubmit={handleSubmit} - data={ - translation?.__typename === "CollectionTranslatableContent" - ? translation - : null - } - /> - ); - }} - + return ( + shop.languages, [])} + saveButtonState={updateTranslationsOpts.status} + onEdit={onEdit} + onDiscard={onDiscard} + onBack={() => + navigate( + languageEntitiesUrl(languageCode, { + tab: TranslatableEntities.collections + }) + ) + } + onLanguageChange={lang => + navigate(languageEntityUrl(lang, TranslatableEntities.collections, id)) + } + onSubmit={handleSubmit} + data={ + translation?.__typename === "CollectionTranslatableContent" + ? translation + : null + } + /> ); }; TranslationsCollections.displayName = "TranslationsCollections"; diff --git a/src/translations/views/TranslationsEntities.tsx b/src/translations/views/TranslationsEntities.tsx index 3747186f9..dd96a1c5a 100644 --- a/src/translations/views/TranslationsEntities.tsx +++ b/src/translations/views/TranslationsEntities.tsx @@ -1,47 +1,36 @@ import useNavigator from "@saleor/hooks/useNavigator"; -import usePaginator, { - createPaginationState -} from "@saleor/hooks/usePaginator"; +import { createPaginationState } from "@saleor/hooks/usePaginator"; import useShop from "@saleor/hooks/useShop"; -import { mapEdgesToItems } from "@saleor/utils/maps"; import { stringifyQs } from "@saleor/utils/urls"; import React from "react"; import { PAGINATE_BY } from "../../config"; import { maybe } from "../../misc"; -import TranslationsEntitiesList from "../components/TranslationsEntitiesList"; import TranslationsEntitiesListPage from "../components/TranslationsEntitiesListPage"; -import { - TypedAttributeTranslations, - TypedCategoryTranslations, - TypedCollectionTranslations, - TypedPageTranslations, - TypedProductTranslations, - TypedSaleTranslations, - TypedShippingMethodTranslations, - TypedVoucherTranslations -} from "../queries"; import { LanguageEntitiesUrlQueryParams, - languageEntityUrl, languageListUrl, TranslatableEntities } from "../urls"; +import TranslationsAttributeList from "./EntityLists/TranslationsAttributeList"; +import TranslationsCategoryList from "./EntityLists/TranslationsCategoryList"; +import TranslationsCollectionList from "./EntityLists/TranslationsCollectionList"; +import TranslationsPageList from "./EntityLists/TranslationsPageList"; +import TranslationsProductList from "./EntityLists/TranslationsProductList"; +import TranslationsSaleList from "./EntityLists/TranslationsSaleList"; +import TranslationsShippingMethodList from "./EntityLists/TranslationsShippingMethodList"; +import TranslationsVoucherList from "./EntityLists/TranslationsVoucherList"; interface TranslationsEntitiesProps { language: string; params: LanguageEntitiesUrlQueryParams; } -const sumCompleted = (list: any[]) => - list.reduce((acc, field) => acc + (field ? 1 : 0), 0); - const TranslationsEntities: React.FC = ({ language, params }) => { const navigate = useNavigator(); - const paginate = usePaginator(); const shop = useShop(); if (Object.keys(TranslatableEntities).indexOf(params.tab) === -1) { @@ -133,332 +122,27 @@ const TranslationsEntities: React.FC = ({ onBack={() => navigate(languageListUrl)} > {params.tab === "categories" ? ( - - {({ data, loading }) => { - const { loadNextPage, loadPreviousPage, pageInfo } = paginate( - data?.translations?.pageInfo, - paginationState, - params - ); - return ( - - node.__typename === "CategoryTranslatableContent" && { - completion: { - current: sumCompleted([ - node.translation?.description, - node.translation?.name, - node.translation?.seoDescription, - node.translation?.seoTitle - ]), - max: 4 - }, - id: node?.category?.id, - name: node?.category?.name - } - )} - onRowClick={id => - navigate( - languageEntityUrl( - language, - TranslatableEntities.categories, - id - ) - ) - } - onNextPage={loadNextPage} - onPreviousPage={loadPreviousPage} - pageInfo={pageInfo} - /> - ); - }} - + ) : params.tab === "products" ? ( - - {({ data, loading }) => { - const { loadNextPage, loadPreviousPage, pageInfo } = paginate( - data?.translations?.pageInfo, - paginationState, - params - ); - return ( - - node.__typename === "ProductTranslatableContent" && { - completion: { - current: sumCompleted([ - node.translation?.description, - node.translation?.name, - node.translation?.seoDescription, - node.translation?.seoTitle, - ...(node.attributeValues?.map( - ({ translation }) => translation?.richText - ) || []) - ]), - max: 4 + (node.attributeValues?.length || 0) - }, - id: node?.product?.id, - name: node?.product?.name - } - )} - onRowClick={id => - navigate( - languageEntityUrl( - language, - TranslatableEntities.products, - id - ) - ) - } - onNextPage={loadNextPage} - onPreviousPage={loadPreviousPage} - pageInfo={pageInfo} - /> - ); - }} - + ) : params.tab === "collections" ? ( - - {({ data, loading }) => { - const { loadNextPage, loadPreviousPage, pageInfo } = paginate( - data?.translations?.pageInfo, - paginationState, - params - ); - - return ( - - node.__typename === "CollectionTranslatableContent" && { - completion: { - current: sumCompleted([ - node.translation?.description, - node.translation?.name, - node.translation?.seoDescription, - node.translation?.seoTitle - ]), - max: 4 - }, - id: node.collection.id, - name: node.collection.name - } - )} - onRowClick={id => - navigate( - languageEntityUrl( - language, - TranslatableEntities.collections, - id - ) - ) - } - onNextPage={loadNextPage} - onPreviousPage={loadPreviousPage} - pageInfo={pageInfo} - /> - ); - }} - + ) : params.tab === "sales" ? ( - - {({ data, loading }) => { - const { loadNextPage, loadPreviousPage, pageInfo } = paginate( - data?.translations?.pageInfo, - paginationState, - params - ); - - return ( - - node.__typename === "SaleTranslatableContent" && { - completion: { - current: sumCompleted([node.translation?.name]), - max: 1 - }, - id: node.sale?.id, - name: node.sale?.name - } - )} - onRowClick={id => - navigate( - languageEntityUrl(language, TranslatableEntities.sales, id) - ) - } - onNextPage={loadNextPage} - onPreviousPage={loadPreviousPage} - pageInfo={pageInfo} - /> - ); - }} - + ) : params.tab === "vouchers" ? ( - - {({ data, loading }) => { - const { loadNextPage, loadPreviousPage, pageInfo } = paginate( - data?.translations?.pageInfo, - paginationState, - params - ); - return ( - - node.__typename === "VoucherTranslatableContent" && { - completion: { - current: sumCompleted([node.translation?.name]), - max: 1 - }, - id: node.voucher?.id, - name: node.voucher?.name || "-" - } - )} - onRowClick={id => - navigate( - languageEntityUrl( - language, - TranslatableEntities.vouchers, - id - ) - ) - } - onNextPage={loadNextPage} - onPreviousPage={loadPreviousPage} - pageInfo={pageInfo} - /> - ); - }} - + ) : params.tab === "pages" ? ( - - {({ data, loading }) => { - const { loadNextPage, loadPreviousPage, pageInfo } = paginate( - data?.translations?.pageInfo, - paginationState, - params - ); - - return ( - - node.__typename === "PageTranslatableContent" && { - completion: { - current: sumCompleted([ - node.translation?.content, - node.translation?.seoDescription, - node.translation?.seoTitle, - node.translation?.title - ]), - max: 4 - }, - id: node?.page.id, - name: node?.page.title - } - )} - onRowClick={id => - navigate( - languageEntityUrl(language, TranslatableEntities.pages, id) - ) - } - onNextPage={loadNextPage} - onPreviousPage={loadPreviousPage} - pageInfo={pageInfo} - /> - ); - }} - + ) : params.tab === "attributes" ? ( - - {({ data, loading }) => { - const { loadNextPage, loadPreviousPage, pageInfo } = paginate( - data?.translations?.pageInfo, - paginationState, - params - ); - return ( - - node.__typename === "AttributeTranslatableContent" && { - completion: null, - id: node?.attribute.id, - name: node?.attribute.name - } - )} - onRowClick={id => - navigate( - languageEntityUrl( - language, - TranslatableEntities.attributes, - id - ) - ) - } - onNextPage={loadNextPage} - onPreviousPage={loadPreviousPage} - pageInfo={pageInfo} - /> - ); - }} - + ) : params.tab === "shippingMethods" ? ( - - {({ data, loading }) => { - const { loadNextPage, loadPreviousPage, pageInfo } = paginate( - data?.translations?.pageInfo, - paginationState, - params - ); - return ( - - node.__typename === "ShippingMethodTranslatableContent" && { - completion: { - current: sumCompleted([ - node.translation?.name, - node.translation?.description - ]), - max: 2 - }, - id: node?.shippingMethod.id, - name: node?.name - } - )} - onRowClick={id => - navigate( - languageEntityUrl( - language, - TranslatableEntities.shippingMethods, - id - ) - ) - } - onNextPage={loadNextPage} - onPreviousPage={loadPreviousPage} - pageInfo={pageInfo} - /> - ); - }} - + ) : null} ); diff --git a/src/translations/views/TranslationsPages.tsx b/src/translations/views/TranslationsPages.tsx index cb5094abd..d954aa0d3 100644 --- a/src/translations/views/TranslationsPages.tsx +++ b/src/translations/views/TranslationsPages.tsx @@ -1,4 +1,10 @@ import { OutputData } from "@editorjs/editorjs"; +import { + LanguageCodeEnum, + usePageTranslationDetailsQuery, + useUpdateAttributeValueTranslationsMutation, + useUpdatePageTranslationsMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; @@ -8,13 +14,7 @@ import { stringifyQs } from "@saleor/utils/urls"; import React from "react"; import { useIntl } from "react-intl"; -import { LanguageCodeEnum } from "../../types/globalTypes"; import TranslationsPagesPage from "../components/TranslationsPagesPage"; -import { - TypedUpdateAttributeValueTranslations, - TypedUpdatePageTranslations -} from "../mutations"; -import { usePageTranslationDetails } from "../queries"; import { PageTranslationInputFieldName, TranslationField } from "../types"; import { languageEntitiesUrl, @@ -42,19 +42,10 @@ const TranslationsPages: React.FC = ({ const shop = useShop(); const intl = useIntl(); - const pageTranslations = usePageTranslationDetails({ + const pageTranslations = usePageTranslationDetailsQuery({ variables: { id, language: languageCode } }); - const onEdit = (field: string) => - navigate( - "?" + - stringifyQs({ - activeField: field - }), - { replace: true } - ); - const onUpdate = (errors: unknown[]) => { if (errors.length === 0) { pageTranslations.refetch(); @@ -66,90 +57,92 @@ const TranslationsPages: React.FC = ({ } }; + const [ + updateTranslations, + updateTranslationsOpts + ] = useUpdatePageTranslationsMutation({ + onCompleted: data => onUpdate(data.pageTranslate.errors) + }); + + const [ + updateAttributeValueTranslations + ] = useUpdateAttributeValueTranslationsMutation({ + onCompleted: data => onUpdate(data.attributeValueTranslate.errors) + }); + + const onEdit = (field: string) => + navigate( + "?" + + stringifyQs({ + activeField: field + }), + { replace: true } + ); + const onDiscard = () => { navigate("?", { replace: true }); }; + const handleSubmit = ( + { name: fieldName }: TranslationField, + data: string | any + ) => + extractMutationErrors( + updateTranslations({ + variables: { + id, + input: getParsedTranslationInputData({ + data, + fieldName + }), + language: languageCode + } + }) + ); + + const handleAttributeValueSubmit = ( + { id }: TranslationField, + data: OutputData + ) => + extractMutationErrors( + updateAttributeValueTranslations({ + variables: { + id, + input: { richText: JSON.stringify(data) }, + language: languageCode + } + }) + ); + + const translation = pageTranslations?.data?.translation; + return ( - onUpdate(data.pageTranslate.errors)} - > - {(updateTranslations, updateTranslationsOpts) => ( - onUpdate(data.attributeValueTranslate.errors)} - > - {updateAttributeValueTranslations => { - const handleSubmit = ( - { - name: fieldName - }: TranslationField, - data: string | any - ) => - extractMutationErrors( - updateTranslations({ - variables: { - id, - input: getParsedTranslationInputData({ - data, - fieldName - }), - language: languageCode - } - }) - ); - - const handleAttributeValueSubmit = ( - { id }: TranslationField, - data: OutputData - ) => - extractMutationErrors( - updateAttributeValueTranslations({ - variables: { - id, - input: { richText: JSON.stringify(data) }, - language: languageCode - } - }) - ); - - const translation = pageTranslations?.data?.translation; - - return ( - - navigate( - languageEntitiesUrl(languageCode, { - tab: TranslatableEntities.pages - }) - ) - } - onEdit={onEdit} - onDiscard={onDiscard} - onLanguageChange={lang => - navigate( - languageEntityUrl(lang, TranslatableEntities.pages, id) - ) - } - onSubmit={handleSubmit} - onAttributeValueSubmit={handleAttributeValueSubmit} - data={ - translation?.__typename === "PageTranslatableContent" - ? translation - : null - } - /> - ); - }} - - )} - + + navigate( + languageEntitiesUrl(languageCode, { + tab: TranslatableEntities.pages + }) + ) + } + onEdit={onEdit} + onDiscard={onDiscard} + onLanguageChange={lang => + navigate(languageEntityUrl(lang, TranslatableEntities.pages, id)) + } + onSubmit={handleSubmit} + onAttributeValueSubmit={handleAttributeValueSubmit} + data={ + translation?.__typename === "PageTranslatableContent" + ? translation + : null + } + /> ); }; TranslationsPages.displayName = "TranslationsPages"; diff --git a/src/translations/views/TranslationsProductVariants.tsx b/src/translations/views/TranslationsProductVariants.tsx index 8cd33f121..a2b9f0c5b 100644 --- a/src/translations/views/TranslationsProductVariants.tsx +++ b/src/translations/views/TranslationsProductVariants.tsx @@ -1,4 +1,10 @@ import { OutputData } from "@editorjs/editorjs"; +import { + LanguageCodeEnum, + useProductVariantTranslationDetailsQuery, + useUpdateAttributeValueTranslationsMutation, + useUpdateProductVariantTranslationsMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; @@ -8,13 +14,7 @@ import React from "react"; import { useIntl } from "react-intl"; import { extractMutationErrors, maybe } from "../../misc"; -import { LanguageCodeEnum } from "../../types/globalTypes"; import TranslationsProductVariantsPage from "../components/TranslationsProductVariantsPage"; -import { - TypedUpdateAttributeValueTranslations, - TypedUpdateProductVariantTranslations -} from "../mutations"; -import { useProductVariantTranslationDetails } from "../queries"; import { TranslationField, TranslationInputFieldName } from "../types"; import { languageEntitiesUrl, @@ -44,19 +44,10 @@ const TranslationsProductVariants: React.FC = const shop = useShop(); const intl = useIntl(); - const productVariantTranslations = useProductVariantTranslationDetails({ + const productVariantTranslations = useProductVariantTranslationDetailsQuery({ variables: { id, language: languageCode } }); - const onEdit = (field: string) => - navigate( - "?" + - stringifyQs({ - activeField: field - }), - { replace: true } - ); - const onUpdate = (errors: unknown[]) => { if (errors.length === 0) { productVariantTranslations.refetch(); @@ -68,90 +59,96 @@ const TranslationsProductVariants: React.FC = } }; + const [ + updateTranslations, + updateTranslationsOpts + ] = useUpdateProductVariantTranslationsMutation({ + onCompleted: data => onUpdate(data.productVariantTranslate.errors) + }); + + const [ + updateAttributeValueTranslations + ] = useUpdateAttributeValueTranslationsMutation({ + onCompleted: data => onUpdate(data.attributeValueTranslate.errors) + }); + + const onEdit = (field: string) => + navigate( + "?" + + stringifyQs({ + activeField: field + }), + { replace: true } + ); + const onDiscard = () => { navigate("?", { replace: true }); }; + const handleSubmit = ( + { name: fieldName }: TranslationField, + data: string + ) => + extractMutationErrors( + updateTranslations({ + variables: { + id, + input: getParsedTranslationInputData({ + data, + fieldName + }), + language: languageCode + } + }) + ); + + const handleAttributeValueSubmit = ( + { id }: TranslationField, + data: OutputData + ) => + extractMutationErrors( + updateAttributeValueTranslations({ + variables: { + id, + input: { richText: JSON.stringify(data) }, + language: languageCode + } + }) + ); + + const translation = productVariantTranslations?.data?.translation; + return ( - onUpdate(data.productVariantTranslate.errors)} - > - {(updateTranslations, updateTranslationsOpts) => ( - onUpdate(data.attributeValueTranslate.errors)} - > - {updateAttributeValueTranslations => { - const handleSubmit = ( - { name: fieldName }: TranslationField, - data: string - ) => - extractMutationErrors( - updateTranslations({ - variables: { - id, - input: getParsedTranslationInputData({ - data, - fieldName - }), - language: languageCode - } - }) - ); - - const handleAttributeValueSubmit = ( - { id }: TranslationField, - data: OutputData - ) => - extractMutationErrors( - updateAttributeValueTranslations({ - variables: { - id, - input: { richText: JSON.stringify(data) }, - language: languageCode - } - }) - ); - - const translation = productVariantTranslations?.data?.translation; - - return ( - shop.languages, [])} - saveButtonState={updateTranslationsOpts.status} - onBack={() => - navigate( - languageEntitiesUrl(languageCode, { - tab: TranslatableEntities.products - }) - ) - } - onEdit={onEdit} - onDiscard={onDiscard} - onLanguageChange={lang => - navigate(productVariantUrl(lang, productId, id)) - } - onSubmit={handleSubmit} - onAttributeValueSubmit={handleAttributeValueSubmit} - data={ - translation?.__typename === - "ProductVariantTranslatableContent" - ? translation - : null - } - /> - ); - }} - - )} - + shop.languages, [])} + saveButtonState={updateTranslationsOpts.status} + onBack={() => + navigate( + languageEntitiesUrl(languageCode, { + tab: TranslatableEntities.products + }) + ) + } + onEdit={onEdit} + onDiscard={onDiscard} + onLanguageChange={lang => + navigate(productVariantUrl(lang, productId, id)) + } + onSubmit={handleSubmit} + onAttributeValueSubmit={handleAttributeValueSubmit} + data={ + translation?.__typename === "ProductVariantTranslatableContent" + ? translation + : null + } + /> ); }; TranslationsProductVariants.displayName = "TranslationsProductVariants"; diff --git a/src/translations/views/TranslationsProducts.tsx b/src/translations/views/TranslationsProducts.tsx index b5e2dc589..4dedda24d 100644 --- a/src/translations/views/TranslationsProducts.tsx +++ b/src/translations/views/TranslationsProducts.tsx @@ -1,4 +1,10 @@ import { OutputData } from "@editorjs/editorjs"; +import { + LanguageCodeEnum, + useProductTranslationDetailsQuery, + useUpdateAttributeValueTranslationsMutation, + useUpdateProductTranslationsMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; @@ -8,13 +14,7 @@ import React from "react"; import { useIntl } from "react-intl"; import { extractMutationErrors, maybe } from "../../misc"; -import { LanguageCodeEnum } from "../../types/globalTypes"; import TranslationsProductsPage from "../components/TranslationsProductsPage"; -import { - TypedUpdateAttributeValueTranslations, - TypedUpdateProductTranslations -} from "../mutations"; -import { useProductTranslationDetails } from "../queries"; import { TranslationField, TranslationInputFieldName } from "../types"; import { languageEntitiesUrl, @@ -42,19 +42,10 @@ const TranslationsProducts: React.FC = ({ const shop = useShop(); const intl = useIntl(); - const productTranslations = useProductTranslationDetails({ + const productTranslations = useProductTranslationDetailsQuery({ variables: { id, language: languageCode } }); - const onEdit = (field: string) => - navigate( - "?" + - stringifyQs({ - activeField: field - }), - { replace: true } - ); - const onUpdate = (errors: unknown[]) => { if (errors.length === 0) { productTranslations.refetch(); @@ -66,89 +57,93 @@ const TranslationsProducts: React.FC = ({ } }; + const [ + updateTranslations, + updateTranslationsOpts + ] = useUpdateProductTranslationsMutation({ + onCompleted: data => onUpdate(data.productTranslate.errors) + }); + + const [ + updateAttributeValueTranslations + ] = useUpdateAttributeValueTranslationsMutation({ + onCompleted: data => onUpdate(data.attributeValueTranslate.errors) + }); + + const onEdit = (field: string) => + navigate( + "?" + + stringifyQs({ + activeField: field + }), + { replace: true } + ); + const onDiscard = () => { navigate("?", { replace: true }); }; + const handleSubmit = ( + { name: fieldName }: TranslationField, + data: string + ) => + extractMutationErrors( + updateTranslations({ + variables: { + id, + input: getParsedTranslationInputData({ + data, + fieldName + }), + language: languageCode + } + }) + ); + + const handleAttributeValueSubmit = ( + { id }: TranslationField, + data: OutputData + ) => + extractMutationErrors( + updateAttributeValueTranslations({ + variables: { + id, + input: { richText: JSON.stringify(data) }, + language: languageCode + } + }) + ); + + const translation = productTranslations?.data?.translation; + return ( - onUpdate(data.productTranslate.errors)} - > - {(updateTranslations, updateTranslationsOpts) => ( - onUpdate(data.attributeValueTranslate.errors)} - > - {updateAttributeValueTranslations => { - const handleSubmit = ( - { name: fieldName }: TranslationField, - data: string - ) => - extractMutationErrors( - updateTranslations({ - variables: { - id, - input: getParsedTranslationInputData({ - data, - fieldName - }), - language: languageCode - } - }) - ); - - const handleAttributeValueSubmit = ( - { id }: TranslationField, - data: OutputData - ) => - extractMutationErrors( - updateAttributeValueTranslations({ - variables: { - id, - input: { richText: JSON.stringify(data) }, - language: languageCode - } - }) - ); - - const translation = productTranslations?.data?.translation; - - return ( - shop.languages, [])} - saveButtonState={updateTranslationsOpts.status} - onBack={() => - navigate( - languageEntitiesUrl(languageCode, { - tab: TranslatableEntities.products - }) - ) - } - onEdit={onEdit} - onDiscard={onDiscard} - onLanguageChange={lang => - navigate( - languageEntityUrl(lang, TranslatableEntities.products, id) - ) - } - onSubmit={handleSubmit} - onAttributeValueSubmit={handleAttributeValueSubmit} - data={ - translation?.__typename === "ProductTranslatableContent" - ? translation - : null - } - /> - ); - }} - - )} - + shop.languages, [])} + saveButtonState={updateTranslationsOpts.status} + onBack={() => + navigate( + languageEntitiesUrl(languageCode, { + tab: TranslatableEntities.products + }) + ) + } + onEdit={onEdit} + onDiscard={onDiscard} + onLanguageChange={lang => + navigate(languageEntityUrl(lang, TranslatableEntities.products, id)) + } + onSubmit={handleSubmit} + onAttributeValueSubmit={handleAttributeValueSubmit} + data={ + translation?.__typename === "ProductTranslatableContent" + ? translation + : null + } + /> ); }; TranslationsProducts.displayName = "TranslationsProducts"; diff --git a/src/translations/views/TranslationsSales.tsx b/src/translations/views/TranslationsSales.tsx index 2c3a90d05..bbc99795a 100644 --- a/src/translations/views/TranslationsSales.tsx +++ b/src/translations/views/TranslationsSales.tsx @@ -1,3 +1,8 @@ +import { + LanguageCodeEnum, + useSaleTranslationDetailsQuery, + useUpdateSaleTranslationsMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; @@ -7,12 +12,8 @@ import { stringifyQs } from "@saleor/utils/urls"; import React from "react"; import { useIntl } from "react-intl"; -import { LanguageCodeEnum } from "../../types/globalTypes"; import TranslationsSalesPage from "../components/TranslationsSalesPage"; -import { TypedUpdateSaleTranslations } from "../mutations"; -import { useSaleTranslationDetails } from "../queries"; import { TranslationField, TranslationInputFieldName } from "../types"; -import { UpdateSaleTranslations } from "../types/UpdateSaleTranslations"; import { languageEntitiesUrl, languageEntityUrl, @@ -39,10 +40,26 @@ const TranslationsSales: React.FC = ({ const shop = useShop(); const intl = useIntl(); - const saleTranslations = useSaleTranslationDetails({ + const saleTranslations = useSaleTranslationDetailsQuery({ variables: { id, language: languageCode } }); + const [ + updateTranslations, + updateTranslationsOpts + ] = useUpdateSaleTranslationsMutation({ + onCompleted: data => { + if (data.saleTranslate.errors.length === 0) { + saleTranslations.refetch(); + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + navigate("?", { replace: true }); + } + } + }); + const onEdit = (field: string) => navigate( "?" + @@ -51,73 +68,56 @@ const TranslationsSales: React.FC = ({ }), { replace: true } ); - const onUpdate = (data: UpdateSaleTranslations) => { - if (data.saleTranslate.errors.length === 0) { - saleTranslations.refetch(); - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - navigate("?", { replace: true }); - } - }; + const onDiscard = () => { navigate("?", { replace: true }); }; + const handleSubmit = ( + { name: fieldName }: TranslationField, + data: string + ) => + extractMutationErrors( + updateTranslations({ + variables: { + id, + input: getParsedTranslationInputData({ + data, + fieldName + }), + language: languageCode + } + }) + ); + + const translation = saleTranslations?.data?.translation; + return ( - - {(updateTranslations, updateTranslationsOpts) => { - const handleSubmit = ( - { name: fieldName }: TranslationField, - data: string - ) => - extractMutationErrors( - updateTranslations({ - variables: { - id, - input: getParsedTranslationInputData({ - data, - fieldName - }), - language: languageCode - } - }) - ); - - const translation = saleTranslations?.data?.translation; - - return ( - - navigate( - languageEntitiesUrl(languageCode, { - tab: TranslatableEntities.sales - }) - ) - } - onEdit={onEdit} - onDiscard={onDiscard} - onSubmit={handleSubmit} - onLanguageChange={lang => - navigate(languageEntityUrl(lang, TranslatableEntities.sales, id)) - } - data={ - translation?.__typename === "SaleTranslatableContent" - ? translation - : null - } - /> - ); - }} - + + navigate( + languageEntitiesUrl(languageCode, { + tab: TranslatableEntities.sales + }) + ) + } + onEdit={onEdit} + onDiscard={onDiscard} + onSubmit={handleSubmit} + onLanguageChange={lang => + navigate(languageEntityUrl(lang, TranslatableEntities.sales, id)) + } + data={ + translation?.__typename === "SaleTranslatableContent" + ? translation + : null + } + /> ); }; TranslationsSales.displayName = "TranslationsSales"; diff --git a/src/translations/views/TranslationsShippingMethod.tsx b/src/translations/views/TranslationsShippingMethod.tsx index 7a7296bbb..73a44a8ec 100644 --- a/src/translations/views/TranslationsShippingMethod.tsx +++ b/src/translations/views/TranslationsShippingMethod.tsx @@ -1,3 +1,8 @@ +import { + LanguageCodeEnum, + useShippingMethodTranslationDetailsQuery, + useUpdateShippingMethodTranslationsMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; @@ -7,12 +12,8 @@ import { stringifyQs } from "@saleor/utils/urls"; import React from "react"; import { useIntl } from "react-intl"; -import { LanguageCodeEnum } from "../../types/globalTypes"; import TranslationsShippingMethodPage from "../components/TranslationsShippingMethodPage"; -import { TypedUpdateShippingMethodTranslations } from "../mutations"; -import { useShippingMethodTranslationDetails } from "../queries"; import { TranslationField, TranslationInputFieldName } from "../types"; -import { UpdateShippingMethodTranslations } from "../types/UpdateShippingMethodTranslations"; import { languageEntitiesUrl, languageEntityUrl, @@ -39,10 +40,26 @@ const TranslationsShippingMethod: React.FC = ({ const shop = useShop(); const intl = useIntl(); - const shippingMethodTranslations = useShippingMethodTranslationDetails({ + const shippingMethodTranslations = useShippingMethodTranslationDetailsQuery({ variables: { id, language: languageCode } }); + const [ + updateTranslations, + updateTranslationsOpts + ] = useUpdateShippingMethodTranslationsMutation({ + onCompleted: data => { + if (data.shippingPriceTranslate.errors.length === 0) { + shippingMethodTranslations.refetch(); + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + navigate("?", { replace: true }); + } + } + }); + const onEdit = (field: string) => navigate( "?" + @@ -51,77 +68,57 @@ const TranslationsShippingMethod: React.FC = ({ }), { replace: true } ); - const onUpdate = (data: UpdateShippingMethodTranslations) => { - if (data.shippingPriceTranslate.errors.length === 0) { - shippingMethodTranslations.refetch(); - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - navigate("?", { replace: true }); - } - }; + const onDiscard = () => { navigate("?", { replace: true }); }; + const handleSubmit = ( + { name: fieldName }: TranslationField, + data: string + ) => + extractMutationErrors( + updateTranslations({ + variables: { + id, + input: getParsedTranslationInputData({ fieldName, data }), + language: languageCode + } + }) + ); + + const translation = shippingMethodTranslations?.data?.translation; + return ( - - {(updateTranslations, updateTranslationsOpts) => { - const handleSubmit = ( - { name: fieldName }: TranslationField, - data: string - ) => - extractMutationErrors( - updateTranslations({ - variables: { - id, - input: getParsedTranslationInputData({ fieldName, data }), - language: languageCode - } - }) - ); - - const translation = shippingMethodTranslations?.data?.translation; - - return ( - - navigate( - languageEntitiesUrl(languageCode, { - tab: TranslatableEntities.shippingMethods - }) - ) - } - onEdit={onEdit} - onDiscard={onDiscard} - onSubmit={handleSubmit} - onLanguageChange={lang => - navigate( - languageEntityUrl( - lang, - TranslatableEntities.shippingMethods, - id - ) - ) - } - data={ - translation?.__typename === "ShippingMethodTranslatableContent" - ? translation - : null - } - /> - ); - }} - + + navigate( + languageEntitiesUrl(languageCode, { + tab: TranslatableEntities.shippingMethods + }) + ) + } + onEdit={onEdit} + onDiscard={onDiscard} + onSubmit={handleSubmit} + onLanguageChange={lang => + navigate( + languageEntityUrl(lang, TranslatableEntities.shippingMethods, id) + ) + } + data={ + translation?.__typename === "ShippingMethodTranslatableContent" + ? translation + : null + } + /> ); }; TranslationsShippingMethod.displayName = "TranslationsShippingMethod"; diff --git a/src/translations/views/TranslationsVouchers.tsx b/src/translations/views/TranslationsVouchers.tsx index a0dd625c1..1f6dee9b4 100644 --- a/src/translations/views/TranslationsVouchers.tsx +++ b/src/translations/views/TranslationsVouchers.tsx @@ -1,3 +1,8 @@ +import { + LanguageCodeEnum, + useUpdateVoucherTranslationsMutation, + useVoucherTranslationDetailsQuery +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; @@ -7,12 +12,8 @@ import React from "react"; import { useIntl } from "react-intl"; import { extractMutationErrors, maybe } from "../../misc"; -import { LanguageCodeEnum } from "../../types/globalTypes"; import TranslationsVouchersPage from "../components/TranslationsVouchersPage"; -import { TypedUpdateVoucherTranslations } from "../mutations"; -import { useVoucherTranslationDetails } from "../queries"; import { TranslationField, TranslationInputFieldName } from "../types"; -import { UpdateVoucherTranslations } from "../types/UpdateVoucherTranslations"; import { languageEntitiesUrl, languageEntityUrl, @@ -39,10 +40,26 @@ const TranslationsVouchers: React.FC = ({ const shop = useShop(); const intl = useIntl(); - const voucherTranslations = useVoucherTranslationDetails({ + const voucherTranslations = useVoucherTranslationDetailsQuery({ variables: { id, language: languageCode } }); + const [ + updateTranslations, + updateTranslationsOpts + ] = useUpdateVoucherTranslationsMutation({ + onCompleted: data => { + if (data.voucherTranslate.errors.length === 0) { + voucherTranslations.refetch(); + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + navigate("?", { replace: true }); + } + } + }); + const onEdit = (field: string) => navigate( "?" + @@ -51,75 +68,56 @@ const TranslationsVouchers: React.FC = ({ }), { replace: true } ); - const onUpdate = (data: UpdateVoucherTranslations) => { - if (data.voucherTranslate.errors.length === 0) { - voucherTranslations.refetch(); - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - navigate("?", { replace: true }); - } - }; + const onDiscard = () => { navigate("?", { replace: true }); }; + const handleSubmit = ( + { name: fieldName }: TranslationField, + data: string + ) => + extractMutationErrors( + updateTranslations({ + variables: { + id, + input: getParsedTranslationInputData({ + data, + fieldName + }), + language: languageCode + } + }) + ); + + const translation = voucherTranslations?.data?.translation; + return ( - - {(updateTranslations, updateTranslationsOpts) => { - const handleSubmit = ( - { name: fieldName }: TranslationField, - data: string - ) => - extractMutationErrors( - updateTranslations({ - variables: { - id, - input: getParsedTranslationInputData({ - data, - fieldName - }), - language: languageCode - } - }) - ); - - const translation = voucherTranslations?.data?.translation; - - return ( - shop.languages, [])} - languageCode={languageCode} - saveButtonState={updateTranslationsOpts.status} - onBack={() => - navigate( - languageEntitiesUrl(languageCode, { - tab: TranslatableEntities.vouchers - }) - ) - } - onEdit={onEdit} - onDiscard={onDiscard} - onLanguageChange={lang => - navigate( - languageEntityUrl(lang, TranslatableEntities.vouchers, id) - ) - } - onSubmit={handleSubmit} - data={ - translation?.__typename === "VoucherTranslatableContent" - ? translation - : null - } - /> - ); - }} - + shop.languages, [])} + languageCode={languageCode} + saveButtonState={updateTranslationsOpts.status} + onBack={() => + navigate( + languageEntitiesUrl(languageCode, { + tab: TranslatableEntities.vouchers + }) + ) + } + onEdit={onEdit} + onDiscard={onDiscard} + onLanguageChange={lang => + navigate(languageEntityUrl(lang, TranslatableEntities.vouchers, id)) + } + onSubmit={handleSubmit} + data={ + translation?.__typename === "VoucherTranslatableContent" + ? translation + : null + } + /> ); }; TranslationsVouchers.displayName = "TranslationsVouchers"; diff --git a/src/types.ts b/src/types.ts index 057784e21..fc4cb6d17 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,9 +1,9 @@ import { FetchResult, MutationResult, ServerError } from "@apollo/client"; +import { UserPermissionFragment } from "@saleor/graphql"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { IFilter, IFilterElement } from "./components/Filter"; import { MultiAutocompleteChoiceType } from "./components/MultiAutocompleteSelectField"; -import { User_userPermissions } from "./fragments/types/User"; export interface UserError { field: string | null; @@ -195,7 +195,7 @@ export interface FetchMoreProps { export type TabActionDialog = "save-search" | "delete-search"; export interface UserPermissionProps { - userPermissions: User_userPermissions[]; + userPermissions: UserPermissionFragment[]; } export interface MutationResultAdditionalProps { @@ -226,3 +226,7 @@ export enum StatusType { } export type ServerErrorWithName = ServerError & { operationName: string }; + +export type RelayToFlat }> = Array< + T["edges"][0]["node"] +>; diff --git a/src/types/extendedTypes.ts b/src/types/extendedTypes.ts deleted file mode 100644 index 6fa1130f9..000000000 --- a/src/types/extendedTypes.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { PermissionEnum } from "./globalTypes"; - -export type PrefixedPermissions = `PERMISSION_${PermissionEnum}`; \ No newline at end of file diff --git a/src/types/globalTypes.ts b/src/types/globalTypes.ts deleted file mode 100644 index a87c14188..000000000 --- a/src/types/globalTypes.ts +++ /dev/null @@ -1,3092 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -//============================================================== -// START Enums and Input Objects -//============================================================== - -export enum AccountErrorCode { - ACCOUNT_NOT_CONFIRMED = "ACCOUNT_NOT_CONFIRMED", - ACTIVATE_OWN_ACCOUNT = "ACTIVATE_OWN_ACCOUNT", - ACTIVATE_SUPERUSER_ACCOUNT = "ACTIVATE_SUPERUSER_ACCOUNT", - CHANNEL_INACTIVE = "CHANNEL_INACTIVE", - DEACTIVATE_OWN_ACCOUNT = "DEACTIVATE_OWN_ACCOUNT", - DEACTIVATE_SUPERUSER_ACCOUNT = "DEACTIVATE_SUPERUSER_ACCOUNT", - DELETE_NON_STAFF_USER = "DELETE_NON_STAFF_USER", - DELETE_OWN_ACCOUNT = "DELETE_OWN_ACCOUNT", - DELETE_STAFF_ACCOUNT = "DELETE_STAFF_ACCOUNT", - DELETE_SUPERUSER_ACCOUNT = "DELETE_SUPERUSER_ACCOUNT", - DUPLICATED_INPUT_ITEM = "DUPLICATED_INPUT_ITEM", - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INACTIVE = "INACTIVE", - INVALID = "INVALID", - INVALID_CREDENTIALS = "INVALID_CREDENTIALS", - INVALID_PASSWORD = "INVALID_PASSWORD", - JWT_DECODE_ERROR = "JWT_DECODE_ERROR", - JWT_INVALID_CSRF_TOKEN = "JWT_INVALID_CSRF_TOKEN", - JWT_INVALID_TOKEN = "JWT_INVALID_TOKEN", - JWT_MISSING_TOKEN = "JWT_MISSING_TOKEN", - JWT_SIGNATURE_EXPIRED = "JWT_SIGNATURE_EXPIRED", - LEFT_NOT_MANAGEABLE_PERMISSION = "LEFT_NOT_MANAGEABLE_PERMISSION", - MISSING_CHANNEL_SLUG = "MISSING_CHANNEL_SLUG", - NOT_FOUND = "NOT_FOUND", - OUT_OF_SCOPE_GROUP = "OUT_OF_SCOPE_GROUP", - OUT_OF_SCOPE_PERMISSION = "OUT_OF_SCOPE_PERMISSION", - OUT_OF_SCOPE_USER = "OUT_OF_SCOPE_USER", - PASSWORD_ENTIRELY_NUMERIC = "PASSWORD_ENTIRELY_NUMERIC", - PASSWORD_TOO_COMMON = "PASSWORD_TOO_COMMON", - PASSWORD_TOO_SHORT = "PASSWORD_TOO_SHORT", - PASSWORD_TOO_SIMILAR = "PASSWORD_TOO_SIMILAR", - REQUIRED = "REQUIRED", - UNIQUE = "UNIQUE", -} - -export enum AddressTypeEnum { - BILLING = "BILLING", - SHIPPING = "SHIPPING", -} - -export enum AppErrorCode { - FORBIDDEN = "FORBIDDEN", - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INVALID = "INVALID", - INVALID_MANIFEST_FORMAT = "INVALID_MANIFEST_FORMAT", - INVALID_PERMISSION = "INVALID_PERMISSION", - INVALID_STATUS = "INVALID_STATUS", - INVALID_URL_FORMAT = "INVALID_URL_FORMAT", - MANIFEST_URL_CANT_CONNECT = "MANIFEST_URL_CANT_CONNECT", - NOT_FOUND = "NOT_FOUND", - OUT_OF_SCOPE_APP = "OUT_OF_SCOPE_APP", - OUT_OF_SCOPE_PERMISSION = "OUT_OF_SCOPE_PERMISSION", - REQUIRED = "REQUIRED", - UNIQUE = "UNIQUE", -} - -export enum AppExtensionMountEnum { - NAVIGATION_CATALOG = "NAVIGATION_CATALOG", - NAVIGATION_CUSTOMERS = "NAVIGATION_CUSTOMERS", - NAVIGATION_DISCOUNTS = "NAVIGATION_DISCOUNTS", - NAVIGATION_ORDERS = "NAVIGATION_ORDERS", - NAVIGATION_PAGES = "NAVIGATION_PAGES", - NAVIGATION_TRANSLATIONS = "NAVIGATION_TRANSLATIONS", - PRODUCT_DETAILS_MORE_ACTIONS = "PRODUCT_DETAILS_MORE_ACTIONS", - PRODUCT_OVERVIEW_CREATE = "PRODUCT_OVERVIEW_CREATE", - PRODUCT_OVERVIEW_MORE_ACTIONS = "PRODUCT_OVERVIEW_MORE_ACTIONS", -} - -export enum AppExtensionTargetEnum { - APP_PAGE = "APP_PAGE", - POPUP = "POPUP", -} - -export enum AppSortField { - CREATION_DATE = "CREATION_DATE", - NAME = "NAME", -} - -export enum AppTypeEnum { - LOCAL = "LOCAL", - THIRDPARTY = "THIRDPARTY", -} - -export enum AttributeEntityTypeEnum { - PAGE = "PAGE", - PRODUCT = "PRODUCT", -} - -export enum AttributeErrorCode { - ALREADY_EXISTS = "ALREADY_EXISTS", - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INVALID = "INVALID", - NOT_FOUND = "NOT_FOUND", - REQUIRED = "REQUIRED", - UNIQUE = "UNIQUE", -} - -export enum AttributeInputTypeEnum { - BOOLEAN = "BOOLEAN", - DATE = "DATE", - DATE_TIME = "DATE_TIME", - DROPDOWN = "DROPDOWN", - FILE = "FILE", - MULTISELECT = "MULTISELECT", - NUMERIC = "NUMERIC", - REFERENCE = "REFERENCE", - RICH_TEXT = "RICH_TEXT", - SWATCH = "SWATCH", -} - -export enum AttributeSortField { - AVAILABLE_IN_GRID = "AVAILABLE_IN_GRID", - FILTERABLE_IN_DASHBOARD = "FILTERABLE_IN_DASHBOARD", - FILTERABLE_IN_STOREFRONT = "FILTERABLE_IN_STOREFRONT", - IS_VARIANT_ONLY = "IS_VARIANT_ONLY", - NAME = "NAME", - SLUG = "SLUG", - STOREFRONT_SEARCH_POSITION = "STOREFRONT_SEARCH_POSITION", - VALUE_REQUIRED = "VALUE_REQUIRED", - VISIBLE_IN_STOREFRONT = "VISIBLE_IN_STOREFRONT", -} - -export enum AttributeTypeEnum { - PAGE_TYPE = "PAGE_TYPE", - PRODUCT_TYPE = "PRODUCT_TYPE", -} - -export enum CategorySortField { - NAME = "NAME", - PRODUCT_COUNT = "PRODUCT_COUNT", - SUBCATEGORY_COUNT = "SUBCATEGORY_COUNT", -} - -export enum ChannelErrorCode { - ALREADY_EXISTS = "ALREADY_EXISTS", - CHANNELS_CURRENCY_MUST_BE_THE_SAME = "CHANNELS_CURRENCY_MUST_BE_THE_SAME", - CHANNEL_WITH_ORDERS = "CHANNEL_WITH_ORDERS", - DUPLICATED_INPUT_ITEM = "DUPLICATED_INPUT_ITEM", - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INVALID = "INVALID", - NOT_FOUND = "NOT_FOUND", - REQUIRED = "REQUIRED", - UNIQUE = "UNIQUE", -} - -export enum CollectionErrorCode { - CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT = "CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT", - DUPLICATED_INPUT_ITEM = "DUPLICATED_INPUT_ITEM", - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INVALID = "INVALID", - NOT_FOUND = "NOT_FOUND", - REQUIRED = "REQUIRED", - UNIQUE = "UNIQUE", -} - -export enum CollectionPublished { - HIDDEN = "HIDDEN", - PUBLISHED = "PUBLISHED", -} - -export enum CollectionSortField { - AVAILABILITY = "AVAILABILITY", - NAME = "NAME", - PRODUCT_COUNT = "PRODUCT_COUNT", - PUBLICATION_DATE = "PUBLICATION_DATE", -} - -export enum ConfigurationTypeFieldEnum { - BOOLEAN = "BOOLEAN", - MULTILINE = "MULTILINE", - OUTPUT = "OUTPUT", - PASSWORD = "PASSWORD", - SECRET = "SECRET", - SECRETMULTILINE = "SECRETMULTILINE", - STRING = "STRING", -} - -export enum CountryCode { - AD = "AD", - AE = "AE", - AF = "AF", - AG = "AG", - AI = "AI", - AL = "AL", - AM = "AM", - AO = "AO", - AQ = "AQ", - AR = "AR", - AS = "AS", - AT = "AT", - AU = "AU", - AW = "AW", - AX = "AX", - AZ = "AZ", - BA = "BA", - BB = "BB", - BD = "BD", - BE = "BE", - BF = "BF", - BG = "BG", - BH = "BH", - BI = "BI", - BJ = "BJ", - BL = "BL", - BM = "BM", - BN = "BN", - BO = "BO", - BQ = "BQ", - BR = "BR", - BS = "BS", - BT = "BT", - BV = "BV", - BW = "BW", - BY = "BY", - BZ = "BZ", - CA = "CA", - CC = "CC", - CD = "CD", - CF = "CF", - CG = "CG", - CH = "CH", - CI = "CI", - CK = "CK", - CL = "CL", - CM = "CM", - CN = "CN", - CO = "CO", - CR = "CR", - CU = "CU", - CV = "CV", - CW = "CW", - CX = "CX", - CY = "CY", - CZ = "CZ", - DE = "DE", - DJ = "DJ", - DK = "DK", - DM = "DM", - DO = "DO", - DZ = "DZ", - EC = "EC", - EE = "EE", - EG = "EG", - EH = "EH", - ER = "ER", - ES = "ES", - ET = "ET", - EU = "EU", - FI = "FI", - FJ = "FJ", - FK = "FK", - FM = "FM", - FO = "FO", - FR = "FR", - GA = "GA", - GB = "GB", - GD = "GD", - GE = "GE", - GF = "GF", - GG = "GG", - GH = "GH", - GI = "GI", - GL = "GL", - GM = "GM", - GN = "GN", - GP = "GP", - GQ = "GQ", - GR = "GR", - GS = "GS", - GT = "GT", - GU = "GU", - GW = "GW", - GY = "GY", - HK = "HK", - HM = "HM", - HN = "HN", - HR = "HR", - HT = "HT", - HU = "HU", - ID = "ID", - IE = "IE", - IL = "IL", - IM = "IM", - IN = "IN", - IO = "IO", - IQ = "IQ", - IR = "IR", - IS = "IS", - IT = "IT", - JE = "JE", - JM = "JM", - JO = "JO", - JP = "JP", - KE = "KE", - KG = "KG", - KH = "KH", - KI = "KI", - KM = "KM", - KN = "KN", - KP = "KP", - KR = "KR", - KW = "KW", - KY = "KY", - KZ = "KZ", - LA = "LA", - LB = "LB", - LC = "LC", - LI = "LI", - LK = "LK", - LR = "LR", - LS = "LS", - LT = "LT", - LU = "LU", - LV = "LV", - LY = "LY", - MA = "MA", - MC = "MC", - MD = "MD", - ME = "ME", - MF = "MF", - MG = "MG", - MH = "MH", - MK = "MK", - ML = "ML", - MM = "MM", - MN = "MN", - MO = "MO", - MP = "MP", - MQ = "MQ", - MR = "MR", - MS = "MS", - MT = "MT", - MU = "MU", - MV = "MV", - MW = "MW", - MX = "MX", - MY = "MY", - MZ = "MZ", - NA = "NA", - NC = "NC", - NE = "NE", - NF = "NF", - NG = "NG", - NI = "NI", - NL = "NL", - NO = "NO", - NP = "NP", - NR = "NR", - NU = "NU", - NZ = "NZ", - OM = "OM", - PA = "PA", - PE = "PE", - PF = "PF", - PG = "PG", - PH = "PH", - PK = "PK", - PL = "PL", - PM = "PM", - PN = "PN", - PR = "PR", - PS = "PS", - PT = "PT", - PW = "PW", - PY = "PY", - QA = "QA", - RE = "RE", - RO = "RO", - RS = "RS", - RU = "RU", - RW = "RW", - SA = "SA", - SB = "SB", - SC = "SC", - SD = "SD", - SE = "SE", - SG = "SG", - SH = "SH", - SI = "SI", - SJ = "SJ", - SK = "SK", - SL = "SL", - SM = "SM", - SN = "SN", - SO = "SO", - SR = "SR", - SS = "SS", - ST = "ST", - SV = "SV", - SX = "SX", - SY = "SY", - SZ = "SZ", - TC = "TC", - TD = "TD", - TF = "TF", - TG = "TG", - TH = "TH", - TJ = "TJ", - TK = "TK", - TL = "TL", - TM = "TM", - TN = "TN", - TO = "TO", - TR = "TR", - TT = "TT", - TV = "TV", - TW = "TW", - TZ = "TZ", - UA = "UA", - UG = "UG", - UM = "UM", - US = "US", - UY = "UY", - UZ = "UZ", - VA = "VA", - VC = "VC", - VE = "VE", - VG = "VG", - VI = "VI", - VN = "VN", - VU = "VU", - WF = "WF", - WS = "WS", - YE = "YE", - YT = "YT", - ZA = "ZA", - ZM = "ZM", - ZW = "ZW", -} - -export enum DiscountErrorCode { - ALREADY_EXISTS = "ALREADY_EXISTS", - CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT = "CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT", - DUPLICATED_INPUT_ITEM = "DUPLICATED_INPUT_ITEM", - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INVALID = "INVALID", - NOT_FOUND = "NOT_FOUND", - REQUIRED = "REQUIRED", - UNIQUE = "UNIQUE", -} - -export enum DiscountStatusEnum { - ACTIVE = "ACTIVE", - EXPIRED = "EXPIRED", - SCHEDULED = "SCHEDULED", -} - -export enum DiscountValueTypeEnum { - FIXED = "FIXED", - PERCENTAGE = "PERCENTAGE", -} - -export enum ExportErrorCode { - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INVALID = "INVALID", - NOT_FOUND = "NOT_FOUND", - REQUIRED = "REQUIRED", -} - -export enum ExportScope { - ALL = "ALL", - FILTER = "FILTER", - IDS = "IDS", -} - -export enum FileTypesEnum { - CSV = "CSV", - XLSX = "XLSX", -} - -export enum FulfillmentStatus { - CANCELED = "CANCELED", - FULFILLED = "FULFILLED", - REFUNDED = "REFUNDED", - REFUNDED_AND_RETURNED = "REFUNDED_AND_RETURNED", - REPLACED = "REPLACED", - RETURNED = "RETURNED", - WAITING_FOR_APPROVAL = "WAITING_FOR_APPROVAL", -} - -export enum GiftCardErrorCode { - ALREADY_EXISTS = "ALREADY_EXISTS", - DUPLICATED_INPUT_ITEM = "DUPLICATED_INPUT_ITEM", - EXPIRED_GIFT_CARD = "EXPIRED_GIFT_CARD", - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INVALID = "INVALID", - NOT_FOUND = "NOT_FOUND", - REQUIRED = "REQUIRED", - UNIQUE = "UNIQUE", -} - -export enum GiftCardEventsEnum { - ACTIVATED = "ACTIVATED", - BALANCE_RESET = "BALANCE_RESET", - BOUGHT = "BOUGHT", - DEACTIVATED = "DEACTIVATED", - EXPIRY_DATE_UPDATED = "EXPIRY_DATE_UPDATED", - ISSUED = "ISSUED", - NOTE_ADDED = "NOTE_ADDED", - RESENT = "RESENT", - SENT_TO_CUSTOMER = "SENT_TO_CUSTOMER", - TAGS_UPDATED = "TAGS_UPDATED", - UPDATED = "UPDATED", - USED_IN_ORDER = "USED_IN_ORDER", -} - -export enum GiftCardSettingsErrorCode { - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INVALID = "INVALID", - REQUIRED = "REQUIRED", -} - -export enum GiftCardSettingsExpiryTypeEnum { - EXPIRY_PERIOD = "EXPIRY_PERIOD", - NEVER_EXPIRE = "NEVER_EXPIRE", -} - -export enum GiftCardSortField { - CURRENT_BALANCE = "CURRENT_BALANCE", - PRODUCT = "PRODUCT", - USED_BY = "USED_BY", -} - -export enum InvoiceErrorCode { - EMAIL_NOT_SET = "EMAIL_NOT_SET", - INVALID_STATUS = "INVALID_STATUS", - NOT_FOUND = "NOT_FOUND", - NOT_READY = "NOT_READY", - NO_INVOICE_PLUGIN = "NO_INVOICE_PLUGIN", - NUMBER_NOT_SET = "NUMBER_NOT_SET", - REQUIRED = "REQUIRED", - URL_NOT_SET = "URL_NOT_SET", -} - -export enum JobStatusEnum { - DELETED = "DELETED", - FAILED = "FAILED", - PENDING = "PENDING", - SUCCESS = "SUCCESS", -} - -export enum LanguageCodeEnum { - AF = "AF", - AF_NA = "AF_NA", - AF_ZA = "AF_ZA", - AGQ = "AGQ", - AGQ_CM = "AGQ_CM", - AK = "AK", - AK_GH = "AK_GH", - AM = "AM", - AM_ET = "AM_ET", - AR = "AR", - AR_AE = "AR_AE", - AR_BH = "AR_BH", - AR_DJ = "AR_DJ", - AR_DZ = "AR_DZ", - AR_EG = "AR_EG", - AR_EH = "AR_EH", - AR_ER = "AR_ER", - AR_IL = "AR_IL", - AR_IQ = "AR_IQ", - AR_JO = "AR_JO", - AR_KM = "AR_KM", - AR_KW = "AR_KW", - AR_LB = "AR_LB", - AR_LY = "AR_LY", - AR_MA = "AR_MA", - AR_MR = "AR_MR", - AR_OM = "AR_OM", - AR_PS = "AR_PS", - AR_QA = "AR_QA", - AR_SA = "AR_SA", - AR_SD = "AR_SD", - AR_SO = "AR_SO", - AR_SS = "AR_SS", - AR_SY = "AR_SY", - AR_TD = "AR_TD", - AR_TN = "AR_TN", - AR_YE = "AR_YE", - AS = "AS", - ASA = "ASA", - ASA_TZ = "ASA_TZ", - AST = "AST", - AST_ES = "AST_ES", - AS_IN = "AS_IN", - AZ = "AZ", - AZ_CYRL = "AZ_CYRL", - AZ_CYRL_AZ = "AZ_CYRL_AZ", - AZ_LATN = "AZ_LATN", - AZ_LATN_AZ = "AZ_LATN_AZ", - BAS = "BAS", - BAS_CM = "BAS_CM", - BE = "BE", - BEM = "BEM", - BEM_ZM = "BEM_ZM", - BEZ = "BEZ", - BEZ_TZ = "BEZ_TZ", - BE_BY = "BE_BY", - BG = "BG", - BG_BG = "BG_BG", - BM = "BM", - BM_ML = "BM_ML", - BN = "BN", - BN_BD = "BN_BD", - BN_IN = "BN_IN", - BO = "BO", - BO_CN = "BO_CN", - BO_IN = "BO_IN", - BR = "BR", - BRX = "BRX", - BRX_IN = "BRX_IN", - BR_FR = "BR_FR", - BS = "BS", - BS_CYRL = "BS_CYRL", - BS_CYRL_BA = "BS_CYRL_BA", - BS_LATN = "BS_LATN", - BS_LATN_BA = "BS_LATN_BA", - CA = "CA", - CA_AD = "CA_AD", - CA_ES = "CA_ES", - CA_ES_VALENCIA = "CA_ES_VALENCIA", - CA_FR = "CA_FR", - CA_IT = "CA_IT", - CCP = "CCP", - CCP_BD = "CCP_BD", - CCP_IN = "CCP_IN", - CE = "CE", - CEB = "CEB", - CEB_PH = "CEB_PH", - CE_RU = "CE_RU", - CGG = "CGG", - CGG_UG = "CGG_UG", - CHR = "CHR", - CHR_US = "CHR_US", - CKB = "CKB", - CKB_IQ = "CKB_IQ", - CKB_IR = "CKB_IR", - CS = "CS", - CS_CZ = "CS_CZ", - CU = "CU", - CU_RU = "CU_RU", - CY = "CY", - CY_GB = "CY_GB", - DA = "DA", - DAV = "DAV", - DAV_KE = "DAV_KE", - DA_DK = "DA_DK", - DA_GL = "DA_GL", - DE = "DE", - DE_AT = "DE_AT", - DE_BE = "DE_BE", - DE_CH = "DE_CH", - DE_DE = "DE_DE", - DE_IT = "DE_IT", - DE_LI = "DE_LI", - DE_LU = "DE_LU", - DJE = "DJE", - DJE_NE = "DJE_NE", - DSB = "DSB", - DSB_DE = "DSB_DE", - DUA = "DUA", - DUA_CM = "DUA_CM", - DYO = "DYO", - DYO_SN = "DYO_SN", - DZ = "DZ", - DZ_BT = "DZ_BT", - EBU = "EBU", - EBU_KE = "EBU_KE", - EE = "EE", - EE_GH = "EE_GH", - EE_TG = "EE_TG", - EL = "EL", - EL_CY = "EL_CY", - EL_GR = "EL_GR", - EN = "EN", - EN_AE = "EN_AE", - EN_AG = "EN_AG", - EN_AI = "EN_AI", - EN_AS = "EN_AS", - EN_AT = "EN_AT", - EN_AU = "EN_AU", - EN_BB = "EN_BB", - EN_BE = "EN_BE", - EN_BI = "EN_BI", - EN_BM = "EN_BM", - EN_BS = "EN_BS", - EN_BW = "EN_BW", - EN_BZ = "EN_BZ", - EN_CA = "EN_CA", - EN_CC = "EN_CC", - EN_CH = "EN_CH", - EN_CK = "EN_CK", - EN_CM = "EN_CM", - EN_CX = "EN_CX", - EN_CY = "EN_CY", - EN_DE = "EN_DE", - EN_DG = "EN_DG", - EN_DK = "EN_DK", - EN_DM = "EN_DM", - EN_ER = "EN_ER", - EN_FI = "EN_FI", - EN_FJ = "EN_FJ", - EN_FK = "EN_FK", - EN_FM = "EN_FM", - EN_GB = "EN_GB", - EN_GD = "EN_GD", - EN_GG = "EN_GG", - EN_GH = "EN_GH", - EN_GI = "EN_GI", - EN_GM = "EN_GM", - EN_GU = "EN_GU", - EN_GY = "EN_GY", - EN_HK = "EN_HK", - EN_IE = "EN_IE", - EN_IL = "EN_IL", - EN_IM = "EN_IM", - EN_IN = "EN_IN", - EN_IO = "EN_IO", - EN_JE = "EN_JE", - EN_JM = "EN_JM", - EN_KE = "EN_KE", - EN_KI = "EN_KI", - EN_KN = "EN_KN", - EN_KY = "EN_KY", - EN_LC = "EN_LC", - EN_LR = "EN_LR", - EN_LS = "EN_LS", - EN_MG = "EN_MG", - EN_MH = "EN_MH", - EN_MO = "EN_MO", - EN_MP = "EN_MP", - EN_MS = "EN_MS", - EN_MT = "EN_MT", - EN_MU = "EN_MU", - EN_MW = "EN_MW", - EN_MY = "EN_MY", - EN_NA = "EN_NA", - EN_NF = "EN_NF", - EN_NG = "EN_NG", - EN_NL = "EN_NL", - EN_NR = "EN_NR", - EN_NU = "EN_NU", - EN_NZ = "EN_NZ", - EN_PG = "EN_PG", - EN_PH = "EN_PH", - EN_PK = "EN_PK", - EN_PN = "EN_PN", - EN_PR = "EN_PR", - EN_PW = "EN_PW", - EN_RW = "EN_RW", - EN_SB = "EN_SB", - EN_SC = "EN_SC", - EN_SD = "EN_SD", - EN_SE = "EN_SE", - EN_SG = "EN_SG", - EN_SH = "EN_SH", - EN_SI = "EN_SI", - EN_SL = "EN_SL", - EN_SS = "EN_SS", - EN_SX = "EN_SX", - EN_SZ = "EN_SZ", - EN_TC = "EN_TC", - EN_TK = "EN_TK", - EN_TO = "EN_TO", - EN_TT = "EN_TT", - EN_TV = "EN_TV", - EN_TZ = "EN_TZ", - EN_UG = "EN_UG", - EN_UM = "EN_UM", - EN_US = "EN_US", - EN_VC = "EN_VC", - EN_VG = "EN_VG", - EN_VI = "EN_VI", - EN_VU = "EN_VU", - EN_WS = "EN_WS", - EN_ZA = "EN_ZA", - EN_ZM = "EN_ZM", - EN_ZW = "EN_ZW", - EO = "EO", - ES = "ES", - ES_AR = "ES_AR", - ES_BO = "ES_BO", - ES_BR = "ES_BR", - ES_BZ = "ES_BZ", - ES_CL = "ES_CL", - ES_CO = "ES_CO", - ES_CR = "ES_CR", - ES_CU = "ES_CU", - ES_DO = "ES_DO", - ES_EA = "ES_EA", - ES_EC = "ES_EC", - ES_ES = "ES_ES", - ES_GQ = "ES_GQ", - ES_GT = "ES_GT", - ES_HN = "ES_HN", - ES_IC = "ES_IC", - ES_MX = "ES_MX", - ES_NI = "ES_NI", - ES_PA = "ES_PA", - ES_PE = "ES_PE", - ES_PH = "ES_PH", - ES_PR = "ES_PR", - ES_PY = "ES_PY", - ES_SV = "ES_SV", - ES_US = "ES_US", - ES_UY = "ES_UY", - ES_VE = "ES_VE", - ET = "ET", - ET_EE = "ET_EE", - EU = "EU", - EU_ES = "EU_ES", - EWO = "EWO", - EWO_CM = "EWO_CM", - FA = "FA", - FA_AF = "FA_AF", - FA_IR = "FA_IR", - FF = "FF", - FF_ADLM = "FF_ADLM", - FF_ADLM_BF = "FF_ADLM_BF", - FF_ADLM_CM = "FF_ADLM_CM", - FF_ADLM_GH = "FF_ADLM_GH", - FF_ADLM_GM = "FF_ADLM_GM", - FF_ADLM_GN = "FF_ADLM_GN", - FF_ADLM_GW = "FF_ADLM_GW", - FF_ADLM_LR = "FF_ADLM_LR", - FF_ADLM_MR = "FF_ADLM_MR", - FF_ADLM_NE = "FF_ADLM_NE", - FF_ADLM_NG = "FF_ADLM_NG", - FF_ADLM_SL = "FF_ADLM_SL", - FF_ADLM_SN = "FF_ADLM_SN", - FF_LATN = "FF_LATN", - FF_LATN_BF = "FF_LATN_BF", - FF_LATN_CM = "FF_LATN_CM", - FF_LATN_GH = "FF_LATN_GH", - FF_LATN_GM = "FF_LATN_GM", - FF_LATN_GN = "FF_LATN_GN", - FF_LATN_GW = "FF_LATN_GW", - FF_LATN_LR = "FF_LATN_LR", - FF_LATN_MR = "FF_LATN_MR", - FF_LATN_NE = "FF_LATN_NE", - FF_LATN_NG = "FF_LATN_NG", - FF_LATN_SL = "FF_LATN_SL", - FF_LATN_SN = "FF_LATN_SN", - FI = "FI", - FIL = "FIL", - FIL_PH = "FIL_PH", - FI_FI = "FI_FI", - FO = "FO", - FO_DK = "FO_DK", - FO_FO = "FO_FO", - FR = "FR", - FR_BE = "FR_BE", - FR_BF = "FR_BF", - FR_BI = "FR_BI", - FR_BJ = "FR_BJ", - FR_BL = "FR_BL", - FR_CA = "FR_CA", - FR_CD = "FR_CD", - FR_CF = "FR_CF", - FR_CG = "FR_CG", - FR_CH = "FR_CH", - FR_CI = "FR_CI", - FR_CM = "FR_CM", - FR_DJ = "FR_DJ", - FR_DZ = "FR_DZ", - FR_FR = "FR_FR", - FR_GA = "FR_GA", - FR_GF = "FR_GF", - FR_GN = "FR_GN", - FR_GP = "FR_GP", - FR_GQ = "FR_GQ", - FR_HT = "FR_HT", - FR_KM = "FR_KM", - FR_LU = "FR_LU", - FR_MA = "FR_MA", - FR_MC = "FR_MC", - FR_MF = "FR_MF", - FR_MG = "FR_MG", - FR_ML = "FR_ML", - FR_MQ = "FR_MQ", - FR_MR = "FR_MR", - FR_MU = "FR_MU", - FR_NC = "FR_NC", - FR_NE = "FR_NE", - FR_PF = "FR_PF", - FR_PM = "FR_PM", - FR_RE = "FR_RE", - FR_RW = "FR_RW", - FR_SC = "FR_SC", - FR_SN = "FR_SN", - FR_SY = "FR_SY", - FR_TD = "FR_TD", - FR_TG = "FR_TG", - FR_TN = "FR_TN", - FR_VU = "FR_VU", - FR_WF = "FR_WF", - FR_YT = "FR_YT", - FUR = "FUR", - FUR_IT = "FUR_IT", - FY = "FY", - FY_NL = "FY_NL", - GA = "GA", - GA_GB = "GA_GB", - GA_IE = "GA_IE", - GD = "GD", - GD_GB = "GD_GB", - GL = "GL", - GL_ES = "GL_ES", - GSW = "GSW", - GSW_CH = "GSW_CH", - GSW_FR = "GSW_FR", - GSW_LI = "GSW_LI", - GU = "GU", - GUZ = "GUZ", - GUZ_KE = "GUZ_KE", - GU_IN = "GU_IN", - GV = "GV", - GV_IM = "GV_IM", - HA = "HA", - HAW = "HAW", - HAW_US = "HAW_US", - HA_GH = "HA_GH", - HA_NE = "HA_NE", - HA_NG = "HA_NG", - HE = "HE", - HE_IL = "HE_IL", - HI = "HI", - HI_IN = "HI_IN", - HR = "HR", - HR_BA = "HR_BA", - HR_HR = "HR_HR", - HSB = "HSB", - HSB_DE = "HSB_DE", - HU = "HU", - HU_HU = "HU_HU", - HY = "HY", - HY_AM = "HY_AM", - IA = "IA", - ID = "ID", - ID_ID = "ID_ID", - IG = "IG", - IG_NG = "IG_NG", - II = "II", - II_CN = "II_CN", - IS = "IS", - IS_IS = "IS_IS", - IT = "IT", - IT_CH = "IT_CH", - IT_IT = "IT_IT", - IT_SM = "IT_SM", - IT_VA = "IT_VA", - JA = "JA", - JA_JP = "JA_JP", - JGO = "JGO", - JGO_CM = "JGO_CM", - JMC = "JMC", - JMC_TZ = "JMC_TZ", - JV = "JV", - JV_ID = "JV_ID", - KA = "KA", - KAB = "KAB", - KAB_DZ = "KAB_DZ", - KAM = "KAM", - KAM_KE = "KAM_KE", - KA_GE = "KA_GE", - KDE = "KDE", - KDE_TZ = "KDE_TZ", - KEA = "KEA", - KEA_CV = "KEA_CV", - KHQ = "KHQ", - KHQ_ML = "KHQ_ML", - KI = "KI", - KI_KE = "KI_KE", - KK = "KK", - KKJ = "KKJ", - KKJ_CM = "KKJ_CM", - KK_KZ = "KK_KZ", - KL = "KL", - KLN = "KLN", - KLN_KE = "KLN_KE", - KL_GL = "KL_GL", - KM = "KM", - KM_KH = "KM_KH", - KN = "KN", - KN_IN = "KN_IN", - KO = "KO", - KOK = "KOK", - KOK_IN = "KOK_IN", - KO_KP = "KO_KP", - KO_KR = "KO_KR", - KS = "KS", - KSB = "KSB", - KSB_TZ = "KSB_TZ", - KSF = "KSF", - KSF_CM = "KSF_CM", - KSH = "KSH", - KSH_DE = "KSH_DE", - KS_ARAB = "KS_ARAB", - KS_ARAB_IN = "KS_ARAB_IN", - KU = "KU", - KU_TR = "KU_TR", - KW = "KW", - KW_GB = "KW_GB", - KY = "KY", - KY_KG = "KY_KG", - LAG = "LAG", - LAG_TZ = "LAG_TZ", - LB = "LB", - LB_LU = "LB_LU", - LG = "LG", - LG_UG = "LG_UG", - LKT = "LKT", - LKT_US = "LKT_US", - LN = "LN", - LN_AO = "LN_AO", - LN_CD = "LN_CD", - LN_CF = "LN_CF", - LN_CG = "LN_CG", - LO = "LO", - LO_LA = "LO_LA", - LRC = "LRC", - LRC_IQ = "LRC_IQ", - LRC_IR = "LRC_IR", - LT = "LT", - LT_LT = "LT_LT", - LU = "LU", - LUO = "LUO", - LUO_KE = "LUO_KE", - LUY = "LUY", - LUY_KE = "LUY_KE", - LU_CD = "LU_CD", - LV = "LV", - LV_LV = "LV_LV", - MAI = "MAI", - MAI_IN = "MAI_IN", - MAS = "MAS", - MAS_KE = "MAS_KE", - MAS_TZ = "MAS_TZ", - MER = "MER", - MER_KE = "MER_KE", - MFE = "MFE", - MFE_MU = "MFE_MU", - MG = "MG", - MGH = "MGH", - MGH_MZ = "MGH_MZ", - MGO = "MGO", - MGO_CM = "MGO_CM", - MG_MG = "MG_MG", - MI = "MI", - MI_NZ = "MI_NZ", - MK = "MK", - MK_MK = "MK_MK", - ML = "ML", - ML_IN = "ML_IN", - MN = "MN", - MNI = "MNI", - MNI_BENG = "MNI_BENG", - MNI_BENG_IN = "MNI_BENG_IN", - MN_MN = "MN_MN", - MR = "MR", - MR_IN = "MR_IN", - MS = "MS", - MS_BN = "MS_BN", - MS_ID = "MS_ID", - MS_MY = "MS_MY", - MS_SG = "MS_SG", - MT = "MT", - MT_MT = "MT_MT", - MUA = "MUA", - MUA_CM = "MUA_CM", - MY = "MY", - MY_MM = "MY_MM", - MZN = "MZN", - MZN_IR = "MZN_IR", - NAQ = "NAQ", - NAQ_NA = "NAQ_NA", - NB = "NB", - NB_NO = "NB_NO", - NB_SJ = "NB_SJ", - ND = "ND", - NDS = "NDS", - NDS_DE = "NDS_DE", - NDS_NL = "NDS_NL", - ND_ZW = "ND_ZW", - NE = "NE", - NE_IN = "NE_IN", - NE_NP = "NE_NP", - NL = "NL", - NL_AW = "NL_AW", - NL_BE = "NL_BE", - NL_BQ = "NL_BQ", - NL_CW = "NL_CW", - NL_NL = "NL_NL", - NL_SR = "NL_SR", - NL_SX = "NL_SX", - NMG = "NMG", - NMG_CM = "NMG_CM", - NN = "NN", - NNH = "NNH", - NNH_CM = "NNH_CM", - NN_NO = "NN_NO", - NUS = "NUS", - NUS_SS = "NUS_SS", - NYN = "NYN", - NYN_UG = "NYN_UG", - OM = "OM", - OM_ET = "OM_ET", - OM_KE = "OM_KE", - OR = "OR", - OR_IN = "OR_IN", - OS = "OS", - OS_GE = "OS_GE", - OS_RU = "OS_RU", - PA = "PA", - PA_ARAB = "PA_ARAB", - PA_ARAB_PK = "PA_ARAB_PK", - PA_GURU = "PA_GURU", - PA_GURU_IN = "PA_GURU_IN", - PCM = "PCM", - PCM_NG = "PCM_NG", - PL = "PL", - PL_PL = "PL_PL", - PRG = "PRG", - PS = "PS", - PS_AF = "PS_AF", - PS_PK = "PS_PK", - PT = "PT", - PT_AO = "PT_AO", - PT_BR = "PT_BR", - PT_CH = "PT_CH", - PT_CV = "PT_CV", - PT_GQ = "PT_GQ", - PT_GW = "PT_GW", - PT_LU = "PT_LU", - PT_MO = "PT_MO", - PT_MZ = "PT_MZ", - PT_PT = "PT_PT", - PT_ST = "PT_ST", - PT_TL = "PT_TL", - QU = "QU", - QU_BO = "QU_BO", - QU_EC = "QU_EC", - QU_PE = "QU_PE", - RM = "RM", - RM_CH = "RM_CH", - RN = "RN", - RN_BI = "RN_BI", - RO = "RO", - ROF = "ROF", - ROF_TZ = "ROF_TZ", - RO_MD = "RO_MD", - RO_RO = "RO_RO", - RU = "RU", - RU_BY = "RU_BY", - RU_KG = "RU_KG", - RU_KZ = "RU_KZ", - RU_MD = "RU_MD", - RU_RU = "RU_RU", - RU_UA = "RU_UA", - RW = "RW", - RWK = "RWK", - RWK_TZ = "RWK_TZ", - RW_RW = "RW_RW", - SAH = "SAH", - SAH_RU = "SAH_RU", - SAQ = "SAQ", - SAQ_KE = "SAQ_KE", - SAT = "SAT", - SAT_OLCK = "SAT_OLCK", - SAT_OLCK_IN = "SAT_OLCK_IN", - SBP = "SBP", - SBP_TZ = "SBP_TZ", - SD = "SD", - SD_ARAB = "SD_ARAB", - SD_ARAB_PK = "SD_ARAB_PK", - SD_DEVA = "SD_DEVA", - SD_DEVA_IN = "SD_DEVA_IN", - SE = "SE", - SEH = "SEH", - SEH_MZ = "SEH_MZ", - SES = "SES", - SES_ML = "SES_ML", - SE_FI = "SE_FI", - SE_NO = "SE_NO", - SE_SE = "SE_SE", - SG = "SG", - SG_CF = "SG_CF", - SHI = "SHI", - SHI_LATN = "SHI_LATN", - SHI_LATN_MA = "SHI_LATN_MA", - SHI_TFNG = "SHI_TFNG", - SHI_TFNG_MA = "SHI_TFNG_MA", - SI = "SI", - SI_LK = "SI_LK", - SK = "SK", - SK_SK = "SK_SK", - SL = "SL", - SL_SI = "SL_SI", - SMN = "SMN", - SMN_FI = "SMN_FI", - SN = "SN", - SN_ZW = "SN_ZW", - SO = "SO", - SO_DJ = "SO_DJ", - SO_ET = "SO_ET", - SO_KE = "SO_KE", - SO_SO = "SO_SO", - SQ = "SQ", - SQ_AL = "SQ_AL", - SQ_MK = "SQ_MK", - SQ_XK = "SQ_XK", - SR = "SR", - SR_CYRL = "SR_CYRL", - SR_CYRL_BA = "SR_CYRL_BA", - SR_CYRL_ME = "SR_CYRL_ME", - SR_CYRL_RS = "SR_CYRL_RS", - SR_CYRL_XK = "SR_CYRL_XK", - SR_LATN = "SR_LATN", - SR_LATN_BA = "SR_LATN_BA", - SR_LATN_ME = "SR_LATN_ME", - SR_LATN_RS = "SR_LATN_RS", - SR_LATN_XK = "SR_LATN_XK", - SU = "SU", - SU_LATN = "SU_LATN", - SU_LATN_ID = "SU_LATN_ID", - SV = "SV", - SV_AX = "SV_AX", - SV_FI = "SV_FI", - SV_SE = "SV_SE", - SW = "SW", - SW_CD = "SW_CD", - SW_KE = "SW_KE", - SW_TZ = "SW_TZ", - SW_UG = "SW_UG", - TA = "TA", - TA_IN = "TA_IN", - TA_LK = "TA_LK", - TA_MY = "TA_MY", - TA_SG = "TA_SG", - TE = "TE", - TEO = "TEO", - TEO_KE = "TEO_KE", - TEO_UG = "TEO_UG", - TE_IN = "TE_IN", - TG = "TG", - TG_TJ = "TG_TJ", - TH = "TH", - TH_TH = "TH_TH", - TI = "TI", - TI_ER = "TI_ER", - TI_ET = "TI_ET", - TK = "TK", - TK_TM = "TK_TM", - TO = "TO", - TO_TO = "TO_TO", - TR = "TR", - TR_CY = "TR_CY", - TR_TR = "TR_TR", - TT = "TT", - TT_RU = "TT_RU", - TWQ = "TWQ", - TWQ_NE = "TWQ_NE", - TZM = "TZM", - TZM_MA = "TZM_MA", - UG = "UG", - UG_CN = "UG_CN", - UK = "UK", - UK_UA = "UK_UA", - UR = "UR", - UR_IN = "UR_IN", - UR_PK = "UR_PK", - UZ = "UZ", - UZ_ARAB = "UZ_ARAB", - UZ_ARAB_AF = "UZ_ARAB_AF", - UZ_CYRL = "UZ_CYRL", - UZ_CYRL_UZ = "UZ_CYRL_UZ", - UZ_LATN = "UZ_LATN", - UZ_LATN_UZ = "UZ_LATN_UZ", - VAI = "VAI", - VAI_LATN = "VAI_LATN", - VAI_LATN_LR = "VAI_LATN_LR", - VAI_VAII = "VAI_VAII", - VAI_VAII_LR = "VAI_VAII_LR", - VI = "VI", - VI_VN = "VI_VN", - VO = "VO", - VUN = "VUN", - VUN_TZ = "VUN_TZ", - WAE = "WAE", - WAE_CH = "WAE_CH", - WO = "WO", - WO_SN = "WO_SN", - XH = "XH", - XH_ZA = "XH_ZA", - XOG = "XOG", - XOG_UG = "XOG_UG", - YAV = "YAV", - YAV_CM = "YAV_CM", - YI = "YI", - YO = "YO", - YO_BJ = "YO_BJ", - YO_NG = "YO_NG", - YUE = "YUE", - YUE_HANS = "YUE_HANS", - YUE_HANS_CN = "YUE_HANS_CN", - YUE_HANT = "YUE_HANT", - YUE_HANT_HK = "YUE_HANT_HK", - ZGH = "ZGH", - ZGH_MA = "ZGH_MA", - ZH = "ZH", - ZH_HANS = "ZH_HANS", - ZH_HANS_CN = "ZH_HANS_CN", - ZH_HANS_HK = "ZH_HANS_HK", - ZH_HANS_MO = "ZH_HANS_MO", - ZH_HANS_SG = "ZH_HANS_SG", - ZH_HANT = "ZH_HANT", - ZH_HANT_HK = "ZH_HANT_HK", - ZH_HANT_MO = "ZH_HANT_MO", - ZH_HANT_TW = "ZH_HANT_TW", - ZU = "ZU", - ZU_ZA = "ZU_ZA", -} - -export enum MeasurementUnitsEnum { - ACRE_FT = "ACRE_FT", - ACRE_IN = "ACRE_IN", - CM = "CM", - CUBIC_CENTIMETER = "CUBIC_CENTIMETER", - CUBIC_DECIMETER = "CUBIC_DECIMETER", - CUBIC_FOOT = "CUBIC_FOOT", - CUBIC_INCH = "CUBIC_INCH", - CUBIC_METER = "CUBIC_METER", - CUBIC_MILLIMETER = "CUBIC_MILLIMETER", - CUBIC_YARD = "CUBIC_YARD", - FL_OZ = "FL_OZ", - FT = "FT", - G = "G", - INCH = "INCH", - KG = "KG", - KM = "KM", - LB = "LB", - LITER = "LITER", - M = "M", - OZ = "OZ", - PINT = "PINT", - QT = "QT", - SQ_CM = "SQ_CM", - SQ_FT = "SQ_FT", - SQ_INCH = "SQ_INCH", - SQ_KM = "SQ_KM", - SQ_M = "SQ_M", - SQ_YD = "SQ_YD", - TONNE = "TONNE", - YD = "YD", -} - -export enum MenuErrorCode { - CANNOT_ASSIGN_NODE = "CANNOT_ASSIGN_NODE", - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INVALID = "INVALID", - INVALID_MENU_ITEM = "INVALID_MENU_ITEM", - NOT_FOUND = "NOT_FOUND", - NO_MENU_ITEM_PROVIDED = "NO_MENU_ITEM_PROVIDED", - REQUIRED = "REQUIRED", - TOO_MANY_MENU_ITEMS = "TOO_MANY_MENU_ITEMS", - UNIQUE = "UNIQUE", -} - -export enum MenuSortField { - ITEMS_COUNT = "ITEMS_COUNT", - NAME = "NAME", -} - -export enum MetadataErrorCode { - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INVALID = "INVALID", - NOT_FOUND = "NOT_FOUND", - REQUIRED = "REQUIRED", -} - -export enum OrderAction { - CAPTURE = "CAPTURE", - MARK_AS_PAID = "MARK_AS_PAID", - REFUND = "REFUND", - VOID = "VOID", -} - -export enum OrderDirection { - ASC = "ASC", - DESC = "DESC", -} - -export enum OrderDiscountType { - MANUAL = "MANUAL", - VOUCHER = "VOUCHER", -} - -export enum OrderErrorCode { - BILLING_ADDRESS_NOT_SET = "BILLING_ADDRESS_NOT_SET", - CANNOT_CANCEL_FULFILLMENT = "CANNOT_CANCEL_FULFILLMENT", - CANNOT_CANCEL_ORDER = "CANNOT_CANCEL_ORDER", - CANNOT_DELETE = "CANNOT_DELETE", - CANNOT_DISCOUNT = "CANNOT_DISCOUNT", - CANNOT_FULFILL_UNPAID_ORDER = "CANNOT_FULFILL_UNPAID_ORDER", - CANNOT_REFUND = "CANNOT_REFUND", - CAPTURE_INACTIVE_PAYMENT = "CAPTURE_INACTIVE_PAYMENT", - CHANNEL_INACTIVE = "CHANNEL_INACTIVE", - DUPLICATED_INPUT_ITEM = "DUPLICATED_INPUT_ITEM", - FULFILL_ORDER_LINE = "FULFILL_ORDER_LINE", - GIFT_CARD_LINE = "GIFT_CARD_LINE", - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INSUFFICIENT_STOCK = "INSUFFICIENT_STOCK", - INVALID = "INVALID", - INVALID_QUANTITY = "INVALID_QUANTITY", - NOT_AVAILABLE_IN_CHANNEL = "NOT_AVAILABLE_IN_CHANNEL", - NOT_EDITABLE = "NOT_EDITABLE", - NOT_FOUND = "NOT_FOUND", - ORDER_NO_SHIPPING_ADDRESS = "ORDER_NO_SHIPPING_ADDRESS", - PAYMENT_ERROR = "PAYMENT_ERROR", - PAYMENT_MISSING = "PAYMENT_MISSING", - PRODUCT_NOT_PUBLISHED = "PRODUCT_NOT_PUBLISHED", - PRODUCT_UNAVAILABLE_FOR_PURCHASE = "PRODUCT_UNAVAILABLE_FOR_PURCHASE", - REQUIRED = "REQUIRED", - SHIPPING_METHOD_NOT_APPLICABLE = "SHIPPING_METHOD_NOT_APPLICABLE", - SHIPPING_METHOD_REQUIRED = "SHIPPING_METHOD_REQUIRED", - TAX_ERROR = "TAX_ERROR", - UNIQUE = "UNIQUE", - VOID_INACTIVE_PAYMENT = "VOID_INACTIVE_PAYMENT", - ZERO_QUANTITY = "ZERO_QUANTITY", -} - -export enum OrderEventsEmailsEnum { - CONFIRMED = "CONFIRMED", - DIGITAL_LINKS = "DIGITAL_LINKS", - FULFILLMENT_CONFIRMATION = "FULFILLMENT_CONFIRMATION", - ORDER_CANCEL = "ORDER_CANCEL", - ORDER_CONFIRMATION = "ORDER_CONFIRMATION", - ORDER_REFUND = "ORDER_REFUND", - PAYMENT_CONFIRMATION = "PAYMENT_CONFIRMATION", - SHIPPING_CONFIRMATION = "SHIPPING_CONFIRMATION", - TRACKING_UPDATED = "TRACKING_UPDATED", -} - -export enum OrderEventsEnum { - ADDED_PRODUCTS = "ADDED_PRODUCTS", - CANCELED = "CANCELED", - CONFIRMED = "CONFIRMED", - DRAFT_CREATED = "DRAFT_CREATED", - DRAFT_CREATED_FROM_REPLACE = "DRAFT_CREATED_FROM_REPLACE", - EMAIL_SENT = "EMAIL_SENT", - EXTERNAL_SERVICE_NOTIFICATION = "EXTERNAL_SERVICE_NOTIFICATION", - FULFILLMENT_AWAITS_APPROVAL = "FULFILLMENT_AWAITS_APPROVAL", - FULFILLMENT_CANCELED = "FULFILLMENT_CANCELED", - FULFILLMENT_FULFILLED_ITEMS = "FULFILLMENT_FULFILLED_ITEMS", - FULFILLMENT_REFUNDED = "FULFILLMENT_REFUNDED", - FULFILLMENT_REPLACED = "FULFILLMENT_REPLACED", - FULFILLMENT_RESTOCKED_ITEMS = "FULFILLMENT_RESTOCKED_ITEMS", - FULFILLMENT_RETURNED = "FULFILLMENT_RETURNED", - INVOICE_GENERATED = "INVOICE_GENERATED", - INVOICE_REQUESTED = "INVOICE_REQUESTED", - INVOICE_SENT = "INVOICE_SENT", - INVOICE_UPDATED = "INVOICE_UPDATED", - NOTE_ADDED = "NOTE_ADDED", - ORDER_DISCOUNT_ADDED = "ORDER_DISCOUNT_ADDED", - ORDER_DISCOUNT_AUTOMATICALLY_UPDATED = "ORDER_DISCOUNT_AUTOMATICALLY_UPDATED", - ORDER_DISCOUNT_DELETED = "ORDER_DISCOUNT_DELETED", - ORDER_DISCOUNT_UPDATED = "ORDER_DISCOUNT_UPDATED", - ORDER_FULLY_PAID = "ORDER_FULLY_PAID", - ORDER_LINE_DISCOUNT_REMOVED = "ORDER_LINE_DISCOUNT_REMOVED", - ORDER_LINE_DISCOUNT_UPDATED = "ORDER_LINE_DISCOUNT_UPDATED", - ORDER_LINE_PRODUCT_DELETED = "ORDER_LINE_PRODUCT_DELETED", - ORDER_LINE_VARIANT_DELETED = "ORDER_LINE_VARIANT_DELETED", - ORDER_MARKED_AS_PAID = "ORDER_MARKED_AS_PAID", - ORDER_REPLACEMENT_CREATED = "ORDER_REPLACEMENT_CREATED", - OTHER = "OTHER", - OVERSOLD_ITEMS = "OVERSOLD_ITEMS", - PAYMENT_AUTHORIZED = "PAYMENT_AUTHORIZED", - PAYMENT_CAPTURED = "PAYMENT_CAPTURED", - PAYMENT_FAILED = "PAYMENT_FAILED", - PAYMENT_REFUNDED = "PAYMENT_REFUNDED", - PAYMENT_VOIDED = "PAYMENT_VOIDED", - PLACED = "PLACED", - PLACED_FROM_DRAFT = "PLACED_FROM_DRAFT", - REMOVED_PRODUCTS = "REMOVED_PRODUCTS", - TRACKING_UPDATED = "TRACKING_UPDATED", - UPDATED_ADDRESS = "UPDATED_ADDRESS", -} - -export enum OrderSettingsErrorCode { - INVALID = "INVALID", -} - -export enum OrderSortField { - CREATION_DATE = "CREATION_DATE", - CUSTOMER = "CUSTOMER", - FULFILLMENT_STATUS = "FULFILLMENT_STATUS", - NUMBER = "NUMBER", - PAYMENT = "PAYMENT", -} - -export enum OrderStatus { - CANCELED = "CANCELED", - DRAFT = "DRAFT", - FULFILLED = "FULFILLED", - PARTIALLY_FULFILLED = "PARTIALLY_FULFILLED", - PARTIALLY_RETURNED = "PARTIALLY_RETURNED", - RETURNED = "RETURNED", - UNCONFIRMED = "UNCONFIRMED", - UNFULFILLED = "UNFULFILLED", -} - -export enum OrderStatusFilter { - CANCELED = "CANCELED", - FULFILLED = "FULFILLED", - PARTIALLY_FULFILLED = "PARTIALLY_FULFILLED", - READY_TO_CAPTURE = "READY_TO_CAPTURE", - READY_TO_FULFILL = "READY_TO_FULFILL", - UNCONFIRMED = "UNCONFIRMED", - UNFULFILLED = "UNFULFILLED", -} - -export enum PageErrorCode { - ATTRIBUTE_ALREADY_ASSIGNED = "ATTRIBUTE_ALREADY_ASSIGNED", - DUPLICATED_INPUT_ITEM = "DUPLICATED_INPUT_ITEM", - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INVALID = "INVALID", - NOT_FOUND = "NOT_FOUND", - REQUIRED = "REQUIRED", - UNIQUE = "UNIQUE", -} - -export enum PageSortField { - CREATION_DATE = "CREATION_DATE", - PUBLICATION_DATE = "PUBLICATION_DATE", - SLUG = "SLUG", - TITLE = "TITLE", - VISIBILITY = "VISIBILITY", -} - -export enum PageTypeSortField { - NAME = "NAME", - SLUG = "SLUG", -} - -export enum PaymentChargeStatusEnum { - CANCELLED = "CANCELLED", - FULLY_CHARGED = "FULLY_CHARGED", - FULLY_REFUNDED = "FULLY_REFUNDED", - NOT_CHARGED = "NOT_CHARGED", - PARTIALLY_CHARGED = "PARTIALLY_CHARGED", - PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED", - PENDING = "PENDING", - REFUSED = "REFUSED", -} - -export enum PermissionEnum { - HANDLE_PAYMENTS = "HANDLE_PAYMENTS", - IMPERSONATE_USER = "IMPERSONATE_USER", - MANAGE_APPS = "MANAGE_APPS", - MANAGE_CHANNELS = "MANAGE_CHANNELS", - MANAGE_CHECKOUTS = "MANAGE_CHECKOUTS", - MANAGE_DISCOUNTS = "MANAGE_DISCOUNTS", - MANAGE_GIFT_CARD = "MANAGE_GIFT_CARD", - MANAGE_MENUS = "MANAGE_MENUS", - MANAGE_ORDERS = "MANAGE_ORDERS", - MANAGE_PAGES = "MANAGE_PAGES", - MANAGE_PAGE_TYPES_AND_ATTRIBUTES = "MANAGE_PAGE_TYPES_AND_ATTRIBUTES", - MANAGE_PLUGINS = "MANAGE_PLUGINS", - MANAGE_PRODUCTS = "MANAGE_PRODUCTS", - MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES = "MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES", - MANAGE_SETTINGS = "MANAGE_SETTINGS", - MANAGE_SHIPPING = "MANAGE_SHIPPING", - MANAGE_STAFF = "MANAGE_STAFF", - MANAGE_TRANSLATIONS = "MANAGE_TRANSLATIONS", - MANAGE_USERS = "MANAGE_USERS", -} - -export enum PermissionGroupErrorCode { - ASSIGN_NON_STAFF_MEMBER = "ASSIGN_NON_STAFF_MEMBER", - CANNOT_REMOVE_FROM_LAST_GROUP = "CANNOT_REMOVE_FROM_LAST_GROUP", - DUPLICATED_INPUT_ITEM = "DUPLICATED_INPUT_ITEM", - LEFT_NOT_MANAGEABLE_PERMISSION = "LEFT_NOT_MANAGEABLE_PERMISSION", - OUT_OF_SCOPE_PERMISSION = "OUT_OF_SCOPE_PERMISSION", - OUT_OF_SCOPE_USER = "OUT_OF_SCOPE_USER", - REQUIRED = "REQUIRED", - UNIQUE = "UNIQUE", -} - -export enum PermissionGroupSortField { - NAME = "NAME", -} - -export enum PluginConfigurationType { - GLOBAL = "GLOBAL", - PER_CHANNEL = "PER_CHANNEL", -} - -export enum PluginErrorCode { - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INVALID = "INVALID", - NOT_FOUND = "NOT_FOUND", - PLUGIN_MISCONFIGURED = "PLUGIN_MISCONFIGURED", - REQUIRED = "REQUIRED", - UNIQUE = "UNIQUE", -} - -export enum PluginSortField { - IS_ACTIVE = "IS_ACTIVE", - NAME = "NAME", -} - -export enum PostalCodeRuleInclusionTypeEnum { - EXCLUDE = "EXCLUDE", - INCLUDE = "INCLUDE", -} - -export enum ProductAttributeType { - PRODUCT = "PRODUCT", - VARIANT = "VARIANT", -} - -export enum ProductErrorCode { - ALREADY_EXISTS = "ALREADY_EXISTS", - ATTRIBUTE_ALREADY_ASSIGNED = "ATTRIBUTE_ALREADY_ASSIGNED", - ATTRIBUTE_CANNOT_BE_ASSIGNED = "ATTRIBUTE_CANNOT_BE_ASSIGNED", - ATTRIBUTE_VARIANTS_DISABLED = "ATTRIBUTE_VARIANTS_DISABLED", - CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT = "CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT", - DUPLICATED_INPUT_ITEM = "DUPLICATED_INPUT_ITEM", - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INVALID = "INVALID", - NOT_FOUND = "NOT_FOUND", - NOT_PRODUCTS_IMAGE = "NOT_PRODUCTS_IMAGE", - NOT_PRODUCTS_VARIANT = "NOT_PRODUCTS_VARIANT", - PREORDER_VARIANT_CANNOT_BE_DEACTIVATED = "PREORDER_VARIANT_CANNOT_BE_DEACTIVATED", - PRODUCT_NOT_ASSIGNED_TO_CHANNEL = "PRODUCT_NOT_ASSIGNED_TO_CHANNEL", - PRODUCT_WITHOUT_CATEGORY = "PRODUCT_WITHOUT_CATEGORY", - REQUIRED = "REQUIRED", - UNIQUE = "UNIQUE", - UNSUPPORTED_MEDIA_PROVIDER = "UNSUPPORTED_MEDIA_PROVIDER", - VARIANT_NO_DIGITAL_CONTENT = "VARIANT_NO_DIGITAL_CONTENT", -} - -export enum ProductFieldEnum { - CATEGORY = "CATEGORY", - CHARGE_TAXES = "CHARGE_TAXES", - COLLECTIONS = "COLLECTIONS", - DESCRIPTION = "DESCRIPTION", - NAME = "NAME", - PRODUCT_MEDIA = "PRODUCT_MEDIA", - PRODUCT_TYPE = "PRODUCT_TYPE", - PRODUCT_WEIGHT = "PRODUCT_WEIGHT", - VARIANT_ID = "VARIANT_ID", - VARIANT_MEDIA = "VARIANT_MEDIA", - VARIANT_SKU = "VARIANT_SKU", - VARIANT_WEIGHT = "VARIANT_WEIGHT", -} - -export enum ProductMediaType { - IMAGE = "IMAGE", - VIDEO = "VIDEO", -} - -export enum ProductOrderField { - COLLECTION = "COLLECTION", - DATE = "DATE", - MINIMAL_PRICE = "MINIMAL_PRICE", - NAME = "NAME", - PRICE = "PRICE", - PUBLICATION_DATE = "PUBLICATION_DATE", - PUBLISHED = "PUBLISHED", - RANK = "RANK", - RATING = "RATING", - TYPE = "TYPE", -} - -export enum ProductTypeConfigurable { - CONFIGURABLE = "CONFIGURABLE", - SIMPLE = "SIMPLE", -} - -export enum ProductTypeEnum { - DIGITAL = "DIGITAL", - SHIPPABLE = "SHIPPABLE", -} - -export enum ProductTypeKindEnum { - GIFT_CARD = "GIFT_CARD", - NORMAL = "NORMAL", -} - -export enum ProductTypeSortField { - DIGITAL = "DIGITAL", - NAME = "NAME", - SHIPPING_REQUIRED = "SHIPPING_REQUIRED", -} - -export enum SaleSortField { - END_DATE = "END_DATE", - NAME = "NAME", - START_DATE = "START_DATE", - TYPE = "TYPE", - VALUE = "VALUE", -} - -export enum SaleType { - FIXED = "FIXED", - PERCENTAGE = "PERCENTAGE", -} - -export enum ShippingErrorCode { - ALREADY_EXISTS = "ALREADY_EXISTS", - DUPLICATED_INPUT_ITEM = "DUPLICATED_INPUT_ITEM", - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INVALID = "INVALID", - MAX_LESS_THAN_MIN = "MAX_LESS_THAN_MIN", - NOT_FOUND = "NOT_FOUND", - REQUIRED = "REQUIRED", - UNIQUE = "UNIQUE", -} - -export enum ShippingMethodTypeEnum { - PRICE = "PRICE", - WEIGHT = "WEIGHT", -} - -export enum ShopErrorCode { - ALREADY_EXISTS = "ALREADY_EXISTS", - CANNOT_FETCH_TAX_RATES = "CANNOT_FETCH_TAX_RATES", - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INVALID = "INVALID", - NOT_FOUND = "NOT_FOUND", - REQUIRED = "REQUIRED", - UNIQUE = "UNIQUE", -} - -export enum StaffMemberStatus { - ACTIVE = "ACTIVE", - DEACTIVATED = "DEACTIVATED", -} - -export enum StockAvailability { - IN_STOCK = "IN_STOCK", - OUT_OF_STOCK = "OUT_OF_STOCK", -} - -export enum StockErrorCode { - ALREADY_EXISTS = "ALREADY_EXISTS", - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INVALID = "INVALID", - NOT_FOUND = "NOT_FOUND", - REQUIRED = "REQUIRED", - UNIQUE = "UNIQUE", -} - -export enum TimePeriodTypeEnum { - DAY = "DAY", - MONTH = "MONTH", - WEEK = "WEEK", - YEAR = "YEAR", -} - -export enum TranslationErrorCode { - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INVALID = "INVALID", - NOT_FOUND = "NOT_FOUND", - REQUIRED = "REQUIRED", -} - -export enum UploadErrorCode { - GRAPHQL_ERROR = "GRAPHQL_ERROR", -} - -export enum UserSortField { - EMAIL = "EMAIL", - FIRST_NAME = "FIRST_NAME", - LAST_NAME = "LAST_NAME", - ORDER_COUNT = "ORDER_COUNT", -} - -export enum VoucherDiscountType { - FIXED = "FIXED", - PERCENTAGE = "PERCENTAGE", - SHIPPING = "SHIPPING", -} - -export enum VoucherSortField { - CODE = "CODE", - END_DATE = "END_DATE", - MINIMUM_SPENT_AMOUNT = "MINIMUM_SPENT_AMOUNT", - START_DATE = "START_DATE", - TYPE = "TYPE", - USAGE_LIMIT = "USAGE_LIMIT", - VALUE = "VALUE", -} - -export enum VoucherTypeEnum { - ENTIRE_ORDER = "ENTIRE_ORDER", - SHIPPING = "SHIPPING", - SPECIFIC_PRODUCT = "SPECIFIC_PRODUCT", -} - -export enum WarehouseClickAndCollectOptionEnum { - ALL = "ALL", - DISABLED = "DISABLED", - LOCAL = "LOCAL", -} - -export enum WarehouseErrorCode { - ALREADY_EXISTS = "ALREADY_EXISTS", - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INVALID = "INVALID", - NOT_FOUND = "NOT_FOUND", - REQUIRED = "REQUIRED", - UNIQUE = "UNIQUE", -} - -export enum WarehouseSortField { - NAME = "NAME", -} - -export enum WebhookErrorCode { - GRAPHQL_ERROR = "GRAPHQL_ERROR", - INVALID = "INVALID", - NOT_FOUND = "NOT_FOUND", - REQUIRED = "REQUIRED", - UNIQUE = "UNIQUE", -} - -export enum WebhookEventTypeAsyncEnum { - ANY_EVENTS = "ANY_EVENTS", - CHECKOUT_CREATED = "CHECKOUT_CREATED", - CHECKOUT_UPDATED = "CHECKOUT_UPDATED", - COLLECTION_CREATED = "COLLECTION_CREATED", - COLLECTION_DELETED = "COLLECTION_DELETED", - COLLECTION_UPDATED = "COLLECTION_UPDATED", - CUSTOMER_CREATED = "CUSTOMER_CREATED", - CUSTOMER_UPDATED = "CUSTOMER_UPDATED", - DRAFT_ORDER_CREATED = "DRAFT_ORDER_CREATED", - DRAFT_ORDER_DELETED = "DRAFT_ORDER_DELETED", - DRAFT_ORDER_UPDATED = "DRAFT_ORDER_UPDATED", - FULFILLMENT_CANCELED = "FULFILLMENT_CANCELED", - FULFILLMENT_CREATED = "FULFILLMENT_CREATED", - INVOICE_DELETED = "INVOICE_DELETED", - INVOICE_REQUESTED = "INVOICE_REQUESTED", - INVOICE_SENT = "INVOICE_SENT", - NOTIFY_USER = "NOTIFY_USER", - ORDER_CANCELLED = "ORDER_CANCELLED", - ORDER_CONFIRMED = "ORDER_CONFIRMED", - ORDER_CREATED = "ORDER_CREATED", - ORDER_FULFILLED = "ORDER_FULFILLED", - ORDER_FULLY_PAID = "ORDER_FULLY_PAID", - ORDER_UPDATED = "ORDER_UPDATED", - PAGE_CREATED = "PAGE_CREATED", - PAGE_DELETED = "PAGE_DELETED", - PAGE_UPDATED = "PAGE_UPDATED", - PRODUCT_CREATED = "PRODUCT_CREATED", - PRODUCT_DELETED = "PRODUCT_DELETED", - PRODUCT_UPDATED = "PRODUCT_UPDATED", - PRODUCT_VARIANT_BACK_IN_STOCK = "PRODUCT_VARIANT_BACK_IN_STOCK", - PRODUCT_VARIANT_CREATED = "PRODUCT_VARIANT_CREATED", - PRODUCT_VARIANT_DELETED = "PRODUCT_VARIANT_DELETED", - PRODUCT_VARIANT_OUT_OF_STOCK = "PRODUCT_VARIANT_OUT_OF_STOCK", - PRODUCT_VARIANT_UPDATED = "PRODUCT_VARIANT_UPDATED", - SALE_CREATED = "SALE_CREATED", - SALE_DELETED = "SALE_DELETED", - SALE_UPDATED = "SALE_UPDATED", - TRANSLATION_CREATED = "TRANSLATION_CREATED", - TRANSLATION_UPDATED = "TRANSLATION_UPDATED", -} - -export enum WebhookEventTypeEnum { - ANY_EVENTS = "ANY_EVENTS", - CHECKOUT_CREATED = "CHECKOUT_CREATED", - CHECKOUT_UPDATED = "CHECKOUT_UPDATED", - COLLECTION_CREATED = "COLLECTION_CREATED", - COLLECTION_DELETED = "COLLECTION_DELETED", - COLLECTION_UPDATED = "COLLECTION_UPDATED", - CUSTOMER_CREATED = "CUSTOMER_CREATED", - CUSTOMER_UPDATED = "CUSTOMER_UPDATED", - DRAFT_ORDER_CREATED = "DRAFT_ORDER_CREATED", - DRAFT_ORDER_DELETED = "DRAFT_ORDER_DELETED", - DRAFT_ORDER_UPDATED = "DRAFT_ORDER_UPDATED", - FULFILLMENT_CANCELED = "FULFILLMENT_CANCELED", - FULFILLMENT_CREATED = "FULFILLMENT_CREATED", - INVOICE_DELETED = "INVOICE_DELETED", - INVOICE_REQUESTED = "INVOICE_REQUESTED", - INVOICE_SENT = "INVOICE_SENT", - NOTIFY_USER = "NOTIFY_USER", - ORDER_CANCELLED = "ORDER_CANCELLED", - ORDER_CONFIRMED = "ORDER_CONFIRMED", - ORDER_CREATED = "ORDER_CREATED", - ORDER_FULFILLED = "ORDER_FULFILLED", - ORDER_FULLY_PAID = "ORDER_FULLY_PAID", - ORDER_UPDATED = "ORDER_UPDATED", - PAGE_CREATED = "PAGE_CREATED", - PAGE_DELETED = "PAGE_DELETED", - PAGE_UPDATED = "PAGE_UPDATED", - PAYMENT_AUTHORIZE = "PAYMENT_AUTHORIZE", - PAYMENT_CAPTURE = "PAYMENT_CAPTURE", - PAYMENT_CONFIRM = "PAYMENT_CONFIRM", - PAYMENT_LIST_GATEWAYS = "PAYMENT_LIST_GATEWAYS", - PAYMENT_PROCESS = "PAYMENT_PROCESS", - PAYMENT_REFUND = "PAYMENT_REFUND", - PAYMENT_VOID = "PAYMENT_VOID", - PRODUCT_CREATED = "PRODUCT_CREATED", - PRODUCT_DELETED = "PRODUCT_DELETED", - PRODUCT_UPDATED = "PRODUCT_UPDATED", - PRODUCT_VARIANT_BACK_IN_STOCK = "PRODUCT_VARIANT_BACK_IN_STOCK", - PRODUCT_VARIANT_CREATED = "PRODUCT_VARIANT_CREATED", - PRODUCT_VARIANT_DELETED = "PRODUCT_VARIANT_DELETED", - PRODUCT_VARIANT_OUT_OF_STOCK = "PRODUCT_VARIANT_OUT_OF_STOCK", - PRODUCT_VARIANT_UPDATED = "PRODUCT_VARIANT_UPDATED", - SALE_CREATED = "SALE_CREATED", - SALE_DELETED = "SALE_DELETED", - SALE_UPDATED = "SALE_UPDATED", - SHIPPING_LIST_METHODS_FOR_CHECKOUT = "SHIPPING_LIST_METHODS_FOR_CHECKOUT", - TRANSLATION_CREATED = "TRANSLATION_CREATED", - TRANSLATION_UPDATED = "TRANSLATION_UPDATED", -} - -export enum WebhookEventTypeSyncEnum { - PAYMENT_AUTHORIZE = "PAYMENT_AUTHORIZE", - PAYMENT_CAPTURE = "PAYMENT_CAPTURE", - PAYMENT_CONFIRM = "PAYMENT_CONFIRM", - PAYMENT_LIST_GATEWAYS = "PAYMENT_LIST_GATEWAYS", - PAYMENT_PROCESS = "PAYMENT_PROCESS", - PAYMENT_REFUND = "PAYMENT_REFUND", - PAYMENT_VOID = "PAYMENT_VOID", - SHIPPING_LIST_METHODS_FOR_CHECKOUT = "SHIPPING_LIST_METHODS_FOR_CHECKOUT", -} - -export enum WeightUnitsEnum { - G = "G", - KG = "KG", - LB = "LB", - OZ = "OZ", - TONNE = "TONNE", -} - -export interface AddressInput { - firstName?: string | null; - lastName?: string | null; - companyName?: string | null; - streetAddress1?: string | null; - streetAddress2?: string | null; - city?: string | null; - cityArea?: string | null; - postalCode?: string | null; - country?: CountryCode | null; - countryArea?: string | null; - phone?: string | null; -} - -export interface AppExtensionFilterInput { - mount?: (AppExtensionMountEnum | null)[] | null; - target?: AppExtensionTargetEnum | null; -} - -export interface AppFilterInput { - search?: string | null; - isActive?: boolean | null; - type?: AppTypeEnum | null; -} - -export interface AppInput { - name?: string | null; - permissions?: (PermissionEnum | null)[] | null; -} - -export interface AppInstallInput { - appName?: string | null; - manifestUrl?: string | null; - activateAfterInstallation?: boolean | null; - permissions?: (PermissionEnum | null)[] | null; -} - -export interface AppSortingInput { - direction: OrderDirection; - field: AppSortField; -} - -export interface AppTokenInput { - name?: string | null; - app: string; -} - -export interface AttributeCreateInput { - inputType?: AttributeInputTypeEnum | null; - entityType?: AttributeEntityTypeEnum | null; - name: string; - slug?: string | null; - type: AttributeTypeEnum; - unit?: MeasurementUnitsEnum | null; - values?: (AttributeValueCreateInput | null)[] | null; - valueRequired?: boolean | null; - isVariantOnly?: boolean | null; - visibleInStorefront?: boolean | null; - filterableInStorefront?: boolean | null; - filterableInDashboard?: boolean | null; - storefrontSearchPosition?: number | null; - availableInGrid?: boolean | null; -} - -export interface AttributeFilterInput { - valueRequired?: boolean | null; - isVariantOnly?: boolean | null; - visibleInStorefront?: boolean | null; - filterableInStorefront?: boolean | null; - filterableInDashboard?: boolean | null; - availableInGrid?: boolean | null; - metadata?: (MetadataFilter | null)[] | null; - search?: string | null; - ids?: (string | null)[] | null; - type?: AttributeTypeEnum | null; - inCollection?: string | null; - inCategory?: string | null; - channel?: string | null; -} - -export interface AttributeInput { - slug: string; - values?: (string | null)[] | null; - valuesRange?: IntRangeInput | null; - dateTime?: DateTimeRangeInput | null; - date?: DateRangeInput | null; - boolean?: boolean | null; -} - -export interface AttributeSortingInput { - direction: OrderDirection; - field: AttributeSortField; -} - -export interface AttributeUpdateInput { - name?: string | null; - slug?: string | null; - unit?: MeasurementUnitsEnum | null; - removeValues?: (string | null)[] | null; - addValues?: (AttributeValueUpdateInput | null)[] | null; - valueRequired?: boolean | null; - isVariantOnly?: boolean | null; - visibleInStorefront?: boolean | null; - filterableInStorefront?: boolean | null; - filterableInDashboard?: boolean | null; - storefrontSearchPosition?: number | null; - availableInGrid?: boolean | null; -} - -export interface AttributeValueCreateInput { - value?: string | null; - richText?: any | null; - fileUrl?: string | null; - contentType?: string | null; - name: string; -} - -export interface AttributeValueInput { - id?: string | null; - values?: string[] | null; - file?: string | null; - contentType?: string | null; - references?: string[] | null; - richText?: any | null; - boolean?: boolean | null; - date?: any | null; - dateTime?: any | null; -} - -export interface AttributeValueTranslationInput { - name?: string | null; - richText?: any | null; -} - -export interface AttributeValueUpdateInput { - value?: string | null; - richText?: any | null; - fileUrl?: string | null; - contentType?: string | null; - name?: string | null; -} - -export interface BulkAttributeValueInput { - id?: string | null; - values?: string[] | null; - boolean?: boolean | null; -} - -export interface CatalogueInput { - products?: (string | null)[] | null; - categories?: (string | null)[] | null; - collections?: (string | null)[] | null; - variants?: (string | null)[] | null; -} - -export interface CategoryFilterInput { - search?: string | null; - metadata?: (MetadataFilter | null)[] | null; - ids?: (string | null)[] | null; -} - -export interface CategoryInput { - description?: any | null; - name?: string | null; - slug?: string | null; - seo?: SeoInput | null; - backgroundImage?: any | null; - backgroundImageAlt?: string | null; -} - -export interface CategorySortingInput { - direction: OrderDirection; - channel?: string | null; - field: CategorySortField; -} - -export interface ChannelCreateInput { - isActive?: boolean | null; - name: string; - slug: string; - currencyCode: string; - defaultCountry: CountryCode; - addShippingZones?: string[] | null; -} - -export interface ChannelDeleteInput { - channelId: string; -} - -export interface ChannelUpdateInput { - isActive?: boolean | null; - name?: string | null; - slug?: string | null; - defaultCountry?: CountryCode | null; - addShippingZones?: string[] | null; - removeShippingZones?: string[] | null; -} - -export interface CollectionChannelListingUpdateInput { - addChannels?: PublishableChannelListingInput[] | null; - removeChannels?: string[] | null; -} - -export interface CollectionCreateInput { - isPublished?: boolean | null; - name?: string | null; - slug?: string | null; - description?: any | null; - backgroundImage?: any | null; - backgroundImageAlt?: string | null; - seo?: SeoInput | null; - publicationDate?: any | null; - products?: (string | null)[] | null; -} - -export interface CollectionFilterInput { - published?: CollectionPublished | null; - search?: string | null; - metadata?: (MetadataFilter | null)[] | null; - ids?: (string | null)[] | null; - channel?: string | null; -} - -export interface CollectionInput { - isPublished?: boolean | null; - name?: string | null; - slug?: string | null; - description?: any | null; - backgroundImage?: any | null; - backgroundImageAlt?: string | null; - seo?: SeoInput | null; - publicationDate?: any | null; -} - -export interface CollectionSortingInput { - direction: OrderDirection; - channel?: string | null; - field: CollectionSortField; -} - -export interface ConfigurationItemInput { - name: string; - value?: string | null; -} - -export interface CountryFilterInput { - attachedToShippingZones?: boolean | null; -} - -export interface CustomerFilterInput { - dateJoined?: DateRangeInput | null; - numberOfOrders?: IntRangeInput | null; - placedOrders?: DateRangeInput | null; - search?: string | null; - metadata?: (MetadataFilter | null)[] | null; -} - -export interface CustomerInput { - defaultBillingAddress?: AddressInput | null; - defaultShippingAddress?: AddressInput | null; - firstName?: string | null; - lastName?: string | null; - email?: string | null; - isActive?: boolean | null; - note?: string | null; - languageCode?: LanguageCodeEnum | null; -} - -export interface DateRangeInput { - gte?: any | null; - lte?: any | null; -} - -export interface DateTimeRangeInput { - gte?: any | null; - lte?: any | null; -} - -export interface DraftOrderCreateInput { - billingAddress?: AddressInput | null; - user?: string | null; - userEmail?: string | null; - discount?: any | null; - shippingAddress?: AddressInput | null; - shippingMethod?: string | null; - voucher?: string | null; - customerNote?: string | null; - channelId?: string | null; - redirectUrl?: string | null; - lines?: (OrderLineCreateInput | null)[] | null; -} - -export interface DraftOrderInput { - billingAddress?: AddressInput | null; - user?: string | null; - userEmail?: string | null; - discount?: any | null; - shippingAddress?: AddressInput | null; - shippingMethod?: string | null; - voucher?: string | null; - customerNote?: string | null; - channelId?: string | null; - redirectUrl?: string | null; -} - -export interface ExportGiftCardsInput { - scope: ExportScope; - filter?: GiftCardFilterInput | null; - ids?: string[] | null; - fileType: FileTypesEnum; -} - -export interface ExportInfoInput { - attributes?: string[] | null; - warehouses?: string[] | null; - channels?: string[] | null; - fields?: ProductFieldEnum[] | null; -} - -export interface ExportProductsInput { - scope: ExportScope; - filter?: ProductFilterInput | null; - ids?: string[] | null; - exportInfo?: ExportInfoInput | null; - fileType: FileTypesEnum; -} - -export interface FulfillmentCancelInput { - warehouseId?: string | null; -} - -export interface FulfillmentUpdateTrackingInput { - trackingNumber?: string | null; - notifyCustomer?: boolean | null; -} - -export interface GiftCardAddNoteInput { - message: string; -} - -export interface GiftCardBulkCreateInput { - count: number; - balance: PriceInput; - tags?: string[] | null; - expiryDate?: any | null; - isActive: boolean; -} - -export interface GiftCardCreateInput { - addTags?: string[] | null; - expiryDate?: any | null; - startDate?: any | null; - endDate?: any | null; - balance: PriceInput; - userEmail?: string | null; - channel?: string | null; - isActive: boolean; - code?: string | null; - note?: string | null; -} - -export interface GiftCardFilterInput { - isActive?: boolean | null; - metadata?: (MetadataFilter | null)[] | null; - tags?: (string | null)[] | null; - products?: (string | null)[] | null; - usedBy?: (string | null)[] | null; - used?: boolean | null; - currency?: string | null; - currentBalance?: PriceRangeInput | null; - initialBalance?: PriceRangeInput | null; - code?: string | null; -} - -export interface GiftCardResendInput { - id: string; - email?: string | null; - channel: string; -} - -export interface GiftCardSettingsUpdateInput { - expiryType?: GiftCardSettingsExpiryTypeEnum | null; - expiryPeriod?: TimePeriodInputType | null; -} - -export interface GiftCardSortingInput { - direction: OrderDirection; - field: GiftCardSortField; -} - -export interface GiftCardUpdateInput { - addTags?: string[] | null; - expiryDate?: any | null; - startDate?: any | null; - endDate?: any | null; - removeTags?: string[] | null; - balanceAmount?: any | null; -} - -export interface IntRangeInput { - gte?: number | null; - lte?: number | null; -} - -export interface MenuCreateInput { - name: string; - slug?: string | null; - items?: (MenuItemInput | null)[] | null; -} - -export interface MenuItemCreateInput { - name: string; - url?: string | null; - category?: string | null; - collection?: string | null; - page?: string | null; - menu: string; - parent?: string | null; -} - -export interface MenuItemInput { - name?: string | null; - url?: string | null; - category?: string | null; - collection?: string | null; - page?: string | null; -} - -export interface MenuItemMoveInput { - itemId: string; - parentId?: string | null; - sortOrder?: number | null; -} - -export interface MenuSortingInput { - direction: OrderDirection; - field: MenuSortField; -} - -export interface MetadataFilter { - key: string; - value?: string | null; -} - -export interface MetadataInput { - key: string; - value: string; -} - -export interface NameTranslationInput { - name?: string | null; -} - -export interface OrderAddNoteInput { - message: string; -} - -export interface OrderDiscountCommonInput { - valueType: DiscountValueTypeEnum; - value: any; - reason?: string | null; -} - -export interface OrderDraftFilterInput { - customer?: string | null; - created?: DateRangeInput | null; - search?: string | null; - metadata?: (MetadataFilter | null)[] | null; - channels?: (string | null)[] | null; -} - -export interface OrderFilterInput { - paymentStatus?: (PaymentChargeStatusEnum | null)[] | null; - status?: (OrderStatusFilter | null)[] | null; - customer?: string | null; - created?: DateRangeInput | null; - search?: string | null; - metadata?: (MetadataFilter | null)[] | null; - channels?: (string | null)[] | null; - isClickAndCollect?: boolean | null; - isPreorder?: boolean | null; - ids?: (string | null)[] | null; - giftCardUsed?: boolean | null; - giftCardBought?: boolean | null; -} - -export interface OrderFulfillInput { - lines: OrderFulfillLineInput[]; - notifyCustomer?: boolean | null; - allowStockToBeExceeded?: boolean | null; -} - -export interface OrderFulfillLineInput { - orderLineId?: string | null; - stocks: OrderFulfillStockInput[]; -} - -export interface OrderFulfillStockInput { - quantity: number; - warehouse: string; -} - -export interface OrderLineCreateInput { - quantity: number; - variantId: string; -} - -export interface OrderLineInput { - quantity: number; -} - -export interface OrderRefundFulfillmentLineInput { - fulfillmentLineId: string; - quantity: number; -} - -export interface OrderRefundLineInput { - orderLineId: string; - quantity: number; -} - -export interface OrderRefundProductsInput { - orderLines?: OrderRefundLineInput[] | null; - fulfillmentLines?: OrderRefundFulfillmentLineInput[] | null; - amountToRefund?: any | null; - includeShippingCosts?: boolean | null; -} - -export interface OrderReturnFulfillmentLineInput { - fulfillmentLineId: string; - quantity: number; - replace?: boolean | null; -} - -export interface OrderReturnLineInput { - orderLineId: string; - quantity: number; - replace?: boolean | null; -} - -export interface OrderReturnProductsInput { - orderLines?: OrderReturnLineInput[] | null; - fulfillmentLines?: OrderReturnFulfillmentLineInput[] | null; - amountToRefund?: any | null; - includeShippingCosts?: boolean | null; - refund?: boolean | null; -} - -export interface OrderSettingsUpdateInput { - automaticallyConfirmAllNewOrders?: boolean | null; - automaticallyFulfillNonShippableGiftCard?: boolean | null; -} - -export interface OrderSortingInput { - direction: OrderDirection; - field: OrderSortField; -} - -export interface OrderUpdateInput { - billingAddress?: AddressInput | null; - userEmail?: string | null; - shippingAddress?: AddressInput | null; -} - -export interface OrderUpdateShippingInput { - shippingMethod?: string | null; -} - -export interface PageCreateInput { - slug?: string | null; - title?: string | null; - content?: any | null; - attributes?: AttributeValueInput[] | null; - isPublished?: boolean | null; - publicationDate?: string | null; - seo?: SeoInput | null; - pageType: string; -} - -export interface PageFilterInput { - search?: string | null; - metadata?: (MetadataFilter | null)[] | null; - pageTypes?: (string | null)[] | null; - ids?: (string | null)[] | null; -} - -export interface PageInput { - slug?: string | null; - title?: string | null; - content?: any | null; - attributes?: AttributeValueInput[] | null; - isPublished?: boolean | null; - publicationDate?: string | null; - seo?: SeoInput | null; -} - -export interface PageSortingInput { - direction: OrderDirection; - field: PageSortField; -} - -export interface PageTranslationInput { - seoTitle?: string | null; - seoDescription?: string | null; - title?: string | null; - content?: any | null; -} - -export interface PageTypeCreateInput { - name?: string | null; - slug?: string | null; - addAttributes?: string[] | null; -} - -export interface PageTypeFilterInput { - search?: string | null; -} - -export interface PageTypeSortingInput { - direction: OrderDirection; - field: PageTypeSortField; -} - -export interface PageTypeUpdateInput { - name?: string | null; - slug?: string | null; - addAttributes?: string[] | null; - removeAttributes?: string[] | null; -} - -export interface PermissionGroupCreateInput { - addPermissions?: PermissionEnum[] | null; - addUsers?: string[] | null; - name: string; -} - -export interface PermissionGroupFilterInput { - search?: string | null; -} - -export interface PermissionGroupSortingInput { - direction: OrderDirection; - field: PermissionGroupSortField; -} - -export interface PermissionGroupUpdateInput { - addPermissions?: PermissionEnum[] | null; - addUsers?: string[] | null; - name?: string | null; - removePermissions?: PermissionEnum[] | null; - removeUsers?: string[] | null; -} - -export interface PluginFilterInput { - statusInChannels?: PluginStatusInChannelsInput | null; - search?: string | null; - type?: PluginConfigurationType | null; -} - -export interface PluginSortingInput { - direction: OrderDirection; - field: PluginSortField; -} - -export interface PluginStatusInChannelsInput { - active: boolean; - channels: string[]; -} - -export interface PluginUpdateInput { - active?: boolean | null; - configuration?: (ConfigurationItemInput | null)[] | null; -} - -export interface PreorderSettingsInput { - globalThreshold?: number | null; - endDate?: any | null; -} - -export interface PriceInput { - currency: string; - amount: any; -} - -export interface PriceRangeInput { - gte?: number | null; - lte?: number | null; -} - -export interface ProductAttributeAssignInput { - id: string; - type: ProductAttributeType; - variantSelection?: boolean | null; -} - -export interface ProductAttributeAssignmentUpdateInput { - id: string; - variantSelection: boolean; -} - -export interface ProductChannelListingAddInput { - channelId: string; - isPublished?: boolean | null; - publicationDate?: any | null; - visibleInListings?: boolean | null; - isAvailableForPurchase?: boolean | null; - availableForPurchaseDate?: any | null; - addVariants?: string[] | null; - removeVariants?: string[] | null; -} - -export interface ProductChannelListingUpdateInput { - updateChannels?: ProductChannelListingAddInput[] | null; - removeChannels?: string[] | null; -} - -export interface ProductCreateInput { - attributes?: AttributeValueInput[] | null; - category?: string | null; - chargeTaxes?: boolean | null; - collections?: string[] | null; - description?: any | null; - name?: string | null; - slug?: string | null; - taxCode?: string | null; - seo?: SeoInput | null; - weight?: any | null; - rating?: number | null; - productType: string; -} - -export interface ProductFilterInput { - isPublished?: boolean | null; - collections?: (string | null)[] | null; - categories?: (string | null)[] | null; - hasCategory?: boolean | null; - attributes?: (AttributeInput | null)[] | null; - stockAvailability?: StockAvailability | null; - stocks?: ProductStockFilterInput | null; - search?: string | null; - metadata?: (MetadataFilter | null)[] | null; - price?: PriceRangeInput | null; - minimalPrice?: PriceRangeInput | null; - productTypes?: (string | null)[] | null; - giftCard?: boolean | null; - ids?: (string | null)[] | null; - hasPreorderedVariants?: boolean | null; - channel?: string | null; -} - -export interface ProductInput { - attributes?: AttributeValueInput[] | null; - category?: string | null; - chargeTaxes?: boolean | null; - collections?: string[] | null; - description?: any | null; - name?: string | null; - slug?: string | null; - taxCode?: string | null; - seo?: SeoInput | null; - weight?: any | null; - rating?: number | null; -} - -export interface ProductOrder { - direction: OrderDirection; - channel?: string | null; - attributeId?: string | null; - field?: ProductOrderField | null; -} - -export interface ProductStockFilterInput { - warehouseIds?: string[] | null; - quantity?: IntRangeInput | null; -} - -export interface ProductTypeFilterInput { - search?: string | null; - configurable?: ProductTypeConfigurable | null; - productType?: ProductTypeEnum | null; - metadata?: (MetadataFilter | null)[] | null; - kind?: ProductTypeKindEnum | null; - ids?: (string | null)[] | null; -} - -export interface ProductTypeInput { - name?: string | null; - slug?: string | null; - kind?: ProductTypeKindEnum | null; - hasVariants?: boolean | null; - productAttributes?: (string | null)[] | null; - variantAttributes?: (string | null)[] | null; - isShippingRequired?: boolean | null; - isDigital?: boolean | null; - weight?: any | null; - taxCode?: string | null; -} - -export interface ProductTypeSortingInput { - direction: OrderDirection; - field: ProductTypeSortField; -} - -export interface ProductVariantBulkCreateInput { - attributes: BulkAttributeValueInput[]; - sku?: string | null; - trackInventory?: boolean | null; - weight?: any | null; - preorder?: PreorderSettingsInput | null; - quantityLimitPerCustomer?: number | null; - stocks?: StockInput[] | null; - channelListings?: ProductVariantChannelListingAddInput[] | null; -} - -export interface ProductVariantChannelListingAddInput { - channelId: string; - price: any; - costPrice?: any | null; - preorderThreshold?: number | null; -} - -export interface ProductVariantCreateInput { - attributes: AttributeValueInput[]; - sku?: string | null; - trackInventory?: boolean | null; - weight?: any | null; - preorder?: PreorderSettingsInput | null; - quantityLimitPerCustomer?: number | null; - product: string; - stocks?: StockInput[] | null; -} - -export interface ProductVariantInput { - attributes?: AttributeValueInput[] | null; - sku?: string | null; - trackInventory?: boolean | null; - weight?: any | null; - preorder?: PreorderSettingsInput | null; - quantityLimitPerCustomer?: number | null; -} - -export interface PublishableChannelListingInput { - channelId: string; - isPublished?: boolean | null; - publicationDate?: any | null; -} - -export interface ReorderInput { - id: string; - sortOrder?: number | null; -} - -export interface SaleChannelListingAddInput { - channelId: string; - discountValue: any; -} - -export interface SaleChannelListingInput { - addChannels?: SaleChannelListingAddInput[] | null; - removeChannels?: string[] | null; -} - -export interface SaleFilterInput { - status?: (DiscountStatusEnum | null)[] | null; - saleType?: DiscountValueTypeEnum | null; - started?: DateTimeRangeInput | null; - search?: string | null; - metadata?: (MetadataFilter | null)[] | null; -} - -export interface SaleInput { - name?: string | null; - type?: DiscountValueTypeEnum | null; - value?: any | null; - products?: (string | null)[] | null; - variants?: (string | null)[] | null; - categories?: (string | null)[] | null; - collections?: (string | null)[] | null; - startDate?: any | null; - endDate?: any | null; -} - -export interface SaleSortingInput { - direction: OrderDirection; - channel?: string | null; - field: SaleSortField; -} - -export interface SeoInput { - title?: string | null; - description?: string | null; -} - -export interface ShippingMethodChannelListingAddInput { - channelId: string; - price?: any | null; - minimumOrderPrice?: any | null; - maximumOrderPrice?: any | null; -} - -export interface ShippingMethodChannelListingInput { - addChannels?: ShippingMethodChannelListingAddInput[] | null; - removeChannels?: string[] | null; -} - -export interface ShippingPostalCodeRulesCreateInputRange { - start: string; - end?: string | null; -} - -export interface ShippingPriceExcludeProductsInput { - products: (string | null)[]; -} - -export interface ShippingPriceInput { - name?: string | null; - description?: any | null; - minimumOrderWeight?: any | null; - maximumOrderWeight?: any | null; - maximumDeliveryDays?: number | null; - minimumDeliveryDays?: number | null; - type?: ShippingMethodTypeEnum | null; - shippingZone?: string | null; - addPostalCodeRules?: ShippingPostalCodeRulesCreateInputRange[] | null; - deletePostalCodeRules?: string[] | null; - inclusionType?: PostalCodeRuleInclusionTypeEnum | null; -} - -export interface ShippingPriceTranslationInput { - name?: string | null; - description?: any | null; -} - -export interface ShippingZoneCreateInput { - name?: string | null; - description?: string | null; - countries?: (string | null)[] | null; - default?: boolean | null; - addWarehouses?: (string | null)[] | null; - addChannels?: string[] | null; -} - -export interface ShippingZoneFilterInput { - search?: string | null; - channels?: (string | null)[] | null; -} - -export interface ShippingZoneUpdateInput { - name?: string | null; - description?: string | null; - countries?: (string | null)[] | null; - default?: boolean | null; - addWarehouses?: (string | null)[] | null; - addChannels?: string[] | null; - removeWarehouses?: (string | null)[] | null; - removeChannels?: string[] | null; -} - -export interface ShopSettingsInput { - headerText?: string | null; - description?: string | null; - includeTaxesInPrices?: boolean | null; - displayGrossPrices?: boolean | null; - chargeTaxesOnShipping?: boolean | null; - trackInventoryByDefault?: boolean | null; - defaultWeightUnit?: WeightUnitsEnum | null; - automaticFulfillmentDigitalProducts?: boolean | null; - fulfillmentAutoApprove?: boolean | null; - fulfillmentAllowUnpaid?: boolean | null; - defaultDigitalMaxDownloads?: number | null; - defaultDigitalUrlValidDays?: number | null; - defaultMailSenderName?: string | null; - defaultMailSenderAddress?: string | null; - customerSetPasswordUrl?: string | null; - reserveStockDurationAnonymousUser?: number | null; - reserveStockDurationAuthenticatedUser?: number | null; - limitQuantityPerCheckout?: number | null; -} - -export interface SiteDomainInput { - domain?: string | null; - name?: string | null; -} - -export interface StaffCreateInput { - firstName?: string | null; - lastName?: string | null; - email?: string | null; - isActive?: boolean | null; - note?: string | null; - addGroups?: string[] | null; - redirectUrl?: string | null; -} - -export interface StaffUpdateInput { - firstName?: string | null; - lastName?: string | null; - email?: string | null; - isActive?: boolean | null; - note?: string | null; - addGroups?: string[] | null; - removeGroups?: string[] | null; -} - -export interface StaffUserInput { - status?: StaffMemberStatus | null; - search?: string | null; -} - -export interface StockInput { - warehouse: string; - quantity: number; -} - -export interface TimePeriodInputType { - amount: number; - type: TimePeriodTypeEnum; -} - -export interface TranslationInput { - seoTitle?: string | null; - seoDescription?: string | null; - name?: string | null; - description?: any | null; -} - -export interface UserCreateInput { - defaultBillingAddress?: AddressInput | null; - defaultShippingAddress?: AddressInput | null; - firstName?: string | null; - lastName?: string | null; - email?: string | null; - isActive?: boolean | null; - note?: string | null; - languageCode?: LanguageCodeEnum | null; - redirectUrl?: string | null; - channel?: string | null; -} - -export interface UserSortingInput { - direction: OrderDirection; - field: UserSortField; -} - -export interface VoucherChannelListingAddInput { - channelId: string; - discountValue?: any | null; - minAmountSpent?: any | null; -} - -export interface VoucherChannelListingInput { - addChannels?: VoucherChannelListingAddInput[] | null; - removeChannels?: string[] | null; -} - -export interface VoucherFilterInput { - status?: (DiscountStatusEnum | null)[] | null; - timesUsed?: IntRangeInput | null; - discountType?: (VoucherDiscountType | null)[] | null; - started?: DateTimeRangeInput | null; - search?: string | null; - metadata?: (MetadataFilter | null)[] | null; -} - -export interface VoucherInput { - type?: VoucherTypeEnum | null; - name?: string | null; - code?: string | null; - startDate?: any | null; - endDate?: any | null; - discountValueType?: DiscountValueTypeEnum | null; - products?: (string | null)[] | null; - variants?: (string | null)[] | null; - collections?: (string | null)[] | null; - categories?: (string | null)[] | null; - minCheckoutItemsQuantity?: number | null; - countries?: (string | null)[] | null; - applyOncePerOrder?: boolean | null; - applyOncePerCustomer?: boolean | null; - onlyForStaff?: boolean | null; - usageLimit?: number | null; -} - -export interface VoucherSortingInput { - direction: OrderDirection; - channel?: string | null; - field: VoucherSortField; -} - -export interface WarehouseCreateInput { - slug?: string | null; - email?: string | null; - name: string; - address: AddressInput; - shippingZones?: (string | null)[] | null; -} - -export interface WarehouseFilterInput { - clickAndCollectOption?: WarehouseClickAndCollectOptionEnum | null; - search?: string | null; - ids?: (string | null)[] | null; - isPrivate?: boolean | null; -} - -export interface WarehouseSortingInput { - direction: OrderDirection; - field: WarehouseSortField; -} - -export interface WarehouseUpdateInput { - slug?: string | null; - email?: string | null; - name?: string | null; - address?: AddressInput | null; - clickAndCollectOption?: WarehouseClickAndCollectOptionEnum | null; - isPrivate?: boolean | null; -} - -export interface WebhookCreateInput { - name?: string | null; - targetUrl?: string | null; - events?: (WebhookEventTypeEnum | null)[] | null; - asyncEvents?: WebhookEventTypeAsyncEnum[] | null; - syncEvents?: WebhookEventTypeSyncEnum[] | null; - app?: string | null; - isActive?: boolean | null; - secretKey?: string | null; -} - -export interface WebhookUpdateInput { - name?: string | null; - targetUrl?: string | null; - events?: (WebhookEventTypeEnum | null)[] | null; - asyncEvents?: WebhookEventTypeAsyncEnum[] | null; - syncEvents?: WebhookEventTypeSyncEnum[] | null; - app?: string | null; - isActive?: boolean | null; - secretKey?: string | null; -} - -//============================================================== -// END Enums and Input Objects -//============================================================== diff --git a/src/utils/errors/account.ts b/src/utils/errors/account.ts index f6ef4d543..f73e4a78c 100644 --- a/src/utils/errors/account.ts +++ b/src/utils/errors/account.ts @@ -1,5 +1,5 @@ +import { AccountErrorCode } from "@saleor/graphql"; import { SetPasswordData } from "@saleor/sdk"; -import { AccountErrorCode } from "@saleor/types/globalTypes"; import { defineMessages, IntlShape } from "react-intl"; import { getCommonFormFieldErrorMessage } from "./common"; diff --git a/src/utils/errors/app.ts b/src/utils/errors/app.ts index f241325c8..eb075f3ef 100644 --- a/src/utils/errors/app.ts +++ b/src/utils/errors/app.ts @@ -1,5 +1,4 @@ -import { AppErrorFragment } from "@saleor/fragments/types/AppErrorFragment"; -import { AppErrorCode } from "@saleor/types/globalTypes"; +import { AppErrorCode, AppErrorFragment } from "@saleor/graphql"; import { defineMessages, IntlShape } from "react-intl"; import { getCommonFormFieldErrorMessage } from "./common"; diff --git a/src/utils/errors/attribute.ts b/src/utils/errors/attribute.ts index f66b8edbe..e9efbc7cc 100644 --- a/src/utils/errors/attribute.ts +++ b/src/utils/errors/attribute.ts @@ -1,5 +1,4 @@ -import { AttributeErrorFragment } from "@saleor/fragments/types/AttributeErrorFragment"; -import { AttributeErrorCode } from "@saleor/types/globalTypes"; +import { AttributeErrorCode, AttributeErrorFragment } from "@saleor/graphql"; import { defineMessages, IntlShape } from "react-intl"; import { getCommonFormFieldErrorMessage } from "./common"; diff --git a/src/utils/errors/channels.ts b/src/utils/errors/channels.ts index 7bf982f31..8b228d13c 100644 --- a/src/utils/errors/channels.ts +++ b/src/utils/errors/channels.ts @@ -1,5 +1,4 @@ -import { ChannelErrorFragment } from "@saleor/fragments/types/ChannelErrorFragment"; -import { ChannelErrorCode } from "@saleor/types/globalTypes"; +import { ChannelErrorCode, ChannelErrorFragment } from "@saleor/graphql"; import { defineMessages, IntlShape } from "react-intl"; import { getCommonFormFieldErrorMessage } from "./common"; diff --git a/src/utils/errors/discounts.ts b/src/utils/errors/discounts.ts index 1635107cc..5789a1fb4 100644 --- a/src/utils/errors/discounts.ts +++ b/src/utils/errors/discounts.ts @@ -1,5 +1,4 @@ -import { DiscountErrorFragment } from "@saleor/fragments/types/DiscountErrorFragment"; -import { DiscountErrorCode } from "@saleor/types/globalTypes"; +import { DiscountErrorCode, DiscountErrorFragment } from "@saleor/graphql"; import { defineMessages, IntlShape } from "react-intl"; import { getCommonFormFieldErrorMessage } from "./common"; diff --git a/src/utils/errors/export.ts b/src/utils/errors/export.ts index 450bf5e43..f245b3049 100644 --- a/src/utils/errors/export.ts +++ b/src/utils/errors/export.ts @@ -1,4 +1,4 @@ -import { ExportErrorFragment } from "@saleor/fragments/types/ExportErrorFragment"; +import { ExportErrorFragment } from "@saleor/graphql"; import { IntlShape } from "react-intl"; import { getCommonFormFieldErrorMessage } from "./common"; diff --git a/src/utils/errors/invoice.ts b/src/utils/errors/invoice.ts index c889641bd..bc66b9a60 100644 --- a/src/utils/errors/invoice.ts +++ b/src/utils/errors/invoice.ts @@ -1,5 +1,4 @@ -import { InvoiceErrorFragment } from "@saleor/fragments/types/InvoiceErrorFragment"; -import { InvoiceErrorCode } from "@saleor/types/globalTypes"; +import { InvoiceErrorCode, InvoiceErrorFragment } from "@saleor/graphql"; import { defineMessages, IntlShape } from "react-intl"; import { getCommonFormFieldErrorMessage } from "./common"; diff --git a/src/utils/errors/menu.ts b/src/utils/errors/menu.ts index f056a8503..72068060f 100644 --- a/src/utils/errors/menu.ts +++ b/src/utils/errors/menu.ts @@ -1,4 +1,4 @@ -import { MenuErrorFragment } from "@saleor/fragments/types/MenuErrorFragment"; +import { MenuErrorFragment } from "@saleor/graphql"; import { IntlShape } from "react-intl"; import { getCommonFormFieldErrorMessage } from "./common"; diff --git a/src/utils/errors/order.ts b/src/utils/errors/order.ts index 6a6a22728..c9a723615 100644 --- a/src/utils/errors/order.ts +++ b/src/utils/errors/order.ts @@ -1,5 +1,4 @@ -import { OrderErrorFragment } from "@saleor/fragments/types/OrderErrorFragment"; -import { OrderErrorCode } from "@saleor/types/globalTypes"; +import { OrderErrorCode, OrderErrorFragment } from "@saleor/graphql"; import { defineMessages, IntlShape } from "react-intl"; import { getCommonFormFieldErrorMessage } from "./common"; diff --git a/src/utils/errors/page.ts b/src/utils/errors/page.ts index 390d03ddc..fa4a0fcf0 100644 --- a/src/utils/errors/page.ts +++ b/src/utils/errors/page.ts @@ -1,5 +1,4 @@ -import { PageErrorFragment } from "@saleor/fragments/types/PageErrorFragment"; -import { PageErrorCode } from "@saleor/types/globalTypes"; +import { PageErrorCode, PageErrorFragment } from "@saleor/graphql"; import { defineMessages, IntlShape } from "react-intl"; import { getCommonFormFieldErrorMessage } from "./common"; diff --git a/src/utils/errors/permissionGroups.ts b/src/utils/errors/permissionGroups.ts index 4092a172e..7af68e5b2 100644 --- a/src/utils/errors/permissionGroups.ts +++ b/src/utils/errors/permissionGroups.ts @@ -1,5 +1,7 @@ -import { PermissionGroupErrorFragment } from "@saleor/fragments/types/PermissionGroupErrorFragment"; -import { PermissionGroupErrorCode } from "@saleor/types/globalTypes"; +import { + PermissionGroupErrorCode, + PermissionGroupErrorFragment +} from "@saleor/graphql"; import { defineMessages, IntlShape } from "react-intl"; import { getCommonFormFieldErrorMessage } from "./common"; diff --git a/src/utils/errors/plugins.ts b/src/utils/errors/plugins.ts index a676ae124..201ddb64a 100644 --- a/src/utils/errors/plugins.ts +++ b/src/utils/errors/plugins.ts @@ -1,5 +1,4 @@ -import { PluginErrorFragment } from "@saleor/fragments/types/PluginErrorFragment"; -import { PluginErrorCode } from "@saleor/types/globalTypes"; +import { PluginErrorCode, PluginErrorFragment } from "@saleor/graphql"; import { defineMessages, IntlShape } from "react-intl"; import { getCommonFormFieldErrorMessage } from "./common"; diff --git a/src/utils/errors/product.ts b/src/utils/errors/product.ts index 9daab34ba..8fb68662a 100644 --- a/src/utils/errors/product.ts +++ b/src/utils/errors/product.ts @@ -1,7 +1,9 @@ -import { BulkProductErrorFragment } from "@saleor/fragments/types/BulkProductErrorFragment"; -import { CollectionErrorFragment } from "@saleor/fragments/types/CollectionErrorFragment"; -import { ProductErrorFragment } from "@saleor/fragments/types/ProductErrorFragment"; -import { ProductErrorCode } from "@saleor/types/globalTypes"; +import { + BulkProductErrorFragment, + CollectionErrorFragment, + ProductErrorCode, + ProductErrorFragment +} from "@saleor/graphql"; import { defineMessages, IntlShape } from "react-intl"; import commonErrorMessages, { getCommonFormFieldErrorMessage } from "./common"; diff --git a/src/utils/errors/shipping.ts b/src/utils/errors/shipping.ts index e5a92b3e8..99c379f19 100644 --- a/src/utils/errors/shipping.ts +++ b/src/utils/errors/shipping.ts @@ -1,5 +1,4 @@ -import { ShippingErrorFragment } from "@saleor/fragments/types/ShippingErrorFragment"; -import { ShippingErrorCode } from "@saleor/types/globalTypes"; +import { ShippingErrorCode, ShippingErrorFragment } from "@saleor/graphql"; import { defineMessages, IntlShape } from "react-intl"; import { getCommonFormFieldErrorMessage } from "./common"; diff --git a/src/utils/errors/shop.ts b/src/utils/errors/shop.ts index ab63c164e..1e3303a64 100644 --- a/src/utils/errors/shop.ts +++ b/src/utils/errors/shop.ts @@ -1,5 +1,4 @@ -import { ShopErrorFragment } from "@saleor/fragments/types/ShopErrorFragment"; -import { ShopErrorCode } from "@saleor/types/globalTypes"; +import { ShopErrorCode, ShopErrorFragment } from "@saleor/graphql"; import { defineMessages, IntlShape } from "react-intl"; import { getCommonFormFieldErrorMessage } from "./common"; diff --git a/src/utils/errors/staff.ts b/src/utils/errors/staff.ts index a2aa2fe47..8426c6022 100644 --- a/src/utils/errors/staff.ts +++ b/src/utils/errors/staff.ts @@ -1,4 +1,4 @@ -import { StaffErrorFragment } from "@saleor/fragments/types/StaffErrorFragment"; +import { StaffErrorFragment } from "@saleor/graphql"; import { IntlShape } from "react-intl"; import getAccountErrorMessage from "./account"; diff --git a/src/utils/errors/stock.ts b/src/utils/errors/stock.ts index d00c116b0..4f2ad31a8 100644 --- a/src/utils/errors/stock.ts +++ b/src/utils/errors/stock.ts @@ -1,6 +1,8 @@ -import { BulkStockErrorFragment } from "@saleor/fragments/types/BulkStockErrorFragment"; -import { StockErrorFragment } from "@saleor/fragments/types/StockErrorFragment"; -import { StockErrorCode } from "@saleor/types/globalTypes"; +import { + BulkStockErrorFragment, + StockErrorCode, + StockErrorFragment +} from "@saleor/graphql"; import { defineMessages, IntlShape } from "react-intl"; import { getCommonFormFieldErrorMessage } from "./common"; diff --git a/src/utils/errors/warehouse.ts b/src/utils/errors/warehouse.ts index 2e767a973..b0dd1054b 100644 --- a/src/utils/errors/warehouse.ts +++ b/src/utils/errors/warehouse.ts @@ -1,5 +1,4 @@ -import { WarehouseErrorFragment } from "@saleor/fragments/types/WarehouseErrorFragment"; -import { WarehouseErrorCode } from "@saleor/types/globalTypes"; +import { WarehouseErrorCode, WarehouseErrorFragment } from "@saleor/graphql"; import { defineMessages, IntlShape } from "react-intl"; import { getCommonFormFieldErrorMessage } from "./common"; diff --git a/src/utils/errors/webhooks.ts b/src/utils/errors/webhooks.ts index 6a4c2cb9f..a86f79991 100644 --- a/src/utils/errors/webhooks.ts +++ b/src/utils/errors/webhooks.ts @@ -1,4 +1,4 @@ -import { WebhookErrorFragment } from "@saleor/fragments/types/WebhookErrorFragment"; +import { WebhookErrorFragment } from "@saleor/graphql"; import { IntlShape } from "react-intl"; import { getCommonFormFieldErrorMessage } from "./common"; diff --git a/src/utils/handlers/attributeValueSearchHandler.ts b/src/utils/handlers/attributeValueSearchHandler.ts index a37ca3bd1..7423ca6d0 100644 --- a/src/utils/handlers/attributeValueSearchHandler.ts +++ b/src/utils/handlers/attributeValueSearchHandler.ts @@ -1,8 +1,8 @@ -import { UseSearchResult } from "@saleor/hooks/makeSearch"; import { - SearchAttributeValues, - SearchAttributeValuesVariables -} from "@saleor/searches/types/SearchAttributeValues"; + SearchAttributeValuesQuery, + SearchAttributeValuesQueryVariables +} from "@saleor/graphql"; +import { UseSearchResult } from "@saleor/hooks/makeSearch"; import useAttributeValueSearch from "@saleor/searches/useAttributeValueSearch"; import { useEffect, useState } from "react"; @@ -13,7 +13,10 @@ interface AttributeValueSearchHandlerState { export interface UseAttributeValueSearchHandler extends Omit< - UseSearchResult, + UseSearchResult< + SearchAttributeValuesQuery, + SearchAttributeValuesQueryVariables + >, "search" > { reset: () => void; @@ -21,7 +24,7 @@ export interface UseAttributeValueSearchHandler } function useAttributeValueSearchHandler( - variables: SearchAttributeValuesVariables + variables: SearchAttributeValuesQueryVariables ): UseAttributeValueSearchHandler { const [state, setState] = useState({ id: null, diff --git a/src/utils/handlers/filterMetadataArray.ts b/src/utils/handlers/filterMetadataArray.ts index a26b88253..1f5093c09 100644 --- a/src/utils/handlers/filterMetadataArray.ts +++ b/src/utils/handlers/filterMetadataArray.ts @@ -1,4 +1,4 @@ -import { MetadataInput } from "@saleor/types/globalTypes"; +import { MetadataInput } from "@saleor/graphql"; export const filterMetadataArray = (metadataInputs: MetadataInput[]) => metadataInputs.filter(input => !!input.key); diff --git a/src/utils/handlers/metadataCreateHandler.ts b/src/utils/handlers/metadataCreateHandler.ts index ac01267c8..793acf9c0 100644 --- a/src/utils/handlers/metadataCreateHandler.ts +++ b/src/utils/handlers/metadataCreateHandler.ts @@ -1,14 +1,9 @@ -import { MutationFunction } from "@apollo/client"; import { MetadataFormData } from "@saleor/components/Metadata/types"; +import { + UpdateMetadataMutationFn, + UpdatePrivateMetadataMutationFn +} from "@saleor/graphql"; -import { - UpdateMetadata, - UpdateMetadataVariables -} from "../metadata/types/UpdateMetadata"; -import { - UpdatePrivateMetadata, - UpdatePrivateMetadataVariables -} from "../metadata/types/UpdatePrivateMetadata"; import { filterMetadataArray } from "./filterMetadataArray"; export interface CreateMetadataHandlerFunctionResult { @@ -18,11 +13,8 @@ export interface CreateMetadataHandlerFunctionResult { function createMetadataCreateHandler( create: (data: T) => Promise>, - setMetadata: MutationFunction, - setPrivateMetadata: MutationFunction< - UpdatePrivateMetadata, - UpdatePrivateMetadataVariables - > + setMetadata: UpdateMetadataMutationFn, + setPrivateMetadata: UpdatePrivateMetadataMutationFn ) { return async (data: T) => { const { id, errors } = await create(data); diff --git a/src/utils/handlers/metadataUpdateHandler.ts b/src/utils/handlers/metadataUpdateHandler.ts index d6abc121c..9340785b0 100644 --- a/src/utils/handlers/metadataUpdateHandler.ts +++ b/src/utils/handlers/metadataUpdateHandler.ts @@ -1,18 +1,16 @@ import { FetchResult } from "@apollo/client"; import { MetadataFormData } from "@saleor/components/Metadata/types"; -import { MetadataErrorFragment } from "@saleor/fragments/types/MetadataErrorFragment"; +import { + MetadataErrorFragment, + MetadataInput, + UpdateMetadataMutation, + UpdateMetadataMutationVariables, + UpdatePrivateMetadataMutation, + UpdatePrivateMetadataMutationVariables +} from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; -import { MetadataInput } from "@saleor/types/globalTypes"; import { arrayDiff } from "@saleor/utils/arrays"; -import { - UpdateMetadata, - UpdateMetadataVariables -} from "../metadata/types/UpdateMetadata"; -import { - UpdatePrivateMetadata, - UpdatePrivateMetadataVariables -} from "../metadata/types/UpdatePrivateMetadata"; import { filterMetadataArray } from "./filterMetadataArray"; import { areMetadataArraysEqual } from "./metadataUpdateHelpers"; @@ -26,11 +24,11 @@ function createMetadataUpdateHandler( initial: ObjectWithMetadata, update: (data: TData) => SubmitPromise, updateMetadata: ( - variables: UpdateMetadataVariables - ) => Promise>, + variables: UpdateMetadataMutationVariables + ) => Promise>, updatePrivateMetadata: ( - variables: UpdatePrivateMetadataVariables - ) => Promise> + variables: UpdatePrivateMetadataMutationVariables + ) => Promise> ) { return async ( data: TData diff --git a/src/utils/limits.ts b/src/utils/limits.ts index 1a1631e26..43e5ade35 100644 --- a/src/utils/limits.ts +++ b/src/utils/limits.ts @@ -1,8 +1,7 @@ -import { RefreshLimits_shop_limits } from "@saleor/components/Shop/types/RefreshLimits"; -import { LimitInfoFragment } from "@saleor/fragments/types/LimitInfoFragment"; +import { LimitInfoFragment, RefreshLimitsQuery } from "@saleor/graphql"; export function hasLimits( - limits: RefreshLimits_shop_limits, + limits: RefreshLimitsQuery["shop"]["limits"], key: keyof LimitInfoFragment ): boolean { if (limits === undefined) { @@ -13,7 +12,7 @@ export function hasLimits( } export function isLimitReached( - limits: RefreshLimits_shop_limits, + limits: RefreshLimitsQuery["shop"]["limits"], key: keyof LimitInfoFragment ): boolean { if (!hasLimits(limits, key)) { diff --git a/src/utils/maps.ts b/src/utils/maps.ts index 6e5dfd51c..99b7574bb 100644 --- a/src/utils/maps.ts +++ b/src/utils/maps.ts @@ -1,14 +1,16 @@ import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; -import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo"; import { ChoiceValue, SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompleteSelectField"; -import { MetadataItem } from "@saleor/fragments/types/MetadataItem"; +import { + CountryWithCodeFragment, + MetadataInput, + MetadataItemFragment, + SearchPagesQuery +} from "@saleor/graphql"; import { getFullName } from "@saleor/misc"; -import { SearchPages_search_edges_node } from "@saleor/searches/types/SearchPages"; -import { Node, SlugNode, TagNode } from "@saleor/types"; -import { MetadataInput } from "@saleor/types/globalTypes"; +import { Node, RelayToFlat, SlugNode, TagNode } from "@saleor/types"; interface Edge { node: T; @@ -24,19 +26,21 @@ export function mapEdgesToItems( } export function mapCountriesToCountriesCodes( - countries?: ShopInfo_shop_countries[] + countries?: CountryWithCodeFragment[] ) { return countries?.map(country => country.code); } -export function mapCountriesToChoices(countries: ShopInfo_shop_countries[]) { +export function mapCountriesToChoices(countries: CountryWithCodeFragment[]) { return countries.map(country => ({ label: country.country, value: country.code })); } -export function mapPagesToChoices(pages: SearchPages_search_edges_node[]) { +export function mapPagesToChoices( + pages: RelayToFlat +) { return pages.map(page => ({ label: page.title, value: page.id @@ -79,7 +83,9 @@ export function mapTagNodeToChoice( return mapNodeToChoice(nodes, node => node.tag); } -export function mapMetadataItemToInput(item: MetadataItem): MetadataInput { +export function mapMetadataItemToInput( + item: MetadataItemFragment +): MetadataInput { return { key: item.key, value: item.value diff --git a/src/utils/metadata/mutations.ts b/src/utils/metadata/mutations.ts new file mode 100644 index 000000000..23a7ded45 --- /dev/null +++ b/src/utils/metadata/mutations.ts @@ -0,0 +1,63 @@ +import { gql } from "@apollo/client"; + +export const updateMetadata = gql` + mutation UpdateMetadata( + $id: ID! + $input: [MetadataInput!]! + $keysToDelete: [String!]! + ) { + updateMetadata(id: $id, input: $input) { + errors { + ...MetadataError + } + item { + ...Metadata + ... on Node { + id + } + } + } + deleteMetadata(id: $id, keys: $keysToDelete) { + errors { + ...MetadataError + } + item { + ...Metadata + ... on Node { + id + } + } + } + } +`; + +export const updatePrivateMetadata = gql` + mutation UpdatePrivateMetadata( + $id: ID! + $input: [MetadataInput!]! + $keysToDelete: [String!]! + ) { + updatePrivateMetadata(id: $id, input: $input) { + errors { + ...MetadataError + } + item { + ...Metadata + ... on Node { + id + } + } + } + deletePrivateMetadata(id: $id, keys: $keysToDelete) { + errors { + ...MetadataError + } + item { + ...Metadata + ... on Node { + id + } + } + } + } +`; diff --git a/src/utils/metadata/types/UpdateMetadata.ts b/src/utils/metadata/types/UpdateMetadata.ts deleted file mode 100644 index 572c74435..000000000 --- a/src/utils/metadata/types/UpdateMetadata.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { MetadataInput, MetadataErrorCode } from "./../../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: UpdateMetadata -// ==================================================== - -export interface UpdateMetadata_updateMetadata_errors { - __typename: "MetadataError"; - code: MetadataErrorCode; - field: string | null; - message: string | null; -} - -export interface UpdateMetadata_updateMetadata { - __typename: "UpdateMetadata"; - errors: UpdateMetadata_updateMetadata_errors[]; -} - -export interface UpdateMetadata_deleteMetadata_errors { - __typename: "MetadataError"; - code: MetadataErrorCode; - field: string | null; - message: string | null; -} - -export interface UpdateMetadata_deleteMetadata_item_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface UpdateMetadata_deleteMetadata_item_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface UpdateMetadata_deleteMetadata_item { - __typename: "App" | "Attribute" | "Category" | "Checkout" | "Collection" | "DigitalContent" | "Fulfillment" | "GiftCard" | "Invoice" | "Menu" | "MenuItem" | "Order" | "Page" | "PageType" | "Payment" | "Product" | "ProductType" | "ProductVariant" | "Sale" | "ShippingMethod" | "ShippingMethodType" | "ShippingZone" | "User" | "Voucher" | "Warehouse"; - metadata: (UpdateMetadata_deleteMetadata_item_metadata | null)[]; - privateMetadata: (UpdateMetadata_deleteMetadata_item_privateMetadata | null)[]; - id: string; -} - -export interface UpdateMetadata_deleteMetadata { - __typename: "DeleteMetadata"; - errors: UpdateMetadata_deleteMetadata_errors[]; - item: UpdateMetadata_deleteMetadata_item | null; -} - -export interface UpdateMetadata { - updateMetadata: UpdateMetadata_updateMetadata | null; - deleteMetadata: UpdateMetadata_deleteMetadata | null; -} - -export interface UpdateMetadataVariables { - id: string; - input: MetadataInput[]; - keysToDelete: string[]; -} diff --git a/src/utils/metadata/types/UpdatePrivateMetadata.ts b/src/utils/metadata/types/UpdatePrivateMetadata.ts deleted file mode 100644 index 7e5d04234..000000000 --- a/src/utils/metadata/types/UpdatePrivateMetadata.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { MetadataInput, MetadataErrorCode } from "./../../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: UpdatePrivateMetadata -// ==================================================== - -export interface UpdatePrivateMetadata_updatePrivateMetadata_errors { - __typename: "MetadataError"; - code: MetadataErrorCode; - field: string | null; - message: string | null; -} - -export interface UpdatePrivateMetadata_updatePrivateMetadata { - __typename: "UpdatePrivateMetadata"; - errors: UpdatePrivateMetadata_updatePrivateMetadata_errors[]; -} - -export interface UpdatePrivateMetadata_deletePrivateMetadata_errors { - __typename: "MetadataError"; - code: MetadataErrorCode; - field: string | null; - message: string | null; -} - -export interface UpdatePrivateMetadata_deletePrivateMetadata_item_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface UpdatePrivateMetadata_deletePrivateMetadata_item_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface UpdatePrivateMetadata_deletePrivateMetadata_item { - __typename: "App" | "Attribute" | "Category" | "Checkout" | "Collection" | "DigitalContent" | "Fulfillment" | "GiftCard" | "Invoice" | "Menu" | "MenuItem" | "Order" | "Page" | "PageType" | "Payment" | "Product" | "ProductType" | "ProductVariant" | "Sale" | "ShippingMethod" | "ShippingMethodType" | "ShippingZone" | "User" | "Voucher" | "Warehouse"; - metadata: (UpdatePrivateMetadata_deletePrivateMetadata_item_metadata | null)[]; - privateMetadata: (UpdatePrivateMetadata_deletePrivateMetadata_item_privateMetadata | null)[]; - id: string; -} - -export interface UpdatePrivateMetadata_deletePrivateMetadata { - __typename: "DeletePrivateMetadata"; - errors: UpdatePrivateMetadata_deletePrivateMetadata_errors[]; - item: UpdatePrivateMetadata_deletePrivateMetadata_item | null; -} - -export interface UpdatePrivateMetadata { - updatePrivateMetadata: UpdatePrivateMetadata_updatePrivateMetadata | null; - deletePrivateMetadata: UpdatePrivateMetadata_deletePrivateMetadata | null; -} - -export interface UpdatePrivateMetadataVariables { - id: string; - input: MetadataInput[]; - keysToDelete: string[]; -} diff --git a/src/utils/metadata/updateMetadata.ts b/src/utils/metadata/updateMetadata.ts deleted file mode 100644 index 8de1a03aa..000000000 --- a/src/utils/metadata/updateMetadata.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { gql } from "@apollo/client"; -import { metadataErrorFragment } from "@saleor/fragments/errors"; -import makeMutation from "@saleor/hooks/makeMutation"; - -import { metadataFragment } from "../../fragments/metadata"; -import { - UpdateMetadata, - UpdateMetadataVariables -} from "./types/UpdateMetadata"; -import { - UpdatePrivateMetadata, - UpdatePrivateMetadataVariables -} from "./types/UpdatePrivateMetadata"; - -const updateMetadata = gql` - ${metadataFragment} - ${metadataErrorFragment} - mutation UpdateMetadata( - $id: ID! - $input: [MetadataInput!]! - $keysToDelete: [String!]! - ) { - updateMetadata(id: $id, input: $input) { - errors { - ...MetadataErrorFragment - } - } - deleteMetadata(id: $id, keys: $keysToDelete) { - errors { - ...MetadataErrorFragment - } - item { - ...MetadataFragment - ... on Node { - id - } - } - } - } -`; -export const useMetadataUpdate = makeMutation< - UpdateMetadata, - UpdateMetadataVariables ->(updateMetadata); - -const updatePrivateMetadata = gql` - ${metadataFragment} - ${metadataErrorFragment} - mutation UpdatePrivateMetadata( - $id: ID! - $input: [MetadataInput!]! - $keysToDelete: [String!]! - ) { - updatePrivateMetadata(id: $id, input: $input) { - errors { - ...MetadataErrorFragment - } - } - deletePrivateMetadata(id: $id, keys: $keysToDelete) { - errors { - ...MetadataErrorFragment - } - item { - ...MetadataFragment - ... on Node { - id - } - } - } - } -`; -export const usePrivateMetadataUpdate = makeMutation< - UpdatePrivateMetadata, - UpdatePrivateMetadataVariables ->(updatePrivateMetadata); diff --git a/src/utils/sort.ts b/src/utils/sort.ts index c35a3d75b..caa060292 100644 --- a/src/utils/sort.ts +++ b/src/utils/sort.ts @@ -1,8 +1,8 @@ +import { OrderDirection } from "@saleor/graphql"; import { findValueInEnum, parseBoolean } from "@saleor/misc"; import { TableCellHeaderArrowDirection } from "../components/TableCellHeader"; import { Sort } from "../types"; -import { OrderDirection } from "../types/globalTypes"; export function getSortUrlVariables( field: TSortKey, diff --git a/src/warehouses/components/WarehouseCreatePage/WarehouseCreatePage.stories.tsx b/src/warehouses/components/WarehouseCreatePage/WarehouseCreatePage.stories.tsx index 94662be89..791b0542f 100644 --- a/src/warehouses/components/WarehouseCreatePage/WarehouseCreatePage.stories.tsx +++ b/src/warehouses/components/WarehouseCreatePage/WarehouseCreatePage.stories.tsx @@ -1,6 +1,6 @@ import { countries } from "@saleor/fixtures"; +import { WarehouseErrorCode } from "@saleor/graphql"; import Decorator from "@saleor/storybook/Decorator"; -import { WarehouseErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/warehouses/components/WarehouseCreatePage/WarehouseCreatePage.tsx b/src/warehouses/components/WarehouseCreatePage/WarehouseCreatePage.tsx index 9bacd3770..26970823e 100644 --- a/src/warehouses/components/WarehouseCreatePage/WarehouseCreatePage.tsx +++ b/src/warehouses/components/WarehouseCreatePage/WarehouseCreatePage.tsx @@ -5,15 +5,16 @@ import Form from "@saleor/components/Form"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; -import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo"; import { AddressTypeInput } from "@saleor/customers/types"; -import { WarehouseErrorFragment } from "@saleor/fragments/types/WarehouseErrorFragment"; +import { + CountryWithCodeFragment, + WarehouseErrorFragment +} from "@saleor/graphql"; import useAddressValidation from "@saleor/hooks/useAddressValidation"; import { SubmitPromise } from "@saleor/hooks/useForm"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; import { mapCountriesToChoices } from "@saleor/utils/maps"; import React from "react"; @@ -25,7 +26,7 @@ export interface WarehouseCreatePageFormData extends AddressTypeInput { name: string; } export interface WarehouseCreatePageProps { - countries: ShopInfo_shop_countries[]; + countries: CountryWithCodeFragment[]; disabled: boolean; errors: WarehouseErrorFragment[]; saveButtonBarState: ConfirmButtonTransitionState; diff --git a/src/warehouses/components/WarehouseDetailsPage/WarehouseDetailsPage.stories.tsx b/src/warehouses/components/WarehouseDetailsPage/WarehouseDetailsPage.stories.tsx index 26f2da4f3..531a5e78c 100644 --- a/src/warehouses/components/WarehouseDetailsPage/WarehouseDetailsPage.stories.tsx +++ b/src/warehouses/components/WarehouseDetailsPage/WarehouseDetailsPage.stories.tsx @@ -1,6 +1,6 @@ import { countries } from "@saleor/fixtures"; +import { WarehouseErrorCode } from "@saleor/graphql"; import Decorator from "@saleor/storybook/Decorator"; -import { WarehouseErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/warehouses/components/WarehouseDetailsPage/WarehouseDetailsPage.tsx b/src/warehouses/components/WarehouseDetailsPage/WarehouseDetailsPage.tsx index 52612ccd3..457c56452 100644 --- a/src/warehouses/components/WarehouseDetailsPage/WarehouseDetailsPage.tsx +++ b/src/warehouses/components/WarehouseDetailsPage/WarehouseDetailsPage.tsx @@ -5,21 +5,20 @@ import Form from "@saleor/components/Form"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; -import { ShopInfo_shop_countries } from "@saleor/components/Shop/types/ShopInfo"; import { AddressTypeInput } from "@saleor/customers/types"; -import { WarehouseDetailsFragment } from "@saleor/fragments/types/WarehouseDetailsFragment"; -import { WarehouseErrorFragment } from "@saleor/fragments/types/WarehouseErrorFragment"; +import { + CountryCode, + CountryWithCodeFragment, + WarehouseClickAndCollectOptionEnum, + WarehouseDetailsFragment, + WarehouseErrorFragment +} from "@saleor/graphql"; import useAddressValidation from "@saleor/hooks/useAddressValidation"; import { SubmitPromise } from "@saleor/hooks/useForm"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; import { sectionNames } from "@saleor/intl"; -import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; -import { Backlink } from "@saleor/macaw-ui"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { findValueInEnum, maybe } from "@saleor/misc"; -import { - CountryCode, - WarehouseClickAndCollectOptionEnum -} from "@saleor/types/globalTypes"; import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler"; import { mapCountriesToChoices, mapEdgesToItems } from "@saleor/utils/maps"; import React from "react"; @@ -34,7 +33,7 @@ export interface WarehouseDetailsPageFormData extends AddressTypeInput { clickAndCollectOption: WarehouseClickAndCollectOptionEnum; } export interface WarehouseDetailsPageProps { - countries: ShopInfo_shop_countries[]; + countries: CountryWithCodeFragment[]; disabled: boolean; errors: WarehouseErrorFragment[]; saveButtonBarState: ConfirmButtonTransitionState; diff --git a/src/warehouses/components/WarehouseInfo/WarehouseInfo.tsx b/src/warehouses/components/WarehouseInfo/WarehouseInfo.tsx index 40ddb1303..35b4f0b5e 100644 --- a/src/warehouses/components/WarehouseInfo/WarehouseInfo.tsx +++ b/src/warehouses/components/WarehouseInfo/WarehouseInfo.tsx @@ -1,6 +1,6 @@ import { Card, CardContent, TextField } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; -import { WarehouseErrorFragment } from "@saleor/fragments/types/WarehouseErrorFragment"; +import { WarehouseErrorFragment } from "@saleor/graphql"; import { FormChange } from "@saleor/hooks/useForm"; import { commonMessages } from "@saleor/intl"; import { getFormErrors } from "@saleor/utils/errors"; diff --git a/src/warehouses/components/WarehouseList/WarehouseList.tsx b/src/warehouses/components/WarehouseList/WarehouseList.tsx index 9dea25330..7f854db32 100644 --- a/src/warehouses/components/WarehouseList/WarehouseList.tsx +++ b/src/warehouses/components/WarehouseList/WarehouseList.tsx @@ -10,7 +10,7 @@ import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import TableCellHeader from "@saleor/components/TableCellHeader"; import TablePagination from "@saleor/components/TablePagination"; -import { WarehouseWithShippingFragment } from "@saleor/fragments/types/WarehouseWithShippingFragment"; +import { WarehouseWithShippingFragment } from "@saleor/graphql"; import { DeleteIcon, IconButton, makeStyles } from "@saleor/macaw-ui"; import { maybe, renderCollection, stopPropagation } from "@saleor/misc"; import { ListProps, SortPage } from "@saleor/types"; diff --git a/src/warehouses/components/WarehouseListPage/WarehouseListPage.tsx b/src/warehouses/components/WarehouseListPage/WarehouseListPage.tsx index d1fc6125f..b9c405b69 100644 --- a/src/warehouses/components/WarehouseListPage/WarehouseListPage.tsx +++ b/src/warehouses/components/WarehouseListPage/WarehouseListPage.tsx @@ -3,8 +3,10 @@ import Container from "@saleor/components/Container"; import LimitReachedAlert from "@saleor/components/LimitReachedAlert"; import PageHeader from "@saleor/components/PageHeader"; import SearchBar from "@saleor/components/SearchBar"; -import { RefreshLimits_shop_limits } from "@saleor/components/Shop/types/RefreshLimits"; -import { WarehouseWithShippingFragment } from "@saleor/fragments/types/WarehouseWithShippingFragment"; +import { + RefreshLimitsQuery, + WarehouseWithShippingFragment +} from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { Backlink, Button } from "@saleor/macaw-ui"; import { @@ -25,7 +27,7 @@ export interface WarehouseListPageProps SearchPageProps, SortPage, TabPageProps { - limits: RefreshLimits_shop_limits; + limits: RefreshLimitsQuery["shop"]["limits"]; warehouses: WarehouseWithShippingFragment[]; onBack: () => void; onRemove: (id: string) => void; diff --git a/src/warehouses/components/WarehouseSettings/WarehouseSettings.tsx b/src/warehouses/components/WarehouseSettings/WarehouseSettings.tsx index 87523038c..fe5b8a557 100644 --- a/src/warehouses/components/WarehouseSettings/WarehouseSettings.tsx +++ b/src/warehouses/components/WarehouseSettings/WarehouseSettings.tsx @@ -6,18 +6,21 @@ import Link from "@saleor/components/Link"; import PreviewPill from "@saleor/components/PreviewPill"; import { RadioGroupField } from "@saleor/components/RadioGroupField"; import Skeleton from "@saleor/components/Skeleton"; +import { + WarehouseClickAndCollectOptionEnum, + WarehouseWithShippingFragment +} from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; import { renderCollection } from "@saleor/misc"; -import { WarehouseDetails_warehouse_shippingZones_edges_node } from "@saleor/warehouses/types/WarehouseDetails"; +import { RelayToFlat } from "@saleor/types"; import React from "react"; import { FormattedMessage } from "react-intl"; -import { WarehouseClickAndCollectOptionEnum } from "./../../../types/globalTypes"; import { WarehouseDetailsPageFormData } from "./../WarehouseDetailsPage"; import messages from "./messages"; export interface WarehouseSettingsProps { - zones: WarehouseDetails_warehouse_shippingZones_edges_node[]; + zones: RelayToFlat; disabled: boolean; data: WarehouseDetailsPageFormData; onShippingZoneClick: (id: string) => void; diff --git a/src/warehouses/fixtures.ts b/src/warehouses/fixtures.ts index d9e04d482..c4d871300 100644 --- a/src/warehouses/fixtures.ts +++ b/src/warehouses/fixtures.ts @@ -1,11 +1,13 @@ import { address } from "@saleor/fixtures"; +import { + WarehouseClickAndCollectOptionEnum, + WarehouseDetailsFragment, + WarehouseWithShippingFragment +} from "@saleor/graphql"; import { shippingZones } from "../shipping/fixtures"; -import { WarehouseClickAndCollectOptionEnum } from "./../types/globalTypes"; -import { WarehouseDetails_warehouse } from "./types/WarehouseDetails"; -import { WarehouseList_warehouses_edges_node } from "./types/WarehouseList"; -export const warehouseList: WarehouseList_warehouses_edges_node[] = [ +export const warehouseList: WarehouseWithShippingFragment[] = [ { __typename: "Warehouse", id: "V2FyZWhvdXNlOmEzMThmMGZlLTcwMmYtNDNjYy1hYmFjLWZmZmMzN2Y3ZTliYw==", @@ -56,14 +58,14 @@ export const warehouseList: WarehouseList_warehouses_edges_node[] = [ } ]; -export const warehouse: WarehouseDetails_warehouse = { +export const warehouse: WarehouseDetailsFragment = { ...warehouseList[0], isPrivate: true, clickAndCollectOption: WarehouseClickAndCollectOptionEnum.DISABLED, address }; -export const warehouseForPickup: WarehouseDetails_warehouse = { +export const warehouseForPickup: WarehouseDetailsFragment = { ...warehouseList[0], isPrivate: false, clickAndCollectOption: WarehouseClickAndCollectOptionEnum.ALL, diff --git a/src/warehouses/mutations.ts b/src/warehouses/mutations.ts index 042df199b..3376eb6bc 100644 --- a/src/warehouses/mutations.ts +++ b/src/warehouses/mutations.ts @@ -1,70 +1,37 @@ import { gql } from "@apollo/client"; -import { warehouseErrorFragment } from "@saleor/fragments/errors"; -import { warehouseDetailsFragment } from "@saleor/fragments/warehouses"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { - WarehouseCreate, - WarehouseCreateVariables -} from "./types/WarehouseCreate"; -import { - WarehouseDelete, - WarehouseDeleteVariables -} from "./types/WarehouseDelete"; -import { - WarehouseUpdate, - WarehouseUpdateVariables -} from "./types/WarehouseUpdate"; - -const deleteWarehouse = gql` - ${warehouseErrorFragment} +export const deleteWarehouse = gql` mutation WarehouseDelete($id: ID!) { deleteWarehouse(id: $id) { errors { - ...WarehouseErrorFragment + ...WarehouseError } } } `; -export const useWarehouseDelete = makeMutation< - WarehouseDelete, - WarehouseDeleteVariables ->(deleteWarehouse); -const createWarehouse = gql` - ${warehouseDetailsFragment} - ${warehouseErrorFragment} +export const createWarehouse = gql` mutation WarehouseCreate($input: WarehouseCreateInput!) { createWarehouse(input: $input) { errors { - ...WarehouseErrorFragment + ...WarehouseError } warehouse { - ...WarehouseDetailsFragment + ...WarehouseDetails } } } `; -export const useWarehouseCreate = makeMutation< - WarehouseCreate, - WarehouseCreateVariables ->(createWarehouse); -const updateWarehouse = gql` - ${warehouseDetailsFragment} - ${warehouseErrorFragment} +export const updateWarehouse = gql` mutation WarehouseUpdate($id: ID!, $input: WarehouseUpdateInput!) { updateWarehouse(id: $id, input: $input) { errors { - ...WarehouseErrorFragment + ...WarehouseError } warehouse { - ...WarehouseDetailsFragment + ...WarehouseDetails } } } `; -export const useWarehouseUpdate = makeMutation< - WarehouseUpdate, - WarehouseUpdateVariables ->(updateWarehouse); diff --git a/src/warehouses/queries.ts b/src/warehouses/queries.ts index cd6862e6e..3829b86c7 100644 --- a/src/warehouses/queries.ts +++ b/src/warehouses/queries.ts @@ -1,20 +1,6 @@ import { gql } from "@apollo/client"; -import { pageInfoFragment } from "@saleor/fragments/pageInfo"; -import { - warehouseDetailsFragment, - warehouseWithShippingFragment -} from "@saleor/fragments/warehouses"; -import makeQuery from "@saleor/hooks/makeQuery"; -import { - WarehouseDetails, - WarehouseDetailsVariables -} from "./types/WarehouseDetails"; -import { WarehouseList, WarehouseListVariables } from "./types/WarehouseList"; - -const warehouseList = gql` - ${warehouseWithShippingFragment} - ${pageInfoFragment} +export const warehouseList = gql` query WarehouseList( $first: Int $after: String @@ -33,29 +19,20 @@ const warehouseList = gql` ) { edges { node { - ...WarehouseWithShippingFragment + ...WarehouseWithShipping } } pageInfo { - ...PageInfoFragment + ...PageInfo } } } `; -export const useWarehouseList = makeQuery< - WarehouseList, - WarehouseListVariables ->(warehouseList); -const warehouseDetails = gql` - ${warehouseDetailsFragment} +export const warehouseDetails = gql` query WarehouseDetails($id: ID!) { warehouse(id: $id) { - ...WarehouseDetailsFragment + ...WarehouseDetails } } `; -export const useWarehouseDetails = makeQuery< - WarehouseDetails, - WarehouseDetailsVariables ->(warehouseDetails); diff --git a/src/warehouses/types/WarehouseCreate.ts b/src/warehouses/types/WarehouseCreate.ts deleted file mode 100644 index 291a68390..000000000 --- a/src/warehouses/types/WarehouseCreate.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { WarehouseCreateInput, WarehouseErrorCode, WarehouseClickAndCollectOptionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: WarehouseCreate -// ==================================================== - -export interface WarehouseCreate_createWarehouse_errors { - __typename: "WarehouseError"; - code: WarehouseErrorCode; - field: string | null; - message: string | null; -} - -export interface WarehouseCreate_createWarehouse_warehouse_shippingZones_edges_node { - __typename: "ShippingZone"; - id: string; - name: string; -} - -export interface WarehouseCreate_createWarehouse_warehouse_shippingZones_edges { - __typename: "ShippingZoneCountableEdge"; - node: WarehouseCreate_createWarehouse_warehouse_shippingZones_edges_node; -} - -export interface WarehouseCreate_createWarehouse_warehouse_shippingZones { - __typename: "ShippingZoneCountableConnection"; - edges: WarehouseCreate_createWarehouse_warehouse_shippingZones_edges[]; -} - -export interface WarehouseCreate_createWarehouse_warehouse_address_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface WarehouseCreate_createWarehouse_warehouse_address { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: WarehouseCreate_createWarehouse_warehouse_address_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface WarehouseCreate_createWarehouse_warehouse { - __typename: "Warehouse"; - isPrivate: boolean; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; - id: string; - name: string; - shippingZones: WarehouseCreate_createWarehouse_warehouse_shippingZones; - address: WarehouseCreate_createWarehouse_warehouse_address; -} - -export interface WarehouseCreate_createWarehouse { - __typename: "WarehouseCreate"; - errors: WarehouseCreate_createWarehouse_errors[]; - warehouse: WarehouseCreate_createWarehouse_warehouse | null; -} - -export interface WarehouseCreate { - createWarehouse: WarehouseCreate_createWarehouse | null; -} - -export interface WarehouseCreateVariables { - input: WarehouseCreateInput; -} diff --git a/src/warehouses/types/WarehouseDelete.ts b/src/warehouses/types/WarehouseDelete.ts deleted file mode 100644 index fd3c25638..000000000 --- a/src/warehouses/types/WarehouseDelete.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { WarehouseErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: WarehouseDelete -// ==================================================== - -export interface WarehouseDelete_deleteWarehouse_errors { - __typename: "WarehouseError"; - code: WarehouseErrorCode; - field: string | null; - message: string | null; -} - -export interface WarehouseDelete_deleteWarehouse { - __typename: "WarehouseDelete"; - errors: WarehouseDelete_deleteWarehouse_errors[]; -} - -export interface WarehouseDelete { - deleteWarehouse: WarehouseDelete_deleteWarehouse | null; -} - -export interface WarehouseDeleteVariables { - id: string; -} diff --git a/src/warehouses/types/WarehouseDetails.ts b/src/warehouses/types/WarehouseDetails.ts deleted file mode 100644 index 6d33c16b7..000000000 --- a/src/warehouses/types/WarehouseDetails.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { WarehouseClickAndCollectOptionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: WarehouseDetails -// ==================================================== - -export interface WarehouseDetails_warehouse_shippingZones_edges_node { - __typename: "ShippingZone"; - id: string; - name: string; -} - -export interface WarehouseDetails_warehouse_shippingZones_edges { - __typename: "ShippingZoneCountableEdge"; - node: WarehouseDetails_warehouse_shippingZones_edges_node; -} - -export interface WarehouseDetails_warehouse_shippingZones { - __typename: "ShippingZoneCountableConnection"; - edges: WarehouseDetails_warehouse_shippingZones_edges[]; -} - -export interface WarehouseDetails_warehouse_address_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface WarehouseDetails_warehouse_address { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: WarehouseDetails_warehouse_address_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface WarehouseDetails_warehouse { - __typename: "Warehouse"; - isPrivate: boolean; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; - id: string; - name: string; - shippingZones: WarehouseDetails_warehouse_shippingZones; - address: WarehouseDetails_warehouse_address; -} - -export interface WarehouseDetails { - warehouse: WarehouseDetails_warehouse | null; -} - -export interface WarehouseDetailsVariables { - id: string; -} diff --git a/src/warehouses/types/WarehouseList.ts b/src/warehouses/types/WarehouseList.ts deleted file mode 100644 index 55ce9ae80..000000000 --- a/src/warehouses/types/WarehouseList.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { WarehouseFilterInput, WarehouseSortingInput } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: WarehouseList -// ==================================================== - -export interface WarehouseList_warehouses_edges_node_shippingZones_edges_node { - __typename: "ShippingZone"; - id: string; - name: string; -} - -export interface WarehouseList_warehouses_edges_node_shippingZones_edges { - __typename: "ShippingZoneCountableEdge"; - node: WarehouseList_warehouses_edges_node_shippingZones_edges_node; -} - -export interface WarehouseList_warehouses_edges_node_shippingZones { - __typename: "ShippingZoneCountableConnection"; - edges: WarehouseList_warehouses_edges_node_shippingZones_edges[]; -} - -export interface WarehouseList_warehouses_edges_node { - __typename: "Warehouse"; - id: string; - name: string; - shippingZones: WarehouseList_warehouses_edges_node_shippingZones; -} - -export interface WarehouseList_warehouses_edges { - __typename: "WarehouseCountableEdge"; - node: WarehouseList_warehouses_edges_node; -} - -export interface WarehouseList_warehouses_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface WarehouseList_warehouses { - __typename: "WarehouseCountableConnection"; - edges: WarehouseList_warehouses_edges[]; - pageInfo: WarehouseList_warehouses_pageInfo; -} - -export interface WarehouseList { - warehouses: WarehouseList_warehouses | null; -} - -export interface WarehouseListVariables { - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; - filter?: WarehouseFilterInput | null; - sort?: WarehouseSortingInput | null; -} diff --git a/src/warehouses/types/WarehouseUpdate.ts b/src/warehouses/types/WarehouseUpdate.ts deleted file mode 100644 index 9656fa998..000000000 --- a/src/warehouses/types/WarehouseUpdate.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { WarehouseUpdateInput, WarehouseErrorCode, WarehouseClickAndCollectOptionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: WarehouseUpdate -// ==================================================== - -export interface WarehouseUpdate_updateWarehouse_errors { - __typename: "WarehouseError"; - code: WarehouseErrorCode; - field: string | null; - message: string | null; -} - -export interface WarehouseUpdate_updateWarehouse_warehouse_shippingZones_edges_node { - __typename: "ShippingZone"; - id: string; - name: string; -} - -export interface WarehouseUpdate_updateWarehouse_warehouse_shippingZones_edges { - __typename: "ShippingZoneCountableEdge"; - node: WarehouseUpdate_updateWarehouse_warehouse_shippingZones_edges_node; -} - -export interface WarehouseUpdate_updateWarehouse_warehouse_shippingZones { - __typename: "ShippingZoneCountableConnection"; - edges: WarehouseUpdate_updateWarehouse_warehouse_shippingZones_edges[]; -} - -export interface WarehouseUpdate_updateWarehouse_warehouse_address_country { - __typename: "CountryDisplay"; - code: string; - country: string; -} - -export interface WarehouseUpdate_updateWarehouse_warehouse_address { - __typename: "Address"; - city: string; - cityArea: string; - companyName: string; - country: WarehouseUpdate_updateWarehouse_warehouse_address_country; - countryArea: string; - firstName: string; - id: string; - lastName: string; - phone: string | null; - postalCode: string; - streetAddress1: string; - streetAddress2: string; -} - -export interface WarehouseUpdate_updateWarehouse_warehouse { - __typename: "Warehouse"; - isPrivate: boolean; - clickAndCollectOption: WarehouseClickAndCollectOptionEnum; - id: string; - name: string; - shippingZones: WarehouseUpdate_updateWarehouse_warehouse_shippingZones; - address: WarehouseUpdate_updateWarehouse_warehouse_address; -} - -export interface WarehouseUpdate_updateWarehouse { - __typename: "WarehouseUpdate"; - errors: WarehouseUpdate_updateWarehouse_errors[]; - warehouse: WarehouseUpdate_updateWarehouse_warehouse | null; -} - -export interface WarehouseUpdate { - updateWarehouse: WarehouseUpdate_updateWarehouse | null; -} - -export interface WarehouseUpdateVariables { - id: string; - input: WarehouseUpdateInput; -} diff --git a/src/warehouses/views/WarehouseCreate/WarehouseCreate.tsx b/src/warehouses/views/WarehouseCreate/WarehouseCreate.tsx index 249de7318..8607e407b 100644 --- a/src/warehouses/views/WarehouseCreate/WarehouseCreate.tsx +++ b/src/warehouses/views/WarehouseCreate/WarehouseCreate.tsx @@ -1,4 +1,5 @@ import { WindowTitle } from "@saleor/components/WindowTitle"; +import { CountryCode, useWarehouseCreateMutation } from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; @@ -8,11 +9,9 @@ import { findValueInEnum, getMutationStatus } from "@saleor/misc"; -import { CountryCode } from "@saleor/types/globalTypes"; import WarehouseCreatePage, { WarehouseCreatePageFormData } from "@saleor/warehouses/components/WarehouseCreatePage"; -import { useWarehouseCreate } from "@saleor/warehouses/mutations"; import { warehouseListUrl, warehouseUrl } from "@saleor/warehouses/urls"; import React from "react"; import { useIntl } from "react-intl"; @@ -22,7 +21,7 @@ const WarehouseCreate: React.FC = () => { const navigate = useNavigator(); const notify = useNotifier(); const shop = useShop(); - const [createWarehouse, createWarehouseOpts] = useWarehouseCreate({ + const [createWarehouse, createWarehouseOpts] = useWarehouseCreateMutation({ onCompleted: data => { if (data.createWarehouse.errors.length === 0) { navigate(warehouseUrl(data.createWarehouse.warehouse.id)); diff --git a/src/warehouses/views/WarehouseDetails/WarehouseDetails.tsx b/src/warehouses/views/WarehouseDetails/WarehouseDetails.tsx index 2b2fdffff..a040277a8 100644 --- a/src/warehouses/views/WarehouseDetails/WarehouseDetails.tsx +++ b/src/warehouses/views/WarehouseDetails/WarehouseDetails.tsx @@ -1,5 +1,11 @@ import NotFoundPage from "@saleor/components/NotFoundPage"; import { WindowTitle } from "@saleor/components/WindowTitle"; +import { + CountryCode, + useWarehouseDeleteMutation, + useWarehouseDetailsQuery, + useWarehouseUpdateMutation +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import useShop from "@saleor/hooks/useShop"; @@ -11,17 +17,11 @@ import { getStringOrPlaceholder } from "@saleor/misc"; import { shippingZoneUrl } from "@saleor/shipping/urls"; -import { CountryCode } from "@saleor/types/globalTypes"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import WarehouseDeleteDialog from "@saleor/warehouses/components/WarehouseDeleteDialog"; import WarehouseDetailsPage, { WarehouseDetailsPageFormData } from "@saleor/warehouses/components/WarehouseDetailsPage"; -import { - useWarehouseDelete, - useWarehouseUpdate -} from "@saleor/warehouses/mutations"; -import { useWarehouseDetails } from "@saleor/warehouses/queries"; import { warehouseListUrl, warehouseUrl, @@ -40,11 +40,11 @@ const WarehouseDetails: React.FC = ({ id, params }) => { const navigate = useNavigator(); const notify = useNotifier(); const shop = useShop(); - const { data, loading } = useWarehouseDetails({ + const { data, loading } = useWarehouseDetailsQuery({ displayLoader: true, variables: { id } }); - const [updateWarehouse, updateWarehouseOpts] = useWarehouseUpdate({ + const [updateWarehouse, updateWarehouseOpts] = useWarehouseUpdateMutation({ onCompleted: data => { if (data.updateWarehouse.errors.length === 0) { notify({ @@ -56,7 +56,7 @@ const WarehouseDetails: React.FC = ({ id, params }) => { }); const updateWarehouseTransitionState = getMutationStatus(updateWarehouseOpts); - const [deleteWarehouse, deleteWarehouseOpts] = useWarehouseDelete({ + const [deleteWarehouse, deleteWarehouseOpts] = useWarehouseDeleteMutation({ onCompleted: data => { if (data.deleteWarehouse.errors.length === 0) { notify({ diff --git a/src/warehouses/views/WarehouseList/WarehouseList.tsx b/src/warehouses/views/WarehouseList/WarehouseList.tsx index ff6eb262a..4d274f386 100644 --- a/src/warehouses/views/WarehouseList/WarehouseList.tsx +++ b/src/warehouses/views/WarehouseList/WarehouseList.tsx @@ -2,9 +2,13 @@ import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog"; import SaveFilterTabDialog, { SaveFilterTabDialogFormData } from "@saleor/components/SaveFilterTabDialog"; -import { useShopLimitsQuery } from "@saleor/components/Shop/query"; +import { useShopLimitsQuery } from "@saleor/components/Shop/queries"; import { WindowTitle } from "@saleor/components/WindowTitle"; import { configurationMenuUrl } from "@saleor/configuration"; +import { + useWarehouseDeleteMutation, + useWarehouseListQuery +} from "@saleor/graphql"; import useListSettings from "@saleor/hooks/useListSettings"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; @@ -23,8 +27,6 @@ import { mapEdgesToItems } from "@saleor/utils/maps"; import { getSortParams } from "@saleor/utils/sort"; import WarehouseDeleteDialog from "@saleor/warehouses/components/WarehouseDeleteDialog"; import WarehouseListPage from "@saleor/warehouses/components/WarehouseListPage"; -import { useWarehouseDelete } from "@saleor/warehouses/mutations"; -import { useWarehouseList } from "@saleor/warehouses/queries"; import { warehouseAddUrl, warehouseListUrl, @@ -69,7 +71,7 @@ const WarehouseList: React.FC = ({ params }) => { }), [params, settings.rowNumber] ); - const { data, loading, refetch } = useWarehouseList({ + const { data, loading, refetch } = useWarehouseListQuery({ displayLoader: true, variables: queryVariables }); @@ -78,7 +80,7 @@ const WarehouseList: React.FC = ({ params }) => { warehouses: true } }); - const [deleteWarehouse, deleteWarehouseOpts] = useWarehouseDelete({ + const [deleteWarehouse, deleteWarehouseOpts] = useWarehouseDeleteMutation({ onCompleted: data => { if (data.deleteWarehouse.errors.length === 0) { notify({ diff --git a/src/warehouses/views/WarehouseList/filters.ts b/src/warehouses/views/WarehouseList/filters.ts index 4ea04523f..a9c584134 100644 --- a/src/warehouses/views/WarehouseList/filters.ts +++ b/src/warehouses/views/WarehouseList/filters.ts @@ -1,4 +1,4 @@ -import { WarehouseFilterInput } from "@saleor/types/globalTypes"; +import { WarehouseFilterInput } from "@saleor/graphql"; import { createFilterTabUtils, diff --git a/src/warehouses/views/WarehouseList/sort.ts b/src/warehouses/views/WarehouseList/sort.ts index f346c6492..4acb5547c 100644 --- a/src/warehouses/views/WarehouseList/sort.ts +++ b/src/warehouses/views/WarehouseList/sort.ts @@ -1,4 +1,4 @@ -import { WarehouseSortField } from "@saleor/types/globalTypes"; +import { WarehouseSortField } from "@saleor/graphql"; import { createGetSortQueryVariables } from "@saleor/utils/sort"; import { WarehouseListUrlSortField } from "@saleor/warehouses/urls"; diff --git a/src/webhooks/components/WebhookDetailsPage/WebhookDetailsPage.stories.tsx b/src/webhooks/components/WebhookDetailsPage/WebhookDetailsPage.stories.tsx index eb9ae8e22..8889bc658 100644 --- a/src/webhooks/components/WebhookDetailsPage/WebhookDetailsPage.stories.tsx +++ b/src/webhooks/components/WebhookDetailsPage/WebhookDetailsPage.stories.tsx @@ -1,5 +1,5 @@ +import { WebhookErrorCode } from "@saleor/graphql"; import Decorator from "@saleor/storybook/Decorator"; -import { WebhookErrorCode } from "@saleor/types/globalTypes"; import { storiesOf } from "@storybook/react"; import React from "react"; diff --git a/src/webhooks/components/WebhookDetailsPage/WebhookDetailsPage.tsx b/src/webhooks/components/WebhookDetailsPage/WebhookDetailsPage.tsx index e5cefbf31..cb86166ee 100644 --- a/src/webhooks/components/WebhookDetailsPage/WebhookDetailsPage.tsx +++ b/src/webhooks/components/WebhookDetailsPage/WebhookDetailsPage.tsx @@ -4,12 +4,13 @@ import FormSpacer from "@saleor/components/FormSpacer"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; -import { WebhookErrorFragment } from "@saleor/fragments/types/WebhookErrorFragment"; -import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { + WebhookDetailsQuery, + WebhookErrorFragment, WebhookEventTypeAsyncEnum, WebhookEventTypeSyncEnum -} from "@saleor/types/globalTypes"; +} from "@saleor/graphql"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import WebhookEvents from "@saleor/webhooks/components/WebhookEvents"; import WebhookInfo from "@saleor/webhooks/components/WebhookInfo"; import WebhookStatus from "@saleor/webhooks/components/WebhookStatus"; @@ -17,7 +18,6 @@ import { createAsyncEventsSelectHandler, createSyncEventsSelectHandler } from "@saleor/webhooks/handlers"; -import { WebhookDetails_webhook } from "@saleor/webhooks/types/WebhookDetails"; import { mapAsyncEventsToChoices, mapSyncEventsToChoices @@ -40,7 +40,7 @@ export interface WebhookDetailsPageProps { appName: string; disabled: boolean; errors: WebhookErrorFragment[]; - webhook?: WebhookDetails_webhook; + webhook?: WebhookDetailsQuery["webhook"]; saveButtonBarState: ConfirmButtonTransitionState; onBack: () => void; onSubmit: (data: FormData) => void; diff --git a/src/webhooks/components/WebhookDetailsPage/messages.ts b/src/webhooks/components/WebhookDetailsPage/messages.ts index c2aa0b725..894b6c5bd 100644 --- a/src/webhooks/components/WebhookDetailsPage/messages.ts +++ b/src/webhooks/components/WebhookDetailsPage/messages.ts @@ -1,8 +1,7 @@ +import { WebhookDetailsQuery } from "@saleor/graphql"; import { getStringOrPlaceholder } from "@saleor/misc"; -import { WebhookDetails_webhook } from "@saleor/webhooks/types/WebhookDetails"; import { isUnnamed } from "@saleor/webhooks/utils"; -import { IntlShape } from "react-intl"; -import { defineMessages } from "react-intl"; +import { defineMessages, IntlShape } from "react-intl"; export const messages = defineMessages({ header: { @@ -21,7 +20,7 @@ export const messages = defineMessages({ export const getHeaderTitle = ( intl: IntlShape, - webhook?: WebhookDetails_webhook + webhook?: WebhookDetailsQuery["webhook"] ) => { if (!webhook) { return intl.formatMessage(messages.headerCreate); diff --git a/src/webhooks/components/WebhookEvents/WebhookEvents.tsx b/src/webhooks/components/WebhookEvents/WebhookEvents.tsx index 17551cb0c..389533367 100644 --- a/src/webhooks/components/WebhookEvents/WebhookEvents.tsx +++ b/src/webhooks/components/WebhookEvents/WebhookEvents.tsx @@ -5,18 +5,17 @@ import Hr from "@saleor/components/Hr"; import MultiAutocompleteSelectField, { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; -import { ChangeEvent } from "@saleor/hooks/useForm"; import { WebhookEventTypeAsyncEnum, WebhookEventTypeSyncEnum -} from "@saleor/types/globalTypes"; +} from "@saleor/graphql"; +import { ChangeEvent } from "@saleor/hooks/useForm"; import { mapAsyncEventsToChoices, mapSyncEventsToChoices } from "@saleor/webhooks/utils"; import React from "react"; -import { FormattedMessage } from "react-intl"; -import { useIntl } from "react-intl"; +import { FormattedMessage, useIntl } from "react-intl"; import { messages } from "./messages"; diff --git a/src/webhooks/components/WebhookInfo/WebhookInfo.tsx b/src/webhooks/components/WebhookInfo/WebhookInfo.tsx index dc11ac3b3..c593dbb64 100644 --- a/src/webhooks/components/WebhookInfo/WebhookInfo.tsx +++ b/src/webhooks/components/WebhookInfo/WebhookInfo.tsx @@ -2,7 +2,7 @@ import { Card, CardContent, TextField, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; import Hr from "@saleor/components/Hr"; -import { WebhookErrorFragment } from "@saleor/fragments/types/WebhookErrorFragment"; +import { WebhookErrorFragment } from "@saleor/graphql"; import { commonMessages } from "@saleor/intl"; import { getFormErrors } from "@saleor/utils/errors"; import getWebhookErrorMessage from "@saleor/utils/errors/webhooks"; diff --git a/src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.tsx b/src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.tsx index e72fb756c..0f829be13 100644 --- a/src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.tsx +++ b/src/webhooks/components/WebhooksDetailsPage/WebhooksDetailsPage.tsx @@ -4,13 +4,14 @@ import FormSpacer from "@saleor/components/FormSpacer"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import Savebar from "@saleor/components/Savebar"; -import { WebhookErrorFragment } from "@saleor/fragments/types/WebhookErrorFragment"; -import { SubmitPromise } from "@saleor/hooks/useForm"; -import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { + WebhookDetailsQuery, + WebhookErrorFragment, WebhookEventTypeAsyncEnum, WebhookEventTypeSyncEnum -} from "@saleor/types/globalTypes"; +} from "@saleor/graphql"; +import { SubmitPromise } from "@saleor/hooks/useForm"; +import { Backlink, ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import WebhookEvents from "@saleor/webhooks/components/WebhookEvents"; import WebhookInfo from "@saleor/webhooks/components/WebhookInfo"; import WebhookStatus from "@saleor/webhooks/components/WebhookStatus"; @@ -18,7 +19,6 @@ import { createAsyncEventsSelectHandler, createSyncEventsSelectHandler } from "@saleor/webhooks/handlers"; -import { WebhookDetails_webhook } from "@saleor/webhooks/types/WebhookDetails"; import { mapAsyncEventsToChoices, mapSyncEventsToChoices @@ -41,7 +41,7 @@ export interface WebhookDetailsPageProps { appName: string; disabled: boolean; errors: WebhookErrorFragment[]; - webhook?: WebhookDetails_webhook; + webhook?: WebhookDetailsQuery["webhook"]; saveButtonBarState: ConfirmButtonTransitionState; onBack: () => void; onSubmit: (data: WebhookFormData) => SubmitPromise; diff --git a/src/webhooks/components/WebhooksDetailsPage/messages.ts b/src/webhooks/components/WebhooksDetailsPage/messages.ts index c2aa0b725..894b6c5bd 100644 --- a/src/webhooks/components/WebhooksDetailsPage/messages.ts +++ b/src/webhooks/components/WebhooksDetailsPage/messages.ts @@ -1,8 +1,7 @@ +import { WebhookDetailsQuery } from "@saleor/graphql"; import { getStringOrPlaceholder } from "@saleor/misc"; -import { WebhookDetails_webhook } from "@saleor/webhooks/types/WebhookDetails"; import { isUnnamed } from "@saleor/webhooks/utils"; -import { IntlShape } from "react-intl"; -import { defineMessages } from "react-intl"; +import { defineMessages, IntlShape } from "react-intl"; export const messages = defineMessages({ header: { @@ -21,7 +20,7 @@ export const messages = defineMessages({ export const getHeaderTitle = ( intl: IntlShape, - webhook?: WebhookDetails_webhook + webhook?: WebhookDetailsQuery["webhook"] ) => { if (!webhook) { return intl.formatMessage(messages.headerCreate); diff --git a/src/webhooks/components/WebhooksList/WebhooksList.tsx b/src/webhooks/components/WebhooksList/WebhooksList.tsx index 65177df73..3a9d43d13 100644 --- a/src/webhooks/components/WebhooksList/WebhooksList.tsx +++ b/src/webhooks/components/WebhooksList/WebhooksList.tsx @@ -5,11 +5,11 @@ import { TableHead, TableRow } from "@material-ui/core"; -import { App_app_webhooks } from "@saleor/apps/types/App"; import CardTitle from "@saleor/components/CardTitle"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import TableCellHeader from "@saleor/components/TableCellHeader"; +import { AppQuery } from "@saleor/graphql"; import { Button, DeleteIcon, IconButton } from "@saleor/macaw-ui"; import { renderCollection, stopPropagation } from "@saleor/misc"; import { isUnnamed } from "@saleor/webhooks/utils"; @@ -20,7 +20,7 @@ import { FormattedMessage, useIntl } from "react-intl"; import { useStyles } from "./styles"; export interface WebhooksListProps { - webhooks: App_app_webhooks[]; + webhooks: AppQuery["app"]["webhooks"]; onRemove: (id: string) => void; onRowClick: (id: string) => () => void; onCreate?: () => void; diff --git a/src/webhooks/fixtures.ts b/src/webhooks/fixtures.ts index d810a97bd..f8adab22c 100644 --- a/src/webhooks/fixtures.ts +++ b/src/webhooks/fixtures.ts @@ -1,6 +1,6 @@ -import { WebhookDetails_webhook } from "./types/WebhookDetails"; +import { WebhookDetailsQuery } from "@saleor/graphql"; -export const webhook: WebhookDetails_webhook = { +export const webhook: WebhookDetailsQuery["webhook"] = { __typename: "Webhook", app: { __typename: "App", diff --git a/src/webhooks/handlers.ts b/src/webhooks/handlers.ts index 96fca3d70..53b05a6ad 100644 --- a/src/webhooks/handlers.ts +++ b/src/webhooks/handlers.ts @@ -1,8 +1,8 @@ -import { ChangeEvent } from "@saleor/hooks/useForm"; import { WebhookEventTypeAsyncEnum, WebhookEventTypeSyncEnum -} from "@saleor/types/globalTypes"; +} from "@saleor/graphql"; +import { ChangeEvent } from "@saleor/hooks/useForm"; import { toggle } from "@saleor/utils/lists"; import { filterSelectedAsyncEvents } from "./utils"; diff --git a/src/webhooks/mutations.ts b/src/webhooks/mutations.ts index fcb32051a..775b5bc12 100644 --- a/src/webhooks/mutations.ts +++ b/src/webhooks/mutations.ts @@ -1,64 +1,37 @@ import { gql } from "@apollo/client"; -import { webhookErrorFragment } from "@saleor/fragments/errors"; -import { webhooksDetailsFragment } from "@saleor/fragments/webhooks"; -import makeMutation from "@saleor/hooks/makeMutation"; -import { WebhookCreate, WebhookCreateVariables } from "./types/WebhookCreate"; -import { WebhookDelete, WebhookDeleteVariables } from "./types/WebhookDelete"; -import { WebhookUpdate, WebhookUpdateVariables } from "./types/WebhookUpdate"; - -const webhookCreate = gql` - ${webhooksDetailsFragment} - ${webhookErrorFragment} +export const webhookCreate = gql` mutation WebhookCreate($input: WebhookCreateInput!) { webhookCreate(input: $input) { errors { - ...WebhookErrorFragment + ...WebhookError } webhook { - ...WebhooksDetailsFragment + ...WebhooksDetails } } } `; -const webhookUpdate = gql` - ${webhooksDetailsFragment} - ${webhookErrorFragment} +export const webhookUpdate = gql` mutation WebhookUpdate($id: ID!, $input: WebhookUpdateInput!) { webhookUpdate(id: $id, input: $input) { errors { - ...WebhookErrorFragment + ...WebhookError } webhook { - ...WebhooksDetailsFragment + ...WebhooksDetails } } } `; -const webhookDelete = gql` - ${webhookErrorFragment} +export const webhookDelete = gql` mutation WebhookDelete($id: ID!) { webhookDelete(id: $id) { errors { - ...WebhookErrorFragment + ...WebhookError } } } `; - -export const useWebhookCreateMutation = makeMutation< - WebhookCreate, - WebhookCreateVariables ->(webhookCreate); - -export const useWebhookDeleteMutation = makeMutation< - WebhookDelete, - WebhookDeleteVariables ->(webhookDelete); - -export const useWebhookUpdateMutation = makeMutation< - WebhookUpdate, - WebhookUpdateVariables ->(webhookUpdate); diff --git a/src/webhooks/queries.ts b/src/webhooks/queries.ts index ebfcfeaf2..c0c95b3dd 100644 --- a/src/webhooks/queries.ts +++ b/src/webhooks/queries.ts @@ -1,17 +1,9 @@ import { gql } from "@apollo/client"; -import { webhooksFragment } from "@saleor/fragments/webhooks"; -import makeQuery from "@saleor/hooks/makeQuery"; -import { - WebhookDetails, - WebhookDetailsVariables -} from "./types/WebhookDetails"; - -const webhooksDetails = gql` - ${webhooksFragment} +export const webhooksDetails = gql` query WebhookDetails($id: ID!) { webhook(id: $id) { - ...WebhookFragment + ...Webhook syncEvents { eventType } @@ -23,8 +15,3 @@ const webhooksDetails = gql` } } `; - -export const useWebhooksDetailsQuery = makeQuery< - WebhookDetails, - WebhookDetailsVariables ->(webhooksDetails); diff --git a/src/webhooks/types/WebhookCreate.ts b/src/webhooks/types/WebhookCreate.ts deleted file mode 100644 index 6acd8a3e1..000000000 --- a/src/webhooks/types/WebhookCreate.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { WebhookCreateInput, WebhookErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: WebhookCreate -// ==================================================== - -export interface WebhookCreate_webhookCreate_errors { - __typename: "WebhookError"; - code: WebhookErrorCode; - field: string | null; - message: string | null; -} - -export interface WebhookCreate_webhookCreate_webhook_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface WebhookCreate_webhookCreate_webhook { - __typename: "Webhook"; - id: string; - name: string; - isActive: boolean; - app: WebhookCreate_webhookCreate_webhook_app; -} - -export interface WebhookCreate_webhookCreate { - __typename: "WebhookCreate"; - errors: WebhookCreate_webhookCreate_errors[]; - webhook: WebhookCreate_webhookCreate_webhook | null; -} - -export interface WebhookCreate { - webhookCreate: WebhookCreate_webhookCreate | null; -} - -export interface WebhookCreateVariables { - input: WebhookCreateInput; -} diff --git a/src/webhooks/types/WebhookDelete.ts b/src/webhooks/types/WebhookDelete.ts deleted file mode 100644 index 113d23494..000000000 --- a/src/webhooks/types/WebhookDelete.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { WebhookErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: WebhookDelete -// ==================================================== - -export interface WebhookDelete_webhookDelete_errors { - __typename: "WebhookError"; - code: WebhookErrorCode; - field: string | null; - message: string | null; -} - -export interface WebhookDelete_webhookDelete { - __typename: "WebhookDelete"; - errors: WebhookDelete_webhookDelete_errors[]; -} - -export interface WebhookDelete { - webhookDelete: WebhookDelete_webhookDelete | null; -} - -export interface WebhookDeleteVariables { - id: string; -} diff --git a/src/webhooks/types/WebhookDetails.ts b/src/webhooks/types/WebhookDetails.ts deleted file mode 100644 index 2ba9374e7..000000000 --- a/src/webhooks/types/WebhookDetails.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { WebhookEventTypeSyncEnum, WebhookEventTypeAsyncEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: WebhookDetails -// ==================================================== - -export interface WebhookDetails_webhook_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface WebhookDetails_webhook_syncEvents { - __typename: "WebhookEventSync"; - eventType: WebhookEventTypeSyncEnum; -} - -export interface WebhookDetails_webhook_asyncEvents { - __typename: "WebhookEventAsync"; - eventType: WebhookEventTypeAsyncEnum; -} - -export interface WebhookDetails_webhook { - __typename: "Webhook"; - id: string; - name: string; - isActive: boolean; - app: WebhookDetails_webhook_app; - syncEvents: WebhookDetails_webhook_syncEvents[]; - asyncEvents: WebhookDetails_webhook_asyncEvents[]; - secretKey: string | null; - targetUrl: string; -} - -export interface WebhookDetails { - webhook: WebhookDetails_webhook | null; -} - -export interface WebhookDetailsVariables { - id: string; -} diff --git a/src/webhooks/types/WebhookUpdate.ts b/src/webhooks/types/WebhookUpdate.ts deleted file mode 100644 index 2cc82c064..000000000 --- a/src/webhooks/types/WebhookUpdate.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// @generated -// This file was automatically generated and should not be edited. - -import { WebhookUpdateInput, WebhookErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: WebhookUpdate -// ==================================================== - -export interface WebhookUpdate_webhookUpdate_errors { - __typename: "WebhookError"; - code: WebhookErrorCode; - field: string | null; - message: string | null; -} - -export interface WebhookUpdate_webhookUpdate_webhook_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface WebhookUpdate_webhookUpdate_webhook { - __typename: "Webhook"; - id: string; - name: string; - isActive: boolean; - app: WebhookUpdate_webhookUpdate_webhook_app; -} - -export interface WebhookUpdate_webhookUpdate { - __typename: "WebhookUpdate"; - errors: WebhookUpdate_webhookUpdate_errors[]; - webhook: WebhookUpdate_webhookUpdate_webhook | null; -} - -export interface WebhookUpdate { - webhookUpdate: WebhookUpdate_webhookUpdate | null; -} - -export interface WebhookUpdateVariables { - id: string; - input: WebhookUpdateInput; -} diff --git a/src/webhooks/urls.ts b/src/webhooks/urls.ts index c65d5292e..a7d363e00 100644 --- a/src/webhooks/urls.ts +++ b/src/webhooks/urls.ts @@ -1,5 +1,4 @@ -import { customAppListPath } from "@saleor/apps/urls"; -import { appsSection } from "@saleor/apps/urls"; +import { appsSection, customAppListPath } from "@saleor/apps/urls"; import { stringifyQs } from "@saleor/utils/urls"; import urlJoin from "url-join"; diff --git a/src/webhooks/utils.ts b/src/webhooks/utils.ts index b59c38ab5..31ae2e9a9 100644 --- a/src/webhooks/utils.ts +++ b/src/webhooks/utils.ts @@ -1,9 +1,9 @@ import { MultiAutocompleteChoiceType } from "@saleor/components/MultiAutocompleteSelectField"; -import { WebhookFragment } from "@saleor/fragments/types/WebhookFragment"; import { WebhookEventTypeAsyncEnum, - WebhookEventTypeSyncEnum -} from "@saleor/types/globalTypes"; + WebhookEventTypeSyncEnum, + WebhookFragment +} from "@saleor/graphql"; export function isUnnamed(webhook: WebhookFragment): boolean { return ["", null].includes(webhook?.name); diff --git a/src/webhooks/views/WebhooksCreate.tsx b/src/webhooks/views/WebhooksCreate.tsx index 5b08b711a..8ea37732f 100644 --- a/src/webhooks/views/WebhooksCreate.tsx +++ b/src/webhooks/views/WebhooksCreate.tsx @@ -1,17 +1,18 @@ -import { useAppDetails } from "@saleor/apps/queries"; import { customAppUrl } from "@saleor/apps/urls"; import { WindowTitle } from "@saleor/components/WindowTitle"; +import { + useAppQuery, + useWebhookCreateMutation, + WebhookEventTypeAsyncEnum +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages } from "@saleor/intl"; import { extractMutationErrors } from "@saleor/misc"; -import { WebhookEventTypeAsyncEnum } from "@saleor/types/globalTypes"; import React from "react"; import { useIntl } from "react-intl"; import WebhookDetailsPage, { FormData } from "../components/WebhookDetailsPage"; -import { useWebhookCreateMutation } from "../mutations"; -import { WebhookCreate as WebhookCreateData } from "../types/WebhookCreate"; import { webhookUrl } from "../urls"; export interface WebhooksCreateProps { @@ -23,19 +24,18 @@ export const WebhooksCreate: React.FC = ({ id }) => { const notify = useNotifier(); const intl = useIntl(); - const { data } = useAppDetails({ variables: { id } }); + const { data } = useAppQuery({ variables: { id } }); - const onSubmit = (data: WebhookCreateData) => { - if (data.webhookCreate.errors.length === 0) { - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - navigate(webhookUrl(data.webhookCreate.webhook.id)); - } - }; const [webhookCreate, webhookCreateOpts] = useWebhookCreateMutation({ - onCompleted: onSubmit + onCompleted: data => { + if (data.webhookCreate.errors.length === 0) { + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + navigate(webhookUrl(data.webhookCreate.webhook.id)); + } + } }); const handleBack = () => navigate(customAppUrl(id)); diff --git a/src/webhooks/views/WebhooksDetails.tsx b/src/webhooks/views/WebhooksDetails.tsx index 0b601ca52..4d085178b 100644 --- a/src/webhooks/views/WebhooksDetails.tsx +++ b/src/webhooks/views/WebhooksDetails.tsx @@ -1,19 +1,20 @@ import { customAppUrl } from "@saleor/apps/urls"; import NotFoundPage from "@saleor/components/NotFoundPage"; import { WindowTitle } from "@saleor/components/WindowTitle"; +import { + useWebhookDetailsQuery, + useWebhookUpdateMutation, + WebhookEventTypeAsyncEnum +} from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; import { commonMessages } from "@saleor/intl"; -import { WebhookEventTypeAsyncEnum } from "@saleor/types/globalTypes"; -import { WebhookUpdate } from "@saleor/webhooks/types/WebhookUpdate"; import React from "react"; import { useIntl } from "react-intl"; import { extractMutationErrors, getStringOrPlaceholder } from "../../misc"; import WebhookDetailsPage from "../components/WebhookDetailsPage"; import { WebhookFormData } from "../components/WebhooksDetailsPage/WebhooksDetailsPage"; -import { useWebhookUpdateMutation } from "../mutations"; -import { useWebhooksDetailsQuery } from "../queries"; export interface WebhooksDetailsProps { id: string; @@ -24,24 +25,22 @@ export const WebhooksDetails: React.FC = ({ id }) => { const notify = useNotifier(); const intl = useIntl(); - const onWebhookUpdate = (data: WebhookUpdate) => { - const errors = data.webhookUpdate?.errors; - const webhook = data.webhookUpdate?.webhook; - - if (errors.length === 0 && webhook) { - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges) - }); - } - }; - - const [webhookUpdate, webhookUpdateOpts] = useWebhookUpdateMutation({ - onCompleted: onWebhookUpdate - }); - const { data: webhookDetails, loading } = useWebhooksDetailsQuery({ + const { data: webhookDetails, loading } = useWebhookDetailsQuery({ variables: { id } }); + const [webhookUpdate, webhookUpdateOpts] = useWebhookUpdateMutation({ + onCompleted: data => { + const errors = data.webhookUpdate?.errors; + const webhook = data.webhookUpdate?.webhook; + + if (errors.length === 0 && webhook) { + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges) + }); + } + } + }); const handleOnBack = () => navigate(customAppUrl(webhookDetails.webhook.app.id));