@vendure/core 3.1.8 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +42 -42
- package/README.md +11 -11
- package/cli/populate.js +4 -5
- package/cli/populate.js.map +1 -1
- package/dist/api/api-internal-modules.js +4 -0
- package/dist/api/api-internal-modules.js.map +1 -1
- package/dist/api/api.module.js +3 -6
- package/dist/api/api.module.js.map +1 -1
- package/dist/api/common/extract-session-token.js +1 -2
- package/dist/api/common/extract-session-token.js.map +1 -1
- package/dist/api/common/get-api-type.js +1 -2
- package/dist/api/common/get-api-type.js.map +1 -1
- package/dist/api/common/is-field-resolver.js +1 -2
- package/dist/api/common/is-field-resolver.js.map +1 -1
- package/dist/api/common/parse-context.js +1 -2
- package/dist/api/common/parse-context.js.map +1 -1
- package/dist/api/common/request-context.js +3 -3
- package/dist/api/common/request-context.js.map +1 -1
- package/dist/api/common/set-session-token.js +1 -2
- package/dist/api/common/set-session-token.js.map +1 -1
- package/dist/api/common/user-has-permissions-on-custom-field.js +1 -2
- package/dist/api/common/user-has-permissions-on-custom-field.js.map +1 -1
- package/dist/api/common/validate-custom-field-value.js +1 -2
- package/dist/api/common/validate-custom-field-value.js.map +1 -1
- package/dist/api/config/configure-graphql-module.js +9 -51
- package/dist/api/config/configure-graphql-module.js.map +1 -1
- package/dist/api/config/generate-active-order-types.js +1 -2
- package/dist/api/config/generate-active-order-types.js.map +1 -1
- package/dist/api/config/generate-auth-types.js +1 -2
- package/dist/api/config/generate-auth-types.js.map +1 -1
- package/dist/api/config/generate-error-code-enum.js +5 -5
- package/dist/api/config/generate-error-code-enum.js.map +1 -1
- package/dist/api/config/generate-list-options.js +1 -2
- package/dist/api/config/generate-list-options.js.map +1 -1
- package/dist/api/config/generate-permissions.js +30 -31
- package/dist/api/config/generate-permissions.js.map +1 -1
- package/dist/api/config/generate-resolvers.d.ts +4 -4
- package/dist/api/config/generate-resolvers.js +1 -2
- package/dist/api/config/generate-resolvers.js.map +1 -1
- package/dist/api/config/get-custom-fields-config-without-interfaces.js +1 -2
- package/dist/api/config/get-custom-fields-config-without-interfaces.js.map +1 -1
- package/dist/api/config/get-final-vendure-schema.d.ts +47 -0
- package/dist/api/config/get-final-vendure-schema.js +71 -0
- package/dist/api/config/get-final-vendure-schema.js.map +1 -0
- package/dist/api/config/graphql-custom-fields.js +166 -167
- package/dist/api/config/graphql-custom-fields.js.map +1 -1
- package/dist/api/config/money-scalar.js +2 -2
- package/dist/api/config/money-scalar.js.map +1 -1
- package/dist/api/constants.d.ts +2 -0
- package/dist/api/constants.js +10 -0
- package/dist/api/constants.js.map +1 -0
- package/dist/api/decorators/transaction.decorator.d.ts +1 -1
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.js +2 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/resolvers/admin/product.resolver.d.ts +2 -1
- package/dist/api/resolvers/admin/product.resolver.js +14 -0
- package/dist/api/resolvers/admin/product.resolver.js.map +1 -1
- package/dist/api/resolvers/shop/shop-payment-methods.resolver.d.ts +8 -0
- package/dist/api/resolvers/shop/shop-payment-methods.resolver.js +40 -0
- package/dist/api/resolvers/shop/shop-payment-methods.resolver.js.map +1 -0
- package/dist/api/resolvers/shop/shop-shipping-methods.resolver.d.ts +8 -0
- package/dist/api/resolvers/shop/shop-shipping-methods.resolver.js +40 -0
- package/dist/api/resolvers/shop/shop-shipping-methods.resolver.js.map +1 -0
- package/dist/api/schema/admin-api/administrator.api.graphql +47 -47
- package/dist/api/schema/admin-api/administrator.type.graphql +14 -14
- package/dist/api/schema/admin-api/asset.api.graphql +68 -68
- package/dist/api/schema/admin-api/auth.api.graphql +22 -22
- package/dist/api/schema/admin-api/channel.api.graphql +69 -69
- package/dist/api/schema/admin-api/collection-admin.type.graphql +4 -4
- package/dist/api/schema/admin-api/collection.api.graphql +94 -94
- package/dist/api/schema/admin-api/country.api.graphql +41 -41
- package/dist/api/schema/admin-api/customer-admin.type.graphql +4 -4
- package/dist/api/schema/admin-api/customer-group.api.graphql +37 -37
- package/dist/api/schema/admin-api/customer.api.graphql +63 -63
- package/dist/api/schema/admin-api/duplicate-entity.api.graphql +40 -40
- package/dist/api/schema/admin-api/facet-admin.type.graphql +3 -3
- package/dist/api/schema/admin-api/facet.api.graphql +100 -100
- package/dist/api/schema/admin-api/global-settings.api.graphql +26 -26
- package/dist/api/schema/admin-api/global-settings.type.graphql +28 -28
- package/dist/api/schema/admin-api/history-entry-admin.type.graphql +4 -4
- package/dist/api/schema/admin-api/import.api.graphql +3 -3
- package/dist/api/schema/admin-api/import.type.graphql +5 -5
- package/dist/api/schema/admin-api/job.api.graphql +63 -63
- package/dist/api/schema/admin-api/order-admin.type.graphql +37 -37
- package/dist/api/schema/admin-api/order.api.graphql +463 -463
- package/dist/api/schema/admin-api/payment-method.api.graphql +65 -65
- package/dist/api/schema/admin-api/payment.api.graphql +2 -2
- package/dist/api/schema/admin-api/product-admin.type.graphql +21 -21
- package/dist/api/schema/admin-api/product-option-group.api.graphql +58 -58
- package/dist/api/schema/admin-api/product-search-admin.type.graphql +5 -5
- package/dist/api/schema/admin-api/product-search.api.graphql +10 -10
- package/dist/api/schema/admin-api/product.api.graphql +225 -222
- package/dist/api/schema/admin-api/promotion.api.graphql +70 -70
- package/dist/api/schema/admin-api/province.api.graphql +37 -37
- package/dist/api/schema/admin-api/role.api.graphql +33 -33
- package/dist/api/schema/admin-api/seller.api.graphql +31 -31
- package/dist/api/schema/admin-api/shipping-method.api.graphql +91 -91
- package/dist/api/schema/admin-api/stock-level.type.graphql +9 -9
- package/dist/api/schema/admin-api/stock-location.api.graphql +51 -51
- package/dist/api/schema/admin-api/stock-location.type.graphql +7 -7
- package/dist/api/schema/admin-api/stock-movement.type.graphql +80 -80
- package/dist/api/schema/admin-api/tag.api.graphql +25 -25
- package/dist/api/schema/admin-api/tax-category.api.graphql +36 -36
- package/dist/api/schema/admin-api/tax-rate.api.graphql +37 -37
- package/dist/api/schema/admin-api/zone.api.graphql +42 -42
- package/dist/api/schema/common/address.type.graphql +16 -16
- package/dist/api/schema/common/asset.type.graphql +31 -31
- package/dist/api/schema/common/auth.type.graphql +12 -12
- package/dist/api/schema/common/channel.type.graphql +24 -24
- package/dist/api/schema/common/collection.type.graphql +40 -40
- package/dist/api/schema/common/common-enums.graphql +35 -35
- package/dist/api/schema/common/common-error-results.graphql +107 -107
- package/dist/api/schema/common/common-types.graphql +285 -285
- package/dist/api/schema/common/currency-code.graphql +322 -322
- package/dist/api/schema/common/custom-field-types.graphql +265 -265
- package/dist/api/schema/common/customer-group.type.graphql +10 -10
- package/dist/api/schema/common/customer.type.graphql +18 -18
- package/dist/api/schema/common/facet-value.type.graphql +19 -19
- package/dist/api/schema/common/facet.type.graphql +35 -35
- package/dist/api/schema/common/history-entry.type.graphql +43 -43
- package/dist/api/schema/common/language-code.graphql +325 -325
- package/dist/api/schema/common/order.type.graphql +257 -257
- package/dist/api/schema/common/payment-method.type.graphql +21 -21
- package/dist/api/schema/common/product-option-group.type.graphql +38 -38
- package/dist/api/schema/common/product-search.type.graphql +69 -69
- package/dist/api/schema/common/product.type.graphql +70 -70
- package/dist/api/schema/common/promotion.type.graphql +31 -31
- package/dist/api/schema/common/region.type.graphql +65 -65
- package/dist/api/schema/common/role.type.graphql +14 -14
- package/dist/api/schema/common/seller.type.graphql +6 -6
- package/dist/api/schema/common/shipping-method.type.graphql +27 -27
- package/dist/api/schema/common/tag.type.graphql +11 -11
- package/dist/api/schema/common/tax-category.type.graphql +7 -7
- package/dist/api/schema/common/tax-rate.type.graphql +16 -16
- package/dist/api/schema/common/user.type.graphql +17 -17
- package/dist/api/schema/common/zone.type.graphql +8 -8
- package/dist/api/schema/shop-api/shop-error-results.graphql +114 -114
- package/dist/api/schema/shop-api/shop.api.graphql +287 -267
- package/dist/bootstrap.d.ts +4 -0
- package/dist/bootstrap.js +7 -7
- package/dist/bootstrap.js.map +1 -1
- package/dist/common/calculated-decorator.js +2 -2
- package/dist/common/calculated-decorator.js.map +1 -1
- package/dist/common/constants.js +2 -2
- package/dist/common/constants.js.map +1 -1
- package/dist/common/error/error-result.js +1 -2
- package/dist/common/error/error-result.js.map +1 -1
- package/dist/common/finite-state-machine/merge-transition-definitions.js +1 -2
- package/dist/common/finite-state-machine/merge-transition-definitions.js.map +1 -1
- package/dist/common/finite-state-machine/validate-transition-definition.js +1 -2
- package/dist/common/finite-state-machine/validate-transition-definition.js.map +1 -1
- package/dist/common/generate-public-id.js +1 -2
- package/dist/common/generate-public-id.js.map +1 -1
- package/dist/common/permission-definition.d.ts +1 -1
- package/dist/common/round-money.js +1 -2
- package/dist/common/round-money.js.map +1 -1
- package/dist/common/self-refreshing-cache.js +1 -2
- package/dist/common/self-refreshing-cache.js.map +1 -1
- package/dist/common/tax-utils.js +4 -5
- package/dist/common/tax-utils.js.map +1 -1
- package/dist/common/ttl-cache.js +4 -1
- package/dist/common/ttl-cache.js.map +1 -1
- package/dist/common/utils.js +10 -11
- package/dist/common/utils.js.map +1 -1
- package/dist/config/asset-import-strategy/asset-import-strategy.d.ts +0 -1
- package/dist/config/asset-import-strategy/default-asset-import-strategy.d.ts +0 -1
- package/dist/config/asset-preview-strategy/asset-preview-strategy.d.ts +0 -1
- package/dist/config/asset-preview-strategy/no-asset-preview-strategy.d.ts +0 -1
- package/dist/config/asset-storage-strategy/asset-storage-strategy.d.ts +0 -2
- package/dist/config/asset-storage-strategy/no-asset-storage-strategy.d.ts +0 -2
- package/dist/config/auth/default-verification-token-strategy.d.ts +27 -0
- package/dist/config/auth/default-verification-token-strategy.js +51 -0
- package/dist/config/auth/default-verification-token-strategy.js.map +1 -0
- package/dist/config/auth/native-authentication-strategy.js +5 -5
- package/dist/config/auth/verification-token-strategy.d.ts +32 -0
- package/dist/config/auth/verification-token-strategy.js +3 -0
- package/dist/config/auth/verification-token-strategy.js.map +1 -0
- package/dist/config/catalog/default-collection-filters.js +2 -2
- package/dist/config/catalog/default-collection-filters.js.map +1 -1
- package/dist/config/config-helpers.js +4 -5
- package/dist/config/config-helpers.js.map +1 -1
- package/dist/config/config.module.js +2 -1
- package/dist/config/config.module.js.map +1 -1
- package/dist/config/default-config.js +2 -0
- package/dist/config/default-config.js.map +1 -1
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.js +2 -0
- package/dist/config/index.js.map +1 -1
- package/dist/config/job-queue/inspectable-job-queue-strategy.js +1 -2
- package/dist/config/job-queue/inspectable-job-queue-strategy.js.map +1 -1
- package/dist/config/merge-config.js +1 -2
- package/dist/config/merge-config.js.map +1 -1
- package/dist/config/order/default-order-process.js +2 -2
- package/dist/config/order/default-order-process.js.map +1 -1
- package/dist/config/order/order-merge-strategy.js +1 -2
- package/dist/config/order/order-merge-strategy.js.map +1 -1
- package/dist/config/payment/payment-method-handler.d.ts +4 -4
- package/dist/config/session-cache/default-session-cache-strategy.d.ts +2 -2
- package/dist/config/session-cache/in-memory-session-cache-strategy.js +4 -1
- package/dist/config/session-cache/in-memory-session-cache-strategy.js.map +1 -1
- package/dist/config/system/in-memory-cache-strategy.js +4 -1
- package/dist/config/system/in-memory-cache-strategy.js.map +1 -1
- package/dist/config/vendure-config.d.ts +9 -0
- package/dist/connection/find-options-object-to-array.js +1 -2
- package/dist/connection/find-options-object-to-array.js.map +1 -1
- package/dist/data-import/providers/import-parser/import-parser.d.ts +0 -1
- package/dist/data-import/providers/importer/importer.d.ts +0 -1
- package/dist/entity/entity-id.decorator.js +4 -5
- package/dist/entity/entity-id.decorator.js.map +1 -1
- package/dist/entity/money.decorator.js +2 -3
- package/dist/entity/money.decorator.js.map +1 -1
- package/dist/entity/register-custom-entity-fields.js +1 -2
- package/dist/entity/register-custom-entity-fields.js.map +1 -1
- package/dist/entity/run-entity-metadata-modifiers.js +1 -2
- package/dist/entity/run-entity-metadata-modifiers.js.map +1 -1
- package/dist/entity/set-entity-id-strategy.js +1 -2
- package/dist/entity/set-entity-id-strategy.js.map +1 -1
- package/dist/entity/set-money-strategy.js +1 -2
- package/dist/entity/set-money-strategy.js.map +1 -1
- package/dist/entity/validate-custom-fields-config.js +1 -2
- package/dist/entity/validate-custom-fields-config.js.map +1 -1
- package/dist/i18n/i18n.service.js +17 -7
- package/dist/i18n/i18n.service.js.map +1 -1
- package/dist/i18n/messages/de.json +117 -117
- package/dist/i18n/messages/en.json +140 -140
- package/dist/i18n/messages/es.json +38 -38
- package/dist/i18n/messages/fr.json +138 -138
- package/dist/i18n/messages/pt_BR.json +99 -99
- package/dist/i18n/messages/pt_PT.json +118 -118
- package/dist/i18n/messages/ru.json +118 -118
- package/dist/i18n/messages/uk.json +118 -118
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/dist/migrate.js +18 -19
- package/dist/migrate.js.map +1 -1
- package/dist/plugin/default-cache-plugin/cache-item.entity.js +1 -1
- package/dist/plugin/default-cache-plugin/cache-item.entity.js.map +1 -1
- package/dist/plugin/default-search-plugin/api/api-extensions.js +8 -8
- package/dist/plugin/default-search-plugin/search-strategy/mysql-search-strategy.js +3 -3
- package/dist/plugin/default-search-plugin/search-strategy/postgres-search-strategy.js +5 -5
- package/dist/plugin/default-search-plugin/search-strategy/search-strategy-common.js +2 -2
- package/dist/plugin/default-search-plugin/search-strategy/search-strategy-common.js.map +1 -1
- package/dist/plugin/default-search-plugin/search-strategy/search-strategy-utils.js +5 -6
- package/dist/plugin/default-search-plugin/search-strategy/search-strategy-utils.js.map +1 -1
- package/dist/plugin/default-search-plugin/search-strategy/sqlite-search-strategy.js +4 -4
- package/dist/plugin/dynamic-plugin-api.module.d.ts +0 -5
- package/dist/plugin/dynamic-plugin-api.module.js +1 -16
- package/dist/plugin/dynamic-plugin-api.module.js.map +1 -1
- package/dist/plugin/index.d.ts +1 -0
- package/dist/plugin/index.js +1 -0
- package/dist/plugin/index.js.map +1 -1
- package/dist/plugin/plugin-metadata.d.ts +3 -1
- package/dist/plugin/plugin-metadata.js +15 -10
- package/dist/plugin/plugin-metadata.js.map +1 -1
- package/dist/plugin/plugin-utils.js +3 -4
- package/dist/plugin/plugin-utils.js.map +1 -1
- package/dist/plugin/vendure-plugin.d.ts +4 -0
- package/dist/plugin/vendure-plugin.js +1 -2
- package/dist/plugin/vendure-plugin.js.map +1 -1
- package/dist/process-context/process-context.js +2 -2
- package/dist/process-context/process-context.js.map +1 -1
- package/dist/service/helpers/entity-hydrator/merge-deep.js +1 -2
- package/dist/service/helpers/entity-hydrator/merge-deep.js.map +1 -1
- package/dist/service/helpers/list-query-builder/connection-utils.js +3 -4
- package/dist/service/helpers/list-query-builder/connection-utils.js.map +1 -1
- package/dist/service/helpers/list-query-builder/get-calculated-columns.js +1 -2
- package/dist/service/helpers/list-query-builder/get-calculated-columns.js.map +1 -1
- package/dist/service/helpers/list-query-builder/list-query-builder.js +2 -2
- package/dist/service/helpers/list-query-builder/list-query-builder.js.map +1 -1
- package/dist/service/helpers/list-query-builder/parse-filter-params.js +1 -2
- package/dist/service/helpers/list-query-builder/parse-filter-params.js.map +1 -1
- package/dist/service/helpers/list-query-builder/parse-sort-params.js +1 -2
- package/dist/service/helpers/list-query-builder/parse-sort-params.js.map +1 -1
- package/dist/service/helpers/order-calculator/order-calculator.js.map +1 -1
- package/dist/service/helpers/order-calculator/prorate.js +1 -2
- package/dist/service/helpers/order-calculator/prorate.js.map +1 -1
- package/dist/service/helpers/translatable-saver/translatable-saver.js.map +1 -1
- package/dist/service/helpers/utils/address-to-line.js +1 -2
- package/dist/service/helpers/utils/address-to-line.js.map +1 -1
- package/dist/service/helpers/utils/get-user-channels-permissions.js +2 -3
- package/dist/service/helpers/utils/get-user-channels-permissions.js.map +1 -1
- package/dist/service/helpers/utils/move-to-index.js +1 -2
- package/dist/service/helpers/utils/move-to-index.js.map +1 -1
- package/dist/service/helpers/utils/order-utils.js +8 -9
- package/dist/service/helpers/utils/order-utils.js.map +1 -1
- package/dist/service/helpers/utils/patch-entity.js +1 -2
- package/dist/service/helpers/utils/patch-entity.js.map +1 -1
- package/dist/service/helpers/utils/samples-each.js +1 -2
- package/dist/service/helpers/utils/samples-each.js.map +1 -1
- package/dist/service/helpers/utils/translate-entity.js +3 -4
- package/dist/service/helpers/utils/translate-entity.js.map +1 -1
- package/dist/service/helpers/utils/tree-relations-qb-joiner.js +1 -2
- package/dist/service/helpers/utils/tree-relations-qb-joiner.js.map +1 -1
- package/dist/service/helpers/verification-token-generator/verification-token-generator.d.ts +10 -6
- package/dist/service/helpers/verification-token-generator/verification-token-generator.js +11 -24
- package/dist/service/helpers/verification-token-generator/verification-token-generator.js.map +1 -1
- package/dist/service/services/asset.service.d.ts +0 -2
- package/dist/service/services/payment-method.service.d.ts +1 -0
- package/dist/service/services/payment-method.service.js +6 -0
- package/dist/service/services/payment-method.service.js.map +1 -1
- package/dist/service/services/product-variant.service.js +4 -2
- package/dist/service/services/product-variant.service.js.map +1 -1
- package/dist/service/services/user.service.js +13 -7
- package/dist/service/services/user.service.js.map +1 -1
- package/package.json +17 -18
- package/cli/cli-utils.d.ts +0 -1
- package/cli/cli-utils.js +0 -8
- package/cli/cli-utils.js.map +0 -1
- package/cli/vendure-cli.d.ts +0 -2
- package/cli/vendure-cli.js +0 -119
- package/cli/vendure-cli.js.map +0 -1
|
@@ -1,463 +1,463 @@
|
|
|
1
|
-
type Query {
|
|
2
|
-
order(id: ID!): Order
|
|
3
|
-
orders(options: OrderListOptions): OrderList!
|
|
4
|
-
"Returns a list of eligible shipping methods for the draft Order"
|
|
5
|
-
eligibleShippingMethodsForDraftOrder(orderId: ID!): [ShippingMethodQuote!]!
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
type Mutation {
|
|
9
|
-
settlePayment(id: ID!): SettlePaymentResult!
|
|
10
|
-
cancelPayment(id: ID!): CancelPaymentResult!
|
|
11
|
-
addFulfillmentToOrder(input: FulfillOrderInput!): AddFulfillmentToOrderResult!
|
|
12
|
-
cancelOrder(input: CancelOrderInput!): CancelOrderResult!
|
|
13
|
-
refundOrder(input: RefundOrderInput!): RefundOrderResult!
|
|
14
|
-
settleRefund(input: SettleRefundInput!): SettleRefundResult!
|
|
15
|
-
addNoteToOrder(input: AddNoteToOrderInput!): Order!
|
|
16
|
-
updateOrderNote(input: UpdateOrderNoteInput!): HistoryEntry!
|
|
17
|
-
deleteOrderNote(id: ID!): DeletionResponse!
|
|
18
|
-
transitionOrderToState(id: ID!, state: String!): TransitionOrderToStateResult
|
|
19
|
-
transitionFulfillmentToState(id: ID!, state: String!): TransitionFulfillmentToStateResult!
|
|
20
|
-
transitionPaymentToState(id: ID!, state: String!): TransitionPaymentToStateResult!
|
|
21
|
-
setOrderCustomFields(input: UpdateOrderInput!): Order
|
|
22
|
-
"""
|
|
23
|
-
Allows a different Customer to be assigned to an Order. Added in v2.2.0.
|
|
24
|
-
"""
|
|
25
|
-
setOrderCustomer(input: SetOrderCustomerInput!): Order
|
|
26
|
-
"""
|
|
27
|
-
Allows an Order to be modified after it has been completed by the Customer. The Order must first
|
|
28
|
-
be in the `Modifying` state.
|
|
29
|
-
"""
|
|
30
|
-
modifyOrder(input: ModifyOrderInput!): ModifyOrderResult!
|
|
31
|
-
"""
|
|
32
|
-
Used to manually create a new Payment against an Order.
|
|
33
|
-
This can be used by an Administrator when an Order is in the ArrangingPayment state.
|
|
34
|
-
|
|
35
|
-
It is also used when a completed Order
|
|
36
|
-
has been modified (using `modifyOrder`) and the price has increased. The extra payment
|
|
37
|
-
can then be manually arranged by the administrator, and the details used to create a new
|
|
38
|
-
Payment.
|
|
39
|
-
"""
|
|
40
|
-
addManualPaymentToOrder(input: ManualPaymentInput!): AddManualPaymentToOrderResult!
|
|
41
|
-
"Creates a draft Order"
|
|
42
|
-
createDraftOrder: Order!
|
|
43
|
-
"Deletes a draft Order"
|
|
44
|
-
deleteDraftOrder(orderId: ID!): DeletionResponse!
|
|
45
|
-
"Adds an item to the draft Order."
|
|
46
|
-
addItemToDraftOrder(orderId: ID!, input: AddItemToDraftOrderInput!): UpdateOrderItemsResult!
|
|
47
|
-
"Adjusts a draft OrderLine. If custom fields are defined on the OrderLine entity, a third argument 'customFields' of type `OrderLineCustomFieldsInput` will be available."
|
|
48
|
-
adjustDraftOrderLine(orderId: ID!, input: AdjustDraftOrderLineInput!): UpdateOrderItemsResult!
|
|
49
|
-
"Remove an OrderLine from the draft Order"
|
|
50
|
-
removeDraftOrderLine(orderId: ID!, orderLineId: ID!): RemoveOrderItemsResult!
|
|
51
|
-
setCustomerForDraftOrder(
|
|
52
|
-
orderId: ID!
|
|
53
|
-
customerId: ID
|
|
54
|
-
input: CreateCustomerInput
|
|
55
|
-
): SetCustomerForDraftOrderResult!
|
|
56
|
-
"Sets the shipping address for a draft Order"
|
|
57
|
-
setDraftOrderShippingAddress(orderId: ID!, input: CreateAddressInput!): Order!
|
|
58
|
-
"Sets the billing address for a draft Order"
|
|
59
|
-
setDraftOrderBillingAddress(orderId: ID!, input: CreateAddressInput!): Order!
|
|
60
|
-
"Unsets the shipping address for a draft Order"
|
|
61
|
-
unsetDraftOrderShippingAddress(orderId: ID!): Order!
|
|
62
|
-
"Unsets the billing address for a draft Order"
|
|
63
|
-
unsetDraftOrderBillingAddress(orderId: ID!): Order!
|
|
64
|
-
"Allows any custom fields to be set for the active order"
|
|
65
|
-
setDraftOrderCustomFields(orderId: ID!, input: UpdateOrderInput!): Order!
|
|
66
|
-
"Applies the given coupon code to the draft Order"
|
|
67
|
-
applyCouponCodeToDraftOrder(orderId: ID!, couponCode: String!): ApplyCouponCodeResult!
|
|
68
|
-
"Removes the given coupon code from the draft Order"
|
|
69
|
-
removeCouponCodeFromDraftOrder(orderId: ID!, couponCode: String!): Order
|
|
70
|
-
"Sets the shipping method by id, which can be obtained with the `eligibleShippingMethodsForDraftOrder` query"
|
|
71
|
-
setDraftOrderShippingMethod(orderId: ID!, shippingMethodId: ID!): SetOrderShippingMethodResult!
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
type Order {
|
|
75
|
-
nextStates: [String!]!
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
input OrderFilterParameter {
|
|
79
|
-
customerLastName: StringOperators
|
|
80
|
-
transactionId: StringOperators
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
input OrderSortParameter {
|
|
84
|
-
customerLastName: SortOrder
|
|
85
|
-
transactionId: SortOrder
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
# generated by generateListOptions function
|
|
89
|
-
input OrderListOptions
|
|
90
|
-
|
|
91
|
-
input SetOrderCustomerInput {
|
|
92
|
-
orderId: ID!
|
|
93
|
-
customerId: ID!
|
|
94
|
-
note: String
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
# Populated with any custom fields at run-time
|
|
98
|
-
input UpdateOrderInput {
|
|
99
|
-
id: ID!
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
input FulfillOrderInput {
|
|
103
|
-
lines: [OrderLineInput!]!
|
|
104
|
-
handler: ConfigurableOperationInput!
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
input CancelOrderInput {
|
|
108
|
-
"The id of the order to be cancelled"
|
|
109
|
-
orderId: ID!
|
|
110
|
-
"Optionally specify which OrderLines to cancel. If not provided, all OrderLines will be cancelled"
|
|
111
|
-
lines: [OrderLineInput!]
|
|
112
|
-
"Specify whether the shipping charges should also be cancelled. Defaults to false"
|
|
113
|
-
cancelShipping: Boolean
|
|
114
|
-
reason: String
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
input RefundOrderInput {
|
|
118
|
-
lines: [OrderLineInput!] @deprecated(reason: "Use the `amount` field instead")
|
|
119
|
-
shipping: Money @deprecated(reason: "Use the `amount` field instead")
|
|
120
|
-
adjustment: Money @deprecated(reason: "Use the `amount` field instead")
|
|
121
|
-
"""
|
|
122
|
-
The amount to be refunded to this particular payment. This was introduced in v2.2.0 as the preferred way to specify the refund amount.
|
|
123
|
-
Can be as much as the total amount of the payment minus the sum of all previous refunds.
|
|
124
|
-
"""
|
|
125
|
-
amount: Money
|
|
126
|
-
paymentId: ID!
|
|
127
|
-
reason: String
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
input OrderLineInput {
|
|
131
|
-
orderLineId: ID!
|
|
132
|
-
quantity: Int!
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
input SettleRefundInput {
|
|
136
|
-
id: ID!
|
|
137
|
-
transactionId: String!
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
input AddNoteToOrderInput {
|
|
141
|
-
id: ID!
|
|
142
|
-
note: String!
|
|
143
|
-
isPublic: Boolean!
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
input UpdateOrderNoteInput {
|
|
147
|
-
noteId: ID!
|
|
148
|
-
note: String
|
|
149
|
-
isPublic: Boolean
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
input AdministratorPaymentInput {
|
|
153
|
-
paymentMethod: String
|
|
154
|
-
metadata: JSON
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
input AdministratorRefundInput {
|
|
158
|
-
paymentId: ID!
|
|
159
|
-
reason: String
|
|
160
|
-
"""
|
|
161
|
-
The amount to be refunded to this particular Payment. This was introduced in
|
|
162
|
-
v2.2.0 as the preferred way to specify the refund amount. The `lines`, `shipping` and `adjustment`
|
|
163
|
-
fields will be removed in a future version.
|
|
164
|
-
"""
|
|
165
|
-
amount: Money
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
input ModifyOrderOptions {
|
|
169
|
-
freezePromotions: Boolean
|
|
170
|
-
recalculateShipping: Boolean
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
input UpdateOrderAddressInput {
|
|
174
|
-
fullName: String
|
|
175
|
-
company: String
|
|
176
|
-
streetLine1: String
|
|
177
|
-
streetLine2: String
|
|
178
|
-
city: String
|
|
179
|
-
province: String
|
|
180
|
-
postalCode: String
|
|
181
|
-
countryCode: String
|
|
182
|
-
phoneNumber: String
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
input ModifyOrderInput {
|
|
186
|
-
dryRun: Boolean!
|
|
187
|
-
orderId: ID!
|
|
188
|
-
addItems: [AddItemInput!]
|
|
189
|
-
adjustOrderLines: [OrderLineInput!]
|
|
190
|
-
surcharges: [SurchargeInput!]
|
|
191
|
-
updateShippingAddress: UpdateOrderAddressInput
|
|
192
|
-
updateBillingAddress: UpdateOrderAddressInput
|
|
193
|
-
note: String
|
|
194
|
-
"""
|
|
195
|
-
Deprecated in v2.2.0. Use `refunds` instead to allow multiple refunds to be
|
|
196
|
-
applied in the case that multiple payment methods have been used on the order.
|
|
197
|
-
"""
|
|
198
|
-
refund: AdministratorRefundInput
|
|
199
|
-
refunds: [AdministratorRefundInput!]
|
|
200
|
-
options: ModifyOrderOptions
|
|
201
|
-
couponCodes: [String!]
|
|
202
|
-
"""
|
|
203
|
-
Added in v2.2
|
|
204
|
-
"""
|
|
205
|
-
shippingMethodIds: [ID!]
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
input AddItemInput {
|
|
209
|
-
productVariantId: ID!
|
|
210
|
-
quantity: Int!
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
input OrderLineInput {
|
|
214
|
-
orderLineId: ID!
|
|
215
|
-
quantity: Int!
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
input SurchargeInput {
|
|
219
|
-
description: String!
|
|
220
|
-
sku: String
|
|
221
|
-
price: Money!
|
|
222
|
-
priceIncludesTax: Boolean!
|
|
223
|
-
taxRate: Float
|
|
224
|
-
taxDescription: String
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
input ManualPaymentInput {
|
|
228
|
-
orderId: ID!
|
|
229
|
-
method: String!
|
|
230
|
-
transactionId: String
|
|
231
|
-
metadata: JSON
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
input AddItemToDraftOrderInput {
|
|
235
|
-
productVariantId: ID!
|
|
236
|
-
quantity: Int!
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
input AdjustDraftOrderLineInput {
|
|
240
|
-
orderLineId: ID!
|
|
241
|
-
quantity: Int!
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
"Returned if the Payment settlement fails"
|
|
245
|
-
type SettlePaymentError implements ErrorResult {
|
|
246
|
-
errorCode: ErrorCode!
|
|
247
|
-
message: String!
|
|
248
|
-
paymentErrorMessage: String!
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
"Returned if the Payment cancellation fails"
|
|
252
|
-
type CancelPaymentError implements ErrorResult {
|
|
253
|
-
errorCode: ErrorCode!
|
|
254
|
-
message: String!
|
|
255
|
-
paymentErrorMessage: String!
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
"Returned if no OrderLines have been specified for the operation"
|
|
259
|
-
type EmptyOrderLineSelectionError implements ErrorResult {
|
|
260
|
-
errorCode: ErrorCode!
|
|
261
|
-
message: String!
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
"Returned if the specified items are already part of a Fulfillment"
|
|
265
|
-
type ItemsAlreadyFulfilledError implements ErrorResult {
|
|
266
|
-
errorCode: ErrorCode!
|
|
267
|
-
message: String!
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
"Returned if the specified FulfillmentHandler code is not valid"
|
|
271
|
-
type InvalidFulfillmentHandlerError implements ErrorResult {
|
|
272
|
-
errorCode: ErrorCode!
|
|
273
|
-
message: String!
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
"Returned if an error is thrown in a FulfillmentHandler's createFulfillment method"
|
|
277
|
-
type CreateFulfillmentError implements ErrorResult {
|
|
278
|
-
errorCode: ErrorCode!
|
|
279
|
-
message: String!
|
|
280
|
-
fulfillmentHandlerError: String!
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
"""
|
|
284
|
-
Returned if attempting to create a Fulfillment when there is insufficient
|
|
285
|
-
stockOnHand of a ProductVariant to satisfy the requested quantity.
|
|
286
|
-
"""
|
|
287
|
-
type InsufficientStockOnHandError implements ErrorResult {
|
|
288
|
-
errorCode: ErrorCode!
|
|
289
|
-
message: String!
|
|
290
|
-
productVariantId: ID!
|
|
291
|
-
productVariantName: String!
|
|
292
|
-
stockOnHand: Int!
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
"Returned if an operation has specified OrderLines from multiple Orders"
|
|
296
|
-
type MultipleOrderError implements ErrorResult {
|
|
297
|
-
errorCode: ErrorCode!
|
|
298
|
-
message: String!
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
"Returned if an attempting to cancel lines from an Order which is still active"
|
|
302
|
-
type CancelActiveOrderError implements ErrorResult {
|
|
303
|
-
errorCode: ErrorCode!
|
|
304
|
-
message: String!
|
|
305
|
-
orderState: String!
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
"Returned if an attempting to refund a Payment against OrderLines from a different Order"
|
|
309
|
-
type PaymentOrderMismatchError implements ErrorResult {
|
|
310
|
-
errorCode: ErrorCode!
|
|
311
|
-
message: String!
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
"Returned if an attempting to refund an Order which is not in the expected state"
|
|
315
|
-
type RefundOrderStateError implements ErrorResult {
|
|
316
|
-
errorCode: ErrorCode!
|
|
317
|
-
message: String!
|
|
318
|
-
orderState: String!
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
"Returned if an attempting to refund an Order but neither items nor shipping refund was specified"
|
|
322
|
-
type NothingToRefundError implements ErrorResult {
|
|
323
|
-
errorCode: ErrorCode!
|
|
324
|
-
message: String!
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
"Returned if an attempting to refund an OrderItem which has already been refunded"
|
|
328
|
-
type AlreadyRefundedError implements ErrorResult {
|
|
329
|
-
errorCode: ErrorCode!
|
|
330
|
-
message: String!
|
|
331
|
-
refundId: ID!
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
"Returned if the specified quantity of an OrderLine is greater than the number of items in that line"
|
|
335
|
-
type QuantityTooGreatError implements ErrorResult {
|
|
336
|
-
errorCode: ErrorCode!
|
|
337
|
-
message: String!
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
"Returned if `amount` is greater than the maximum un-refunded amount of the Payment"
|
|
341
|
-
type RefundAmountError implements ErrorResult {
|
|
342
|
-
errorCode: ErrorCode!
|
|
343
|
-
message: String!
|
|
344
|
-
maximumRefundable: Int!
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
"Returned when there is an error in transitioning the Refund state"
|
|
348
|
-
type RefundStateTransitionError implements ErrorResult {
|
|
349
|
-
errorCode: ErrorCode!
|
|
350
|
-
message: String!
|
|
351
|
-
transitionError: String!
|
|
352
|
-
fromState: String!
|
|
353
|
-
toState: String!
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
"Returned when there is an error in transitioning the Payment state"
|
|
357
|
-
type PaymentStateTransitionError implements ErrorResult {
|
|
358
|
-
errorCode: ErrorCode!
|
|
359
|
-
message: String!
|
|
360
|
-
transitionError: String!
|
|
361
|
-
fromState: String!
|
|
362
|
-
toState: String!
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
"Returned when there is an error in transitioning the Fulfillment state"
|
|
366
|
-
type FulfillmentStateTransitionError implements ErrorResult {
|
|
367
|
-
errorCode: ErrorCode!
|
|
368
|
-
message: String!
|
|
369
|
-
transitionError: String!
|
|
370
|
-
fromState: String!
|
|
371
|
-
toState: String!
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
"Returned when attempting to modify the contents of an Order that is not in the `Modifying` state."
|
|
375
|
-
type OrderModificationStateError implements ErrorResult {
|
|
376
|
-
errorCode: ErrorCode!
|
|
377
|
-
message: String!
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
"Returned when a call to modifyOrder fails to specify any changes"
|
|
381
|
-
type NoChangesSpecifiedError implements ErrorResult {
|
|
382
|
-
errorCode: ErrorCode!
|
|
383
|
-
message: String!
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
"""
|
|
387
|
-
Returned when a call to modifyOrder fails to include a paymentMethod even
|
|
388
|
-
though the price has increased as a result of the changes.
|
|
389
|
-
"""
|
|
390
|
-
type PaymentMethodMissingError implements ErrorResult {
|
|
391
|
-
errorCode: ErrorCode!
|
|
392
|
-
message: String!
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
"""
|
|
396
|
-
Returned when a call to modifyOrder fails to include a refundPaymentId even
|
|
397
|
-
though the price has decreased as a result of the changes.
|
|
398
|
-
"""
|
|
399
|
-
type RefundPaymentIdMissingError implements ErrorResult {
|
|
400
|
-
errorCode: ErrorCode!
|
|
401
|
-
message: String!
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
"""
|
|
405
|
-
Returned when a call to addManualPaymentToOrder is made but the Order
|
|
406
|
-
is not in the required state.
|
|
407
|
-
"""
|
|
408
|
-
type ManualPaymentStateError implements ErrorResult {
|
|
409
|
-
errorCode: ErrorCode!
|
|
410
|
-
message: String!
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
union TransitionOrderToStateResult = Order | OrderStateTransitionError
|
|
414
|
-
union SettlePaymentResult =
|
|
415
|
-
| Payment
|
|
416
|
-
| SettlePaymentError
|
|
417
|
-
| PaymentStateTransitionError
|
|
418
|
-
| OrderStateTransitionError
|
|
419
|
-
union CancelPaymentResult = Payment | CancelPaymentError | PaymentStateTransitionError
|
|
420
|
-
union AddFulfillmentToOrderResult =
|
|
421
|
-
| Fulfillment
|
|
422
|
-
| EmptyOrderLineSelectionError
|
|
423
|
-
| ItemsAlreadyFulfilledError
|
|
424
|
-
| InsufficientStockOnHandError
|
|
425
|
-
| InvalidFulfillmentHandlerError
|
|
426
|
-
| FulfillmentStateTransitionError
|
|
427
|
-
| CreateFulfillmentError
|
|
428
|
-
union CancelOrderResult =
|
|
429
|
-
| Order
|
|
430
|
-
| EmptyOrderLineSelectionError
|
|
431
|
-
| QuantityTooGreatError
|
|
432
|
-
| MultipleOrderError
|
|
433
|
-
| CancelActiveOrderError
|
|
434
|
-
| OrderStateTransitionError
|
|
435
|
-
union RefundOrderResult =
|
|
436
|
-
| Refund
|
|
437
|
-
| QuantityTooGreatError
|
|
438
|
-
| NothingToRefundError
|
|
439
|
-
| OrderStateTransitionError
|
|
440
|
-
| MultipleOrderError
|
|
441
|
-
| PaymentOrderMismatchError
|
|
442
|
-
| RefundOrderStateError
|
|
443
|
-
| AlreadyRefundedError
|
|
444
|
-
| RefundStateTransitionError
|
|
445
|
-
| RefundAmountError
|
|
446
|
-
union SettleRefundResult = Refund | RefundStateTransitionError
|
|
447
|
-
union TransitionFulfillmentToStateResult = Fulfillment | FulfillmentStateTransitionError
|
|
448
|
-
union TransitionPaymentToStateResult = Payment | PaymentStateTransitionError
|
|
449
|
-
union ModifyOrderResult =
|
|
450
|
-
| Order
|
|
451
|
-
| NoChangesSpecifiedError
|
|
452
|
-
| OrderModificationStateError
|
|
453
|
-
| PaymentMethodMissingError
|
|
454
|
-
| RefundPaymentIdMissingError
|
|
455
|
-
| OrderLimitError
|
|
456
|
-
| NegativeQuantityError
|
|
457
|
-
| InsufficientStockError
|
|
458
|
-
| CouponCodeExpiredError
|
|
459
|
-
| CouponCodeInvalidError
|
|
460
|
-
| CouponCodeLimitError
|
|
461
|
-
| IneligibleShippingMethodError
|
|
462
|
-
union AddManualPaymentToOrderResult = Order | ManualPaymentStateError
|
|
463
|
-
union SetCustomerForDraftOrderResult = Order | EmailAddressConflictError
|
|
1
|
+
type Query {
|
|
2
|
+
order(id: ID!): Order
|
|
3
|
+
orders(options: OrderListOptions): OrderList!
|
|
4
|
+
"Returns a list of eligible shipping methods for the draft Order"
|
|
5
|
+
eligibleShippingMethodsForDraftOrder(orderId: ID!): [ShippingMethodQuote!]!
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
type Mutation {
|
|
9
|
+
settlePayment(id: ID!): SettlePaymentResult!
|
|
10
|
+
cancelPayment(id: ID!): CancelPaymentResult!
|
|
11
|
+
addFulfillmentToOrder(input: FulfillOrderInput!): AddFulfillmentToOrderResult!
|
|
12
|
+
cancelOrder(input: CancelOrderInput!): CancelOrderResult!
|
|
13
|
+
refundOrder(input: RefundOrderInput!): RefundOrderResult!
|
|
14
|
+
settleRefund(input: SettleRefundInput!): SettleRefundResult!
|
|
15
|
+
addNoteToOrder(input: AddNoteToOrderInput!): Order!
|
|
16
|
+
updateOrderNote(input: UpdateOrderNoteInput!): HistoryEntry!
|
|
17
|
+
deleteOrderNote(id: ID!): DeletionResponse!
|
|
18
|
+
transitionOrderToState(id: ID!, state: String!): TransitionOrderToStateResult
|
|
19
|
+
transitionFulfillmentToState(id: ID!, state: String!): TransitionFulfillmentToStateResult!
|
|
20
|
+
transitionPaymentToState(id: ID!, state: String!): TransitionPaymentToStateResult!
|
|
21
|
+
setOrderCustomFields(input: UpdateOrderInput!): Order
|
|
22
|
+
"""
|
|
23
|
+
Allows a different Customer to be assigned to an Order. Added in v2.2.0.
|
|
24
|
+
"""
|
|
25
|
+
setOrderCustomer(input: SetOrderCustomerInput!): Order
|
|
26
|
+
"""
|
|
27
|
+
Allows an Order to be modified after it has been completed by the Customer. The Order must first
|
|
28
|
+
be in the `Modifying` state.
|
|
29
|
+
"""
|
|
30
|
+
modifyOrder(input: ModifyOrderInput!): ModifyOrderResult!
|
|
31
|
+
"""
|
|
32
|
+
Used to manually create a new Payment against an Order.
|
|
33
|
+
This can be used by an Administrator when an Order is in the ArrangingPayment state.
|
|
34
|
+
|
|
35
|
+
It is also used when a completed Order
|
|
36
|
+
has been modified (using `modifyOrder`) and the price has increased. The extra payment
|
|
37
|
+
can then be manually arranged by the administrator, and the details used to create a new
|
|
38
|
+
Payment.
|
|
39
|
+
"""
|
|
40
|
+
addManualPaymentToOrder(input: ManualPaymentInput!): AddManualPaymentToOrderResult!
|
|
41
|
+
"Creates a draft Order"
|
|
42
|
+
createDraftOrder: Order!
|
|
43
|
+
"Deletes a draft Order"
|
|
44
|
+
deleteDraftOrder(orderId: ID!): DeletionResponse!
|
|
45
|
+
"Adds an item to the draft Order."
|
|
46
|
+
addItemToDraftOrder(orderId: ID!, input: AddItemToDraftOrderInput!): UpdateOrderItemsResult!
|
|
47
|
+
"Adjusts a draft OrderLine. If custom fields are defined on the OrderLine entity, a third argument 'customFields' of type `OrderLineCustomFieldsInput` will be available."
|
|
48
|
+
adjustDraftOrderLine(orderId: ID!, input: AdjustDraftOrderLineInput!): UpdateOrderItemsResult!
|
|
49
|
+
"Remove an OrderLine from the draft Order"
|
|
50
|
+
removeDraftOrderLine(orderId: ID!, orderLineId: ID!): RemoveOrderItemsResult!
|
|
51
|
+
setCustomerForDraftOrder(
|
|
52
|
+
orderId: ID!
|
|
53
|
+
customerId: ID
|
|
54
|
+
input: CreateCustomerInput
|
|
55
|
+
): SetCustomerForDraftOrderResult!
|
|
56
|
+
"Sets the shipping address for a draft Order"
|
|
57
|
+
setDraftOrderShippingAddress(orderId: ID!, input: CreateAddressInput!): Order!
|
|
58
|
+
"Sets the billing address for a draft Order"
|
|
59
|
+
setDraftOrderBillingAddress(orderId: ID!, input: CreateAddressInput!): Order!
|
|
60
|
+
"Unsets the shipping address for a draft Order"
|
|
61
|
+
unsetDraftOrderShippingAddress(orderId: ID!): Order!
|
|
62
|
+
"Unsets the billing address for a draft Order"
|
|
63
|
+
unsetDraftOrderBillingAddress(orderId: ID!): Order!
|
|
64
|
+
"Allows any custom fields to be set for the active order"
|
|
65
|
+
setDraftOrderCustomFields(orderId: ID!, input: UpdateOrderInput!): Order!
|
|
66
|
+
"Applies the given coupon code to the draft Order"
|
|
67
|
+
applyCouponCodeToDraftOrder(orderId: ID!, couponCode: String!): ApplyCouponCodeResult!
|
|
68
|
+
"Removes the given coupon code from the draft Order"
|
|
69
|
+
removeCouponCodeFromDraftOrder(orderId: ID!, couponCode: String!): Order
|
|
70
|
+
"Sets the shipping method by id, which can be obtained with the `eligibleShippingMethodsForDraftOrder` query"
|
|
71
|
+
setDraftOrderShippingMethod(orderId: ID!, shippingMethodId: ID!): SetOrderShippingMethodResult!
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
type Order {
|
|
75
|
+
nextStates: [String!]!
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
input OrderFilterParameter {
|
|
79
|
+
customerLastName: StringOperators
|
|
80
|
+
transactionId: StringOperators
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
input OrderSortParameter {
|
|
84
|
+
customerLastName: SortOrder
|
|
85
|
+
transactionId: SortOrder
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
# generated by generateListOptions function
|
|
89
|
+
input OrderListOptions
|
|
90
|
+
|
|
91
|
+
input SetOrderCustomerInput {
|
|
92
|
+
orderId: ID!
|
|
93
|
+
customerId: ID!
|
|
94
|
+
note: String
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
# Populated with any custom fields at run-time
|
|
98
|
+
input UpdateOrderInput {
|
|
99
|
+
id: ID!
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
input FulfillOrderInput {
|
|
103
|
+
lines: [OrderLineInput!]!
|
|
104
|
+
handler: ConfigurableOperationInput!
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
input CancelOrderInput {
|
|
108
|
+
"The id of the order to be cancelled"
|
|
109
|
+
orderId: ID!
|
|
110
|
+
"Optionally specify which OrderLines to cancel. If not provided, all OrderLines will be cancelled"
|
|
111
|
+
lines: [OrderLineInput!]
|
|
112
|
+
"Specify whether the shipping charges should also be cancelled. Defaults to false"
|
|
113
|
+
cancelShipping: Boolean
|
|
114
|
+
reason: String
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
input RefundOrderInput {
|
|
118
|
+
lines: [OrderLineInput!] @deprecated(reason: "Use the `amount` field instead")
|
|
119
|
+
shipping: Money @deprecated(reason: "Use the `amount` field instead")
|
|
120
|
+
adjustment: Money @deprecated(reason: "Use the `amount` field instead")
|
|
121
|
+
"""
|
|
122
|
+
The amount to be refunded to this particular payment. This was introduced in v2.2.0 as the preferred way to specify the refund amount.
|
|
123
|
+
Can be as much as the total amount of the payment minus the sum of all previous refunds.
|
|
124
|
+
"""
|
|
125
|
+
amount: Money
|
|
126
|
+
paymentId: ID!
|
|
127
|
+
reason: String
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
input OrderLineInput {
|
|
131
|
+
orderLineId: ID!
|
|
132
|
+
quantity: Int!
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
input SettleRefundInput {
|
|
136
|
+
id: ID!
|
|
137
|
+
transactionId: String!
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
input AddNoteToOrderInput {
|
|
141
|
+
id: ID!
|
|
142
|
+
note: String!
|
|
143
|
+
isPublic: Boolean!
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
input UpdateOrderNoteInput {
|
|
147
|
+
noteId: ID!
|
|
148
|
+
note: String
|
|
149
|
+
isPublic: Boolean
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
input AdministratorPaymentInput {
|
|
153
|
+
paymentMethod: String
|
|
154
|
+
metadata: JSON
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
input AdministratorRefundInput {
|
|
158
|
+
paymentId: ID!
|
|
159
|
+
reason: String
|
|
160
|
+
"""
|
|
161
|
+
The amount to be refunded to this particular Payment. This was introduced in
|
|
162
|
+
v2.2.0 as the preferred way to specify the refund amount. The `lines`, `shipping` and `adjustment`
|
|
163
|
+
fields will be removed in a future version.
|
|
164
|
+
"""
|
|
165
|
+
amount: Money
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
input ModifyOrderOptions {
|
|
169
|
+
freezePromotions: Boolean
|
|
170
|
+
recalculateShipping: Boolean
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
input UpdateOrderAddressInput {
|
|
174
|
+
fullName: String
|
|
175
|
+
company: String
|
|
176
|
+
streetLine1: String
|
|
177
|
+
streetLine2: String
|
|
178
|
+
city: String
|
|
179
|
+
province: String
|
|
180
|
+
postalCode: String
|
|
181
|
+
countryCode: String
|
|
182
|
+
phoneNumber: String
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
input ModifyOrderInput {
|
|
186
|
+
dryRun: Boolean!
|
|
187
|
+
orderId: ID!
|
|
188
|
+
addItems: [AddItemInput!]
|
|
189
|
+
adjustOrderLines: [OrderLineInput!]
|
|
190
|
+
surcharges: [SurchargeInput!]
|
|
191
|
+
updateShippingAddress: UpdateOrderAddressInput
|
|
192
|
+
updateBillingAddress: UpdateOrderAddressInput
|
|
193
|
+
note: String
|
|
194
|
+
"""
|
|
195
|
+
Deprecated in v2.2.0. Use `refunds` instead to allow multiple refunds to be
|
|
196
|
+
applied in the case that multiple payment methods have been used on the order.
|
|
197
|
+
"""
|
|
198
|
+
refund: AdministratorRefundInput
|
|
199
|
+
refunds: [AdministratorRefundInput!]
|
|
200
|
+
options: ModifyOrderOptions
|
|
201
|
+
couponCodes: [String!]
|
|
202
|
+
"""
|
|
203
|
+
Added in v2.2
|
|
204
|
+
"""
|
|
205
|
+
shippingMethodIds: [ID!]
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
input AddItemInput {
|
|
209
|
+
productVariantId: ID!
|
|
210
|
+
quantity: Int!
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
input OrderLineInput {
|
|
214
|
+
orderLineId: ID!
|
|
215
|
+
quantity: Int!
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
input SurchargeInput {
|
|
219
|
+
description: String!
|
|
220
|
+
sku: String
|
|
221
|
+
price: Money!
|
|
222
|
+
priceIncludesTax: Boolean!
|
|
223
|
+
taxRate: Float
|
|
224
|
+
taxDescription: String
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
input ManualPaymentInput {
|
|
228
|
+
orderId: ID!
|
|
229
|
+
method: String!
|
|
230
|
+
transactionId: String
|
|
231
|
+
metadata: JSON
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
input AddItemToDraftOrderInput {
|
|
235
|
+
productVariantId: ID!
|
|
236
|
+
quantity: Int!
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
input AdjustDraftOrderLineInput {
|
|
240
|
+
orderLineId: ID!
|
|
241
|
+
quantity: Int!
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
"Returned if the Payment settlement fails"
|
|
245
|
+
type SettlePaymentError implements ErrorResult {
|
|
246
|
+
errorCode: ErrorCode!
|
|
247
|
+
message: String!
|
|
248
|
+
paymentErrorMessage: String!
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
"Returned if the Payment cancellation fails"
|
|
252
|
+
type CancelPaymentError implements ErrorResult {
|
|
253
|
+
errorCode: ErrorCode!
|
|
254
|
+
message: String!
|
|
255
|
+
paymentErrorMessage: String!
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
"Returned if no OrderLines have been specified for the operation"
|
|
259
|
+
type EmptyOrderLineSelectionError implements ErrorResult {
|
|
260
|
+
errorCode: ErrorCode!
|
|
261
|
+
message: String!
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
"Returned if the specified items are already part of a Fulfillment"
|
|
265
|
+
type ItemsAlreadyFulfilledError implements ErrorResult {
|
|
266
|
+
errorCode: ErrorCode!
|
|
267
|
+
message: String!
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
"Returned if the specified FulfillmentHandler code is not valid"
|
|
271
|
+
type InvalidFulfillmentHandlerError implements ErrorResult {
|
|
272
|
+
errorCode: ErrorCode!
|
|
273
|
+
message: String!
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
"Returned if an error is thrown in a FulfillmentHandler's createFulfillment method"
|
|
277
|
+
type CreateFulfillmentError implements ErrorResult {
|
|
278
|
+
errorCode: ErrorCode!
|
|
279
|
+
message: String!
|
|
280
|
+
fulfillmentHandlerError: String!
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
"""
|
|
284
|
+
Returned if attempting to create a Fulfillment when there is insufficient
|
|
285
|
+
stockOnHand of a ProductVariant to satisfy the requested quantity.
|
|
286
|
+
"""
|
|
287
|
+
type InsufficientStockOnHandError implements ErrorResult {
|
|
288
|
+
errorCode: ErrorCode!
|
|
289
|
+
message: String!
|
|
290
|
+
productVariantId: ID!
|
|
291
|
+
productVariantName: String!
|
|
292
|
+
stockOnHand: Int!
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
"Returned if an operation has specified OrderLines from multiple Orders"
|
|
296
|
+
type MultipleOrderError implements ErrorResult {
|
|
297
|
+
errorCode: ErrorCode!
|
|
298
|
+
message: String!
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
"Returned if an attempting to cancel lines from an Order which is still active"
|
|
302
|
+
type CancelActiveOrderError implements ErrorResult {
|
|
303
|
+
errorCode: ErrorCode!
|
|
304
|
+
message: String!
|
|
305
|
+
orderState: String!
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
"Returned if an attempting to refund a Payment against OrderLines from a different Order"
|
|
309
|
+
type PaymentOrderMismatchError implements ErrorResult {
|
|
310
|
+
errorCode: ErrorCode!
|
|
311
|
+
message: String!
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
"Returned if an attempting to refund an Order which is not in the expected state"
|
|
315
|
+
type RefundOrderStateError implements ErrorResult {
|
|
316
|
+
errorCode: ErrorCode!
|
|
317
|
+
message: String!
|
|
318
|
+
orderState: String!
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
"Returned if an attempting to refund an Order but neither items nor shipping refund was specified"
|
|
322
|
+
type NothingToRefundError implements ErrorResult {
|
|
323
|
+
errorCode: ErrorCode!
|
|
324
|
+
message: String!
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
"Returned if an attempting to refund an OrderItem which has already been refunded"
|
|
328
|
+
type AlreadyRefundedError implements ErrorResult {
|
|
329
|
+
errorCode: ErrorCode!
|
|
330
|
+
message: String!
|
|
331
|
+
refundId: ID!
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
"Returned if the specified quantity of an OrderLine is greater than the number of items in that line"
|
|
335
|
+
type QuantityTooGreatError implements ErrorResult {
|
|
336
|
+
errorCode: ErrorCode!
|
|
337
|
+
message: String!
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
"Returned if `amount` is greater than the maximum un-refunded amount of the Payment"
|
|
341
|
+
type RefundAmountError implements ErrorResult {
|
|
342
|
+
errorCode: ErrorCode!
|
|
343
|
+
message: String!
|
|
344
|
+
maximumRefundable: Int!
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
"Returned when there is an error in transitioning the Refund state"
|
|
348
|
+
type RefundStateTransitionError implements ErrorResult {
|
|
349
|
+
errorCode: ErrorCode!
|
|
350
|
+
message: String!
|
|
351
|
+
transitionError: String!
|
|
352
|
+
fromState: String!
|
|
353
|
+
toState: String!
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
"Returned when there is an error in transitioning the Payment state"
|
|
357
|
+
type PaymentStateTransitionError implements ErrorResult {
|
|
358
|
+
errorCode: ErrorCode!
|
|
359
|
+
message: String!
|
|
360
|
+
transitionError: String!
|
|
361
|
+
fromState: String!
|
|
362
|
+
toState: String!
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
"Returned when there is an error in transitioning the Fulfillment state"
|
|
366
|
+
type FulfillmentStateTransitionError implements ErrorResult {
|
|
367
|
+
errorCode: ErrorCode!
|
|
368
|
+
message: String!
|
|
369
|
+
transitionError: String!
|
|
370
|
+
fromState: String!
|
|
371
|
+
toState: String!
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
"Returned when attempting to modify the contents of an Order that is not in the `Modifying` state."
|
|
375
|
+
type OrderModificationStateError implements ErrorResult {
|
|
376
|
+
errorCode: ErrorCode!
|
|
377
|
+
message: String!
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
"Returned when a call to modifyOrder fails to specify any changes"
|
|
381
|
+
type NoChangesSpecifiedError implements ErrorResult {
|
|
382
|
+
errorCode: ErrorCode!
|
|
383
|
+
message: String!
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
"""
|
|
387
|
+
Returned when a call to modifyOrder fails to include a paymentMethod even
|
|
388
|
+
though the price has increased as a result of the changes.
|
|
389
|
+
"""
|
|
390
|
+
type PaymentMethodMissingError implements ErrorResult {
|
|
391
|
+
errorCode: ErrorCode!
|
|
392
|
+
message: String!
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
"""
|
|
396
|
+
Returned when a call to modifyOrder fails to include a refundPaymentId even
|
|
397
|
+
though the price has decreased as a result of the changes.
|
|
398
|
+
"""
|
|
399
|
+
type RefundPaymentIdMissingError implements ErrorResult {
|
|
400
|
+
errorCode: ErrorCode!
|
|
401
|
+
message: String!
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
"""
|
|
405
|
+
Returned when a call to addManualPaymentToOrder is made but the Order
|
|
406
|
+
is not in the required state.
|
|
407
|
+
"""
|
|
408
|
+
type ManualPaymentStateError implements ErrorResult {
|
|
409
|
+
errorCode: ErrorCode!
|
|
410
|
+
message: String!
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
union TransitionOrderToStateResult = Order | OrderStateTransitionError
|
|
414
|
+
union SettlePaymentResult =
|
|
415
|
+
| Payment
|
|
416
|
+
| SettlePaymentError
|
|
417
|
+
| PaymentStateTransitionError
|
|
418
|
+
| OrderStateTransitionError
|
|
419
|
+
union CancelPaymentResult = Payment | CancelPaymentError | PaymentStateTransitionError
|
|
420
|
+
union AddFulfillmentToOrderResult =
|
|
421
|
+
| Fulfillment
|
|
422
|
+
| EmptyOrderLineSelectionError
|
|
423
|
+
| ItemsAlreadyFulfilledError
|
|
424
|
+
| InsufficientStockOnHandError
|
|
425
|
+
| InvalidFulfillmentHandlerError
|
|
426
|
+
| FulfillmentStateTransitionError
|
|
427
|
+
| CreateFulfillmentError
|
|
428
|
+
union CancelOrderResult =
|
|
429
|
+
| Order
|
|
430
|
+
| EmptyOrderLineSelectionError
|
|
431
|
+
| QuantityTooGreatError
|
|
432
|
+
| MultipleOrderError
|
|
433
|
+
| CancelActiveOrderError
|
|
434
|
+
| OrderStateTransitionError
|
|
435
|
+
union RefundOrderResult =
|
|
436
|
+
| Refund
|
|
437
|
+
| QuantityTooGreatError
|
|
438
|
+
| NothingToRefundError
|
|
439
|
+
| OrderStateTransitionError
|
|
440
|
+
| MultipleOrderError
|
|
441
|
+
| PaymentOrderMismatchError
|
|
442
|
+
| RefundOrderStateError
|
|
443
|
+
| AlreadyRefundedError
|
|
444
|
+
| RefundStateTransitionError
|
|
445
|
+
| RefundAmountError
|
|
446
|
+
union SettleRefundResult = Refund | RefundStateTransitionError
|
|
447
|
+
union TransitionFulfillmentToStateResult = Fulfillment | FulfillmentStateTransitionError
|
|
448
|
+
union TransitionPaymentToStateResult = Payment | PaymentStateTransitionError
|
|
449
|
+
union ModifyOrderResult =
|
|
450
|
+
| Order
|
|
451
|
+
| NoChangesSpecifiedError
|
|
452
|
+
| OrderModificationStateError
|
|
453
|
+
| PaymentMethodMissingError
|
|
454
|
+
| RefundPaymentIdMissingError
|
|
455
|
+
| OrderLimitError
|
|
456
|
+
| NegativeQuantityError
|
|
457
|
+
| InsufficientStockError
|
|
458
|
+
| CouponCodeExpiredError
|
|
459
|
+
| CouponCodeInvalidError
|
|
460
|
+
| CouponCodeLimitError
|
|
461
|
+
| IneligibleShippingMethodError
|
|
462
|
+
union AddManualPaymentToOrderResult = Order | ManualPaymentStateError
|
|
463
|
+
union SetCustomerForDraftOrderResult = Order | EmailAddressConflictError
|