diff --git a/package.json b/package.json index 7d4e4acf..2441faad 100644 --- a/package.json +++ b/package.json @@ -36,11 +36,13 @@ "trailingComma": "es5" }, "dependencies": { + "@graphql-yoga/node": "^2.13.13", "@types/lodash": "^4.14.182", "basic-auth": "^2.0.1", "body-parser": "^1.20.0", "deep-equal": "^2.0.5", "express": "^4.17.2", + "graphql": "^16.6.0", "lodash": "^4.17.21", "morgan": "^1.10.0", "nock": "^13.2.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 35c93acd..2baa9cf8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,7 @@ specifiers: '@babel/preset-env': ^7.18.9 '@babel/preset-typescript': ^7.18.6 '@commercetools/platform-sdk': 2.8.0 + '@graphql-yoga/node': ^2.13.13 '@types/basic-auth': ^1.1.3 '@types/body-parser': ^1.19.2 '@types/deep-equal': ^1.0.1 @@ -27,6 +28,7 @@ specifiers: eslint-plugin-unused-imports: ^2.0.0 express: ^4.17.2 got: ^11.8.3 + graphql: ^16.6.0 husky: ^7.0.4 jest: ^28.1.3 lodash: ^4.17.21 @@ -46,11 +48,13 @@ specifiers: uuid: ^8.3.2 dependencies: + '@graphql-yoga/node': 2.13.13_graphql@16.6.0 '@types/lodash': 4.14.182 basic-auth: 2.0.1 body-parser: 1.20.0 deep-equal: 2.0.5 express: 4.18.1 + graphql: 16.6.0 lodash: 4.17.21 morgan: 1.10.0 nock: 13.2.9 @@ -1380,6 +1384,49 @@ packages: '@jridgewell/trace-mapping': 0.3.9 dev: true + /@envelop/core/2.6.0_graphql@16.6.0: + resolution: {integrity: sha512-yTptKinJN//i6m1kXUbnLBl/FobzddI4ehURAMS08eRUOQwAuXqJU9r8VdTav8nIZLb4t6cuDWFb3n331LiwLw==} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 + dependencies: + '@envelop/types': 2.4.0_graphql@16.6.0 + graphql: 16.6.0 + tslib: 2.4.0 + dev: false + + /@envelop/parser-cache/4.7.0_4hr55tbjlvoppd2sokdhrbpreq: + resolution: {integrity: sha512-63NfXDcW/vGn4U6NFxaZ0JbYWAcJb9A6jhTvghsSz1ZS+Dny/ci8bVSgVmM1q+N56hPyGsVPuyI+rIc71mPU5g==} + peerDependencies: + '@envelop/core': ^2.6.0 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 + dependencies: + '@envelop/core': 2.6.0_graphql@16.6.0 + graphql: 16.6.0 + lru-cache: 6.0.0 + tslib: 2.4.0 + dev: false + + /@envelop/types/2.4.0_graphql@16.6.0: + resolution: {integrity: sha512-pjxS98cDQBS84X29VcwzH3aJ/KiLCGwyMxuj7/5FkdiaCXAD1JEvKEj9LARWlFYj1bY43uII4+UptFebrhiIaw==} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 + dependencies: + graphql: 16.6.0 + tslib: 2.4.0 + dev: false + + /@envelop/validation-cache/4.7.0_4hr55tbjlvoppd2sokdhrbpreq: + resolution: {integrity: sha512-PzL+GfWJRT+JjsJqZAIxHKEkvkM3hxkeytS5O0QLXT8kURNBV28r+Kdnn2RCF5+6ILhyGpiDb60vaquBi7g4lw==} + peerDependencies: + '@envelop/core': ^2.6.0 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 + dependencies: + '@envelop/core': 2.6.0_graphql@16.6.0 + graphql: 16.6.0 + lru-cache: 6.0.0 + tslib: 2.4.0 + dev: false + /@eslint/eslintrc/1.3.0: resolution: {integrity: sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1397,6 +1444,96 @@ packages: - supports-color dev: true + /@graphql-tools/merge/8.3.6_graphql@16.6.0: + resolution: {integrity: sha512-uUBokxXi89bj08P+iCvQk3Vew4vcfL5ZM6NTylWi8PIpoq4r5nJ625bRuN8h2uubEdRiH8ntN9M4xkd/j7AybQ==} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@graphql-tools/utils': 8.12.0_graphql@16.6.0 + graphql: 16.6.0 + tslib: 2.4.0 + dev: false + + /@graphql-tools/schema/9.0.4_graphql@16.6.0: + resolution: {integrity: sha512-B/b8ukjs18fq+/s7p97P8L1VMrwapYc3N2KvdG/uNThSazRRn8GsBK0Nr+FH+mVKiUfb4Dno79e3SumZVoHuOQ==} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@graphql-tools/merge': 8.3.6_graphql@16.6.0 + '@graphql-tools/utils': 8.12.0_graphql@16.6.0 + graphql: 16.6.0 + tslib: 2.4.0 + value-or-promise: 1.0.11 + dev: false + + /@graphql-tools/utils/8.12.0_graphql@16.6.0: + resolution: {integrity: sha512-TeO+MJWGXjUTS52qfK4R8HiPoF/R7X+qmgtOYd8DTH0l6b+5Y/tlg5aGeUJefqImRq7nvi93Ms40k/Uz4D5CWw==} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + graphql: 16.6.0 + tslib: 2.4.0 + dev: false + + /@graphql-typed-document-node/core/3.1.1_graphql@16.6.0: + resolution: {integrity: sha512-NQ17ii0rK1b34VZonlmT2QMJFI70m0TRwbknO/ihlbatXyaktDhN/98vBiUU6kNBPljqGqyIrl2T4nY2RpFANg==} + peerDependencies: + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + dependencies: + graphql: 16.6.0 + dev: false + + /@graphql-yoga/common/2.12.12_graphql@16.6.0: + resolution: {integrity: sha512-La2ygIw2qlIJZrRGT4nW70Nam7gQ2xZkOn0FDCnKWSJhQ4nHw4aFAkeHIJdZGK0u2TqtXRrNSAj5cb/TZoqUiQ==} + peerDependencies: + graphql: ^15.2.0 || ^16.0.0 + dependencies: + '@envelop/core': 2.6.0_graphql@16.6.0 + '@envelop/parser-cache': 4.7.0_4hr55tbjlvoppd2sokdhrbpreq + '@envelop/validation-cache': 4.7.0_4hr55tbjlvoppd2sokdhrbpreq + '@graphql-tools/schema': 9.0.4_graphql@16.6.0 + '@graphql-tools/utils': 8.12.0_graphql@16.6.0 + '@graphql-typed-document-node/core': 3.1.1_graphql@16.6.0 + '@graphql-yoga/subscription': 2.2.3 + '@whatwg-node/fetch': 0.3.2 + dset: 3.1.2 + graphql: 16.6.0 + tslib: 2.4.0 + transitivePeerDependencies: + - encoding + dev: false + + /@graphql-yoga/node/2.13.13_graphql@16.6.0: + resolution: {integrity: sha512-3NmdEq3BkuVLRbo5yUi401sBiwowSKgY8O1DN1RwYdHRr0nu2dXzlYEETf4XLymyP6mKsVfQgsy7HQjwsc1oNw==} + peerDependencies: + graphql: ^15.2.0 || ^16.0.0 + dependencies: + '@envelop/core': 2.6.0_graphql@16.6.0 + '@graphql-tools/utils': 8.12.0_graphql@16.6.0 + '@graphql-yoga/common': 2.12.12_graphql@16.6.0 + '@graphql-yoga/subscription': 2.2.3 + '@whatwg-node/fetch': 0.3.2 + graphql: 16.6.0 + tslib: 2.4.0 + transitivePeerDependencies: + - encoding + dev: false + + /@graphql-yoga/subscription/2.2.3: + resolution: {integrity: sha512-It/Dfh+nW2ClTtmOylAa+o7fbKIRYRTH6jfKLj3YB75tkv/rFZ70bjlChDCrEMa46I+zDMg7+cdkrQOXov2fDg==} + dependencies: + '@graphql-yoga/typed-event-target': 0.1.1 + '@repeaterjs/repeater': 3.0.4 + tslib: 2.4.0 + dev: false + + /@graphql-yoga/typed-event-target/0.1.1: + resolution: {integrity: sha512-l23kLKHKhfD7jmv4OUlzxMTihSqgIjGWCSb0KdlLkeiaF2jjuo8pRhX200hFTrtjRHGSYS1fx2lltK/xWci+vw==} + dependencies: + '@repeaterjs/repeater': 3.0.4 + tslib: 2.4.0 + dev: false + /@humanwhocodes/config-array/0.9.5: resolution: {integrity: sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==} engines: {node: '>=10.10.0'} @@ -1708,6 +1845,36 @@ packages: fastq: 1.13.0 dev: true + /@peculiar/asn1-schema/2.3.0: + resolution: {integrity: sha512-DtNLAG4vmDrdSJFPe7rypkcj597chNQL7u+2dBtYo5mh7VW2+im6ke+O0NVr8W1f4re4C3F71LhoMb0Yxqa48Q==} + dependencies: + asn1js: 3.0.5 + pvtsutils: 1.3.2 + tslib: 2.4.0 + dev: false + + /@peculiar/json-schema/1.1.12: + resolution: {integrity: sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==} + engines: {node: '>=8.0.0'} + dependencies: + tslib: 2.4.0 + dev: false + + /@peculiar/webcrypto/1.4.0: + resolution: {integrity: sha512-U58N44b2m3OuTgpmKgf0LPDOmP3bhwNz01vAnj1mBwxBASRhptWYK+M3zG+HBkDqGQM+bFsoIihTW8MdmPXEqg==} + engines: {node: '>=10.12.0'} + dependencies: + '@peculiar/asn1-schema': 2.3.0 + '@peculiar/json-schema': 1.1.12 + pvtsutils: 1.3.2 + tslib: 2.4.0 + webcrypto-core: 1.7.5 + dev: false + + /@repeaterjs/repeater/3.0.4: + resolution: {integrity: sha512-AW8PKd6iX3vAZ0vA43nOUOnbq/X5ihgU+mSXXqunMkeQADGiqw/PY0JNeYtD5sr0PAy51YPgAPbDoeapv9r8WA==} + dev: false + /@sinclair/typebox/0.24.20: resolution: {integrity: sha512-kVaO5aEFZb33nPMTZBxiPEkY+slxiPtqC7QX8f9B3eGOMBvEfuMfxp9DSTTCsRJPumPKjrge4yagyssO4q6qzQ==} dev: true @@ -2081,10 +2248,33 @@ packages: eslint-visitor-keys: 3.3.0 dev: true + /@whatwg-node/fetch/0.3.2: + resolution: {integrity: sha512-Bs5zAWQs0tXsLa4mRmLw7Psps1EN78vPtgcLpw3qPY8s6UYPUM67zFZ9cy+7tZ64PXhfwzxJn+m7RH2Lq48RNQ==} + dependencies: + '@peculiar/webcrypto': 1.4.0 + abort-controller: 3.0.0 + busboy: 1.6.0 + event-target-polyfill: 0.0.3 + form-data-encoder: 1.7.2 + formdata-node: 4.4.1 + node-fetch: 2.6.7 + undici: 5.11.0 + web-streams-polyfill: 3.2.1 + transitivePeerDependencies: + - encoding + dev: false + /abbrev/1.1.1: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} dev: true + /abort-controller/3.0.0: + resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} + engines: {node: '>=6.5'} + dependencies: + event-target-shim: 5.0.1 + dev: false + /accepts/1.3.8: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} @@ -2191,6 +2381,15 @@ packages: resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} dev: false + /asn1js/3.0.5: + resolution: {integrity: sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==} + engines: {node: '>=12.0.0'} + dependencies: + pvtsutils: 1.3.2 + pvutils: 1.1.3 + tslib: 2.4.0 + dev: false + /asynckit/0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: false @@ -2403,6 +2602,13 @@ packages: load-tsconfig: 0.2.3 dev: true + /busboy/1.6.0: + resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} + engines: {node: '>=10.16.0'} + dependencies: + streamsearch: 1.1.0 + dev: false + /bytes/3.1.2: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} @@ -2761,6 +2967,11 @@ packages: esutils: 2.0.3 dev: true + /dset/3.1.2: + resolution: {integrity: sha512-g/M9sqy3oHe477Ar4voQxWtaPIFw1jTdKZuomOjhCcBx9nHUNn0pu6NopuFFrTh/TRZIKEj+76vLWFu9BNKk+Q==} + engines: {node: '>=4'} + dev: false + /ee-first/1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} dev: false @@ -3235,6 +3446,15 @@ packages: engines: {node: '>= 0.6'} dev: false + /event-target-polyfill/0.0.3: + resolution: {integrity: sha512-ZMc6UuvmbinrCk4RzGyVmRyIsAyxMRlp4CqSrcQRO8Dy0A9ldbiRy5kdtBj4OtP7EClGdqGfIqo9JmOClMsGLQ==} + dev: false + + /event-target-shim/5.0.1: + resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} + engines: {node: '>=6'} + dev: false + /execa/5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} @@ -3399,6 +3619,10 @@ packages: is-callable: 1.2.4 dev: false + /form-data-encoder/1.7.2: + resolution: {integrity: sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==} + dev: false + /form-data/4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} @@ -3408,6 +3632,14 @@ packages: mime-types: 2.1.35 dev: false + /formdata-node/4.4.1: + resolution: {integrity: sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==} + engines: {node: '>= 12.20'} + dependencies: + node-domexception: 1.0.0 + web-streams-polyfill: 4.0.0-beta.3 + dev: false + /formidable/2.0.1: resolution: {integrity: sha512-rjTMNbp2BpfQShhFbR3Ruk3qk2y9jKpvMW78nJgx8QKtxjDVrwbZG+wvDOmVbifHyOUOQJXxqEy6r0faRrPzTQ==} dependencies: @@ -3572,6 +3804,11 @@ packages: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} dev: true + /graphql/16.6.0: + resolution: {integrity: sha512-KPIBPDlW7NxrbT/eh4qPXz5FiFdL5UbaA0XUNz2Rp3Z3hqBSkbj0GVjwFDztsWVauZUWsbKHgMg++sk8UX0bkw==} + engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} + dev: false + /has-bigints/1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} dev: false @@ -4616,6 +4853,11 @@ packages: - supports-color dev: false + /node-domexception/1.0.0: + resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} + engines: {node: '>=10.5.0'} + dev: false + /node-fetch/2.6.7: resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} engines: {node: 4.x || >=6.0.0} @@ -4626,7 +4868,6 @@ packages: optional: true dependencies: whatwg-url: 5.0.0 - dev: true /node-int64/0.4.0: resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} @@ -4936,6 +5177,17 @@ packages: engines: {node: '>=6'} dev: true + /pvtsutils/1.3.2: + resolution: {integrity: sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ==} + dependencies: + tslib: 2.4.0 + dev: false + + /pvutils/1.1.3: + resolution: {integrity: sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==} + engines: {node: '>=6.0.0'} + dev: false + /qs/6.10.3: resolution: {integrity: sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==} engines: {node: '>=0.6'} @@ -5280,6 +5532,11 @@ packages: engines: {node: '>= 0.8'} dev: false + /streamsearch/1.1.0: + resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} + engines: {node: '>=10.0.0'} + dev: false + /string-length/4.0.2: resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} engines: {node: '>=10'} @@ -5485,7 +5742,6 @@ packages: /tr46/0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - dev: true /tr46/1.0.1: resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} @@ -5544,7 +5800,6 @@ packages: /tslib/2.4.0: resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==} - dev: true /tsup/6.2.0_6oasmw356qmm23djlsjgkwvrtm: resolution: {integrity: sha512-PNRQY/eUrtQgPHITOa9qU1Qss2AKHZl9OJFMsQGF+rpcQBMIYh5i0BUh5Gam8C8J0OuNQOGazqBEQHWMFLJKlQ==} @@ -5641,6 +5896,13 @@ packages: resolution: {integrity: sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==} dev: true + /undici/5.11.0: + resolution: {integrity: sha512-oWjWJHzFet0Ow4YZBkyiJwiK5vWqEYoH7BINzJAJOLedZ++JpAlCbUktW2GQ2DS2FpKmxD/JMtWUUWl1BtghGw==} + engines: {node: '>=12.18'} + dependencies: + busboy: 1.6.0 + dev: false + /unicode-canonical-property-names-ecmascript/2.0.0: resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} engines: {node: '>=4'} @@ -5717,6 +5979,11 @@ packages: convert-source-map: 1.8.0 dev: true + /value-or-promise/1.0.11: + resolution: {integrity: sha512-41BrgH+dIbCFXClcSapVs5M6GkENd3gQOJpEfPDNa71LsUGMXDL0jMWpI/Rh7WhX+Aalfz2TTS3Zt5pUsbnhLg==} + engines: {node: '>=12'} + dev: false + /vary/1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} @@ -5728,9 +5995,28 @@ packages: makeerror: 1.0.12 dev: true + /web-streams-polyfill/3.2.1: + resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==} + engines: {node: '>= 8'} + dev: false + + /web-streams-polyfill/4.0.0-beta.3: + resolution: {integrity: sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==} + engines: {node: '>= 14'} + dev: false + + /webcrypto-core/1.7.5: + resolution: {integrity: sha512-gaExY2/3EHQlRNNNVSrbG2Cg94Rutl7fAaKILS1w8ZDhGxdFOaw6EbCfHIxPy9vt/xwp5o0VQAx9aySPF6hU1A==} + dependencies: + '@peculiar/asn1-schema': 2.3.0 + '@peculiar/json-schema': 1.1.12 + asn1js: 3.0.5 + pvtsutils: 1.3.2 + tslib: 2.4.0 + dev: false + /webidl-conversions/3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - dev: true /webidl-conversions/4.0.2: resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} @@ -5741,7 +6027,6 @@ packages: dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 - dev: true /whatwg-url/7.1.0: resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} diff --git a/src/ctMock.ts b/src/ctMock.ts index 877cc090..cec0ab79 100644 --- a/src/ctMock.ts +++ b/src/ctMock.ts @@ -12,6 +12,7 @@ import { DEFAULT_API_HOSTNAME, DEFAULT_AUTH_HOSTNAME } from './constants' // Services import { ProjectService } from './services/project' +import { createGqlRoute } from './gql' import { createRepositories } from './repositories' import { createServices } from './services' import { ProjectRepository } from 'repositories/project' @@ -133,6 +134,11 @@ export class CommercetoolsMock { ) this._services = createServices(projectRouter, this._repositories) + // TODO: + // We should create repositories and pass them to the + // REST endpoint handlers and GraphQL handlers + createGqlRoute(app, this._repositories as Required) + app.use((err: Error, req: Request, resp: Response, next: NextFunction) => { if (err instanceof CommercetoolsError) { return resp.status(err.statusCode).send({ diff --git a/src/gql/abstract.ts b/src/gql/abstract.ts new file mode 100644 index 00000000..af54b4d2 --- /dev/null +++ b/src/gql/abstract.ts @@ -0,0 +1,46 @@ +import { + BaseResource, + InvalidInputError, +} from '@commercetools/platform-sdk' +import { CommercetoolsError } from '../exceptions' +import { AbstractResourceRepository } from '../repositories/abstract' +import { GraphQLContext } from './context' + +export abstract class ResourceResolver { + protected abstract repository: AbstractResourceRepository + + transformResource(resource: BaseResource) { + return resource + } + + get(parent: unknown, args: { key: string }, ctx: GraphQLContext) { + let result: BaseResource | null = null + + if (args.key) { + result = this.repository.getByKey(ctx.repositoryContext, args.key) + } else { + throw new CommercetoolsError( + { + code: 'InvalidInput', + message: + 'Exactly one of following arguments required: `id`, `key`, `sku`, `variantKey`.', + }, + 400 + ) + } + if (result) { + return this.transformResource(result) + } + return result + } + + query(parent: unknown, args: { key: string }, ctx: GraphQLContext) { + try { + const items = this.repository.query(ctx.repositoryContext, {}) + return items.results.map(this.transformResource) + } catch (err) { + console.error(err) + throw err + } + } +} diff --git a/src/gql/context.ts b/src/gql/context.ts new file mode 100644 index 00000000..bfb286c5 --- /dev/null +++ b/src/gql/context.ts @@ -0,0 +1,10 @@ +import { RepositoryContext } from '../repositories/abstract' +import { getRepositoryContext } from '../repositories/helpers' + +export type GraphQLContext = { + repositoryContext: RepositoryContext +} + +export const createContext = (data: any): GraphQLContext => ({ + repositoryContext: getRepositoryContext(data.req), +}) diff --git a/src/gql/index.ts b/src/gql/index.ts new file mode 100644 index 00000000..dbfec82f --- /dev/null +++ b/src/gql/index.ts @@ -0,0 +1,41 @@ +import path from 'path' +import fs from 'fs' +import { Express } from 'express' +import { createServer } from '@graphql-yoga/node' +import { ProductResolver } from './product' +import { createContext } from './context' +import { Repositories } from '../types' +import { ProductRepository } from '../repositories/product' + +export const createGqlRoute = ( + app: Express, + repositories: Required +) => { + const server = createServer({ + maskedErrors: false, + schema: { + typeDefs: createTypeDefs(), + resolvers: createResolvers(repositories), + }, + context: createContext, + }) + + app.use('/:projectKey/graphql', server) +} + +const createTypeDefs = () => { + const filename = path.join(__dirname, 'schema.graphqls') + return fs.readFileSync(filename, 'utf-8') +} + +const createResolvers = (repositories: Required) => { + const productResolver = new ProductResolver( + repositories['product'] as ProductRepository + ) + + return { + Query: { + ...productResolver.queryResolvers(), + }, + } +} diff --git a/src/gql/product.ts b/src/gql/product.ts new file mode 100644 index 00000000..4f6924cf --- /dev/null +++ b/src/gql/product.ts @@ -0,0 +1,29 @@ +import { Product } from '@commercetools/platform-sdk' +import { ProductRepository } from '../repositories/product' +import { ResourceResolver } from './abstract' +import { toAllLocales } from './utils' + +export class ProductResolver extends ResourceResolver { + public repository: ProductRepository + + constructor(repository: ProductRepository) { + super() + this.repository = repository + } + + transformResource(resource: Product) { + // @ts-ignore + // TODO: generate types and use gql specific types here + resource.masterData.current.slugAllLocales = toAllLocales( + resource.masterData.current.slug + ) + return resource + } + + queryResolvers() { + return { + product: this.get.bind(this), + products: this.query.bind(this), + } + } +} diff --git a/src/gql/schema.graphqls b/src/gql/schema.graphqls new file mode 100644 index 00000000..f4b14d68 --- /dev/null +++ b/src/gql/schema.graphqls @@ -0,0 +1,12433 @@ +scalar Long +scalar BigDecimal + +"API Clients can be used to obtain OAuth 2 access tokens. The secret is only shown once in the response of creating the API Client." +type APIClientWithSecret { + id: String! + name: String! + scope: String! + createdAt: DateTime + lastUsedAt: Date + deleteAt: DateTime + secret: String! + accessTokenValiditySeconds: Int + refreshTokenValiditySeconds: Int +} + +"API Clients can be used to obtain OAuth 2 access tokens" +type APIClientWithoutSecret { + id: String! + name: String! + scope: String! + createdAt: DateTime + lastUsedAt: Date + deleteAt: DateTime + accessTokenValiditySeconds: Int + refreshTokenValiditySeconds: Int +} + +type APIClientWithoutSecretQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [APIClientWithoutSecret!]! +} + +type AWSLambdaDestination implements ExtensionDestination { + arn: String! + accessKey: String! + accessSecret: String! + type: String! +} + +input AWSLambdaDestinationInput { + arn: String! + accessKey: String! + accessSecret: String! +} + +type AbsoluteDiscountValue implements CartDiscountValue & ProductDiscountValue { + money: [Money!]! + type: String! +} + +input AbsoluteDiscountValueInput { + money: [MoneyInput!]! +} + +enum ActionType { + Update + Create +} + +"A field to access the active cart." +interface ActiveCartInterface { + activeCart: Cart +} + +input AddBusinessUnitAddress { + address: AddressInput! +} + +input AddBusinessUnitAssociate { + associate: AssociateDraft! +} + +input AddBusinessUnitBillingAddressId { + addressId: String + addressKey: String +} + +input AddBusinessUnitShippingAddressId { + addressId: String + addressKey: String +} + +input AddBusinessUnitStore { + store: ResourceIdentifierInput! +} + +input AddCartCustomLineItem { + priceMode: CustomLineItemPriceMode = Standard + shippingDetails: ItemShippingDetailsDraft + custom: CustomFieldsDraft + quantity: Long + externalTaxRate: ExternalTaxRateDraft + taxCategory: ResourceIdentifierInput + slug: String! + money: BaseMoneyInput! + name: [LocalizedStringItemInputType!]! +} + +input AddCartDiscountCode { + code: String! + validateDuplicates: Boolean = false +} + +input AddCartItemShippingAddress { + address: AddressInput! +} + +input AddCartLineItem { + addedAt: DateTime + shippingDetails: ItemShippingDetailsDraft + inventoryMode: InventoryMode + externalTotalPrice: ExternalLineItemTotalPriceDraft + externalPrice: BaseMoneyInput + externalTaxRate: ExternalTaxRateDraft + custom: CustomFieldsDraft + distributionChannel: ResourceIdentifierInput + supplyChannel: ResourceIdentifierInput + variantId: Int + quantity: Long + sku: String + productId: String +} + +input AddCartPayment { + payment: ResourceIdentifierInput! +} + +input AddCartShoppingList { + shoppingList: ResourceIdentifierInput! + supplyChannel: ResourceIdentifierInput + distributionChannel: ResourceIdentifierInput +} + +input AddCategoryAsset { + position: Int + asset: AssetDraftInput! +} + +input AddChannelRoles { + roles: [ChannelRole!]! +} + +input AddCustomerAddress { + address: AddressInput! +} + +input AddCustomerBillingAddressId { + addressId: String + addressKey: String +} + +input AddCustomerShippingAddressId { + addressId: String + addressKey: String +} + +input AddCustomerStore { + store: ResourceIdentifierInput! +} + +input AddInventoryEntryQuantity { + quantity: Long! +} + +input AddMyBusinessUnitAddress { + address: AddressInput! +} + +input AddMyBusinessUnitBillingAddressId { + addressId: String + addressKey: String +} + +input AddMyBusinessUnitShippingAddressId { + addressId: String + addressKey: String +} + +input AddMyCartLineItem { + addedAt: DateTime + shippingDetails: ItemShippingDetailsDraft + custom: CustomFieldsDraft + distributionChannel: ResourceIdentifierInput + supplyChannel: ResourceIdentifierInput + variantId: Int + quantity: Long + sku: String + productId: String +} + +input AddMyPaymentTransaction { + transaction: MyTransactionDraft! +} + +input AddOrderDelivery { + items: [DeliveryItemDraftType!] = [] + parcels: [ParcelDataDraftType!] = [] + address: AddressInput + custom: CustomFieldsDraft + shippingKey: String +} + +input AddOrderEditStagedAction { + stagedAction: StagedOrderUpdateAction! +} + +input AddOrderItemShippingAddress { + address: AddressInput! +} + +input AddOrderParcelToDelivery { + deliveryId: String! + measurements: ParcelMeasurementsDraftType + trackingData: TrackingDataDraftType + items: [DeliveryItemDraftType!] = [] + custom: CustomFieldsDraft +} + +input AddOrderPayment { + payment: ResourceIdentifierInput! +} + +input AddOrderReturnInfo { + items: [ReturnItemDraftType!]! + returnDate: DateTime + returnTrackingId: String +} + +input AddPaymentInterfaceInteraction { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input AddPaymentTransaction { + transaction: TransactionDraft! +} + +input AddProductAsset { + variantId: Int + sku: String + staged: Boolean = true + position: Int + asset: AssetDraftInput! +} + +input AddProductExternalImage { + variantId: Int + sku: String + image: ImageInput! + staged: Boolean = true +} + +input AddProductPrice { + variantId: Int + sku: String + price: ProductPriceDataInput! + staged: Boolean = true +} + +input AddProductSelectionProduct { + product: ResourceIdentifierInput! + variantSelection: ProductVariantSelectionDraft +} + +input AddProductToCategory { + category: ResourceIdentifierInput! + orderHint: String + staged: Boolean = true +} + +input AddProductVariant { + assets: [AssetDraftInput!] = [] + attributes: [ProductAttributeInput!] = [] + images: [ImageInput!] = [] + prices: [ProductPriceDataInput!] = [] + key: String + sku: String + staged: Boolean = true +} + +input AddShippingMethodShippingRate { + zone: ResourceIdentifierInput! + shippingRate: ShippingRateDraft! +} + +input AddShippingMethodZone { + zone: ResourceIdentifierInput! +} + +input AddShoppingListLineItem { + addedAt: DateTime + custom: CustomFieldsDraft + quantity: Int = 1 + variantId: Int + sku: String + productId: String +} + +input AddShoppingListTextLineItem { + addedAt: DateTime + custom: CustomFieldsDraft + quantity: Int = 1 + description: [LocalizedStringItemInputType!] + name: [LocalizedStringItemInputType!]! +} + +input AddStagedOrderCustomLineItem { + priceMode: CustomLineItemPriceMode = Standard + shippingDetails: ItemShippingDetailsDraftType + custom: CustomFieldsDraft + quantity: Long + externalTaxRate: ExternalTaxRateDraft + taxCategory: ResourceIdentifierInput + slug: String! + money: BaseMoneyInput! + name: [LocalizedStringItemInputType!]! +} + +type AddStagedOrderCustomLineItemOutput implements StagedOrderUpdateActionOutput { + type: String! + draft: CustomLineItemDraftOutput! +} + +input AddStagedOrderDelivery { + items: [DeliveryItemDraftType!] = [] + parcels: [ParcelDataDraftType!] = [] + address: AddressInput + custom: CustomFieldsDraft + shippingKey: String +} + +type AddStagedOrderDeliveryOutput implements StagedOrderUpdateActionOutput { + type: String! + items: [DeliveryItem!]! + parcels: [ParcelData!]! + address: AddressDraft + custom: CustomFieldsCommand + shippingKey: String +} + +input AddStagedOrderDiscountCode { + code: String! + validateDuplicates: Boolean = false +} + +type AddStagedOrderDiscountCodeOutput implements StagedOrderUpdateActionOutput { + type: String! + code: String! + validateDuplicates: Boolean! +} + +input AddStagedOrderItemShippingAddress { + address: AddressInput! +} + +type AddStagedOrderItemShippingAddressOutput implements StagedOrderUpdateActionOutput { + type: String! + address: AddressDraft! +} + +input AddStagedOrderLineItem { + addedAt: DateTime + shippingDetails: ItemShippingDetailsDraftType + inventoryMode: InventoryMode + externalTotalPrice: ExternalLineItemTotalPriceDraft + externalPrice: BaseMoneyInput + externalTaxRate: ExternalTaxRateDraft + custom: CustomFieldsDraft + distributionChannel: ResourceIdentifierInput + supplyChannel: ResourceIdentifierInput + variantId: Int + quantity: Long + sku: String + productId: String +} + +type AddStagedOrderLineItemOutput implements StagedOrderUpdateActionOutput { + type: String! + draft: LineItemDraftOutput! +} + +input AddStagedOrderParcelToDelivery { + deliveryId: String! + measurements: ParcelMeasurementsDraftType + trackingData: TrackingDataDraftType + items: [DeliveryItemDraftType!] = [] + custom: CustomFieldsDraft +} + +type AddStagedOrderParcelToDeliveryOutput implements StagedOrderUpdateActionOutput { + type: String! + deliveryId: String! + measurements: ParcelMeasurements + trackingData: TrackingData + items: [DeliveryItem!]! + custom: CustomFieldsCommand +} + +input AddStagedOrderPayment { + payment: ResourceIdentifierInput! +} + +type AddStagedOrderPaymentOutput implements StagedOrderUpdateActionOutput { + type: String! + paymentResId: ResourceIdentifier! +} + +input AddStagedOrderReturnInfo { + items: [ReturnItemDraftType!]! + returnDate: DateTime + returnTrackingId: String +} + +type AddStagedOrderReturnInfoOutput implements StagedOrderUpdateActionOutput { + type: String! + items: [ReturnItemDraftTypeOutput!]! + returnDate: DateTime + returnTrackingId: String +} + +input AddStagedOrderShoppingList { + shoppingList: ResourceIdentifierInput! + supplyChannel: ResourceIdentifierInput + distributionChannel: ResourceIdentifierInput +} + +type AddStagedOrderShoppingListOutput implements StagedOrderUpdateActionOutput { + type: String! + shoppingListResId: ResourceIdentifier! + supplyChannelResId: ChannelReferenceIdentifier + distributionChannelResId: ChannelReferenceIdentifier +} + +input AddStateRoles { + roles: [StateRole!]! +} + +input AddStoreDistributionChannel { + distributionChannel: ResourceIdentifierInput! +} + +input AddStoreProductSelection { + productSelection: ResourceIdentifierInput! + active: Boolean +} + +input AddStoreSupplyChannel { + supplyChannel: ResourceIdentifierInput! +} + +input AddTypeEnumValue { + fieldName: String! + value: EnumValueInput! +} + +input AddTypeFieldDefinition { + fieldDefinition: FieldDefinitionInput! +} + +input AddTypeLocalizedEnumValue { + fieldName: String! + value: LocalizedEnumValueInput! +} + +input AddZoneLocation { + location: ZoneLocation! +} + +"An address represents a postal address." +type Address { + id: String + streetName: String + streetNumber: String + additionalStreetInfo: String + postalCode: String + city: String + region: String + state: String + country: Country! + company: String + department: String + building: String + apartment: String + pOBox: String + additionalAddressInfo: String + externalId: String + key: String + phone: String + mobile: String + email: String + fax: String + title: String + salutation: String + firstName: String + lastName: String + custom: CustomFieldsType +} + +type AddressDraft { + id: String + streetName: String + streetNumber: String + additionalStreetInfo: String + postalCode: String + city: String + region: String + state: String + country: Country! + company: String + department: String + building: String + apartment: String + pOBox: String + additionalAddressInfo: String + externalId: String + key: String + custom: CustomFieldsCommand + phone: String + mobile: String + email: String + fax: String + title: String + salutation: String + firstName: String + lastName: String +} + +input AddressInput { + id: String + title: String + salutation: String + firstName: String + lastName: String + streetName: String + streetNumber: String + additionalStreetInfo: String + postalCode: String + city: String + region: String + state: String + country: Country! + company: String + department: String + building: String + apartment: String + pOBox: String + phone: String + mobile: String + email: String + fax: String + additionalAddressInfo: String + externalId: String + key: String + custom: CustomFieldsDraft +} + +enum AnonymousCartSignInMode { + "The anonymous cart is used as new active customer cart. No `LineItem`s get merged." + UseAsNewActiveCustomerCart + + """ + `LineItem`s of the anonymous cart will be copied to the customer’s active cart that has been modified most recently. + + The `CartState` of the anonymous cart gets changed to `Merged` while the `CartState` of the customer’s cart remains `Active`. + + `CustomLineItems` and `CustomFields` of the anonymous cart will not be copied to the customers cart. + + If a `LineItem` in the anonymous cart matches an existing line item in the customer’s cart (same product ID and variant ID), the maximum quantity of both LineItems is used as the new quantity. In that case `CustomFields` on the `LineItem` of the anonymous cart will not be in the resulting `LineItem`. + """ + MergeWithExistingCustomerCart +} + +type Applied implements OrderEditResult { + appliedAt: DateTime! + excerptBeforeEdit: OrderExcerpt! + excerptAfterEdit: OrderExcerpt! + type: String! +} + +input ApplyCartDeltaToCustomLineItemShippingDetailsTargets { + customLineItemId: String! + targetsDelta: [ShippingTargetDraft!]! +} + +input ApplyCartDeltaToLineItemShippingDetailsTargets { + lineItemId: String! + targetsDelta: [ShippingTargetDraft!]! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input ApplyStagedChanges { + dummy: String +} + +type Asset { + id: String! + key: String + sources: [AssetSource!]! + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!]! + description( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + descriptionAllLocales: [LocalizedString!] + tags: [String!]! + custom: CustomFieldsType +} + +type AssetDimensions { + width: Int! + height: Int! +} + +input AssetDimensionsInput { + width: Int! + height: Int! +} + +input AssetDraftInput { + key: String + name: [LocalizedStringItemInputType!]! + description: [LocalizedStringItemInputType!] + custom: CustomFieldsDraft + sources: [AssetSourceInput!] + tags: [String!] + type: ResourceIdentifierInput +} + +type AssetSource { + uri: String! + key: String + dimensions: AssetDimensions + contentType: String +} + +input AssetSourceInput { + uri: String! + key: String + dimensions: AssetDimensionsInput + contentType: String +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type Associate { + roles: [AssociateRole!]! + customerRef: Reference + customer: Customer +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input AssociateDraft { + roles: [AssociateRole!]! + customer: ResourceIdentifierInput! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +enum AssociateRole { + Admin + Buyer +} + +interface Attribute { + name: String! +} + +enum AttributeConstraint { + "No constraints are applied to the attribute" + None + + "Attribute value should be different in each variant" + Unique + + "A set of attributes, that have this constraint, should have different combinations in each variant" + CombinationUnique + + "Attribute value should be the same in all variants" + SameForAll +} + +type AttributeDefinition { + type: AttributeDefinitionType! + name: String! + label( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + isRequired: Boolean! + attributeConstraint: AttributeConstraint! + inputTip( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + inputHint: TextInputHint! + isSearchable: Boolean! + labelAllLocales: [LocalizedString!]! + inputTipAllLocales: [LocalizedString!] +} + +input AttributeDefinitionDraft { + type: AttributeTypeDraft! + name: String! + label: [LocalizedStringItemInputType!]! + isRequired: Boolean! + attributeConstraint: AttributeConstraint + inputTip: [LocalizedStringItemInputType!] + inputHint: TextInputHint + isSearchable: Boolean! +} + +type AttributeDefinitionResult { + limit: Int + offset: Int + total: Int! + results: [AttributeDefinition!]! +} + +"(https://docs.commercetools.com/api/projects/productTypes#attributetype)[https://docs.commercetools.com/api/projects/productTypes#attributetype]" +interface AttributeDefinitionType { + name: String! +} + +input AttributeSetElementTypeDraft { + text: SimpleAttributeTypeDraft + number: SimpleAttributeTypeDraft + money: SimpleAttributeTypeDraft + date: SimpleAttributeTypeDraft + time: SimpleAttributeTypeDraft + datetime: SimpleAttributeTypeDraft + boolean: SimpleAttributeTypeDraft + reference: ReferenceTypeDefinitionDraft + enum: EnumTypeDraft + lenum: LocalizableEnumTypeDraft + ltext: SimpleAttributeTypeDraft +} + +input AttributeSetTypeDraft { + elementType: AttributeSetElementTypeDraft! +} + +input AttributeTypeDraft { + set: AttributeSetTypeDraft + text: SimpleAttributeTypeDraft + number: SimpleAttributeTypeDraft + money: SimpleAttributeTypeDraft + date: SimpleAttributeTypeDraft + time: SimpleAttributeTypeDraft + datetime: SimpleAttributeTypeDraft + boolean: SimpleAttributeTypeDraft + reference: ReferenceTypeDefinitionDraft + enum: EnumTypeDraft + lenum: LocalizableEnumTypeDraft + ltext: SimpleAttributeTypeDraft +} + +"AuthenticationMode values. BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +enum AuthenticationMode { + ExternalAuth + Password +} + +type AuthorizationHeader implements HttpDestinationAuthentication { + headerValue: String! + type: String! +} + +input AuthorizationHeaderInput { + headerValue: String! +} + +type AzureFunctionsAuthentication implements HttpDestinationAuthentication { + key: String! + type: String! +} + +input AzureFunctionsAuthenticationInput { + key: String! +} + +type AzureServiceBusDestination implements Destination { + connectionString: String! + type: String! +} + +input AzureServiceBusDestinationInput { + connectionString: String! +} + +interface BaseMoney { + type: String! + currencyCode: Currency! + centAmount: Long! + fractionDigits: Int! +} + +input BaseMoneyInput { + centPrecision: MoneyInput + highPrecision: HighPrecisionMoneyInput +} + +input BaseSearchKeywordInput { + whitespace: WhitespaceSuggestTokenizerInput + custom: CustomSuggestTokenizerInput +} + +type BooleanAttribute implements Attribute { + value: Boolean! + name: String! +} + +type BooleanAttributeDefinitionType implements AttributeDefinitionType { + name: String! +} + +type BooleanField implements CustomField { + value: Boolean! + name: String! +} + +type BooleanType implements FieldType { + name: String! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type BusinessUnit implements Versioned { + key: String! + name: String! + contactEmail: String + addresses: [Address!]! + defaultShippingAddress: Address + defaultBillingAddress: Address + defaultShippingAddressId: String + defaultBillingAddressId: String + shippingAddresses: [Address!]! + billingAddresses: [Address!]! + shippingAddressIds: [String!]! + billingAddressIds: [String!]! + status: BusinessUnitStatus! + storesRef: [KeyReference!] + stores: [Store!] + storeMode: String + unitType: BusinessUnitType! + associates: [Associate!]! + custom: CustomFieldsType + parentUnitRef: KeyReference + parentUnit: BusinessUnit + + "This field contains the BusinessUnits KeyReferences from the Company to the parent Division of this BusinessUnit in that order." + ancestors: [BusinessUnit!]! + topLevelUnitRef: KeyReference + topLevelUnit: BusinessUnit! + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +type BusinessUnitAddressAdded implements MessagePayload { + address: Address! + type: String! +} + +type BusinessUnitAddressChanged implements MessagePayload { + address: Address! + type: String! +} + +type BusinessUnitAddressRemoved implements MessagePayload { + address: Address! + type: String! +} + +type BusinessUnitAssociateAdded implements MessagePayload { + associate: Associate! + type: String! +} + +type BusinessUnitAssociateChanged implements MessagePayload { + associate: Associate! + type: String! +} + +type BusinessUnitAssociateRemoved implements MessagePayload { + associate: Associate! + type: String! +} + +type BusinessUnitAssociatesSet implements MessagePayload { + associates: [Associate!]! + type: String! +} + +type BusinessUnitBillingAddressAdded implements MessagePayload { + address: Address! + type: String! +} + +type BusinessUnitBillingAddressRemoved implements MessagePayload { + address: Address! + type: String! +} + +type BusinessUnitConfiguration { + myBusinessUnitStatusOnCreation: BusinessUnitStatus! +} + +type BusinessUnitContactEmailSet implements MessagePayload { + contactEmail: String + type: String! +} + +type BusinessUnitCreated implements MessagePayload { + businessUnit: BusinessUnit! + type: String! +} + +type BusinessUnitDefaultBillingAddressSet implements MessagePayload { + address: Address + type: String! +} + +type BusinessUnitDefaultShippingAddressSet implements MessagePayload { + address: Address + type: String! +} + +type BusinessUnitDeleted implements MessagePayload { + type: String! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input BusinessUnitDraft { + key: String! + name: String! + contactEmail: String + addresses: [AddressInput!] + + "The index of the address in the `addresses` list. The `defaultBillingAddressId` of the customer will be set to the ID of that address." + defaultBillingAddress: Int + + "The index of the address in the `addresses` list. The `defaultShippingAddressId` of the customer will be set to the ID of that address." + defaultShippingAddress: Int + + "The indices of the shipping addresses in the `addresses` list. The `shippingAddressIds` of the `Customer` will be set to the IDs of that addresses." + shippingAddresses: [Int!] = [] + + "The indices of the billing addresses in the `addresses` list. The `billingAddressIds` of the customer will be set to the IDs of that addresses." + billingAddresses: [Int!] = [] + custom: CustomFieldsDraft + unitType: BusinessUnitType! + storeMode: String + parentUnit: ResourceIdentifierInput + stores: [ResourceIdentifierInput!] + associates: [AssociateDraft!] +} + +type BusinessUnitNameChanged implements MessagePayload { + name: String! + type: String! +} + +type BusinessUnitParentChanged implements MessagePayload { + oldParentUnit: KeyReference + newParentUnit: KeyReference + type: String! +} + +type BusinessUnitQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [BusinessUnit!]! +} + +type BusinessUnitShippingAddressAdded implements MessagePayload { + address: Address! + type: String! +} + +type BusinessUnitShippingAddressRemoved implements MessagePayload { + address: Address! + type: String! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +enum BusinessUnitStatus { + Active + Inactive +} + +type BusinessUnitStatusChanged implements MessagePayload { + status: BusinessUnitStatus! + type: String! +} + +type BusinessUnitStoreAdded implements MessagePayload { + store: KeyReference! + type: String! +} + +type BusinessUnitStoreModeChanged implements MessagePayload { + storeMode: String! + oldStoreMode: String! + stores: [KeyReference!] + oldStores: [KeyReference!] + type: String! +} + +type BusinessUnitStoreRemoved implements MessagePayload { + store: KeyReference! + type: String! +} + +type BusinessUnitStoresSet implements MessagePayload { + stores: [KeyReference!]! + type: String! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +enum BusinessUnitType { + Company + Division +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input BusinessUnitUpdateAction { + addAddress: AddBusinessUnitAddress + addAssociate: AddBusinessUnitAssociate + addBillingAddressId: AddBusinessUnitBillingAddressId + addShippingAddressId: AddBusinessUnitShippingAddressId + addStore: AddBusinessUnitStore + changeAddress: ChangeBusinessUnitAddress + changeAssociate: ChangeBusinessUnitAssociate + changeName: ChangeBusinessUnitName + changeParentUnit: ChangeBusinessUnitParentUnit + changeStatus: ChangeBusinessUnitStatus + removeAddress: RemoveBusinessUnitAddress + removeAssociate: RemoveBusinessUnitAssociate + removeBillingAddressId: RemoveBusinessUnitBillingAddressId + removeShippingAddressId: RemoveBusinessUnitShippingAddressId + removeStore: RemoveBusinessUnitStore + setAddressCustomField: SetBusinessUnitAddressCustomField + setAddressCustomType: SetBusinessUnitAddressCustomType + setAssociates: SetBusinessUnitAssociates + setContactEmail: SetBusinessUnitContactEmail + setCustomField: SetBusinessUnitCustomField + setCustomType: SetBusinessUnitCustomType + setDefaultBillingAddress: SetBusinessUnitDefaultBillingAddress + setDefaultShippingAddress: SetBusinessUnitDefaultShippingAddress + setStores: SetBusinessUnitStores + setStoreMode: SetBusinessUnitStoreMode +} + +input CancelQuoteRequest { + dummy: String +} + +"A shopping cart holds product variants and can be ordered. Each cart either belongs to a registered customer or is an anonymous cart." +type Cart implements Versioned & ReferenceExpandable { + customerId: String + customer: Customer + customerEmail: String + anonymousId: String + lineItems( + "Queries with specified ID" + id: String): [LineItem!]! + customLineItems: [CustomLineItem!]! + totalPrice: Money! + taxedPrice: TaxedPrice + shippingAddress: Address + billingAddress: Address + inventoryMode: InventoryMode! + taxMode: TaxMode! + taxRoundingMode: RoundingMode! + taxCalculationMode: TaxCalculationMode! + customerGroup: CustomerGroup + customerGroupRef: Reference + country: Country + shippingInfo: ShippingInfo + discountCodes: [DiscountCodeInfo!]! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + directDiscounts: [DirectDiscount!]! + refusedGifts: [CartDiscount!]! + refusedGiftsRefs: [Reference!]! + paymentInfo: PaymentInfo + locale: Locale + shippingRateInput: ShippingRateInput + origin: CartOrigin! + storeRef: KeyReference + store: Store + itemShippingAddresses: [Address!]! + businessUnit: KeyReference + cartState: CartState! + key: String + custom: CustomFieldsType + deleteDaysAfterLastModification: Int + totalLineItemQuantity: Long + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +input CartClassificationInput { + values: [LocalizedEnumValueInput!]! +} + +type CartClassificationType implements ShippingRateInputType { + values: [ShippingRateInputLocalizedEnumValue!]! + type: String! +} + +type CartCreated implements MessagePayload { + totalPrice: Money! + lineItemCount: Int! + discountCodesRefs: [Reference!]! + type: String! +} + +"\nCart discounts are recalculated every time LineItems or CustomLineItems are added or removed from the Cart or an order is created from the cart.\n\nThe number of active cart discounts that do not require a discount code (isActive=true and requiresDiscountCode=false) is limited to 100.\n " +type CartDiscount implements Versioned & ReferenceExpandable { + cartPredicate: String! + validFrom: DateTime + validUntil: DateTime + stackingMode: StackingMode! + isActive: Boolean! + requiresDiscountCode: Boolean! + sortOrder: String! + key: String + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + description( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!]! + descriptionAllLocales: [LocalizedString!] + referenceRefs: [Reference!]! + custom: CustomFieldsType + value: CartDiscountValue! + target: CartDiscountTarget + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +input CartDiscountDraft { + value: CartDiscountValueInput! + cartPredicate: String! + target: CartDiscountTargetInput + sortOrder: String! + name: [LocalizedStringItemInputType!]! + description: [LocalizedStringItemInputType!] + validFrom: DateTime + validUntil: DateTime + stackingMode: StackingMode = Stacking + requiresDiscountCode: Boolean = false + isActive: Boolean = true + custom: CustomFieldsDraft + key: String +} + +type CartDiscountLimitWithCurrent implements LimitWithCurrent { + limit: Long + current: Long! +} + +type CartDiscountLimitsProjection { + totalActiveWithoutDiscountCodes: CartDiscountLimitWithCurrent! +} + +type CartDiscountQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [CartDiscount!]! +} + +interface CartDiscountTarget { + type: String! +} + +input CartDiscountTargetInput { + lineItems: LineItemsTargetInput + customLineItems: CustomLineItemsTargetInput + shipping: ShippingTargetInput + multiBuyLineItems: MultiBuyLineItemsTargetInput + multiBuyCustomLineItems: MultiBuyCustomLineItemsTargetInput +} + +input CartDiscountUpdateAction { + changeCartPredicate: ChangeCartDiscountCartPredicate + changeIsActive: ChangeCartDiscountIsActive + changeName: ChangeCartDiscountName + changeRequiresDiscountCode: ChangeCartDiscountRequiresDiscountCode + changeSortOrder: ChangeCartDiscountSortOrder + changeStackingMode: ChangeCartDiscountStackingMode + changeTarget: ChangeCartDiscountTarget + changeValue: ChangeCartDiscountValue + setCustomField: SetCartDiscountCustomField + setCustomType: SetCartDiscountCustomType + setDescription: SetCartDiscountDescription + setKey: SetCartDiscountKey + setValidFrom: SetCartDiscountValidFrom + setValidFromAndUntil: SetCartDiscountValidFromAndUntil + setValidUntil: SetCartDiscountValidUntil +} + +interface CartDiscountValue { + type: String! +} + +input CartDiscountValueInput { + relative: RelativeDiscountValueInput + absolute: AbsoluteDiscountValueInput + fixed: FixedPriceDiscountValueInput + giftLineItem: GiftLineItemValueInput +} + +input CartDraft { + currency: Currency! + country: Country + inventoryMode: InventoryMode = None + custom: CustomFieldsDraft + customerEmail: String + shippingAddress: AddressInput + billingAddress: AddressInput + shippingMethod: ResourceIdentifierInput + taxMode: TaxMode = Platform + locale: Locale + deleteDaysAfterLastModification: Int + itemShippingAddresses: [AddressInput!] = [] + discountCodes: [String!] = [] + store: ResourceIdentifierInput + key: String + lineItems: [LineItemDraft!] = [] + customLineItems: [CustomLineItemDraft!] = [] + customerId: String + externalTaxRateForShippingMethod: ExternalTaxRateDraft + anonymousId: String + taxRoundingMode: RoundingMode = HalfEven + taxCalculationMode: TaxCalculationMode = LineItemLevel + customerGroup: ResourceIdentifierInput + shippingRateInput: ShippingRateInputDraft + origin: CartOrigin = Customer +} + +type CartLimitWithCurrent implements LimitWithCurrent { + limit: Long + current: Long! +} + +type CartLimitsProjection { + total: CartLimitWithCurrent! +} + +enum CartOrigin { + "The cart was created by our platform and belongs to a Quote. BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + Quote + + "The cart was created by the merchant on behalf of the customer" + Merchant + + "The cart was created by the customer. This is the default value" + Customer +} + +"Fields to access carts. Includes direct access to a single cart and searching for carts." +interface CartQueryInterface { + cart(id: String!): Cart + carts(where: String, sort: [String!], limit: Int, offset: Int): CartQueryResult! +} + +type CartQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [Cart!]! +} + +input CartScoreInput { + dummy: String +} + +type CartScoreType implements ShippingRateInputType { + type: String! +} + +enum CartState { + "The cart was ordered. No further operations on the cart are allowed." + Ordered + + "Anonymous cart whose content was merged into a customers cart on signin. No further operations on the cart are allowed." + Merged + + "The cart can be updated and ordered. It is the default state." + Active +} + +input CartUpdateAction { + addCustomLineItem: AddCartCustomLineItem + addDiscountCode: AddCartDiscountCode + addItemShippingAddress: AddCartItemShippingAddress + addLineItem: AddCartLineItem + addPayment: AddCartPayment + addShoppingList: AddCartShoppingList + applyDeltaToCustomLineItemShippingDetailsTargets: ApplyCartDeltaToCustomLineItemShippingDetailsTargets + applyDeltaToLineItemShippingDetailsTargets: ApplyCartDeltaToLineItemShippingDetailsTargets + changeCustomLineItemMoney: ChangeCartCustomLineItemMoney + changeCustomLineItemPriceMode: ChangeCartCustomLineItemPriceMode + changeCustomLineItemQuantity: ChangeCartCustomLineItemQuantity + changeLineItemQuantity: ChangeCartLineItemQuantity + changeTaxCalculationMode: ChangeCartTaxCalculationMode + changeTaxMode: ChangeCartTaxMode + changeTaxRoundingMode: ChangeCartTaxRoundingMode + recalculate: RecalculateCart + removeCustomLineItem: RemoveCartCustomLineItem + removeDiscountCode: RemoveCartDiscountCode + removeItemShippingAddress: RemoveCartItemShippingAddress + removeLineItem: RemoveCartLineItem + removePayment: RemoveCartPayment + setAnonymousId: SetCartAnonymousId + setBillingAddress: SetCartBillingAddress + setBillingAddressCustomField: SetCartBillingAddressCustomField + setBillingAddressCustomType: SetCartBillingAddressCustomType + setBusinessUnit: SetCartBusinessUnit + setKey: SetCartKey + setCartTotalTax: SetCartTotalTax + setCountry: SetCartCountry + setCustomField: SetCartCustomField + setCustomLineItemCustomField: SetCartCustomLineItemCustomField + setCustomLineItemCustomType: SetCartCustomLineItemCustomType + setCustomLineItemShippingDetails: SetCartCustomLineItemShippingDetails + setCustomLineItemTaxAmount: SetCartCustomLineItemTaxAmount + setCustomLineItemTaxRate: SetCartCustomLineItemTaxRate + setCustomShippingMethod: SetCartCustomShippingMethod + setCustomType: SetCartCustomType + setCustomerEmail: SetCartCustomerEmail + setCustomerGroup: SetCartCustomerGroup + setCustomerId: SetCartCustomerId + setDeleteDaysAfterLastModification: SetCartDeleteDaysAfterLastModification + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + setDirectDiscounts: SetCartDirectDiscounts + setItemShippingAddressCustomField: SetCartItemShippingAddressCustomField + setItemShippingAddressCustomType: SetCartItemShippingAddressCustomType + setLineItemCustomField: SetCartLineItemCustomField + setLineItemCustomType: SetCartLineItemCustomType + setLineItemDistributionChannel: SetCartLineItemDistributionChannel + setLineItemPrice: SetCartLineItemPrice + setLineItemShippingDetails: SetCartLineItemShippingDetails + setLineItemSupplyChannel: SetCartLineItemSupplyChannel + setLineItemTaxAmount: SetCartLineItemTaxAmount + setLineItemTaxRate: SetCartLineItemTaxRate + setLineItemTotalPrice: SetCartLineItemTotalPrice + setLocale: SetCartLocale + setShippingAddress: SetCartShippingAddress + setShippingAddressCustomField: SetCartShippingAddressCustomField + setShippingAddressCustomType: SetCartShippingAddressCustomType + setShippingCustomField: SetCartShippingCustomField + setShippingCustomType: SetCartShippingCustomType + setShippingMethod: SetCartShippingMethod + setShippingMethodTaxAmount: SetCartShippingMethodTaxAmount + setShippingMethodTaxRate: SetCartShippingMethodTaxRate + setShippingRateInput: SetCartShippingRateInput + updateItemShippingAddress: UpdateCartItemShippingAddress +} + +input CartValueInput { + dummy: String +} + +type CartValueType implements ShippingRateInputType { + type: String! +} + +type CartsConfiguration { + deleteDaysAfterLastModification: Int + allowAddingUnpublishedProducts: Boolean! + countryTaxRateFallbackEnabled: Boolean! +} + +input CartsConfigurationInput { + deleteDaysAfterLastModification: Int +} + +type Category implements Versioned & ReferenceExpandable { + id: String! + key: String + version: Long! + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!]! + description( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + descriptionAllLocales: [LocalizedString!] + slug( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + slugAllLocales: [LocalizedString!]! + ancestorsRef: [Reference!]! + ancestors: [Category!]! + parentRef: Reference + parent: Category + orderHint: String! + externalId: String + metaTitle( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + metaTitleAllLocales: [LocalizedString!] + metaKeywords( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + metaKeywordsAllLocales: [LocalizedString!] + metaDescription( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + metaDescriptionAllLocales: [LocalizedString!] + + "Number of staged products in the category subtree." + stagedProductCount: Int! + + "Number of direct child categories." + childCount: Int! + + "Direct child categories." + children: [Category!] + createdAt: DateTime! + lastModifiedAt: DateTime! + assets: [Asset!]! + custom: CustomFieldsType + createdBy: Initiator + lastModifiedBy: Initiator +} + +type CategoryCreated implements MessagePayload { + category: Category! + type: String! +} + +input CategoryDraft { + key: String + name: [LocalizedStringItemInputType!]! + description: [LocalizedStringItemInputType!] + custom: CustomFieldsDraft + slug: [LocalizedStringItemInputType!]! + externalId: String + metaTitle: [LocalizedStringItemInputType!] + metaDescription: [LocalizedStringItemInputType!] + metaKeywords: [LocalizedStringItemInputType!] + orderHint: String + parent: ResourceIdentifierInput + assets: [AssetDraftInput!] = [] +} + +type CategoryLimitsProjection { + maxCategories: Limit! +} + +type CategoryOrderHint { + categoryId: String! + orderHint: String! +} + +input CategoryOrderHintInput { + uuid: String! + orderHint: String! +} + +type CategoryOrderHintProductSearch { + categoryId: String! + orderHint: String! +} + +type CategoryQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [Category!]! +} + +type CategorySlugChanged implements MessagePayload { + slug( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + oldSlug( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + slugAllLocales: [LocalizedString!]! + oldSlugAllLocales: [LocalizedString!] + type: String! +} + +input CategoryUpdateAction { + addAsset: AddCategoryAsset + changeAssetName: ChangeCategoryAssetName + changeAssetOrder: ChangeCategoryAssetOrder + changeName: ChangeCategoryName + changeOrderHint: ChangeCategoryOrderHint + changeSlug: ChangeCategorySlug + changeParent: ChangeCategoryParent + removeAsset: RemoveCategoryAsset + setAssetCustomField: SetCategoryAssetCustomField + setAssetCustomType: SetCategoryAssetCustomType + setAssetDescription: SetCategoryAssetDescription + setAssetKey: SetCategoryAssetKey + setAssetSources: SetCategoryAssetSources + setAssetTags: SetCategoryAssetTags + setCustomField: SetCategoryCustomField + setCustomType: SetCategoryCustomType + setDescription: SetCategoryDescription + setKey: SetCategoryKey + setMetaDescription: SetCategoryMetaDescription + setMetaKeywords: SetCategoryMetaKeywords + setMetaTitle: SetCategoryMetaTitle + setExternalId: SetCategoryExternalId +} + +input ChangeBusinessUnitAddress { + addressId: String + addressKey: String + address: AddressInput! +} + +input ChangeBusinessUnitAssociate { + associate: AssociateDraft! +} + +input ChangeBusinessUnitName { + name: String! +} + +input ChangeBusinessUnitParentUnit { + parentUnit: ResourceIdentifierInput! +} + +input ChangeBusinessUnitStatus { + status: BusinessUnitStatus! +} + +input ChangeCartCustomLineItemMoney { + customLineItemId: String! + money: BaseMoneyInput! +} + +input ChangeCartCustomLineItemPriceMode { + customLineItemId: String! + mode: CustomLineItemPriceMode! +} + +input ChangeCartCustomLineItemQuantity { + customLineItemId: String! + quantity: Long! +} + +input ChangeCartDiscountCartPredicate { + cartPredicate: String! +} + +input ChangeCartDiscountIsActive { + isActive: Boolean! +} + +input ChangeCartDiscountName { + name: [LocalizedStringItemInputType!]! +} + +input ChangeCartDiscountRequiresDiscountCode { + requiresDiscountCode: Boolean! +} + +input ChangeCartDiscountSortOrder { + sortOrder: String! +} + +input ChangeCartDiscountStackingMode { + stackingMode: StackingMode! +} + +input ChangeCartDiscountTarget { + target: CartDiscountTargetInput! +} + +input ChangeCartDiscountValue { + value: CartDiscountValueInput! +} + +input ChangeCartLineItemQuantity { + lineItemId: String! + quantity: Long! + externalPrice: BaseMoneyInput + externalTotalPrice: ExternalLineItemTotalPriceDraft +} + +input ChangeCartTaxCalculationMode { + taxCalculationMode: TaxCalculationMode! +} + +input ChangeCartTaxMode { + taxMode: TaxMode! +} + +input ChangeCartTaxRoundingMode { + taxRoundingMode: RoundingMode! +} + +input ChangeCategoryAssetName { + name: [LocalizedStringItemInputType!]! + assetKey: String + assetId: String +} + +input ChangeCategoryAssetOrder { + assetOrder: [String!]! +} + +input ChangeCategoryName { + name: [LocalizedStringItemInputType!]! +} + +input ChangeCategoryOrderHint { + orderHint: String! +} + +input ChangeCategoryParent { + parent: ResourceIdentifierInput! +} + +input ChangeCategorySlug { + slug: [LocalizedStringItemInputType!]! +} + +input ChangeChannelDescription { + description: [LocalizedStringItemInputType!] +} + +input ChangeChannelKey { + key: String! +} + +input ChangeChannelName { + name: [LocalizedStringItemInputType!] +} + +input ChangeCustomerAddress { + addressId: String + addressKey: String + address: AddressInput! +} + +input ChangeCustomerEmail { + email: String! +} + +input ChangeCustomerGroupName { + name: String! +} + +input ChangeDiscountCodeCartDiscounts { + cartDiscounts: [ResourceIdentifierInput!]! +} + +input ChangeDiscountCodeGroups { + groups: [String!]! +} + +input ChangeDiscountCodeIsActive { + isActive: Boolean! +} + +input ChangeExtensionDestination { + destination: ExtensionDestinationInput! +} + +input ChangeExtensionTriggers { + triggers: [TriggerInput!]! +} + +input ChangeInventoryEntryQuantity { + quantity: Long! +} + +input ChangeMyBusinessUnitAddress { + addressId: String + addressKey: String + address: AddressInput! +} + +input ChangeMyBusinessUnitAssociate { + associate: AssociateDraft! +} + +input ChangeMyBusinessUnitName { + name: String! +} + +input ChangeMyBusinessUnitParentUnit { + parentUnit: ResourceIdentifierInput! +} + +input ChangeMyCartTaxMode { + taxMode: TaxMode! +} + +input ChangeMyQuoteMyQuoteState { + quoteState: MyQuoteState! +} + +input ChangeOrderPaymentState { + paymentState: PaymentState! +} + +input ChangeOrderShipmentState { + shipmentState: ShipmentState! +} + +input ChangeOrderState { + orderState: OrderState! +} + +input ChangePaymentAmountPlanned { + amount: MoneyInput! +} + +input ChangePaymentTransactionInteractionId { + transactionId: String! + interactionId: String! +} + +input ChangePaymentTransactionState { + transactionId: String! + state: TransactionState! +} + +input ChangePaymentTransactionTimestamp { + transactionId: String! + timestamp: DateTime! +} + +input ChangeProductAssetName { + variantId: Int + sku: String + staged: Boolean = true + name: [LocalizedStringItemInputType!]! + assetKey: String + assetId: String +} + +input ChangeProductAssetOrder { + variantId: Int + sku: String + staged: Boolean = true + assetOrder: [String!]! +} + +input ChangeProductDiscountIsActive { + isActive: Boolean! +} + +input ChangeProductDiscountName { + name: [LocalizedStringItemInputType!]! +} + +input ChangeProductDiscountPredicate { + predicate: String! +} + +input ChangeProductDiscountSortOrder { + sortOrder: String! +} + +input ChangeProductDiscountValue { + value: ProductDiscountValueInput! +} + +input ChangeProductImageLabel { + variantId: Int + sku: String + imageUrl: String! + label: String + staged: Boolean = true +} + +input ChangeProductMasterVariant { + variantId: Int + sku: String + staged: Boolean = true +} + +input ChangeProductName { + name: [LocalizedStringItemInputType!]! + staged: Boolean = true +} + +input ChangeProductPrice { + priceId: String + variantId: Int + sku: String + price: ProductPriceDataInput! + staged: Boolean = true +} + +input ChangeProductSelectionName { + name: [LocalizedStringItemInputType!]! +} + +input ChangeProductSlug { + slug: [LocalizedStringItemInputType!]! + staged: Boolean = true +} + +input ChangeProjectSettingsCartsConfiguration { + cartsConfiguration: CartsConfigurationInput! +} + +input ChangeProjectSettingsCountries { + countries: [Country!]! +} + +input ChangeProjectSettingsCountryTaxRateFallbackEnabled { + countryTaxRateFallbackEnabled: Boolean! +} + +input ChangeProjectSettingsCurrencies { + currencies: [Currency!]! +} + +input ChangeProjectSettingsLanguages { + languages: [Locale!]! +} + +input ChangeProjectSettingsMessagesConfiguration { + messagesConfiguration: MessagesConfigurationDraft! +} + +input ChangeProjectSettingsMessagesEnabled { + messagesEnabled: Boolean! +} + +input ChangeProjectSettingsMyBusinessUnitStatusOnCreation { + status: BusinessUnitStatus! +} + +input ChangeProjectSettingsName { + name: String! +} + +input ChangeProjectSettingsOrderSearchStatus { + status: OrderSearchStatus! +} + +input ChangeProjectSettingsProductSearchIndexingEnabled { + enabled: Boolean! +} + +input ChangeProjectSettingsShoppingListsConfiguration { + shoppingListsConfiguration: ShoppingListsConfigurationInput! +} + +input ChangeQuoteRequestState { + quoteRequestState: QuoteRequestState! +} + +input ChangeQuoteState { + quoteState: MyQuoteState! +} + +input ChangeShippingMethodIsDefault { + isDefault: Boolean! +} + +input ChangeShippingMethodName { + name: String! +} + +input ChangeShippingMethodTaxCategory { + taxCategory: ResourceIdentifierInput! +} + +input ChangeShoppingListLineItemQuantity { + lineItemId: String! + quantity: Int! +} + +input ChangeShoppingListLineItemsOrder { + lineItemOrder: [String!]! +} + +input ChangeShoppingListName { + name: [LocalizedStringItemInputType!]! +} + +input ChangeShoppingListTextLineItemName { + textLineItemId: String! + name: [LocalizedStringItemInputType!]! +} + +input ChangeShoppingListTextLineItemQuantity { + textLineItemId: String! + quantity: Int! +} + +input ChangeShoppingListTextLineItemsOrder { + textLineItemOrder: [String!]! +} + +input ChangeStagedOrderCustomLineItemMoney { + customLineItemId: String! + money: BaseMoneyInput! +} + +type ChangeStagedOrderCustomLineItemMoneyOutput implements StagedOrderUpdateActionOutput { + type: String! + customLineItemId: String! + money: BaseMoney! +} + +input ChangeStagedOrderCustomLineItemQuantity { + customLineItemId: String! + quantity: Long! +} + +type ChangeStagedOrderCustomLineItemQuantityOutput implements StagedOrderUpdateActionOutput { + type: String! + customLineItemId: String! + quantity: Long! +} + +input ChangeStagedOrderLineItemQuantity { + lineItemId: String! + quantity: Long! + externalPrice: BaseMoneyInput + externalTotalPrice: ExternalLineItemTotalPriceDraft +} + +type ChangeStagedOrderLineItemQuantityOutput implements StagedOrderUpdateActionOutput { + type: String! + lineItemId: String! + quantity: Long! + externalPrice: BaseMoney + externalTotalPrice: ExternalLineItemTotalPrice +} + +input ChangeStagedOrderOrderState { + orderState: OrderState! +} + +type ChangeStagedOrderOrderStateOutput implements StagedOrderUpdateActionOutput { + type: String! + orderState: OrderState! +} + +input ChangeStagedOrderPaymentState { + paymentState: PaymentState! +} + +type ChangeStagedOrderPaymentStateOutput implements StagedOrderUpdateActionOutput { + type: String! + paymentState: PaymentState! +} + +input ChangeStagedOrderShipmentState { + shipmentState: ShipmentState! +} + +type ChangeStagedOrderShipmentStateOutput implements StagedOrderUpdateActionOutput { + type: String! + shipmentState: ShipmentState! +} + +input ChangeStagedOrderTaxCalculationMode { + taxCalculationMode: TaxCalculationMode! +} + +type ChangeStagedOrderTaxCalculationModeOutput implements StagedOrderUpdateActionOutput { + type: String! + taxCalculationMode: TaxCalculationMode! +} + +input ChangeStagedOrderTaxMode { + taxMode: TaxMode! +} + +type ChangeStagedOrderTaxModeOutput implements StagedOrderUpdateActionOutput { + type: String! + taxMode: TaxMode! +} + +input ChangeStagedOrderTaxRoundingMode { + taxRoundingMode: RoundingMode! +} + +type ChangeStagedOrderTaxRoundingModeOutput implements StagedOrderUpdateActionOutput { + type: String! + taxRoundingMode: RoundingMode! +} + +input ChangeStagedQuoteState { + stagedQuoteState: StagedQuoteState! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input ChangeStandalonePriceActive { + active: Boolean! +} + +input ChangeStandalonePriceValue { + value: BaseMoneyInput! + + """ + default is `false` + BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta + """ + staged: Boolean +} + +input ChangeStateInitial { + initial: Boolean! +} + +input ChangeStateKey { + key: String! +} + +input ChangeStateType { + type: StateType! +} + +input ChangeStoreProductSelectionActive { + productSelection: ResourceIdentifierInput! + active: Boolean! +} + +type ChangeSubscription { + resourceTypeId: String! +} + +input ChangeSubscriptionDestination { + destination: DestinationInput! +} + +input ChangeSubscriptionInput { + resourceTypeId: String! +} + +input ChangeTypeEnumValueLabel { + fieldName: String! + value: EnumValueInput! +} + +input ChangeTypeEnumValueOrder { + fieldName: String! + keys: [String!]! +} + +input ChangeTypeFieldDefinitionOrder { + fieldNames: [String!]! +} + +input ChangeTypeInputHint { + fieldName: String! + inputHint: TextInputHint! +} + +input ChangeTypeKey { + key: String! +} + +input ChangeTypeLabel { + fieldName: String! + label: [LocalizedStringItemInputType!]! +} + +input ChangeTypeLocalizedEnumValueLabel { + fieldName: String! + value: LocalizedEnumValueInput! +} + +input ChangeTypeLocalizedEnumValueOrder { + fieldName: String! + keys: [String!]! +} + +input ChangeTypeName { + name: [LocalizedStringItemInputType!]! +} + +input ChangeZoneName { + name: String! +} + +type Channel implements Versioned & ReviewTarget & ReferenceExpandable { + id: String! + version: Long! + key: String! + roles: [ChannelRole!]! + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!] + description( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + descriptionAllLocales: [LocalizedString!] + address: Address + geoLocation: Geometry + createdAt: DateTime! + lastModifiedAt: DateTime! + reviewRatingStatistics: ReviewRatingStatistics + custom: CustomFieldsType + createdBy: Initiator + lastModifiedBy: Initiator +} + +input ChannelDraft { + key: String! + roles: [ChannelRole!]! + name: [LocalizedStringItemInputType!] + description: [LocalizedStringItemInputType!] + custom: CustomFieldsDraft + address: AddressInput + geoLocation: GeometryInput +} + +type ChannelQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [Channel!]! +} + +type ChannelReferenceIdentifier { + typeId: String! + id: String + key: String +} + +enum ChannelRole { + "Role tells that this channel can be used to track inventory entries.Channels with this role can be treated as warehouses" + InventorySupply + + "Role tells that this channel can be used to expose products to a specific distribution channel. It can be used by the cart to select a product price." + ProductDistribution + + "Role tells that this channel can be used to track order export activities." + OrderExport + + "Role tells that this channel can be used to track order import activities." + OrderImport + + "This role can be combined with some other roles (e.g. with `InventorySupply`) to represent the fact that this particular channel is the primary/master channel among the channels of the same type." + Primary +} + +input ChannelUpdateAction { + addRoles: AddChannelRoles + changeDescription: ChangeChannelDescription + changeKey: ChangeChannelKey + changeName: ChangeChannelName + removeRoles: RemoveChannelRoles + setAddress: SetChannelAddress + setAddressCustomField: SetChannelAddressCustomField + setAddressCustomType: SetChannelAddressCustomType + setCustomField: SetChannelCustomField + setCustomType: SetChannelCustomType + setGeoLocation: SetChannelGeoLocation + setRoles: SetChannelRoles +} + +type ClassificationShippingRateInput implements ShippingRateInput { + key: String! + type: String! + labelAllLocales: [LocalizedString!]! + label( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String +} + +input ClassificationShippingRateInputDraft { + key: String! +} + +type ClassificationShippingRateInputDraftOutput implements ShippingRateInputDraftOutput { + key: String! + type: String! +} + +type CloudEventsSubscriptionsFormat implements NotificationFormat { + type: String! + cloudEventsVersion: String! +} + +input CloudEventsSubscriptionsFormatInput { + cloudEventsVersion: String! +} + +type CommercetoolsSubscription implements Versioned { + key: String + destination: Destination! + messages: [MessageSubscription!]! + changes: [ChangeSubscription!]! + format: NotificationFormat! + status: SubscriptionHealthStatus! + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +type CommercetoolsSubscriptionQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [CommercetoolsSubscription!]! +} + +"[ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) country code." +scalar Country + +input CreateApiClient { + name: String! + scope: String! + deleteDaysAfterCreation: Int + accessTokenValiditySeconds: Int + refreshTokenValiditySeconds: Int +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input CreateProductSelectionDraft { + key: String + name: [LocalizedStringItemInputType!]! + custom: CustomFieldsDraft +} + +input CreateStandalonePrice { + key: String + sku: String! + value: BaseMoneyInput! + country: Country + customerGroup: ResourceIdentifierInput + channel: ResourceIdentifierInput + validFrom: DateTime + validUntil: DateTime + tiers: [ProductPriceTierInput!] = [] + custom: StandalonePriceCustomField + discounted: DiscountedProductPriceValueInput + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + active: Boolean! = true +} + +input CreateStore { + key: String! + name: [LocalizedStringItemInputType!] + languages: [Locale!] + distributionChannels: [ResourceIdentifierInput!] + supplyChannels: [ResourceIdentifierInput!] + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + productSelections: [ProductSelectionSettingDraft!] + custom: CustomFieldsDraft +} + +input CreateZone { + name: String! + key: String + description: String + locations: [ZoneLocation!] = [] +} + +"Represents a currency. Currencies are identified by their [ISO 4217](http://www.iso.org/iso/home/standards/currency_codes.htm) currency codes." +scalar Currency + +interface CustomField { + name: String! +} + +""" +A key-value pair representing the field name and value of one single custom field. + +The value of this custom field consists of escaped JSON based on the FieldDefinition of the Type. + +Examples for `value`: + +* FieldType `String`: `"\"This is a string\""` +* FieldType `DateTimeType`: `"\"2018-10-12T14:00:00.000Z\""` +* FieldType `Number`: `"4"` +* FieldType `Set` with an elementType of `String`: `"[\"This is a string\", \"This is another string\"]"` +* FieldType `Reference`: `"{\"id\", \"b911b62d-353a-4388-93ee-8d488d9af962\", \"typeId\", \"product\"}"` +""" +input CustomFieldInput { + name: String! + + """ + The value of this custom field consists of escaped JSON based on the FieldDefinition of the Type. + + Examples for `value`: + + * FieldType `String`: `"\"This is a string\""` + * FieldType `DateTimeType`: `"\"2018-10-12T14:00:00.000Z\""` + * FieldType `Number`: `"4"` + * FieldType `Set` with an elementType of `String`: `"[\"This is a string\", \"This is another string\"]"` + * FieldType `Reference`: `"{\"id\", \"b911b62d-353a-4388-93ee-8d488d9af962\", \"typeId\", \"product\"}"` + """ + value: String! +} + +type CustomFieldsCommand { + typeId: String + typeKey: String + fields: Json! + typeResId: ResourceIdentifier +} + +input CustomFieldsDraft { + typeId: String + typeKey: String + type: ResourceIdentifierInput + fields: [CustomFieldInput!] +} + +type CustomFieldsType { + typeRef: Reference! + type: TypeDefinition + + "This field contains non-typed data." + customFieldsRaw( + """ + The names of the custom fields to include. + + If neither `includeNames` nor `excludeNames` are provided, then all custom fields are returned. + """ + includeNames: [String!], + + """ + The names of the custom fields to exclude. + + If neither `includeNames` nor `excludeNames` are provided, then all custom fields are returned. + """ + excludeNames: [String!]): [RawCustomField!] +} + +"A custom line item is a generic item that can be added to the cart but is not bound to a product. You can use it for discounts (negative money), vouchers, complex cart rules, additional services or fees. You control the lifecycle of this item." +type CustomLineItem { + id: String! + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!]! + money: BaseMoney! + totalPrice: Money! + slug: String! + quantity: Long! + state: [ItemState!]! + taxCategory: TaxCategory + taxCategoryRef: Reference + taxRate: TaxRate + taxedPrice: TaxedItemPrice + discountedPricePerQuantity: [DiscountedLineItemPriceForQuantity!]! + custom: CustomFieldsType + shippingDetails: ItemShippingDetails + priceMode: CustomLineItemPriceMode! +} + +input CustomLineItemDraft { + name: [LocalizedStringItemInputType!]! + money: BaseMoneyInput! + slug: String! + taxCategory: ReferenceInput + externalTaxRate: ExternalTaxRateDraft + quantity: Long + custom: CustomFieldsDraft + shippingDetails: ItemShippingDetailsDraft + priceMode: CustomLineItemPriceMode +} + +type CustomLineItemDraftOutput { + money: BaseMoney! + slug: String! + externalTaxRate: ExternalTaxRateDraftOutput + quantity: Long + custom: CustomFieldsCommand + shippingDetails: ItemShippingDetailsDraftOutput + priceMode: CustomLineItemPriceMode! + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + taxCategoryResId: ResourceIdentifier + nameAllLocales: [LocalizedString!]! +} + +input CustomLineItemImportDraft { + name: [LocalizedStringItemInputType!]! + quantity: Long! + money: BaseMoneyInput! + slug: String! + state: [ItemStateDraftType!] + taxRate: TaxRateInput + taxCategory: ResourceIdentifierInput + custom: CustomFieldsDraft + shippingDetails: ItemShippingDetailsDraft + priceMode: CustomLineItemPriceMode +} + +enum CustomLineItemPriceMode { + "Cart discounts are deactivated for the custom line items with this price mode." + External + + "This is the default mode." + Standard +} + +type CustomLineItemReturnItem implements ReturnItem { + type: String! + customLineItemId: String! + id: String! + quantity: Long! + comment: String + shipmentState: ReturnShipmentState! + paymentState: ReturnPaymentState! + custom: CustomFieldsType + lastModifiedAt: DateTime! + createdAt: DateTime! +} + +type CustomLineItemStateTransition implements MessagePayload & OrderMessagePayload { + customLineItemId: String! + transitionDate: DateTime! + quantity: Long! + fromState: State + toState: State + fromStateRef: Reference! + toStateRef: Reference! + type: String! +} + +type CustomLineItemsTarget implements CartDiscountTarget { + predicate: String! + type: String! +} + +input CustomLineItemsTargetInput { + predicate: String! +} + +type CustomObject implements Versioned & ReferenceExpandable { + container: String! + key: String! + value: Json! + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +""" +An input object used to create a new, or update an existing Custom Object. + +The value should be passed in a form of escaped JSON. + +Example for `value` field: + +``` +"{ \"stringField\": \"myVal\", \"numberField\": 123, \"boolField\": false, \"nestedObject\": { \"nestedObjectKey\": \"anotherValue\" }, \"dateField\": \"2018-10-12T14:00:00.000Z\" }" +``` +""" +input CustomObjectDraft { + key: String! + container: String! + + """ + The value should be passed in a form of escaped JSON. + + Example for `value` field: + + ``` + "{ \"stringField\": \"myVal\", \"numberField\": 123, \"boolField\": false, \"nestedObject\": { \"nestedObjectKey\": \"anotherValue\" }, \"dateField\": \"2018-10-12T14:00:00.000Z\" }" + ``` + """ + value: String! + version: Long +} + +type CustomObjectLimitWithCurrent implements LimitWithCurrent { + limit: Long + current: Long! +} + +type CustomObjectLimitsProjection { + total: CustomObjectLimitWithCurrent! +} + +type CustomObjectQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [CustomObject!]! +} + +type CustomSuggestTokenizer implements SuggestTokenizer { + inputs: [String!]! + type: String! +} + +input CustomSuggestTokenizerInput { + inputs: [String!]! +} + +type CustomSuggestTokenizerProductSearch implements SuggestTokenizerProductSearch { + inputs: [String!]! + type: String! +} + +"A customer is a person purchasing products. Carts, Orders and Reviews can be associated to a customer." +type Customer implements Versioned & ReferenceExpandable { + customerNumber: String + email: String! + addresses: [Address!]! + defaultShippingAddressId: String + defaultBillingAddressId: String + shippingAddressIds: [String!]! + billingAddressIds: [String!]! + isEmailVerified: Boolean! + customerGroupRef: Reference + externalId: String + key: String + authenticationMode: AuthenticationMode + firstName: String + lastName: String + middleName: String + title: String + locale: Locale + salutation: String + dateOfBirth: Date + companyName: String + vatId: String + password: String + customerGroup: CustomerGroup + defaultShippingAddress: Address + defaultBillingAddress: Address + shippingAddresses: [Address!]! + billingAddresses: [Address!]! + storesRef: [KeyReference!]! + stores: [Store!]! + custom: CustomFieldsType + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +"A field to access a customer's active cart." +interface CustomerActiveCartInterface { + customerActiveCart(customerId: String!): Cart +} + +type CustomerAddressAdded implements MessagePayload { + address: Address! + type: String! +} + +type CustomerAddressChanged implements MessagePayload { + address: Address! + type: String! +} + +type CustomerAddressRemoved implements MessagePayload { + address: Address! + type: String! +} + +type CustomerCompanyNameSet implements MessagePayload { + companyName: String + type: String! +} + +type CustomerCreated implements MessagePayload { + customer: Customer! + type: String! +} + +type CustomerDateOfBirthSet implements MessagePayload { + dateOfBirth: Date + type: String! +} + +type CustomerDeleted implements MessagePayload { + type: String! +} + +type CustomerEmailChanged implements MessagePayload { + email: String! + type: String! +} + +type CustomerEmailToken implements Versioned { + customerId: String! + expiresAt: DateTime! + value: String! + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +type CustomerEmailVerified implements MessagePayload { + type: String! +} + +type CustomerFirstNameSet implements MessagePayload { + firstName: String + type: String! +} + +"A customer can be a member in a customer group (e.g. reseller, gold member). A customer group can be used in price calculations with special prices being assigned to certain customer groups." +type CustomerGroup implements Versioned & ReferenceExpandable { + id: String! + version: Long! + name: String! + key: String + createdAt: DateTime! + lastModifiedAt: DateTime! + custom: CustomFieldsType + createdBy: Initiator + lastModifiedBy: Initiator +} + +input CustomerGroupDraft { + groupName: String! + key: String + custom: CustomFieldsDraft +} + +type CustomerGroupLimitWithCurrent implements LimitWithCurrent { + limit: Long + current: Long! +} + +type CustomerGroupLimitsProjection { + total: CustomerGroupLimitWithCurrent! +} + +type CustomerGroupQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [CustomerGroup!]! +} + +type CustomerGroupReferenceIdentifier { + typeId: String! + id: String + key: String +} + +type CustomerGroupSet implements MessagePayload { + customerGroup: CustomerGroup + customerGroupRef: Reference + type: String! +} + +input CustomerGroupUpdateAction { + changeName: ChangeCustomerGroupName + setKey: SetCustomerGroupKey + setCustomType: SetCustomerGroupCustomType + setCustomField: SetCustomerGroupCustomField +} + +type CustomerLastNameSet implements MessagePayload { + lastName: String + type: String! +} + +type CustomerLimitWithCurrent implements LimitWithCurrent { + limit: Long + current: Long! +} + +type CustomerLimitsProjection { + total: CustomerLimitWithCurrent! +} + +type CustomerPasswordToken implements Versioned { + customerId: String! + expiresAt: DateTime! + value: String! + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +type CustomerPasswordUpdated implements MessagePayload { + reset: Boolean! + type: String! +} + +"Fields to access customer accounts. Includes direct access to a single customer and searching for customers." +interface CustomerQueryInterface { + customer( + "Queries a customer with specified email token" + emailToken: String, + + "Queries a customer with specified password token" + passwordToken: String, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Customer + customers(where: String, sort: [String!], limit: Int, offset: Int): CustomerQueryResult! +} + +type CustomerQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [Customer!]! +} + +input CustomerSignInDraft { + email: String! + password: String! + + "This field will be deprecated in favour of anonymousCart.id." + anonymousCartId: String + anonymousCart: ResourceIdentifierInput + anonymousCartSignInMode: AnonymousCartSignInMode = MergeWithExistingCustomerCart + anonymousId: String + updateProductData: Boolean = false +} + +type CustomerSignInResult { + customer: Customer! + cart: Cart +} + +input CustomerSignMeInDraft { + email: String! + password: String! + activeCartSignInMode: AnonymousCartSignInMode = MergeWithExistingCustomerCart + updateProductData: Boolean = false +} + +input CustomerSignMeUpDraft { + email: String! + password: String + firstName: String + lastName: String + middleName: String + title: String + dateOfBirth: Date + companyName: String + vatId: String + addresses: [AddressInput!] = [] + + "The index of the address in the `addresses` list. The `defaultBillingAddressId` of the customer will be set to the ID of that address." + defaultBillingAddress: Int + + "The index of the address in the `addresses` list. The `defaultShippingAddressId` of the customer will be set to the ID of that address." + defaultShippingAddress: Int + + "The indices of the shipping addresses in the `addresses` list. The `shippingAddressIds` of the `Customer` will be set to the IDs of that addresses." + shippingAddresses: [Int!] = [] + + "The indices of the billing addresses in the `addresses` list. The `billingAddressIds` of the customer will be set to the IDs of that addresses." + billingAddresses: [Int!] = [] + custom: CustomFieldsDraft + locale: Locale + salutation: String + key: String + stores: [ResourceIdentifierInput!] +} + +input CustomerSignUpDraft { + email: String! + password: String + firstName: String + lastName: String + middleName: String + title: String + dateOfBirth: Date + companyName: String + vatId: String + addresses: [AddressInput!] = [] + + "The index of the address in the `addresses` list. The `defaultBillingAddressId` of the customer will be set to the ID of that address." + defaultBillingAddress: Int + + "The index of the address in the `addresses` list. The `defaultShippingAddressId` of the customer will be set to the ID of that address." + defaultShippingAddress: Int + + "The indices of the shipping addresses in the `addresses` list. The `shippingAddressIds` of the `Customer` will be set to the IDs of that addresses." + shippingAddresses: [Int!] = [] + + "The indices of the billing addresses in the `addresses` list. The `billingAddressIds` of the customer will be set to the IDs of that addresses." + billingAddresses: [Int!] = [] + custom: CustomFieldsDraft + locale: Locale + salutation: String + key: String + stores: [ResourceIdentifierInput!] + customerNumber: String + + "This field will be deprecated in favour of anonymousCart.id." + anonymousCartId: String + anonymousCart: ResourceIdentifierInput + externalId: String + customerGroup: ResourceIdentifierInput + isEmailVerified: Boolean + anonymousId: String + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + authenticationMode: AuthenticationMode +} + +type CustomerTitleSet implements MessagePayload { + title: String + type: String! +} + +input CustomerUpdateAction { + addAddress: AddCustomerAddress + addBillingAddressId: AddCustomerBillingAddressId + addShippingAddressId: AddCustomerShippingAddressId + addStore: AddCustomerStore + changeAddress: ChangeCustomerAddress + changeEmail: ChangeCustomerEmail + removeAddress: RemoveCustomerAddress + removeBillingAddressId: RemoveCustomerBillingAddressId + removeShippingAddressId: RemoveCustomerShippingAddressId + removeStore: RemoveCustomerStore + setCompanyName: SetCustomerCompanyName + setAddressCustomField: SetCustomerAddressCustomField + setAddressCustomType: SetCustomerAddressCustomType + setAuthenticationMode: SetCustomerAuthenticationMode + setCustomField: SetCustomerCustomField + setCustomType: SetCustomerCustomType + setCustomerGroup: SetCustomerGroup + setKey: SetCustomerKey + setLocale: SetCustomerLocale + setCustomerNumber: SetCustomerNumber + setDateOfBirth: SetCustomerDateOfBirth + setDefaultBillingAddress: SetCustomerDefaultBillingAddress + setDefaultShippingAddress: SetCustomerDefaultShippingAddress + setExternalId: SetCustomerExternalId + setFirstName: SetCustomerFirstName + setLastName: SetCustomerLastName + setMiddleName: SetCustomerMiddleName + setSalutation: SetCustomerSalutation + setStores: SetCustomerStores + setTitle: SetCustomerTitle + setVatId: SetCustomerVatId +} + +"DateTime is a scalar value that represents an ISO8601 formatted date." +scalar Date + +type DateAttribute implements Attribute { + value: Date! + name: String! +} + +type DateAttributeDefinitionType implements AttributeDefinitionType { + name: String! +} + +type DateField implements CustomField { + value: Date! + name: String! +} + +"DateTime is a scalar value that represents an ISO8601 formatted date and time." +scalar DateTime + +type DateTimeAttribute implements Attribute { + value: DateTime! + name: String! +} + +type DateTimeAttributeDefinitionType implements AttributeDefinitionType { + name: String! +} + +type DateTimeField implements CustomField { + value: DateTime! + name: String! +} + +type DateTimeType implements FieldType { + name: String! +} + +type DateType implements FieldType { + name: String! +} + +type Delivery { + id: String! + createdAt: DateTime! + items: [DeliveryItem!]! + parcels: [Parcel!]! + address: Address + custom: CustomFieldsType +} + +type DeliveryAdded implements MessagePayload & OrderMessagePayload { + delivery: Delivery! + shippingKey: String + type: String! +} + +type DeliveryAddressSet implements MessagePayload & OrderMessagePayload { + deliveryId: String! + address: Address + oldAddress: Address + shippingKey: String + type: String! +} + +input DeliveryDraft { + items: [DeliveryItemDraftType!]! + parcels: [ParcelDraft!]! + address: AddressInput + custom: CustomFieldsDraft +} + +type DeliveryItem { + id: String! + quantity: Long! +} + +input DeliveryItemDraftType { + id: String! + quantity: Long! +} + +type DeliveryItemsUpdated implements MessagePayload & OrderMessagePayload { + deliveryId: String! + items: [DeliveryItem!]! + oldItems: [DeliveryItem!]! + shippingKey: String + type: String! +} + +type DeliveryRemoved implements MessagePayload & OrderMessagePayload { + delivery: Delivery! + shippingKey: String + type: String! +} + +interface Destination { + type: String! +} + +input DestinationInput { + SQS: SQSDestinationInput + SNS: SNSDestinationInput + AzureServiceBus: AzureServiceBusDestinationInput + EventGrid: EventGridDestinationInput + GoogleCloudPubSub: GoogleCloudPubSubDestinationInput + EventBridge: EventBridgeDestinationInput +} + +type Dimensions { + width: Int! + height: Int! +} + +input DimensionsInput { + width: Int! + height: Int! +} + +type DimensionsProductSearch { + width: Int! + height: Int! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type DirectDiscount { + id: String! + value: CartDiscountValue! + target: CartDiscountTarget +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input DirectDiscountDraft { + value: CartDiscountValueInput! + target: CartDiscountTargetInput +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type DirectDiscountDraftOutput { + value: CartDiscountValue! + target: CartDiscountTarget +} + +"With discount codes it is possible to give specific cart discounts to an eligible amount of users. They are defined by a string value which can be added to a cart so that specific cart discounts can be applied to the cart." +type DiscountCode implements Versioned & ReferenceExpandable { + code: String! + isActive: Boolean! + maxApplications: Long + maxApplicationsPerCustomer: Long + cartPredicate: String + applicationVersion: Long + validFrom: DateTime + validUntil: DateTime + groups: [String!]! + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + description( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + cartDiscounts: [CartDiscount!]! + referenceRefs: [Reference!]! + nameAllLocales: [LocalizedString!] + descriptionAllLocales: [LocalizedString!] + custom: CustomFieldsType + + "How many times this discount code was applied (only applications that were part of a successful checkout are considered)" + applicationCount: Long! + cartDiscountRefs: [Reference!]! + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +input DiscountCodeDraft { + code: String! + name: [LocalizedStringItemInputType!] + description: [LocalizedStringItemInputType!] + cartDiscounts: [ReferenceInput!]! + isActive: Boolean = true + maxApplications: Long + maxApplicationsPerCustomer: Long + cartPredicate: String + custom: CustomFieldsDraft + validFrom: DateTime + validUntil: DateTime + groups: [String!] = [] +} + +type DiscountCodeInfo { + discountCodeRef: Reference! + state: DiscountCodeState + discountCode: DiscountCode +} + +type DiscountCodeQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [DiscountCode!]! +} + +enum DiscountCodeState { + "The discount code is active and none of the discounts were applied because the discount application was stopped by one discount that has the StackingMode of StopAfterThisDiscount defined" + ApplicationStoppedByPreviousDiscount + + "The discount code is not valid or it does not contain any valid cart discounts. Validity is determined based on the validFrom and validUntil dates" + NotValid + + "maxApplications or maxApplicationsPerCustomer for discountCode has been reached." + MaxApplicationReached + + "The discount code is active and it contains at least one active and valid CartDiscount. The discount code cartPredicate matches the cart and at least one of the contained active discount\u2019s cart predicates matches the cart." + MatchesCart + + "The discount code is active and it contains at least one active and valid CartDiscount. But its cart predicate does not match the cart or none of the contained active discount\u2019s cart predicates match the cart" + DoesNotMatchCart + + "The discount code is not active or it does not contain any active cart discounts." + NotActive +} + +input DiscountCodeUpdateAction { + changeCartDiscounts: ChangeDiscountCodeCartDiscounts + changeGroups: ChangeDiscountCodeGroups + changeIsActive: ChangeDiscountCodeIsActive + setCartPredicate: SetDiscountCodeCartPredicate + setCustomField: SetDiscountCodeCustomField + setCustomType: SetDiscountCodeCustomType + setDescription: SetDiscountCodeDescription + setMaxApplications: SetDiscountCodeMaxApplications + setMaxApplicationsPerCustomer: SetDiscountCodeMaxApplicationsPerCustomer + setName: SetDiscountCodeName + setValidFrom: SetDiscountCodeValidFrom + setValidFromAndUntil: SetDiscountCodeValidFromAndUntil + setValidUntil: SetDiscountCodeValidUntil +} + +type DiscountedLineItemPortion { + discount: CartDiscount + discountRef: Reference! + discountedAmount: BaseMoney! +} + +input DiscountedLineItemPortionDraft { + discount: ReferenceInput! + discountedAmount: BaseMoneyInput! +} + +type DiscountedLineItemPrice { + value: BaseMoney! + includedDiscounts: [DiscountedLineItemPortion!]! +} + +input DiscountedLineItemPriceDraft { + value: BaseMoneyInput! + includedDiscounts: [DiscountedLineItemPortionDraft!] = [] +} + +type DiscountedLineItemPriceForQuantity { + quantity: Long! + discountedPrice: DiscountedLineItemPrice! +} + +type DiscountedProductPriceValue { + value: BaseMoney! + discountRef: Reference! + discount: ProductDiscount +} + +input DiscountedProductPriceValueInput { + value: BaseMoneyInput! + discount: ReferenceInput! +} + +type DiscountedProductSearchPriceValue { + value: BaseMoney! + discountRef: Reference! + discount: ProductDiscount +} + +type EnumAttribute implements Attribute { + key: String! + label: String! + name: String! +} + +type EnumAttributeDefinitionType implements AttributeDefinitionType { + values( + """ + The keys of the enum values to include. + + If neither `includeKeys` nor `excludeKeys` are provided, then all enum values are returned. + """ + includeKeys: [String!], + + """ + The keys of the enum values to exclude. + + If neither `includeKeys` nor `excludeKeys` are provided, then all enum values are returned. + """ + excludeKeys: [String!], limit: Int, offset: Int, sort: [String!]): PlainEnumValueResult! + name: String! +} + +type EnumField implements CustomField { + key: String! + name: String! +} + +type EnumType implements FieldType { + values: [EnumValue!]! + name: String! +} + +input EnumTypeDraft { + values: [PlainEnumValueDraft!]! +} + +type EnumValue { + key: String! + label: String! +} + +input EnumValueInput { + key: String! + label: String! +} + +type EventBridgeDestination implements Destination { + source: String! + region: String! + accountId: String! + type: String! +} + +input EventBridgeDestinationInput { + region: String! + accountId: String! +} + +type EventGridDestination implements Destination { + uri: String! + accessKey: String! + type: String! +} + +input EventGridDestinationInput { + uri: String! + accessKey: String! +} + +input ExistsFilterInput { + path: String! +} + +type Extension implements Versioned & ReferenceExpandable { + key: String + destination: ExtensionDestination! + triggers: [Trigger!]! + timeoutInMs: Int + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +interface ExtensionDestination { + type: String! +} + +input ExtensionDestinationInput { + HTTP: HttpDestinationInput + AWSLambda: AWSLambdaDestinationInput +} + +input ExtensionDraft { + key: String + destination: ExtensionDestinationInput! + triggers: [TriggerInput!]! + timeoutInMs: Int +} + +type ExtensionLimitsProjection { + timeoutInMs: Limit! +} + +type ExtensionQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [Extension!]! +} + +input ExtensionUpdateAction { + changeDestination: ChangeExtensionDestination + changeTriggers: ChangeExtensionTriggers + setKey: SetExtensionKey + setTimeoutInMs: SetExtensionTimeoutInMs +} + +type ExternalDiscountValue implements ProductDiscountValue { + type: String! +} + +input ExternalDiscountValueInput { + dummy: String +} + +type ExternalLineItemTotalPrice { + price: BaseMoney! + totalPrice: Money! +} + +input ExternalLineItemTotalPriceDraft { + price: BaseMoneyInput! + totalPrice: MoneyInput! +} + +type ExternalOAuth { + url: String! + authorizationHeader: String! +} + +input ExternalOAuthDraft { + url: String! + authorizationHeader: String! +} + +input ExternalTaxAmountDraft { + totalGross: MoneyInput! + taxRate: ExternalTaxRateDraft! +} + +type ExternalTaxAmountDraftOutput { + totalGross: Money! + taxRate: ExternalTaxRateDraftOutput! +} + +input ExternalTaxRateDraft { + name: String! + amount: Float! + country: Country! + state: String + subRates: [SubRateDraft!] = [] + includedInPrice: Boolean = false +} + +type ExternalTaxRateDraftOutput { + name: String! + amount: Float + country: Country! + state: String + subRates: [SubRate!]! + includedInPrice: Boolean! +} + +interface FacetResult { + type: String! +} + +type FacetResultValue { + facet: String! + value: FacetResult! +} + +"Field definitions describe custom fields and allow you to define some meta-information associated with the field." +type FieldDefinition { + name: String! + required: Boolean! + inputHint: TextInputHint! + label( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + labelAllLocales: [LocalizedString!]! + type: FieldType! +} + +input FieldDefinitionInput { + type: FieldTypeInput! + name: String! + label: [LocalizedStringItemInputType!]! + required: Boolean! + inputHint: TextInputHint! +} + +interface FieldType { + name: String! +} + +input FieldTypeEnumTypeDraft { + values: [EnumValueInput!]! +} + +input FieldTypeInput { + Set: FieldTypeSetTypeDraft + String: SimpleFieldTypeDraft + LocalizedString: SimpleFieldTypeDraft + Number: SimpleFieldTypeDraft + Money: SimpleFieldTypeDraft + Date: SimpleFieldTypeDraft + Time: SimpleFieldTypeDraft + DateTime: SimpleFieldTypeDraft + Boolean: SimpleFieldTypeDraft + Enum: FieldTypeEnumTypeDraft + LocalizedEnum: FieldTypeLocalizedEnumTypeDraft + Reference: FieldTypeReferenceTypeDraft +} + +input FieldTypeLocalizedEnumTypeDraft { + values: [LocalizedEnumValueInput!]! +} + +input FieldTypeReferenceTypeDraft { + referenceTypeId: String! +} + +input FieldTypeSetElementTypeDraft { + String: SimpleFieldTypeDraft + LocalizedString: SimpleFieldTypeDraft + Number: SimpleFieldTypeDraft + Money: SimpleFieldTypeDraft + Date: SimpleFieldTypeDraft + Time: SimpleFieldTypeDraft + DateTime: SimpleFieldTypeDraft + Boolean: SimpleFieldTypeDraft + Enum: FieldTypeEnumTypeDraft + LocalizedEnum: FieldTypeLocalizedEnumTypeDraft + Reference: FieldTypeReferenceTypeDraft +} + +input FieldTypeSetTypeDraft { + elementType: FieldTypeSetElementTypeDraft! +} + +type FixedPriceDiscountValue implements CartDiscountValue { + money: [Money!]! + type: String! +} + +input FixedPriceDiscountValueInput { + money: [MoneyInput!]! +} + +interface Geometry { + type: String! +} + +input GeometryInput { + type: String! + coordinates: [Float!] +} + +type GiftLineItemValue implements CartDiscountValue { + type: String! + variantId: Int! + productRef: ProductReferenceIdentifier! + distributionChannelRef: ChannelReferenceIdentifier + supplyChannelRef: ChannelReferenceIdentifier +} + +input GiftLineItemValueInput { + product: ResourceIdentifierInput! + variantId: Int! + distributionChannel: ResourceIdentifierInput + supplyChannel: ResourceIdentifierInput +} + +type GoogleCloudPubSubDestination implements Destination { + projectId: String! + topic: String! + type: String! +} + +input GoogleCloudPubSubDestinationInput { + projectId: String! + topic: String! +} + +type HighPrecisionMoney implements BaseMoney { + type: String! + currencyCode: Currency! + preciseAmount: Long! + centAmount: Long! + fractionDigits: Int! +} + +input HighPrecisionMoneyInput { + currencyCode: Currency! + preciseAmount: Long! + fractionDigits: Int! + centAmount: Long +} + +type HttpDestination implements ExtensionDestination { + type: String! + url: String! + authentication: HttpDestinationAuthentication +} + +interface HttpDestinationAuthentication { + type: String! +} + +input HttpDestinationAuthenticationInput { + AuthorizationHeader: AuthorizationHeaderInput + AzureFunctions: AzureFunctionsAuthenticationInput +} + +input HttpDestinationInput { + url: String! + authentication: HttpDestinationAuthenticationInput +} + +type Image { + url: String! + dimensions: Dimensions! + label: String +} + +input ImageInput { + url: String! + label: String + dimensions: DimensionsInput! +} + +type ImageProductSearch { + url: String! + dimensions: DimensionsProductSearch! + label: String +} + +input ImportOrderCustomLineItemState { + customLineItemId: String! + state: [ItemStateDraftType!]! +} + +input ImportOrderDraft { + orderNumber: String + customerId: String + customerEmail: String + store: ReferenceInput + lineItems: [LineItemImportDraft!]! = [] + customLineItems: [CustomLineItemImportDraft!]! = [] + totalPrice: MoneyInput! + taxedPrice: TaxedPriceDraft + shippingAddress: AddressInput + billingAddress: AddressInput + customerGroup: ReferenceInput + country: Country + orderState: OrderState + shipmentState: ShipmentState + paymentState: PaymentState + shippingInfo: ShippingInfoImportDraft + completedAt: DateTime + custom: CustomFieldsDraft + inventoryMode: InventoryMode = None + shippingDetails: ItemShippingDetailsDraft + taxCalculationMode: TaxCalculationMode = LineItemLevel + origin: CartOrigin = Customer + itemShippingAddresses: [AddressInput!] = [] + state: ReferenceInput + paymentInfo: ReferenceInput +} + +input ImportOrderLineItemState { + lineItemId: String! + state: [ItemStateDraftType!]! +} + +input ImportStagedOrderCustomLineItemState { + customLineItemId: String! + state: [ItemStateDraftType!]! +} + +type ImportStagedOrderCustomLineItemStateOutput implements StagedOrderUpdateActionOutput { + type: String! + customLineItemId: String! + state: Set! +} + +input ImportStagedOrderLineItemState { + lineItemId: String! + state: [ItemStateDraftType!]! +} + +type ImportStagedOrderLineItemStateOutput implements StagedOrderUpdateActionOutput { + type: String! + lineItemId: String! + state: Set! +} + +type InStore implements CartQueryInterface & CustomerActiveCartInterface & OrderQueryInterface & CustomerQueryInterface & ShippingMethodsByCartInterface & MeFieldInterface { + """ + This field can only be used with an access token created with the password flow or with an anonymous session. + + It gives access to the data that is specific to the customer or the anonymous session linked to the access token. + """ + me: InStoreMe! + shippingMethodsByCart(id: String!): [ShippingMethod!]! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + product( + "Queries for a product with specified SKU" + sku: String, + + "Queries for a [Product](https://docs.commercetools.com/api/projects/products#product) with specified [ProductVariant](https://docs.commercetools.com/api/projects/products#productvariant) `key`" + variantKey: String, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Product + customer( + "Queries a customer with specified email token" + emailToken: String, + + "Queries a customer with specified password token" + passwordToken: String, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Customer + customers(where: String, sort: [String!], limit: Int, offset: Int): CustomerQueryResult! + cart(id: String!): Cart + carts(where: String, sort: [String!], limit: Int, offset: Int): CartQueryResult! + customerActiveCart(customerId: String!): Cart + order( + "Queries with specified ID" + id: String, orderNumber: String): Order + orders(where: String, sort: [String!], limit: Int, offset: Int): OrderQueryResult! + shoppingList( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ShoppingList + shoppingLists(where: String, sort: [String!], limit: Int, offset: Int): ShoppingListQueryResult! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + productSelectionAssignments(where: String, sort: [String!], limit: Int, offset: Int): ProductAssignmentQueryResult! +} + +type InStoreMe implements MeQueryInterface & CartQueryInterface & ActiveCartInterface & OrderQueryInterface & ShoppingListQueryInterface { + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + customer: Customer + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + cart(id: String!): Cart + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + carts(where: String, sort: [String!], limit: Int, offset: Int): CartQueryResult! + activeCart: Cart + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + order( + "Queries with specified ID" + id: String, orderNumber: String): Order + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + orders(where: String, sort: [String!], limit: Int, offset: Int): OrderQueryResult! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + shoppingList( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ShoppingList + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + shoppingLists(where: String, sort: [String!], limit: Int, offset: Int): ShoppingListQueryResult! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type IndividualProductSelectionCreatedPayload implements ProductSelectionCreatedPayload { + custom: CustomFieldsType + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!]! + type: String! +} + +type Initiator { + isPlatformClient: Boolean + externalUserId: String + anonymousId: String + clientId: String + customerRef: Reference + userRef: Reference +} + +type InterfaceInteractionsRaw { + typeRef: Reference! + type: TypeDefinition + fields( + """ + The names of the custom fields to include. + + If neither `includeNames` nor `excludeNames` are provided, then all custom fields are returned. + """ + includeNames: [String!], + + """ + The names of the custom fields to exclude. + + If neither `includeNames` nor `excludeNames` are provided, then all custom fields are returned. + """ + excludeNames: [String!]): [RawCustomField!]! +} + +type InterfaceInteractionsRawResult { + limit: Int + offset: Int + total: Int! + results: [InterfaceInteractionsRaw!]! +} + +"Inventory allows you to track stock quantity per SKU and optionally per supply channel" +type InventoryEntry implements Versioned & ReferenceExpandable { + sku: String! + quantityOnStock: Long! + availableQuantity: Long! + key: String + restockableInDays: Int + expectedDelivery: DateTime + supplyChannel: Channel + supplyChannelRef: Reference + custom: CustomFieldsType + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +type InventoryEntryCreated implements MessagePayload { + inventoryEntry: InventoryEntryCreatedContent! + type: String! +} + +type InventoryEntryCreatedContent { + inventoryEntryId: String! + sku: String! + quantityOnStock: Long! + key: String + restockableInDays: Int + expectedDelivery: DateTime + messageId: MessageId + supplyChannel: Channel + supplyChannelRef: Reference + custom: CustomFieldsType +} + +type InventoryEntryDeleted implements MessagePayload { + sku: String! + supplyChannel: Channel + supplyChannelRef: Reference + type: String! +} + +input InventoryEntryDraft { + sku: String! + key: String + quantityOnStock: Long + restockableInDays: Int + expectedDelivery: DateTime + supplyChannel: ResourceIdentifierInput + custom: CustomFieldsDraft +} + +type InventoryEntryQuantitySet implements MessagePayload { + oldQuantityOnStock: Long! + newQuantityOnStock: Long! + oldAvailableQuantity: Long! + newAvailableQuantity: Long! + supplyChannel: Channel + supplyChannelRef: Reference + type: String! +} + +type InventoryEntryQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [InventoryEntry!]! +} + +input InventoryEntryUpdateAction { + addQuantity: AddInventoryEntryQuantity + changeQuantity: ChangeInventoryEntryQuantity + removeQuantity: RemoveInventoryEntryQuantity + setRestockableInDays: SetInventoryEntryRestockableInDays + setExpectedDelivery: SetInventoryEntryExpectedDelivery + setSupplyChannel: SetInventoryEntrySupplyChannel + setCustomType: SetInventoryEntryCustomType + setCustomField: SetInventoryEntryCustomField +} + +enum InventoryMode { + """ + Adding items to cart and ordering is independent of inventory. No inventory checks or modifications. + This is the default mode for a new cart. + """ + None + + """ + Creating an order will fail with an OutOfStock error if an unavailable line item exists. Line items in the cart + are only reserved for the duration of the ordering transaction. + """ + ReserveOnOrder + + """ + Orders are tracked on inventory. That means, ordering a LineItem will decrement the available quantity on the + respective InventoryEntry. Creating an order will succeed even if the line item’s available quantity is zero or + negative. But creating an order will fail with an OutOfStock error if no matching inventory entry exists for a + line item. + """ + TrackOnly +} + +type ItemShippingDetails { + targets: [ItemShippingTarget!]! + valid: Boolean! +} + +input ItemShippingDetailsDraft { + targets: [ShippingTargetDraft!]! +} + +type ItemShippingDetailsDraftOutput { + targets: [ItemShippingTarget!]! +} + +input ItemShippingDetailsDraftType { + targets: [ShippingTargetDraftType!]! +} + +type ItemShippingTarget { + addressKey: String! + quantity: Long! + shippingMethodKey: String +} + +type ItemState { + quantity: Long! + stateRef: Reference! + state: State +} + +input ItemStateDraftType { + quantity: Long! + state: ReferenceInput! +} + +"Raw JSON value" +scalar Json + +type KeyReference { + typeId: String! + key: String! +} + +"A key that references a resource." +scalar KeyReferenceInput + +type Limit { + limit: Long +} + +interface LimitWithCurrent { + limit: Long + current: Long +} + +""" +A line item is a snapshot of a product variant at the time it was added to the cart. + +Since a product variant may change at any time, the ProductVariant data is copied into the field variant. +The relation to the Product is kept but the line item will not automatically update if the product variant changes. +On the cart, the line item can be updated manually. The productSlug refers to the current version of the product. +It can be used to link to the product. If the product has been deleted, the line item remains but refers to a +non-existent product and the productSlug is left empty. + +Please also note that creating an order is impossible if the product or product variant a line item relates to has been deleted. +""" +type LineItem { + id: String! + productId: String! + productKey: String + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!]! + productSlug( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + productSlugAllLocales: [LocalizedString!] + productType: ProductTypeDefinition + productTypeRef: Reference + variant: ProductVariant + price: ProductPrice! + taxedPrice: TaxedItemPrice + totalPrice: Money + quantity: Long! + addedAt: DateTime + lastModifiedAt: DateTime + state: [ItemState!]! + taxRate: TaxRate + supplyChannel: Channel + supplyChannelRef: Reference + distributionChannel: Channel + distributionChannelRef: Reference + discountedPricePerQuantity: [DiscountedLineItemPriceForQuantity!]! + lineItemMode: LineItemMode! + priceMode: LineItemPriceMode! + custom: CustomFieldsType + inventoryMode: InventoryMode + shippingDetails: ItemShippingDetails +} + +input LineItemDraft { + productId: String + sku: String + quantity: Long + variantId: Int + supplyChannel: ResourceIdentifierInput + distributionChannel: ResourceIdentifierInput + custom: CustomFieldsDraft + shippingDetails: ItemShippingDetailsDraft + addedAt: DateTime + externalTaxRate: ExternalTaxRateDraft + externalPrice: BaseMoneyInput + externalTotalPrice: ExternalLineItemTotalPriceDraft + inventoryMode: InventoryMode +} + +type LineItemDraftOutput { + productId: String + sku: String + quantity: Long + variantId: Int + custom: CustomFieldsCommand + externalTaxRate: ExternalTaxRateDraftOutput + externalPrice: BaseMoney + externalTotalPrice: ExternalLineItemTotalPrice + inventoryMode: InventoryMode + shippingDetails: ItemShippingDetailsDraftOutput + addedAt: DateTime + distributionChannelResId: ResourceIdentifier + supplyChannelResId: ResourceIdentifier +} + +input LineItemImportDraft { + productId: String + name: [LocalizedStringItemInputType!]! + price: ProductPriceDataInput! + quantity: Long! + supplyChannel: ResourceIdentifierInput + distributionChannel: ResourceIdentifierInput + taxRate: TaxRateInput + variant: ProductVariantImportDraft! + state: [ItemStateDraftType!] + custom: CustomFieldsDraft + shippingDetails: ItemShippingDetailsDraft +} + +enum LineItemMode { + """ + The line item was added automatically, because a discount has added a free gift to the cart. + The quantity can not be increased, and it won’t be merged when the same product variant is added. + If the gift is removed, an entry is added to the "refusedGifts" array and the discount won’t be applied again + to the cart. The price can not be changed externally. + All other updates, such as the ones related to custom fields, can be used. + """ + GiftLineItem + + """ + The line item was added during cart creation or with the update action addLineItem. Its quantity can be + changed without restrictions. + """ + Standard +} + +enum LineItemPriceMode { + "The price is selected form the product variant. This is the default mode." + Platform + + "The line item price was set externally. Cart discounts can apply to line items with this price mode. All update actions that change the quantity of a line item with this price mode require the externalPrice field to be given." + ExternalPrice + + "The line item price with the total was set externally." + ExternalTotal +} + +type LineItemReturnItem implements ReturnItem { + type: String! + lineItemId: String! + id: String! + quantity: Long! + comment: String + shipmentState: ReturnShipmentState! + paymentState: ReturnPaymentState! + custom: CustomFieldsType + lastModifiedAt: DateTime! + createdAt: DateTime! +} + +type LineItemStateTransition implements MessagePayload & OrderMessagePayload { + lineItemId: String! + transitionDate: DateTime! + quantity: Long! + fromState: State + toState: State + fromStateRef: Reference! + toStateRef: Reference! + type: String! +} + +type LineItemsTarget implements CartDiscountTarget { + predicate: String! + type: String! +} + +input LineItemsTargetInput { + predicate: String! +} + +"Locale is a scalar value represented as a string language tag." +scalar Locale + +type LocalizableEnumAttributeDefinitionType implements AttributeDefinitionType { + values( + """ + The keys of the enum values to include. + + If neither `includeKeys` nor `excludeKeys` are provided, then all enum values are returned. + """ + includeKeys: [String!], + + """ + The keys of the enum values to exclude. + + If neither `includeKeys` nor `excludeKeys` are provided, then all enum values are returned. + """ + excludeKeys: [String!], limit: Int, offset: Int, sort: [String!]): LocalizableEnumValueTypeResult! + name: String! +} + +input LocalizableEnumTypeDraft { + values: [LocalizedEnumValueDraft!]! +} + +type LocalizableEnumValueType { + key: String! + label( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + labelAllLocales: [LocalizedString!]! +} + +type LocalizableEnumValueTypeResult { + limit: Int + offset: Int + total: Int! + results: [LocalizableEnumValueType!]! +} + +type LocalizableTextAttributeDefinitionType implements AttributeDefinitionType { + name: String! +} + +type LocalizedEnumAttribute implements Attribute { + key: String! + label( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale!): String + name: String! +} + +type LocalizedEnumField implements CustomField { + key: String! + label( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale!): String + name: String! +} + +type LocalizedEnumType implements FieldType { + values: [LocalizedEnumValue!]! + name: String! +} + +type LocalizedEnumValue { + key: String! + label( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + labelAllLocales: [LocalizedString!]! +} + +input LocalizedEnumValueDraft { + key: String! + label: [LocalizedStringItemInputType!]! +} + +input LocalizedEnumValueInput { + key: String! + label: [LocalizedStringItemInputType!]! +} + +type LocalizedString { + locale: Locale! + value: String! +} + +type LocalizedStringAttribute implements Attribute { + value( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale!): String + name: String! +} + +type LocalizedStringField implements CustomField { + value( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale!): String + name: String! +} + +input LocalizedStringItemInputType { + locale: Locale! + value: String! +} + +type LocalizedStringType implements FieldType { + name: String! +} + +type Location { + country: Country! + state: String +} + +type Me implements MeQueryInterface & CartQueryInterface & ActiveCartInterface & OrderQueryInterface & ShoppingListQueryInterface { + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + customer: Customer + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + cart(id: String!): Cart + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + carts(where: String, sort: [String!], limit: Int, offset: Int): CartQueryResult! + activeCart: Cart + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + order( + "Queries with specified ID" + id: String, orderNumber: String): Order + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + orders(where: String, sort: [String!], limit: Int, offset: Int): OrderQueryResult! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + shoppingList( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ShoppingList + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + shoppingLists(where: String, sort: [String!], limit: Int, offset: Int): ShoppingListQueryResult! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + payment(id: String!): MyPayment + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + payments(where: String, sort: [String!], limit: Int, offset: Int): MyPaymentQueryResult! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + quoteRequest( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): QuoteRequest + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + quoteRequests(where: String, sort: [String!], limit: Int, offset: Int): QuoteRequestQueryResult! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + quote( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Quote + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + quotes(where: String, sort: [String!], limit: Int, offset: Int): QuoteQueryResult! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + businessUnit( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): BusinessUnit + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + businessUnits(where: String, sort: [String!], limit: Int, offset: Int): BusinessUnitQueryResult! +} + +"The me field gives access to the data that is specific to the customer or anonymous session linked to the access token." +interface MeFieldInterface { + me: MeQueryInterface! +} + +interface MeQueryInterface { + cart(id: String!): Cart + carts(where: String, sort: [String!], limit: Int, offset: Int): CartQueryResult! + activeCart: Cart + order( + "Queries with specified ID" + id: String, orderNumber: String): Order + orders(where: String, sort: [String!], limit: Int, offset: Int): OrderQueryResult! + shoppingList( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ShoppingList + shoppingLists(where: String, sort: [String!], limit: Int, offset: Int): ShoppingListQueryResult! +} + +type Message implements Versioned & ReferenceExpandable { + id: String! + type: String! + sequenceNumber: Long! + resourceRef: Reference! + resourceVersion: Long! + userProvidedIdentifiers: UserProvidedIdentifiers + payload: MessagePayload! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +type MessageId { + id: String! + sequenceNumber: Long! +} + +interface MessagePayload { + type: String! +} + +type MessageQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [Message!]! +} + +type MessageSubscription { + resourceTypeId: String! + types: [String!]! +} + +input MessageSubscriptionInput { + resourceTypeId: String! + types: [String!] +} + +type MessagesConfiguration { + enabled: Boolean! + deleteDaysAfterCreation: Int +} + +input MessagesConfigurationDraft { + enabled: Boolean! + deleteDaysAfterCreation: Int! +} + +type MethodTaxedPrice { + shippingMethodKey: String! + taxedPrice: TaxedItemPrice +} + +input MissingFilterInput { + path: String! +} + +type Money implements BaseMoney { + type: String! + currencyCode: Currency! + centAmount: Long! + + "For the `Money` it equals to the default number of fraction digits used with the currency." + fractionDigits: Int! +} + +type MoneyAttribute implements Attribute { + centAmount: Long! + currencyCode: Currency! + name: String! +} + +type MoneyAttributeDefinitionType implements AttributeDefinitionType { + name: String! +} + +input MoneyDraft { + currencyCode: Currency! + centAmount: Long! +} + +type MoneyField implements CustomField { + centAmount: Long! + currencyCode: Currency! + name: String! +} + +input MoneyInput { + currencyCode: Currency! + centAmount: Long! +} + +type MoneyType implements FieldType { + name: String! +} + +input MoveProductImageToPosition { + variantId: Int + sku: String + imageUrl: String! + position: Int! + staged: Boolean +} + +type MultiBuyCustomLineItemsTarget implements CartDiscountTarget { + predicate: String! + triggerQuantity: Long! + discountedQuantity: Long! + maxOccurrence: Int + selectionMode: SelectionMode! + type: String! +} + +input MultiBuyCustomLineItemsTargetInput { + predicate: String! + triggerQuantity: Long! + discountedQuantity: Long! + maxOccurrence: Int + selectionMode: SelectionMode +} + +type MultiBuyLineItemsTarget implements CartDiscountTarget { + predicate: String! + triggerQuantity: Long! + discountedQuantity: Long! + maxOccurrence: Int + selectionMode: SelectionMode! + type: String! +} + +input MultiBuyLineItemsTargetInput { + predicate: String! + triggerQuantity: Long! + discountedQuantity: Long! + maxOccurrence: Int + selectionMode: SelectionMode +} + +type Mutation { + createCustomerGroup(draft: CustomerGroupDraft!): CustomerGroup + updateCustomerGroup(version: Long!, actions: [CustomerGroupUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): CustomerGroup + deleteCustomerGroup(version: Long!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): CustomerGroup + createCategory(draft: CategoryDraft!): Category + updateCategory(version: Long!, actions: [CategoryUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Category + deleteCategory(version: Long!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Category + createChannel(draft: ChannelDraft!): Channel + updateChannel(id: String!, version: Long!, actions: [ChannelUpdateAction!]!): Channel + deleteChannel(id: String!, version: Long!): Channel + createOrUpdateCustomObject(draft: CustomObjectDraft!): CustomObject + deleteCustomObject(version: Long, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String, container: String, personalDataErasure: Boolean = false): CustomObject + createProductType(draft: ProductTypeDraft!): ProductTypeDefinition + updateProductType(version: Long!, actions: [ProductTypeUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ProductTypeDefinition + deleteProductType(version: Long!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ProductTypeDefinition + createTypeDefinition(draft: TypeDefinitionDraft!): TypeDefinition + updateTypeDefinition(version: Long!, actions: [TypeUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): TypeDefinition + deleteTypeDefinition(version: Long!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): TypeDefinition + createShippingMethod(draft: ShippingMethodDraft!): ShippingMethod + updateShippingMethod(version: Long!, actions: [ShippingMethodUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ShippingMethod + deleteShippingMethod(version: Long!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ShippingMethod + createZone(draft: CreateZone!): Zone + updateZone(version: Long!, actions: [ZoneUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Zone + deleteZone(version: Long!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Zone + createTaxCategory(draft: TaxCategoryDraft!): TaxCategory + updateTaxCategory(version: Long!, actions: [TaxCategoryUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): TaxCategory + deleteTaxCategory(version: Long!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): TaxCategory + createDiscountCode(draft: DiscountCodeDraft!): DiscountCode + updateDiscountCode(id: String!, version: Long!, actions: [DiscountCodeUpdateAction!]!): DiscountCode + deleteDiscountCode(id: String!, version: Long!): DiscountCode + createCartDiscount(draft: CartDiscountDraft!): CartDiscount + updateCartDiscount(version: Long!, actions: [CartDiscountUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): CartDiscount + deleteCartDiscount(version: Long!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): CartDiscount + createProductDiscount(draft: ProductDiscountDraft!): ProductDiscount + updateProductDiscount(version: Long!, actions: [ProductDiscountUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ProductDiscount + deleteProductDiscount(version: Long!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ProductDiscount + createProduct(draft: ProductDraft!): Product + updateProduct(version: Long!, actions: [ProductUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Product + deleteProduct(version: Long!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Product + createState(draft: StateDraft!): State + updateState(version: Long!, actions: [StateUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): State + deleteState(version: Long!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): State + + "Creates a customer. If an anonymous cart is given then the cart is assigned to the created customer and the version number of the Cart will increase. If the id of an anonymous session is given, all carts and orders will be assigned to the created customer." + customerSignUp(draft: CustomerSignUpDraft!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): CustomerSignInResult! + + """ + Retrieves the authenticated customer (a customer that matches the given email/password pair). + + There may be carts and orders created before the sign in that should be assigned to the customer account. With the `anonymousCartId`, a single anonymous cart can be assigned. With the `anonymousId`, all orders and carts that have this `anonymousId` set will be assigned to the customer. + If both `anonymousCartId` and `anonymousId` are given, the anonymous cart must have the `anonymousId`. + + Additionally, there might also exist one or more active customer carts from an earlier session. On customer sign in there are several ways how to proceed with this cart and the cart referenced by the `anonymousCartId`. + + * If the customer does not have a cart yet, the anonymous cart becomes the customer's cart. + * If the customer already has one or more carts, the content of the anonymous cart will be copied to the customer's active cart that has been modified most recently. + + In this case the `CartState` of the anonymous cart gets changed to `Merged` while the customer's cart remains the `Active` cart. + + If a `LineItem` in the anonymous cart matches an existing line item, or a `CustomLineItem` matches an existing custom line item in the customer's cart, the maximum quantity of both line items is used as the new quantity. + + `ItemShippingDetails` are copied from the item with the highest quantity. + + If `itemShippingAddresses` are different in the two carts, the resulting cart contains the addresses of both the customer cart and the anonymous cart. + + Note, that it is not possible to merge carts that differ in their currency (set during creation of the cart). + + If a cart is is returned as part of the `CustomerSignInResult`, it has been recalculated (it will have up-to-date prices, taxes and discounts, and invalid line items have been removed). + """ + customerSignIn(draft: CustomerSignInDraft!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): CustomerSignInResult! + updateCustomer(version: Long!, actions: [CustomerUpdateAction!]!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Customer + deleteCustomer(version: Long!, personalDataErasure: Boolean = false, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Customer + customerChangePassword(id: String!, version: Long!, currentPassword: String!, newPassword: String!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): Customer + + """ + The following workflow can be used to reset the customer’s password: + + 1. Create a password reset token and send it embedded in a link to the customer. + 2. When the customer clicks on the link, you may optionally retrieve customer by password token. + 3. When the customer entered new password, use reset customer’s password to reset the password. + """ + customerResetPassword(version: Long, tokenValue: String!, newPassword: String!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): Customer + + "Verifies customer's email using a token." + customerConfirmEmail(version: Long, tokenValue: String!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): Customer + + "The token value is used to reset the password of the customer with the given email. The token is valid only for 10 minutes." + customerCreatePasswordResetToken(email: String!, + + "The validity of the created token in minutes." + ttlMinutes: Int, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): CustomerPasswordToken + customerCreateEmailVerificationToken(id: String!, version: Long, + + "The validity of the created token in minutes." + ttlMinutes: Int!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): CustomerEmailToken! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta If used with an access token for Anonymous Sessions, all orders and carts belonging to the anonymousId will be assigned to the newly created customer." + customerSignMeUp(draft: CustomerSignMeUpDraft!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): CustomerSignInResult! + + """ + BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta + + Retrieves the authenticated customer (a customer that matches the given email/password pair). + + If used with an access token for Anonymous Sessions, all orders and carts belonging to the `anonymousId` will be assigned to the newly created customer. + + * If the customer does not have a cart yet, the anonymous cart that was modified most recently becomes the customer's cart. + * If the customer already has a cart, the most recently modified anonymous cart will be handled according to the `AnonymousCartSignInMode`. + + If a cart is is returned as part of the `CustomerSignInResult`, it has been recalculated (it will have up-to-date prices, taxes and discounts, and invalid line items have been removed). + """ + customerSignMeIn(draft: CustomerSignMeInDraft!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): CustomerSignInResult! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + updateMyCustomer(version: Long!, actions: [MyCustomerUpdateAction!]!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): Customer + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + deleteMyCustomer(version: Long!, personalDataErasure: Boolean = false, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): Customer + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + customerChangeMyPassword(version: Long!, currentPassword: String!, newPassword: String!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): Customer + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + customerConfirmMyEmail(tokenValue: String!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): Customer + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + customerResetMyPassword(tokenValue: String!, newPassword: String!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): Customer + createInventoryEntry(draft: InventoryEntryDraft!): InventoryEntry + updateInventoryEntry(version: Long!, actions: [InventoryEntryUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): InventoryEntry + deleteInventoryEntry(version: Long!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): InventoryEntry + createCart(draft: CartDraft!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): Cart + updateCart(version: Long!, actions: [CartUpdateAction!]!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Cart + deleteCart(version: Long!, personalDataErasure: Boolean = false, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Cart + replicateCart(reference: ReferenceInput!, key: String, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): Cart + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + createMyCart(draft: MyCartDraft!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): Cart + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + updateMyCart(id: String!, version: Long!, actions: [MyCartUpdateAction!]!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): Cart + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + deleteMyCart(id: String!, version: Long!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): Cart + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + replicateMyCart(reference: ReferenceInput!): Cart + createOrderFromCart(draft: OrderCartCommand!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): Order + updateOrder(version: Long!, actions: [OrderUpdateAction!]!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput, + + "Queries with specified ID" + id: String, orderNumber: String): Order + deleteOrder(version: Long!, personalDataErasure: Boolean = false, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput, + + "Queries with specified ID" + id: String, orderNumber: String): Order + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + createMyOrderFromCart(draft: OrderMyCartCommand!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): Order + createOrderFromQuote(draft: OrderQuoteCommand!): Order + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + createMyOrderFromQuote(draft: OrderMyQuoteCommand!): Order + importOrder(draft: ImportOrderDraft!): Order + createOrderEdit(draft: OrderEditDraft!): OrderEdit + updateOrderEdit(version: Long!, actions: [OrderEditUpdateAction!]!, dryRun: Boolean = false, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): OrderEdit + deleteOrderEdit(version: Long!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): OrderEdit + createShoppingList(draft: ShoppingListDraft!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): ShoppingList + updateShoppingList(version: Long!, actions: [ShoppingListUpdateAction!]!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ShoppingList + deleteShoppingList(version: Long!, personalDataErasure: Boolean = false, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ShoppingList + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + createMyShoppingList(draft: MyShoppingListDraft!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): ShoppingList + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + updateMyShoppingList(version: Long!, actions: [MyShoppingListUpdateAction!]!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ShoppingList + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + deleteMyShoppingList(version: Long!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ShoppingList + createPayment(draft: PaymentDraft!): Payment + updatePayment(version: Long!, actions: [PaymentUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Payment + deletePayment(version: Long!, personalDataErasure: Boolean = false, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Payment + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + createMyPayment(draft: MyPaymentDraft!): MyPayment + updateMyPayment(id: String!, version: Long!, actions: [MyPaymentUpdateAction!]!): MyPayment + deleteMyPayment(id: String!, version: Long!): MyPayment + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + createProductSelection( + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + draft: CreateProductSelectionDraft!): ProductSelection + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + updateProductSelection(version: Long!, + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + actions: [ProductSelectionUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ProductSelection + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + deleteProductSelection(version: Long!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ProductSelection + updateProject(version: Long!, actions: [ProjectSettingsUpdateAction!]!): ProjectProjection + createStore(draft: CreateStore!): Store + updateStore(version: Long!, actions: [StoreUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Store + deleteStore(version: Long!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Store + createReview(draft: ReviewDraft!): Review + updateReview(version: Long!, actions: [ReviewUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Review + deleteReview(version: Long!, personalDataErasure: Boolean = false, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Review + createSubscription(draft: SubscriptionDraft!): CommercetoolsSubscription + updateSubscription(version: Long!, actions: [SubscriptionUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): CommercetoolsSubscription + deleteSubscription(version: Long!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): CommercetoolsSubscription + createExtension(draft: ExtensionDraft!): Extension + updateExtension(version: Long!, actions: [ExtensionUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Extension + deleteExtension(version: Long!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Extension + createApiClient(draft: CreateApiClient!): APIClientWithSecret + deleteApiClient(id: String!): APIClientWithoutSecret + createStandalonePrice(draft: CreateStandalonePrice!): StandalonePrice + updateStandalonePrice(version: Long!, actions: [StandalonePriceUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): StandalonePrice + deleteStandalonePrice(version: Long!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): StandalonePrice + createQuoteRequest(draft: QuoteRequestDraft!): QuoteRequest + updateQuoteRequest(version: Long!, actions: [QuoteRequestUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): QuoteRequest + deleteQuoteRequest(version: Long!, personalDataErasure: Boolean = false, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): QuoteRequest + createMyQuoteRequest(draft: MyQuoteRequestDraft!): QuoteRequest + updateMyQuoteRequest(version: Long!, actions: [MyQuoteRequestUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): QuoteRequest + createStagedQuote(draft: StagedQuoteDraft!): StagedQuote + updateStagedQuote(version: Long!, actions: [StagedQuoteUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): StagedQuote + deleteStagedQuote(version: Long!, personalDataErasure: Boolean = false, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): StagedQuote + createQuote(draft: QuoteDraft!): Quote + updateQuote(version: Long!, actions: [QuoteUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Quote + deleteQuote(version: Long!, personalDataErasure: Boolean = false, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Quote + updateMyQuote(version: Long!, actions: [MyQuoteUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Quote + createBusinessUnit(draft: BusinessUnitDraft!): BusinessUnit + updateBusinessUnit(version: Long!, actions: [BusinessUnitUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): BusinessUnit + deleteBusinessUnit(version: Long!, personalDataErasure: Boolean = false, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): BusinessUnit + createMyBusinessUnit(draft: MyBusinessUnitDraft!): BusinessUnit + updateMyBusinessUnit(version: Long!, actions: [MyBusinessUnitUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): BusinessUnit +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input MyBusinessUnitDraft { + key: String! + name: String! + contactEmail: String + addresses: [AddressInput!] + + "The index of the address in the `addresses` list. The `defaultBillingAddressId` of the customer will be set to the ID of that address." + defaultBillingAddress: Int + + "The index of the address in the `addresses` list. The `defaultShippingAddressId` of the customer will be set to the ID of that address." + defaultShippingAddress: Int + + "The indices of the shipping addresses in the `addresses` list. The `shippingAddressIds` of the `Customer` will be set to the IDs of that addresses." + shippingAddresses: [Int!] = [] + + "The indices of the billing addresses in the `addresses` list. The `billingAddressIds` of the customer will be set to the IDs of that addresses." + billingAddresses: [Int!] = [] + custom: CustomFieldsDraft + unitType: BusinessUnitType! + storeMode: String + parentUnit: ResourceIdentifierInput +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input MyBusinessUnitUpdateAction { + addAddress: AddMyBusinessUnitAddress + addBillingAddressId: AddMyBusinessUnitBillingAddressId + addShippingAddressId: AddMyBusinessUnitShippingAddressId + changeAddress: ChangeMyBusinessUnitAddress + changeAssociate: ChangeMyBusinessUnitAssociate + changeName: ChangeMyBusinessUnitName + changeParentUnit: ChangeMyBusinessUnitParentUnit + removeAddress: RemoveMyBusinessUnitAddress + removeAssociate: RemoveMyBusinessUnitAssociate + removeBillingAddressId: RemoveMyBusinessUnitBillingAddressId + removeShippingAddressId: RemoveMyBusinessUnitShippingAddressId + setAddressCustomField: SetMyBusinessUnitAddressCustomField + setAddressCustomType: SetMyBusinessUnitAddressCustomType + setContactEmail: SetMyBusinessUnitContactEmail + setCustomField: SetMyBusinessUnitCustomField + setCustomType: SetMyBusinessUnitCustomType + setDefaultBillingAddress: SetMyBusinessUnitDefaultBillingAddress + setDefaultShippingAddress: SetMyBusinessUnitDefaultShippingAddress +} + +input MyCartDraft { + currency: Currency! + country: Country + inventoryMode: InventoryMode = None + custom: CustomFieldsDraft + customerEmail: String + shippingAddress: AddressInput + billingAddress: AddressInput + shippingMethod: ResourceIdentifierInput + taxMode: TaxMode = Platform + locale: Locale + deleteDaysAfterLastModification: Int + itemShippingAddresses: [AddressInput!] = [] + discountCodes: [String!] = [] + store: ResourceIdentifierInput + lineItems: [MyLineItemDraft!] = [] +} + +input MyCartUpdateAction { + addDiscountCode: AddCartDiscountCode + addItemShippingAddress: AddCartItemShippingAddress + addLineItem: AddMyCartLineItem + addPayment: AddCartPayment + addShoppingList: AddCartShoppingList + applyDeltaToLineItemShippingDetailsTargets: ApplyCartDeltaToLineItemShippingDetailsTargets + changeLineItemQuantity: ChangeCartLineItemQuantity + changeTaxMode: ChangeMyCartTaxMode + recalculate: RecalculateCart + removeDiscountCode: RemoveCartDiscountCode + removeItemShippingAddress: RemoveCartItemShippingAddress + removeLineItem: RemoveCartLineItem + removePayment: RemoveCartPayment + setBillingAddress: SetCartBillingAddress + setBillingAddressCustomField: SetCartBillingAddressCustomField + setBillingAddressCustomType: SetCartBillingAddressCustomType + setBusinessUnit: SetCartBusinessUnit + setCountry: SetCartCountry + setCustomField: SetCartCustomField + setCustomType: SetCartCustomType + setCustomerEmail: SetCartCustomerEmail + setDeleteDaysAfterLastModification: SetCartDeleteDaysAfterLastModification + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + setDirectDiscounts: SetCartDirectDiscounts + setItemShippingAddressCustomField: SetCartItemShippingAddressCustomField + setItemShippingAddressCustomType: SetCartItemShippingAddressCustomType + setLineItemCustomField: SetCartLineItemCustomField + setLineItemCustomType: SetCartLineItemCustomType + setLineItemDistributionChannel: SetCartLineItemDistributionChannel + setLineItemShippingDetails: SetCartLineItemShippingDetails + setLineItemSupplyChannel: SetCartLineItemSupplyChannel + setLocale: SetCartLocale + setShippingMethod: SetMyCartShippingMethod + setShippingAddress: SetCartShippingAddress + setShippingAddressCustomField: SetCartShippingAddressCustomField + setShippingAddressCustomType: SetCartShippingAddressCustomType + setShippingCustomField: SetCartShippingCustomField + setShippingCustomType: SetCartShippingCustomType + updateItemShippingAddress: UpdateCartItemShippingAddress +} + +input MyCustomerUpdateAction { + addAddress: AddCustomerAddress + addBillingAddressId: AddCustomerBillingAddressId + addShippingAddressId: AddCustomerShippingAddressId + changeAddress: ChangeCustomerAddress + changeEmail: ChangeCustomerEmail + removeAddress: RemoveCustomerAddress + removeBillingAddressId: RemoveCustomerBillingAddressId + removeShippingAddressId: RemoveCustomerShippingAddressId + setCompanyName: SetCustomerCompanyName + setAddressCustomField: SetCustomerAddressCustomField + setAddressCustomType: SetCustomerAddressCustomType + setCustomField: SetCustomerCustomField + setCustomType: SetCustomerCustomType + setLocale: SetCustomerLocale + setDateOfBirth: SetCustomerDateOfBirth + setDefaultBillingAddress: SetCustomerDefaultBillingAddress + setDefaultShippingAddress: SetCustomerDefaultShippingAddress + setFirstName: SetCustomerFirstName + setLastName: SetCustomerLastName + setMiddleName: SetCustomerMiddleName + setSalutation: SetCustomerSalutation + setTitle: SetCustomerTitle + setVatId: SetCustomerVatId +} + +input MyLineItemDraft { + productId: String + sku: String + quantity: Long + variantId: Int + supplyChannel: ResourceIdentifierInput + distributionChannel: ResourceIdentifierInput + custom: CustomFieldsDraft + shippingDetails: ItemShippingDetailsDraft + addedAt: DateTime +} + +""" +My Payments endpoint provides access to payments scoped to a specific user. +[documentation](https://docs.commercetools.com/api/projects/me-payments#mypayment) +""" +type MyPayment { + id: String! + version: Long! + customerRef: Reference + customer: Customer + anonymousId: String + paymentMethodInfo: PaymentMethodInfo! + amountPlanned: Money! + transactions: [Transaction!]! + custom: CustomFieldsType +} + +input MyPaymentDraft { + amountPlanned: MoneyInput! + paymentMethodInfo: PaymentMethodInfoInput + custom: CustomFieldsDraft + transaction: MyTransactionDraft +} + +type MyPaymentQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [MyPayment!]! +} + +input MyPaymentUpdateAction { + addTransaction: AddMyPaymentTransaction + changeAmountPlanned: ChangePaymentAmountPlanned + setCustomField: SetPaymentCustomField + setMethodInfoInterface: SetPaymentMethodInfoInterface + setMethodInfoMethod: SetPaymentMethodInfoMethod + setMethodInfoName: SetPaymentMethodInfoName +} + +input MyQuoteRequestDraft { + cartId: String! + comment: String + cartVersion: Long! +} + +input MyQuoteRequestUpdateAction { + cancelQuoteRequest: CancelQuoteRequest + setCustomField: SetMyQuoteRequestCustomField + setCustomType: SetMyQuoteRequestCustomType +} + +enum MyQuoteState { + Accepted + Declined + Failed +} + +input MyQuoteUpdateAction { + changeMyQuoteState: ChangeMyQuoteMyQuoteState + requestQuoteRenegotiation: RequestQuoteRenegotiation + setCustomField: SetQuoteCustomField + setCustomType: SetQuoteCustomType +} + +input MyShoppingListDraft { + name: [LocalizedStringItemInputType!]! + description: [LocalizedStringItemInputType!] + lineItems: [ShoppingListLineItemDraft!] = [] + textLineItems: [TextLineItemDraft!] = [] + custom: CustomFieldsDraft + deleteDaysAfterLastModification: Int +} + +input MyShoppingListUpdateAction { + addLineItem: AddShoppingListLineItem + addTextLineItem: AddShoppingListTextLineItem + changeLineItemQuantity: ChangeShoppingListLineItemQuantity + changeLineItemsOrder: ChangeShoppingListLineItemsOrder + changeName: ChangeShoppingListName + changeTextLineItemName: ChangeShoppingListTextLineItemName + changeTextLineItemQuantity: ChangeShoppingListTextLineItemQuantity + changeTextLineItemsOrder: ChangeShoppingListTextLineItemsOrder + removeLineItem: RemoveShoppingListLineItem + removeTextLineItem: RemoveShoppingListTextLineItem + setCustomField: SetShoppingListCustomField + setCustomType: SetShoppingListCustomType + setDeleteDaysAfterLastModification: SetShoppingListDeleteDaysAfterLastModification + setDescription: SetShoppingListDescription + setLineItemCustomField: SetShoppingListLineItemCustomField + setLineItemCustomType: SetShoppingListLineItemCustomType + setStore: SetShoppingListStore + setTextLineItemCustomField: SetShoppingListTextLineItemCustomField + setTextLineItemCustomType: SetShoppingListTextLineItemCustomType + setTextLineItemDescription: SetShoppingListTextLineItemDescription +} + +input MyTransactionDraft { + timestamp: DateTime + type: TransactionType! + amount: MoneyInput! + interactionId: String + custom: CustomFieldsDraft +} + +type NestedAttributeDefinitionType implements AttributeDefinitionType { + typeRef: Reference! + name: String! +} + +type NotProcessed implements OrderEditResult { + type: String! +} + +interface NotificationFormat { + type: String! +} + +type NumberAttribute implements Attribute { + value: BigDecimal! + name: String! +} + +type NumberAttributeDefinitionType implements AttributeDefinitionType { + name: String! +} + +type NumberField implements CustomField { + value: BigDecimal! + name: String! +} + +type NumberType implements FieldType { + name: String! +} + +""" +An order can be created from a cart, usually after a checkout process has been completed. +[documentation](https://docs.commercetools.com/api/projects/orders) +""" +type Order implements Versioned & ReferenceExpandable { + customerId: String + customer: Customer + customerEmail: String + anonymousId: String + lineItems( + "Queries with specified ID" + id: String): [LineItem!]! + customLineItems: [CustomLineItem!]! + totalPrice: Money! + taxedPrice: TaxedPrice + shippingAddress: Address + billingAddress: Address + inventoryMode: InventoryMode! + taxMode: TaxMode! + taxRoundingMode: RoundingMode! + taxCalculationMode: TaxCalculationMode! + customerGroup: CustomerGroup + customerGroupRef: Reference + country: Country + shippingInfo: ShippingInfo + discountCodes: [DiscountCodeInfo!]! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + directDiscounts: [DirectDiscount!]! + refusedGifts: [CartDiscount!]! + refusedGiftsRefs: [Reference!]! + paymentInfo: PaymentInfo + locale: Locale + shippingRateInput: ShippingRateInput + origin: CartOrigin! + storeRef: KeyReference + store: Store + itemShippingAddresses: [Address!]! + businessUnit: KeyReference + completedAt: DateTime + orderNumber: String + orderState: OrderState! + stateRef: Reference + state: State + shipmentState: ShipmentState + paymentState: PaymentState + syncInfo: [SyncInfo!]! + returnInfo: [ReturnInfo!]! + lastMessageSequenceNumber: Long! @deprecated(reason: "An internal field that should not be used in customer logic") + cartRef: Reference + cart: Cart + custom: CustomFieldsType + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +type OrderBillingAddressSet implements MessagePayload & OrderMessagePayload { + address: Address + oldAddress: Address + type: String! +} + +input OrderCartCommand { + id: String + cart: ResourceIdentifierInput + version: Long! + paymentState: PaymentState + orderState: OrderState + state: ReferenceInput + shipmentState: ShipmentState + orderNumber: String + custom: CustomFieldsDraft +} + +type OrderCreated implements MessagePayload & OrderMessagePayload { + order: Order! + type: String! +} + +type OrderCustomLineItemAdded implements MessagePayload & OrderMessagePayload { + customLineItem: CustomLineItem! + type: String! +} + +type OrderCustomLineItemDiscountSet implements MessagePayload & OrderMessagePayload { + customLineItemId: String! + discountedPricePerQuantity: [DiscountedLineItemPriceForQuantity!]! + taxedPrice: TaxedItemPrice + type: String! +} + +type OrderCustomLineItemQuantityChanged implements MessagePayload & OrderMessagePayload { + customLineItemId: String! + quantity: Long! + oldQuantity: Long + type: String! +} + +type OrderCustomLineItemRemoved implements MessagePayload & OrderMessagePayload { + customLineItemId: String! + customLineItem: CustomLineItem + type: String! +} + +type OrderCustomerEmailSet implements MessagePayload & OrderMessagePayload { + email: String + oldEmail: String + type: String! +} + +type OrderCustomerGroupSet implements MessagePayload & OrderMessagePayload { + customerGroup: CustomerGroup + oldCustomerGroup: CustomerGroup + customerGroupRef: Reference + oldCustomerGroupRef: Reference + type: String! +} + +type OrderCustomerSet implements MessagePayload & OrderMessagePayload { + customer: Customer + oldCustomer: Customer + customerGroup: CustomerGroup + oldCustomerGroup: CustomerGroup + customerRef: Reference + oldCustomerRef: Reference + customerGroupRef: Reference + oldCustomerGroupRef: Reference + type: String! +} + +type OrderDeleted implements MessagePayload & OrderMessagePayload { + order: Order + type: String! +} + +type OrderDiscountCodeAdded implements MessagePayload & OrderMessagePayload { + discountCode: DiscountCode + discountCodeRef: Reference! + type: String! +} + +type OrderDiscountCodeRemoved implements MessagePayload & OrderMessagePayload { + discountCode: DiscountCode + discountCodeRef: Reference! + type: String! +} + +type OrderDiscountCodeStateSet implements MessagePayload & OrderMessagePayload { + state: DiscountCodeState! + oldState: DiscountCodeState + discountCode: DiscountCode + discountCodeRef: Reference! + type: String! +} + +type OrderEdit implements Versioned { + key: String + resourceRef: Reference! + resource: Order + stagedActions: [StagedOrderUpdateActionOutput!]! + result: OrderEditResult! + comment: String + custom: CustomFieldsType + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +type OrderEditApplied implements MessagePayload & OrderMessagePayload { + result: Applied! + edit: OrderEdit + editRef: Reference! + type: String! +} + +input OrderEditDraft { + key: String + resource: ReferenceInput! + stagedActions: [StagedOrderUpdateAction!]! + custom: CustomFieldsDraft + comment: String + dryRun: Boolean +} + +type OrderEditLimitWithCurrent implements LimitWithCurrent { + limit: Long + current: Long! +} + +type OrderEditLimitsProjection { + total: OrderEditLimitWithCurrent! +} + +type OrderEditQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [OrderEdit!]! +} + +interface OrderEditResult { + type: String! +} + +input OrderEditUpdateAction { + addStagedAction: AddOrderEditStagedAction + setComment: SetOrderEditComment + setCustomField: SetOrderEditCustomField + setCustomType: SetOrderEditCustomType + setKey: SetOrderEditKey + setStagedActions: SetOrderEditStagedActions +} + +type OrderExcerpt { + totalPrice: Money! + taxedPrice: TaxedPrice + version: Long +} + +type OrderImported implements MessagePayload & OrderMessagePayload { + order: Order! + type: String! +} + +type OrderLineItemAdded implements MessagePayload & OrderMessagePayload { + lineItem: LineItem! + addedQuantity: Long! + type: String! +} + +type OrderLineItemDiscountSet implements MessagePayload & OrderMessagePayload { + lineItemId: String! + discountedPricePerQuantity: [DiscountedLineItemPriceForQuantity!]! + totalPrice: Money! + taxedPrice: TaxedItemPrice + taxedPricePortions: [MethodTaxedPrice!]! + type: String! +} + +type OrderLineItemDistributionChannelSet implements MessagePayload & OrderMessagePayload { + lineItemId: String! + distributionChannel: Channel + distributionChannelRef: Reference + type: String! +} + +type OrderLineItemRemoved implements MessagePayload & OrderMessagePayload { + lineItemId: String! + removedQuantity: Long! + newQuantity: Long! + newState: Set! + newTotalPrice: Money! + newTaxedPrice: TaxedItemPrice + newPrice: ProductPrice + newShippingDetails: ItemShippingDetails + type: String! +} + +interface OrderMessagePayload { + type: String! +} + +input OrderMyCartCommand { + id: String! + version: Long! +} + +input OrderMyQuoteCommand { + id: String! + version: Long! +} + +type OrderPaymentAdded implements MessagePayload & OrderMessagePayload { + paymentRef: Reference! + type: String! +} + +type OrderPaymentRemoved implements MessagePayload & OrderMessagePayload { + paymentRef: Reference! + removedPaymentInfo: Boolean! + type: String! +} + +type OrderPaymentStateChanged implements MessagePayload & OrderMessagePayload { + paymentState: PaymentState! + oldPaymentState: PaymentState + type: String! +} + +"Fields to access orders. Includes direct access to a single order and searching for orders." +interface OrderQueryInterface { + order( + "Queries with specified ID" + id: String, orderNumber: String): Order + orders(where: String, sort: [String!], limit: Int, offset: Int): OrderQueryResult! +} + +type OrderQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [Order!]! +} + +input OrderQuoteCommand { + quote: ResourceIdentifierInput + version: Long! + paymentState: PaymentState + orderState: OrderState + state: ReferenceInput + shipmentState: ShipmentState + orderNumber: String + custom: CustomFieldsDraft +} + +type OrderReturnShipmentStateChanged implements MessagePayload & OrderMessagePayload { + returnItemId: String! + returnShipmentState: ReturnShipmentState! + type: String! +} + +type OrderSearchConfiguration { + status: OrderSearchStatus! + lastModifiedAt: DateTime! + lastModifiedBy: Initiator +} + +enum OrderSearchStatus { + Activated + Deactivated +} + +type OrderShipmentStateChanged implements MessagePayload & OrderMessagePayload { + shipmentState: ShipmentState! + oldShipmentState: ShipmentState + type: String! +} + +type OrderShippingAddressSet implements MessagePayload & OrderMessagePayload { + address: Address + oldAddress: Address + type: String! +} + +type OrderShippingInfoSet implements MessagePayload & OrderMessagePayload { + shippingInfo: ShippingInfo + oldShippingInfo: ShippingInfo + type: String! +} + +type OrderShippingRateInputSet implements MessagePayload & OrderMessagePayload { + shippingRateInput: ShippingRateInput + oldShippingRateInput: ShippingRateInput + type: String! +} + +enum OrderState { + Confirmed + Cancelled + Complete + Open +} + +type OrderStateChanged implements MessagePayload & OrderMessagePayload { + orderId: String! + orderState: OrderState! + oldOrderState: OrderState + type: String! +} + +type OrderStateTransition implements MessagePayload & OrderMessagePayload { + force: Boolean! + state: State + oldState: State + stateRef: Reference! + oldStateRef: Reference + type: String! +} + +type OrderStoreSet implements MessagePayload & OrderMessagePayload { + store: Store + oldStore: Store + storeRef: KeyReference + oldStoreRef: KeyReference + type: String! +} + +input OrderUpdateAction { + addDelivery: AddOrderDelivery + addItemShippingAddress: AddOrderItemShippingAddress + addParcelToDelivery: AddOrderParcelToDelivery + addPayment: AddOrderPayment + addReturnInfo: AddOrderReturnInfo + changeOrderState: ChangeOrderState + changePaymentState: ChangeOrderPaymentState + changeShipmentState: ChangeOrderShipmentState + importCustomLineItemState: ImportOrderCustomLineItemState + importLineItemState: ImportOrderLineItemState + removeDelivery: RemoveOrderDelivery + removeItemShippingAddress: RemoveOrderItemShippingAddress + removeParcelFromDelivery: RemoveOrderParcelFromDelivery + removePayment: RemoveOrderPayment + setBillingAddress: SetOrderBillingAddress + setBillingAddressCustomField: SetOrderBillingAddressCustomField + setBillingAddressCustomType: SetOrderBillingAddressCustomType + setCustomField: SetOrderCustomField + setCustomLineItemCustomField: SetOrderCustomLineItemCustomField + setCustomLineItemCustomType: SetOrderCustomLineItemCustomType + setCustomLineItemShippingDetails: SetOrderCustomLineItemShippingDetails + setCustomType: SetOrderCustomType + setCustomerEmail: SetOrderCustomerEmail + setCustomerId: SetOrderCustomerId + setDeliveryAddress: SetOrderDeliveryAddress + setDeliveryAddressCustomField: SetOrderDeliveryAddressCustomField + setDeliveryAddressCustomType: SetOrderDeliveryAddressCustomType + setDeliveryCustomField: SetOrderDeliveryCustomField + setDeliveryCustomType: SetOrderDeliveryCustomType + setDeliveryItems: SetOrderDeliveryItems + setItemShippingAddressCustomField: SetOrderItemShippingAddressCustomField + setItemShippingAddressCustomType: SetOrderItemShippingAddressCustomType + setLineItemCustomField: SetOrderLineItemCustomField + setLineItemCustomType: SetOrderLineItemCustomType + setLineItemShippingDetails: SetOrderLineItemShippingDetails + setLocale: SetOrderLocale + setOrderNumber: SetOrderNumber + setParcelCustomField: SetOrderParcelCustomField + setParcelCustomType: SetOrderParcelCustomType + setParcelItems: SetOrderParcelItems + setParcelMeasurements: SetOrderParcelMeasurements + setParcelTrackingData: SetOrderParcelTrackingData + setReturnInfo: SetOrderReturnInfo + setReturnItemCustomField: SetOrderReturnItemCustomField + setReturnItemCustomType: SetOrderReturnItemCustomType + setReturnPaymentState: SetOrderReturnPaymentState + setReturnShipmentState: SetOrderReturnShipmentState + setShippingAddress: SetOrderShippingAddress + setShippingAddressCustomField: SetOrderShippingAddressCustomField + setShippingAddressCustomType: SetOrderShippingAddressCustomType + setShippingCustomField: SetOrderShippingCustomField + setShippingCustomType: SetOrderShippingCustomType + setStore: SetOrderStore + transitionCustomLineItemState: TransitionOrderCustomLineItemState + transitionLineItemState: TransitionOrderLineItemState + transitionState: TransitionOrderState + updateItemShippingAddress: UpdateOrderItemShippingAddress + updateSyncInfo: UpdateOrderSyncInfo +} + +type Parcel { + id: String! + createdAt: DateTime! + measurements: ParcelMeasurements + trackingData: TrackingData + items: [DeliveryItem!]! + custom: CustomFieldsType +} + +type ParcelAddedToDelivery implements MessagePayload & OrderMessagePayload { + delivery: Delivery! + parcel: Parcel! + shippingKey: String + type: String! +} + +type ParcelData { + measurements: ParcelMeasurements + trackingData: TrackingData + items: [DeliveryItem!]! + custom: CustomFieldsCommand +} + +input ParcelDataDraftType { + measurements: ParcelMeasurementsDraftType + trackingData: TrackingDataDraftType + items: [DeliveryItemDraftType!] = [] + custom: CustomFieldsDraft +} + +input ParcelDraft { + id: String! + createdAt: DateTime! + measurements: ParcelMeasurementsDraftType + trackingData: TrackingDataDraftType + items: [DeliveryItemDraftType!] = [] + custom: CustomFieldsDraft +} + +type ParcelItemsUpdated implements MessagePayload & OrderMessagePayload { + deliveryId: String! + parcelId: String! + items: [DeliveryItem!]! + oldItems: [DeliveryItem!]! + shippingKey: String + type: String! +} + +type ParcelMeasurements { + heightInMillimeter: Int + lengthInMillimeter: Int + widthInMillimeter: Int + weightInGram: Int +} + +input ParcelMeasurementsDraftType { + heightInMillimeter: Int + lengthInMillimeter: Int + widthInMillimeter: Int + weightInGram: Int +} + +type ParcelMeasurementsUpdated implements MessagePayload & OrderMessagePayload { + deliveryId: String! + parcelId: String! + measurements: ParcelMeasurements + shippingKey: String + type: String! +} + +type ParcelRemovedFromDelivery implements MessagePayload & OrderMessagePayload { + deliveryId: String! + parcel: Parcel! + shippingKey: String + type: String! +} + +type ParcelTrackingDataUpdated implements MessagePayload & OrderMessagePayload { + deliveryId: String! + parcelId: String! + trackingData: TrackingData + shippingKey: String + type: String! +} + +""" +Payments hold information about the current state of receiving and/or refunding money. +[documentation](https://docs.commercetools.com/api/projects/payments) +""" +type Payment implements Versioned { + key: String + customerRef: Reference + customer: Customer + anonymousId: String + interfaceId: String + amountPlanned: Money! + paymentMethodInfo: PaymentMethodInfo! + paymentStatus: PaymentStatus! + transactions: [Transaction!]! + interfaceInteractionsRaw(limit: Int, offset: Int): InterfaceInteractionsRawResult! + custom: CustomFieldsType + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +type PaymentCreated implements MessagePayload { + payment: Payment! + type: String! +} + +input PaymentDraft { + amountPlanned: MoneyInput! + paymentMethodInfo: PaymentMethodInfoInput + custom: CustomFieldsDraft + key: String + customer: ResourceIdentifierInput + anonymousId: String + interfaceId: String + paymentStatus: PaymentStatusInput + transactions: [TransactionDraft!] + interfaceInteractions: [CustomFieldsDraft!] +} + +type PaymentInfo { + payments: [Payment!]! + paymentRefs: [Reference!]! +} + +type PaymentInteractionAdded implements MessagePayload { + interaction: CustomFieldsType! + type: String! +} + +type PaymentMethodInfo { + paymentInterface: String + method: String + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!] +} + +input PaymentMethodInfoInput { + paymentInterface: String + method: String + name: [LocalizedStringItemInputType!] +} + +type PaymentQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [Payment!]! +} + +enum PaymentState { + Paid + CreditOwed + Pending + Failed + BalanceDue +} + +type PaymentStatus { + interfaceCode: String + interfaceText: String + stateRef: Reference + state: State +} + +input PaymentStatusInput { + interfaceCode: String + interfaceText: String + state: ReferenceInput +} + +type PaymentStatusInterfaceCodeSet implements MessagePayload { + paymentId: String! + interfaceCode: String + type: String! +} + +type PaymentStatusStateTransition implements MessagePayload { + force: Boolean! + state: State + stateRef: Reference + type: String! +} + +type PaymentTransactionAdded implements MessagePayload { + transaction: Transaction! + type: String! +} + +type PaymentTransactionStateChanged implements MessagePayload { + transactionId: String! + state: TransactionState! + type: String! +} + +input PaymentUpdateAction { + addInterfaceInteraction: AddPaymentInterfaceInteraction + addTransaction: AddPaymentTransaction + changeAmountPlanned: ChangePaymentAmountPlanned + changeTransactionInteractionId: ChangePaymentTransactionInteractionId + changeTransactionState: ChangePaymentTransactionState + changeTransactionTimestamp: ChangePaymentTransactionTimestamp + setAmountPaid: SetPaymentAmountPaid + setAmountRefunded: SetPaymentAmountRefunded + setAnonymousId: SetPaymentAnonymousId + setAuthorization: SetPaymentAuthorization + setCustomField: SetPaymentCustomField + setCustomType: SetPaymentCustomType + setCustomer: SetPaymentCustomer + setExternalId: SetPaymentExternalId + setInterfaceId: SetPaymentInterfaceId + setKey: SetPaymentKey + setMethodInfoInterface: SetPaymentMethodInfoInterface + setMethodInfoMethod: SetPaymentMethodInfoMethod + setMethodInfoName: SetPaymentMethodInfoName + setStatusInterfaceCode: SetPaymentStatusInterfaceCode + setStatusInterfaceText: SetPaymentStatusInterfaceText + setTransactionCustomField: SetPaymentTransactionCustomField + setTransactionCustomType: SetPaymentTransactionCustomType + transitionState: TransitionPaymentState +} + +type PlainEnumValue { + key: String! + label: String! +} + +input PlainEnumValueDraft { + key: String! + label: String! +} + +type PlainEnumValueResult { + limit: Int + offset: Int + total: Int! + results: [PlainEnumValue!]! +} + +type PlatformFormat implements NotificationFormat { + type: String! +} + +input PlatformFormatInput { + dummy: String +} + +type Point implements Geometry { + type: String! + coordinates: [Float!]! +} + +type PreviewFailure implements OrderEditResult { + type: String! + errors: [Json!]! +} + +type PreviewSuccess implements OrderEditResult { + type: String! + preview: Order! + messagePayloads: [OrderMessagePayload!]! +} + +type PriceFunction { + function: String! + currencyCode: Currency! +} + +input PriceFunctionDraft { + function: String! + currencyCode: Currency! +} + +""" +This mode determines which type of Prices the system uses for +Product Price Selection as well as for LineItem Price selection +""" +enum PriceMode { + "The system looks up prices from Standalone Prices, stored separately from Products." + Standalone + + "The system looks up prices from the `prices` field of the ProductVariant inside a Product." + Embedded +} + +input PriceSelectorInput { + currency: Currency! + country: Country + customerGroup: ReferenceInput + channel: ReferenceInput + date: DateTime +} + +type Product implements Versioned & ReviewTarget & ReferenceExpandable { + id: String! + key: String + version: Long! + productTypeRef: Reference! + productType: ProductTypeDefinition + masterData: ProductCatalogData! + skus: [String!]! + createdAt: DateTime! + lastModifiedAt: DateTime! + stateRef: Reference + state: State + priceMode: PriceMode + taxCategoryRef: Reference + taxCategory: TaxCategory + reviewRatingStatistics: ReviewRatingStatistics + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + productSelectionRefs(where: String, sort: [String!], limit: Int, offset: Int): SelectionOfProductQueryResult! + createdBy: Initiator + lastModifiedBy: Initiator +} + +type ProductAddedToCategory implements MessagePayload { + category: ReferenceId! + staged: Boolean! + type: String! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type ProductAssignment { + productRef: Reference! + product: Product + productSelectionRef: Reference! + productSelection: ProductSelection +} + +type ProductAssignmentQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [ProductAssignment!]! +} + +input ProductAttributeInput { + name: String! + value: String! +} + +type ProductCatalogData { + current: ProductData + staged: ProductData + published: Boolean! + hasStagedChanges: Boolean! +} + +type ProductCreated implements MessagePayload { + productProjection: ProductProjectionMessagePayload! + type: String! +} + +type ProductData { + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + description( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!]! + descriptionAllLocales: [LocalizedString!] + slug( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + slugAllLocales: [LocalizedString!]! + categoryOrderHint(categoryId: String!): String + categoryOrderHints: [CategoryOrderHint!]! + categoriesRef: [Reference!]! + categories: [Category!]! + searchKeyword( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale!): [SearchKeyword!] + searchKeywords: [SearchKeywords!]! + metaTitle( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + metaTitleAllLocales: [LocalizedString!] + metaKeywords( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + metaKeywordsAllLocales: [LocalizedString!] + metaDescription( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + metaDescriptionAllLocales: [LocalizedString!] + masterVariant: ProductVariant! + variants( + "Queries for products with specified SKUs" + skus: [String!], isOnStock: Boolean, + + """ + The IDs of channels for which to check the stock of the `isOnStock`. + + Variant is returned if at least one of the channels is matching the `isOnStock` + + If the list is not provided then noChannel is checked for `isOnStock` + """ + stockChannelIds: [String!], hasImages: Boolean): [ProductVariant!]! + allVariants( + "Queries for products with specified SKUs" + skus: [String!], isOnStock: Boolean, + + """ + The IDs of channels for which to check the stock of the `isOnStock`. + + Variant is returned if at least one of the channels is matching the `isOnStock` + + If the list is not provided then noChannel is checked for `isOnStock` + """ + stockChannelIds: [String!], hasImages: Boolean): [ProductVariant!]! + variant( + "Queries for a variant with specified SKU" + sku: String, + + "Queries for a [ProductVariant](https://docs.commercetools.com/api/projects/products#productvariant) with specified `key`" + key: String): ProductVariant + skus: [String!]! +} + +type ProductDeleted implements MessagePayload { + removedImageUrls: Set! + currentProjection: ProductProjectionMessagePayload + type: String! +} + +"\nA product price can be discounted in two ways:\n\n* with a relative or an absolute product discount, which will be automatically applied to all prices in a product that match a discount predicate.\n A relative discount reduces the matching price by a fraction (for example 10 % off). An absolute discount reduces the matching price by a fixed amount (for example 10\u20AC off). If more than one product discount matches a price, the discount sort order determines which one will be applied.\n* with an external product discount, which can then be used to explicitly set a discounted value on a particular product price.\n\nThe discounted price is stored in the discounted field of the Product Price.\n\nNote that when a discount is created, updated or removed it can take up to 15 minutes to update all the prices with the discounts.\n\nThe maximum number of ProductDiscounts that can be active at the same time is **200**.\n " +type ProductDiscount implements Versioned & ReferenceExpandable { + predicate: String! + validFrom: DateTime + validUntil: DateTime + isActive: Boolean! + isValid: Boolean! + sortOrder: String! + key: String + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + description( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + referenceRefs: [Reference!]! + nameAllLocales: [LocalizedString!]! + descriptionAllLocales: [LocalizedString!] + value: ProductDiscountValue! + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +input ProductDiscountDraft { + value: ProductDiscountValueInput! + predicate: String! + sortOrder: String! + name: [LocalizedStringItemInputType!]! + description: [LocalizedStringItemInputType!] + validFrom: DateTime + validUntil: DateTime + isActive: Boolean = true + key: String +} + +type ProductDiscountLimitWithCurrent implements LimitWithCurrent { + limit: Long + current: Long! +} + +type ProductDiscountLimitsProjection { + totalActive: ProductDiscountLimitWithCurrent! +} + +type ProductDiscountQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [ProductDiscount!]! +} + +input ProductDiscountUpdateAction { + changeIsActive: ChangeProductDiscountIsActive + changeName: ChangeProductDiscountName + changePredicate: ChangeProductDiscountPredicate + changeSortOrder: ChangeProductDiscountSortOrder + changeValue: ChangeProductDiscountValue + setDescription: SetProductDiscountDescription + setKey: SetProductDiscountKey + setValidFrom: SetProductDiscountValidFrom + setValidFromAndUntil: SetProductDiscountValidFromAndUntil + setValidUntil: SetProductDiscountValidUntil +} + +interface ProductDiscountValue { + type: String! +} + +input ProductDiscountValueInput { + relative: RelativeDiscountValueInput + absolute: AbsoluteDiscountValueInput + external: ExternalDiscountValueInput +} + +input ProductDraft { + name: [LocalizedStringItemInputType!]! + productType: ResourceIdentifierInput! + slug: [LocalizedStringItemInputType!]! + key: String + description: [LocalizedStringItemInputType!] + categories: [ResourceIdentifierInput!] + categoryOrderHints: [CategoryOrderHintInput!] + metaTitle: [LocalizedStringItemInputType!] + metaDescription: [LocalizedStringItemInputType!] + metaKeywords: [LocalizedStringItemInputType!] + masterVariant: ProductVariantInput + variants: [ProductVariantInput!] = [] + taxCategory: ResourceIdentifierInput + state: ResourceIdentifierInput + priceMode: PriceMode + searchKeywords: [SearchKeywordInput!] + publish: Boolean +} + +type ProductImageAdded implements MessagePayload { + variantId: Int! + image: Image! + staged: Boolean! + type: String! +} + +type ProductLimitsProjection { + pricesPerVariant: Limit! + variants: Limit! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type ProductOfSelection { + productRef: Reference! + product: Product + variantSelection: ProductVariantSelection +} + +type ProductOfSelectionQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [ProductOfSelection!]! +} + +type ProductPrice { + id: String + value: BaseMoney! + key: String + country: Country + customerGroup: CustomerGroup + customerGroupRef: Reference + channel: Channel + channelRef: Reference + validFrom: DateTime + validUntil: DateTime + discounted: DiscountedProductPriceValue + tiers: [ProductPriceTier!] + custom: CustomFieldsType +} + +input ProductPriceDataInput { + value: BaseMoneyInput! + key: String + country: Country + customerGroup: ReferenceInput + channel: ResourceIdentifierInput + validFrom: DateTime + validUntil: DateTime + tiers: [ProductPriceTierInput!] = [] + custom: CustomFieldsDraft +} + +type ProductPriceDiscountUpdateMessagePayload { + variantId: Int! + variantKey: String + sku: String + priceId: String! + discounted: DiscountedProductPriceValue + staged: Boolean! +} + +type ProductPriceDiscountsSet implements MessagePayload { + updatedPrices: [ProductPriceDiscountUpdateMessagePayload!]! + type: String! +} + +type ProductPriceExternalDiscountSet implements MessagePayload { + variantId: Int! + variantKey: String + sku: String + priceId: String! + discounted: DiscountedProductPriceValue + staged: Boolean! + type: String! +} + +type ProductPriceSearch { + id: String + value: BaseMoney! + key: String + country: Country + customerGroup: CustomerGroup + customerGroupRef: Reference + channel: Channel + channelRef: Reference + validFrom: DateTime + validUntil: DateTime + discounted: DiscountedProductSearchPriceValue + tiers: [ProductSearchPriceTier!] + custom: CustomFieldsType +} + +type ProductPriceTier { + minimumQuantity: Int! + value: BaseMoney! +} + +input ProductPriceTierInput { + minimumQuantity: Int! + value: BaseMoneyInput! +} + +type ProductProjection { + id: String! + key: String + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + productTypeRef: Reference! + productType: ProductTypeDefinition + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!]! + description( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + descriptionAllLocales: [LocalizedString!] + slug( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + slugAllLocales: [LocalizedString!]! + categoryOrderHints: [CategoryOrderHintProductSearch!]! + categoriesRef: [Reference!]! + categories: [Category!]! + searchKeywords: [SearchKeywordsProductSearch!]! + metaTitle( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + metaTitleAllLocales: [LocalizedString!] + metaKeywords( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + metaKeywordsAllLocales: [LocalizedString!] + metaDescription( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + metaDescriptionAllLocales: [LocalizedString!] + hasStagedChanges: Boolean! + published: Boolean! + masterVariant: ProductSearchVariant! + variants: [ProductSearchVariant!]! + taxCategoryRef: Reference + taxCategory: TaxCategory + stateRef: Reference + state: State + reviewRatingStatistics: ReviewRatingStatistics +} + +type ProductProjectionMessagePayload { + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + productTypeRef: Reference! + productType: ProductTypeDefinition + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!]! + description( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + descriptionAllLocales: [LocalizedString!] + slug( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + slugAllLocales: [LocalizedString!]! + categoryOrderHints: [CategoryOrderHint!]! + categoriesRef: [Reference!]! + categories: [Category!]! + searchKeywords: [SearchKeywords!]! + metaTitle( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + metaTitleAllLocales: [LocalizedString!] + metaKeywords( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + metaKeywordsAllLocales: [LocalizedString!] + metaDescription( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + metaDescriptionAllLocales: [LocalizedString!] + hasStagedChanges: Boolean! + published: Boolean! + masterVariant: ProductVariant! + variants: [ProductVariant!]! + taxCategoryRef: Reference + taxCategory: TaxCategory + stateRef: Reference + state: State + reviewRatingStatistics: ReviewRatingStatistics +} + +type ProductProjectionSearchResult { + offset: Int! + count: Int! + total: Int! + results: [ProductProjection!]! + facets: [FacetResultValue!]! +} + +type ProductPublished implements MessagePayload { + productProjection: ProductProjectionMessagePayload! + removedImageUrls: [String!]! + scope: PublishScope! + type: String! +} + +type ProductQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [Product!]! +} + +type ProductReferenceIdentifier { + typeId: String! + id: String + key: String +} + +type ProductRemovedFromCategory implements MessagePayload { + category: ReferenceId! + staged: Boolean! + type: String! +} + +type ProductRevertedStagedChanges implements MessagePayload { + removedImageUrls: Set! + type: String! +} + +type ProductSearchPriceTier { + minimumQuantity: Int! + value: BaseMoney! +} + +type ProductSearchVariant { + id: Int! + key: String + sku: String + prices: [ProductPriceSearch!] + + "Returns a single price based on the price selection rules." + price(currency: Currency!, country: Country, customerGroupId: String, channelId: String, date: DateTime): ProductPriceSearch + images: [ImageProductSearch!]! + assets: [Asset!]! + availability: ProductSearchVariantAvailabilityWithChannels + + "This field contains raw attributes data" + attributesRaw( + """ + The names of the attributes to include. + + If neither `includeNames` nor `excludeNames` are provided, then all attributes are returned. + """ + includeNames: [String!], + + """ + The names of the attributes to exclude. + + If neither `includeNames` nor `excludeNames` are provided, then all attributes are returned. + """ + excludeNames: [String!]): [RawProductSearchAttribute!]! + isMatchingVariant: Boolean + scopedPrice: ScopedPrice + scopedPriceDiscounted: Boolean +} + +"Product variant availabilities" +type ProductSearchVariantAvailabilitiesResult { + limit: Int + offset: Int + total: Int! + results: [ProductSearchVariantAvailabilityWithChannel!]! +} + +"Product variant availability" +type ProductSearchVariantAvailability { + isOnStock: Boolean! + restockableInDays: Int + availableQuantity: Long + version: Long + id: String +} + +type ProductSearchVariantAvailabilityWithChannel { + channelRef: Reference! + channel: Channel + availability: ProductSearchVariantAvailability! +} + +type ProductSearchVariantAvailabilityWithChannels { + noChannel: ProductSearchVariantAvailability + channels( + """ + The IDs of channels to include. + + If neither `includeChannelIds` nor `excludeChannelIds` are provided, then all channels are returned. + """ + includeChannelIds: [String!], + + """ + The IDs of channels to exclude. + + If neither `includeChannelIds` nor `excludeChannelIds` are provided, then all channels are returned. + """ + excludeChannelIds: [String!], limit: Int, offset: Int): ProductSearchVariantAvailabilitiesResult! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type ProductSelection implements Versioned { + key: String + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!]! + productRefs(where: String, sort: [String!], limit: Int, offset: Int): ProductOfSelectionQueryResult! + productCount: Int! + custom: CustomFieldsType + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type ProductSelectionCreated implements MessagePayload { + productSelection: ProductSelectionCreatedPayload! + type: String! +} + +interface ProductSelectionCreatedPayload { + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!]! + custom: CustomFieldsType + type: String! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type ProductSelectionDeleted implements MessagePayload { + type: String! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type ProductSelectionProductAdded implements MessagePayload { + variantSelection: ProductVariantSelection + product: Product + productRef: Reference! + type: String! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type ProductSelectionProductRemoved implements MessagePayload { + product: Product + productRef: Reference! + type: String! +} + +"Fields to access product selection assignments. BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +interface ProductSelectionQueryInterface { + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + productSelectionAssignments(where: String, sort: [String!], limit: Int, offset: Int): ProductAssignmentQueryResult! +} + +type ProductSelectionQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [ProductSelection!]! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type ProductSelectionSetting { + productSelectionRef: Reference! + productSelection: ProductSelection + active: Boolean! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input ProductSelectionSettingDraft { + productSelection: ResourceIdentifierInput! + active: Boolean! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input ProductSelectionSettingInActionInput { + productSelection: ResourceIdentifierInput! + active: Boolean +} + +input ProductSelectionUpdateAction { + addProduct: AddProductSelectionProduct + changeName: ChangeProductSelectionName + removeProduct: RemoveProductSelectionProduct + setCustomField: SetProductSelectionCustomField + setCustomType: SetProductSelectionCustomType + setKey: SetProductSelectionKey + setVariantSelection: SetProductSelectionVariantSelection +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type ProductSelectionVariantSelectionChanged implements MessagePayload { + oldVariantSelection: ProductVariantSelection + newVariantSelection: ProductVariantSelection + product: Product + productRef: Reference! + type: String! +} + +type ProductSlugChanged implements MessagePayload { + slug( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + oldSlug( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + slugAllLocales: [LocalizedString!]! + oldSlugAllLocales: [LocalizedString!] + type: String! +} + +type ProductStateTransition implements MessagePayload { + force: Boolean! + state: State + stateRef: Reference! + type: String! +} + +type ProductTypeDefinition implements Versioned & ReferenceExpandable { + key: String + name: String! + description: String! + attributeDefinitions( + """ + The names of the attribute definitions to include. + + If neither `includeNames` nor `excludeNames` are provided, then all attribute definitions are returned. + """ + includeNames: [String!], + + """ + The names of the attribute definitions to exclude. + + If neither `includeNames` nor `excludeNames` are provided, then all attribute definitions are returned. + """ + excludeNames: [String!], limit: Int, offset: Int, sort: [String!]): AttributeDefinitionResult! + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +type ProductTypeDefinitionQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [ProductTypeDefinition!]! +} + +input ProductTypeDraft { + name: String! + description: String! + key: String + attributeDefinitions: [AttributeDefinitionDraft!] +} + +type ProductTypeLimitWithCurrent implements LimitWithCurrent { + limit: Long + current: Long! +} + +type ProductTypeLimitsProjection { + total: ProductTypeLimitWithCurrent! +} + +input ProductTypeUpdateAction { + setKey: setKey + changeName: changeName + changeDescription: changeDescription + removeAttributeDefinition: removeAttributeDefinition + changeLabel: changeLabel + setInputTip: setInputTip + changeIsSearchable: changeIsSearchable + changeInputHint: changeInputHint + addAttributeDefinition: addAttributeDefinition + changeAttributeOrder: changeAttributeOrder + changeAttributeOrderByName: changeAttributeOrderByName + removeEnumValues: removeEnumValues + addPlainEnumValue: addPlainEnumValue + changePlainEnumValueLabel: changePlainEnumValueLabel + changePlainEnumValueOrder: changePlainEnumValueOrder + addLocalizedEnumValue: addLocalizedEnumValue + changeLocalizedEnumValueLabel: changeLocalizedEnumValueLabel + changeLocalizedEnumValueOrder: changeLocalizedEnumValueOrder + changeAttributeName: changeAttributeName + changeEnumKey: changeEnumKey +} + +type ProductUnpublished implements MessagePayload { + type: String! +} + +input ProductUpdateAction { + moveImageToPosition: MoveProductImageToPosition + setSearchKeywords: SetSearchKeywords + revertStagedChanges: RevertStagedChanges + revertStagedVariantChanges: RevertStagedVariantChanges + publish: PublishProduct + unpublish: UnpublishProduct + transitionState: TransitionProductState + addAsset: AddProductAsset + addExternalImage: AddProductExternalImage + addPrice: AddProductPrice + addToCategory: AddProductToCategory + addVariant: AddProductVariant + changeAssetName: ChangeProductAssetName + changeAssetOrder: ChangeProductAssetOrder + changeMasterVariant: ChangeProductMasterVariant + changeImageLabel: ChangeProductImageLabel + changeName: ChangeProductName + changePrice: ChangeProductPrice + changeSlug: ChangeProductSlug + removeAsset: RemoveProductAsset + removeFromCategory: RemoveProductFromCategory + removeImage: RemoveProductImage + removePrice: RemoveProductPrice + removeVariant: RemoveProductVariant + setAssetCustomField: SetProductAssetCustomField + setAssetCustomType: SetProductAssetCustomType + setAssetDescription: SetProductAssetDescription + setAssetKey: SetProductAssetKey + setAssetSources: SetProductAssetSources + setAssetTags: SetProductAssetTags + setCategoryOrderHint: SetProductCategoryOrderHint + setDiscountedPrice: SetProductDiscountedPrice + setAttribute: SetProductAttribute + setAttributeInAllVariants: SetProductAttributeInAllVariants + setDescription: SetProductDescription + setImageLabel: SetProductImageLabel + setKey: SetProductKey + setMetaAttributes: SetProductMetaAttributes + setMetaDescription: SetProductMetaDescription + setMetaKeywords: SetProductMetaKeywords + setMetaTitle: SetProductMetaTitle + setProductPriceCustomField: SetProductPriceCustomField + setProductPriceCustomType: SetProductPriceCustomType + setPriceMode: SetProductPriceMode + setPrices: SetProductPrices + setSku: SetProductSku + setTaxCategory: SetProductTaxCategory + setProductVariantKey: SetProductVariantKey +} + +type ProductVariant { + id: Int! + key: String + sku: String + prices: [ProductPrice!] + + "Returns a single price based on the price selection rules." + price(currency: Currency!, country: Country, customerGroupId: String, channelId: String, date: DateTime): ProductPrice + images: [Image!]! + assets: [Asset!]! + availability: ProductVariantAvailabilityWithChannels + + "This field contains raw attributes data" + attributesRaw( + """ + The names of the attributes to include. + + If neither `includeNames` nor `excludeNames` are provided, then all attributes are returned. + """ + includeNames: [String!], + + """ + The names of the attributes to exclude. + + If neither `includeNames` nor `excludeNames` are provided, then all attributes are returned. + """ + excludeNames: [String!]): [RawProductAttribute!]! +} + +type ProductVariantAdded implements MessagePayload { + variant: ProductVariant! + staged: Boolean! + type: String! +} + +"Product variant availabilities" +type ProductVariantAvailabilitiesResult { + limit: Int + offset: Int + total: Int! + results: [ProductVariantAvailabilityWithChannel!]! +} + +"Product variant availability" +type ProductVariantAvailability { + isOnStock: Boolean! + restockableInDays: Int + availableQuantity: Long + version: Long + id: String +} + +type ProductVariantAvailabilityWithChannel { + channelRef: Reference! + channel: Channel + availability: ProductVariantAvailability! +} + +type ProductVariantAvailabilityWithChannels { + noChannel: ProductVariantAvailability + channels( + """ + The IDs of channels to include. + + If neither `includeChannelIds` nor `excludeChannelIds` are provided, then all channels are returned. + """ + includeChannelIds: [String!], + + """ + The IDs of channels to exclude. + + If neither `includeChannelIds` nor `excludeChannelIds` are provided, then all channels are returned. + """ + excludeChannelIds: [String!], limit: Int, offset: Int): ProductVariantAvailabilitiesResult! +} + +type ProductVariantDeleted implements MessagePayload { + removedImageUrls: Set! + variant: ProductVariant + type: String! +} + +input ProductVariantImportDraft { + id: Int + sku: String + prices: [ProductPriceDataInput!] = [] + images: [ImageInput!] = [] + attributes: [ProductAttributeInput!] = [] +} + +input ProductVariantInput { + sku: String + key: String + prices: [ProductPriceDataInput!] = [] + images: [ImageInput!] = [] + attributes: [ProductAttributeInput!] = [] + assets: [AssetDraftInput!] = [] +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +interface ProductVariantSelection { + type: String! + skus: [String!]! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input ProductVariantSelectionDraft { + inclusion: [String!] + exclusion: [String!] +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type ProductVariantSelectionExclusion implements ProductVariantSelection { + type: String! + skus: [String!]! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type ProductVariantSelectionInclusion implements ProductVariantSelection { + type: String! + skus: [String!]! +} + +"Contains information about the limits of your project." +type ProjectCustomLimitsProjection { + query: QueryLimitsProjection! + products: ProductLimitsProjection! + shoppingLists: ShoppingListLimitsProjection! + extensions: ExtensionLimitsProjection! + productDiscounts: ProductDiscountLimitsProjection! + cartDiscounts: CartDiscountLimitsProjection! + orderEdits: OrderEditLimitsProjection! + stores: StoreLimitsProjection! + customers: CustomerLimitsProjection! + customerGroups: CustomerGroupLimitsProjection! + zones: ZoneLimitsProjection! + taxCategories: TaxCategoryLimitsProjection! + refreshTokens: RefreshTokenLimitsProjection! + shippingMethods: ShippingMethodLimitsProjection! + carts: CartLimitsProjection! + customObjects: CustomObjectLimitsProjection! + search: SearchLimitsProjection! + category: CategoryLimitsProjection! + productType: ProductTypeLimitsProjection! +} + +"Project contains information about project." +type ProjectProjection { + key: String! + name: String! + languages: [Locale!]! + createdAt: DateTime! + trialUntil: YearMonth + carts: CartsConfiguration! + shoppingLists: ShoppingListsConfiguration! + version: Long! + externalOAuth: ExternalOAuth + searchIndexing: SearchIndexingConfiguration + messages: MessagesConfiguration! + countries: [Country!]! + currencies: [Currency!]! + shippingRateInputType: ShippingRateInputType +} + +input ProjectSettingsUpdateAction { + changeCartsConfiguration: ChangeProjectSettingsCartsConfiguration + changeCountries: ChangeProjectSettingsCountries + changeCountryTaxRateFallbackEnabled: ChangeProjectSettingsCountryTaxRateFallbackEnabled + changeCurrencies: ChangeProjectSettingsCurrencies + changeLanguages: ChangeProjectSettingsLanguages + changeMessagesConfiguration: ChangeProjectSettingsMessagesConfiguration + changeMessagesEnabled: ChangeProjectSettingsMessagesEnabled + changeMyBusinessUnitStatusOnCreation: ChangeProjectSettingsMyBusinessUnitStatusOnCreation + changeName: ChangeProjectSettingsName + changeOrderSearchStatus: ChangeProjectSettingsOrderSearchStatus + changeProductSearchIndexingEnabled: ChangeProjectSettingsProductSearchIndexingEnabled + changeShoppingListsConfiguration: ChangeProjectSettingsShoppingListsConfiguration + setExternalOAuth: SetProjectSettingsExternalOAuth + setShippingRateInputType: SetProjectSettingsShippingRateInputType +} + +input PublishProduct { + scope: PublishScope +} + +enum PublishScope { + "Publishes the complete staged projection" + All + + "Publishes only prices on the staged projection" + Prices +} + +type Query implements CartQueryInterface & CustomerActiveCartInterface & OrderQueryInterface & CustomerQueryInterface & ShoppingListQueryInterface & ShippingMethodsByCartInterface & MeFieldInterface & ProductSelectionQueryInterface { + """ + This field can only be used with an access token created with the password flow or with an anonymous session. + + It gives access to the data that is specific to the customer or the anonymous session linked to the access token. + """ + me: Me! + + "This field gives access to the resources (such as carts) that are inside the given store." + inStore(key: KeyReferenceInput!): InStore! + + "This field gives access to the resources (such as carts) that are inside one of the given stores." + inStores(keys: [KeyReferenceInput!]!): InStore! + customerGroup( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): CustomerGroup + customerGroups(where: String, sort: [String!], limit: Int, offset: Int): CustomerGroupQueryResult! + category( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Category + categories(where: String, sort: [String!], limit: Int, offset: Int): CategoryQueryResult! + channel( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Channel + channels(where: String, sort: [String!], limit: Int, offset: Int): ChannelQueryResult! + customObject( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String, container: String): CustomObject + customObjects(where: String, sort: [String!], limit: Int, offset: Int, container: String!): CustomObjectQueryResult! + productType( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ProductTypeDefinition + productTypes(where: String, sort: [String!], limit: Int, offset: Int): ProductTypeDefinitionQueryResult! + typeDefinition( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): TypeDefinition + typeDefinitions(where: String, sort: [String!], limit: Int, offset: Int): TypeDefinitionQueryResult! + shippingMethod( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ShippingMethod + shippingMethods(where: String, sort: [String!], limit: Int, offset: Int): ShippingMethodQueryResult! + shippingMethodsByCart(id: String!): [ShippingMethod!]! + shippingMethodsByLocation(country: Country!, state: String, currency: Currency): [ShippingMethod!]! + zone( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Zone + zones(where: String, sort: [String!], limit: Int, offset: Int): ZoneQueryResult! + taxCategory( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): TaxCategory + taxCategories(where: String, sort: [String!], limit: Int, offset: Int): TaxCategoryQueryResult! + discountCode(id: String!): DiscountCode + discountCodes(where: String, sort: [String!], limit: Int, offset: Int): DiscountCodeQueryResult! + cartDiscount( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): CartDiscount + cartDiscounts(where: String, sort: [String!], limit: Int, offset: Int): CartDiscountQueryResult! + productDiscount( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ProductDiscount + productDiscounts(where: String, sort: [String!], limit: Int, offset: Int): ProductDiscountQueryResult! + product( + "Queries for a product with specified SKU" + sku: String, + + "Queries for a [Product](https://docs.commercetools.com/api/projects/products#product) with specified [ProductVariant](https://docs.commercetools.com/api/projects/products#productvariant) `key`" + variantKey: String, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Product + products(where: String, sort: [String!], limit: Int, offset: Int, + + "Queries for products with specified SKUs" + skus: [String!]): ProductQueryResult! + state( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): State + states(where: String, sort: [String!], limit: Int, offset: Int): StateQueryResult! + customer( + "Queries a customer with specified email token" + emailToken: String, + + "Queries a customer with specified password token" + passwordToken: String, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Customer + customers(where: String, sort: [String!], limit: Int, offset: Int): CustomerQueryResult! + inventoryEntry( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): InventoryEntry + inventoryEntries(where: String, sort: [String!], limit: Int, offset: Int): InventoryEntryQueryResult! + cart(id: String!): Cart + carts(where: String, sort: [String!], limit: Int, offset: Int): CartQueryResult! + customerActiveCart(customerId: String!): Cart + message( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Message + messages(where: String, sort: [String!], limit: Int, offset: Int): MessageQueryResult! + order( + "Queries with specified ID" + id: String, orderNumber: String): Order + orders(where: String, sort: [String!], limit: Int, offset: Int): OrderQueryResult! + orderEdit( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): OrderEdit + orderEdits(where: String, sort: [String!], limit: Int, offset: Int): OrderEditQueryResult! + shoppingList( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ShoppingList + shoppingLists(where: String, sort: [String!], limit: Int, offset: Int): ShoppingListQueryResult! + payment( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Payment + payments(where: String, sort: [String!], limit: Int, offset: Int): PaymentQueryResult! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + productSelection( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ProductSelection + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + productSelections(where: String, sort: [String!], limit: Int, offset: Int): ProductSelectionQueryResult! + productProjectionsSuggest(searchKeywords: [SearchKeywordArgument!]!, fuzzy: Boolean, limit: Int = 10, staged: Boolean = false): SuggestResult! + project: ProjectProjection! + store( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Store + stores(where: String, sort: [String!], limit: Int, offset: Int): StoreQueryResult! + review( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Review + reviews(where: String, sort: [String!], limit: Int, offset: Int): ReviewQueryResult! + subscription( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): CommercetoolsSubscription + subscriptions(where: String, sort: [String!], limit: Int, offset: Int): CommercetoolsSubscriptionQueryResult! + extension( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Extension + extensions(where: String, sort: [String!], limit: Int, offset: Int): ExtensionQueryResult! + apiClient(id: String!): APIClientWithoutSecret + apiClients(where: String, sort: [String!], limit: Int, offset: Int): APIClientWithoutSecretQueryResult! + limits: ProjectCustomLimitsProjection! + productProjectionSearch(locale: Locale, text: String, facets: [SearchFacetInput!] = [], filters: [SearchFilterInput!] = [], queryFilters: [SearchFilterInput!] = [], facetFilters: [SearchFilterInput!] = [], sorts: [String!] = [], limit: Int = 10, offset: Int = 0, fuzzy: Boolean = false, fuzzyLevel: Int, priceSelector: PriceSelectorInput, markMatchingVariants: Boolean = false, + + "Deprecated: please use 'markMatchingVariants'." + markMatchingVariant: Boolean = false, storeProjection: String, localeProjection: [Locale!], staged: Boolean = false): ProductProjectionSearchResult! + + """ + StandalonePrices are managed and queried through the StandalonePrices API + and associated to a ProductVariant through the sku field. + """ + standalonePrice( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): StandalonePrice + + """ + StandalonePrices are managed and queried through the StandalonePrices API + and associated to a ProductVariant through the sku field. + """ + standalonePrices(where: String, sort: [String!], limit: Int, offset: Int): StandalonePriceQueryResult! + quoteRequest( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): QuoteRequest + quoteRequests(where: String, sort: [String!], limit: Int, offset: Int): QuoteRequestQueryResult! + stagedQuote( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): StagedQuote + stagedQuotes(where: String, sort: [String!], limit: Int, offset: Int): StagedQuoteQueryResult! + quote( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): Quote + quotes(where: String, sort: [String!], limit: Int, offset: Int): QuoteQueryResult! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + businessUnit( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): BusinessUnit + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + businessUnits(where: String, sort: [String!], limit: Int, offset: Int): BusinessUnitQueryResult! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + productSelectionAssignments(where: String, sort: [String!], limit: Int, offset: Int): ProductAssignmentQueryResult! +} + +type QueryLimitsProjection { + offset: Limit! +} + +type Quote implements Versioned { + customerRef: Reference + customer: Customer + lineItems( + "Queries with specified ID" + id: String): [LineItem!]! + customLineItems: [CustomLineItem!]! + totalPrice: Money! + taxedPrice: TaxedPrice + shippingAddress: Address + billingAddress: Address + itemShippingAddresses: [Address!]! + inventoryMode: InventoryMode! + taxMode: TaxMode! + taxRoundingMode: RoundingMode! + taxCalculationMode: TaxCalculationMode! + country: Country + shippingInfo: ShippingInfo + paymentInfo: PaymentInfo + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + directDiscounts: [DirectDiscount!]! + shippingRateInput: ShippingRateInput + storeRef: KeyReference + store: Store + businessUnit: KeyReference + key: String + quoteState: QuoteState! + stagedQuoteRef: Reference! + stagedQuote: StagedQuote + quoteRequestRef: Reference! + quoteRequest: QuoteRequest + validTo: DateTime + sellerComment: String + buyerComment: String + custom: CustomFieldsType + stateRef: Reference + state: State + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +input QuoteDraft { + key: String + stagedQuote: ResourceIdentifierInput + stagedQuoteVersion: Long + custom: CustomFieldsDraft + state: ReferenceInput +} + +type QuoteQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [Quote!]! +} + +type QuoteRequest implements Versioned { + customerRef: Reference + customer: Customer + lineItems( + "Queries with specified ID" + id: String): [LineItem!]! + customLineItems: [CustomLineItem!]! + totalPrice: Money! + taxedPrice: TaxedPrice + shippingAddress: Address + billingAddress: Address + itemShippingAddresses: [Address!]! + inventoryMode: InventoryMode! + taxMode: TaxMode! + taxRoundingMode: RoundingMode! + taxCalculationMode: TaxCalculationMode! + country: Country + shippingInfo: ShippingInfo + paymentInfo: PaymentInfo + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + directDiscounts: [DirectDiscount!]! + shippingRateInput: ShippingRateInput + storeRef: KeyReference + store: Store + businessUnit: KeyReference + key: String + quoteRequestState: QuoteRequestState! + comment: String + custom: CustomFieldsType + stateRef: Reference + state: State + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +input QuoteRequestDraft { + key: String + cart: ResourceIdentifierInput + comment: String + cartVersion: Long + custom: CustomFieldsDraft + state: ReferenceInput +} + +type QuoteRequestQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [QuoteRequest!]! +} + +enum QuoteRequestState { + UnderReview + Submitted + Closed + Cancelled + Rejected + Accepted +} + +input QuoteRequestUpdateAction { + changeQuoteRequestState: ChangeQuoteRequestState + setCustomField: SetQuoteRequestCustomField + setCustomType: SetQuoteRequestCustomType + transitionState: TransitionQuoteRequestState +} + +enum QuoteState { + DeclinedForRenegotiation + Accepted + Declined + Failed + Pending + Withdrawn +} + +input QuoteUpdateAction { + changeQuoteState: ChangeQuoteState + requestQuoteRenegotiation: RequestQuoteRenegotiation + setCustomField: SetQuoteCustomField + setCustomType: SetQuoteCustomType + transitionState: TransitionQuoteState +} + +interface RangeCount { + type: String! +} + +type RangeCountDouble implements RangeCount { + from: Float! + fromStr: String! + to: Float! + toStr: String! + count: Int! + productCount: Int + totalCount: Int! + total: Float! + min: Float! + max: Float! + mean: Float! + type: String! +} + +type RangeCountLong implements RangeCount { + from: Long! + fromStr: String! + to: Long! + toStr: String! + count: Int! + productCount: Int + totalCount: Int! + total: Long! + min: Long! + max: Long! + mean: Float! + type: String! +} + +input RangeElementInput { + from: String! + to: String! +} + +input RangeFacetInput { + path: String! + ranges: [RangeElementInput!]! + alias: String + countProducts: Boolean! = false +} + +type RangeFacetResult implements FacetResult { + dataType: String! + ranges: [RangeCount!]! + type: String! +} + +input RangeFilterInput { + path: String! + ranges: [RangeElementInput!]! +} + +type RawCustomField { + name: String! + value: Json! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + referencedResource: ReferenceExpandable + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + referencedResourceSet: [ReferenceExpandable!]! +} + +type RawProductAttribute { + name: String! + value: Json! + attributeDefinition: AttributeDefinition + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + referencedResource: ReferenceExpandable + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + referencedResourceSet: [ReferenceExpandable!]! +} + +type RawProductSearchAttribute { + name: String! + value: Json! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + referencedResource: ReferenceExpandable + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + referencedResourceSet: [ReferenceExpandable!]! +} + +input RecalculateCart { + updateProductData: Boolean = false +} + +input RecalculateStagedOrder { + updateProductData: Boolean = false +} + +type RecalculateStagedOrderOutput implements StagedOrderUpdateActionOutput { + type: String! + updateProductData: Boolean! +} + +type Reference { + typeId: String! + id: String! +} + +type ReferenceAttribute implements Attribute { + typeId: String! + id: String! + name: String! +} + +type ReferenceAttributeDefinitionType implements AttributeDefinitionType { + referenceTypeId: String! + name: String! +} + +interface ReferenceExpandable { + id: String! +} + +type ReferenceField implements CustomField { + typeId: String! + id: String! + name: String! +} + +type ReferenceId { + typeId: String! + id: String! +} + +input ReferenceInput { + typeId: String! + id: String! +} + +type ReferenceType implements FieldType { + referenceTypeId: String! + name: String! +} + +input ReferenceTypeDefinitionDraft { + referenceTypeId: String! +} + +type RefreshTokenLimitWithCurrent implements LimitWithCurrent { + limit: Long + current: Long! +} + +type RefreshTokenLimitsProjection { + total: RefreshTokenLimitWithCurrent! +} + +type RelativeDiscountValue implements CartDiscountValue & ProductDiscountValue { + permyriad: Int! + type: String! +} + +input RelativeDiscountValueInput { + permyriad: Int! +} + +input RemoveBusinessUnitAddress { + addressId: String + addressKey: String +} + +input RemoveBusinessUnitAssociate { + customer: ResourceIdentifierInput! +} + +input RemoveBusinessUnitBillingAddressId { + addressId: String + addressKey: String +} + +input RemoveBusinessUnitShippingAddressId { + addressId: String + addressKey: String +} + +input RemoveBusinessUnitStore { + store: ResourceIdentifierInput! +} + +input RemoveCartCustomLineItem { + customLineItemId: String! +} + +input RemoveCartDiscountCode { + discountCode: ReferenceInput! +} + +input RemoveCartItemShippingAddress { + addressKey: String! +} + +input RemoveCartLineItem { + lineItemId: String! + quantity: Long + externalPrice: BaseMoneyInput + externalTotalPrice: ExternalLineItemTotalPriceDraft + shippingDetailsToRemove: ItemShippingDetailsDraft +} + +input RemoveCartPayment { + payment: ResourceIdentifierInput! +} + +input RemoveCategoryAsset { + assetKey: String + assetId: String +} + +input RemoveChannelRoles { + roles: [ChannelRole!]! +} + +input RemoveCustomerAddress { + addressId: String + addressKey: String +} + +input RemoveCustomerBillingAddressId { + addressId: String + addressKey: String +} + +input RemoveCustomerShippingAddressId { + addressId: String + addressKey: String +} + +input RemoveCustomerStore { + store: ResourceIdentifierInput! +} + +input RemoveInventoryEntryQuantity { + quantity: Long! +} + +input RemoveMyBusinessUnitAddress { + addressId: String + addressKey: String +} + +input RemoveMyBusinessUnitAssociate { + customer: ResourceIdentifierInput! +} + +input RemoveMyBusinessUnitBillingAddressId { + addressId: String + addressKey: String +} + +input RemoveMyBusinessUnitShippingAddressId { + addressId: String + addressKey: String +} + +input RemoveOrderDelivery { + deliveryId: String! +} + +input RemoveOrderItemShippingAddress { + addressKey: String! +} + +input RemoveOrderParcelFromDelivery { + parcelId: String! +} + +input RemoveOrderPayment { + payment: ResourceIdentifierInput! +} + +input RemoveProductAsset { + variantId: Int + sku: String + staged: Boolean = true + assetKey: String + assetId: String +} + +input RemoveProductFromCategory { + category: ResourceIdentifierInput! + staged: Boolean = true +} + +input RemoveProductImage { + variantId: Int + sku: String + imageUrl: String! + staged: Boolean = true +} + +input RemoveProductPrice { + priceId: String + variantId: Int + sku: String + price: ProductPriceDataInput + staged: Boolean = true +} + +input RemoveProductSelectionProduct { + product: ResourceIdentifierInput! +} + +input RemoveProductVariant { + id: Int + sku: String + staged: Boolean = true +} + +input RemoveShippingMethodShippingRate { + zone: ResourceIdentifierInput! + shippingRate: ShippingRateDraft! +} + +input RemoveShippingMethodZone { + zone: ResourceIdentifierInput! +} + +input RemoveShoppingListLineItem { + lineItemId: String! + quantity: Int +} + +input RemoveShoppingListTextLineItem { + textLineItemId: String! + quantity: Int +} + +input RemoveStagedOrderCustomLineItem { + customLineItemId: String! +} + +type RemoveStagedOrderCustomLineItemOutput implements StagedOrderUpdateActionOutput { + type: String! + customLineItemId: String! +} + +input RemoveStagedOrderDelivery { + deliveryId: String! +} + +type RemoveStagedOrderDeliveryOutput implements StagedOrderUpdateActionOutput { + type: String! + deliveryId: String! +} + +input RemoveStagedOrderDiscountCode { + discountCode: ReferenceInput! +} + +type RemoveStagedOrderDiscountCodeOutput implements StagedOrderUpdateActionOutput { + discountCode: DiscountCode + discountCodeRef: Reference! + type: String! +} + +input RemoveStagedOrderItemShippingAddress { + addressKey: String! +} + +type RemoveStagedOrderItemShippingAddressOutput implements StagedOrderUpdateActionOutput { + type: String! + addressKey: String! +} + +input RemoveStagedOrderLineItem { + lineItemId: String! + quantity: Long + externalPrice: BaseMoneyInput + externalTotalPrice: ExternalLineItemTotalPriceDraft + shippingDetailsToRemove: ItemShippingDetailsDraftType +} + +type RemoveStagedOrderLineItemOutput implements StagedOrderUpdateActionOutput { + type: String! + lineItemId: String! + quantity: Long + externalPrice: BaseMoney + externalTotalPrice: ExternalLineItemTotalPrice + shippingDetailsToRemove: ItemShippingDetailsDraftOutput +} + +input RemoveStagedOrderParcelFromDelivery { + parcelId: String! +} + +type RemoveStagedOrderParcelFromDeliveryOutput implements StagedOrderUpdateActionOutput { + type: String! + parcelId: String! +} + +input RemoveStagedOrderPayment { + payment: ResourceIdentifierInput! +} + +type RemoveStagedOrderPaymentOutput implements StagedOrderUpdateActionOutput { + type: String! + paymentResId: ResourceIdentifier! +} + +input RemoveStateRoles { + roles: [StateRole!]! +} + +input RemoveStoreDistributionChannel { + distributionChannel: ResourceIdentifierInput! +} + +input RemoveStoreProductSelection { + productSelection: ResourceIdentifierInput! +} + +input RemoveStoreSupplyChannel { + supplyChannel: ResourceIdentifierInput! +} + +input RemoveTypeFieldDefinition { + fieldName: String! +} + +input RemoveZoneLocation { + location: ZoneLocation! +} + +input RequestQuoteRenegotiation { + buyerComment: String +} + +type ResourceIdentifier { + typeId: String! + key: String + id: String +} + +input ResourceIdentifierInput { + typeId: String + id: String + key: String +} + +"Stores information about returns connected to this order." +type ReturnInfo { + items: [ReturnItem!]! + returnTrackingId: String + returnDate: DateTime +} + +type ReturnInfoAdded implements MessagePayload & OrderMessagePayload { + returnInfo: ReturnInfo! + type: String! +} + +input ReturnInfoDraftType { + items: [ReturnItemDraftType!]! + returnDate: DateTime + returnTrackingId: String +} + +type ReturnInfoDraftTypeOutput { + items: [ReturnItemDraftTypeOutput!]! + returnDate: DateTime + returnTrackingId: String +} + +type ReturnInfoSet implements MessagePayload & OrderMessagePayload { + returnInfo: [ReturnInfo!] + type: String! +} + +interface ReturnItem { + type: String! + id: String! + quantity: Long! + comment: String + shipmentState: ReturnShipmentState! + paymentState: ReturnPaymentState! + custom: CustomFieldsType + lastModifiedAt: DateTime! + createdAt: DateTime! +} + +input ReturnItemDraftType { + quantity: Long! + lineItemId: String + customLineItemId: String + comment: String + shipmentState: ReturnShipmentState! + custom: CustomFieldsDraft +} + +type ReturnItemDraftTypeOutput { + quantity: Long! + lineItemId: String + customLineItemId: String + comment: String + shipmentState: ReturnShipmentState! + custom: CustomFieldsCommand +} + +enum ReturnPaymentState { + NotRefunded + Refunded + Initial + NonRefundable +} + +enum ReturnShipmentState { + Unusable + BackInStock + Returned + Advised +} + +input RevertStagedChanges { + dummy: String +} + +input RevertStagedVariantChanges { + variantId: Int! +} + +type Review implements Versioned & ReferenceExpandable { + key: String + uniquenessValue: String + locale: Locale + authorName: String + title: String + text: String + targetRef: Reference + target: ReviewTarget + rating: Int + stateRef: Reference + state: State + includedInStatistics: Boolean! + customerRef: Reference + customer: Customer + custom: CustomFieldsType + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +type ReviewCreated implements MessagePayload { + review: Review! + type: String! +} + +input ReviewDraft { + key: String + uniquenessValue: String + locale: Locale + authorName: String + title: String + text: String + target: TargetReferenceInput + state: ResourceIdentifierInput + rating: Int + customer: ResourceIdentifierInput + custom: CustomFieldsDraft +} + +type ReviewQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [Review!]! +} + +type ReviewRatingSet implements MessagePayload { + oldRating: Int + newRating: Int + includedInStatistics: Boolean! + target: ReviewTarget + targetRef: Reference + type: String! +} + +type ReviewRatingStatistics { + averageRating: Float! + highestRating: Int! + lowestRating: Int! + count: Long! + ratingsDistribution: Json! +} + +type ReviewStateTransition implements MessagePayload { + oldIncludedInStatistics: Boolean! + newIncludedInStatistics: Boolean! + force: Boolean! + target: ReviewTarget + oldState: State + newState: State + targetRef: Reference + oldStateRef: Reference + newStateRef: Reference! + type: String! +} + +interface ReviewTarget { + id: String! +} + +input ReviewUpdateAction { + setAuthorName: SetReviewAuthorName + setCustomField: SetReviewCustomField + setCustomType: SetReviewCustomType + setCustomer: SetReviewCustomer + setKey: SetReviewKey + setLocale: SetReviewLocale + setRating: SetReviewRating + setTarget: SetReviewTarget + setText: SetReviewText + setTitle: SetReviewTitle + transitionState: TransitionReviewState +} + +enum RoundingMode { + "[Round half down](https://en.wikipedia.org/wiki/Rounding#Round_half_down)" + HalfDown + + "[Round half up](https://en.wikipedia.org/wiki/Rounding#Round_half_up)" + HalfUp + + "[Round half to even](https://en.wikipedia.org/wiki/Rounding#Round_half_to_even). Default rounding mode as used in IEEE 754 computing functions and operators." + HalfEven +} + +type SNSDestination implements Destination { + topicArn: String! + accessKey: String! + accessSecret: String! + type: String! +} + +input SNSDestinationInput { + topicArn: String! + accessKey: String! + accessSecret: String! +} + +type SQSDestination implements Destination { + queueUrl: String! + accessKey: String! + accessSecret: String! + region: String! + type: String! +} + +input SQSDestinationInput { + queueUrl: String! + accessKey: String! + accessSecret: String! + region: String! +} + +type ScopedPrice { + id: String! + value: BaseMoney! + currentValue: BaseMoney! + country: String + customerGroupRef: Reference + customerGroup: CustomerGroup + channelRef: Reference + channel: Channel + validFrom: DateTime + validUntil: DateTime + discounted: DiscountedProductSearchPriceValue + custom: CustomFieldsType +} + +type ScoreShippingRateInput implements ShippingRateInput { + score: Int! + type: String! +} + +input ScoreShippingRateInputDraft { + score: Int! +} + +type ScoreShippingRateInputDraftOutput implements ShippingRateInputDraftOutput { + score: Int! + type: String! +} + +input SearchFacetInput { + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + model: SearchFacetModelInput + string: String +} + +input SearchFacetModelInput { + terms: TermsFacetInput + range: RangeFacetInput +} + +input SearchFilterInput { + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + model: SearchFilterModelInput + string: String +} + +input SearchFilterModelInput { + value: ValueFilterInput + range: RangeFilterInput + missing: MissingFilterInput + exists: ExistsFilterInput + tree: TreeFilterInput +} + +type SearchIndexingConfiguration { + products: SearchIndexingConfigurationValues + orders: OrderSearchConfiguration +} + +type SearchIndexingConfigurationValues { + status: SearchIndexingStatus + lastModifiedAt: DateTime + lastModifiedBy: Initiator +} + +enum SearchIndexingStatus { + Activated + Indexing + Deactivated +} + +type SearchKeyword { + text: String! + suggestTokenizer: SuggestTokenizer +} + +input SearchKeywordArgument { + searchKeyword: String! + locale: Locale! +} + +input SearchKeywordInput { + locale: Locale! + keywords: [SearchKeywordItemInput!]! +} + +input SearchKeywordItemInput { + text: String! + suggestTokenizer: BaseSearchKeywordInput +} + +type SearchKeywordProductSearch { + text: String! + suggestTokenizer: SuggestTokenizerProductSearch +} + +type SearchKeywords { + locale: Locale! + searchKeywords: [SearchKeyword!]! +} + +type SearchKeywordsProductSearch { + locale: Locale! + searchKeywords: [SearchKeywordProductSearch!]! +} + +type SearchLimitsProjection { + maxTextSize: Limit! +} + +"In order to decide which of the matching items will actually be discounted" +enum SelectionMode { + MostExpensive + Cheapest +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type SelectionOfProduct { + productSelectionRef: Reference! + productSelection: ProductSelection + variantSelection: ProductVariantSelection + createdAt: DateTime! +} + +type SelectionOfProductQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [SelectionOfProduct!]! +} + +"A set." +scalar Set + +type SetAttributeDefinitionType implements AttributeDefinitionType { + elementType: AttributeDefinitionType! + name: String! +} + +input SetBusinessUnitAddressCustomField { + addressId: String + addressKey: String + name: String! + value: String +} + +input SetBusinessUnitAddressCustomType { + addressId: String + addressKey: String + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetBusinessUnitAssociates { + associates: [AssociateDraft!] = [] +} + +input SetBusinessUnitContactEmail { + contactEmail: String +} + +input SetBusinessUnitCustomField { + name: String! + value: String +} + +input SetBusinessUnitCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetBusinessUnitDefaultBillingAddress { + addressId: String + addressKey: String +} + +input SetBusinessUnitDefaultShippingAddress { + addressId: String + addressKey: String +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input SetBusinessUnitStoreMode { + stores: [ResourceIdentifierInput!] + storeMode: String +} + +input SetBusinessUnitStores { + stores: [ResourceIdentifierInput!]! +} + +input SetCartAnonymousId { + anonymousId: String +} + +input SetCartBillingAddress { + address: AddressInput +} + +input SetCartBillingAddressCustomField { + name: String! + value: String +} + +input SetCartBillingAddressCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetCartBusinessUnit { + businessUnit: ResourceIdentifierInput! +} + +input SetCartCountry { + country: Country +} + +input SetCartCustomField { + name: String! + value: String +} + +input SetCartCustomLineItemCustomField { + customLineItemId: String! + name: String! + value: String +} + +input SetCartCustomLineItemCustomType { + customLineItemId: String! + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetCartCustomLineItemShippingDetails { + customLineItemId: String! + shippingDetails: ItemShippingDetailsDraft +} + +input SetCartCustomLineItemTaxAmount { + customLineItemId: String! + externalTaxAmount: ExternalTaxAmountDraft +} + +input SetCartCustomLineItemTaxRate { + customLineItemId: String! + externalTaxRate: ExternalTaxRateDraft +} + +input SetCartCustomShippingMethod { + shippingMethodName: String! + shippingRate: ShippingRateDraft! + taxCategory: ResourceIdentifierInput + externalTaxRate: ExternalTaxRateDraft +} + +input SetCartCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetCartCustomerEmail { + email: String +} + +input SetCartCustomerGroup { + customerGroup: ResourceIdentifierInput +} + +input SetCartCustomerId { + customerId: String +} + +input SetCartDeleteDaysAfterLastModification { + deleteDaysAfterLastModification: Int +} + +input SetCartDirectDiscounts { + discounts: [DirectDiscountDraft!]! +} + +input SetCartDiscountCustomField { + name: String! + value: String +} + +input SetCartDiscountCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetCartDiscountDescription { + description: [LocalizedStringItemInputType!] +} + +input SetCartDiscountKey { + key: String +} + +input SetCartDiscountValidFrom { + validFrom: DateTime +} + +input SetCartDiscountValidFromAndUntil { + validFrom: DateTime + validUntil: DateTime +} + +input SetCartDiscountValidUntil { + validUntil: DateTime +} + +input SetCartItemShippingAddressCustomField { + addressKey: String! + name: String! + value: String +} + +input SetCartItemShippingAddressCustomType { + addressKey: String! + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetCartKey { + key: String +} + +input SetCartLineItemCustomField { + lineItemId: String! + name: String! + value: String +} + +input SetCartLineItemCustomType { + lineItemId: String! + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetCartLineItemDistributionChannel { + lineItemId: String! + distributionChannel: ResourceIdentifierInput +} + +input SetCartLineItemPrice { + lineItemId: String! + externalPrice: BaseMoneyInput +} + +input SetCartLineItemShippingDetails { + lineItemId: String! + shippingDetails: ItemShippingDetailsDraft +} + +input SetCartLineItemSupplyChannel { + lineItemId: String! + supplyChannel: ResourceIdentifierInput +} + +input SetCartLineItemTaxAmount { + lineItemId: String! + externalTaxAmount: ExternalTaxAmountDraft + shippingKey: String +} + +input SetCartLineItemTaxRate { + lineItemId: String! + externalTaxRate: ExternalTaxRateDraft + shippingKey: String +} + +input SetCartLineItemTotalPrice { + lineItemId: String! + externalTotalPrice: ExternalLineItemTotalPriceDraft +} + +input SetCartLocale { + locale: Locale +} + +input SetCartShippingAddress { + address: AddressInput +} + +input SetCartShippingAddressCustomField { + name: String! + value: String +} + +input SetCartShippingAddressCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetCartShippingCustomField { + shippingKey: String + name: String! + value: String +} + +input SetCartShippingCustomType { + shippingKey: String + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetCartShippingMethod { + shippingMethod: ResourceIdentifierInput + externalTaxRate: ExternalTaxRateDraft +} + +input SetCartShippingMethodTaxAmount { + externalTaxAmount: ExternalTaxAmountDraft +} + +input SetCartShippingMethodTaxRate { + externalTaxRate: ExternalTaxRateDraft +} + +input SetCartShippingRateInput { + shippingRateInput: ShippingRateInputDraft +} + +input SetCartTotalTax { + externalTotalGross: MoneyInput + externalTaxPortions: [TaxPortionDraft!] = [] +} + +input SetCategoryAssetCustomField { + value: String + name: String! + assetKey: String + assetId: String +} + +input SetCategoryAssetCustomType { + typeId: String + typeKey: String + type: ResourceIdentifierInput + fields: [CustomFieldInput!] + assetKey: String + assetId: String +} + +input SetCategoryAssetDescription { + description: [LocalizedStringItemInputType!] + assetKey: String + assetId: String +} + +input SetCategoryAssetKey { + assetKey: String + assetId: String! +} + +input SetCategoryAssetSources { + sources: [AssetSourceInput!] = [] + assetKey: String + assetId: String +} + +input SetCategoryAssetTags { + tags: [String!] = [] + assetKey: String + assetId: String +} + +input SetCategoryCustomField { + name: String! + value: String +} + +input SetCategoryCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetCategoryDescription { + description: [LocalizedStringItemInputType!] +} + +input SetCategoryExternalId { + externalId: String +} + +input SetCategoryKey { + key: String +} + +input SetCategoryMetaDescription { + metaDescription: [LocalizedStringItemInputType!] +} + +input SetCategoryMetaKeywords { + metaKeywords: [LocalizedStringItemInputType!] +} + +input SetCategoryMetaTitle { + metaTitle: [LocalizedStringItemInputType!] +} + +input SetChannelAddress { + address: AddressInput +} + +input SetChannelAddressCustomField { + name: String! + value: String +} + +input SetChannelAddressCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetChannelCustomField { + name: String! + value: String +} + +input SetChannelCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetChannelGeoLocation { + geoLocation: GeometryInput +} + +input SetChannelRoles { + roles: [ChannelRole!]! +} + +input SetCustomerAddressCustomField { + name: String! + value: String + addressId: String! +} + +input SetCustomerAddressCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String + addressId: String! +} + +input SetCustomerAuthenticationMode { + authMode: AuthenticationMode! + password: String +} + +input SetCustomerCompanyName { + companyName: String +} + +input SetCustomerCustomField { + name: String! + value: String +} + +input SetCustomerCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetCustomerDateOfBirth { + dateOfBirth: Date +} + +input SetCustomerDefaultBillingAddress { + addressId: String + addressKey: String +} + +input SetCustomerDefaultShippingAddress { + addressId: String + addressKey: String +} + +input SetCustomerExternalId { + externalId: String +} + +input SetCustomerFirstName { + firstName: String +} + +input SetCustomerGroup { + customerGroup: ResourceIdentifierInput +} + +input SetCustomerGroupCustomField { + name: String! + value: String +} + +input SetCustomerGroupCustomType { + typeId: String + typeKey: String + type: ResourceIdentifierInput + fields: [CustomFieldInput!] +} + +input SetCustomerGroupKey { + key: String +} + +input SetCustomerKey { + key: String +} + +input SetCustomerLastName { + lastName: String +} + +input SetCustomerLocale { + locale: Locale +} + +input SetCustomerMiddleName { + middleName: String +} + +input SetCustomerNumber { + customerNumber: String +} + +input SetCustomerSalutation { + salutation: String +} + +input SetCustomerStores { + stores: [ResourceIdentifierInput!]! +} + +input SetCustomerTitle { + title: String +} + +input SetCustomerVatId { + vatId: String +} + +input SetDiscountCodeCartPredicate { + cartPredicate: String +} + +input SetDiscountCodeCustomField { + name: String! + value: String +} + +input SetDiscountCodeCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetDiscountCodeDescription { + description: [LocalizedStringItemInputType!] +} + +input SetDiscountCodeMaxApplications { + maxApplications: Long +} + +input SetDiscountCodeMaxApplicationsPerCustomer { + maxApplicationsPerCustomer: Long +} + +input SetDiscountCodeName { + name: [LocalizedStringItemInputType!] +} + +input SetDiscountCodeValidFrom { + validFrom: DateTime +} + +input SetDiscountCodeValidFromAndUntil { + validFrom: DateTime + validUntil: DateTime +} + +input SetDiscountCodeValidUntil { + validUntil: DateTime +} + +input SetExtensionKey { + key: String +} + +input SetExtensionTimeoutInMs { + timeoutInMs: Int +} + +input SetInventoryEntryCustomField { + name: String! + value: String +} + +input SetInventoryEntryCustomType { + typeId: String + typeKey: String + type: ResourceIdentifierInput + fields: [CustomFieldInput!] +} + +input SetInventoryEntryExpectedDelivery { + expectedDelivery: DateTime +} + +input SetInventoryEntryRestockableInDays { + restockableInDays: Int +} + +input SetInventoryEntrySupplyChannel { + supplyChannel: ResourceIdentifierInput +} + +input SetMyBusinessUnitAddressCustomField { + addressId: String + addressKey: String + name: String! + value: String +} + +input SetMyBusinessUnitAddressCustomType { + addressId: String + addressKey: String + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetMyBusinessUnitContactEmail { + contactEmail: String +} + +input SetMyBusinessUnitCustomField { + name: String! + value: String +} + +input SetMyBusinessUnitCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetMyBusinessUnitDefaultBillingAddress { + addressId: String + addressKey: String +} + +input SetMyBusinessUnitDefaultShippingAddress { + addressId: String + addressKey: String +} + +input SetMyCartShippingMethod { + shippingMethod: ResourceIdentifierInput +} + +input SetMyQuoteRequestCustomField { + name: String! + value: String +} + +input SetMyQuoteRequestCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetOrderBillingAddress { + address: AddressInput +} + +input SetOrderBillingAddressCustomField { + name: String! + value: String +} + +input SetOrderBillingAddressCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetOrderCustomField { + name: String! + value: String +} + +input SetOrderCustomLineItemCustomField { + customLineItemId: String! + name: String! + value: String +} + +input SetOrderCustomLineItemCustomType { + customLineItemId: String! + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetOrderCustomLineItemShippingDetails { + customLineItemId: String! + shippingDetails: ItemShippingDetailsDraftType +} + +input SetOrderCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetOrderCustomerEmail { + email: String +} + +input SetOrderCustomerId { + customerId: String +} + +input SetOrderDeliveryAddress { + deliveryId: String! + address: AddressInput +} + +input SetOrderDeliveryAddressCustomField { + deliveryId: String! + name: String! + value: String +} + +input SetOrderDeliveryAddressCustomType { + deliveryId: String! + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetOrderDeliveryCustomField { + name: String! + value: String + deliveryId: String! +} + +input SetOrderDeliveryCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String + deliveryId: String! +} + +input SetOrderDeliveryItems { + deliveryId: String! + items: [DeliveryItemDraftType!]! +} + +input SetOrderEditComment { + comment: String +} + +input SetOrderEditCustomField { + name: String! + value: String +} + +input SetOrderEditCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetOrderEditKey { + key: String +} + +input SetOrderEditStagedActions { + stagedActions: [StagedOrderUpdateAction!]! +} + +input SetOrderItemShippingAddressCustomField { + addressKey: String! + name: String! + value: String +} + +input SetOrderItemShippingAddressCustomType { + addressKey: String! + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetOrderLineItemCustomField { + lineItemId: String! + name: String! + value: String +} + +input SetOrderLineItemCustomType { + lineItemId: String! + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetOrderLineItemShippingDetails { + lineItemId: String! + shippingDetails: ItemShippingDetailsDraftType +} + +input SetOrderLocale { + locale: Locale +} + +input SetOrderNumber { + orderNumber: String +} + +input SetOrderParcelCustomField { + name: String! + value: String + parcelId: String! +} + +input SetOrderParcelCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String + parcelId: String! +} + +input SetOrderParcelItems { + parcelId: String! + items: [DeliveryItemDraftType!]! +} + +input SetOrderParcelMeasurements { + parcelId: String! + measurements: ParcelMeasurementsDraftType +} + +input SetOrderParcelTrackingData { + parcelId: String! + trackingData: TrackingDataDraftType +} + +input SetOrderReturnInfo { + items: [ReturnInfoDraftType!] = [] +} + +input SetOrderReturnItemCustomField { + name: String! + value: String + returnItemId: String! +} + +input SetOrderReturnItemCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String + returnItemId: String! +} + +input SetOrderReturnPaymentState { + returnItemId: String! + paymentState: ReturnPaymentState! +} + +input SetOrderReturnShipmentState { + returnItemId: String! + shipmentState: ReturnShipmentState! +} + +input SetOrderShippingAddress { + address: AddressInput +} + +input SetOrderShippingAddressCustomField { + name: String! + value: String +} + +input SetOrderShippingAddressCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetOrderShippingCustomField { + shippingKey: String + name: String! + value: String +} + +input SetOrderShippingCustomType { + shippingKey: String + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetOrderStore { + store: ResourceIdentifierInput +} + +input SetPaymentAmountPaid { + amount: MoneyInput +} + +input SetPaymentAmountRefunded { + amount: MoneyInput +} + +input SetPaymentAnonymousId { + anonymousId: String +} + +input SetPaymentAuthorization { + amount: MoneyInput + until: DateTime +} + +input SetPaymentCustomField { + name: String! + value: String +} + +input SetPaymentCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetPaymentCustomer { + customer: ReferenceInput +} + +input SetPaymentExternalId { + externalId: String +} + +input SetPaymentInterfaceId { + interfaceId: String +} + +input SetPaymentKey { + key: String +} + +input SetPaymentMethodInfoInterface { + interface: String! +} + +input SetPaymentMethodInfoMethod { + method: String +} + +input SetPaymentMethodInfoName { + name: [LocalizedStringItemInputType!] +} + +input SetPaymentStatusInterfaceCode { + interfaceCode: String +} + +input SetPaymentStatusInterfaceText { + interfaceText: String +} + +input SetPaymentTransactionCustomField { + name: String! + value: String + transactionId: String! +} + +input SetPaymentTransactionCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String + transactionId: String! +} + +input SetProductAssetCustomField { + variantId: Int + sku: String + staged: Boolean = true + value: String + name: String! + assetKey: String + assetId: String +} + +input SetProductAssetCustomType { + variantId: Int + sku: String + staged: Boolean = true + typeId: String + typeKey: String + type: ResourceIdentifierInput + fields: [CustomFieldInput!] + assetKey: String + assetId: String +} + +input SetProductAssetDescription { + variantId: Int + sku: String + staged: Boolean = true + description: [LocalizedStringItemInputType!] + assetKey: String + assetId: String +} + +input SetProductAssetKey { + variantId: Int + sku: String + staged: Boolean = true + assetKey: String + assetId: String! +} + +input SetProductAssetSources { + variantId: Int + sku: String + staged: Boolean = true + sources: [AssetSourceInput!] = [] + assetKey: String + assetId: String +} + +input SetProductAssetTags { + variantId: Int + sku: String + staged: Boolean = true + tags: [String!] = [] + assetKey: String + assetId: String +} + +input SetProductAttribute { + variantId: Int + sku: String + name: String! + value: String + staged: Boolean = true +} + +input SetProductAttributeInAllVariants { + name: String! + value: String + staged: Boolean = true +} + +input SetProductCategoryOrderHint { + categoryId: String! + orderHint: String + staged: Boolean = true +} + +input SetProductDescription { + description: [LocalizedStringItemInputType!] + staged: Boolean = true +} + +input SetProductDiscountDescription { + description: [LocalizedStringItemInputType!] +} + +input SetProductDiscountKey { + key: String +} + +input SetProductDiscountValidFrom { + validFrom: DateTime +} + +input SetProductDiscountValidFromAndUntil { + validFrom: DateTime + validUntil: DateTime +} + +input SetProductDiscountValidUntil { + validUntil: DateTime +} + +input SetProductDiscountedPrice { + priceId: String! + discounted: DiscountedProductPriceValueInput + staged: Boolean = true +} + +input SetProductImageLabel { + variantId: Int + sku: String + imageUrl: String! + label: String + staged: Boolean = true +} + +input SetProductKey { + key: String +} + +input SetProductMetaAttributes { + metaDescription: [LocalizedStringItemInputType!] + metaKeywords: [LocalizedStringItemInputType!] + metaTitle: [LocalizedStringItemInputType!] + staged: Boolean = true +} + +input SetProductMetaDescription { + metaDescription: [LocalizedStringItemInputType!] + staged: Boolean = true +} + +input SetProductMetaKeywords { + metaKeywords: [LocalizedStringItemInputType!] + staged: Boolean = true +} + +input SetProductMetaTitle { + metaTitle: [LocalizedStringItemInputType!] + staged: Boolean = true +} + +input SetProductPriceCustomField { + priceId: String! + staged: Boolean = true + name: String! + value: String +} + +input SetProductPriceCustomType { + priceId: String! + staged: Boolean = true + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetProductPriceMode { + priceMode: PriceMode +} + +input SetProductPrices { + variantId: Int + sku: String + prices: [ProductPriceDataInput!]! + staged: Boolean = true +} + +input SetProductSelectionCustomField { + name: String! + value: String +} + +input SetProductSelectionCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetProductSelectionKey { + key: String +} + +input SetProductSelectionVariantSelection { + product: ResourceIdentifierInput! + variantSelection: ProductVariantSelectionDraft +} + +input SetProductSku { + variantId: Int! + sku: String + staged: Boolean = true +} + +input SetProductTaxCategory { + taxCategory: ResourceIdentifierInput +} + +input SetProductVariantKey { + variantId: Int + sku: String + key: String + staged: Boolean = true +} + +input SetProjectSettingsExternalOAuth { + externalOAuth: ExternalOAuthDraft +} + +input SetProjectSettingsShippingRateInputType { + shippingRateInputType: ShippingRateInputTypeInput +} + +input SetQuoteCustomField { + name: String! + value: String +} + +input SetQuoteCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetQuoteRequestCustomField { + name: String! + value: String +} + +input SetQuoteRequestCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetReviewAuthorName { + authorName: String +} + +input SetReviewCustomField { + name: String! + value: String +} + +input SetReviewCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetReviewCustomer { + customer: ResourceIdentifierInput +} + +input SetReviewKey { + key: String +} + +input SetReviewLocale { + locale: Locale +} + +input SetReviewRating { + rating: Int +} + +input SetReviewTarget { + target: TargetReferenceInput +} + +input SetReviewText { + text: String +} + +input SetReviewTitle { + title: String +} + +input SetSearchKeywords { + searchKeywords: [SearchKeywordInput!]! + staged: Boolean +} + +input SetShippingMethodCustomField { + name: String! + value: String +} + +input SetShippingMethodCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetShippingMethodDescription { + description: String +} + +input SetShippingMethodKey { + key: String +} + +input SetShippingMethodLocalizedDescription { + localizedDescription: [LocalizedStringItemInputType!] +} + +input SetShippingMethodLocalizedName { + localizedName: [LocalizedStringItemInputType!] +} + +input SetShippingMethodPredicate { + predicate: String +} + +input SetShoppingListAnonymousId { + anonymousId: String +} + +input SetShoppingListCustomField { + name: String! + value: String +} + +input SetShoppingListCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetShoppingListCustomer { + customer: ResourceIdentifierInput +} + +input SetShoppingListDeleteDaysAfterLastModification { + deleteDaysAfterLastModification: Int +} + +input SetShoppingListDescription { + description: [LocalizedStringItemInputType!] +} + +input SetShoppingListKey { + key: String +} + +input SetShoppingListLineItemCustomField { + lineItemId: String! + name: String! + value: String +} + +input SetShoppingListLineItemCustomType { + lineItemId: String! + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetShoppingListSlug { + slug: [LocalizedStringItemInputType!] +} + +input SetShoppingListStore { + store: ResourceIdentifierInput +} + +input SetShoppingListTextLineItemCustomField { + textLineItemId: String! + name: String! + value: String +} + +input SetShoppingListTextLineItemCustomType { + textLineItemId: String! + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetShoppingListTextLineItemDescription { + textLineItemId: String! + description: [LocalizedStringItemInputType!] +} + +input SetStagedOrderBillingAddress { + address: AddressInput +} + +input SetStagedOrderBillingAddressCustomField { + name: String! + value: String +} + +type SetStagedOrderBillingAddressCustomFieldOutput implements StagedOrderUpdateActionOutput { + type: String! + name: String! + value: Json +} + +input SetStagedOrderBillingAddressCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +type SetStagedOrderBillingAddressCustomTypeOutput implements StagedOrderUpdateActionOutput { + type: String! + custom: CustomFieldsCommand! +} + +type SetStagedOrderBillingAddressOutput implements StagedOrderUpdateActionOutput { + type: String! + address: AddressDraft +} + +input SetStagedOrderCountry { + country: Country +} + +type SetStagedOrderCountryOutput implements StagedOrderUpdateActionOutput { + type: String! + country: Country +} + +input SetStagedOrderCustomField { + name: String! + value: String +} + +type SetStagedOrderCustomFieldOutput implements StagedOrderUpdateActionOutput { + type: String! + name: String! + value: Json +} + +input SetStagedOrderCustomLineItemCustomField { + customLineItemId: String! + name: String! + value: String +} + +type SetStagedOrderCustomLineItemCustomFieldOutput implements StagedOrderUpdateActionOutput { + type: String! + customLineItemId: String! + name: String! + value: Json +} + +input SetStagedOrderCustomLineItemCustomType { + customLineItemId: String! + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +type SetStagedOrderCustomLineItemCustomTypeOutput implements StagedOrderUpdateActionOutput { + type: String! + customLineItemId: String! + custom: CustomFieldsCommand! +} + +input SetStagedOrderCustomLineItemShippingDetails { + customLineItemId: String! + shippingDetails: ItemShippingDetailsDraftType +} + +type SetStagedOrderCustomLineItemShippingDetailsOutput implements StagedOrderUpdateActionOutput { + type: String! + customLineItemId: String! + shippingDetails: ItemShippingDetailsDraftOutput +} + +input SetStagedOrderCustomLineItemTaxAmount { + customLineItemId: String! + externalTaxAmount: ExternalTaxAmountDraft +} + +type SetStagedOrderCustomLineItemTaxAmountOutput implements StagedOrderUpdateActionOutput { + type: String! + customLineItemId: String! + externalTaxAmount: ExternalTaxAmountDraftOutput +} + +input SetStagedOrderCustomLineItemTaxRate { + customLineItemId: String! + externalTaxRate: ExternalTaxRateDraft +} + +type SetStagedOrderCustomLineItemTaxRateOutput implements StagedOrderUpdateActionOutput { + type: String! + customLineItemId: String! + externalTaxRate: ExternalTaxRateDraftOutput +} + +input SetStagedOrderCustomShippingMethod { + shippingMethodName: String! + shippingRate: ShippingRateDraft! + taxCategory: ResourceIdentifierInput + externalTaxRate: ExternalTaxRateDraft +} + +type SetStagedOrderCustomShippingMethodOutput implements StagedOrderUpdateActionOutput { + type: String! + shippingMethodName: String! + shippingRate: ShippingRate! + taxCategoryResId: ResourceIdentifier + externalTaxRate: ExternalTaxRateDraftOutput +} + +input SetStagedOrderCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +type SetStagedOrderCustomTypeOutput implements StagedOrderUpdateActionOutput { + type: String! + custom: CustomFieldsCommand! +} + +input SetStagedOrderCustomerEmail { + email: String +} + +type SetStagedOrderCustomerEmailOutput implements StagedOrderUpdateActionOutput { + type: String! + email: String +} + +input SetStagedOrderCustomerGroup { + customerGroup: ResourceIdentifierInput +} + +type SetStagedOrderCustomerGroupOutput implements StagedOrderUpdateActionOutput { + type: String! + customerGroupResId: CustomerGroupReferenceIdentifier +} + +input SetStagedOrderCustomerId { + customerId: String +} + +type SetStagedOrderCustomerIdOutput implements StagedOrderUpdateActionOutput { + type: String! + customerId: String +} + +input SetStagedOrderDeliveryAddress { + deliveryId: String! + address: AddressInput +} + +input SetStagedOrderDeliveryAddressCustomField { + deliveryId: String! + name: String! + value: String +} + +type SetStagedOrderDeliveryAddressCustomFieldOutput implements StagedOrderUpdateActionOutput { + type: String! + deliveryId: String! + name: String! + value: Json +} + +input SetStagedOrderDeliveryAddressCustomType { + deliveryId: String! + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +type SetStagedOrderDeliveryAddressCustomTypeOutput implements StagedOrderUpdateActionOutput { + type: String! + deliveryId: String! + custom: CustomFieldsCommand! +} + +type SetStagedOrderDeliveryAddressOutput implements StagedOrderUpdateActionOutput { + type: String! + deliveryId: String! + address: AddressDraft +} + +input SetStagedOrderDeliveryCustomField { + name: String! + value: String + deliveryId: String! +} + +type SetStagedOrderDeliveryCustomFieldOutput implements StagedOrderUpdateActionOutput { + type: String! + name: String! + value: Json + deliveryId: String! +} + +input SetStagedOrderDeliveryCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String + deliveryId: String! +} + +type SetStagedOrderDeliveryCustomTypeOutput implements StagedOrderUpdateActionOutput { + type: String! + custom: CustomFieldsCommand! + deliveryId: String! +} + +input SetStagedOrderDeliveryItems { + deliveryId: String! + items: [DeliveryItemDraftType!]! +} + +type SetStagedOrderDeliveryItemsOutput implements StagedOrderUpdateActionOutput { + type: String! + deliveryId: String! + items: [DeliveryItem!]! +} + +input SetStagedOrderDirectDiscounts { + discounts: [DirectDiscountDraft!]! +} + +type SetStagedOrderDirectDiscountsOutput implements StagedOrderUpdateActionOutput { + type: String! + discounts: [DirectDiscountDraftOutput!]! +} + +input SetStagedOrderItemShippingAddressCustomField { + addressKey: String! + name: String! + value: String +} + +type SetStagedOrderItemShippingAddressCustomFieldOutput implements StagedOrderUpdateActionOutput { + type: String! + addressKey: String! + name: String! + value: Json +} + +input SetStagedOrderItemShippingAddressCustomType { + addressKey: String! + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +type SetStagedOrderItemShippingAddressCustomTypeOutput implements StagedOrderUpdateActionOutput { + type: String! + addressKey: String! + custom: CustomFieldsCommand! +} + +input SetStagedOrderLineItemCustomField { + lineItemId: String! + name: String! + value: String +} + +type SetStagedOrderLineItemCustomFieldOutput implements StagedOrderUpdateActionOutput { + type: String! + lineItemId: String! + name: String! + value: Json +} + +input SetStagedOrderLineItemCustomType { + lineItemId: String! + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +type SetStagedOrderLineItemCustomTypeOutput implements StagedOrderUpdateActionOutput { + type: String! + lineItemId: String! + custom: CustomFieldsCommand! +} + +input SetStagedOrderLineItemDistributionChannel { + lineItemId: String! + distributionChannel: ResourceIdentifierInput +} + +type SetStagedOrderLineItemDistributionChannelOutput implements StagedOrderUpdateActionOutput { + type: String! + lineItemId: String! + distributionChannelResId: ChannelReferenceIdentifier +} + +input SetStagedOrderLineItemPrice { + lineItemId: String! + externalPrice: BaseMoneyInput +} + +type SetStagedOrderLineItemPriceOutput implements StagedOrderUpdateActionOutput { + type: String! + lineItemId: String! + externalPrice: BaseMoney +} + +input SetStagedOrderLineItemShippingDetails { + lineItemId: String! + shippingDetails: ItemShippingDetailsDraftType +} + +type SetStagedOrderLineItemShippingDetailsOutput implements StagedOrderUpdateActionOutput { + type: String! + lineItemId: String! + shippingDetails: ItemShippingDetailsDraftOutput +} + +input SetStagedOrderLineItemTaxAmount { + lineItemId: String! + externalTaxAmount: ExternalTaxAmountDraft + shippingKey: String +} + +type SetStagedOrderLineItemTaxAmountOutput implements StagedOrderUpdateActionOutput { + type: String! + lineItemId: String! + externalTaxAmount: ExternalTaxAmountDraftOutput + shippingKey: String +} + +input SetStagedOrderLineItemTaxRate { + lineItemId: String! + externalTaxRate: ExternalTaxRateDraft + shippingKey: String +} + +type SetStagedOrderLineItemTaxRateOutput implements StagedOrderUpdateActionOutput { + type: String! + lineItemId: String! + externalTaxRate: ExternalTaxRateDraftOutput + shippingKey: String +} + +input SetStagedOrderLineItemTotalPrice { + lineItemId: String! + externalTotalPrice: ExternalLineItemTotalPriceDraft +} + +type SetStagedOrderLineItemTotalPriceOutput implements StagedOrderUpdateActionOutput { + type: String! + lineItemId: String! + externalTotalPrice: ExternalLineItemTotalPrice +} + +input SetStagedOrderLocale { + locale: Locale +} + +type SetStagedOrderLocaleOutput implements StagedOrderUpdateActionOutput { + type: String! + locale: Locale +} + +input SetStagedOrderOrderNumber { + orderNumber: String +} + +type SetStagedOrderOrderNumberOutput implements StagedOrderUpdateActionOutput { + type: String! + orderNumber: String +} + +input SetStagedOrderOrderTotalTax { + externalTotalGross: MoneyInput + externalTaxPortions: [TaxPortionDraft!] = [] +} + +type SetStagedOrderOrderTotalTaxOutput implements StagedOrderUpdateActionOutput { + type: String! + externalTotalGross: Money + externalTaxPortions: [TaxPortion!]! +} + +input SetStagedOrderParcelCustomField { + name: String! + value: String + parcelId: String! +} + +type SetStagedOrderParcelCustomFieldOutput implements StagedOrderUpdateActionOutput { + type: String! + name: String! + value: Json + parcelId: String! +} + +input SetStagedOrderParcelCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String + parcelId: String! +} + +type SetStagedOrderParcelCustomTypeOutput implements StagedOrderUpdateActionOutput { + type: String! + custom: CustomFieldsCommand! + parcelId: String! +} + +input SetStagedOrderParcelItems { + parcelId: String! + items: [DeliveryItemDraftType!]! +} + +type SetStagedOrderParcelItemsOutput implements StagedOrderUpdateActionOutput { + type: String! + parcelId: String! + items: [DeliveryItem!]! +} + +input SetStagedOrderParcelMeasurements { + parcelId: String! + measurements: ParcelMeasurementsDraftType +} + +type SetStagedOrderParcelMeasurementsOutput implements StagedOrderUpdateActionOutput { + type: String! + parcelId: String! + measurements: ParcelMeasurements +} + +input SetStagedOrderParcelTrackingData { + parcelId: String! + trackingData: TrackingDataDraftType +} + +type SetStagedOrderParcelTrackingDataOutput implements StagedOrderUpdateActionOutput { + type: String! + parcelId: String! + trackingData: TrackingData +} + +input SetStagedOrderReturnInfo { + items: [ReturnInfoDraftType!] = [] +} + +type SetStagedOrderReturnInfoOutput implements StagedOrderUpdateActionOutput { + type: String! + items: [ReturnInfoDraftTypeOutput!]! +} + +input SetStagedOrderReturnItemCustomField { + name: String! + value: String + returnItemId: String! +} + +type SetStagedOrderReturnItemCustomFieldOutput implements StagedOrderUpdateActionOutput { + type: String! + name: String! + value: Json + returnItemId: String! +} + +input SetStagedOrderReturnItemCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String + returnItemId: String! +} + +type SetStagedOrderReturnItemCustomTypeOutput implements StagedOrderUpdateActionOutput { + type: String! + custom: CustomFieldsCommand! + returnItemId: String! +} + +input SetStagedOrderReturnPaymentState { + returnItemId: String! + paymentState: ReturnPaymentState! +} + +type SetStagedOrderReturnPaymentStateOutput implements StagedOrderUpdateActionOutput { + type: String! + returnItemId: String! + paymentState: ReturnPaymentState! +} + +input SetStagedOrderReturnShipmentState { + returnItemId: String! + shipmentState: ReturnShipmentState! +} + +type SetStagedOrderReturnShipmentStateOutput implements StagedOrderUpdateActionOutput { + type: String! + returnItemId: String! + shipmentState: ReturnShipmentState! +} + +input SetStagedOrderShippingAddress { + address: AddressInput +} + +input SetStagedOrderShippingAddressAndCustomShippingMethod { + address: AddressInput! + shippingMethodName: String! + shippingRate: ShippingRateDraft! + taxCategory: ResourceIdentifierInput + externalTaxRate: ExternalTaxRateDraft +} + +type SetStagedOrderShippingAddressAndCustomShippingMethodOutput implements StagedOrderUpdateActionOutput { + type: String! + address: AddressDraft! + shippingMethodName: String! + shippingRate: ShippingRate! + taxCategoryResId: ResourceIdentifier + externalTaxRate: ExternalTaxRateDraftOutput +} + +input SetStagedOrderShippingAddressAndShippingMethod { + address: AddressInput! + shippingMethod: ResourceIdentifierInput + externalTaxRate: ExternalTaxRateDraft +} + +type SetStagedOrderShippingAddressAndShippingMethodOutput implements StagedOrderUpdateActionOutput { + type: String! + address: AddressDraft! + shippingMethodResId: ResourceIdentifier + externalTaxRate: ExternalTaxRateDraftOutput +} + +input SetStagedOrderShippingAddressCustomField { + name: String! + value: String +} + +type SetStagedOrderShippingAddressCustomFieldOutput implements StagedOrderUpdateActionOutput { + type: String! + name: String! + value: Json +} + +input SetStagedOrderShippingAddressCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +type SetStagedOrderShippingAddressCustomTypeOutput implements StagedOrderUpdateActionOutput { + type: String! + custom: CustomFieldsCommand! +} + +type SetStagedOrderShippingAddressOutput implements StagedOrderUpdateActionOutput { + type: String! + address: AddressDraft +} + +input SetStagedOrderShippingCustomField { + shippingKey: String + name: String! + value: String +} + +type SetStagedOrderShippingCustomFieldOutput implements StagedOrderUpdateActionOutput { + type: String! + shippingKey: String + name: String! + value: Json +} + +input SetStagedOrderShippingCustomType { + shippingKey: String + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +type SetStagedOrderShippingCustomTypeOutput implements StagedOrderUpdateActionOutput { + type: String! + shippingKey: String + custom: CustomFieldsCommand! +} + +input SetStagedOrderShippingMethod { + shippingMethod: ResourceIdentifierInput + externalTaxRate: ExternalTaxRateDraft +} + +type SetStagedOrderShippingMethodOutput implements StagedOrderUpdateActionOutput { + type: String! + shippingMethodResId: ResourceIdentifier + externalTaxRate: ExternalTaxRateDraftOutput +} + +input SetStagedOrderShippingMethodTaxAmount { + externalTaxAmount: ExternalTaxAmountDraft +} + +type SetStagedOrderShippingMethodTaxAmountOutput implements StagedOrderUpdateActionOutput { + type: String! + externalTaxAmount: ExternalTaxAmountDraftOutput +} + +input SetStagedOrderShippingMethodTaxRate { + externalTaxRate: ExternalTaxRateDraft +} + +type SetStagedOrderShippingMethodTaxRateOutput implements StagedOrderUpdateActionOutput { + type: String! + externalTaxRate: ExternalTaxRateDraftOutput +} + +input SetStagedOrderShippingRateInput { + shippingRateInput: ShippingRateInputDraft +} + +type SetStagedOrderShippingRateInputOutput implements StagedOrderUpdateActionOutput { + type: String! + shippingRateInput: ShippingRateInputDraftOutput +} + +input SetStagedOrderStore { + store: ResourceIdentifierInput +} + +type SetStagedOrderStoreOutput implements StagedOrderUpdateActionOutput { + type: String! + storeResId: ResourceIdentifier +} + +input SetStagedQuoteCustomField { + name: String! + value: String +} + +input SetStagedQuoteCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetStagedQuoteSellerComment { + sellerComment: String +} + +input SetStagedQuoteValidTo { + validTo: DateTime +} + +input SetStandalonePriceCustomFields { + name: String! + value: String +} + +input SetStandalonePriceDiscountedPrice { + discounted: DiscountedProductPriceValueInput +} + +input SetStateDescription { + description: [LocalizedStringItemInputType!] +} + +input SetStateName { + name: [LocalizedStringItemInputType!] +} + +input SetStateRoles { + roles: [StateRole!]! +} + +input SetStateTransitions { + transitions: [ResourceIdentifierInput!] +} + +input SetStoreCustomField { + name: String! + value: String +} + +input SetStoreCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetStoreDistributionChannels { + distributionChannels: [ResourceIdentifierInput!] +} + +input SetStoreLanguages { + languages: [Locale!] +} + +input SetStoreName { + name: [LocalizedStringItemInputType!] +} + +input SetStoreProductSelections { + productSelections: [ProductSelectionSettingInActionInput!] +} + +input SetStoreSupplyChannels { + supplyChannels: [ResourceIdentifierInput!] +} + +input SetSubscriptionChanges { + changes: [ChangeSubscriptionInput!]! +} + +input SetSubscriptionKey { + key: String +} + +input SetSubscriptionMessages { + messages: [MessageSubscriptionInput!]! +} + +input SetTaxCategoryKey { + key: String +} + +type SetType implements FieldType { + elementType: FieldType! + name: String! +} + +input SetTypeDescription { + description: [LocalizedStringItemInputType!] +} + +input SetZoneDescription { + description: String +} + +input SetZoneKey { + key: String +} + +enum ShipmentState { + Delivered + Delayed + Backorder + Partial + Pending + Ready + Shipped +} + +type ShippingInfo { + shippingMethodName: String! + price: Money! + shippingRate: ShippingRate! + taxRate: TaxRate + deliveries: [Delivery!]! + discountedPrice: DiscountedLineItemPrice + taxedPrice: TaxedItemPrice + shippingMethodState: ShippingMethodState! + shippingMethod: ShippingMethod + shippingMethodRef: Reference + taxCategory: TaxCategory + taxCategoryRef: Reference +} + +input ShippingInfoImportDraft { + shippingMethodName: String! + price: MoneyInput! + shippingRate: ShippingRateDraft! + taxRate: TaxRateInput + taxCategory: ResourceIdentifierInput + deliveries: [DeliveryDraft!]! = [] + shippingMethod: ResourceIdentifierInput + discountedPrice: DiscountedLineItemPriceDraft + shippingMethodState: ShippingMethodState! = MatchesCart +} + +type ShippingMethod implements Versioned & ReferenceExpandable { + name: String! + zoneRates: [ZoneRate!]! + isDefault: Boolean! + predicate: String + key: String + taxCategoryRef: Reference + localizedDescriptionAllLocales: [LocalizedString!] + localizedNameAllLocales: [LocalizedString!] + localizedDescription( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + localizedName( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + taxCategory: TaxCategory + custom: CustomFieldsType + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +input ShippingMethodDraft { + name: String! + localizedName: [LocalizedStringItemInputType!] + description: String + localizedDescription: [LocalizedStringItemInputType!] + taxCategory: ResourceIdentifierInput! + zoneRates: [ZoneRateDraft!] = [] + isDefault: Boolean! + predicate: String + key: String + custom: CustomFieldsDraft +} + +type ShippingMethodLimitWithCurrent implements LimitWithCurrent { + limit: Long + current: Long! +} + +type ShippingMethodLimitsProjection { + total: ShippingMethodLimitWithCurrent! +} + +type ShippingMethodQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [ShippingMethod!]! +} + +enum ShippingMethodState { + "Either there is no predicate defined for the ShippingMethod or the given predicate matches the cart" + MatchesCart + + "The ShippingMethod predicate does not match the cart. Ordering this cart will fail with error ShippingMethodDoesNotMatchCart" + DoesNotMatchCart +} + +input ShippingMethodUpdateAction { + addShippingRate: AddShippingMethodShippingRate + addZone: AddShippingMethodZone + changeIsDefault: ChangeShippingMethodIsDefault + changeName: ChangeShippingMethodName + changeTaxCategory: ChangeShippingMethodTaxCategory + removeShippingRate: RemoveShippingMethodShippingRate + removeZone: RemoveShippingMethodZone + setCustomField: SetShippingMethodCustomField + setCustomType: SetShippingMethodCustomType + setDescription: SetShippingMethodDescription + setKey: SetShippingMethodKey + setLocalizedDescription: SetShippingMethodLocalizedDescription + setLocalizedName: SetShippingMethodLocalizedName + setPredicate: SetShippingMethodPredicate +} + +"A field to retrieve available shipping methods for a cart." +interface ShippingMethodsByCartInterface { + shippingMethodsByCart(id: String!): [ShippingMethod!]! +} + +"Shipping Rate" +type ShippingRate { + price: Money! + freeAbove: Money + isMatching: Boolean + tiers: [ShippingRatePriceTier!]! +} + +type ShippingRateCartClassificationPriceTier implements ShippingRatePriceTier { + value: String! + price: Money! + isMatching: Boolean + type: String! +} + +type ShippingRateCartScorePriceTier implements ShippingRatePriceTier { + score: Int! + price: Money + priceFunction: PriceFunction + isMatching: Boolean + type: String! +} + +type ShippingRateCartValuePriceTier implements ShippingRatePriceTier { + minimumCentAmount: Int! + price: Money! + isMatching: Boolean + type: String! +} + +input ShippingRateDraft { + price: MoneyDraft! + freeAbove: MoneyDraft + tiers: [ShippingRatePriceTierDraft!] = [] +} + +interface ShippingRateInput { + type: String! +} + +input ShippingRateInputDraft { + Classification: ClassificationShippingRateInputDraft + Score: ScoreShippingRateInputDraft +} + +interface ShippingRateInputDraftOutput { + type: String! +} + +type ShippingRateInputLocalizedEnumValue { + key: String! + label( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + labelAllLocales: [LocalizedString!]! +} + +interface ShippingRateInputType { + type: String! +} + +input ShippingRateInputTypeInput { + CartValue: CartValueInput + CartClassification: CartClassificationInput + CartScore: CartScoreInput +} + +interface ShippingRatePriceTier { + type: String! +} + +input ShippingRatePriceTierCartClassificationDraft { + value: String! + price: MoneyDraft! +} + +input ShippingRatePriceTierCartScoreDraft { + score: Int! + price: MoneyDraft + priceFunction: PriceFunctionDraft +} + +input ShippingRatePriceTierCartValueDraft { + minimumCentAmount: Int! + price: MoneyDraft! +} + +input ShippingRatePriceTierDraft { + CartValue: ShippingRatePriceTierCartValueDraft + CartClassification: ShippingRatePriceTierCartClassificationDraft + CartScore: ShippingRatePriceTierCartScoreDraft +} + +type ShippingTarget implements CartDiscountTarget { + type: String! +} + +input ShippingTargetDraft { + addressKey: String! + quantity: Long! +} + +input ShippingTargetDraftType { + addressKey: String! + quantity: Long! + shippingMethodKey: String +} + +input ShippingTargetInput { + dummy: String +} + +type ShoppingList implements Versioned & ReferenceExpandable { + key: String + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!]! + description( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + descriptionAllLocales: [LocalizedString!] + slug( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + slugAllLocales: [LocalizedString!] + customerRef: Reference + customer: Customer + storeRef: KeyReference + store: Store + anonymousId: String + lineItems: [ShoppingListLineItem!]! + textLineItems: [TextLineItem!]! + custom: CustomFieldsType + deleteDaysAfterLastModification: Int + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +input ShoppingListDraft { + name: [LocalizedStringItemInputType!]! + description: [LocalizedStringItemInputType!] + lineItems: [ShoppingListLineItemDraft!] = [] + textLineItems: [TextLineItemDraft!] = [] + custom: CustomFieldsDraft + deleteDaysAfterLastModification: Int + key: String + customer: ResourceIdentifierInput + slug: [LocalizedStringItemInputType!] + anonymousId: String +} + +type ShoppingListLimitWithCurrent implements LimitWithCurrent { + limit: Long + current: Long! +} + +type ShoppingListLimitsProjection { + lineItems: Limit! + textLineItems: Limit! + total: ShoppingListLimitWithCurrent! +} + +type ShoppingListLineItem { + id: String! + productId: String! + variantId: Int + productTypeRef: Reference! + productType: ProductTypeDefinition! + quantity: Int! + addedAt: DateTime! + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!]! + deactivatedAt: DateTime + custom: CustomFieldsType + productSlug( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + productSlugAllLocales: [LocalizedString!] + variant: ProductVariant +} + +input ShoppingListLineItemDraft { + productId: String + sku: String + variantId: Int + quantity: Int = 1 + custom: CustomFieldsDraft + addedAt: DateTime +} + +"Fields to access shopping lists. Includes direct access to a single list and searching for shopping lists." +interface ShoppingListQueryInterface { + shoppingList( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): ShoppingList + shoppingLists(where: String, sort: [String!], limit: Int, offset: Int): ShoppingListQueryResult! +} + +type ShoppingListQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [ShoppingList!]! +} + +input ShoppingListUpdateAction { + addLineItem: AddShoppingListLineItem + addTextLineItem: AddShoppingListTextLineItem + changeLineItemQuantity: ChangeShoppingListLineItemQuantity + changeLineItemsOrder: ChangeShoppingListLineItemsOrder + changeName: ChangeShoppingListName + changeTextLineItemName: ChangeShoppingListTextLineItemName + changeTextLineItemQuantity: ChangeShoppingListTextLineItemQuantity + changeTextLineItemsOrder: ChangeShoppingListTextLineItemsOrder + removeLineItem: RemoveShoppingListLineItem + removeTextLineItem: RemoveShoppingListTextLineItem + setAnonymousId: SetShoppingListAnonymousId + setCustomField: SetShoppingListCustomField + setCustomType: SetShoppingListCustomType + setCustomer: SetShoppingListCustomer + setDeleteDaysAfterLastModification: SetShoppingListDeleteDaysAfterLastModification + setDescription: SetShoppingListDescription + setKey: SetShoppingListKey + setLineItemCustomField: SetShoppingListLineItemCustomField + setLineItemCustomType: SetShoppingListLineItemCustomType + setSlug: SetShoppingListSlug + setStore: SetShoppingListStore + setTextLineItemCustomField: SetShoppingListTextLineItemCustomField + setTextLineItemCustomType: SetShoppingListTextLineItemCustomType + setTextLineItemDescription: SetShoppingListTextLineItemDescription +} + +type ShoppingListsConfiguration { + deleteDaysAfterLastModification: Int +} + +input ShoppingListsConfigurationInput { + deleteDaysAfterLastModification: Int +} + +input SimpleAttributeTypeDraft { + dummy: String +} + +input SimpleFieldTypeDraft { + dummy: String +} + +"Describes how this discount interacts with other discounts" +enum StackingMode { + "Don\u2019t apply any more matching discounts after this one." + StopAfterThisDiscount + + "Default. Continue applying other matching discounts after applying this one." + Stacking +} + +input StagedOrderUpdateAction { + addCustomLineItem: AddStagedOrderCustomLineItem + addDelivery: AddStagedOrderDelivery + addDiscountCode: AddStagedOrderDiscountCode + addItemShippingAddress: AddStagedOrderItemShippingAddress + addLineItem: AddStagedOrderLineItem + addParcelToDelivery: AddStagedOrderParcelToDelivery + addPayment: AddStagedOrderPayment + addReturnInfo: AddStagedOrderReturnInfo + addShoppingList: AddStagedOrderShoppingList + changeCustomLineItemMoney: ChangeStagedOrderCustomLineItemMoney + changeCustomLineItemQuantity: ChangeStagedOrderCustomLineItemQuantity + changeLineItemQuantity: ChangeStagedOrderLineItemQuantity + changeOrderState: ChangeStagedOrderOrderState + changePaymentState: ChangeStagedOrderPaymentState + changeShipmentState: ChangeStagedOrderShipmentState + changeTaxCalculationMode: ChangeStagedOrderTaxCalculationMode + changeTaxMode: ChangeStagedOrderTaxMode + changeTaxRoundingMode: ChangeStagedOrderTaxRoundingMode + importCustomLineItemState: ImportStagedOrderCustomLineItemState + importLineItemState: ImportStagedOrderLineItemState + recalculate: RecalculateStagedOrder + removeCustomLineItem: RemoveStagedOrderCustomLineItem + removeDelivery: RemoveStagedOrderDelivery + removeDiscountCode: RemoveStagedOrderDiscountCode + removeItemShippingAddress: RemoveStagedOrderItemShippingAddress + removeLineItem: RemoveStagedOrderLineItem + removeParcelFromDelivery: RemoveStagedOrderParcelFromDelivery + removePayment: RemoveStagedOrderPayment + setBillingAddress: SetStagedOrderBillingAddress + setBillingAddressCustomField: SetStagedOrderBillingAddressCustomField + setBillingAddressCustomType: SetStagedOrderBillingAddressCustomType + setCountry: SetStagedOrderCountry + setCustomField: SetStagedOrderCustomField + setCustomLineItemCustomField: SetStagedOrderCustomLineItemCustomField + setCustomLineItemCustomType: SetStagedOrderCustomLineItemCustomType + setCustomLineItemShippingDetails: SetStagedOrderCustomLineItemShippingDetails + setCustomLineItemTaxAmount: SetStagedOrderCustomLineItemTaxAmount + setCustomLineItemTaxRate: SetStagedOrderCustomLineItemTaxRate + setCustomShippingMethod: SetStagedOrderCustomShippingMethod + setCustomType: SetStagedOrderCustomType + setCustomerEmail: SetStagedOrderCustomerEmail + setCustomerGroup: SetStagedOrderCustomerGroup + setCustomerId: SetStagedOrderCustomerId + setDeliveryAddress: SetStagedOrderDeliveryAddress + setDeliveryAddressCustomField: SetStagedOrderDeliveryAddressCustomField + setDeliveryAddressCustomType: SetStagedOrderDeliveryAddressCustomType + setDeliveryCustomField: SetStagedOrderDeliveryCustomField + setDeliveryCustomType: SetStagedOrderDeliveryCustomType + setDeliveryItems: SetStagedOrderDeliveryItems + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + setDirectDiscounts: SetStagedOrderDirectDiscounts + setItemShippingAddressCustomField: SetStagedOrderItemShippingAddressCustomField + setItemShippingAddressCustomType: SetStagedOrderItemShippingAddressCustomType + setLineItemCustomField: SetStagedOrderLineItemCustomField + setLineItemCustomType: SetStagedOrderLineItemCustomType + setLineItemDistributionChannel: SetStagedOrderLineItemDistributionChannel + setLineItemPrice: SetStagedOrderLineItemPrice + setLineItemShippingDetails: SetStagedOrderLineItemShippingDetails + setLineItemTaxAmount: SetStagedOrderLineItemTaxAmount + setLineItemTaxRate: SetStagedOrderLineItemTaxRate + setLineItemTotalPrice: SetStagedOrderLineItemTotalPrice + setLocale: SetStagedOrderLocale + setOrderNumber: SetStagedOrderOrderNumber + setOrderTotalTax: SetStagedOrderOrderTotalTax + setParcelCustomField: SetStagedOrderParcelCustomField + setParcelCustomType: SetStagedOrderParcelCustomType + setParcelItems: SetStagedOrderParcelItems + setParcelMeasurements: SetStagedOrderParcelMeasurements + setParcelTrackingData: SetStagedOrderParcelTrackingData + setReturnInfo: SetStagedOrderReturnInfo + setReturnItemCustomField: SetStagedOrderReturnItemCustomField + setReturnItemCustomType: SetStagedOrderReturnItemCustomType + setReturnPaymentState: SetStagedOrderReturnPaymentState + setReturnShipmentState: SetStagedOrderReturnShipmentState + setShippingAddress: SetStagedOrderShippingAddress + setShippingAddressAndCustomShippingMethod: SetStagedOrderShippingAddressAndCustomShippingMethod + setShippingAddressAndShippingMethod: SetStagedOrderShippingAddressAndShippingMethod + setShippingAddressCustomField: SetStagedOrderShippingAddressCustomField + setShippingAddressCustomType: SetStagedOrderShippingAddressCustomType + setShippingCustomField: SetStagedOrderShippingCustomField + setShippingCustomType: SetStagedOrderShippingCustomType + setShippingMethod: SetStagedOrderShippingMethod + setShippingMethodTaxAmount: SetStagedOrderShippingMethodTaxAmount + setShippingMethodTaxRate: SetStagedOrderShippingMethodTaxRate + setShippingRateInput: SetStagedOrderShippingRateInput + setStore: SetStagedOrderStore + transitionCustomLineItemState: TransitionStagedOrderCustomLineItemState + transitionLineItemState: TransitionStagedOrderLineItemState + transitionState: TransitionStagedOrderState + updateItemShippingAddress: UpdateStagedOrderItemShippingAddress + updateSyncInfo: UpdateStagedOrderSyncInfo +} + +interface StagedOrderUpdateActionOutput { + type: String! +} + +type StagedQuote implements Versioned { + key: String + stagedQuoteState: StagedQuoteState! + quoteRequestRef: Reference! + quoteRequest: QuoteRequest + quotationCartRef: Reference! + quotationCart: Cart + customerRef: Reference + customer: Customer + validTo: DateTime + custom: CustomFieldsType + stateRef: Reference + state: State + businessUnit: KeyReference + sellerComment: String + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +input StagedQuoteDraft { + key: String + quoteRequest: ResourceIdentifierInput + quoteRequestVersion: Long + custom: CustomFieldsDraft + state: ReferenceInput +} + +type StagedQuoteQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [StagedQuote!]! +} + +enum StagedQuoteState { + Closed + InProgress + Sent +} + +input StagedQuoteUpdateAction { + changeStagedQuoteState: ChangeStagedQuoteState + setSellerComment: SetStagedQuoteSellerComment + setCustomField: SetStagedQuoteCustomField + setCustomType: SetStagedQuoteCustomType + setValidTo: SetStagedQuoteValidTo + transitionState: TransitionStagedQuoteState +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type StagedStandalonePrice { + value: BaseMoney! + discounted: DiscountedProductPriceValue +} + +""" +StandalonePrices are managed and queried through the StandalonePrices API +and associated to a ProductVariant through the sku field. +""" +type StandalonePrice implements Versioned { + id: String! + version: Long! + key: String + sku: String! + value: BaseMoney! + country: Country + customerGroupRef: Reference + channelRef: Reference + validFrom: DateTime + validUntil: DateTime + tiers: [ProductPriceTier!] + discounted: DiscountedProductPriceValue + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + staged: StagedStandalonePrice + custom: CustomFieldsType + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + active: Boolean! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type StandalonePriceActiveChanged implements MessagePayload { + active: Boolean! + oldActive: Boolean! + type: String! +} + +type StandalonePriceCreated implements MessagePayload { + standalonePrice: StandalonePrice! + type: String! +} + +"Serves as value of the custom field on a resource or data type customized with a Type." +input StandalonePriceCustomField { + typeId: String + typeKey: String + type: ResourceIdentifierInput + fields: CustomFieldsDraft! +} + +type StandalonePriceDeleted implements MessagePayload { + type: String! +} + +type StandalonePriceDiscountSet implements MessagePayload { + discounted: DiscountedProductPriceValue + type: String! +} + +type StandalonePriceExternalDiscountSet implements MessagePayload { + discounted: DiscountedProductPriceValue + type: String! +} + +type StandalonePriceQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [StandalonePrice!]! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type StandalonePriceStagedChangesApplied implements MessagePayload { + stagedChanges: StagedStandalonePrice! + type: String! +} + +input StandalonePriceUpdateAction { + applyStagedChanges: ApplyStagedChanges + changeActive: ChangeStandalonePriceActive + changeValue: ChangeStandalonePriceValue + setDiscountedPrice: SetStandalonePriceDiscountedPrice + setCustomField: SetStandalonePriceCustomFields + setCustomType: CustomFieldsDraft +} + +type StandalonePriceValueChanged implements MessagePayload { + value: BaseMoney! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + staged: Boolean! + type: String! +} + +"[State](https://docs.commercetools.com/api/projects/states)" +type State implements Versioned & ReferenceExpandable { + id: String! + version: Long! + key: String + type: StateType! + roles: [StateRole!]! + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!] + description( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + descriptionAllLocales: [LocalizedString!] + builtIn: Boolean! + transitionsRef: [Reference!] + transitions: [State!] + initial: Boolean! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +input StateDraft { + key: String! + type: StateType! + name: [LocalizedStringItemInputType!] + description: [LocalizedStringItemInputType!] + initial: Boolean + roles: [StateRole!] + transitions: [ReferenceInput!] +} + +type StateQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [State!]! +} + +enum StateRole { + Return + ReviewIncludedInStatistics +} + +enum StateType { + QuoteState + StagedQuoteState + QuoteRequestState + OrderState + ProductState + ReviewState + PaymentState + LineItemState +} + +input StateUpdateAction { + addRoles: AddStateRoles + changeInitial: ChangeStateInitial + changeKey: ChangeStateKey + changeType: ChangeStateType + removeRoles: RemoveStateRoles + setDescription: SetStateDescription + setName: SetStateName + setRoles: SetStateRoles + setTransitions: SetStateTransitions +} + +"Stores allow defining different contexts for a project." +type Store implements Versioned & ReferenceExpandable { + id: String! + version: Long! + key: String! + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!] + languages: [Locale!] + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + productSelections: [ProductSelectionSetting!]! + distributionChannelsRef: [Reference!]! + distributionChannels: [Channel!]! + supplyChannelsRef: [Reference!]! + supplyChannels: [Channel!]! + createdAt: DateTime! + lastModifiedAt: DateTime! + custom: CustomFieldsType + createdBy: Initiator + lastModifiedBy: Initiator +} + +type StoreCreated implements MessagePayload { + languages: [Locale!]! + custom: CustomFieldsType + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + productSelections: [ProductSelectionSetting!]! + distributionChannels: [Channel!]! + supplyChannels: [Channel!]! + distributionChannelsRef: [Reference!]! + supplyChannelsRef: [Reference!]! + productSelectionsRef: [Reference!]! + nameAllLocales: [LocalizedString!] + type: String! +} + +type StoreDeleted implements MessagePayload { + type: String! +} + +type StoreDistributionChannelsChanged implements MessagePayload { + addedDistributionChannels: [Channel!] + removedDistributionChannels: [Channel!] + addedDistributionChannelsRef: [Reference!] + removedDistributionChannelsRef: [Reference!] + type: String! +} + +type StoreLanguagesChanged implements MessagePayload { + addedLanguages: [Locale!] + removedLanguages: [Locale!] + type: String! +} + +type StoreLimitWithCurrent implements LimitWithCurrent { + limit: Long + current: Long! +} + +type StoreLimitsProjection { + productSelections: Limit! + inventorySupplyChannels: Limit! + productDistributionChannels: Limit! + total: StoreLimitWithCurrent! +} + +type StoreNameSet implements MessagePayload { + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!] + type: String! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type StoreProductSelectionsChanged implements MessagePayload { + addedProductSelections: [ProductSelectionSetting!] + removedProductSelections: [ProductSelectionSetting!] + updatedProductSelections: [ProductSelectionSetting!] + type: String! +} + +type StoreQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [Store!]! +} + +type StoreSupplyChannelsChanged implements MessagePayload { + addedSupplyChannels: [Channel!] + removedSupplyChannels: [Channel!] + addedSupplyChannelsRef: [Reference!] + removedSupplyChannelsRef: [Reference!] + type: String! +} + +input StoreUpdateAction { + addProductSelection: AddStoreProductSelection + addDistributionChannel: AddStoreDistributionChannel + addSupplyChannel: AddStoreSupplyChannel + changeProductSelectionActive: ChangeStoreProductSelectionActive + removeProductSelection: RemoveStoreProductSelection + removeDistributionChannel: RemoveStoreDistributionChannel + removeSupplyChannel: RemoveStoreSupplyChannel + setProductSelections: SetStoreProductSelections + setCustomField: SetStoreCustomField + setCustomType: SetStoreCustomType + setDistributionChannels: SetStoreDistributionChannels + setLanguages: SetStoreLanguages + setName: SetStoreName + setSupplyChannels: SetStoreSupplyChannels +} + +type StringAttribute implements Attribute { + value: String! + name: String! +} + +type StringField implements CustomField { + value: String! + name: String! +} + +type StringType implements FieldType { + name: String! +} + +type SubRate { + name: String! + amount: Float! +} + +input SubRateDraft { + name: String! + amount: Float! +} + +input SubscriptionDraft { + key: String + destination: DestinationInput! + messages: [MessageSubscriptionInput!] + changes: [ChangeSubscriptionInput!] + format: SubscriptionFormatInput +} + +input SubscriptionFormatInput { + Platform: PlatformFormatInput + CloudEvents: CloudEventsSubscriptionsFormatInput +} + +enum SubscriptionHealthStatus { + TemporaryError + ConfigurationErrorDeliveryStopped + ConfigurationError + Healthy +} + +input SubscriptionUpdateAction { + changeDestination: ChangeSubscriptionDestination + setChanges: SetSubscriptionChanges + setKey: SetSubscriptionKey + setMessages: SetSubscriptionMessages +} + +type SuggestResult { + searchKeywords: [SuggestResultEntry!]! +} + +type SuggestResultEntry { + locale: Locale! + suggestions: [Suggestion!]! +} + +interface SuggestTokenizer { + type: String! +} + +interface SuggestTokenizerProductSearch { + type: String! +} + +type Suggestion { + text: String! +} + +"Stores information about order synchronization activities (like export or import)." +type SyncInfo { + channelRef: Reference! + channel: Channel + externalId: String + syncedAt: DateTime! +} + +input TargetReferenceInput { + typeId: String! + id: String + key: String +} + +enum TaxCalculationMode { + """ + This calculation mode calculates the taxes on the unit price before multiplying with the quantity. + E.g. `($1.08 * 1.19 = $1.2852 -> $1.29 rounded) * 3 = $3.87` + """ + UnitPriceLevel + + """ + Default. This calculation mode calculates the taxes after the unit price is multiplied with the quantity. + E.g. `($1.08 * 3 = $3.24) * 1.19 = $3.8556 -> $3.86 rounded` + """ + LineItemLevel +} + +"Tax Categories define how products are to be taxed in different countries." +type TaxCategory implements Versioned & ReferenceExpandable { + name: String! + description: String + rates: [TaxRate!]! + key: String + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +input TaxCategoryAddTaxRate { + taxRate: TaxRateDraft! +} + +input TaxCategoryChangeName { + name: String! +} + +input TaxCategoryDraft { + name: String! + description: String + rates: [TaxRateDraft!] + key: String +} + +type TaxCategoryLimitWithCurrent implements LimitWithCurrent { + limit: Long + current: Long! +} + +type TaxCategoryLimitsProjection { + total: TaxCategoryLimitWithCurrent! +} + +type TaxCategoryQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [TaxCategory!]! +} + +input TaxCategoryRemoveTaxRate { + taxRateId: String! +} + +input TaxCategoryReplaceTaxRate { + taxRateId: String! + taxRate: TaxRateDraft! +} + +input TaxCategorySetDescription { + description: String +} + +input TaxCategoryUpdateAction { + changeName: TaxCategoryChangeName + setDescription: TaxCategorySetDescription + addTaxRate: TaxCategoryAddTaxRate + replaceTaxRate: TaxCategoryReplaceTaxRate + removeTaxRate: TaxCategoryRemoveTaxRate + setKey: SetTaxCategoryKey +} + +enum TaxMode { + "No taxes are added to the cart." + Disabled + + """ + The tax amounts and the tax rates as well as the tax portions are set externally per ExternalTaxAmountDraft. + A cart with this tax mode can only be ordered if the cart itself and all line items, all custom line items and + the shipping method have an external tax amount and rate set + """ + ExternalAmount + + """ + The tax rates are set externally per ExternalTaxRateDraft. A cart with this tax mode can only be ordered if all + line items, all custom line items and the shipping method have an external tax rate set. The totalNet and + totalGross as well as the taxPortions fields are calculated according to the taxRoundingMode. + """ + External + + """ + The tax rates are selected from the TaxCategories based on the cart shipping address. + The totalNet and totalGross as well as the taxPortions fields are calculated according to the + taxRoundingMode. + """ + Platform +} + +""" +Represents the portions that sum up to the totalGross field of a TaxedPrice. The portions are calculated +from the TaxRates. If a tax rate has SubRates, they are used and can be identified by name. Tax portions +from line items that have the same rate and name will be accumulated to the same tax portion. +""" +type TaxPortion { + rate: Float! + amount: Money! + name: String +} + +input TaxPortionDraft { + name: String + rate: Float! + amount: MoneyInput! +} + +type TaxRate { + name: String! + amount: Float! + includedInPrice: Boolean! + country: Country! + state: String + id: String + subRates: [SubRate!]! +} + +input TaxRateDraft { + name: String! + amount: Float + includedInPrice: Boolean! + country: Country! + state: String + subRates: [SubRateDraft!] = [] +} + +input TaxRateInput { + name: String! + amount: Float! + includedInPrice: Boolean! + country: Country! + state: String + id: String + subRates: [SubRateDraft!] = [] +} + +type TaxedItemPrice { + totalNet: Money! + totalGross: Money! + totalTax: Money +} + +type TaxedPrice { + totalNet: Money! + totalGross: Money! + taxPortions: [TaxPortion!]! + totalTax: Money +} + +input TaxedPriceDraft { + totalNet: BaseMoneyInput! + totalGross: BaseMoneyInput! + taxPortions: [TaxPortionDraft!]! + totalTax: BaseMoneyInput +} + +type TermCount { + term: String! + count: Int! + productCount: Int +} + +input TermsFacetInput { + path: String! + alias: String + countProducts: Boolean! = false +} + +type TermsFacetResult implements FacetResult { + dataType: String! + missing: Int! + total: Int! + other: Int! + terms: [TermCount!]! + type: String! +} + +type TextAttributeDefinitionType implements AttributeDefinitionType { + name: String! +} + +"UI hint telling what kind of edit control should be displayed for a text attribute." +enum TextInputHint { + SingleLine + MultiLine +} + +type TextLineItem { + id: String! + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!]! + description( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + descriptionAllLocales: [LocalizedString!] + quantity: Int! + custom: CustomFieldsType + addedAt: DateTime! +} + +input TextLineItemDraft { + name: [LocalizedStringItemInputType!]! + description: [LocalizedStringItemInputType!] + quantity: Int = 1 + custom: CustomFieldsDraft + addedAt: DateTime +} + +"Time is a scalar value that represents an ISO8601 formatted time." +scalar Time + +type TimeAttribute implements Attribute { + value: Time! + name: String! +} + +type TimeAttributeDefinitionType implements AttributeDefinitionType { + name: String! +} + +type TimeField implements CustomField { + value: Time! + name: String! +} + +type TimeType implements FieldType { + name: String! +} + +type TrackingData { + trackingId: String + carrier: String + provider: String + providerTransaction: String + isReturn: Boolean! +} + +input TrackingDataDraftType { + trackingId: String + carrier: String + provider: String + providerTransaction: String + isReturn: Boolean = false +} + +type Transaction { + id: String! + timestamp: DateTime + type: TransactionType + amount: Money! + interactionId: String + state: TransactionState! + custom: CustomFieldsType +} + +input TransactionDraft { + timestamp: DateTime + type: TransactionType! + amount: MoneyInput! + interactionId: String + state: TransactionState + custom: CustomFieldsDraft +} + +enum TransactionState { + Failure + Success + Pending + Initial +} + +enum TransactionType { + Chargeback + Refund + Charge + CancelAuthorization + Authorization +} + +input TransitionOrderCustomLineItemState { + customLineItemId: String! + quantity: Long! + fromState: ResourceIdentifierInput! + toState: ResourceIdentifierInput! + actualTransitionDate: DateTime +} + +input TransitionOrderLineItemState { + lineItemId: String! + quantity: Long! + fromState: ResourceIdentifierInput! + toState: ResourceIdentifierInput! + actualTransitionDate: DateTime +} + +input TransitionOrderState { + state: ResourceIdentifierInput! + force: Boolean = false +} + +input TransitionPaymentState { + state: ResourceIdentifierInput! + force: Boolean = false +} + +input TransitionProductState { + state: ReferenceInput! + force: Boolean +} + +input TransitionQuoteRequestState { + state: ResourceIdentifierInput! + force: Boolean = false +} + +input TransitionQuoteState { + state: ResourceIdentifierInput! + force: Boolean = false +} + +input TransitionReviewState { + state: ResourceIdentifierInput! + force: Boolean = false +} + +input TransitionStagedOrderCustomLineItemState { + customLineItemId: String! + quantity: Long! + fromState: ResourceIdentifierInput! + toState: ResourceIdentifierInput! + actualTransitionDate: DateTime +} + +type TransitionStagedOrderCustomLineItemStateOutput implements StagedOrderUpdateActionOutput { + type: String! + customLineItemId: String! + quantity: Long! + fromStateResId: ResourceIdentifier! + toStateResId: ResourceIdentifier! + actualTransitionDate: DateTime +} + +input TransitionStagedOrderLineItemState { + lineItemId: String! + quantity: Long! + fromState: ResourceIdentifierInput! + toState: ResourceIdentifierInput! + actualTransitionDate: DateTime +} + +type TransitionStagedOrderLineItemStateOutput implements StagedOrderUpdateActionOutput { + type: String! + lineItemId: String! + quantity: Long! + fromStateResId: ResourceIdentifier! + toStateResId: ResourceIdentifier! + actualTransitionDate: DateTime +} + +input TransitionStagedOrderState { + state: ResourceIdentifierInput! + force: Boolean = false +} + +type TransitionStagedOrderStateOutput implements StagedOrderUpdateActionOutput { + type: String! + stateResId: ResourceIdentifier! + force: Boolean! +} + +input TransitionStagedQuoteState { + state: ResourceIdentifierInput! + force: Boolean = false +} + +input TreeFilterInput { + path: String! + rootValues: [String!]! + subTreeValues: [String!]! +} + +type Trigger { + resourceTypeId: String! + actions: [ActionType!]! + condition: String +} + +input TriggerInput { + resourceTypeId: String! + actions: [ActionType!] + condition: String +} + +"Types allow you to define additional project-specific fields on resources and data types, so-called Custom Fields." +type TypeDefinition implements Versioned & ReferenceExpandable { + key: String! + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + description( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!]! + descriptionAllLocales: [LocalizedString!] + resourceTypeIds: [String!]! + fieldDefinitions( + """ + The names of the custom field definitions to include. + + If neither `includeNames` nor `excludeNames` are provided, then all custom fields are returned. + """ + includeNames: [String!], + + """ + The names of the custom field definitions to exclude. + + If neither `includeNames` nor `excludeNames` are provided, then all custom fields are returned. + """ + excludeNames: [String!]): [FieldDefinition!]! + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +input TypeDefinitionDraft { + key: String! + name: [LocalizedStringItemInputType!]! + description: [LocalizedStringItemInputType!] + resourceTypeIds: [String!]! + fieldDefinitions: [FieldDefinitionInput!] +} + +type TypeDefinitionQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [TypeDefinition!]! +} + +input TypeUpdateAction { + addEnumValue: AddTypeEnumValue + addFieldDefinition: AddTypeFieldDefinition + addLocalizedEnumValue: AddTypeLocalizedEnumValue + changeEnumValueLabel: ChangeTypeEnumValueLabel + changeEnumValueOrder: ChangeTypeEnumValueOrder + changeLabel: ChangeTypeLabel + changeFieldDefinitionOrder: ChangeTypeFieldDefinitionOrder + changeInputHint: ChangeTypeInputHint + changeLocalizedEnumValueLabel: ChangeTypeLocalizedEnumValueLabel + changeLocalizedEnumValueOrder: ChangeTypeLocalizedEnumValueOrder + changeKey: ChangeTypeKey + changeName: ChangeTypeName + removeFieldDefinition: RemoveTypeFieldDefinition + setDescription: SetTypeDescription +} + +input UnpublishProduct { + dummy: String +} + +input UpdateCartItemShippingAddress { + address: AddressInput! +} + +input UpdateOrderItemShippingAddress { + address: AddressInput! +} + +input UpdateOrderSyncInfo { + channel: ResourceIdentifierInput! + syncedAt: DateTime + externalId: String +} + +input UpdateStagedOrderItemShippingAddress { + address: AddressInput! +} + +type UpdateStagedOrderItemShippingAddressOutput implements StagedOrderUpdateActionOutput { + type: String! + address: AddressDraft! +} + +input UpdateStagedOrderSyncInfo { + channel: ResourceIdentifierInput! + syncedAt: DateTime + externalId: String +} + +type UpdateStagedOrderSyncInfoOutput implements StagedOrderUpdateActionOutput { + type: String! + channelResId: ChannelReferenceIdentifier! + syncedAt: DateTime + externalId: String +} + +type UserProvidedIdentifiers { + key: String + orderNumber: String + customerNumber: String + externalId: String + sku: String + slug( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + slugAllLocales: [LocalizedString!] +} + +type ValueFacetResult implements FacetResult { + count: Int! + productCount: Int + type: String! +} + +input ValueFilterInput { + path: String! + values: [String!]! +} + +"Versioned object have an ID and version and modification. Every update of this object changes it's version." +interface Versioned { + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +type WhitespaceSuggestTokenizer implements SuggestTokenizer { + type: String! +} + +input WhitespaceSuggestTokenizerInput { + dummy: String +} + +type WhitespaceSuggestTokenizerProductSearch implements SuggestTokenizerProductSearch { + type: String! +} + +"YearMonth is a scalar value that represents an ISO8601 formatted year and month." +scalar YearMonth + +"Zones allow defining ShippingRates for specific Locations." +type Zone implements Versioned & ReferenceExpandable { + name: String! + key: String + description: String + locations: [Location!]! + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +type ZoneLimitWithCurrent implements LimitWithCurrent { + limit: Long + current: Long! +} + +type ZoneLimitsProjection { + total: ZoneLimitWithCurrent! +} + +input ZoneLocation { + country: Country! + state: String +} + +type ZoneQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [Zone!]! +} + +type ZoneRate { + shippingRates: [ShippingRate!]! + zoneRef: Reference + zone: Zone +} + +input ZoneRateDraft { + zone: ResourceIdentifierInput! + shippingRates: [ShippingRateDraft!] = [] +} + +input ZoneUpdateAction { + addLocation: AddZoneLocation + changeName: ChangeZoneName + removeLocation: RemoveZoneLocation + setDescription: SetZoneDescription + setKey: SetZoneKey +} + +input addAttributeDefinition { + attributeDefinition: AttributeDefinitionDraft! +} + +input addLocalizedEnumValue { + attributeName: String! + value: LocalizedEnumValueDraft! +} + +input addPlainEnumValue { + attributeName: String! + value: PlainEnumValueDraft! +} + +input changeAttributeName { + attributeName: String! + newAttributeName: String! +} + +input changeAttributeOrder { + attributeDefinitions: [AttributeDefinitionDraft!]! +} + +input changeAttributeOrderByName { + attributeNames: [String!]! +} + +input changeDescription { + description: String! +} + +input changeEnumKey { + attributeName: String! + key: String! + newKey: String! +} + +input changeInputHint { + attributeName: String! + newValue: TextInputHint! +} + +input changeIsSearchable { + attributeName: String! + isSearchable: Boolean! +} + +input changeLabel { + attributeName: String! + label: [LocalizedStringItemInputType!]! +} + +input changeLocalizedEnumValueLabel { + attributeName: String! + newValue: LocalizedEnumValueDraft! +} + +input changeLocalizedEnumValueOrder { + attributeName: String! + values: [LocalizedEnumValueDraft!]! +} + +input changeName { + name: String! +} + +input changePlainEnumValueLabel { + attributeName: String! + newValue: PlainEnumValueDraft! +} + +input changePlainEnumValueOrder { + attributeName: String! + values: [PlainEnumValueDraft!]! +} + +input removeAttributeDefinition { + name: String! +} + +input removeEnumValues { + attributeName: String! + keys: [String!]! +} + +input setInputTip { + attributeName: String! + inputTip: [LocalizedStringItemInputType!] +} + +input setKey { + key: String +} diff --git a/src/gql/utils.ts b/src/gql/utils.ts new file mode 100644 index 00000000..bf56a4fb --- /dev/null +++ b/src/gql/utils.ts @@ -0,0 +1,6 @@ +import { LocalizedString } from "@commercetools/platform-sdk"; + +export const toAllLocales = (property?: LocalizedString) => + property + ? Object.entries(property).map(([locale, value]) => ({ locale, value })) + : undefined