From 0441a0338aeb7742012e24594feb67935d09b2fc Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Thu, 9 Mar 2023 11:49:45 +0100 Subject: [PATCH] chore: Migrate from TSLint to ESLint --- .eslintrc.js | 288 + package.json | 12 +- packages/admin-ui-plugin/build.ts | 2 +- packages/admin-ui-plugin/package.json | 2 +- packages/admin-ui-plugin/src/plugin.ts | 20 +- packages/admin-ui/.eslintrc.json | 80 + packages/admin-ui/angular.json | 20 +- packages/admin-ui/package.json | 15 +- .../src/lib/catalog/src/catalog.routes.ts | 12 +- .../src/components/assets/assets.component.ts | 1 + ...gn-products-to-channel-dialog.component.ts | 10 +- .../assign-to-channel-dialog.component.ts | 2 +- .../collection-detail.component.ts | 12 +- .../collection-list.component.ts | 6 +- .../collection-tree/array-to-tree.ts | 2 +- .../facet-detail/facet-detail.component.ts | 6 +- .../product-detail.component.ts | 32 +- .../product-list/product-list.component.ts | 2 +- .../product-options-editor.component.ts | 2 +- .../product-variants-editor.component.ts | 26 +- .../variant-price-detail.component.ts | 4 +- .../product-detail/product-detail.service.ts | 16 +- .../src/lib/core/src/app.component.ts | 12 +- .../core/src/common/base-list.component.ts | 2 +- .../lib/core/src/common/generated-types.ts | 2 +- .../core/src/common/introspection-result.ts | 2 +- .../utilities/configurable-operation-utils.ts | 6 +- .../create-updated-translatable.spec.ts | 2 +- .../src/common/utilities/string-to-color.ts | 4 +- .../breadcrumb/breadcrumb.component.spec.ts | 9 +- .../breadcrumb/breadcrumb.component.ts | 46 +- .../channel-switcher.component.ts | 6 +- .../notification/notification.component.ts | 2 +- .../src/data/client-state/client-resolvers.ts | 24 +- .../core/src/data/providers/fetch-adapter.ts | 6 +- .../src/data/utils/add-custom-fields.spec.ts | 2 +- .../core/src/data/utils/add-custom-fields.ts | 12 +- .../bulk-action-registry.service.ts | 2 +- .../dashboard-widget.service.ts | 14 +- .../health-check/health-check.service.ts | 4 +- .../i18n/custom-message-format-compiler.ts | 2 +- .../local-storage/local-storage.service.ts | 2 +- .../nav-builder/nav-builder.service.spec.ts | 2 +- .../nav-builder/nav-builder.service.ts | 2 +- .../asset-preview-dialog.component.ts | 2 +- .../asset-search-input.component.ts | 9 +- .../bulk-action-menu.component.ts | 8 +- .../dropdown/dropdown-item.directive.ts | 2 +- .../form-field-control.directive.ts | 2 +- .../modal-dialog/modal-dialog.component.ts | 2 +- .../product-search-input.component.ts | 9 +- .../context-menu/context-menu.service.ts | 8 +- .../prosemirror/inputrules.ts | 2 +- .../rich-text-editor/prosemirror/keymap.ts | 4 +- .../rich-text-editor/prosemirror/menu/menu.ts | 6 +- .../prosemirror/plugins/image-plugin.ts | 120 +- .../prosemirror/plugins/raw-editor-plugin.ts | 4 +- .../prosemirror/plugins/tables-plugin.ts | 135 +- .../prosemirror/prosemirror.service.ts | 4 +- .../raw-html-dialog.component.ts | 2 +- .../if-default-channel-active.directive.ts | 8 +- .../if-multichannel.directive.spec.ts | 34 +- .../directives/if-multichannel.directive.ts | 8 +- .../html-editor-form-input.component.ts | 8 +- .../dynamic-form-input.component.ts | 2 +- .../relation-customer-input.component.ts | 8 +- ...elation-product-variant-input.component.ts | 8 +- .../relation-product-input.component.ts | 8 +- .../relation-card/relation-card.component.ts | 1 + .../add-customer-to-group-dialog.component.ts | 8 +- .../customer-detail.component.ts | 8 +- .../customer-group-member-list.component.ts | 4 +- .../order-summary-widget.component.ts | 18 +- .../promotion-detail.component.ts | 16 +- .../cancel-order-dialog.component.ts | 7 +- .../coupon-code-selector.component.ts | 2 +- .../draft-order-detail.component.ts | 16 +- .../fulfillment-detail.component.ts | 11 +- .../modification-detail.component.ts | 14 +- .../order-detail/order-detail.component.ts | 16 +- .../order-editor/order-editor.component.ts | 6 +- .../order-edits-preview-dialog.component.ts | 2 +- .../order-list/order-list.component.ts | 8 +- .../order-table/order-table.component.ts | 4 +- .../refund-order-dialog.component.ts | 14 +- ...select-shipping-method-dialog.component.ts | 1 - .../src/providers/routing/order-resolver.ts | 2 +- .../admin-detail/admin-detail.component.ts | 6 +- .../channel-detail.component.ts | 2 +- .../channel-list/channel-list.component.ts | 2 +- .../country-list/country-list.component.ts | 6 +- .../permission-grid.component.ts | 6 +- .../shipping-method-detail.component.ts | 6 +- .../zone-member-list.component.ts | 4 +- packages/admin-ui/src/lib/static/polyfills.ts | 2 +- .../components/job-list/job-list.component.ts | 4 +- packages/admin-ui/src/main.ts | 2 +- packages/admin-ui/src/test.ts | 2 +- packages/admin-ui/src/tslint.json | 17 - packages/admin-ui/tslint.json | 33 - .../e2e/asset-server-plugin.e2e-spec.ts | 4 +- ...generated-e2e-asset-server-plugin-types.ts | 2 +- packages/asset-server-plugin/package.json | 2 +- packages/asset-server-plugin/src/common.ts | 4 +- packages/asset-server-plugin/src/plugin.ts | 8 +- .../src/s3-asset-storage-strategy.ts | 8 +- .../src/sharp-asset-preview-strategy.ts | 6 +- packages/common/package.json | 2 +- packages/common/src/generated-shop-types.ts | 2 +- packages/common/src/generated-types.ts | 2 +- packages/common/src/omit.ts | 6 +- packages/common/src/shared-types.ts | 30 +- packages/common/src/shared-utils.spec.ts | 2 +- packages/common/src/shared-utils.ts | 4 +- packages/common/src/unique.spec.ts | 4 +- packages/common/tslint.json | 5 - packages/core/build/gulpfile.ts | 6 +- .../e2e/active-order-strategy.e2e-spec.ts | 2 +- packages/core/e2e/administrator.e2e-spec.ts | 2 +- packages/core/e2e/asset-channel.e2e-spec.ts | 34 +- packages/core/e2e/asset.e2e-spec.ts | 6 +- packages/core/e2e/auth.e2e-spec.ts | 12 +- .../e2e/authentication-strategy.e2e-spec.ts | 2 +- packages/core/e2e/channel.e2e-spec.ts | 8 +- packages/core/e2e/collection.e2e-spec.ts | 68 +- .../e2e/configurable-operation.e2e-spec.ts | 2 +- packages/core/e2e/country.e2e-spec.ts | 2 +- packages/core/e2e/custom-fields.e2e-spec.ts | 62 +- .../core/e2e/custom-permissions.e2e-spec.ts | 4 +- .../core/e2e/customer-channel.e2e-spec.ts | 14 +- packages/core/e2e/customer-group.e2e-spec.ts | 2 +- packages/core/e2e/customer.e2e-spec.ts | 16 +- .../default-search-plugin-uuids.e2e-spec.ts | 2 +- .../e2e/default-search-plugin.e2e-spec.ts | 10 +- packages/core/e2e/draft-order.e2e-spec.ts | 2 +- packages/core/e2e/entity-hydrator.e2e-spec.ts | 2 +- .../core/e2e/entity-id-strategy.e2e-spec.ts | 2 +- .../core/e2e/entity-uuid-strategy.e2e-spec.ts | 2 +- packages/core/e2e/facet.e2e-spec.ts | 15 +- .../test-plugins/hydration-test-plugin.ts | 6 +- .../issue-1636-1664/issue-1636-1664-plugin.ts | 4 +- .../test-plugins/list-query-plugin.ts | 6 +- .../test-plugins/transaction-test-plugin.ts | 1 + .../test-plugins/with-api-extensions.ts | 2 +- .../e2e/fixtures/test-plugins/with-config.ts | 2 +- .../core/e2e/fulfillment-process.e2e-spec.ts | 2 +- .../e2e/graphql/generated-e2e-admin-types.ts | 13377 ++++++++++------ .../e2e/graphql/generated-e2e-shop-types.ts | 5924 ++++--- packages/core/e2e/localization.e2e-spec.ts | 2 +- packages/core/e2e/money-strategy.e2e-spec.ts | 2 +- .../order-changed-price-handling.e2e-spec.ts | 2 +- packages/core/e2e/order-channel.e2e-spec.ts | 20 +- ...tem-price-calculation-strategy.e2e-spec.ts | 4 +- packages/core/e2e/order-merge.e2e-spec.ts | 2 +- .../core/e2e/order-modification.e2e-spec.ts | 90 +- packages/core/e2e/order-process.e2e-spec.ts | 2 +- packages/core/e2e/order-promotion.e2e-spec.ts | 212 +- packages/core/e2e/order-taxes.e2e-spec.ts | 2 +- packages/core/e2e/order.e2e-spec.ts | 28 +- .../e2e/parallel-transactions.e2e-spec.ts | 2 +- packages/core/e2e/payment-method.e2e-spec.ts | 4 +- packages/core/e2e/payment-process.e2e-spec.ts | 6 +- packages/core/e2e/populate.e2e-spec.ts | 6 +- packages/core/e2e/product-channel.e2e-spec.ts | 24 +- packages/core/e2e/product-option.e2e-spec.ts | 2 +- packages/core/e2e/product.e2e-spec.ts | 26 +- packages/core/e2e/promotion.e2e-spec.ts | 4 +- packages/core/e2e/role.e2e-spec.ts | 12 +- .../core/e2e/session-management.e2e-spec.ts | 2 +- packages/core/e2e/shipping-method.e2e-spec.ts | 2 +- packages/core/e2e/shop-auth.e2e-spec.ts | 36 +- packages/core/e2e/shop-catalog.e2e-spec.ts | 4 +- packages/core/e2e/shop-customer.e2e-spec.ts | 2 +- packages/core/e2e/shop-order.e2e-spec.ts | 264 +- .../stock-control-multi-location.e2e-spec.ts | 2 +- packages/core/e2e/stock-control.e2e-spec.ts | 20 +- packages/core/e2e/tax-category.e2e-spec.ts | 2 +- packages/core/e2e/tax-rate.e2e-spec.ts | 2 +- packages/core/e2e/utils/fix-pg-timezone.ts | 2 +- packages/core/e2e/utils/test-order-utils.ts | 4 +- packages/core/e2e/zone.e2e-spec.ts | 2 +- packages/core/package.json | 2 +- .../custom-field-relation-resolver.service.ts | 2 +- packages/core/src/api/common/id-codec.spec.ts | 4 +- .../src/api/common/request-context.spec.ts | 14 +- .../core/src/api/common/request-context.ts | 8 +- .../validate-custom-field-value.spec.ts | 32 +- .../api/config/configure-graphql-module.ts | 2 +- .../api/config/generate-list-options.spec.ts | 8 +- .../src/api/config/generate-list-options.ts | 5 +- .../core/src/api/config/generate-resolvers.ts | 2 +- .../src/api/config/graphql-custom-fields.ts | 14 +- packages/core/src/api/config/money-scalar.ts | 5 +- .../src/api/decorators/relations.decorator.ts | 6 +- .../decorators/request-context.decorator.ts | 3 +- .../api/middleware/transaction-interceptor.ts | 16 +- .../api/middleware/translate-errors-plugin.ts | 2 +- .../resolvers/admin/collection.resolver.ts | 4 +- .../resolvers/admin/draft-order.resolver.ts | 4 +- .../src/api/resolvers/admin/facet.resolver.ts | 2 +- .../admin/product-option.resolver.ts | 2 +- .../api/resolvers/admin/product.resolver.ts | 6 +- .../api/resolvers/admin/search.resolver.ts | 12 +- .../entity/collection-entity.resolver.ts | 4 +- .../entity/customer-group-entity.resolver.ts | 2 +- .../resolvers/entity/facet-entity.resolver.ts | 2 +- .../entity/facet-value-entity.resolver.ts | 2 +- .../fulfillment-line-entity.resolver.ts | 2 +- .../entity/product-entity.resolver.ts | 2 +- .../entity/product-option-entity.resolver.ts | 2 +- .../product-option-group-entity.resolver.ts | 2 +- .../entity/refund-line-entity.resolver.ts | 2 +- .../api/resolvers/shop/shop-auth.resolver.ts | 2 +- .../resolvers/shop/shop-customer.resolver.ts | 2 +- .../api/resolvers/shop/shop-order.resolver.ts | 2 +- .../resolvers/shop/shop-products.resolver.ts | 8 +- packages/core/src/bootstrap.ts | 13 +- packages/core/src/cli/cli-utils.ts | 2 +- packages/core/src/cli/populate.ts | 4 +- packages/core/src/cli/vendure-cli.ts | 14 +- packages/core/src/common/async-queue.ts | 4 +- .../core/src/common/configurable-operation.ts | 4 +- packages/core/src/common/constants.ts | 6 +- packages/core/src/common/error/errors.ts | 2 - .../error/generated-graphql-admin-errors.ts | 2 +- .../error/generated-graphql-shop-errors.ts | 2 +- .../finite-state-machine.spec.ts | 24 +- .../finite-state-machine.ts | 2 +- .../core/src/common/generate-public-id.ts | 2 +- .../core/src/common/self-refreshing-cache.ts | 6 +- .../core/src/common/types/common-types.ts | 2 +- .../src/common/types/entity-relation-paths.ts | 2 +- packages/core/src/common/utils.ts | 2 +- .../default-asset-import-strategy.ts | 8 +- .../src/config/catalog/collection-filter.ts | 4 +- .../catalog/default-collection-filters.ts | 23 +- .../default-stock-location-strategy.ts | 2 +- packages/core/src/config/config-helpers.ts | 7 +- .../core/src/config/config.service.mock.ts | 5 +- packages/core/src/config/config.service.ts | 4 +- .../config/job-queue/job-queue-strategy.ts | 6 +- .../core/src/config/logger/default-logger.ts | 10 +- .../core/src/config/logger/typeorm-logger.ts | 9 +- .../order/changed-price-handling-strategy.ts | 2 +- .../order/default-active-order-strategy.ts | 2 +- .../src/config/order/default-order-process.ts | 30 +- .../src/config/order/merge-orders-strategy.ts | 2 +- .../src/config/order/order-merge-strategy.ts | 2 +- .../src/config/order/order-seller-strategy.ts | 2 +- .../payment/example-payment-method-handler.ts | 4 +- .../conditions/has-facet-values-condition.ts | 2 +- .../src/config/promotion/promotion-action.ts | 4 +- .../promotion/utils/facet-value-checker.ts | 1 - .../in-memory-session-cache-strategy.ts | 2 +- ...fault-shipping-line-assignment-strategy.ts | 2 +- .../shipping-line-assignment-strategy.ts | 2 +- .../tax/tax-line-calculation-strategy.ts | 2 +- packages/core/src/config/vendure-config.ts | 2 +- ...move-custom-fields-with-eager-relations.ts | 4 +- .../connection/transactional-connection.ts | 12 +- .../providers/import-parser/import-parser.ts | 6 +- .../importer/fast-importer.service.ts | 12 +- .../providers/importer/importer.ts | 2 +- .../providers/populator/populator.ts | 14 +- packages/core/src/entity/entities.ts | 22 +- .../core/src/entity/entity-id.decorator.ts | 2 +- .../order-modification.entity.ts | 2 +- .../core/src/entity/order/order.entity.ts | 2 +- .../product-option-group.entity.ts | 2 +- .../product-variant/product-variant.entity.ts | 2 +- .../src/entity/promotion/promotion.entity.ts | 2 +- .../entity/register-custom-entity-fields.ts | 5 +- .../core/src/entity/set-entity-id-strategy.ts | 2 +- packages/core/src/entity/subscribers.ts | 1 + .../src/entity/surcharge/surcharge.entity.ts | 2 +- .../entity/validate-custom-fields-config.ts | 1 + .../event-bus/events/customer-group-event.ts | 2 +- packages/core/src/i18n/i18n.service.ts | 9 +- .../in-memory-job-queue-strategy.spec.ts | 16 +- .../job-queue/in-memory-job-queue-strategy.ts | 14 +- .../injectable-job-queue-strategy.ts | 4 +- .../job-buffer/job-buffer.service.ts | 4 +- .../src/job-queue/job-buffer/job-buffer.ts | 2 +- .../src/job-queue/job-queue.service.spec.ts | 6 +- packages/core/src/job-queue/job-queue.ts | 2 +- packages/core/src/job-queue/job.ts | 22 +- .../job-queue/polling-job-queue-strategy.ts | 20 +- .../core/src/job-queue/subscribable-job.ts | 16 +- packages/core/src/migrate.ts | 18 +- .../sql-job-buffer-storage-strategy.ts | 12 +- .../sql-job-queue-strategy.ts | 6 +- .../api/fulltext-search.resolver.ts | 2 +- .../fulltext-search.service.ts | 2 +- .../indexer/indexer.controller.ts | 6 +- .../indexer/mutable-request-context.ts | 2 +- .../indexer/search-index.service.ts | 34 +- .../search-strategy/mysql-search-strategy.ts | 6 +- .../postgres-search-strategy.ts | 8 +- .../search-strategy/search-strategy-utils.ts | 1 + .../search-strategy/sqlite-search-strategy.ts | 4 +- .../src/plugin/dynamic-plugin-api.module.ts | 2 +- packages/core/src/plugin/plugin-utils.ts | 2 +- packages/core/src/plugin/vendure-plugin.ts | 2 +- .../active-order/active-order.service.ts | 2 +- .../helpers/config-arg/config-arg.service.ts | 4 +- .../custom-field-relation.service.ts | 2 +- .../fulfillment-state-machine.ts | 2 +- .../list-query-builder/list-query-builder.ts | 2 +- .../parse-filter-params.spec.ts | 36 +- .../list-query-builder/parse-filter-params.ts | 2 + .../locale-string-hydrator.ts | 2 +- .../order-calculator/order-calculator.spec.ts | 2 +- .../order-calculator/order-calculator.ts | 2 +- .../helpers/order-merger/order-merger.ts | 2 +- .../helpers/order-modifier/order-modifier.ts | 8 +- .../helpers/order-splitter/order-splitter.ts | 2 +- .../order-state-machine.ts | 2 +- .../payment-state-machine.ts | 2 +- .../product-price-applicator.ts | 6 +- .../refund-state-machine.ts | 2 +- .../helpers/slug-validator/slug-validator.ts | 10 +- .../src/service/helpers/utils/order-utils.ts | 4 +- .../helpers/utils/translate-entity.spec.ts | 4 +- .../service/helpers/utils/translate-entity.ts | 2 +- .../core/src/service/initializer.service.ts | 2 +- .../service/services/administrator.service.ts | 4 +- .../src/service/services/asset.service.ts | 15 +- .../src/service/services/channel.service.ts | 4 +- .../service/services/collection.service.ts | 11 +- .../services/customer-group.service.ts | 2 +- .../src/service/services/customer.service.ts | 4 +- .../service/services/facet-value.service.ts | 4 +- .../src/service/services/facet.service.ts | 4 +- .../service/services/fulfillment.service.ts | 8 +- .../services/global-settings.service.ts | 2 +- .../src/service/services/history.service.ts | 6 +- .../service/services/order-testing.service.ts | 2 +- .../src/service/services/order.service.ts | 23 +- .../services/payment-method.service.ts | 2 +- .../src/service/services/payment.service.ts | 17 +- .../services/product-option-group.service.ts | 2 +- .../services/product-option.service.ts | 2 +- .../services/product-variant.service.ts | 7 +- .../src/service/services/product.service.ts | 10 +- .../src/service/services/promotion.service.ts | 4 +- .../core/src/service/services/role.service.ts | 8 +- .../src/service/services/search.service.ts | 2 +- .../src/service/services/session.service.ts | 12 +- .../services/shipping-method.service.ts | 3 +- .../services/stock-location.service.ts | 2 +- .../services/stock-movement.service.ts | 2 +- packages/core/src/testing/order-test-utils.ts | 2 +- packages/core/tslint.json | 5 - packages/create/build.ts | 7 +- packages/create/package.json | 2 +- packages/create/src/create-vendure-app.ts | 27 +- packages/create/src/gather-user-responses.ts | 18 +- packages/create/src/helpers.ts | 27 +- packages/dev-server/dev-config.ts | 2 +- packages/dev-server/index-worker.ts | 2 +- packages/dev-server/index.ts | 2 +- .../dev-server/load-testing/benchmarks.ts | 2 +- .../load-testing/generate-summary.ts | 2 +- .../dev-server/load-testing/init-load-test.ts | 6 +- .../load-testing/load-test-config.ts | 2 +- .../dev-server/load-testing/run-load-test.ts | 6 +- packages/dev-server/load-testing/typings.d.ts | 2 +- packages/dev-server/memory-profiler.ts | 2 +- packages/dev-server/populate-dev-server.ts | 4 +- .../test-plugins/entity-hydrate-plugin.ts | 2 +- .../event-bus-transactions-plugin.ts | 2 +- .../test-plugins/issue-1664/issue-1664.ts | 4 +- .../elasticsearch-plugin/e2e/e2e-helpers.ts | 4 +- .../e2e/elasticsearch-plugin-uuid.e2e-spec.ts | 3 +- .../e2e/elasticsearch-plugin.e2e-spec.ts | 14 +- ...enerated-e2e-elasticsearch-plugin-types.ts | 2 +- packages/elasticsearch-plugin/package.json | 2 +- .../src/api/api-extensions.ts | 10 +- .../src/api/elasticsearch-resolver.ts | 2 +- .../src/build-elastic-body.spec.ts | 4 +- .../src/build-elastic-body.ts | 8 +- .../src/elasticsearch.service.ts | 57 +- .../indexing/elasticsearch-index.service.ts | 32 +- .../src/indexing/indexer.controller.ts | 20 +- .../src/indexing/indexing-utils.ts | 2 +- .../src/indexing/mutable-request-context.ts | 2 +- packages/elasticsearch-plugin/src/plugin.ts | 3 +- packages/email-plugin/package.json | 2 +- .../src/default-email-handlers.ts | 18 +- packages/email-plugin/src/dev-mailbox.ts | 5 +- packages/email-plugin/src/email-processor.ts | 9 +- packages/email-plugin/src/event-handler.ts | 6 +- .../src/handlebars-mjml-generator.ts | 2 +- packages/email-plugin/src/plugin.spec.ts | 14 +- packages/email-plugin/src/types.ts | 2 +- packages/harden-plugin/package.json | 2 +- packages/harden-plugin/src/harden.plugin.ts | 5 +- .../src/middleware/query-complexity-plugin.ts | 2 +- .../e2e/bullmq-job-queue-plugin.e2e-spec.ts | 6 +- packages/job-queue-plugin/package.json | 2 +- .../src/bullmq/bullmq-job-queue-strategy.ts | 34 +- packages/job-queue-plugin/src/bullmq/index.ts | 4 +- .../src/bullmq/redis-health-indicator.ts | 14 +- .../redis-job-buffer-storage-strategy.ts | 2 +- .../src/pub-sub/pub-sub-job-queue-strategy.ts | 6 +- .../e2e/graphql/generated-admin-types.ts | 2 +- .../e2e/graphql/generated-shop-types.ts | 2 +- .../payments-plugin/e2e/mollie-dev-server.ts | 12 +- .../e2e/mollie-payment.e2e-spec.ts | 12 +- .../payments-plugin/e2e/payment-helpers.ts | 2 +- .../e2e/stripe-payment.e2e-spec.ts | 2 +- packages/payments-plugin/package.json | 2 +- .../src/braintree/braintree.resolver.ts | 6 +- .../mollie/graphql/generated-shop-types.ts | 2 +- .../src/mollie/mollie.controller.ts | 8 +- .../src/mollie/mollie.handler.ts | 14 +- .../src/mollie/mollie.service.ts | 7 +- .../src/stripe/stripe.controller.ts | 4 +- packages/testing/package.json | 2 +- .../config/testing-asset-preview-strategy.ts | 2 +- .../config/testing-asset-storage-strategy.ts | 2 +- .../testing/src/create-test-environment.ts | 6 +- .../src/data-population/clear-all-tables.ts | 4 +- .../src/data-population/mock-data.service.ts | 2 +- .../src/data-population/populate-customers.ts | 2 +- .../data-population/populate-for-testing.ts | 6 +- packages/testing/src/error-result-guard.ts | 2 +- .../src/initializers/mysql-initializer.ts | 2 + .../src/initializers/postgres-initializer.ts | 1 + .../src/initializers/sqljs-initializer.ts | 2 +- packages/testing/src/simple-graphql-client.ts | 6 +- packages/testing/src/test-server.ts | 10 +- .../src/utils/create-upload-post-data.ts | 11 +- packages/ui-devkit/package.json | 2 +- packages/ui-devkit/scaffold/src/main.ts | 2 +- .../ui-devkit/src/client/devkit-client-api.ts | 2 +- packages/ui-devkit/src/compiler/compile.ts | 8 +- packages/ui-devkit/src/compiler/scaffold.ts | 9 +- .../ui-devkit/src/compiler/translations.ts | 4 +- packages/ui-devkit/src/compiler/utils.ts | 5 +- scripts/changelogs/generate-changelog.ts | 2 +- scripts/check-angular-versions.ts | 2 +- scripts/check-core-type-defs.ts | 2 +- scripts/check-imports.ts | 4 +- .../codegen/download-introspection-schema.ts | 2 +- scripts/codegen/generate-graphql-types.ts | 12 +- .../codegen/plugins/graphql-errors-plugin.ts | 2 +- scripts/docs/docgen-utils.ts | 2 +- scripts/docs/generate-graphql-docs.ts | 2 +- scripts/docs/generate-typescript-docs.ts | 2 +- scripts/docs/typescript-docs-renderer.ts | 2 +- scripts/docs/update-build-info.ts | 2 +- tslint.json | 55 - yarn.lock | 910 +- 454 files changed, 15044 insertions(+), 9434 deletions(-) create mode 100644 .eslintrc.js create mode 100644 packages/admin-ui/.eslintrc.json delete mode 100644 packages/admin-ui/src/tslint.json delete mode 100644 packages/admin-ui/tslint.json delete mode 100644 packages/common/tslint.json delete mode 100644 packages/core/tslint.json delete mode 100644 tslint.json diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000000..50a340efa6 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,288 @@ +/* +👋 Hi! This file was autogenerated by tslint-to-eslint-config. +https://github.com/typescript-eslint/tslint-to-eslint-config + +It represents the closest reasonable ESLint configuration to this +project's original TSLint configuration. + +We recommend eventually switching this configuration to extend from +the recommended rulesets in typescript-eslint. +https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md + +Happy linting! 💖 +*/ +module.exports = { + env: { + es6: true, + node: true, + }, + extends: [ + 'plugin:@typescript-eslint/recommended', + 'plugin:@typescript-eslint/recommended-requiring-type-checking', + 'prettier', + ], + ignorePatterns: ['**/generated*', '**/*.js', '**/*.d.ts', '/packages/ui-devkit/scaffold/**/*'], + parser: '@typescript-eslint/parser', + parserOptions: { + project: 'tsconfig.json', + sourceType: 'module', + }, + plugins: [ + 'eslint-plugin-import', + 'eslint-plugin-jsdoc', + 'eslint-plugin-prefer-arrow', + '@typescript-eslint', + ], + root: true, + overrides: [ + { + files: ['./packages/ui-devkit/src/client/**/*'], + parserOptions: { + project: 'tsconfig.json', + sourceType: 'module', + }, + }, + { + files: ['./packages/ui-devkit/src/compiler/**/*'], + parserOptions: { + project: 'tsconfig.compiler.json', + sourceType: 'module', + }, + }, + ], + rules: { + '@typescript-eslint/adjacent-overload-signatures': 'error', + '@typescript-eslint/array-type': [ + 'error', + { + default: 'array-simple', + }, + ], + '@typescript-eslint/await-thenable': 'error', + '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/ban-types': [ + 'error', + { + types: { + Object: { + message: 'Avoid using the `Object` type. Did you mean `object`?', + }, + Function: { + message: + 'Avoid using the `Function` type. Prefer a specific function type, like `() => void`.', + }, + Boolean: { + message: 'Avoid using the `Boolean` type. Did you mean `boolean`?', + }, + Number: { + message: 'Avoid using the `Number` type. Did you mean `number`?', + }, + String: { + message: 'Avoid using the `String` type. Did you mean `string`?', + }, + Symbol: { + message: 'Avoid using the `Symbol` type. Did you mean `symbol`?', + }, + }, + }, + ], + '@typescript-eslint/consistent-type-assertions': 'error', + '@typescript-eslint/consistent-type-definitions': 'off', + '@typescript-eslint/dot-notation': 'error', + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/explicit-member-accessibility': [ + 'off', + { + accessibility: 'explicit', + }, + ], + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/indent': 'off', + '@typescript-eslint/member-ordering': 'off', + '@typescript-eslint/naming-convention': [ + 'off', + { + selector: 'variable', + format: ['camelCase', 'UPPER_CASE'], + leadingUnderscore: 'forbid', + trailingUnderscore: 'forbid', + }, + ], + '@typescript-eslint/no-array-constructor': 'error', + '@typescript-eslint/no-empty-function': 'error', + '@typescript-eslint/no-empty-interface': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-extra-non-null-assertion': 'error', + '@typescript-eslint/no-extra-semi': 'error', + '@typescript-eslint/no-floating-promises': 'error', + '@typescript-eslint/no-for-in-array': 'error', + '@typescript-eslint/no-implied-eval': 'error', + '@typescript-eslint/no-inferrable-types': [ + 'error', + { + ignoreParameters: true, + }, + ], + '@typescript-eslint/no-loss-of-precision': 'error', + '@typescript-eslint/no-misused-new': 'error', + '@typescript-eslint/no-misused-promises': 'warn', + '@typescript-eslint/no-namespace': 'error', + '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', + '@typescript-eslint/no-non-null-assertion': 'error', + '@typescript-eslint/no-parameter-properties': 'off', + '@typescript-eslint/no-shadow': [ + 'error', + { + hoist: 'all', + }, + ], + '@typescript-eslint/no-this-alias': 'error', + '@typescript-eslint/no-unnecessary-type-assertion': 'error', + '@typescript-eslint/no-unnecessary-type-constraint': 'error', + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-return': 'off', + '@typescript-eslint/no-unused-expressions': 'error', + '@typescript-eslint/no-unused-vars': 'off', + '@typescript-eslint/no-use-before-define': 'off', + '@typescript-eslint/no-var-requires': 'error', + '@typescript-eslint/prefer-as-const': 'error', + '@typescript-eslint/prefer-for-of': 'error', + '@typescript-eslint/prefer-function-type': 'error', + '@typescript-eslint/prefer-namespace-keyword': 'error', + '@typescript-eslint/quotes': ['error', 'single'], + '@typescript-eslint/require-await': 'warn', + '@typescript-eslint/restrict-plus-operands': 'error', + '@typescript-eslint/restrict-template-expressions': 'error', + '@typescript-eslint/triple-slash-reference': [ + 'error', + { + path: 'always', + types: 'prefer-import', + lib: 'always', + }, + ], + '@typescript-eslint/typedef': 'off', + '@typescript-eslint/unbound-method': 'error', + '@typescript-eslint/unified-signatures': 'error', + 'arrow-parens': ['off', 'always'], + complexity: 'off', + 'constructor-super': 'error', + 'dot-notation': 'off', + eqeqeq: ['error', 'smart'], + 'guard-for-in': 'error', + 'id-denylist': 'off', + 'id-match': 'off', + 'import/order': [ + 'error', + { + alphabetize: { + caseInsensitive: true, + order: 'asc', + }, + 'newlines-between': 'always', + groups: [ + ['builtin', 'external', 'internal', 'unknown', 'object', 'type'], + 'parent', + ['sibling', 'index'], + ], + distinctGroup: false, + pathGroupsExcludedImportTypes: [], + pathGroups: [ + { + pattern: './', + patternOptions: { + nocomment: true, + dot: true, + }, + group: 'sibling', + position: 'before', + }, + { + pattern: '.', + patternOptions: { + nocomment: true, + dot: true, + }, + group: 'sibling', + position: 'before', + }, + { + pattern: '..', + patternOptions: { + nocomment: true, + dot: true, + }, + group: 'parent', + position: 'before', + }, + { + pattern: '../', + patternOptions: { + nocomment: true, + dot: true, + }, + group: 'parent', + position: 'before', + }, + ], + }, + ], + indent: 'off', + 'jsdoc/check-alignment': 'off', + 'jsdoc/check-indentation': 'off', + 'jsdoc/newline-after-description': 'off', + 'max-classes-per-file': 'off', + 'max-len': [ + 'error', + { + code: 170, + }, + ], + 'new-parens': 'error', + 'no-array-constructor': 'off', + 'no-bitwise': 'error', + 'no-caller': 'error', + 'no-cond-assign': 'error', + 'no-console': 'error', + 'no-debugger': 'error', + 'no-empty': 'error', + 'no-empty-function': 'off', + 'no-eval': 'error', + 'no-extra-semi': 'off', + 'no-fallthrough': 'error', + 'no-implied-eval': 'off', + 'no-invalid-this': 'off', + 'no-loss-of-precision': 'off', + 'no-new-wrappers': 'error', + 'no-shadow': 'off', + 'no-throw-literal': 'error', + 'no-trailing-spaces': 'error', + 'no-undef-init': 'error', + 'no-underscore-dangle': 'off', + 'no-unsafe-finally': 'error', + 'no-unused-expressions': 'off', + 'no-unused-labels': 'error', + 'no-unused-vars': 'off', + 'no-use-before-define': 'off', + 'no-var': 'error', + 'object-shorthand': 'error', + 'one-var': ['error', 'never'], + 'prefer-arrow/prefer-arrow-functions': 'off', + 'prefer-const': 'error', + quotes: 'off', + radix: 'error', + 'require-await': 'off', + 'spaced-comment': [ + 'error', + 'always', + { + markers: ['/'], + }, + ], + 'use-isnan': 'error', + 'valid-typeof': 'off', + }, +}; diff --git a/package.json b/package.json index 32b537ba91..d7c336a08f 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "scripts": { "watch": "lerna run watch --parallel", "watch:core-common": "lerna run --scope @vendure/common --scope @vendure/core watch --parallel", - "lint": "yarn tslint --fix", + "lint": "yarn eslint --fix", "format": "prettier --write --html-whitespace-sensitivity ignore", "bootstrap": "lerna bootstrap", "docs:generate-typescript-docs": "ts-node scripts/docs/generate-typescript-docs.ts", @@ -52,7 +52,6 @@ "lint-staged": "^10.5.4", "prettier": "^2.2.1", "ts-node": "^10.9.1", - "tslint": "^6.1.3", "typescript": "4.9.5", "unplugin-swc": "^1.3.2", "vitest": "^0.29.2" @@ -91,5 +90,14 @@ "pre-commit": "lint-staged", "pre-push": "yarn check-imports && yarn check-angular-versions && yarn build && yarn test && yarn e2e" } + }, + "dependencies": { + "@typescript-eslint/eslint-plugin": "^5.54.1", + "@typescript-eslint/parser": "^5.54.1", + "eslint": "^8.35.0", + "eslint-config-prettier": "^8.7.0", + "eslint-plugin-import": "^2.27.5", + "eslint-plugin-jsdoc": "^40.0.1", + "eslint-plugin-prefer-arrow": "^1.2.3" } } diff --git a/packages/admin-ui-plugin/build.ts b/packages/admin-ui-plugin/build.ts index 393348f372..580f4f4e7f 100644 --- a/packages/admin-ui-plugin/build.ts +++ b/packages/admin-ui-plugin/build.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-console */ +/* eslint-disable no-console */ import { execSync, spawn } from 'child_process'; import fs from 'fs-extra'; import path from 'path'; diff --git a/packages/admin-ui-plugin/package.json b/packages/admin-ui-plugin/package.json index c41a99683c..fb85e6f2ff 100644 --- a/packages/admin-ui-plugin/package.json +++ b/packages/admin-ui-plugin/package.json @@ -10,7 +10,7 @@ "scripts": { "build": "rimraf lib && node -r ts-node/register build.ts && yarn compile", "watch": "tsc -p ./tsconfig.build.json --watch", - "lint": "tslint --fix --project ./", + "lint": "eslint --fix .", "compile": "tsc -p ./tsconfig.build.json" }, "homepage": "https://www.vendure.io/", diff --git a/packages/admin-ui-plugin/src/plugin.ts b/packages/admin-ui-plugin/src/plugin.ts index 3bfd2dc3c3..6f3425765b 100644 --- a/packages/admin-ui-plugin/src/plugin.ts +++ b/packages/admin-ui-plugin/src/plugin.ts @@ -163,13 +163,13 @@ export class AdminUiPlugin implements NestModule { ) .forRoutes('sockjs-node'); - Logger.info(`Compiling Admin UI app in development mode`, loggerCtx); + Logger.info('Compiling Admin UI app in development mode', loggerCtx); app.compile().then( () => { - Logger.info(`Admin UI compiling and watching for changes...`, loggerCtx); + Logger.info('Admin UI compiling and watching for changes...', loggerCtx); }, (err: any) => { - Logger.error(`Failed to compile: ${err}`, loggerCtx, err.stack); + Logger.error(`Failed to compile: ${JSON.stringify(err)}`, loggerCtx, err.stack); }, ); await overwriteConfig(); @@ -178,15 +178,15 @@ export class AdminUiPlugin implements NestModule { consumer.apply(await this.createStaticServer(app)).forRoutes(route); if (app && typeof app.compile === 'function') { - Logger.info(`Compiling Admin UI app in production mode...`, loggerCtx); + Logger.info('Compiling Admin UI app in production mode...', loggerCtx); app.compile() .then(overwriteConfig) .then( () => { - Logger.info(`Admin UI successfully compiled`, loggerCtx); + Logger.info('Admin UI successfully compiled', loggerCtx); }, (err: any) => { - Logger.error(`Failed to compile: ${err}`, loggerCtx, err.stack); + Logger.error(`Failed to compile: ${JSON.stringify(err)}`, loggerCtx, err.stack); }, ); } else { @@ -265,9 +265,11 @@ export class AdminUiPlugin implements NestModule { try { await fs.writeFile(adminUiConfigPath, JSON.stringify(config, null, 2)); } catch (e: any) { - throw new Error('[AdminUiPlugin] Could not write vendure-ui-config.json file:\n' + e.message); + throw new Error( + '[AdminUiPlugin] Could not write vendure-ui-config.json file:\n' + JSON.stringify(e.message), + ); } - Logger.verbose(`Applied configuration to vendure-ui-config.json file`, loggerCtx); + Logger.verbose('Applied configuration to vendure-ui-config.json file', loggerCtx); } /** @@ -289,7 +291,7 @@ export class AdminUiPlugin implements NestModule { ); await fs.writeFile(indexHtmlPath, withCustomBaseHref); } catch (e: any) { - throw new Error('[AdminUiPlugin] Could not write index.html file:\n' + e.message); + throw new Error('[AdminUiPlugin] Could not write index.html file:\n' + JSON.stringify(e.message)); } Logger.verbose(`Applied baseHref "/${baseHref}/" to index.html file`, loggerCtx); } diff --git a/packages/admin-ui/.eslintrc.json b/packages/admin-ui/.eslintrc.json new file mode 100644 index 0000000000..682acb378d --- /dev/null +++ b/packages/admin-ui/.eslintrc.json @@ -0,0 +1,80 @@ +{ + "root": true, + "ignorePatterns": ["projects/**/*"], + "overrides": [ + { + "files": ["*.ts"], + "parserOptions": { + "project": ["tsconfig.json"], + "createDefaultProgram": true + }, + "extends": [ + "plugin:@angular-eslint/ng-cli-compat", + "plugin:@angular-eslint/ng-cli-compat--formatting-add-on", + "plugin:@angular-eslint/template/process-inline-templates" + ], + "rules": { + "@angular-eslint/directive-selector": [ + "error", + { + "type": "attribute", + "prefix": "vdr", + "style": "camelCase" + } + ], + "@angular-eslint/component-selector": [ + "error", + { + "type": "element", + "prefix": "vdr", + "style": "kebab-case" + } + ], + "@angular-eslint/no-input-rename": "off", + "@typescript-eslint/array-type": [ + "error", + { + "default": "array-simple" + } + ], + "@typescript-eslint/naming-convention": "off", + "@typescript-eslint/consistent-type-definitions": "off", + "@typescript-eslint/dot-notation": "off", + "@typescript-eslint/explicit-member-accessibility": [ + "off", + { + "accessibility": "explicit" + } + ], + "@typescript-eslint/member-ordering": "off", + "@typescript-eslint/no-empty-function": "error", + "@typescript-eslint/no-empty-interface": "off", + "@typescript-eslint/no-floating-promises": "off", + "@typescript-eslint/no-var-requires": "error", + "arrow-parens": ["off", "always"], + "id-blacklist": "off", + "id-match": "off", + "import/order": "error", + "jsdoc/check-alignment": "off", + "jsdoc/newline-after-description": "off", + "max-len": [ + "error", + { + "code": 170 + } + ], + "no-empty": "error", + "no-underscore-dangle": "off", + "prefer-arrow/prefer-arrow-functions": "off" + } + }, + { + "files": ["*.html"], + "extends": ["plugin:@angular-eslint/template/recommended"], + "rules": { + "@angular-eslint/template/no-negated-async": "off", + "@angular-eslint/template/eqeqeq": "off" + } + } + ] +} diff --git a/packages/admin-ui/angular.json b/packages/admin-ui/angular.json index 8a3326936f..7e12f914e7 100644 --- a/packages/admin-ui/angular.json +++ b/packages/admin-ui/angular.json @@ -24,7 +24,11 @@ "polyfills": "src/lib/static/polyfills.ts", "tsConfig": "src/tsconfig.app.json", "assets": [ - { "glob": "**/*", "input": "src/lib/static/", "output": "/" } + { + "glob": "**/*", + "input": "src/lib/static/", + "output": "/" + } ], "styles": [ "src/lib/static/styles/styles.scss" @@ -130,6 +134,15 @@ ] } } + }, + "lint": { + "builder": "@angular-eslint/builder:lint", + "options": { + "lintFilePatterns": [ + "src/**/*.ts", + "src/**/*.html" + ] + } } } }, @@ -162,6 +175,9 @@ }, "cli": { "packageManager": "yarn", - "analytics": "61fa89f7-706a-46c0-bcdb-b1d3664195ce" + "analytics": "61fa89f7-706a-46c0-bcdb-b1d3664195ce", + "schematicCollections": [ + "@angular-eslint/schematics" + ] } } diff --git a/packages/admin-ui/package.json b/packages/admin-ui/package.json index a673f17666..dd0f6449e0 100644 --- a/packages/admin-ui/package.json +++ b/packages/admin-ui/package.json @@ -9,7 +9,7 @@ "build": "node scripts/copy-package-json.js && node scripts/set-version.js && node scripts/build-public-api.js && yarn ng build vendure-admin-lib --configuration production && node scripts/compile-styles.js", "watch": "ng build --watch=true", "test": "ng test --watch=false --browsers=ChromeHeadlessCI --progress=false", - "lint": "tslint --fix", + "lint": "ng lint --fix", "extract-translations": "node scripts/extract-translations.js", "ngcc": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points" }, @@ -68,15 +68,25 @@ }, "devDependencies": { "@angular-devkit/build-angular": "^15.2.1", + "@angular-eslint/builder": "15.2.1", + "@angular-eslint/eslint-plugin": "15.2.1", + "@angular-eslint/eslint-plugin-template": "15.2.1", + "@angular-eslint/schematics": "15.2.1", + "@angular-eslint/template-parser": "15.2.1", "@angular/cli": "15.2.1", "@angular/compiler": "15.2.1", "@angular/compiler-cli": "15.2.1", "@types/jasmine": "~3.6.0", "@types/jasminewd2": "~2.0.6", "@types/node": "^14.14.31", + "@typescript-eslint/eslint-plugin": "5.48.2", + "@typescript-eslint/parser": "5.48.2", "@vendure/ngx-translate-extract": "^8.0.5", - "codelyzer": "^6.0.0", "cross-spawn": "^7.0.3", + "eslint": "^8.33.0", + "eslint-plugin-import": "latest", + "eslint-plugin-jsdoc": "latest", + "eslint-plugin-prefer-arrow": "latest", "fs-extra": "^10.0.0", "jasmine-core": "~3.99.1", "jasmine-spec-reporter": "~7.0.0", @@ -89,7 +99,6 @@ "ng-packagr": "15.2.2", "puppeteer": "^19.7.3", "rimraf": "^3.0.2", - "tslint": "~6.1.3", "typescript": "4.9.5" } } diff --git a/packages/admin-ui/src/lib/catalog/src/catalog.routes.ts b/packages/admin-ui/src/lib/catalog/src/catalog.routes.ts index e30e96b2f6..04c8840ce7 100644 --- a/packages/admin-ui/src/lib/catalog/src/catalog.routes.ts +++ b/packages/admin-ui/src/lib/catalog/src/catalog.routes.ts @@ -123,8 +123,7 @@ export function productBreadcrumb(data: any, params: any) { export function productVariantEditorBreadcrumb(data: any, params: any) { return data.entity.pipe( - map((entity: any) => { - return [ + map((entity: any) => [ { label: _('breadcrumb.products'), link: ['../', 'products'], @@ -137,15 +136,13 @@ export function productVariantEditorBreadcrumb(data: any, params: any) { label: _('breadcrumb.manage-variants'), link: ['manage-variants'], }, - ]; - }), + ]), ); } export function productOptionsEditorBreadcrumb(data: any, params: any) { return data.entity.pipe( - map((entity: any) => { - return [ + map((entity: any) => [ { label: _('breadcrumb.products'), link: ['../', 'products'], @@ -158,8 +155,7 @@ export function productOptionsEditorBreadcrumb(data: any, params: any) { label: _('breadcrumb.product-options'), link: ['options'], }, - ]; - }), + ]), ); } diff --git a/packages/admin-ui/src/lib/catalog/src/components/assets/assets.component.ts b/packages/admin-ui/src/lib/catalog/src/components/assets/assets.component.ts index 82320e0ae5..a966231281 100644 --- a/packages/admin-ui/src/lib/catalog/src/components/assets/assets.component.ts +++ b/packages/admin-ui/src/lib/catalog/src/components/assets/assets.component.ts @@ -45,6 +45,7 @@ export class AssetsComponent { @HostBinding('class.compact') @Input() compact = false; + // eslint-disable-next-line @angular-eslint/no-output-native @Output() change = new EventEmitter(); public assets: Asset[] = []; diff --git a/packages/admin-ui/src/lib/catalog/src/components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component.ts b/packages/admin-ui/src/lib/catalog/src/components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component.ts index 598e6d937f..a84b516b22 100644 --- a/packages/admin-ui/src/lib/catalog/src/components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component.ts +++ b/packages/admin-ui/src/lib/catalog/src/components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component.ts @@ -46,7 +46,7 @@ export class AssignProductsToChannelDialogComponent implements OnInit, Dialog data.channels); combineLatest(activeChannelId$, allChannels$).subscribe(([activeChannelId, channels]) => { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion this.currentChannel = channels.find(c => c.id === activeChannelId)!; this.availableChannels = channels; }); @@ -59,14 +59,12 @@ export class AssignProductsToChannelDialogComponent implements OnInit, Dialog { - return variants.map(v => ({ + map(([variants, factor]) => variants.map(v => ({ id: v.id, name: v.name, price: v.price, pricePreview: v.price * +factor, - })); - }), + }))), ); } @@ -101,7 +99,7 @@ export class AssignProductsToChannelDialogComponent implements OnInit, Dialog { this.notificationService.success(_('catalog.assign-variant-to-channel-success'), { channel: selectedChannel.code, - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion count: this.productVariantIds!.length, }); this.resolveWith(true); diff --git a/packages/admin-ui/src/lib/catalog/src/components/assign-to-channel-dialog/assign-to-channel-dialog.component.ts b/packages/admin-ui/src/lib/catalog/src/components/assign-to-channel-dialog/assign-to-channel-dialog.component.ts index 502bd08f6a..ba63d84d67 100644 --- a/packages/admin-ui/src/lib/catalog/src/components/assign-to-channel-dialog/assign-to-channel-dialog.component.ts +++ b/packages/admin-ui/src/lib/catalog/src/components/assign-to-channel-dialog/assign-to-channel-dialog.component.ts @@ -29,7 +29,7 @@ export class AssignToChannelDialogComponent implements OnInit, Dialog { const allChannels$ = this.dataService.settings.getChannels().mapSingle(data => data.channels); combineLatest(activeChannelId$, allChannels$).subscribe(([activeChannelId, channels]) => { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion this.currentChannel = channels.find(c => c.id === activeChannelId)!; this.availableChannels = channels; }); diff --git a/packages/admin-ui/src/lib/catalog/src/components/collection-detail/collection-detail.component.ts b/packages/admin-ui/src/lib/catalog/src/components/collection-detail/collection-detail.component.ts index 6bd4da1573..0a06fb8891 100644 --- a/packages/admin-ui/src/lib/catalog/src/components/collection-detail/collection-detail.component.ts +++ b/packages/admin-ui/src/lib/catalog/src/components/collection-detail/collection-detail.component.ts @@ -341,16 +341,12 @@ export class CollectionDetailComponent operations: ConfigurableOperation[], formValueOperations: any, ): ConfigurableOperationInput[] { - return operations.map((o, i) => { - return { + return operations.map((o, i) => ({ code: o.code, - arguments: Object.entries(formValueOperations[i].args).map(([name, value], j) => { - return { + arguments: Object.entries(formValueOperations[i].args).map(([name, value], j) => ({ name, value: encodeConfigArgValue(value), - }; - }), - }; - }); + })), + })); } } diff --git a/packages/admin-ui/src/lib/catalog/src/components/collection-list/collection-list.component.ts b/packages/admin-ui/src/lib/catalog/src/components/collection-list/collection-list.component.ts index 5e2dcffa0c..db8be10f9a 100644 --- a/packages/admin-ui/src/lib/catalog/src/components/collection-list/collection-list.component.ts +++ b/packages/admin-ui/src/lib/catalog/src/components/collection-list/collection-list.component.ts @@ -147,8 +147,7 @@ export class CollectionListComponent implements OnInit, OnDestroy { .pipe( take(1), map(items => -1 < items.findIndex(i => i.parent && i.parent.id === id)), - switchMap(hasChildren => { - return this.modalService.dialog({ + switchMap(hasChildren => this.modalService.dialog({ title: _('catalog.confirm-delete-collection'), body: hasChildren ? _('catalog.confirm-delete-collection-and-children-body') @@ -157,8 +156,7 @@ export class CollectionListComponent implements OnInit, OnDestroy { { type: 'secondary', label: _('common.cancel') }, { type: 'danger', label: _('common.delete'), returnValue: true }, ], - }); - }), + })), switchMap(response => (response ? this.dataService.collection.deleteCollection(id) : EMPTY)), ) .subscribe( diff --git a/packages/admin-ui/src/lib/catalog/src/components/collection-tree/array-to-tree.ts b/packages/admin-ui/src/lib/catalog/src/components/collection-tree/array-to-tree.ts index 766e3731af..306b21cec9 100644 --- a/packages/admin-ui/src/lib/catalog/src/components/collection-tree/array-to-tree.ts +++ b/packages/admin-ui/src/lib/catalog/src/components/collection-tree/array-to-tree.ts @@ -41,7 +41,7 @@ export function arrayToTree( } } } - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const rootId = topLevelNodes.length ? topLevelNodes[0].parent!.id : undefined; return { id: rootId, children: topLevelNodes }; } diff --git a/packages/admin-ui/src/lib/catalog/src/components/facet-detail/facet-detail.component.ts b/packages/admin-ui/src/lib/catalog/src/components/facet-detail/facet-detail.component.ts index 37c0e954f9..3fb141a450 100644 --- a/packages/admin-ui/src/lib/catalog/src/components/facet-detail/facet-detail.component.ts +++ b/packages/admin-ui/src/lib/catalog/src/components/facet-detail/facet-detail.component.ts @@ -430,8 +430,7 @@ export class FacetDetailComponent throw new Error(_(`error.facet-value-form-values-do-not-match`)); } return dirtyValues - .map((value, i) => { - return createUpdatedTranslatable({ + .map((value, i) => createUpdatedTranslatable({ translatable: value, updatedFields: dirtyValueValues[i], customFieldConfig: this.customValueFields, @@ -440,8 +439,7 @@ export class FacetDetailComponent languageCode, name: '', }, - }); - }) + })) .filter(notNullOrUndefined); } } diff --git a/packages/admin-ui/src/lib/catalog/src/components/product-detail/product-detail.component.ts b/packages/admin-ui/src/lib/catalog/src/components/product-detail/product-detail.component.ts index 0f1f4932ac..cbbaf3a8c7 100644 --- a/packages/admin-ui/src/lib/catalog/src/components/product-detail/product-detail.component.ts +++ b/packages/admin-ui/src/lib/catalog/src/components/product-detail/product-detail.component.ts @@ -148,8 +148,7 @@ export class ProductDetailComponent skipUntil(initialVariants$), skip(1), debounceTime(100), - switchMap(([term, currentPage, itemsPerPage]) => { - return this.dataService.product + switchMap(([term, currentPage, itemsPerPage]) => this.dataService.product .getProductVariants( { skip: (currentPage - 1) * itemsPerPage, @@ -161,8 +160,7 @@ export class ProductDetailComponent }, this.id, ) - .mapStream(({ productVariants }) => productVariants); - }), + .mapStream(({ productVariants }) => productVariants)), shareReplay({ bufferSize: 1, refCount: true }), ); const updatedVariants$ = variantsList$.pipe(map(result => result.items)); @@ -195,7 +193,7 @@ export class ProductDetailComponent const productFacetValues$ = this.product$.pipe(map(product => product.facetValues)); const productGroup = this.getProductFormGroup(); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const formFacetValueIdChanges$ = productGroup.get('facetValueIds')!.valueChanges.pipe( skip(1), distinctUntilChanged(), @@ -250,15 +248,13 @@ export class ProductDetailComponent this.productChannels$ .pipe( take(1), - switchMap(channels => { - return this.modalService.fromComponent(AssignProductsToChannelDialogComponent, { + switchMap(channels => this.modalService.fromComponent(AssignProductsToChannelDialogComponent, { size: 'lg', locals: { productIds: [this.id], currentChannelIds: channels.map(c => c.id), }, - }); - }), + })), ) .subscribe(); } @@ -266,8 +262,7 @@ export class ProductDetailComponent removeFromChannel(channelId: string) { from(getChannelCodeFromUserStatus(this.dataService, channelId)) .pipe( - switchMap(({ channelCode }) => { - return this.modalService.dialog({ + switchMap(({ channelCode }) => this.modalService.dialog({ title: _('catalog.remove-product-from-channel'), buttons: [ { type: 'secondary', label: _('common.cancel') }, @@ -278,8 +273,7 @@ export class ProductDetailComponent returnValue: true, }, ], - }); - }), + })), switchMap(response => response ? this.dataService.product.removeProductsFromChannel({ @@ -315,8 +309,7 @@ export class ProductDetailComponent removeVariantFromChannel({ channelId, variant }: { channelId: string; variant: ProductVariantFragment }) { from(getChannelCodeFromUserStatus(this.dataService, channelId)) .pipe( - switchMap(({ channelCode }) => { - return this.modalService.dialog({ + switchMap(({ channelCode }) => this.modalService.dialog({ title: _('catalog.remove-product-variant-from-channel'), buttons: [ { type: 'secondary', label: _('common.cancel') }, @@ -327,8 +320,7 @@ export class ProductDetailComponent returnValue: true, }, ], - }); - }), + })), switchMap(response => response ? this.dataService.product.removeVariantsFromChannel({ @@ -423,9 +415,7 @@ export class ProductDetailComponent variantsToCreateAreValid(): boolean { return ( 0 < this.createVariantsConfig.variants.length && - this.createVariantsConfig.variants.every(v => { - return v.sku !== ''; - }) + this.createVariantsConfig.variants.every(v => v.sku !== '') ); } @@ -470,7 +460,7 @@ export class ProductDetailComponent this.router.navigate(['../', productId], { relativeTo: this.route }); }, err => { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.error(err); this.notificationService.error(_('common.notify-create-error'), { entity: 'Product', diff --git a/packages/admin-ui/src/lib/catalog/src/components/product-list/product-list.component.ts b/packages/admin-ui/src/lib/catalog/src/components/product-list/product-list.component.ts index 5ac1edd881..ea87d1f828 100644 --- a/packages/admin-ui/src/lib/catalog/src/components/product-list/product-list.component.ts +++ b/packages/admin-ui/src/lib/catalog/src/components/product-list/product-list.component.ts @@ -82,7 +82,7 @@ export class ProductListComponent (...args: any[]) => this.dataService.product.searchProducts(this.searchTerm, ...args).refetchOnChannelChange(), data => data.search, - // tslint:disable-next-line:no-shadowed-variable + // eslint-disable-next-line @typescript-eslint/no-shadow (skip, take) => ({ input: { skip, diff --git a/packages/admin-ui/src/lib/catalog/src/components/product-options-editor/product-options-editor.component.ts b/packages/admin-ui/src/lib/catalog/src/components/product-options-editor/product-options-editor.component.ts index 8b72ee7a13..a17e6d06fd 100644 --- a/packages/admin-ui/src/lib/catalog/src/components/product-options-editor/product-options-editor.component.ts +++ b/packages/admin-ui/src/lib/catalog/src/components/product-options-editor/product-options-editor.component.ts @@ -81,7 +81,7 @@ export class ProductOptionsEditorComponent extends BaseDetailComponent data.product!); combineLatest(this.entity$, this.languageCode$, $product) .pipe( diff --git a/packages/admin-ui/src/lib/catalog/src/components/product-variants-editor/product-variants-editor.component.ts b/packages/admin-ui/src/lib/catalog/src/components/product-variants-editor/product-variants-editor.component.ts index 85d3cf30e8..7156363daf 100644 --- a/packages/admin-ui/src/lib/catalog/src/components/product-variants-editor/product-variants-editor.component.ts +++ b/packages/admin-ui/src/lib/catalog/src/components/product-variants-editor/product-variants-editor.component.ts @@ -328,12 +328,10 @@ export class ProductVariantsEditorComponent implements OnInit, DeactivateAware { } private checkUniqueSkus() { - const withDuplicateSkus = this.generatedVariants.filter((variant, index) => { - return ( + const withDuplicateSkus = this.generatedVariants.filter((variant, index) => ( variant.enabled && this.generatedVariants.find(gv => gv.sku.trim() === variant.sku.trim() && gv !== variant) - ); - }); + )); if (withDuplicateSkus.length) { return this.modalService .dialog({ @@ -357,9 +355,7 @@ export class ProductVariantsEditorComponent implements OnInit, DeactivateAware { }, }) .pipe( - mergeMap(res => { - return res === true ? of(true) : EMPTY; - }), + mergeMap(res => res === true ? of(true) : EMPTY), ); } else { return of(true); @@ -381,12 +377,10 @@ export class ProductVariantsEditorComponent implements OnInit, DeactivateAware { ): Observable> { if (createdOptionGroups.length) { return forkJoin( - createdOptionGroups.map(optionGroup => { - return this.dataService.product.addOptionGroupToProduct({ + createdOptionGroups.map(optionGroup => this.dataService.product.addOptionGroupToProduct({ productId: this.product.id, optionGroupId: optionGroup.id, - }); - }), + })), ).pipe(map(() => createdOptionGroups)); } else { return of([]); @@ -493,9 +487,9 @@ export class ProductVariantsEditorComponent implements OnInit, DeactivateAware { initOptionsAndVariants() { this.dataService.product - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion .getProductVariantsOptions(this.route.snapshot.paramMap.get('id')!) - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion .mapSingle(({ product }) => product!) .subscribe(p => { this.product = p; @@ -503,8 +497,7 @@ export class ProductVariantsEditorComponent implements OnInit, DeactivateAware { const allUsedOptionGroupIds = p.variants .map(v => v.options.map(option => option.groupId)) .flat(); - this.optionGroups = p.optionGroups.map(og => { - return { + this.optionGroups = p.optionGroups.map(og => ({ id: og.id, isNew: false, name: og.name, @@ -514,8 +507,7 @@ export class ProductVariantsEditorComponent implements OnInit, DeactivateAware { name: o.name, locked: allUsedOptionIds.includes(o.id), })), - }; - }); + })); this.generateVariants(); }); } diff --git a/packages/admin-ui/src/lib/catalog/src/components/variant-price-detail/variant-price-detail.component.ts b/packages/admin-ui/src/lib/catalog/src/components/variant-price-detail/variant-price-detail.component.ts index acb1b335a7..355e615bac 100644 --- a/packages/admin-ui/src/lib/catalog/src/components/variant-price-detail/variant-price-detail.component.ts +++ b/packages/admin-ui/src/lib/catalog/src/components/variant-price-detail/variant-price-detail.component.ts @@ -50,9 +50,7 @@ export class VariantPriceDetailComponent implements OnInit, OnChanges { ); this.grossPrice$ = combineLatest(this.taxRate$, this.priceChange$).pipe( - map(([taxRate, price]) => { - return Math.round(price * ((100 + taxRate) / 100)); - }), + map(([taxRate, price]) => Math.round(price * ((100 + taxRate) / 100))), ); } diff --git a/packages/admin-ui/src/lib/catalog/src/providers/product-detail/product-detail.service.ts b/packages/admin-ui/src/lib/catalog/src/providers/product-detail/product-detail.service.ts index f638f200d3..1de1eafab5 100644 --- a/packages/admin-ui/src/lib/catalog/src/providers/product-detail/product-detail.service.ts +++ b/packages/admin-ui/src/lib/catalog/src/providers/product-detail/product-detail.service.ts @@ -53,18 +53,14 @@ export class ProductDetailService { mergeMap(([{ createProduct }, optionGroups]) => { const addOptionsToProduct$ = optionGroups.length ? forkJoin( - optionGroups.map(optionGroup => { - return this.dataService.product.addOptionGroupToProduct({ + optionGroups.map(optionGroup => this.dataService.product.addOptionGroupToProduct({ productId: createProduct.id, optionGroupId: optionGroup.id, - }); - }), + })), ) : of([]); return addOptionsToProduct$.pipe( - map(() => { - return { createProduct, optionGroups }; - }), + map(() => ({ createProduct, optionGroups })), ); }), mergeMap(({ createProduct, optionGroups }) => { @@ -94,8 +90,7 @@ export class ProductDetailService { createProductOptionGroups(groups: Array<{ name: string; values: string[] }>, languageCode: LanguageCode) { return groups.length ? forkJoin( - groups.map(c => { - return this.dataService.product + groups.map(c => this.dataService.product .createProductOptionGroups({ code: normalizeString(c.name, '-'), translations: [{ languageCode, name: c.name }], @@ -104,8 +99,7 @@ export class ProductDetailService { translations: [{ languageCode, name: v }], })), }) - .pipe(map(data => data.createProductOptionGroup)); - }), + .pipe(map(data => data.createProductOptionGroup))), ) : of([]); } diff --git a/packages/admin-ui/src/lib/core/src/app.component.ts b/packages/admin-ui/src/lib/core/src/app.component.ts index e67f3b386f..b4422b708f 100644 --- a/packages/admin-ui/src/lib/core/src/app.component.ts +++ b/packages/admin-ui/src/lib/core/src/app.component.ts @@ -45,14 +45,10 @@ export class AppComponent implements OnInit { .mapStream(({ userStatus }) => userStatus.isLoggedIn) .pipe( filter(loggedIn => loggedIn === true), - switchMap(() => { - return this.dataService.client.uiState().mapStream(data => data.uiState.contentLanguage); - }), - switchMap(contentLang => { - return this.serverConfigService + switchMap(() => this.dataService.client.uiState().mapStream(data => data.uiState.contentLanguage)), + switchMap(contentLang => this.serverConfigService .getAvailableLanguages() - .pipe(map(available => [contentLang, available] as const)); - }), + .pipe(map(available => [contentLang, available] as const))), ) .subscribe({ next: ([contentLanguage, availableLanguages]) => { @@ -64,7 +60,7 @@ export class AppComponent implements OnInit { }); if (isDevMode()) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.log( `%cVendure Admin UI: Press "ctrl/cmd + u" to view UI extension points`, `color: #17C1FF; font-weight: bold;`, diff --git a/packages/admin-ui/src/lib/core/src/common/base-list.component.ts b/packages/admin-ui/src/lib/core/src/common/base-list.component.ts index 41183d438e..a86b401fb0 100644 --- a/packages/admin-ui/src/lib/core/src/common/base-list.component.ts +++ b/packages/admin-ui/src/lib/core/src/common/base-list.component.ts @@ -85,7 +85,7 @@ export type ItemOf = T[K] extends { items: infer R } * @docsCategory list-detail-views */ @Directive() -// tslint:disable-next-line:directive-class-suffix +// eslint-disable-next-line @angular-eslint/directive-class-suffix export class BaseListComponent = any> implements OnInit, OnDestroy { diff --git a/packages/admin-ui/src/lib/core/src/common/generated-types.ts b/packages/admin-ui/src/lib/core/src/common/generated-types.ts index 3af5a7c8a0..0cf6ac2be6 100644 --- a/packages/admin-ui/src/lib/core/src/common/generated-types.ts +++ b/packages/admin-ui/src/lib/core/src/common/generated-types.ts @@ -1,4 +1,4 @@ -// tslint:disable +/* eslint-disable */ export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; diff --git a/packages/admin-ui/src/lib/core/src/common/introspection-result.ts b/packages/admin-ui/src/lib/core/src/common/introspection-result.ts index 4003d5cf26..3ac6781742 100644 --- a/packages/admin-ui/src/lib/core/src/common/introspection-result.ts +++ b/packages/admin-ui/src/lib/core/src/common/introspection-result.ts @@ -1,4 +1,4 @@ -// tslint:disable +/* eslint-disable */ export interface PossibleTypesResultData { possibleTypes: { diff --git a/packages/admin-ui/src/lib/core/src/common/utilities/configurable-operation-utils.ts b/packages/admin-ui/src/lib/core/src/common/utilities/configurable-operation-utils.ts index cf67e170d8..5852caab2f 100644 --- a/packages/admin-ui/src/lib/core/src/common/utilities/configurable-operation-utils.ts +++ b/packages/admin-ui/src/lib/core/src/common/utilities/configurable-operation-utils.ts @@ -33,12 +33,10 @@ export function configurableDefinitionToInstance( ): ConfigurableOperation { return { ...def, - args: def.args.map(arg => { - return { + args: def.args.map(arg => ({ ...arg, value: getDefaultConfigArgValue(arg), - }; - }), + })), } as ConfigurableOperation; } diff --git a/packages/admin-ui/src/lib/core/src/common/utilities/create-updated-translatable.spec.ts b/packages/admin-ui/src/lib/core/src/common/utilities/create-updated-translatable.spec.ts index a8f4f6e15c..973106b774 100644 --- a/packages/admin-ui/src/lib/core/src/common/utilities/create-updated-translatable.spec.ts +++ b/packages/admin-ui/src/lib/core/src/common/utilities/create-updated-translatable.spec.ts @@ -4,7 +4,7 @@ import { CustomFieldConfig, LanguageCode, ProductDetailFragment } from '../gener import { createUpdatedTranslatable } from './create-updated-translatable'; -// tslint:disable:no-non-null-assertion +/* eslint-disable @typescript-eslint/no-non-null-assertion */ describe('createUpdatedTranslatable()', () => { let product: any; diff --git a/packages/admin-ui/src/lib/core/src/common/utilities/string-to-color.ts b/packages/admin-ui/src/lib/core/src/common/utilities/string-to-color.ts index c28b4dd3d9..dd035f848a 100644 --- a/packages/admin-ui/src/lib/core/src/common/utilities/string-to-color.ts +++ b/packages/admin-ui/src/lib/core/src/common/utilities/string-to-color.ts @@ -28,8 +28,6 @@ export function stringToColor(input: string): string { '#7A7574', '#767676', ]; - const value = input.split('').reduce((prev, curr, index) => { - return prev + Math.round(curr.charCodeAt(0) * Math.log(index + 2)); - }, 0); + const value = input.split('').reduce((prev, curr, index) => prev + Math.round(curr.charCodeAt(0) * Math.log(index + 2)), 0); return safeColors[value % safeColors.length]; } diff --git a/packages/admin-ui/src/lib/core/src/components/breadcrumb/breadcrumb.component.spec.ts b/packages/admin-ui/src/lib/core/src/components/breadcrumb/breadcrumb.component.spec.ts index adedffa5f4..59ba8ca613 100644 --- a/packages/admin-ui/src/lib/core/src/components/breadcrumb/breadcrumb.component.spec.ts +++ b/packages/admin-ui/src/lib/core/src/components/breadcrumb/breadcrumb.component.spec.ts @@ -244,7 +244,7 @@ describe('BeadcrumbsComponent', () => { return fakeAsync(() => { const fixture = TestBed.createComponent(TestChildComponent); // Run in ngZone to prevent warning: https://github.com/angular/angular/issues/25837#issuecomment-445796236 - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion fixture.ngZone!.run(() => { router.navigate(route); }); @@ -437,8 +437,8 @@ function getBreadcrumbLinks(fixture: ComponentFixture): string[] .filter(notNullOrUndefined); } -// tslint:disable component-selector @Component({ + // eslint-disable-next-line @angular-eslint/component-selector selector: 'test-root-component', template: ` @@ -448,10 +448,9 @@ function getBreadcrumbLinks(fixture: ComponentFixture): string[] class TestParentComponent {} @Component({ + // eslint-disable-next-line @angular-eslint/component-selector selector: 'test-child-component', - template: ` - - `, + template: ` `, }) class TestChildComponent {} diff --git a/packages/admin-ui/src/lib/core/src/components/breadcrumb/breadcrumb.component.ts b/packages/admin-ui/src/lib/core/src/components/breadcrumb/breadcrumb.component.ts index 80833d95ea..fc0089d6fc 100644 --- a/packages/admin-ui/src/lib/core/src/components/breadcrumb/breadcrumb.component.ts +++ b/packages/admin-ui/src/lib/core/src/components/breadcrumb/breadcrumb.component.ts @@ -3,7 +3,6 @@ import { ActivatedRoute, Data, NavigationEnd, Params, PRIMARY_OUTLET, Router } f import { flatten } from 'lodash'; import { combineLatest as observableCombineLatest, Observable, of as observableOf, Subject } from 'rxjs'; import { filter, map, startWith, switchMap, takeUntil } from 'rxjs/operators'; - import { DataService } from '../../data/providers/data.service'; export type BreadcrumbString = string; @@ -55,28 +54,29 @@ export class BreadcrumbComponent implements OnDestroy { rootRoute: ActivatedRoute, ): Observable; label: string }>> { const breadcrumbParts = this.assembleBreadcrumbParts(rootRoute); - const breadcrumbObservables$ = breadcrumbParts.map(({ value$, path }) => { - return value$.pipe( - map(value => { - if (isBreadcrumbLabelLinkPair(value)) { - return { - label: value.label, - link: this.normalizeRelativeLinks(value.link, path), - }; - } else if (isBreadcrumbPairArray(value)) { - return value.map(val => ({ - label: val.label, - link: this.normalizeRelativeLinks(val.link, path), - })); - } else { - return { - label: value, - link: '/' + path.join('/'), - }; - } - }), - ) as Observable; - }); + const breadcrumbObservables$ = breadcrumbParts.map( + ({ value$, path }) => + value$.pipe( + map(value => { + if (isBreadcrumbLabelLinkPair(value)) { + return { + label: value.label, + link: this.normalizeRelativeLinks(value.link, path), + }; + } else if (isBreadcrumbPairArray(value)) { + return value.map(val => ({ + label: val.label, + link: this.normalizeRelativeLinks(val.link, path), + })); + } else { + return { + label: value, + link: '/' + path.join('/'), + }; + } + }), + ) as Observable, + ); return observableCombineLatest(breadcrumbObservables$).pipe(map(links => flatten(links))); } diff --git a/packages/admin-ui/src/lib/core/src/components/channel-switcher/channel-switcher.component.ts b/packages/admin-ui/src/lib/core/src/components/channel-switcher/channel-switcher.component.ts index e8acc1baf0..ec924db017 100644 --- a/packages/admin-ui/src/lib/core/src/components/channel-switcher/channel-switcher.component.ts +++ b/packages/admin-ui/src/lib/core/src/components/channel-switcher/channel-switcher.component.ts @@ -26,13 +26,11 @@ export class ChannelSwitcherComponent implements OnInit { const channels$ = this.dataService.client.userStatus().mapStream(data => data.userStatus.channels); const filterTerm$ = this.filterControl.valueChanges.pipe(startWith('')); this.channels$ = combineLatest(channels$, filterTerm$).pipe( - map(([channels, filterTerm]) => { - return filterTerm + map(([channels, filterTerm]) => filterTerm ? channels.filter(c => c.code.toLocaleLowerCase().includes(filterTerm.toLocaleLowerCase()), ) - : channels; - }), + : channels), ); this.channelCount$ = channels$.pipe(map(channels => channels.length)); const activeChannel$ = this.dataService.client diff --git a/packages/admin-ui/src/lib/core/src/components/notification/notification.component.ts b/packages/admin-ui/src/lib/core/src/components/notification/notification.component.ts index a44627c854..145ddfb1f0 100644 --- a/packages/admin-ui/src/lib/core/src/components/notification/notification.component.ts +++ b/packages/admin-ui/src/lib/core/src/components/notification/notification.component.ts @@ -16,7 +16,7 @@ export class NotificationComponent { isVisible = true; private onClickFn: () => void = () => { /* */ - } + }; registerOnClickFn(fn: () => void): void { this.onClickFn = fn; diff --git a/packages/admin-ui/src/lib/core/src/data/client-state/client-resolvers.ts b/packages/admin-ui/src/lib/core/src/data/client-state/client-resolvers.ts index 9df483bf17..208782996c 100644 --- a/packages/admin-ui/src/lib/core/src/data/client-state/client-resolvers.ts +++ b/packages/admin-ui/src/lib/core/src/data/client-state/client-resolvers.ts @@ -18,17 +18,13 @@ export type ResolverDefinition = { export const clientResolvers: ResolverDefinition = { Mutation: { - requestStarted: (_, args, { cache }): number => { - return updateRequestsInFlight(cache, 1); - }, - requestCompleted: (_, args, { cache }): number => { - return updateRequestsInFlight(cache, -1); - }, + requestStarted: (_, args, { cache }): number => updateRequestsInFlight(cache, 1), + requestCompleted: (_, args, { cache }): number => updateRequestsInFlight(cache, -1), setAsLoggedIn: (_, args: Codegen.SetAsLoggedInMutationVariables, { cache }): UserStatus => { const { input: { username, loginTime, channels, activeChannelId }, } = args; - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const permissions = channels.find(c => c.id === activeChannelId)!.permissions; const data: { userStatus: UserStatus } = { userStatus: { @@ -60,14 +56,14 @@ export const clientResolvers: ResolverDefinition = { return data.userStatus; }, setUiLanguage: (_, args: Codegen.SetUiLanguageMutationVariables, { cache }): LanguageCode => { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const previous = cache.readQuery({ query: GET_UI_STATE })!; const data = updateUiState(previous, 'language', args.languageCode); cache.writeQuery({ query: GET_UI_STATE, data }); return args.languageCode; }, setUiLocale: (_, args: Codegen.SetUiLocaleMutationVariables, { cache }): string | undefined => { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const previous = cache.readQuery({ query: GET_UI_STATE })!; const data = updateUiState(previous, 'locale', args.locale); cache.writeQuery({ query: GET_UI_STATE, data }); @@ -78,14 +74,14 @@ export const clientResolvers: ResolverDefinition = { args: Codegen.SetContentLanguageMutationVariables, { cache }, ): LanguageCode => { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const previous = cache.readQuery({ query: GET_UI_STATE })!; const data = updateUiState(previous, 'contentLanguage', args.languageCode); cache.writeQuery({ query: GET_UI_STATE, data }); return args.languageCode; }, setUiTheme: (_, args: Codegen.SetUiThemeMutationVariables, { cache }): string => { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const previous = cache.readQuery({ query: GET_UI_STATE })!; const data = updateUiState(previous, 'theme', args.theme); cache.writeQuery({ query: GET_UI_STATE, data }); @@ -96,14 +92,14 @@ export const clientResolvers: ResolverDefinition = { args: Codegen.SetDisplayUiExtensionPointsMutationVariables, { cache }, ): boolean => { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const previous = cache.readQuery({ query: GET_UI_STATE })!; const data = updateUiState(previous, 'displayUiExtensionPoints', args.display); cache.writeQuery({ query: GET_UI_STATE, data }); return args.display; }, setActiveChannel: (_, args: Codegen.SetActiveChannelMutationVariables, { cache }): UserStatus => { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const previous = cache.readQuery({ query: GET_USER_STATUS })!; const activeChannel = previous.userStatus.channels.find(c => c.id === args.channelId); if (!activeChannel) { @@ -121,7 +117,7 @@ export const clientResolvers: ResolverDefinition = { return data.userStatus; }, updateUserChannels: (_, args: Codegen.UpdateUserChannelsMutationVariables, { cache }): UserStatus => { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const previous = cache.readQuery({ query: GET_USER_STATUS })!; const data = { userStatus: { diff --git a/packages/admin-ui/src/lib/core/src/data/providers/fetch-adapter.ts b/packages/admin-ui/src/lib/core/src/data/providers/fetch-adapter.ts index b0f9912aca..4e9b0a9590 100644 --- a/packages/admin-ui/src/lib/core/src/data/providers/fetch-adapter.ts +++ b/packages/admin-ui/src/lib/core/src/data/providers/fetch-adapter.ts @@ -23,11 +23,9 @@ export class FetchAdapter { responseType: 'json', withCredentials: true, }), - ).then(result => { - return new Response(JSON.stringify(result.body), { + ).then(result => new Response(JSON.stringify(result.body), { status: result.status, statusText: result.statusText, - }); - }); + })); }; } diff --git a/packages/admin-ui/src/lib/core/src/data/utils/add-custom-fields.spec.ts b/packages/admin-ui/src/lib/core/src/data/utils/add-custom-fields.spec.ts index c56e85b5f4..8b88148376 100644 --- a/packages/admin-ui/src/lib/core/src/data/utils/add-custom-fields.spec.ts +++ b/packages/admin-ui/src/lib/core/src/data/utils/add-custom-fields.spec.ts @@ -4,7 +4,7 @@ import { CustomFields } from '../../common/generated-types'; import { addCustomFields } from './add-custom-fields'; -// tslint:disable:no-non-null-assertion +/* eslint-disable @typescript-eslint/no-non-null-assertion */ describe('addCustomFields()', () => { let documentNode: DocumentNode; diff --git a/packages/admin-ui/src/lib/core/src/data/utils/add-custom-fields.ts b/packages/admin-ui/src/lib/core/src/data/utils/add-custom-fields.ts index 0c1c7cacbf..f6da96c662 100644 --- a/packages/admin-ui/src/lib/core/src/data/utils/add-custom-fields.ts +++ b/packages/admin-ui/src/lib/core/src/data/utils/add-custom-fields.ts @@ -38,8 +38,7 @@ export function addCustomFields(documentNode: DocumentNode, customFields: Custom kind: Kind.FIELD, selectionSet: { kind: Kind.SELECTION_SET, - selections: customFieldsForType.map(customField => { - return { + selections: customFieldsForType.map(customField => ({ kind: Kind.FIELD, name: { kind: Kind.NAME, @@ -60,8 +59,7 @@ export function addCustomFields(documentNode: DocumentNode, customFields: Custom }, } : {}), - } as FieldNode; - }), + } as FieldNode)), }, }); @@ -80,15 +78,13 @@ export function addCustomFields(documentNode: DocumentNode, customFields: Custom kind: Kind.FIELD, selectionSet: { kind: Kind.SELECTION_SET, - selections: localeStrings.map(customField => { - return { + selections: localeStrings.map(customField => ({ kind: Kind.FIELD, name: { kind: Kind.NAME, value: customField.name, }, - } as FieldNode; - }), + } as FieldNode)), }, }); } diff --git a/packages/admin-ui/src/lib/core/src/providers/bulk-action-registry/bulk-action-registry.service.ts b/packages/admin-ui/src/lib/core/src/providers/bulk-action-registry/bulk-action-registry.service.ts index 6191472aa8..697d663b59 100644 --- a/packages/admin-ui/src/lib/core/src/providers/bulk-action-registry/bulk-action-registry.service.ts +++ b/packages/admin-ui/src/lib/core/src/providers/bulk-action-registry/bulk-action-registry.service.ts @@ -12,7 +12,7 @@ export class BulkActionRegistryService { if (!this.locationBulActionMap.has(bulkAction.location)) { this.locationBulActionMap.set(bulkAction.location, new Set([bulkAction])); } else { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion this.locationBulActionMap.get(bulkAction.location)!.add(bulkAction); } } diff --git a/packages/admin-ui/src/lib/core/src/providers/dashboard-widget/dashboard-widget.service.ts b/packages/admin-ui/src/lib/core/src/providers/dashboard-widget/dashboard-widget.service.ts index 9af595b3b8..1e49f21b65 100644 --- a/packages/admin-ui/src/lib/core/src/providers/dashboard-widget/dashboard-widget.service.ts +++ b/packages/admin-ui/src/lib/core/src/providers/dashboard-widget/dashboard-widget.service.ts @@ -29,17 +29,13 @@ export class DashboardWidgetService { } getAvailableIds(currentUserPermissions: Permission[]): string[] { - const hasAllPermissions = (requiredPerms: string[], userPerms: string[]): boolean => { - return requiredPerms.every(p => userPerms.includes(p)); - }; + const hasAllPermissions = (requiredPerms: string[], userPerms: string[]): boolean => requiredPerms.every(p => userPerms.includes(p)); return [...this.registry.entries()] - .filter(([id, config]) => { - return ( + .filter(([id, config]) => ( !config.requiresPermissions || hasAllPermissions(config.requiresPermissions, currentUserPermissions) - ); - }) + )) .map(([id]) => id); } @@ -70,7 +66,7 @@ export class DashboardWidgetService { } private idNotFound(id: string): undefined { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.error( `No dashboard widget was found with the id "${id}"\nAvailable ids: ${[...this.registry.keys()] .map(_id => `"${_id}"`) @@ -92,7 +88,7 @@ export class DashboardWidgetService { // Fall back to the largest supported width const sortedWidths = supportedWidths.sort((a, b) => a - b); const fallbackWidth = supportedWidths[sortedWidths.length - 1]; - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.error( `The "${id}" widget does not support the specified width (${targetWidth}).\nSupported widths are: [${sortedWidths.join( ', ', diff --git a/packages/admin-ui/src/lib/core/src/providers/health-check/health-check.service.ts b/packages/admin-ui/src/lib/core/src/providers/health-check/health-check.service.ts index 2b9b8944f7..c7ce8a9c7f 100644 --- a/packages/admin-ui/src/lib/core/src/providers/health-check/health-check.service.ts +++ b/packages/admin-ui/src/lib/core/src/providers/health-check/health-check.service.ts @@ -47,9 +47,7 @@ export class HealthCheckService { this.status$ = result$.pipe(map(res => res.status)); this.details$ = result$.pipe( map(res => - Object.keys(res.details).map(key => { - return { key, result: res.details[key] }; - }), + Object.keys(res.details).map(key => ({ key, result: res.details[key] })), ), ); this.lastCheck$ = result$.pipe(map(res => res.lastChecked)); diff --git a/packages/admin-ui/src/lib/core/src/providers/i18n/custom-message-format-compiler.ts b/packages/admin-ui/src/lib/core/src/providers/i18n/custom-message-format-compiler.ts index 54e6ddab36..325d3c3cc4 100644 --- a/packages/admin-ui/src/lib/core/src/providers/i18n/custom-message-format-compiler.ts +++ b/packages/admin-ui/src/lib/core/src/providers/i18n/custom-message-format-compiler.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-console */ +/* eslint-disable no-console */ import { Injectable } from '@angular/core'; import { TranslateMessageFormatCompiler, diff --git a/packages/admin-ui/src/lib/core/src/providers/local-storage/local-storage.service.ts b/packages/admin-ui/src/lib/core/src/providers/local-storage/local-storage.service.ts index b1582de4ad..fe81d8d3c1 100644 --- a/packages/admin-ui/src/lib/core/src/providers/local-storage/local-storage.service.ts +++ b/packages/admin-ui/src/lib/core/src/providers/local-storage/local-storage.service.ts @@ -68,7 +68,7 @@ export class LocalStorageService { try { result = JSON.parse(item || 'null'); } catch (e: any) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.error(`Could not parse the localStorage value for "${key}" (${item})`); } return result; diff --git a/packages/admin-ui/src/lib/core/src/providers/nav-builder/nav-builder.service.spec.ts b/packages/admin-ui/src/lib/core/src/providers/nav-builder/nav-builder.service.spec.ts index d670d82e89..8b17cc73b7 100644 --- a/packages/admin-ui/src/lib/core/src/providers/nav-builder/nav-builder.service.spec.ts +++ b/packages/admin-ui/src/lib/core/src/providers/nav-builder/nav-builder.service.spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion no-console */ +/* eslint-disable @typescript-eslint/no-non-null-assertion, no-console */ import { TestBed } from '@angular/core/testing'; import { take } from 'rxjs/operators'; diff --git a/packages/admin-ui/src/lib/core/src/providers/nav-builder/nav-builder.service.ts b/packages/admin-ui/src/lib/core/src/providers/nav-builder/nav-builder.service.ts index 5e329932ec..79e74e5dcd 100644 --- a/packages/admin-ui/src/lib/core/src/providers/nav-builder/nav-builder.service.ts +++ b/packages/admin-ui/src/lib/core/src/providers/nav-builder/nav-builder.service.ts @@ -241,7 +241,7 @@ export class NavBuilderService { for (const item of additionalItems) { const section = sections.find(s => s.id === item.sectionId); if (!section) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.error( `Could not add menu item "${item.config.id}", section "${item.sectionId}" does not exist`, ); diff --git a/packages/admin-ui/src/lib/core/src/shared/components/asset-preview-dialog/asset-preview-dialog.component.ts b/packages/admin-ui/src/lib/core/src/shared/components/asset-preview-dialog/asset-preview-dialog.component.ts index 621b2d8fe6..ceaee5b309 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/asset-preview-dialog/asset-preview-dialog.component.ts +++ b/packages/admin-ui/src/lib/core/src/shared/components/asset-preview-dialog/asset-preview-dialog.component.ts @@ -26,7 +26,7 @@ export class AssetPreviewDialogComponent implements Dialog, OnInit { if (this.hasTags(asset)) { return of(asset); } else { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion return this.dataService.product.getAsset(asset.id).mapSingle(data => data.asset!); } }), diff --git a/packages/admin-ui/src/lib/core/src/shared/components/asset-search-input/asset-search-input.component.ts b/packages/admin-ui/src/lib/core/src/shared/components/asset-search-input/asset-search-input.component.ts index 815911f945..c2440e6142 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/asset-search-input/asset-search-input.component.ts +++ b/packages/admin-ui/src/lib/core/src/shared/components/asset-search-input/asset-search-input.component.ts @@ -40,9 +40,7 @@ export class AssetSearchInputComponent { } }); - tags.map(tag => { - return items?.find(item => this.isTag(item) && item.id === tag.id); - }) + tags.map(tag => items?.find(item => this.isTag(item) && item.id === tag.id)) .filter(notNullOrUndefined) .forEach(item => { const isSelected = this.selectComponent.selectedItems.find(i => { @@ -104,7 +102,6 @@ export class AssetSearchInputComponent { return { label: item }; } - private isTag = (input: unknown): input is TagFragment => { - return typeof input === 'object' && !!input && input.hasOwnProperty('value'); - }; + private isTag = (input: unknown): input is TagFragment => + typeof input === 'object' && !!input && input.hasOwnProperty('value'); } diff --git a/packages/admin-ui/src/lib/core/src/shared/components/bulk-action-menu/bulk-action-menu.component.ts b/packages/admin-ui/src/lib/core/src/shared/components/bulk-action-menu/bulk-action-menu.component.ts index 5990e4aa56..72ad5e614b 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/bulk-action-menu/bulk-action-menu.component.ts +++ b/packages/admin-ui/src/lib/core/src/shared/components/bulk-action-menu/bulk-action-menu.component.ts @@ -48,8 +48,8 @@ export class BulkActionMenuComponent implements OnInit, OnDestroy { ngOnInit(): void { const actionsForLocation = this.bulkActionRegistryService.getBulkActionsForLocation(this.locationId); this.actions$ = this.selectionManager.selectionChanges$.pipe( - switchMap(selection => { - return Promise.all( + switchMap(selection => + Promise.all( actionsForLocation.map(async action => { let display = true; let translationVars = {}; @@ -69,8 +69,8 @@ export class BulkActionMenuComponent implements OnInit, OnDestroy { } return { ...action, display, translationVars }; }), - ); - }), + ), + ), ); this.subscription = this.dataService.client .userStatus() diff --git a/packages/admin-ui/src/lib/core/src/shared/components/dropdown/dropdown-item.directive.ts b/packages/admin-ui/src/lib/core/src/shared/components/dropdown/dropdown-item.directive.ts index 3e0384c8de..8809ddb682 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/dropdown/dropdown-item.directive.ts +++ b/packages/admin-ui/src/lib/core/src/shared/components/dropdown/dropdown-item.directive.ts @@ -4,7 +4,7 @@ import { DropdownComponent } from './dropdown.component'; @Directive({ selector: '[vdrDropdownItem]', - // tslint:disable-next-line + // eslint-disable-next-line host: { '[class.dropdown-item]': 'true' }, }) export class DropdownItemDirective { diff --git a/packages/admin-ui/src/lib/core/src/shared/components/form-field/form-field-control.directive.ts b/packages/admin-ui/src/lib/core/src/shared/components/form-field/form-field-control.directive.ts index 257d44aa2f..2da198e1ae 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/form-field/form-field-control.directive.ts +++ b/packages/admin-ui/src/lib/core/src/shared/components/form-field/form-field-control.directive.ts @@ -3,7 +3,7 @@ import { NgControl } from '@angular/forms'; type InputElement = HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement; -// tslint:disable:directive-selector +/* eslint-disable @angular-eslint/directive-selector */ @Directive({ selector: 'input, textarea, select' }) export class FormFieldControlDirective { constructor( diff --git a/packages/admin-ui/src/lib/core/src/shared/components/modal-dialog/modal-dialog.component.ts b/packages/admin-ui/src/lib/core/src/shared/components/modal-dialog/modal-dialog.component.ts index d3cd86d230..ebb55bfa43 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/modal-dialog/modal-dialog.component.ts +++ b/packages/admin-ui/src/lib/core/src/shared/components/modal-dialog/modal-dialog.component.ts @@ -41,7 +41,7 @@ export class ModalDialogComponent> { this.closeModal(result); }; if (this.options && this.options.locals) { - // tslint:disable-next-line + // eslint-disable-next-line for (const key in this.options.locals) { componentInstance[key] = this.options.locals[key] as T[Extract]; } diff --git a/packages/admin-ui/src/lib/core/src/shared/components/product-search-input/product-search-input.component.ts b/packages/admin-ui/src/lib/core/src/shared/components/product-search-input/product-search-input.component.ts index c37edb964c..97a70d00cc 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/product-search-input/product-search-input.component.ts +++ b/packages/admin-ui/src/lib/core/src/shared/components/product-search-input/product-search-input.component.ts @@ -42,9 +42,7 @@ export class ProductSearchInputComponent { } }); - ids.map(id => { - return items?.find(item => this.isFacetValueItem(item) && item.facetValue.id === id); - }) + ids.map(id => items?.find(item => this.isFacetValueItem(item) && item.facetValue.id === id)) .filter(notNullOrUndefined) .forEach(item => { const isSelected = this.selectComponent.selectedItems.find(i => { @@ -111,7 +109,6 @@ export class ProductSearchInputComponent { return this.selectComponent.itemsList.markedIndex === -1; } - private isFacetValueItem = (input: unknown): input is FacetValueResult => { - return typeof input === 'object' && !!input && input.hasOwnProperty('facetValue'); - }; + private isFacetValueItem = (input: unknown): input is FacetValueResult => + typeof input === 'object' && !!input && input.hasOwnProperty('facetValue'); } diff --git a/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/context-menu/context-menu.service.ts b/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/context-menu/context-menu.service.ts index 1b982ee311..65d1f8b2ec 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/context-menu/context-menu.service.ts +++ b/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/context-menu/context-menu.service.ts @@ -39,8 +39,8 @@ export class ContextMenuService { const source$ = this.setContextMenuConfig$.asObservable(); const groupedConfig$ = source$.pipe( bufferWhen(() => source$.pipe(debounceTime(50))), - map(group => { - return group.reduce((acc, cur) => { + map(group => + group.reduce((acc, cur) => { if (!acc) { return cur; } else { @@ -53,8 +53,8 @@ export class ContextMenuService { } } return acc; - }, undefined as ContextMenuConfig | undefined); - }), + }, undefined as ContextMenuConfig | undefined), + ), ); const visible$ = this.menuIsVisible$.pipe(filter(val => val === true)); diff --git a/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/inputrules.ts b/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/inputrules.ts index 8577a9b748..f342f7e608 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/inputrules.ts +++ b/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/inputrules.ts @@ -60,7 +60,7 @@ export function headingRule(nodeType, maxLevel) { export function buildInputRules(schema: Schema): Plugin { const rules = smartQuotes.concat(ellipsis, emDash); let type: NodeType; - // tslint:disable:no-conditional-assignment + /* eslint-disable no-cond-assign */ if ((type = schema.nodes.blockquote)) { rules.push(blockQuoteRule(type)); } diff --git a/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/keymap.ts b/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/keymap.ts index fc86486e9a..4eab51d96e 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/keymap.ts +++ b/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/keymap.ts @@ -74,7 +74,7 @@ export function buildKeymap(schema: Schema, mapKeys?: Keymap) { bind('Mod-BracketLeft', lift); bind('Escape', selectParentNode); - // tslint:disable:no-conditional-assignment + /* eslint-disable no-cond-assign */ if ((type = schema.marks.strong)) { bind('Mod-b', toggleMark(type)); bind('Mod-B', toggleMark(type)); @@ -99,7 +99,7 @@ export function buildKeymap(schema: Schema, mapKeys?: Keymap) { if ((type = schema.nodes.hard_break)) { const br = type; const cmd = chainCommands(exitCode, (state, dispatch) => { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion dispatch!(state.tr.replaceSelectionWith(br.create()).scrollIntoView()); return true; }); diff --git a/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/menu/menu.ts b/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/menu/menu.ts index 7cfc2da380..8f70d4909a 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/menu/menu.ts +++ b/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/menu/menu.ts @@ -34,7 +34,7 @@ function cmdItem(cmd: (...args: any[]) => void, options: CmdItemOptions) { ? renderClarityIcon({ shape: options.iconShape, size: IconSize.Large }) : undefined, }; - // tslint:disable-next-line:forin + // eslint-disable-next-line guard-for-in for (const prop in options) { passedOptions[prop] = options[prop]; } @@ -52,7 +52,7 @@ function markItem(markType, options: CmdItemOptions) { }, enable: true, }; - // tslint:disable-next-line:forin + // eslint-disable-next-line guard-for-in for (const prop in options) { passedOptions[prop] = options[prop]; } @@ -124,7 +124,7 @@ function wrapListItem(nodeType, options: CmdItemOptions) { export function buildMenuItems(schema: Schema, modalService: ModalService) { const r: Record = {}; let type: MarkType | NodeType; - // tslint:disable:no-conditional-assignment + /* eslint-disable no-cond-assign */ if ((type = schema.marks.strong)) { r.toggleStrong = markItem(type, { title: 'Toggle strong style', diff --git a/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/plugins/image-plugin.ts b/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/plugins/image-plugin.ts index e66b67b163..4fa06a4764 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/plugins/image-plugin.ts +++ b/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/plugins/image-plugin.ts @@ -49,7 +49,7 @@ export function insertImageItem(nodeType: NodeType, modalService: ModalService) }) .subscribe(result => { if (result) { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion view.dispatch(view.state.tr.replaceSelectionWith(nodeType.createAndFill(result)!)); } view.focus(); @@ -60,67 +60,65 @@ export function insertImageItem(nodeType: NodeType, modalService: ModalService) export const imageContextMenuPlugin = (contextMenuService: ContextMenuService, modalService: ModalService) => new Plugin({ - view: () => { - return { - update: view => { - if (!view.hasFocus()) { - return; + view: () => ({ + update: view => { + if (!view.hasFocus()) { + return; + } + const { doc, selection } = view.state; + let imageNode: Node | undefined; + let imageNodePos = 0; + doc.nodesBetween(selection.from, selection.to, (n, pos, parent) => { + if (n.type.name === 'image') { + imageNode = n; + imageNodePos = pos; + return false; } - const { doc, selection } = view.state; - let imageNode: Node | undefined; - let imageNodePos = 0; - doc.nodesBetween(selection.from, selection.to, (n, pos, parent) => { - if (n.type.name === 'image') { - imageNode = n; - imageNodePos = pos; - return false; - } - }); - if (imageNode) { - const node = view.nodeDOM(imageNodePos); - if (node instanceof HTMLImageElement) { - contextMenuService.setContextMenu({ - ref: selection, - title: 'Image', - iconShape: 'image', - element: node, - coords: view.coordsAtPos(imageNodePos), - items: [ - { - enabled: true, - iconShape: 'image', - label: 'Image properties', - onClick: () => { - contextMenuService.clearContextMenu(); - modalService - .fromComponent(ExternalImageDialogComponent, { - closable: true, - locals: { - // tslint:disable-next-line:no-non-null-assertion - existing: imageNode!.attrs as ExternalImageAttrs, - }, - }) - .subscribe(result => { - if (result) { - // tslint:disable-next-line:no-non-null-assertion - view.dispatch( - view.state.tr.replaceSelectionWith( - // tslint:disable-next-line:no-non-null-assertion - imageNode!.type.createAndFill(result)!, - ), - ); - } - view.focus(); - }); - }, + }); + if (imageNode) { + const node = view.nodeDOM(imageNodePos); + if (node instanceof HTMLImageElement) { + contextMenuService.setContextMenu({ + ref: selection, + title: 'Image', + iconShape: 'image', + element: node, + coords: view.coordsAtPos(imageNodePos), + items: [ + { + enabled: true, + iconShape: 'image', + label: 'Image properties', + onClick: () => { + contextMenuService.clearContextMenu(); + modalService + .fromComponent(ExternalImageDialogComponent, { + closable: true, + locals: { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + existing: imageNode!.attrs as ExternalImageAttrs, + }, + }) + .subscribe(result => { + if (result) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + view.dispatch( + view.state.tr.replaceSelectionWith( + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + imageNode!.type.createAndFill(result)!, + ), + ); + } + view.focus(); + }); }, - ], - }); - } - } else { - contextMenuService.clearContextMenu(); + }, + ], + }); } - }, - }; - }, + } else { + contextMenuService.clearContextMenu(); + } + }, + }), }); diff --git a/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/plugins/raw-editor-plugin.ts b/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/plugins/raw-editor-plugin.ts index 656a1abeb7..75ec8df08b 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/plugins/raw-editor-plugin.ts +++ b/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/plugins/raw-editor-plugin.ts @@ -46,7 +46,7 @@ export const rawEditorPlugin = (contextMenuService: ContextMenuService, modalSer onClick: () => { contextMenuService.clearContextMenu(); const element = domSerializer.serializeNode( - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion topLevelNode!, ) as HTMLElement; modalService @@ -73,7 +73,7 @@ export const rawEditorPlugin = (contextMenuService: ContextMenuService, modalSer parsedNodeSlice, ); } catch (err: any) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.error(err); } view.dispatch(tr); diff --git a/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/plugins/tables-plugin.ts b/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/plugins/tables-plugin.ts index d70c757463..1ca68b871c 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/plugins/tables-plugin.ts +++ b/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/plugins/tables-plugin.ts @@ -26,82 +26,77 @@ import { renderClarityIcon } from '../menu/menu-common'; export const tableContextMenuPlugin = (contextMenuService: ContextMenuService) => new Plugin({ - view: () => { - return { - update: view => { - if (!view.hasFocus()) { - return; + view: () => ({ + update: view => { + if (!view.hasFocus()) { + return; + } + const { doc, selection } = view.state; + let tableNode: Node | undefined; + let tableNodePos = 0; + doc.nodesBetween(selection.from, selection.to, (n, pos, parent) => { + if (n.type.name === 'table') { + tableNode = n; + tableNodePos = pos; + return false; } - const { doc, selection } = view.state; - let tableNode: Node | undefined; - let tableNodePos = 0; - doc.nodesBetween(selection.from, selection.to, (n, pos, parent) => { - if (n.type.name === 'table') { - tableNode = n; - tableNodePos = pos; - return false; - } - }); - if (tableNode) { - const node = view.nodeDOM(tableNodePos); - if (node instanceof Element) { - function createMenuItem( - label: string, - commandFn: ( - state: EditorState, - dispatch?: (tr: Transaction) => void, - ) => boolean, - iconClass?: string, - ): ContextMenuItem { - const enabled = commandFn(view.state); - return { - label, - enabled, - iconClass, - onClick: () => { - contextMenuService.clearContextMenu(); - view.focus(); - commandFn(view.state, view.dispatch); - }, - }; - } - const separator: ContextMenuItem = { - label: '', - separator: true, - enabled: true, + }); + if (tableNode) { + const node = view.nodeDOM(tableNodePos); + if (node instanceof Element) { + function createMenuItem( + label: string, + commandFn: (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean, + iconClass?: string, + ): ContextMenuItem { + const enabled = commandFn(view.state); + return { + label, + enabled, + iconClass, onClick: () => { - /**/ + contextMenuService.clearContextMenu(); + view.focus(); + commandFn(view.state, view.dispatch); }, }; - contextMenuService.setContextMenu({ - ref: selection, - title: 'Table', - iconShape: 'table', - element: node, - coords: view.coordsAtPos(tableNodePos), - items: [ - createMenuItem('Insert column before', addColumnBefore, 'add-column'), - createMenuItem('Insert column after', addColumnAfter, 'add-column'), - createMenuItem('Insert row before', addRowBefore, 'add-row'), - createMenuItem('Insert row after', addRowAfter, 'add-row'), - createMenuItem('Merge cells', mergeCells), - createMenuItem('Split cell', splitCell), - separator, - createMenuItem('Toggle header column', toggleHeaderColumn), - createMenuItem('Toggle header row', toggleHeaderRow), - separator, - createMenuItem('Delete column', deleteColumn), - createMenuItem('Delete row', deleteRow), - createMenuItem('Delete table', deleteTable), - ], - }); } - } else { - contextMenuService.clearContextMenu(); + const separator: ContextMenuItem = { + label: '', + separator: true, + enabled: true, + onClick: () => { + /**/ + }, + }; + contextMenuService.setContextMenu({ + ref: selection, + title: 'Table', + iconShape: 'table', + element: node, + coords: view.coordsAtPos(tableNodePos), + items: [ + createMenuItem('Insert column before', addColumnBefore, 'add-column'), + createMenuItem('Insert column after', addColumnAfter, 'add-column'), + createMenuItem('Insert row before', addRowBefore, 'add-row'), + createMenuItem('Insert row after', addRowAfter, 'add-row'), + createMenuItem('Merge cells', mergeCells), + createMenuItem('Split cell', splitCell), + separator, + createMenuItem('Toggle header column', toggleHeaderColumn), + createMenuItem('Toggle header row', toggleHeaderRow), + separator, + createMenuItem('Delete column', deleteColumn), + createMenuItem('Delete row', deleteRow), + createMenuItem('Delete table', deleteTable), + ], + }); } - }, - }; - }, + } else { + contextMenuService.clearContextMenu(); + } + }, + }), }); export function getTableNodes() { diff --git a/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/prosemirror.service.ts b/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/prosemirror.service.ts index be3b80d332..64bd888a17 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/prosemirror.service.ts +++ b/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/prosemirror/prosemirror.service.ts @@ -84,7 +84,9 @@ export class ProsemirrorService { let state = this.getStateFromText(text); if (document.body.contains(this.editorView.dom)) { const fix = fixTables(state); - if (fix) state = state.apply(fix.setMeta('addToHistory', false)); + if (fix) { + state = state.apply(fix.setMeta('addToHistory', false)); + } this.editorView.updateState(state); } } diff --git a/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/raw-html-dialog/raw-html-dialog.component.ts b/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/raw-html-dialog/raw-html-dialog.component.ts index adbd56cf86..595e68ea82 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/raw-html-dialog/raw-html-dialog.component.ts +++ b/packages/admin-ui/src/lib/core/src/shared/components/rich-text-editor/raw-html-dialog/raw-html-dialog.component.ts @@ -42,7 +42,7 @@ export class RawHtmlDialogComponent implements OnInit, Dialog { const indentAfter = new Array(level - 1).join('\t'); let textNode: Text; - // tslint:disable-next-line:prefer-for-of + // eslint-disable-next-line @typescript-eslint/prefer-for-of for (let i = 0; i < node.children.length; i++) { textNode = document.createTextNode('\n' + indentBefore); node.insertBefore(textNode, node.children[i]); diff --git a/packages/admin-ui/src/lib/core/src/shared/directives/if-default-channel-active.directive.ts b/packages/admin-ui/src/lib/core/src/shared/directives/if-default-channel-active.directive.ts index db20472e66..69675a812d 100644 --- a/packages/admin-ui/src/lib/core/src/shared/directives/if-default-channel-active.directive.ts +++ b/packages/admin-ui/src/lib/core/src/shared/directives/if-default-channel-active.directive.ts @@ -17,12 +17,12 @@ export class IfDefaultChannelActiveDirective extends IfDirectiveBase<[]> { private dataService: DataService, private changeDetectorRef: ChangeDetectorRef, ) { - super(_viewContainer, templateRef, () => { - return this.dataService.client + super(_viewContainer, templateRef, () => + this.dataService.client .userStatus() .mapStream(({ userStatus }) => this.defaultChannelIsActive(userStatus)) - .pipe(tap(() => this.changeDetectorRef.markForCheck())); - }); + .pipe(tap(() => this.changeDetectorRef.markForCheck())), + ); } /** diff --git a/packages/admin-ui/src/lib/core/src/shared/directives/if-multichannel.directive.spec.ts b/packages/admin-ui/src/lib/core/src/shared/directives/if-multichannel.directive.spec.ts index 3956994333..4f459e03de 100644 --- a/packages/admin-ui/src/lib/core/src/shared/directives/if-multichannel.directive.spec.ts +++ b/packages/admin-ui/src/lib/core/src/shared/directives/if-multichannel.directive.spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:component-class-suffix */ +/* eslint-disable @angular-eslint/component-class-suffix */ import { Component, Input } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { BehaviorSubject } from 'rxjs'; @@ -21,7 +21,7 @@ describe('vdrIfMultichannel directive', () => { }); it('is multichannel', () => { - ((fixture.componentInstance.dataService as unknown) as MockDataService).setChannels([1, 2]); + (fixture.componentInstance.dataService as unknown as MockDataService).setChannels([1, 2]); fixture.detectChanges(); const thenEl = fixture.nativeElement.querySelector('.then'); @@ -29,7 +29,7 @@ describe('vdrIfMultichannel directive', () => { }); it('not multichannel', () => { - ((fixture.componentInstance.dataService as unknown) as MockDataService).setChannels([1]); + (fixture.componentInstance.dataService as unknown as MockDataService).setChannels([1]); fixture.detectChanges(); const thenEl = fixture.nativeElement.querySelector('.then'); @@ -49,7 +49,7 @@ describe('vdrIfMultichannel directive', () => { }); it('is multichannel', () => { - ((fixture.componentInstance.dataService as unknown) as MockDataService).setChannels([1, 2]); + (fixture.componentInstance.dataService as unknown as MockDataService).setChannels([1, 2]); fixture.detectChanges(); const thenEl = fixture.nativeElement.querySelector('.then'); @@ -59,7 +59,7 @@ describe('vdrIfMultichannel directive', () => { }); it('not multichannel', () => { - ((fixture.componentInstance.dataService as unknown) as MockDataService).setChannels([1]); + (fixture.componentInstance.dataService as unknown as MockDataService).setChannels([1]); fixture.detectChanges(); const thenEl = fixture.nativeElement.querySelector('.then'); @@ -101,19 +101,17 @@ class MockDataService { this.channels$.next(channels); } client = { - userStatus: () => { - return { - mapStream: (mapFn: any) => - this.channels$.pipe( - map(channels => - mapFn({ - userStatus: { - channels, - }, - }), - ), + userStatus: () => ({ + mapStream: (mapFn: any) => + this.channels$.pipe( + map(channels => + mapFn({ + userStatus: { + channels, + }, + }), ), - }; - }, + ), + }), }; } diff --git a/packages/admin-ui/src/lib/core/src/shared/directives/if-multichannel.directive.ts b/packages/admin-ui/src/lib/core/src/shared/directives/if-multichannel.directive.ts index 327ef6db0b..8b479f34da 100644 --- a/packages/admin-ui/src/lib/core/src/shared/directives/if-multichannel.directive.ts +++ b/packages/admin-ui/src/lib/core/src/shared/directives/if-multichannel.directive.ts @@ -27,11 +27,11 @@ export class IfMultichannelDirective extends IfDirectiveBase<[]> { templateRef: TemplateRef, private dataService: DataService, ) { - super(_viewContainer, templateRef, () => { - return this.dataService.client + super(_viewContainer, templateRef, () => + this.dataService.client .userStatus() - .mapStream(({ userStatus }) => 1 < userStatus.channels.length); - }); + .mapStream(({ userStatus }) => 1 < userStatus.channels.length), + ); } /** diff --git a/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/code-editor-form-input/html-editor-form-input.component.ts b/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/code-editor-form-input/html-editor-form-input.component.ts index 755b70224e..1dd2a6c1cd 100644 --- a/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/code-editor-form-input/html-editor-form-input.component.ts +++ b/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/code-editor-form-input/html-editor-form-input.component.ts @@ -7,9 +7,7 @@ import { FormInputComponent } from '../../../common/component-registry-types'; import { BaseCodeEditorFormInputComponent } from './base-code-editor-form-input.component'; function htmlValidator(): ValidatorFn { - return (control: AbstractControl): ValidationErrors | null => { - return null; - }; + return (control: AbstractControl): ValidationErrors | null => null; } const HTML_TAG_RE = /<\/?[^>]+>?/g; @@ -66,9 +64,7 @@ export class HtmlEditorFormInputComponent ); }); }, - getErrorMessage: (json: string): string | undefined => { - return; - }, + getErrorMessage: (json: string): string | undefined => undefined, }); } diff --git a/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component.ts b/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component.ts index c846625d62..17733e040c 100644 --- a/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component.ts +++ b/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component.ts @@ -91,7 +91,7 @@ export class DynamicFormInputComponent if (componentType) { this.componentType = componentType; } else { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.error( `No form input component registered with the id "${componentId}". Using the default input instead.`, ); diff --git a/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/relation-form-input/customer/relation-customer-input.component.ts b/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/relation-form-input/customer/relation-customer-input.component.ts index 261aff2c0c..df66beb98a 100644 --- a/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/relation-form-input/customer/relation-customer-input.component.ts +++ b/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/relation-form-input/customer/relation-customer-input.component.ts @@ -36,11 +36,11 @@ export class RelationCustomerInputComponent implements OnInit { ngOnInit() { this.results$ = this.searchTerm$.pipe( debounceTime(200), - switchMap(term => { - return this.dataService.customer + switchMap(term => + this.dataService.customer .getCustomerList(10, 0, term) - .mapSingle(data => data.customers.items); - }), + .mapSingle(data => data.customers.items), + ), ); } diff --git a/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/relation-form-input/product-variant/relation-product-variant-input.component.ts b/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/relation-form-input/product-variant/relation-product-variant-input.component.ts index d0d9b068b6..213435edbd 100644 --- a/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/relation-form-input/product-variant/relation-product-variant-input.component.ts +++ b/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/relation-form-input/product-variant/relation-product-variant-input.component.ts @@ -48,8 +48,8 @@ export class RelationProductVariantInputComponent implements OnInit { this.results$ = this.searchTerm$.pipe( debounceTime(200), - switchMap(term => { - return this.dataService.product + switchMap(term => + this.dataService.product .getProductVariantsSimple({ ...(term ? { @@ -62,8 +62,8 @@ export class RelationProductVariantInputComponent implements OnInit { : {}), take: 10, }) - .mapSingle(data => data.productVariants.items); - }), + .mapSingle(data => data.productVariants.items), + ), ); } diff --git a/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/relation-form-input/product/relation-product-input.component.ts b/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/relation-form-input/product/relation-product-input.component.ts index 28ea4b35e8..febd0872ef 100644 --- a/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/relation-form-input/product/relation-product-input.component.ts +++ b/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/relation-form-input/product/relation-product-input.component.ts @@ -48,8 +48,8 @@ export class RelationProductInputComponent implements OnInit { this.results$ = this.searchTerm$.pipe( debounceTime(200), - switchMap(term => { - return this.dataService.product + switchMap(term => + this.dataService.product .getProducts({ ...(term ? { @@ -62,8 +62,8 @@ export class RelationProductInputComponent implements OnInit { : {}), take: 10, }) - .mapSingle(data => data.products.items); - }), + .mapSingle(data => data.products.items), + ), ); } diff --git a/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/relation-form-input/relation-card/relation-card.component.ts b/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/relation-form-input/relation-card/relation-card.component.ts index a0de0066c4..a6a379fe5f 100644 --- a/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/relation-form-input/relation-card/relation-card.component.ts +++ b/packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/relation-form-input/relation-card/relation-card.component.ts @@ -30,6 +30,7 @@ export class RelationCardComponent { @Input() selectLabel: string; @Input() readonly: boolean; @Input() removable = true; + // eslint-disable-next-line @angular-eslint/no-output-native @Output() select = new EventEmitter(); @Output() remove = new EventEmitter(); @ContentChild(RelationCardPreviewDirective, { read: TemplateRef }) diff --git a/packages/admin-ui/src/lib/customer/src/components/add-customer-to-group-dialog/add-customer-to-group-dialog.component.ts b/packages/admin-ui/src/lib/customer/src/components/add-customer-to-group-dialog/add-customer-to-group-dialog.component.ts index 7ec88b5175..b28ec25219 100644 --- a/packages/admin-ui/src/lib/customer/src/components/add-customer-to-group-dialog/add-customer-to-group-dialog.component.ts +++ b/packages/admin-ui/src/lib/customer/src/components/add-customer-to-group-dialog/add-customer-to-group-dialog.component.ts @@ -35,11 +35,11 @@ export class AddCustomerToGroupDialogComponent implements Dialog, OnIn ngOnInit() { const customerResult$ = this.fetchGroupMembers$.pipe( - switchMap(({ skip, take, filterTerm }) => { - return this.dataService.customer + switchMap(({ skip, take, filterTerm }) => + this.dataService.customer .getCustomerList(take, skip, filterTerm) - .mapStream(res => res.customers); - }), + .mapStream(res => res.customers), + ), ); this.customers$ = customerResult$.pipe(map(res => res.items)); diff --git a/packages/admin-ui/src/lib/customer/src/components/customer-detail/customer-detail.component.ts b/packages/admin-ui/src/lib/customer/src/components/customer-detail/customer-detail.component.ts index afd10fa886..bf450ac6e5 100644 --- a/packages/admin-ui/src/lib/customer/src/components/customer-detail/customer-detail.component.ts +++ b/packages/admin-ui/src/lib/customer/src/components/customer-detail/customer-detail.component.ts @@ -116,15 +116,15 @@ export class CustomerDetailComponent this.ordersCount$ = this.entity$.pipe(map(customer => customer.orders.totalItems)); this.history$ = this.fetchHistory.pipe( startWith(null), - switchMap(() => { - return this.dataService.customer + switchMap(() => + this.dataService.customer .getCustomerHistory(this.id, { sort: { createdAt: SortOrder.DESC, }, }) - .mapStream(data => data.customer?.history.items); - }), + .mapStream(data => data.customer?.history.items), + ), ); } diff --git a/packages/admin-ui/src/lib/customer/src/components/customer-group-member-list/customer-group-member-list.component.ts b/packages/admin-ui/src/lib/customer/src/components/customer-group-member-list/customer-group-member-list.component.ts index 4b3b194d67..e315845b5b 100644 --- a/packages/admin-ui/src/lib/customer/src/components/customer-group-member-list/customer-group-member-list.component.ts +++ b/packages/admin-ui/src/lib/customer/src/components/customer-group-member-list/customer-group-member-list.component.ts @@ -128,7 +128,5 @@ export class CustomerGroupMemberListComponent implements OnInit, OnDestroy { } } - isMemberSelected = (member: { id: string }): boolean => { - return -1 < this.selectedMemberIds.indexOf(member.id); - }; + isMemberSelected = (member: { id: string }): boolean => -1 < this.selectedMemberIds.indexOf(member.id); } diff --git a/packages/admin-ui/src/lib/dashboard/src/widgets/order-summary-widget/order-summary-widget.component.ts b/packages/admin-ui/src/lib/dashboard/src/widgets/order-summary-widget/order-summary-widget.component.ts index c374cc744e..9e3333d500 100644 --- a/packages/admin-ui/src/lib/dashboard/src/widgets/order-summary-widget/order-summary-widget.component.ts +++ b/packages/admin-ui/src/lib/dashboard/src/widgets/order-summary-widget/order-summary-widget.component.ts @@ -29,21 +29,19 @@ export class OrderSummaryWidgetComponent implements OnInit { ngOnInit(): void { this.dateRange$ = this.selection$.pipe( distinctUntilChanged(), - map(selection => { - return { - start: dayjs(selection.date).startOf(selection.timeframe).toDate(), - end: dayjs(selection.date).endOf(selection.timeframe).toDate(), - }; - }), + map(selection => ({ + start: dayjs(selection.date).startOf(selection.timeframe).toDate(), + end: dayjs(selection.date).endOf(selection.timeframe).toDate(), + })), shareReplay(1), ); const orderSummary$ = this.dateRange$.pipe( - switchMap(({ start, end }) => { - return this.dataService.order + switchMap(({ start, end }) => + this.dataService.order .getOrderSummary(start, end) .refetchOnChannelChange() - .mapStream(data => data.orders); - }), + .mapStream(data => data.orders), + ), shareReplay(1), ); this.totalOrderCount$ = orderSummary$.pipe(map(res => res.totalItems)); diff --git a/packages/admin-ui/src/lib/marketing/src/components/promotion-detail/promotion-detail.component.ts b/packages/admin-ui/src/lib/marketing/src/components/promotion-detail/promotion-detail.component.ts index 7e61224056..c01bbd3978 100644 --- a/packages/admin-ui/src/lib/marketing/src/components/promotion-detail/promotion-detail.component.ts +++ b/packages/admin-ui/src/lib/marketing/src/components/promotion-detail/promotion-detail.component.ts @@ -268,15 +268,13 @@ export class PromotionDetailComponent operations: ConfigurableOperation[], formValueOperations: any, ): ConfigurableOperationInput[] { - return operations.map((o, i) => { - return { - code: o.code, - arguments: Object.values(formValueOperations[i].args).map((value, j) => ({ - name: o.args[j].name, - value: encodeConfigArgValue(value), - })), - }; - }); + return operations.map((o, i) => ({ + code: o.code, + arguments: Object.values(formValueOperations[i].args).map((value, j) => ({ + name: o.args[j].name, + value: encodeConfigArgValue(value), + })), + })); } /** diff --git a/packages/admin-ui/src/lib/order/src/components/cancel-order-dialog/cancel-order-dialog.component.ts b/packages/admin-ui/src/lib/order/src/components/cancel-order-dialog/cancel-order-dialog.component.ts index 74a9c43281..22b5bf8a92 100644 --- a/packages/admin-ui/src/lib/order/src/components/cancel-order-dialog/cancel-order-dialog.component.ts +++ b/packages/admin-ui/src/lib/order/src/components/cancel-order-dialog/cancel-order-dialog.component.ts @@ -35,9 +35,10 @@ export class CancelOrderDialogComponent implements OnInit, Dialog { - return { ...result, [line.id]: line.quantity }; - }, {}); + this.lineQuantities = this.order.lines.reduce( + (result, line) => ({ ...result, [line.id]: line.quantity }), + {}, + ); } radioChanged() { diff --git a/packages/admin-ui/src/lib/order/src/components/coupon-code-selector/coupon-code-selector.component.ts b/packages/admin-ui/src/lib/order/src/components/coupon-code-selector/coupon-code-selector.component.ts index db44c3e1a9..ceb372214d 100644 --- a/packages/admin-ui/src/lib/order/src/components/coupon-code-selector/coupon-code-selector.component.ts +++ b/packages/admin-ui/src/lib/order/src/components/coupon-code-selector/coupon-code-selector.component.ts @@ -30,7 +30,7 @@ export class CouponCodeSelectorComponent implements OnInit { }).single$, ), map(({ promotions }) => - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion promotions.items.map(p => ({ code: p.couponCode!, promotionName: p.name })), ), startWith([]), diff --git a/packages/admin-ui/src/lib/order/src/components/draft-order-detail/draft-order-detail.component.ts b/packages/admin-ui/src/lib/order/src/components/draft-order-detail/draft-order-detail.component.ts index d74f8a6eab..366511bc8c 100644 --- a/packages/admin-ui/src/lib/order/src/components/draft-order-detail/draft-order-detail.component.ts +++ b/packages/admin-ui/src/lib/order/src/components/draft-order-detail/draft-order-detail.component.ts @@ -126,14 +126,14 @@ export class DraftOrderDetailComponent this.entity$ .pipe( take(1), - switchMap(order => { - return this.modalService.fromComponent(SelectAddressDialogComponent, { + switchMap(order => + this.modalService.fromComponent(SelectAddressDialogComponent, { locals: { customerId: order.customer?.id, currentAddress: order.shippingAddress ?? undefined, }, - }); - }), + }), + ), ) .subscribe(result => { if (result) { @@ -146,14 +146,14 @@ export class DraftOrderDetailComponent this.entity$ .pipe( take(1), - switchMap(order => { - return this.modalService.fromComponent(SelectAddressDialogComponent, { + switchMap(order => + this.modalService.fromComponent(SelectAddressDialogComponent, { locals: { customerId: order.customer?.id, currentAddress: order.billingAddress ?? undefined, }, - }); - }), + }), + ), ) .subscribe(result => { if (result) { diff --git a/packages/admin-ui/src/lib/order/src/components/fulfillment-detail/fulfillment-detail.component.ts b/packages/admin-ui/src/lib/order/src/components/fulfillment-detail/fulfillment-detail.component.ts index 401ce2640f..3f73836914 100644 --- a/packages/admin-ui/src/lib/order/src/components/fulfillment-detail/fulfillment-detail.component.ts +++ b/packages/admin-ui/src/lib/order/src/components/fulfillment-detail/fulfillment-detail.component.ts @@ -32,13 +32,10 @@ export class FulfillmentDetailComponent implements OnInit, OnChanges { get items(): Array<{ name: string; quantity: number }> { return ( - this.fulfillment?.lines.map(row => { - return { - name: - this.order.lines.find(line => line.id === row.orderLineId)?.productVariant.name ?? '', - quantity: row.quantity, - }; - }) ?? [] + this.fulfillment?.lines.map(row => ({ + name: this.order.lines.find(line => line.id === row.orderLineId)?.productVariant.name ?? '', + quantity: row.quantity, + })) ?? [] ); } diff --git a/packages/admin-ui/src/lib/order/src/components/modification-detail/modification-detail.component.ts b/packages/admin-ui/src/lib/order/src/components/modification-detail/modification-detail.component.ts index 1cf59051e1..1240aeac1c 100644 --- a/packages/admin-ui/src/lib/order/src/components/modification-detail/modification-detail.component.ts +++ b/packages/admin-ui/src/lib/order/src/components/modification-detail/modification-detail.component.ts @@ -24,15 +24,17 @@ export class ModificationDetailComponent implements OnChanges { } getAddedItems() { - return [...this.addedItems.entries()].map(([line, count]) => { - return { name: line.productVariant.name, quantity: count }; - }); + return [...this.addedItems.entries()].map(([line, count]) => ({ + name: line.productVariant.name, + quantity: count, + })); } getRemovedItems() { - return [...this.removedItems.entries()].map(([line, count]) => { - return { name: line.productVariant.name, quantity: count }; - }); + return [...this.removedItems.entries()].map(([line, count]) => ({ + name: line.productVariant.name, + quantity: count, + })); } private getModifiedLines() { diff --git a/packages/admin-ui/src/lib/order/src/components/order-detail/order-detail.component.ts b/packages/admin-ui/src/lib/order/src/components/order-detail/order-detail.component.ts index de319b505e..dfd3f17093 100644 --- a/packages/admin-ui/src/lib/order/src/components/order-detail/order-detail.component.ts +++ b/packages/admin-ui/src/lib/order/src/components/order-detail/order-detail.component.ts @@ -92,15 +92,15 @@ export class OrderDetailComponent this.orderLineCustomFields = this.getCustomFieldConfig('OrderLine'); this.history$ = this.fetchHistory.pipe( startWith(null), - switchMap(() => { - return this.dataService.order + switchMap(() => + this.dataService.order .getOrderHistory(this.id, { sort: { createdAt: SortOrder.DESC, }, }) - .mapStream(data => data.order?.history.items); - }), + .mapStream(data => data.order?.history.items), + ), ); this.nextStates$ = this.entity$.pipe( map(order => { @@ -357,14 +357,14 @@ export class OrderDetailComponent this.entity$ .pipe( take(1), - switchMap(order => { - return this.modalService.fromComponent(FulfillOrderDialogComponent, { + switchMap(order => + this.modalService.fromComponent(FulfillOrderDialogComponent, { size: 'xl', locals: { order, }, - }); - }), + }), + ), switchMap(input => { if (input) { return this.dataService.order.createFulfillment(input); diff --git a/packages/admin-ui/src/lib/order/src/components/order-editor/order-editor.component.ts b/packages/admin-ui/src/lib/order/src/components/order-editor/order-editor.component.ts index 8bc92f06e3..00f5690b0f 100644 --- a/packages/admin-ui/src/lib/order/src/components/order-editor/order-editor.component.ts +++ b/packages/admin-ui/src/lib/order/src/components/order-editor/order-editor.component.ts @@ -358,9 +358,9 @@ export class OrderEditorComponent previewAndModify(order: OrderDetailFragment) { const modifyOrderInput: ModifyOrderData = { ...this.modifyOrderInput, - adjustOrderLines: this.modifyOrderInput.adjustOrderLines.map(line => { - return transformRelationCustomFieldInputs(simpleDeepClone(line), this.orderLineCustomFields); - }), + adjustOrderLines: this.modifyOrderInput.adjustOrderLines.map(line => + transformRelationCustomFieldInputs(simpleDeepClone(line), this.orderLineCustomFields), + ), }; const input: ModifyOrderInput = { ...modifyOrderInput, diff --git a/packages/admin-ui/src/lib/order/src/components/order-edits-preview-dialog/order-edits-preview-dialog.component.ts b/packages/admin-ui/src/lib/order/src/components/order-edits-preview-dialog/order-edits-preview-dialog.component.ts index 9b626a37d5..bff0710277 100644 --- a/packages/admin-ui/src/lib/order/src/components/order-edits-preview-dialog/order-edits-preview-dialog.component.ts +++ b/packages/admin-ui/src/lib/order/src/components/order-edits-preview-dialog/order-edits-preview-dialog.component.ts @@ -67,7 +67,7 @@ export class OrderEditsPreviewDialogComponent implements OnInit, Dialog this.dataService.order.getOrders({ take, skip }).refetchOnChannelChange(), data => data.orders, - // tslint:disable-next-line:no-shadowed-variable + // eslint-disable-next-line @typescript-eslint/no-shadow (skip, take) => this.createQueryOptions( skip, @@ -185,14 +185,14 @@ export class OrderListComponent } private createQueryOptions( - // tslint:disable-next-line:no-shadowed-variable + // eslint-disable-next-line @typescript-eslint/no-shadow skip: number, take: number, searchTerm: string, activeFilterPreset?: string, ): { options: OrderListOptions } { const filterConfig = this.filterPresets.find(p => p.name === activeFilterPreset); - // tslint:disable-next-line:no-shadowed-variable + // eslint-disable-next-line @typescript-eslint/no-shadow let filter: OrderFilterParameter = {}; let filterOperator: LogicalOperator = LogicalOperator.AND; if (filterConfig) { diff --git a/packages/admin-ui/src/lib/order/src/components/order-table/order-table.component.ts b/packages/admin-ui/src/lib/order/src/components/order-table/order-table.component.ts index 487a7c4f75..8c536ab329 100644 --- a/packages/admin-ui/src/lib/order/src/components/order-table/order-table.component.ts +++ b/packages/admin-ui/src/lib/order/src/components/order-table/order-table.component.ts @@ -59,9 +59,7 @@ export class OrderTableComponent implements OnInit { value, }; }) - .filter(field => { - return this.orderLineCustomFieldsVisible ? true : field.value != null; - }); + .filter(field => this.orderLineCustomFieldsVisible ? true : field.value != null); this.customFieldsForLine[line.id] = result; } } diff --git a/packages/admin-ui/src/lib/order/src/components/refund-order-dialog/refund-order-dialog.component.ts b/packages/admin-ui/src/lib/order/src/components/refund-order-dialog/refund-order-dialog.component.ts index 79882113de..ab56cd51ac 100644 --- a/packages/admin-ui/src/lib/order/src/components/refund-order-dialog/refund-order-dialog.component.ts +++ b/packages/admin-ui/src/lib/order/src/components/refund-order-dialog/refund-order-dialog.component.ts @@ -84,16 +84,14 @@ export class RefundOrderDialogComponent } ngOnInit() { - this.lineQuantities = this.order.lines.reduce((result, line) => { - return { + this.lineQuantities = this.order.lines.reduce((result, line) => ({ ...result, [line.id]: { quantity: 0, refund: false, cancel: false, }, - }; - }, {}); + }), {}); this.settledPayments = (this.order.payments || []).filter(p => p.state === 'Settled'); if (this.settledPayments.length) { this.selectedPayment = this.settledPayments[0]; @@ -108,16 +106,12 @@ export class RefundOrderDialogComponent } isRefunding(): boolean { - const result = Object.values(this.lineQuantities).reduce((isRefunding, line) => { - return isRefunding || (0 < line.quantity && line.refund); - }, false); + const result = Object.values(this.lineQuantities).reduce((isRefunding, line) => isRefunding || (0 < line.quantity && line.refund), false); return result; } isCancelling(): boolean { - const result = Object.values(this.lineQuantities).reduce((isCancelling, line) => { - return isCancelling || (0 < line.quantity && line.cancel); - }, false); + const result = Object.values(this.lineQuantities).reduce((isCancelling, line) => isCancelling || (0 < line.quantity && line.cancel), false); return result; } diff --git a/packages/admin-ui/src/lib/order/src/components/select-shipping-method-dialog/select-shipping-method-dialog.component.ts b/packages/admin-ui/src/lib/order/src/components/select-shipping-method-dialog/select-shipping-method-dialog.component.ts index 35451278a0..2c501573ad 100644 --- a/packages/admin-ui/src/lib/order/src/components/select-shipping-method-dialog/select-shipping-method-dialog.component.ts +++ b/packages/admin-ui/src/lib/order/src/components/select-shipping-method-dialog/select-shipping-method-dialog.component.ts @@ -21,7 +21,6 @@ export class SelectShippingMethodDialogComponent implements OnInit, Dialog> { const navigateAway$ = this.router.events.pipe(filter(event => event instanceof ActivationStart)); const stream = this.dataService.order - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion .getOrder(id!) .mapStream(data => data.order) .pipe( diff --git a/packages/admin-ui/src/lib/settings/src/components/admin-detail/admin-detail.component.ts b/packages/admin-ui/src/lib/settings/src/components/admin-detail/admin-detail.component.ts index 2eb52cf8b7..7c68c1660f 100644 --- a/packages/admin-ui/src/lib/settings/src/components/admin-detail/admin-detail.component.ts +++ b/packages/admin-ui/src/lib/settings/src/components/admin-detail/admin-detail.component.ts @@ -228,18 +228,18 @@ export class AdminDetailComponent this.selectedRolePermissions = {} as any; for (const channelId of Array.from(channelIdPermissionsMap.keys())) { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const permissionSet = channelIdPermissionsMap.get(channelId)!; const permissionsHash: { [K in Permission]: boolean } = {} as any; for (const def of this.serverConfigService.getPermissionDefinitions()) { permissionsHash[def.name] = permissionSet.has(def.name as Permission); } this.selectedRolePermissions[channelId] = { - // tslint:disable:no-non-null-assertion + /* eslint-disable @typescript-eslint/no-non-null-assertion */ channelId, channelCode: channelIdCodeMap.get(channelId)!, permissions: permissionsHash, - // tslint:enable:no-non-null-assertion + /* eslint-enable @typescript-eslint/no-non-null-assertion */ }; } } diff --git a/packages/admin-ui/src/lib/settings/src/components/channel-detail/channel-detail.component.ts b/packages/admin-ui/src/lib/settings/src/components/channel-detail/channel-detail.component.ts index 3ab12a4b2c..6458cbb0a1 100644 --- a/packages/admin-ui/src/lib/settings/src/components/channel-detail/channel-detail.component.ts +++ b/packages/admin-ui/src/lib/settings/src/components/channel-detail/channel-detail.component.ts @@ -109,7 +109,7 @@ export class ChannelDetailComponent ), ), mergeMap(({ me, createChannel }) => - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion this.dataService.client.updateUserChannels(me!.channels).pipe(map(() => createChannel)), ), ) diff --git a/packages/admin-ui/src/lib/settings/src/components/channel-list/channel-list.component.ts b/packages/admin-ui/src/lib/settings/src/components/channel-list/channel-list.component.ts index c468554a36..99cd8c74cf 100644 --- a/packages/admin-ui/src/lib/settings/src/components/channel-list/channel-list.component.ts +++ b/packages/admin-ui/src/lib/settings/src/components/channel-list/channel-list.component.ts @@ -42,7 +42,7 @@ export class ChannelListComponent { .pipe( switchMap(response => (response ? this.dataService.settings.deleteChannel(id) : EMPTY)), mergeMap(() => this.dataService.auth.currentUser().single$), - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion mergeMap(data => this.dataService.client.updateUserChannels(data.me!.channels)), ) .subscribe( diff --git a/packages/admin-ui/src/lib/settings/src/components/country-list/country-list.component.ts b/packages/admin-ui/src/lib/settings/src/components/country-list/country-list.component.ts index f6059c36aa..5fb095e47e 100644 --- a/packages/admin-ui/src/lib/settings/src/components/country-list/country-list.component.ts +++ b/packages/admin-ui/src/lib/settings/src/components/country-list/country-list.component.ts @@ -62,12 +62,10 @@ export class CountryListComponent implements OnInit, OnDestroy { this.zones$ = this.dataService.settings.getZones().mapStream(data => data.zones); this.countriesWithZones$ = combineLatest(countries$, this.zones$).pipe( - map(([countries, zones]) => { - return countries.map(country => ({ + map(([countries, zones]) => countries.map(country => ({ ...country, zones: zones.filter(z => !!z.members.find(c => c.id === country.id)), - })); - }), + }))), ); this.availableLanguages$ = this.serverConfigService.getAvailableLanguages(); diff --git a/packages/admin-ui/src/lib/settings/src/components/permission-grid/permission-grid.component.ts b/packages/admin-ui/src/lib/settings/src/components/permission-grid/permission-grid.component.ts index cd68c9b2a4..9dfc69bf79 100644 --- a/packages/admin-ui/src/lib/settings/src/components/permission-grid/permission-grid.component.ts +++ b/packages/admin-ui/src/lib/settings/src/components/permission-grid/permission-grid.component.ts @@ -67,13 +67,11 @@ export class PermissionGridComponent implements OnInit { description: d.description, permissions: [d], })), - ...Array.from(crudGroups.entries()).map(([label, defs]) => { - return { + ...Array.from(crudGroups.entries()).map(([label, defs]) => ({ label, description: this.extractCrudDescription(defs[0]), permissions: defs, - }; - }), + })), ]; } diff --git a/packages/admin-ui/src/lib/settings/src/components/shipping-method-detail/shipping-method-detail.component.ts b/packages/admin-ui/src/lib/settings/src/components/shipping-method-detail/shipping-method-detail.component.ts index 2c4aca172e..c9a4436c53 100644 --- a/packages/admin-ui/src/lib/settings/src/components/shipping-method-detail/shipping-method-detail.component.ts +++ b/packages/admin-ui/src/lib/settings/src/components/shipping-method-detail/shipping-method-detail.component.ts @@ -123,14 +123,14 @@ export class ShippingMethodDetailComponent }), ); - // tslint:disable:no-non-null-assertion + /* eslint-disable @typescript-eslint/no-non-null-assertion */ merge( this.detailForm.get(['checker'])!.valueChanges, this.detailForm.get(['calculator'])!.valueChanges, ) .pipe(takeUntil(this.destroy$)) .subscribe(() => (this.testDataUpdated = true)); - // tslint:enable:no-non-null-assertion + /* eslint-enable @typescript-eslint/no-non-null-assertion */ } ngOnDestroy(): void { @@ -242,7 +242,7 @@ export class ShippingMethodDetailComponent this.changeDetector.markForCheck(); }, err => { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.error(err); this.notificationService.error(_('common.notify-update-error'), { entity: 'ShippingMethod', diff --git a/packages/admin-ui/src/lib/settings/src/components/zone-member-list/zone-member-list.component.ts b/packages/admin-ui/src/lib/settings/src/components/zone-member-list/zone-member-list.component.ts index 8a5e021779..10663c7f11 100644 --- a/packages/admin-ui/src/lib/settings/src/components/zone-member-list/zone-member-list.component.ts +++ b/packages/admin-ui/src/lib/settings/src/components/zone-member-list/zone-member-list.component.ts @@ -54,7 +54,5 @@ export class ZoneMemberListComponent { } } - isMemberSelected = (member: ZoneMember): boolean => { - return -1 < this.selectedMemberIds.indexOf(member.id); - }; + isMemberSelected = (member: ZoneMember): boolean => -1 < this.selectedMemberIds.indexOf(member.id); } diff --git a/packages/admin-ui/src/lib/static/polyfills.ts b/packages/admin-ui/src/lib/static/polyfills.ts index 384e24dbbc..9f7735b0ba 100644 --- a/packages/admin-ui/src/lib/static/polyfills.ts +++ b/packages/admin-ui/src/lib/static/polyfills.ts @@ -13,7 +13,7 @@ * * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html */ -// tslint:disable:ordered-imports +/* eslint-disable import/order */ /*************************************************************************************************** * BROWSER POLYFILLS */ diff --git a/packages/admin-ui/src/lib/system/src/components/job-list/job-list.component.ts b/packages/admin-ui/src/lib/system/src/components/job-list/job-list.component.ts index 07efee1d1f..1bbc0e9ddf 100644 --- a/packages/admin-ui/src/lib/system/src/components/job-list/job-list.component.ts +++ b/packages/admin-ui/src/lib/system/src/components/job-list/job-list.component.ts @@ -75,9 +75,7 @@ export class JobListComponent .getJobQueues() .mapStream(res => res.jobQueues) .pipe( - map(queues => { - return [{ name: 'all', running: true }, ...queues]; - }), + map(queues => [{ name: 'all', running: true }, ...queues]), ); } diff --git a/packages/admin-ui/src/main.ts b/packages/admin-ui/src/main.ts index 83d4685fb6..28989033df 100644 --- a/packages/admin-ui/src/main.ts +++ b/packages/admin-ui/src/main.ts @@ -12,6 +12,6 @@ if (environment.production) { loadAppConfig() .then(() => platformBrowserDynamic().bootstrapModule(AppModule)) .catch(err => { - // tslint:disable:no-console + /* eslint-disable no-console */ console.log(err); }); diff --git a/packages/admin-ui/src/test.ts b/packages/admin-ui/src/test.ts index 752be6ac1a..61d37353b4 100644 --- a/packages/admin-ui/src/test.ts +++ b/packages/admin-ui/src/test.ts @@ -1,5 +1,5 @@ // This file is required by karma.conf.js and loads recursively all the .spec and framework files -// tslint:disable +/* eslint-disable */ import 'zone.js/testing'; import { getTestBed } from '@angular/core/testing'; import { diff --git a/packages/admin-ui/src/tslint.json b/packages/admin-ui/src/tslint.json deleted file mode 100644 index 7b48fe62bd..0000000000 --- a/packages/admin-ui/src/tslint.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../tslint.json", - "rules": { - "directive-selector": [ - true, - "attribute", - "vdr", - "camelCase" - ], - "component-selector": [ - true, - "element", - "vdr", - "kebab-case" - ] - } -} diff --git a/packages/admin-ui/tslint.json b/packages/admin-ui/tslint.json deleted file mode 100644 index 118e5ad8ac..0000000000 --- a/packages/admin-ui/tslint.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "extends": [ - "../../tslint.json" - ], - "rulesDirectory": [ - "./node_modules/codelyzer" - ], - "rules": { - "deprecation": { - "severity": "warn" - }, - "import-blacklist": [ - true, - "rxjs/Rx" - ], - "indent": [ - true, - "spaces" - ], - "no-string-literal": false, - "no-output-on-prefix": true, - "use-input-property-decorator": true, - "use-output-property-decorator": true, - "use-host-property-decorator": true, - "no-input-rename": false, - "no-output-rename": true, - "use-life-cycle-interface": true, - "use-pipe-transform-interface": true, - "component-class-suffix": true, - "directive-class-suffix": true, - "no-floating-promises": false - } -} diff --git a/packages/asset-server-plugin/e2e/asset-server-plugin.e2e-spec.ts b/packages/asset-server-plugin/e2e/asset-server-plugin.e2e-spec.ts index 0ff7be20b7..ff7fdfbb05 100644 --- a/packages/asset-server-plugin/e2e/asset-server-plugin.e2e-spec.ts +++ b/packages/asset-server-plugin/e2e/asset-server-plugin.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { mergeConfig } from '@vendure/core'; import { AssetFragment } from '@vendure/core/e2e/graphql/generated-e2e-admin-types'; import { createTestEnvironment } from '@vendure/testing'; @@ -267,7 +267,7 @@ describe('AssetServerPlugin', () => { // https://github.com/vendure-ecommerce/vendure/issues/1563 it('falls back to binary preview if image file cannot be processed', async () => { - const filesToUpload = [path.join(__dirname, `fixtures/assets/bad-image.jpg`)]; + const filesToUpload = [path.join(__dirname, 'fixtures/assets/bad-image.jpg')]; const { createAssets }: CreateAssets.Mutation = await adminClient.fileUploadMutation({ mutation: CREATE_ASSETS, filePaths: filesToUpload, diff --git a/packages/asset-server-plugin/e2e/graphql/generated-e2e-asset-server-plugin-types.ts b/packages/asset-server-plugin/e2e/graphql/generated-e2e-asset-server-plugin-types.ts index 7875be3911..a5727d6cf0 100644 --- a/packages/asset-server-plugin/e2e/graphql/generated-e2e-asset-server-plugin-types.ts +++ b/packages/asset-server-plugin/e2e/graphql/generated-e2e-asset-server-plugin-types.ts @@ -1,4 +1,4 @@ -// tslint:disable +/* eslint-disable */ export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; diff --git a/packages/asset-server-plugin/package.json b/packages/asset-server-plugin/package.json index b9d12b99b5..8383181fd7 100644 --- a/packages/asset-server-plugin/package.json +++ b/packages/asset-server-plugin/package.json @@ -10,7 +10,7 @@ "scripts": { "watch": "tsc -p ./tsconfig.build.json --watch", "build": "rimraf lib && tsc -p ./tsconfig.build.json && node build.js", - "lint": "tslint --fix --project ./", + "lint": "eslint --fix .", "test": "vitest --run", "e2e": "cross-env PACKAGE=asset-server-plugin vitest --config ../../e2e-common/vitest.config.ts --run", "e2e:watch": "cross-env PACKAGE=asset-server-plugin vitest --config ../../e2e-common/vitest.config.ts" diff --git a/packages/asset-server-plugin/src/common.ts b/packages/asset-server-plugin/src/common.ts index d5f7dc1319..094baf2491 100644 --- a/packages/asset-server-plugin/src/common.ts +++ b/packages/asset-server-plugin/src/common.ts @@ -8,7 +8,9 @@ export function getAssetUrlPrefixFn(options: AssetServerOptions) { if (assetUrlPrefix == null) { return (request: Request, identifier: string) => { const protocol = request.headers['x-forwarded-proto'] ?? request.protocol; - return `${protocol}://${request.get('host')}/${route}/`; + return `${Array.isArray(protocol) ? protocol[0] : protocol}://${ + request.get('host') ?? 'could-not-determine-host' + }/${route}/`; }; } if (typeof assetUrlPrefix === 'string') { diff --git a/packages/asset-server-plugin/src/plugin.ts b/packages/asset-server-plugin/src/plugin.ts index 275e9f9d30..5950c9072f 100644 --- a/packages/asset-server-plugin/src/plugin.ts +++ b/packages/asset-server-plugin/src/plugin.ts @@ -246,7 +246,7 @@ export class AssetServerPlugin implements NestModule, OnApplicationBootstrap { mimeType = (await fromBuffer(file))?.mime || 'application/octet-stream'; } res.contentType(mimeType); - res.setHeader('content-security-policy', `default-src 'self'`); + res.setHeader('content-security-policy', 'default-src \'self\''); res.setHeader('Cache-Control', this.cacheHeader); res.send(file); } catch (e: any) { @@ -271,7 +271,7 @@ export class AssetServerPlugin implements NestModule, OnApplicationBootstrap { let file: Buffer; try { file = await AssetServerPlugin.assetStorage.readFileToBuffer(decodedReqPath); - } catch (err: any) { + } catch (_err: any) { res.status(404).send('Resource not found'); return; } @@ -291,7 +291,7 @@ export class AssetServerPlugin implements NestModule, OnApplicationBootstrap { mimeType = (await fromBuffer(imageBuffer))?.mime || 'image/jpeg'; } res.set('Content-Type', mimeType); - res.setHeader('content-security-policy', `default-src 'self'`); + res.setHeader('content-security-policy', 'default-src \'self\''); res.send(imageBuffer); return; } catch (e: any) { @@ -307,6 +307,7 @@ export class AssetServerPlugin implements NestModule, OnApplicationBootstrap { private getFileNameFromRequest(req: Request): string { const { w, h, mode, preset, fpx, fpy, format } = req.query; + /* eslint-disable @typescript-eslint/restrict-template-expressions */ const focalPoint = fpx && fpy ? `_fpx${fpx}_fpy${fpy}` : ''; const imageFormat = getValidFormat(format); let imageParamHash: string | null = null; @@ -319,6 +320,7 @@ export class AssetServerPlugin implements NestModule, OnApplicationBootstrap { imageParamHash = this.md5(`_transform_pre_${preset}${focalPoint}${imageFormat}`); } } + /* eslint-enable @typescript-eslint/restrict-template-expressions */ const decodedReqPath = decodeURIComponent(req.path); if (imageParamHash) { diff --git a/packages/asset-server-plugin/src/s3-asset-storage-strategy.ts b/packages/asset-server-plugin/src/s3-asset-storage-strategy.ts index 52986c993a..f3b193a23e 100644 --- a/packages/asset-server-plugin/src/s3-asset-storage-strategy.ts +++ b/packages/asset-server-plugin/src/s3-asset-storage-strategy.ts @@ -171,7 +171,7 @@ export class S3AssetStorageStrategy implements AssetStorageStrategy { this.AWS = await import('aws-sdk'); } catch (e: any) { Logger.error( - `Could not find the "aws-sdk" package. Make sure it is installed`, + 'Could not find the "aws-sdk" package. Make sure it is installed', loggerCtx, e.stack, ); @@ -294,7 +294,9 @@ export class S3AssetStorageStrategy implements AssetStorageStrategy { bucketExists = true; Logger.verbose(`Found S3 bucket "${bucket}"`, loggerCtx); } catch (e: any) { - Logger.verbose(`Could not find bucket "${bucket}: ${e.message ?? ''}". Attempting to create...`); + Logger.verbose( + `Could not find bucket "${bucket}: ${JSON.stringify(e.message)}". Attempting to create...`, + ); } if (!bucketExists) { try { @@ -302,7 +304,7 @@ export class S3AssetStorageStrategy implements AssetStorageStrategy { Logger.verbose(`Created S3 bucket "${bucket}"`, loggerCtx); } catch (e: any) { Logger.error( - `Could not find nor create the S3 bucket "${bucket}: ${e.message ?? ''}"`, + `Could not find nor create the S3 bucket "${bucket}: ${JSON.stringify(e.message)}"`, loggerCtx, e.stack, ); diff --git a/packages/asset-server-plugin/src/sharp-asset-preview-strategy.ts b/packages/asset-server-plugin/src/sharp-asset-preview-strategy.ts index 4195fb0a2a..09af227a21 100644 --- a/packages/asset-server-plugin/src/sharp-asset-preview-strategy.ts +++ b/packages/asset-server-plugin/src/sharp-asset-preview-strategy.ts @@ -147,9 +147,9 @@ export class SharpAssetPreviewStrategy implements AssetPreviewStrategy { } } catch (err: any) { Logger.error( - `An error occurred when generating preview for image with mimeType ${mimeType}: ${ - err.message ?? err.toString() - }`, + `An error occurred when generating preview for image with mimeType ${mimeType}: ${JSON.stringify( + err.message, + )}`, loggerCtx, ); return this.generateBinaryFilePreview(mimeType); diff --git a/packages/common/package.json b/packages/common/package.json index 11ee46d491..f88c2dd384 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -6,7 +6,7 @@ "scripts": { "watch": "tsc -p ./tsconfig.build.json -w", "build": "rimraf lib && tsc -p ./tsconfig.build.json", - "lint": "tslint --fix --project ./", + "lint": "eslint --fix .", "test": "vitest --run", "ci": "yarn build" }, diff --git a/packages/common/src/generated-shop-types.ts b/packages/common/src/generated-shop-types.ts index 99ecb90da6..52467b7873 100644 --- a/packages/common/src/generated-shop-types.ts +++ b/packages/common/src/generated-shop-types.ts @@ -1,4 +1,4 @@ -// tslint:disable +/* eslint-disable */ export type Maybe = T; export type InputMaybe = T; export type Exact = { [K in keyof T]: T[K] }; diff --git a/packages/common/src/generated-types.ts b/packages/common/src/generated-types.ts index a58c22dc20..e2d0086bd0 100644 --- a/packages/common/src/generated-types.ts +++ b/packages/common/src/generated-types.ts @@ -1,4 +1,4 @@ -// tslint:disable +/* eslint-disable */ export type Maybe = T; export type InputMaybe = T; export type Exact = { [K in keyof T]: T[K] }; diff --git a/packages/common/src/omit.ts b/packages/common/src/omit.ts index 15f09f196f..550396981b 100644 --- a/packages/common/src/omit.ts +++ b/packages/common/src/omit.ts @@ -11,11 +11,7 @@ export function omit( keysToOmit: string[], recursive: boolean, ): T; -export function omit( - obj: T, - keysToOmit: string[], - recursive: boolean = false, -): T { +export function omit(obj: T, keysToOmit: string[], recursive: boolean = false): T { if ((recursive && !isObject(obj)) || isFileObject(obj)) { return obj; } diff --git a/packages/common/src/shared-types.ts b/packages/common/src/shared-types.ts index 200ea7ab59..0cacc36a4c 100644 --- a/packages/common/src/shared-types.ts +++ b/packages/common/src/shared-types.ts @@ -1,4 +1,4 @@ -// tslint:disable:no-shadowed-variable +/* eslint-disable no-shadow,@typescript-eslint/no-shadow */ // prettier-ignore import { LanguageCode, LocalizedString } from './generated-types'; @@ -15,9 +15,9 @@ export type DeepPartial = { ? ReadonlyArray> : DeepPartial); }; -// tslint:enable:no-shadowed-variable +/* eslint-enable no-shadow, @typescript-eslint/no-shadow */ -// tslint:disable:ban-types +/* eslint-disable @typescript-eslint/ban-types */ /** * A recursive implementation of Required. * Source: https://github.com/microsoft/TypeScript/issues/15012#issuecomment-365453623 @@ -29,13 +29,13 @@ export type DeepRequired = T extend : DeepRequired, U>; } : T; -// tslint:enable:ban-types +/* eslint-enable @typescript-eslint/ban-types */ /** * A type representing the type rather than instance of a class. */ export interface Type extends Function { - // tslint:disable-next-line:callable-types + // eslint-disable-next-line @typescript-eslint/prefer-function-type new (...args: any[]): T; } @@ -158,18 +158,18 @@ export type DefaultFormComponentId = * @docsCategory ConfigurableOperationDef */ type DefaultFormConfigHash = { - 'boolean-form-input': {}; - 'currency-form-input': {}; - 'customer-group-form-input': {}; + 'boolean-form-input': Record; + 'currency-form-input': Record; + 'customer-group-form-input': Record; 'date-form-input': { min?: string; max?: string; yearRange?: number }; - 'facet-value-form-input': {}; + 'facet-value-form-input': Record; 'json-editor-form-input': { height?: string }; 'html-editor-form-input': { height?: string }; 'number-form-input': { min?: number; max?: number; step?: number; prefix?: string; suffix?: string }; - 'password-form-input': {}; - 'product-selector-form-input': {}; - 'relation-form-input': {}; - 'rich-text-form-input': {}; + 'password-form-input': Record; + 'product-selector-form-input': Record; + 'relation-form-input': Record; + 'rich-text-form-input': Record; 'select-form-input': { options?: Array<{ value: string; label?: Array> }>; }; @@ -177,11 +177,11 @@ type DefaultFormConfigHash = { 'textarea-form-input': { spellcheck?: boolean; }; - 'asset-form-input': {}; + 'asset-form-input': Record; 'product-multi-form-input': { selectionMode?: 'product' | 'variant'; }; - 'combination-mode-form-input': {}; + 'combination-mode-form-input': Record; }; export type DefaultFormComponentUiConfig = diff --git a/packages/common/src/shared-utils.spec.ts b/packages/common/src/shared-utils.spec.ts index 163a6d341e..9bd3fcf894 100644 --- a/packages/common/src/shared-utils.spec.ts +++ b/packages/common/src/shared-utils.spec.ts @@ -38,7 +38,7 @@ describe('isClassInstance()', () => { it('returns true for class instances', () => { expect(isClassInstance(new Date())).toBe(true); expect(isClassInstance(new Foo())).toBe(true); - // tslint:disable-next-line:no-construct + // eslint-disable-next-line no-new-wrappers expect(isClassInstance(new Number(1))).toBe(true); }); diff --git a/packages/common/src/shared-utils.ts b/packages/common/src/shared-utils.ts index 64b093e9e6..ecfe758983 100644 --- a/packages/common/src/shared-utils.ts +++ b/packages/common/src/shared-utils.ts @@ -85,11 +85,11 @@ export function generateAllCombinations( output.push(combination); return []; } else { - // tslint:disable:prefer-for-of + /* eslint-disable @typescript-eslint/prefer-for-of */ for (let i = 0; i < optionGroups[k].length; i++) { generateAllCombinations(optionGroups, combination.concat(optionGroups[k][i]), k + 1, output); } - // tslint:enable:prefer-for-of + /* eslint-enable @typescript-eslint/prefer-for-of */ return output; } } diff --git a/packages/common/src/unique.spec.ts b/packages/common/src/unique.spec.ts index 192091bff7..681364bfc0 100644 --- a/packages/common/src/unique.spec.ts +++ b/packages/common/src/unique.spec.ts @@ -33,7 +33,7 @@ describe('unique()', () => { expect(unique([])).toEqual([]); }); - it('perf on primitive array', async () => { + it('perf on primitive array', () => { const bigArray = Array.from({ length: 50000 }).map(() => Math.random().toString().substr(2, 5)); const timeStart = new Date().getTime(); unique(bigArray); @@ -41,7 +41,7 @@ describe('unique()', () => { expect(timeEnd - timeStart).toBeLessThan(100); }); - it('perf on object array', async () => { + it('perf on object array', () => { const bigArray = Array.from({ length: 50000 }) .map(() => Math.random().toString().substr(2, 5)) .map(id => ({ id })); diff --git a/packages/common/tslint.json b/packages/common/tslint.json deleted file mode 100644 index ee719b4ae6..0000000000 --- a/packages/common/tslint.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": [ - "../../tslint.json" - ] -} diff --git a/packages/core/build/gulpfile.ts b/packages/core/build/gulpfile.ts index 03755dfc9c..502bb4b990 100644 --- a/packages/core/build/gulpfile.ts +++ b/packages/core/build/gulpfile.ts @@ -14,13 +14,11 @@ function copyI18nMessages() { return src(MESSAGES_GLOB).pipe(dest('../dist/i18n/messages')); } -export const build = parallel( - copySchemas, - copyI18nMessages, -); +export const build = parallel(copySchemas, copyI18nMessages); export function watch() { const watcher1 = gulpWatch(SCHEMAS_GLOB, copySchemas); const watcher2 = gulpWatch(MESSAGES_GLOB, copyI18nMessages); + // eslint-disable-next-line @typescript-eslint/no-empty-function return new Promise(resolve => {}); } diff --git a/packages/core/e2e/active-order-strategy.e2e-spec.ts b/packages/core/e2e/active-order-strategy.e2e-spec.ts index 45fa3eda54..aac705c576 100644 --- a/packages/core/e2e/active-order-strategy.e2e-spec.ts +++ b/packages/core/e2e/active-order-strategy.e2e-spec.ts @@ -139,7 +139,7 @@ describe('custom ActiveOrderStrategy', () => { }); describe('happy path', () => { - const activeOrderInput = `activeOrderInput: { orderToken: { token: "token-2" } }`; + const activeOrderInput = 'activeOrderInput: { orderToken: { token: "token-2" } }'; const TEST_COUPON_CODE = 'TESTCOUPON'; let firstOrderLineId: string; diff --git a/packages/core/e2e/administrator.e2e-spec.ts b/packages/core/e2e/administrator.e2e-spec.ts index 4c87b73621..aff6883e98 100644 --- a/packages/core/e2e/administrator.e2e-spec.ts +++ b/packages/core/e2e/administrator.e2e-spec.ts @@ -117,7 +117,7 @@ describe('Administrator resolver', () => { roleIds: ['999'], }, }), - `No Role with the id '999' could be found`, + 'No Role with the id \'999\' could be found', ), ); diff --git a/packages/core/e2e/asset-channel.e2e-spec.ts b/packages/core/e2e/asset-channel.e2e-spec.ts index a72e0a434a..8271c9bd80 100644 --- a/packages/core/e2e/asset-channel.e2e-spec.ts +++ b/packages/core/e2e/asset-channel.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { createTestEnvironment, E2E_DEFAULT_CHANNEL_TOKEN } from '@vendure/testing'; import gql from 'graphql-tag'; import path from 'path'; @@ -84,7 +84,7 @@ describe('ChannelAware Assets', () => { }); it('Asset is not in channel2', async () => { - await adminClient.setChannelToken(SECOND_CHANNEL_TOKEN); + adminClient.setChannelToken(SECOND_CHANNEL_TOKEN); const { asset } = await adminClient.query( GET_ASSET, { @@ -95,7 +95,7 @@ describe('ChannelAware Assets', () => { }); it('Add asset to channel2', async () => { - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { assignAssetsToChannel: assets } = await adminClient.query< Codegen.AssignAssetsToChannelMutation, Codegen.AssignAssetsToChannelMutationVariables @@ -109,7 +109,7 @@ describe('ChannelAware Assets', () => { }); it('Get asset from channel2', async () => { - await adminClient.setChannelToken(SECOND_CHANNEL_TOKEN); + adminClient.setChannelToken(SECOND_CHANNEL_TOKEN); const { asset } = await adminClient.query( GET_ASSET, { @@ -132,7 +132,7 @@ describe('ChannelAware Assets', () => { }); it('Asset is available in default channel', async () => { - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { asset } = await adminClient.query( GET_ASSET, { @@ -143,7 +143,7 @@ describe('ChannelAware Assets', () => { }); it('Add asset to channel2', async () => { - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { assignAssetsToChannel: assets } = await adminClient.query< Codegen.AssignAssetsToChannelMutation, Codegen.AssignAssetsToChannelMutationVariables @@ -169,12 +169,12 @@ describe('ChannelAware Assets', () => { deleteFromAllChannels: true, }, }); - }, `You are not currently authorized to perform this action`), + }, 'You are not currently authorized to perform this action'), ); it('Delete asset from all channels as superadmin', async () => { await adminClient.asSuperAdmin(); - await adminClient.setChannelToken(SECOND_CHANNEL_TOKEN); + adminClient.setChannelToken(SECOND_CHANNEL_TOKEN); const { deleteAsset } = await adminClient.query< Codegen.DeleteAssetMutation, Codegen.DeleteAssetMutationVariables @@ -188,7 +188,7 @@ describe('ChannelAware Assets', () => { }); it('Asset is also deleted in default channel', async () => { - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { asset } = await adminClient.query( GET_ASSET, { @@ -201,7 +201,7 @@ describe('ChannelAware Assets', () => { describe('Product related assets', () => { it('Featured asset is available in default channel', async () => { - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { product } = await adminClient.query< Codegen.GetProductWithVariantsQuery, Codegen.GetProductWithVariantsQueryVariables @@ -211,7 +211,7 @@ describe('Product related assets', () => { featuredAssetId = product!.featuredAsset!.id; expect(featuredAssetId).toBeDefined(); - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { asset } = await adminClient.query( GET_ASSET, { @@ -222,7 +222,7 @@ describe('Product related assets', () => { }); it('Featured asset is not available in channel2', async () => { - await adminClient.setChannelToken(SECOND_CHANNEL_TOKEN); + adminClient.setChannelToken(SECOND_CHANNEL_TOKEN); const { asset } = await adminClient.query( GET_ASSET, { @@ -233,7 +233,7 @@ describe('Product related assets', () => { }); it('Add Product to channel2', async () => { - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { assignProductsToChannel } = await adminClient.query< Codegen.AssignProductsToChannelMutation, Codegen.AssignProductsToChannelMutationVariables @@ -248,7 +248,7 @@ describe('Product related assets', () => { }); it('Get featured asset from channel2', async () => { - await adminClient.setChannelToken(SECOND_CHANNEL_TOKEN); + adminClient.setChannelToken(SECOND_CHANNEL_TOKEN); const { asset } = await adminClient.query( GET_ASSET, { @@ -259,7 +259,7 @@ describe('Product related assets', () => { }); it('Add Product 2 to channel2', async () => { - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { assignProductsToChannel } = await adminClient.query< Codegen.AssignProductsToChannelMutation, Codegen.AssignProductsToChannelMutationVariables @@ -274,7 +274,7 @@ describe('Product related assets', () => { }); it('Add asset A to Product 2 in default channel', async () => { - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { updateProduct } = await adminClient.query< Codegen.UpdateProductMutation, Codegen.UpdateProductMutationVariables @@ -288,7 +288,7 @@ describe('Product related assets', () => { }); it('Channel2 does not have asset A', async () => { - await adminClient.setChannelToken(SECOND_CHANNEL_TOKEN); + adminClient.setChannelToken(SECOND_CHANNEL_TOKEN); const { product } = await adminClient.query< Codegen.GetProductWithVariantsQuery, Codegen.GetProductWithVariantsQueryVariables diff --git a/packages/core/e2e/asset.e2e-spec.ts b/packages/core/e2e/asset.e2e-spec.ts index 29199fa78d..3353f653a6 100644 --- a/packages/core/e2e/asset.e2e-spec.ts +++ b/packages/core/e2e/asset.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { omit } from '@vendure/common/lib/omit'; import { pick } from '@vendure/common/lib/pick'; import { mergeConfig } from '@vendure/core'; @@ -256,7 +256,7 @@ describe('Asset resolver', () => { expect(createAssets.length).toBe(1); expect(createAssets[0]).toEqual({ - message: `The MIME type 'text/plain' is not permitted.`, + message: 'The MIME type \'text/plain\' is not permitted.', mimeType: 'text/plain', fileName: 'dummy.txt', }); @@ -536,7 +536,7 @@ describe('Asset resolver', () => { }); expect(deleteAsset.result).toBe(DeletionResult.NOT_DELETED); - expect(deleteAsset.message).toContain(`The selected Asset is featured by 1 Product`); + expect(deleteAsset.message).toContain('The selected Asset is featured by 1 Product'); const { asset } = await adminClient.query( GET_ASSET, diff --git a/packages/core/e2e/auth.e2e-spec.ts b/packages/core/e2e/auth.e2e-spec.ts index 7e363d4146..90afad88b7 100644 --- a/packages/core/e2e/auth.e2e-spec.ts +++ b/packages/core/e2e/auth.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { SUPER_ADMIN_USER_IDENTIFIER, SUPER_ADMIN_USER_PASSWORD } from '@vendure/common/lib/shared-constants'; import { createErrorResultGuard, createTestEnvironment, ErrorResultGuard } from '@vendure/testing'; import { DocumentNode } from 'graphql'; @@ -306,7 +306,7 @@ describe('Authorization & permissions', () => { try { const status = await adminClient.query(gql(GET_PRODUCT_WITH_TRANSACTIONS), { id: 'T_1' }); - fail(`Should have thrown`); + fail('Should have thrown'); } catch (e: any) { expect(getErrorCode(e)).toBe('FORBIDDEN'); } @@ -383,7 +383,7 @@ describe('Authorization & permissions', () => { }`), { id: 'T_1' }, ); - fail(`Should have thrown`); + fail('Should have thrown'); } catch (e: any) { expect(getErrorCode(e)).toBe('FORBIDDEN'); } @@ -397,7 +397,7 @@ describe('Authorization & permissions', () => { } catch (e: any) { const errorCode = getErrorCode(e); if (!errorCode) { - fail(`Unexpected failure: ${e}`); + fail(`Unexpected failure: ${JSON.stringify(e)}`); } else { fail(`Operation should be allowed, got status ${getErrorCode(e)}`); } @@ -407,7 +407,7 @@ describe('Authorization & permissions', () => { async function assertRequestForbidden(operation: DocumentNode, variables: V) { try { const status = await adminClient.query(operation, variables); - fail(`Should have thrown`); + fail('Should have thrown'); } catch (e: any) { expect(getErrorCode(e)).toBe('FORBIDDEN'); } @@ -435,7 +435,7 @@ describe('Authorization & permissions', () => { const role = roleResult.createRole; const identifier = `${code}@${Math.random().toString(16).substr(2, 8)}`; - const password = `test`; + const password = 'test'; const adminResult = await adminClient.query< Codegen.CreateAdministratorMutation, diff --git a/packages/core/e2e/authentication-strategy.e2e-spec.ts b/packages/core/e2e/authentication-strategy.e2e-spec.ts index 42417750e5..5f7aec5102 100644 --- a/packages/core/e2e/authentication-strategy.e2e-spec.ts +++ b/packages/core/e2e/authentication-strategy.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { ErrorCode } from '@vendure/common/lib/generated-shop-types'; import { pick } from '@vendure/common/lib/pick'; import { mergeConfig, NativeAuthenticationStrategy } from '@vendure/core'; diff --git a/packages/core/e2e/channel.e2e-spec.ts b/packages/core/e2e/channel.e2e-spec.ts index 7b5f8ae238..ef8b2fd7bf 100644 --- a/packages/core/e2e/channel.e2e-spec.ts +++ b/packages/core/e2e/channel.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { DEFAULT_CHANNEL_CODE } from '@vendure/common/lib/shared-constants'; import { createErrorResultGuard, @@ -268,7 +268,7 @@ describe('Channels', () => { describe('setting defaultLanguage', () => { it('returns error result if languageCode not in availableLanguages', async () => { await adminClient.asSuperAdmin(); - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { updateChannel } = await adminClient.query< Codegen.UpdateChannelMutation, Codegen.UpdateChannelMutationVariables @@ -289,7 +289,7 @@ describe('Channels', () => { it('allows setting to an available language', async () => { await adminClient.asSuperAdmin(); - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); await adminClient.query< Codegen.UpdateGlobalLanguagesMutation, Codegen.UpdateGlobalLanguagesMutationVariables @@ -316,7 +316,7 @@ describe('Channels', () => { it('deleteChannel', async () => { const PROD_ID = 'T_1'; await adminClient.asSuperAdmin(); - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { assignProductsToChannel } = await adminClient.query< Codegen.AssignProductsToChannelMutation, diff --git a/packages/core/e2e/collection.e2e-spec.ts b/packages/core/e2e/collection.e2e-spec.ts index 9313cb8043..a211a2581d 100644 --- a/packages/core/e2e/collection.e2e-spec.ts +++ b/packages/core/e2e/collection.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { ROOT_COLLECTION_NAME } from '@vendure/common/lib/shared-constants'; import { DefaultJobQueuePlugin, @@ -135,7 +135,7 @@ describe('Collection resolver', () => { }, { name: 'containsAny', - value: `false`, + value: 'false', }, ], }, @@ -181,7 +181,7 @@ describe('Collection resolver', () => { }, { name: 'containsAny', - value: `false`, + value: 'false', }, ], }, @@ -212,7 +212,7 @@ describe('Collection resolver', () => { }, { name: 'containsAny', - value: `false`, + value: 'false', }, ], }, @@ -339,7 +339,7 @@ describe('Collection resolver', () => { }, { name: 'containsAny', - value: `false`, + value: 'false', }, ], }, @@ -376,7 +376,7 @@ describe('Collection resolver', () => { }, { name: 'containsAny', - value: `false`, + value: 'false', }, ], }, @@ -420,7 +420,7 @@ describe('Collection resolver', () => { }, { name: 'containsAny', - value: `false`, + value: 'false', }, ], }, @@ -494,7 +494,7 @@ describe('Collection resolver', () => { id: computersCollection.id, }); if (!result.collection) { - fail(`did not return the collection`); + fail('did not return the collection'); return; } expect(result.collection.id).toBe(computersCollection.id); @@ -508,7 +508,7 @@ describe('Collection resolver', () => { slug: computersCollection.slug, }); if (!result.collection) { - fail(`did not return the collection`); + fail('did not return the collection'); return; } expect(result.collection.id).toBe(computersCollection.id); @@ -527,7 +527,7 @@ describe('Collection resolver', () => { { languageCode: LanguageCode.de }, ); if (!result.collection) { - fail(`did not return the collection`); + fail('did not return the collection'); return; } expect(result.collection.id).toBe(computersCollection.id); @@ -564,7 +564,7 @@ describe('Collection resolver', () => { id: computersCollection.id, }); if (!result.collection) { - fail(`did not return the collection`); + fail('did not return the collection'); return; } expect(result.collection.parent!.name).toBe('Electronics'); @@ -649,7 +649,7 @@ describe('Collection resolver', () => { id: electronicsCollection.id, }); if (!result.collection) { - fail(`did not return the collection`); + fail('did not return the collection'); return; } expect(result.collection.children!.length).toBe(1); @@ -664,7 +664,7 @@ describe('Collection resolver', () => { id: pearCollection.id, }); if (!result.collection) { - fail(`did not return the collection`); + fail('did not return the collection'); return; } expect(result.collection.breadcrumbs).toEqual([ @@ -691,7 +691,7 @@ describe('Collection resolver', () => { id: 'T_1', }); if (!result.collection) { - fail(`did not return the collection`); + fail('did not return the collection'); return; } expect(result.collection.breadcrumbs).toEqual([ @@ -796,7 +796,7 @@ describe('Collection resolver', () => { id: pearBreadcrumbsCollection.id, }); if (!result.collection) { - fail(`did not return the collection`); + fail('did not return the collection'); return; } expect(result.collection.breadcrumbs).toEqual([ @@ -897,7 +897,7 @@ describe('Collection resolver', () => { index: 0, }, }), - `Cannot move a Collection into itself`, + 'Cannot move a Collection into itself', ), ); @@ -915,7 +915,7 @@ describe('Collection resolver', () => { index: 0, }, }), - `Cannot move a Collection into itself`, + 'Cannot move a Collection into itself', ), ); @@ -938,7 +938,7 @@ describe('Collection resolver', () => { id: 'T_1', }); if (!result.collection) { - fail(`did not return the collection`); + fail('did not return the collection'); return; } expect(result.collection.children?.map(c => (c as any).position)).toEqual([0, 1, 2, 3, 4, 5, 6]); @@ -1020,7 +1020,7 @@ describe('Collection resolver', () => { >(DELETE_COLLECTION, { id: 'T_999', }); - }, "No Collection with the id '999' could be found"), + }, 'No Collection with the id \'999\' could be found'), ); it('collection and product related prior to deletion', async () => { @@ -1244,7 +1244,7 @@ describe('Collection resolver', () => { }, { name: 'containsAny', - value: `false`, + value: 'false', }, ], }, @@ -1289,7 +1289,7 @@ describe('Collection resolver', () => { }, { name: 'containsAny', - value: `true`, + value: 'true', }, ], }, @@ -1343,7 +1343,7 @@ describe('Collection resolver', () => { }, { name: 'containsAny', - value: `true`, + value: 'true', }, ], }, @@ -1533,9 +1533,9 @@ describe('Collection resolver', () => { translations: [ { languageCode: LanguageCode.en, - name: `variantId filter test`, + name: 'variantId filter test', description: '', - slug: `variantId-filter-test`, + slug: 'variantId-filter-test', }, ], filters: [ @@ -1544,7 +1544,7 @@ describe('Collection resolver', () => { arguments: [ { name: 'variantIds', - value: `["T_1", "T_4"]`, + value: '["T_1", "T_4"]', }, ], }, @@ -1576,9 +1576,9 @@ describe('Collection resolver', () => { translations: [ { languageCode: LanguageCode.en, - name: `productId filter test`, + name: 'productId filter test', description: '', - slug: `productId-filter-test`, + slug: 'productId-filter-test', }, ], filters: [ @@ -1587,7 +1587,7 @@ describe('Collection resolver', () => { arguments: [ { name: 'productIds', - value: `["T_2"]`, + value: '["T_2"]', }, ], }, @@ -1759,7 +1759,7 @@ describe('Collection resolver', () => { }, { name: 'containsAny', - value: `false`, + value: 'false', }, ], }, @@ -1812,7 +1812,7 @@ describe('Collection resolver', () => { }, { name: 'containsAny', - value: `false`, + value: 'false', }, ], }, @@ -1857,7 +1857,7 @@ describe('Collection resolver', () => { }, { name: 'containsAny', - value: `false`, + value: 'false', }, ], }, @@ -1896,7 +1896,7 @@ describe('Collection resolver', () => { }, { name: 'containsAny', - value: `false`, + value: 'false', }, ], }, @@ -1933,7 +1933,7 @@ describe('Collection resolver', () => { }, { name: 'containsAny', - value: `false`, + value: 'false', }, ], }, @@ -2249,7 +2249,7 @@ describe('Collection resolver', () => { }, { name: 'containsAny', - value: `false`, + value: 'false', }, ], }, diff --git a/packages/core/e2e/configurable-operation.e2e-spec.ts b/packages/core/e2e/configurable-operation.e2e-spec.ts index 40ea9ed10c..1c30f8d9dd 100644 --- a/packages/core/e2e/configurable-operation.e2e-spec.ts +++ b/packages/core/e2e/configurable-operation.e2e-spec.ts @@ -118,7 +118,7 @@ describe('Configurable operations', () => { }, }, ); - }, "The argument 'required' is required"), + }, 'The argument \'required\' is required'), ); }); diff --git a/packages/core/e2e/country.e2e-spec.ts b/packages/core/e2e/country.e2e-spec.ts index e12356a652..9f2016545a 100644 --- a/packages/core/e2e/country.e2e-spec.ts +++ b/packages/core/e2e/country.e2e-spec.ts @@ -11,7 +11,7 @@ import { DeletionResult, GetCountryListQuery, LanguageCode } from './graphql/gen import * as Codegen from './graphql/generated-e2e-admin-types'; import { GET_COUNTRY_LIST, UPDATE_COUNTRY } from './graphql/shared-definitions'; -// tslint:disable:no-non-null-assertion +/* eslint-disable @typescript-eslint/no-non-null-assertion */ describe('Country resolver', () => { const { server, adminClient } = createTestEnvironment(testConfig()); diff --git a/packages/core/e2e/custom-fields.e2e-spec.ts b/packages/core/e2e/custom-fields.e2e-spec.ts index 5a07302e93..f061ff131e 100644 --- a/packages/core/e2e/custom-fields.e2e-spec.ts +++ b/packages/core/e2e/custom-fields.e2e-spec.ts @@ -15,7 +15,7 @@ import { fixPostgresTimezone } from './utils/fix-pg-timezone'; fixPostgresTimezone(); -// tslint:disable:no-non-null-assertion +/* eslint-disable @typescript-eslint/no-non-null-assertion */ const validateInjectorSpy = vi.fn(); @@ -52,7 +52,7 @@ const customConfig = mergeConfig(testConfig(), { type: 'string', validate: value => { if (value !== 'valid') { - return `The value ['${value}'] is not valid`; + return `The value ['${value as string}'] is not valid`; } }, }, @@ -64,7 +64,7 @@ const customConfig = mergeConfig(testConfig(), { return [ { languageCode: LanguageCode.en, - value: `The value ['${value}'] is not valid`, + value: `The value ['${value as string}'] is not valid`, }, ]; } @@ -83,7 +83,7 @@ const customConfig = mergeConfig(testConfig(), { type: 'string', validate: async (value, injector) => { await new Promise(resolve => setTimeout(resolve, 1)); - return `async error`; + return 'async error'; }, }, { @@ -92,7 +92,7 @@ const customConfig = mergeConfig(testConfig(), { entity: Asset, validate: async value => { await new Promise(resolve => setTimeout(resolve, 1)); - return `relation error`; + return 'relation error'; }, }, { @@ -160,7 +160,7 @@ const customConfig = mergeConfig(testConfig(), { list: true, validate: value => { if (!value.includes(42)) { - return `Must include the number 42!`; + return 'Must include the number 42!'; } }, }, @@ -365,7 +365,7 @@ describe('Custom fields', () => { } } `); - }, `Field "readonlyString" is not defined by type "UpdateProductCustomFieldsInput"`), + }, 'Field "readonlyString" is not defined by type "UpdateProductCustomFieldsInput"'), ); it( @@ -380,7 +380,7 @@ describe('Custom fields', () => { } } `); - }, `The custom field 'score' is readonly`), + }, "The custom field 'score' is readonly"), ); it( @@ -398,7 +398,7 @@ describe('Custom fields', () => { } } `); - }, `Field "readonlyString" is not defined by type "CreateProductCustomFieldsInput"`), + }, 'Field "readonlyString" is not defined by type "CreateProductCustomFieldsInput"'), ); it('string length allows long strings', async () => { @@ -457,7 +457,7 @@ describe('Custom fields', () => { } } `); - }, `The custom field 'validateString' value ['hello'] does not match the pattern [^[0-9][a-z]+$]`), + }, "The custom field 'validateString' value ['hello'] does not match the pattern [^[0-9][a-z]+$]"), ); it( @@ -470,7 +470,7 @@ describe('Custom fields', () => { } } `); - }, `The custom field 'stringWithOptions' value ['tiny'] is invalid. Valid options are ['small', 'medium', 'large']`), + }, "The custom field 'stringWithOptions' value ['tiny'] is invalid. Valid options are ['small', 'medium', 'large']"), ); it('valid string option', async () => { @@ -522,7 +522,7 @@ describe('Custom fields', () => { } } `); - }, `The custom field 'validateLocaleString' value ['servus'] does not match the pattern [^[0-9][a-z]+$]`), + }, "The custom field 'validateLocaleString' value ['servus'] does not match the pattern [^[0-9][a-z]+$]"), ); it( @@ -535,7 +535,7 @@ describe('Custom fields', () => { } } `); - }, `The custom field 'validateInt' value [12] is greater than the maximum [10]`), + }, "The custom field 'validateInt' value [12] is greater than the maximum [10]"), ); it( @@ -548,7 +548,7 @@ describe('Custom fields', () => { } } `); - }, `The custom field 'validateFloat' value [10.6] is greater than the maximum [10.5]`), + }, "The custom field 'validateFloat' value [10.6] is greater than the maximum [10.5]"), ); it( @@ -566,7 +566,7 @@ describe('Custom fields', () => { } } `); - }, `The custom field 'validateDateTime' value [2019-01-01T05:25:00.000Z] is less than the minimum [2019-01-01T08:30]`), + }, "The custom field 'validateDateTime' value [2019-01-01T05:25:00.000Z] is less than the minimum [2019-01-01T08:30]"), ); it( @@ -579,7 +579,7 @@ describe('Custom fields', () => { } } `); - }, `The value ['invalid'] is not valid`), + }, "The value ['invalid'] is not valid"), ); it( @@ -592,7 +592,7 @@ describe('Custom fields', () => { } } `); - }, `The value ['invalid'] is not valid`), + }, "The value ['invalid'] is not valid"), ); it( @@ -607,7 +607,7 @@ describe('Custom fields', () => { } } `); - }, `Must include the number 42!`), + }, 'Must include the number 42!'), ); it('valid list field', async () => { @@ -653,7 +653,7 @@ describe('Custom fields', () => { } } `); - }, `async error`), + }, 'async error'), ); // https://github.com/vendure-ecommerce/vendure/issues/1000 @@ -670,7 +670,7 @@ describe('Custom fields', () => { } } `); - }, `relation error`), + }, 'relation error'), ); // https://github.com/vendure-ecommerce/vendure/issues/1091 @@ -711,7 +711,7 @@ describe('Custom fields', () => { fail('Should have thrown'); } catch (e) { expect(e.message).toContain( - `The custom field 'validateInt' value [11] is greater than the maximum [10]`, + "The custom field 'validateInt' value [11] is greater than the maximum [10]", ); } @@ -751,7 +751,7 @@ describe('Custom fields', () => { fail('Should have thrown'); } catch (e) { expect(e.message).toContain( - `The custom field 'validateInt' value [11] is greater than the maximum [10]`, + "The custom field 'validateInt' value [11] is greater than the maximum [10]", ); } @@ -789,7 +789,7 @@ describe('Custom fields', () => { } } `); - }, `Cannot query field "nonPublic" on type "ProductCustomFields"`), + }, 'Cannot query field "nonPublic" on type "ProductCustomFields"'), ); it('publicly accessible via Shop API', async () => { @@ -820,7 +820,7 @@ describe('Custom fields', () => { } } `); - }, `Cannot query field "internalString" on type "ProductCustomFields"`), + }, 'Cannot query field "internalString" on type "ProductCustomFields"'), ); it( @@ -836,7 +836,7 @@ describe('Custom fields', () => { } } `); - }, `Cannot query field "internalString" on type "ProductCustomFields"`), + }, 'Cannot query field "internalString" on type "ProductCustomFields"'), ); }); @@ -921,7 +921,7 @@ describe('Custom fields', () => { } } `); - }, `Field "intListWithValidation" is not defined by type "ProductSortParameter".`), + }, 'Field "intListWithValidation" is not defined by type "ProductSortParameter".'), ); it( @@ -934,7 +934,7 @@ describe('Custom fields', () => { } } `); - }, `Field "internalString" is not defined by type "ProductFilterParameter"`), + }, 'Field "internalString" is not defined by type "ProductFilterParameter"'), ); it( @@ -947,7 +947,7 @@ describe('Custom fields', () => { } } `); - }, `Field "internalString" is not defined by type "ProductFilterParameter"`), + }, 'Field "internalString" is not defined by type "ProductFilterParameter"'), ); }); @@ -991,14 +991,14 @@ describe('Custom fields', () => { switch (customConfig.dbConnectionOptions.type) { case 'mariadb': case 'mysql': - duplicateKeyErrMessage = `ER_DUP_ENTRY: Duplicate entry 'foo' for key`; + duplicateKeyErrMessage = "ER_DUP_ENTRY: Duplicate entry 'foo' for key"; break; case 'postgres': - duplicateKeyErrMessage = `duplicate key value violates unique constraint`; + duplicateKeyErrMessage = 'duplicate key value violates unique constraint'; break; case 'sqlite': case 'sqljs': - duplicateKeyErrMessage = `UNIQUE constraint failed: product.customFieldsUniquestring`; + duplicateKeyErrMessage = 'UNIQUE constraint failed: product.customFieldsUniquestring'; break; } expect(e.message).toContain(duplicateKeyErrMessage); diff --git a/packages/core/e2e/custom-permissions.e2e-spec.ts b/packages/core/e2e/custom-permissions.e2e-spec.ts index e6f37a9bd7..fe0951735e 100644 --- a/packages/core/e2e/custom-permissions.e2e-spec.ts +++ b/packages/core/e2e/custom-permissions.e2e-spec.ts @@ -92,7 +92,7 @@ describe('Custom permissions', () => { }); it('CRUD read permission', async () => { - // tslint:disable-next-line:no-shadowed-variable + // eslint-disable-next-line no-shadow,@typescript-eslint/no-shadow const { wishlist } = await adminClient.query(CRUD_READ); expect(wishlist).toBe(true); }); @@ -179,7 +179,7 @@ describe('Custom permissions', () => { }); it('CRUD read permission', async () => { - // tslint:disable-next-line:no-shadowed-variable + // eslint-disable-next-line no-shadow,@typescript-eslint/no-shadow const { wishlist } = await adminClient.query(CRUD_READ); expect(wishlist).toBe(true); }); diff --git a/packages/core/e2e/customer-channel.e2e-spec.ts b/packages/core/e2e/customer-channel.e2e-spec.ts index 0d5a36fc29..3c883b6412 100644 --- a/packages/core/e2e/customer-channel.e2e-spec.ts +++ b/packages/core/e2e/customer-channel.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { createTestEnvironment, E2E_DEFAULT_CHANNEL_TOKEN } from '@vendure/testing'; import path from 'path'; import { afterAll, beforeAll, describe, expect, it } from 'vitest'; @@ -99,7 +99,7 @@ describe('ChannelAware Customers', () => { streetLine1: 'Dummy street', }, }); - }, `No Address with the id '1' could be found`), + }, "No Address with the id '1' could be found"), ); it( @@ -116,7 +116,7 @@ describe('ChannelAware Customers', () => { countryCode: 'BE', }, }); - }, `No Customer with the id '1' could be found`), + }, "No Customer with the id '1' could be found"), ); it( @@ -129,7 +129,7 @@ describe('ChannelAware Customers', () => { >(DELETE_ADDRESS, { id: 'T_1', }); - }, `No Address with the id '1' could be found`), + }, "No Address with the id '1' could be found"), ); }); @@ -144,7 +144,7 @@ describe('ChannelAware Customers', () => { >(DELETE_CUSTOMER, { id: firstCustomer.id, }); - }, `No Customer with the id '1' could be found`), + }, "No Customer with the id '1' could be found"), ); it( @@ -161,7 +161,7 @@ describe('ChannelAware Customers', () => { lastName: 'Doe', }, }); - }, `No Customer with the id '1' could be found`), + }, "No Customer with the id '1' could be found"), ); it('creates customers on current and default channel', async () => { @@ -327,7 +327,7 @@ describe('ChannelAware Customers', () => { shopClient.query(ME), ]); } catch (e: any) { - fail('Threw: ' + e.message); + fail('Threw: ' + (e.message as string)); } adminClient.setChannelToken(THIRD_CHANNEL_TOKEN); diff --git a/packages/core/e2e/customer-group.e2e-spec.ts b/packages/core/e2e/customer-group.e2e-spec.ts index fcfeea2004..b0d00e45c0 100644 --- a/packages/core/e2e/customer-group.e2e-spec.ts +++ b/packages/core/e2e/customer-group.e2e-spec.ts @@ -223,7 +223,7 @@ describe('CustomerGroup resolver', () => { groupId: 'T_1', customerIds: [customers[4].id], }); - }, `Customer does not belong to this CustomerGroup`), + }, 'Customer does not belong to this CustomerGroup'), ); it('removeCustomersFromGroup with valid customerIds', async () => { diff --git a/packages/core/e2e/customer.e2e-spec.ts b/packages/core/e2e/customer.e2e-spec.ts index 7fb776a477..c5c19f6442 100644 --- a/packages/core/e2e/customer.e2e-spec.ts +++ b/packages/core/e2e/customer.e2e-spec.ts @@ -46,7 +46,7 @@ import { import { ADD_ITEM_TO_ORDER, SET_CUSTOMER } from './graphql/shop-definitions'; import { assertThrowsWithMessage } from './utils/assert-throws-with-message'; -// tslint:disable:no-non-null-assertion +/* eslint-disable @typescript-eslint/no-non-null-assertion */ let sendEmailFn: Mock; /** @@ -193,7 +193,7 @@ describe('Customer resolver', () => { }, }, ), - `The countryCode "INVALID" was not recognized`, + 'The countryCode "INVALID" was not recognized', ), ); @@ -445,7 +445,7 @@ describe('Customer resolver', () => { input => !!input.lines, ); - it(`lists that user\'s orders`, async () => { + it("lists that user's orders", async () => { // log in as first customer await shopClient.asUserWithCredentials(firstCustomer.emailAddress, 'test'); // add an item to the order to create an order @@ -464,7 +464,7 @@ describe('Customer resolver', () => { >(GET_CUSTOMER_ORDERS, { id: firstCustomer.id }); expect(customer!.orders.totalItems).toBe(1); - expect(customer!.orders.items[0].id).toBe(addItemToOrder!.id); + expect(customer!.orders.items[0].id).toBe(addItemToOrder.id); }); }); @@ -611,7 +611,7 @@ describe('Customer resolver', () => { firstName: 'updated', }, }), - `No Customer with the id '3' could be found`, + "No Customer with the id '3' could be found", ), ); @@ -629,7 +629,7 @@ describe('Customer resolver', () => { }, }, ), - `No Customer with the id '3' could be found`, + "No Customer with the id '3' could be found", ), ); @@ -725,7 +725,7 @@ describe('Customer resolver', () => { }, ]); - noteId = customer?.history.items[0].id!; + noteId = customer!.history.items[0].id!; }); it('update note', async () => { @@ -749,7 +749,7 @@ describe('Customer resolver', () => { Codegen.GetCustomerHistoryQuery, Codegen.GetCustomerHistoryQueryVariables >(GET_CUSTOMER_HISTORY, { id: firstCustomer.id }); - const historyCount = before?.history.totalItems!; + const historyCount = before!.history.totalItems; const { deleteCustomerNote } = await adminClient.query< Codegen.DeleteCustomerNoteMutation, diff --git a/packages/core/e2e/default-search-plugin-uuids.e2e-spec.ts b/packages/core/e2e/default-search-plugin-uuids.e2e-spec.ts index 43ff027e0d..37c1749668 100644 --- a/packages/core/e2e/default-search-plugin-uuids.e2e-spec.ts +++ b/packages/core/e2e/default-search-plugin-uuids.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { DefaultJobQueuePlugin, DefaultSearchPlugin, mergeConfig, UuidIdStrategy } from '@vendure/core'; import { createTestEnvironment, registerInitializer, SqljsInitializer } from '@vendure/testing'; import path from 'path'; diff --git a/packages/core/e2e/default-search-plugin.e2e-spec.ts b/packages/core/e2e/default-search-plugin.e2e-spec.ts index cdff0d471f..49b77b2382 100644 --- a/packages/core/e2e/default-search-plugin.e2e-spec.ts +++ b/packages/core/e2e/default-search-plugin.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { pick } from '@vendure/common/lib/pick'; import { DefaultJobQueuePlugin, @@ -915,11 +915,11 @@ describe('Default search plugin', () => { arguments: [ { name: 'facetValueIds', - value: `["T_4"]`, + value: '["T_4"]', }, { name: 'containsAny', - value: `false`, + value: 'false', }, ], }, @@ -974,11 +974,11 @@ describe('Default search plugin', () => { arguments: [ { name: 'facetValueIds', - value: `["T_3"]`, + value: '["T_3"]', }, { name: 'containsAny', - value: `false`, + value: 'false', }, ], }, diff --git a/packages/core/e2e/draft-order.e2e-spec.ts b/packages/core/e2e/draft-order.e2e-spec.ts index bc2b7f6f8b..119a12872a 100644 --- a/packages/core/e2e/draft-order.e2e-spec.ts +++ b/packages/core/e2e/draft-order.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { LanguageCode } from '@vendure/common/lib/generated-types'; import { DefaultLogger, mergeConfig, orderPercentageDiscount } from '@vendure/core'; import { createErrorResultGuard, createTestEnvironment, ErrorResultGuard } from '@vendure/testing'; diff --git a/packages/core/e2e/entity-hydrator.e2e-spec.ts b/packages/core/e2e/entity-hydrator.e2e-spec.ts index 8128037c39..43124d249c 100644 --- a/packages/core/e2e/entity-hydrator.e2e-spec.ts +++ b/packages/core/e2e/entity-hydrator.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { mergeConfig, Order, Product, ProductVariant } from '@vendure/core'; import { createErrorResultGuard, createTestEnvironment, ErrorResultGuard } from '@vendure/testing'; import gql from 'graphql-tag'; diff --git a/packages/core/e2e/entity-id-strategy.e2e-spec.ts b/packages/core/e2e/entity-id-strategy.e2e-spec.ts index a89cfe98bc..d963b3cdf3 100644 --- a/packages/core/e2e/entity-id-strategy.e2e-spec.ts +++ b/packages/core/e2e/entity-id-strategy.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { createTestEnvironment } from '@vendure/testing'; import gql from 'graphql-tag'; import path from 'path'; diff --git a/packages/core/e2e/entity-uuid-strategy.e2e-spec.ts b/packages/core/e2e/entity-uuid-strategy.e2e-spec.ts index 57515d8149..d04de58cd5 100644 --- a/packages/core/e2e/entity-uuid-strategy.e2e-spec.ts +++ b/packages/core/e2e/entity-uuid-strategy.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { UuidIdStrategy } from '@vendure/core'; // This import is here to simulate the behaviour of // the package end-user importing symbols from the diff --git a/packages/core/e2e/facet.e2e-spec.ts b/packages/core/e2e/facet.e2e-spec.ts index 5a3db6458b..56fad1941c 100644 --- a/packages/core/e2e/facet.e2e-spec.ts +++ b/packages/core/e2e/facet.e2e-spec.ts @@ -29,7 +29,7 @@ import { } from './graphql/shared-definitions'; import { assertThrowsWithMessage } from './utils/assert-throws-with-message'; -// tslint:disable:no-non-null-assertion +/* eslint-disable @typescript-eslint/no-non-null-assertion */ describe('Facet resolver', () => { const { server, adminClient, shopClient } = createTestEnvironment(testConfig()); @@ -286,7 +286,7 @@ describe('Facet resolver', () => { expect(result1.deleteFacetValues).toEqual([ { result: DeletionResult.DELETED, - message: ``, + message: '', }, ]); @@ -312,7 +312,7 @@ describe('Facet resolver', () => { expect(result1.deleteFacetValues).toEqual([ { result: DeletionResult.NOT_DELETED, - message: `The FacetValue "pc" is assigned to 1 Product, 1 ProductVariant`, + message: 'The FacetValue "pc" is assigned to 1 Product, 1 ProductVariant', }, ]); @@ -332,7 +332,8 @@ describe('Facet resolver', () => { expect(result1.deleteFacetValues).toEqual([ { result: DeletionResult.DELETED, - message: `The selected FacetValue was removed from 1 Product, 1 ProductVariant and deleted`, + message: + 'The selected FacetValue was removed from 1 Product, 1 ProductVariant and deleted', }, ]); @@ -372,7 +373,7 @@ describe('Facet resolver', () => { expect(result1.deleteFacet).toEqual({ result: DeletionResult.NOT_DELETED, - message: `The Facet "speaker-type" includes FacetValues which are assigned to 1 Product`, + message: 'The Facet "speaker-type" includes FacetValues which are assigned to 1 Product', }); expect(result2.facet).not.toBe(null); @@ -389,7 +390,7 @@ describe('Facet resolver', () => { expect(result1.deleteFacet).toEqual({ result: DeletionResult.DELETED, - message: `The Facet was deleted and its FacetValues were removed from 1 Product`, + message: 'The Facet was deleted and its FacetValues were removed from 1 Product', }); // FacetValue no longer in the Facet.values array @@ -646,7 +647,7 @@ describe('Facet resolver', () => { }, ], }); - }, `No Facet with the id '1' could be found`), + }, "No Facet with the id '1' could be found"), ); it('removing from channel with error', async () => { diff --git a/packages/core/e2e/fixtures/test-plugins/hydration-test-plugin.ts b/packages/core/e2e/fixtures/test-plugins/hydration-test-plugin.ts index 918b3b7005..7ac97dd6b1 100644 --- a/packages/core/e2e/fixtures/test-plugins/hydration-test-plugin.ts +++ b/packages/core/e2e/fixtures/test-plugins/hydration-test-plugin.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { Args, Query, Resolver } from '@nestjs/graphql'; import { Asset, @@ -35,7 +35,7 @@ export class TestAdminPluginResolver { where: { id: args.id }, relations: ['facetValues'], }); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion await this.entityHydrator.hydrate(ctx, product!, { relations: [ 'variants.options', @@ -54,7 +54,7 @@ export class TestAdminPluginResolver { @Query() async hydrateProductAsset(@Ctx() ctx: RequestContext, @Args() args: { id: ID }) { const product = await this.connection.getRepository(ctx, Product).findOne({ where: { id: args.id } }); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion await this.entityHydrator.hydrate(ctx, product!, { relations: ['assets'], }); diff --git a/packages/core/e2e/fixtures/test-plugins/issue-1636-1664/issue-1636-1664-plugin.ts b/packages/core/e2e/fixtures/test-plugins/issue-1636-1664/issue-1636-1664-plugin.ts index 1f667b9090..110bc1693d 100644 --- a/packages/core/e2e/fixtures/test-plugins/issue-1636-1664/issue-1636-1664-plugin.ts +++ b/packages/core/e2e/fixtures/test-plugins/issue-1636-1664/issue-1636-1664-plugin.ts @@ -154,7 +154,7 @@ const profileType = gql` return config; }, }) -// tslint:disable-next-line:class-name +// eslint-disable-next-line @typescript-eslint/naming-convention export class TestPlugin1636_1664 implements OnApplicationBootstrap { static testResolverSpy = vi.fn(); @@ -167,7 +167,7 @@ export class TestPlugin1636_1664 implements OnApplicationBootstrap { } // Create a Profile and assign it to all the products const channels = await this.connection.rawConnection.getRepository(Channel).find(); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const channel = channels[0]!; const profile = await this.connection.rawConnection.getRepository(Profile).save( new Profile({ diff --git a/packages/core/e2e/fixtures/test-plugins/list-query-plugin.ts b/packages/core/e2e/fixtures/test-plugins/list-query-plugin.ts index 43b5a74c0f..9a94403ff7 100644 --- a/packages/core/e2e/fixtures/test-plugins/list-query-plugin.ts +++ b/packages/core/e2e/fixtures/test-plugins/list-query-plugin.ts @@ -156,7 +156,7 @@ export class ListQueryResolver { .then(([items, totalItems]) => { for (const item of items) { if (item.prices && item.prices.length) { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion item.activePrice = item.prices.find(p => p.channelId === 1)!.price; } } @@ -175,7 +175,7 @@ export class ListQueryResolver { .then(items => { for (const item of items) { if (item.prices && item.prices.length) { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion item.activePrice = item.prices.find(p => p.channelId === 1)!.price; } } @@ -370,7 +370,7 @@ export class ListQueryPlugin implements OnApplicationBootstrap { for (const testEntity of testEntities) { const customer = customers[i % customers.length]; try { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const order = await this.orderService.create(ctx, customer.user!.id); testEntity.orderRelation = order; await this.connection.getRepository(TestEntity).save(testEntity); diff --git a/packages/core/e2e/fixtures/test-plugins/transaction-test-plugin.ts b/packages/core/e2e/fixtures/test-plugins/transaction-test-plugin.ts index 153c194ca4..b9beb4f6cc 100644 --- a/packages/core/e2e/fixtures/test-plugins/transaction-test-plugin.ts +++ b/packages/core/e2e/fixtures/test-plugins/transaction-test-plugin.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/restrict-template-expressions */ import { Injectable, OnApplicationBootstrap } from '@nestjs/common'; import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; import { diff --git a/packages/core/e2e/fixtures/test-plugins/with-api-extensions.ts b/packages/core/e2e/fixtures/test-plugins/with-api-extensions.ts index dd20f3e7dc..5c1f79c981 100644 --- a/packages/core/e2e/fixtures/test-plugins/with-api-extensions.ts +++ b/packages/core/e2e/fixtures/test-plugins/with-api-extensions.ts @@ -31,7 +31,7 @@ const PizzaScalar = new GraphQLScalarType({ name: 'Pizza', description: 'Everything is pizza', serialize(value) { - return value.toString() + ' pizza!'; + return ((value as any).toString() as string) + ' pizza!'; }, parseValue(value) { return value; diff --git a/packages/core/e2e/fixtures/test-plugins/with-config.ts b/packages/core/e2e/fixtures/test-plugins/with-config.ts index 821a3da70e..9a8b24da0b 100644 --- a/packages/core/e2e/fixtures/test-plugins/with-config.ts +++ b/packages/core/e2e/fixtures/test-plugins/with-config.ts @@ -4,7 +4,7 @@ import { ConfigModule, VendurePlugin } from '@vendure/core'; @VendurePlugin({ imports: [ConfigModule], configuration: config => { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion config.defaultLanguageCode = LanguageCode.zh; return config; }, diff --git a/packages/core/e2e/fulfillment-process.e2e-spec.ts b/packages/core/e2e/fulfillment-process.e2e-spec.ts index ef8395bfc0..d1b32cec29 100644 --- a/packages/core/e2e/fulfillment-process.e2e-spec.ts +++ b/packages/core/e2e/fulfillment-process.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { CustomFulfillmentProcess, defaultFulfillmentProcess, diff --git a/packages/core/e2e/graphql/generated-e2e-admin-types.ts b/packages/core/e2e/graphql/generated-e2e-admin-types.ts index 9b46b7dcf2..5d5dbf1151 100644 --- a/packages/core/e2e/graphql/generated-e2e-admin-types.ts +++ b/packages/core/e2e/graphql/generated-e2e-admin-types.ts @@ -1,4 +1,4 @@ -// tslint:disable +/* eslint-disable */ export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; @@ -6,345 +6,364 @@ export type MakeOptional = Omit & { [SubKey in K]?: export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - DateTime: any; - JSON: any; - Money: number; - Upload: any; -}; - -export type AddFulfillmentToOrderResult = CreateFulfillmentError | EmptyOrderLineSelectionError | Fulfillment | FulfillmentStateTransitionError | InsufficientStockOnHandError | InvalidFulfillmentHandlerError | ItemsAlreadyFulfilledError; + ID: string; + String: string; + Boolean: boolean; + Int: number; + Float: number; + DateTime: any; + JSON: any; + Money: number; + Upload: any; +}; + +export type AddFulfillmentToOrderResult = + | CreateFulfillmentError + | EmptyOrderLineSelectionError + | Fulfillment + | FulfillmentStateTransitionError + | InsufficientStockOnHandError + | InvalidFulfillmentHandlerError + | ItemsAlreadyFulfilledError; export type AddItemInput = { - productVariantId: Scalars['ID']; - quantity: Scalars['Int']; + productVariantId: Scalars['ID']; + quantity: Scalars['Int']; }; export type AddItemToDraftOrderInput = { - productVariantId: Scalars['ID']; - quantity: Scalars['Int']; + productVariantId: Scalars['ID']; + quantity: Scalars['Int']; }; export type AddManualPaymentToOrderResult = ManualPaymentStateError | Order; export type AddNoteToCustomerInput = { - id: Scalars['ID']; - isPublic: Scalars['Boolean']; - note: Scalars['String']; + id: Scalars['ID']; + isPublic: Scalars['Boolean']; + note: Scalars['String']; }; export type AddNoteToOrderInput = { - id: Scalars['ID']; - isPublic: Scalars['Boolean']; - note: Scalars['String']; + id: Scalars['ID']; + isPublic: Scalars['Boolean']; + note: Scalars['String']; }; export type Address = Node & { - city?: Maybe; - company?: Maybe; - country: Country; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - defaultBillingAddress?: Maybe; - defaultShippingAddress?: Maybe; - fullName?: Maybe; - id: Scalars['ID']; - phoneNumber?: Maybe; - postalCode?: Maybe; - province?: Maybe; - streetLine1: Scalars['String']; - streetLine2?: Maybe; - updatedAt: Scalars['DateTime']; + city?: Maybe; + company?: Maybe; + country: Country; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + defaultBillingAddress?: Maybe; + defaultShippingAddress?: Maybe; + fullName?: Maybe; + id: Scalars['ID']; + phoneNumber?: Maybe; + postalCode?: Maybe; + province?: Maybe; + streetLine1: Scalars['String']; + streetLine2?: Maybe; + updatedAt: Scalars['DateTime']; }; export type AdjustDraftOrderLineInput = { - orderLineId: Scalars['ID']; - quantity: Scalars['Int']; + orderLineId: Scalars['ID']; + quantity: Scalars['Int']; }; export type Adjustment = { - adjustmentSource: Scalars['String']; - amount: Scalars['Money']; - data?: Maybe; - description: Scalars['String']; - type: AdjustmentType; + adjustmentSource: Scalars['String']; + amount: Scalars['Money']; + data?: Maybe; + description: Scalars['String']; + type: AdjustmentType; }; export enum AdjustmentType { - DISTRIBUTED_ORDER_PROMOTION = 'DISTRIBUTED_ORDER_PROMOTION', - OTHER = 'OTHER', - PROMOTION = 'PROMOTION' + DISTRIBUTED_ORDER_PROMOTION = 'DISTRIBUTED_ORDER_PROMOTION', + OTHER = 'OTHER', + PROMOTION = 'PROMOTION', } export type Administrator = Node & { - createdAt: Scalars['DateTime']; - customFields?: Maybe; - emailAddress: Scalars['String']; - firstName: Scalars['String']; - id: Scalars['ID']; - lastName: Scalars['String']; - updatedAt: Scalars['DateTime']; - user: User; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + emailAddress: Scalars['String']; + firstName: Scalars['String']; + id: Scalars['ID']; + lastName: Scalars['String']; + updatedAt: Scalars['DateTime']; + user: User; }; export type AdministratorFilterParameter = { - createdAt?: InputMaybe; - emailAddress?: InputMaybe; - firstName?: InputMaybe; - id?: InputMaybe; - lastName?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + emailAddress?: InputMaybe; + firstName?: InputMaybe; + id?: InputMaybe; + lastName?: InputMaybe; + updatedAt?: InputMaybe; }; export type AdministratorList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type AdministratorListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type AdministratorPaymentInput = { - metadata?: InputMaybe; - paymentMethod?: InputMaybe; + metadata?: InputMaybe; + paymentMethod?: InputMaybe; }; export type AdministratorRefundInput = { - paymentId: Scalars['ID']; - reason?: InputMaybe; + paymentId: Scalars['ID']; + reason?: InputMaybe; }; export type AdministratorSortParameter = { - createdAt?: InputMaybe; - emailAddress?: InputMaybe; - firstName?: InputMaybe; - id?: InputMaybe; - lastName?: InputMaybe; - updatedAt?: InputMaybe; -}; - -export type Allocation = Node & StockMovement & { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - orderLine: OrderLine; - productVariant: ProductVariant; - quantity: Scalars['Int']; - type: StockMovementType; - updatedAt: Scalars['DateTime']; -}; + createdAt?: InputMaybe; + emailAddress?: InputMaybe; + firstName?: InputMaybe; + id?: InputMaybe; + lastName?: InputMaybe; + updatedAt?: InputMaybe; +}; + +export type Allocation = Node & + StockMovement & { + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + orderLine: OrderLine; + productVariant: ProductVariant; + quantity: Scalars['Int']; + type: StockMovementType; + updatedAt: Scalars['DateTime']; + }; /** Returned if an attempting to refund an OrderItem which has already been refunded */ export type AlreadyRefundedError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; - refundId: Scalars['ID']; + errorCode: ErrorCode; + message: Scalars['String']; + refundId: Scalars['ID']; }; -export type ApplyCouponCodeResult = CouponCodeExpiredError | CouponCodeInvalidError | CouponCodeLimitError | Order; +export type ApplyCouponCodeResult = + | CouponCodeExpiredError + | CouponCodeInvalidError + | CouponCodeLimitError + | Order; export type Asset = Node & { - createdAt: Scalars['DateTime']; - customFields?: Maybe; - fileSize: Scalars['Int']; - focalPoint?: Maybe; - height: Scalars['Int']; - id: Scalars['ID']; - mimeType: Scalars['String']; - name: Scalars['String']; - preview: Scalars['String']; - source: Scalars['String']; - tags: Array; - type: AssetType; - updatedAt: Scalars['DateTime']; - width: Scalars['Int']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + fileSize: Scalars['Int']; + focalPoint?: Maybe; + height: Scalars['Int']; + id: Scalars['ID']; + mimeType: Scalars['String']; + name: Scalars['String']; + preview: Scalars['String']; + source: Scalars['String']; + tags: Array; + type: AssetType; + updatedAt: Scalars['DateTime']; + width: Scalars['Int']; }; export type AssetFilterParameter = { - createdAt?: InputMaybe; - fileSize?: InputMaybe; - height?: InputMaybe; - id?: InputMaybe; - mimeType?: InputMaybe; - name?: InputMaybe; - preview?: InputMaybe; - source?: InputMaybe; - type?: InputMaybe; - updatedAt?: InputMaybe; - width?: InputMaybe; + createdAt?: InputMaybe; + fileSize?: InputMaybe; + height?: InputMaybe; + id?: InputMaybe; + mimeType?: InputMaybe; + name?: InputMaybe; + preview?: InputMaybe; + source?: InputMaybe; + type?: InputMaybe; + updatedAt?: InputMaybe; + width?: InputMaybe; }; export type AssetList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type AssetListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - tags?: InputMaybe>; - tagsOperator?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + tags?: InputMaybe>; + tagsOperator?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type AssetSortParameter = { - createdAt?: InputMaybe; - fileSize?: InputMaybe; - height?: InputMaybe; - id?: InputMaybe; - mimeType?: InputMaybe; - name?: InputMaybe; - preview?: InputMaybe; - source?: InputMaybe; - updatedAt?: InputMaybe; - width?: InputMaybe; + createdAt?: InputMaybe; + fileSize?: InputMaybe; + height?: InputMaybe; + id?: InputMaybe; + mimeType?: InputMaybe; + name?: InputMaybe; + preview?: InputMaybe; + source?: InputMaybe; + updatedAt?: InputMaybe; + width?: InputMaybe; }; export enum AssetType { - BINARY = 'BINARY', - IMAGE = 'IMAGE', - VIDEO = 'VIDEO' + BINARY = 'BINARY', + IMAGE = 'IMAGE', + VIDEO = 'VIDEO', } export type AssignAssetsToChannelInput = { - assetIds: Array; - channelId: Scalars['ID']; + assetIds: Array; + channelId: Scalars['ID']; }; export type AssignCollectionsToChannelInput = { - channelId: Scalars['ID']; - collectionIds: Array; + channelId: Scalars['ID']; + collectionIds: Array; }; export type AssignFacetsToChannelInput = { - channelId: Scalars['ID']; - facetIds: Array; + channelId: Scalars['ID']; + facetIds: Array; }; export type AssignProductVariantsToChannelInput = { - channelId: Scalars['ID']; - priceFactor?: InputMaybe; - productVariantIds: Array; + channelId: Scalars['ID']; + priceFactor?: InputMaybe; + productVariantIds: Array; }; export type AssignProductsToChannelInput = { - channelId: Scalars['ID']; - priceFactor?: InputMaybe; - productIds: Array; + channelId: Scalars['ID']; + priceFactor?: InputMaybe; + productIds: Array; }; export type AssignPromotionsToChannelInput = { - channelId: Scalars['ID']; - promotionIds: Array; + channelId: Scalars['ID']; + promotionIds: Array; }; export type AuthenticationInput = { - native?: InputMaybe; + native?: InputMaybe; }; export type AuthenticationMethod = Node & { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - strategy: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + strategy: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type AuthenticationResult = CurrentUser | InvalidCredentialsError; export type BooleanCustomFieldConfig = CustomField & { - description?: Maybe>; - internal?: Maybe; - label?: Maybe>; - list: Scalars['Boolean']; - name: Scalars['String']; - nullable?: Maybe; - readonly?: Maybe; - type: Scalars['String']; - ui?: Maybe; + description?: Maybe>; + internal?: Maybe; + label?: Maybe>; + list: Scalars['Boolean']; + name: Scalars['String']; + nullable?: Maybe; + readonly?: Maybe; + type: Scalars['String']; + ui?: Maybe; }; /** Operators for filtering on a list of Boolean fields */ export type BooleanListOperators = { - inList: Scalars['Boolean']; + inList: Scalars['Boolean']; }; /** Operators for filtering on a Boolean field */ export type BooleanOperators = { - eq?: InputMaybe; - isNull?: InputMaybe; + eq?: InputMaybe; + isNull?: InputMaybe; }; /** Returned if an attempting to cancel lines from an Order which is still active */ export type CancelActiveOrderError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; - orderState: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; + orderState: Scalars['String']; }; export type CancelOrderInput = { - /** Specify whether the shipping charges should also be cancelled. Defaults to false */ - cancelShipping?: InputMaybe; - /** Optionally specify which OrderLines to cancel. If not provided, all OrderLines will be cancelled */ - lines?: InputMaybe>; - /** The id of the order to be cancelled */ - orderId: Scalars['ID']; - reason?: InputMaybe; -}; - -export type CancelOrderResult = CancelActiveOrderError | EmptyOrderLineSelectionError | MultipleOrderError | Order | OrderStateTransitionError | QuantityTooGreatError; + /** Specify whether the shipping charges should also be cancelled. Defaults to false */ + cancelShipping?: InputMaybe; + /** Optionally specify which OrderLines to cancel. If not provided, all OrderLines will be cancelled */ + lines?: InputMaybe>; + /** The id of the order to be cancelled */ + orderId: Scalars['ID']; + reason?: InputMaybe; +}; + +export type CancelOrderResult = + | CancelActiveOrderError + | EmptyOrderLineSelectionError + | MultipleOrderError + | Order + | OrderStateTransitionError + | QuantityTooGreatError; /** Returned if the Payment cancellation fails */ export type CancelPaymentError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; - paymentErrorMessage: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; + paymentErrorMessage: Scalars['String']; }; export type CancelPaymentResult = CancelPaymentError | Payment | PaymentStateTransitionError; -export type Cancellation = Node & StockMovement & { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - orderLine: OrderLine; - productVariant: ProductVariant; - quantity: Scalars['Int']; - type: StockMovementType; - updatedAt: Scalars['DateTime']; -}; +export type Cancellation = Node & + StockMovement & { + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + orderLine: OrderLine; + productVariant: ProductVariant; + quantity: Scalars['Int']; + type: StockMovementType; + updatedAt: Scalars['DateTime']; + }; export type Channel = Node & { - code: Scalars['String']; - createdAt: Scalars['DateTime']; - currencyCode: CurrencyCode; - customFields?: Maybe; - defaultLanguageCode: LanguageCode; - defaultShippingZone?: Maybe; - defaultTaxZone?: Maybe; - id: Scalars['ID']; - pricesIncludeTax: Scalars['Boolean']; - seller?: Maybe; - token: Scalars['String']; - updatedAt: Scalars['DateTime']; + code: Scalars['String']; + createdAt: Scalars['DateTime']; + currencyCode: CurrencyCode; + customFields?: Maybe; + defaultLanguageCode: LanguageCode; + defaultShippingZone?: Maybe; + defaultTaxZone?: Maybe; + id: Scalars['ID']; + pricesIncludeTax: Scalars['Boolean']; + seller?: Maybe; + token: Scalars['String']; + updatedAt: Scalars['DateTime']; }; /** @@ -352,74 +371,73 @@ export type Channel = Node & { * of the GlobalSettings */ export type ChannelDefaultLanguageError = ErrorResult & { - channelCode: Scalars['String']; - errorCode: ErrorCode; - language: Scalars['String']; - message: Scalars['String']; + channelCode: Scalars['String']; + errorCode: ErrorCode; + language: Scalars['String']; + message: Scalars['String']; }; export type Collection = Node & { - assets: Array; - breadcrumbs: Array; - children?: Maybe>; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - description: Scalars['String']; - featuredAsset?: Maybe; - filters: Array; - id: Scalars['ID']; - inheritFilters: Scalars['Boolean']; - isPrivate: Scalars['Boolean']; - languageCode?: Maybe; - name: Scalars['String']; - parent?: Maybe; - position: Scalars['Int']; - productVariants: ProductVariantList; - slug: Scalars['String']; - translations: Array; - updatedAt: Scalars['DateTime']; + assets: Array; + breadcrumbs: Array; + children?: Maybe>; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + description: Scalars['String']; + featuredAsset?: Maybe; + filters: Array; + id: Scalars['ID']; + inheritFilters: Scalars['Boolean']; + isPrivate: Scalars['Boolean']; + languageCode?: Maybe; + name: Scalars['String']; + parent?: Maybe; + position: Scalars['Int']; + productVariants: ProductVariantList; + slug: Scalars['String']; + translations: Array; + updatedAt: Scalars['DateTime']; }; - export type CollectionProductVariantsArgs = { - options?: InputMaybe; + options?: InputMaybe; }; export type CollectionBreadcrumb = { - id: Scalars['ID']; - name: Scalars['String']; - slug: Scalars['String']; + id: Scalars['ID']; + name: Scalars['String']; + slug: Scalars['String']; }; export type CollectionFilterParameter = { - createdAt?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - inheritFilters?: InputMaybe; - isPrivate?: InputMaybe; - languageCode?: InputMaybe; - name?: InputMaybe; - position?: InputMaybe; - slug?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + description?: InputMaybe; + id?: InputMaybe; + inheritFilters?: InputMaybe; + isPrivate?: InputMaybe; + languageCode?: InputMaybe; + name?: InputMaybe; + position?: InputMaybe; + slug?: InputMaybe; + updatedAt?: InputMaybe; }; export type CollectionList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type CollectionListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; /** @@ -427,405 +445,405 @@ export type CollectionListOptions = { * by the search, and in what quantity. */ export type CollectionResult = { - collection: Collection; - count: Scalars['Int']; + collection: Collection; + count: Scalars['Int']; }; export type CollectionSortParameter = { - createdAt?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - position?: InputMaybe; - slug?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + description?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + position?: InputMaybe; + slug?: InputMaybe; + updatedAt?: InputMaybe; }; export type CollectionTranslation = { - createdAt: Scalars['DateTime']; - description: Scalars['String']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - slug: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + description: Scalars['String']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + slug: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type ConfigArg = { - name: Scalars['String']; - value: Scalars['String']; + name: Scalars['String']; + value: Scalars['String']; }; export type ConfigArgDefinition = { - defaultValue?: Maybe; - description?: Maybe; - label?: Maybe; - list: Scalars['Boolean']; - name: Scalars['String']; - required: Scalars['Boolean']; - type: Scalars['String']; - ui?: Maybe; + defaultValue?: Maybe; + description?: Maybe; + label?: Maybe; + list: Scalars['Boolean']; + name: Scalars['String']; + required: Scalars['Boolean']; + type: Scalars['String']; + ui?: Maybe; }; export type ConfigArgInput = { - name: Scalars['String']; - /** A JSON stringified representation of the actual value */ - value: Scalars['String']; + name: Scalars['String']; + /** A JSON stringified representation of the actual value */ + value: Scalars['String']; }; export type ConfigurableOperation = { - args: Array; - code: Scalars['String']; + args: Array; + code: Scalars['String']; }; export type ConfigurableOperationDefinition = { - args: Array; - code: Scalars['String']; - description: Scalars['String']; + args: Array; + code: Scalars['String']; + description: Scalars['String']; }; export type ConfigurableOperationInput = { - arguments: Array; - code: Scalars['String']; + arguments: Array; + code: Scalars['String']; }; export type Coordinate = { - x: Scalars['Float']; - y: Scalars['Float']; + x: Scalars['Float']; + y: Scalars['Float']; }; export type CoordinateInput = { - x: Scalars['Float']; - y: Scalars['Float']; + x: Scalars['Float']; + y: Scalars['Float']; }; export type Country = Node & { - code: Scalars['String']; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - enabled: Scalars['Boolean']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - translations: Array; - updatedAt: Scalars['DateTime']; + code: Scalars['String']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + enabled: Scalars['Boolean']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + translations: Array; + updatedAt: Scalars['DateTime']; }; export type CountryFilterParameter = { - code?: InputMaybe; - createdAt?: InputMaybe; - enabled?: InputMaybe; - id?: InputMaybe; - languageCode?: InputMaybe; - name?: InputMaybe; - updatedAt?: InputMaybe; + code?: InputMaybe; + createdAt?: InputMaybe; + enabled?: InputMaybe; + id?: InputMaybe; + languageCode?: InputMaybe; + name?: InputMaybe; + updatedAt?: InputMaybe; }; export type CountryList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type CountryListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type CountrySortParameter = { - code?: InputMaybe; - createdAt?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - updatedAt?: InputMaybe; + code?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + updatedAt?: InputMaybe; }; export type CountryTranslation = { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type CountryTranslationInput = { - customFields?: InputMaybe; - id?: InputMaybe; - languageCode: LanguageCode; - name?: InputMaybe; + customFields?: InputMaybe; + id?: InputMaybe; + languageCode: LanguageCode; + name?: InputMaybe; }; /** Returned if the provided coupon code is invalid */ export type CouponCodeExpiredError = ErrorResult & { - couponCode: Scalars['String']; - errorCode: ErrorCode; - message: Scalars['String']; + couponCode: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** Returned if the provided coupon code is invalid */ export type CouponCodeInvalidError = ErrorResult & { - couponCode: Scalars['String']; - errorCode: ErrorCode; - message: Scalars['String']; + couponCode: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** Returned if the provided coupon code is invalid */ export type CouponCodeLimitError = ErrorResult & { - couponCode: Scalars['String']; - errorCode: ErrorCode; - limit: Scalars['Int']; - message: Scalars['String']; + couponCode: Scalars['String']; + errorCode: ErrorCode; + limit: Scalars['Int']; + message: Scalars['String']; }; export type CreateAddressInput = { - city?: InputMaybe; - company?: InputMaybe; - countryCode: Scalars['String']; - customFields?: InputMaybe; - defaultBillingAddress?: InputMaybe; - defaultShippingAddress?: InputMaybe; - fullName?: InputMaybe; - phoneNumber?: InputMaybe; - postalCode?: InputMaybe; - province?: InputMaybe; - streetLine1: Scalars['String']; - streetLine2?: InputMaybe; + city?: InputMaybe; + company?: InputMaybe; + countryCode: Scalars['String']; + customFields?: InputMaybe; + defaultBillingAddress?: InputMaybe; + defaultShippingAddress?: InputMaybe; + fullName?: InputMaybe; + phoneNumber?: InputMaybe; + postalCode?: InputMaybe; + province?: InputMaybe; + streetLine1: Scalars['String']; + streetLine2?: InputMaybe; }; export type CreateAdministratorInput = { - customFields?: InputMaybe; - emailAddress: Scalars['String']; - firstName: Scalars['String']; - lastName: Scalars['String']; - password: Scalars['String']; - roleIds: Array; + customFields?: InputMaybe; + emailAddress: Scalars['String']; + firstName: Scalars['String']; + lastName: Scalars['String']; + password: Scalars['String']; + roleIds: Array; }; export type CreateAssetInput = { - customFields?: InputMaybe; - file: Scalars['Upload']; - tags?: InputMaybe>; + customFields?: InputMaybe; + file: Scalars['Upload']; + tags?: InputMaybe>; }; export type CreateAssetResult = Asset | MimeTypeError; export type CreateChannelInput = { - code: Scalars['String']; - currencyCode: CurrencyCode; - customFields?: InputMaybe; - defaultLanguageCode: LanguageCode; - defaultShippingZoneId: Scalars['ID']; - defaultTaxZoneId: Scalars['ID']; - pricesIncludeTax: Scalars['Boolean']; - sellerId?: InputMaybe; - token: Scalars['String']; + code: Scalars['String']; + currencyCode: CurrencyCode; + customFields?: InputMaybe; + defaultLanguageCode: LanguageCode; + defaultShippingZoneId: Scalars['ID']; + defaultTaxZoneId: Scalars['ID']; + pricesIncludeTax: Scalars['Boolean']; + sellerId?: InputMaybe; + token: Scalars['String']; }; export type CreateChannelResult = Channel | LanguageNotAvailableError; export type CreateCollectionInput = { - assetIds?: InputMaybe>; - customFields?: InputMaybe; - featuredAssetId?: InputMaybe; - filters: Array; - inheritFilters?: InputMaybe; - isPrivate?: InputMaybe; - parentId?: InputMaybe; - translations: Array; + assetIds?: InputMaybe>; + customFields?: InputMaybe; + featuredAssetId?: InputMaybe; + filters: Array; + inheritFilters?: InputMaybe; + isPrivate?: InputMaybe; + parentId?: InputMaybe; + translations: Array; }; export type CreateCollectionTranslationInput = { - customFields?: InputMaybe; - description: Scalars['String']; - languageCode: LanguageCode; - name: Scalars['String']; - slug: Scalars['String']; + customFields?: InputMaybe; + description: Scalars['String']; + languageCode: LanguageCode; + name: Scalars['String']; + slug: Scalars['String']; }; export type CreateCountryInput = { - code: Scalars['String']; - customFields?: InputMaybe; - enabled: Scalars['Boolean']; - translations: Array; + code: Scalars['String']; + customFields?: InputMaybe; + enabled: Scalars['Boolean']; + translations: Array; }; export type CreateCustomerGroupInput = { - customFields?: InputMaybe; - customerIds?: InputMaybe>; - name: Scalars['String']; + customFields?: InputMaybe; + customerIds?: InputMaybe>; + name: Scalars['String']; }; export type CreateCustomerInput = { - customFields?: InputMaybe; - emailAddress: Scalars['String']; - firstName: Scalars['String']; - lastName: Scalars['String']; - phoneNumber?: InputMaybe; - title?: InputMaybe; + customFields?: InputMaybe; + emailAddress: Scalars['String']; + firstName: Scalars['String']; + lastName: Scalars['String']; + phoneNumber?: InputMaybe; + title?: InputMaybe; }; export type CreateCustomerResult = Customer | EmailAddressConflictError; export type CreateFacetInput = { - code: Scalars['String']; - customFields?: InputMaybe; - isPrivate: Scalars['Boolean']; - translations: Array; - values?: InputMaybe>; + code: Scalars['String']; + customFields?: InputMaybe; + isPrivate: Scalars['Boolean']; + translations: Array; + values?: InputMaybe>; }; export type CreateFacetValueInput = { - code: Scalars['String']; - customFields?: InputMaybe; - facetId: Scalars['ID']; - translations: Array; + code: Scalars['String']; + customFields?: InputMaybe; + facetId: Scalars['ID']; + translations: Array; }; export type CreateFacetValueWithFacetInput = { - code: Scalars['String']; - translations: Array; + code: Scalars['String']; + translations: Array; }; /** Returned if an error is thrown in a FulfillmentHandler's createFulfillment method */ export type CreateFulfillmentError = ErrorResult & { - errorCode: ErrorCode; - fulfillmentHandlerError: Scalars['String']; - message: Scalars['String']; + errorCode: ErrorCode; + fulfillmentHandlerError: Scalars['String']; + message: Scalars['String']; }; export type CreateGroupOptionInput = { - code: Scalars['String']; - translations: Array; + code: Scalars['String']; + translations: Array; }; export type CreatePaymentMethodInput = { - checker?: InputMaybe; - code: Scalars['String']; - customFields?: InputMaybe; - enabled: Scalars['Boolean']; - handler: ConfigurableOperationInput; - translations: Array; + checker?: InputMaybe; + code: Scalars['String']; + customFields?: InputMaybe; + enabled: Scalars['Boolean']; + handler: ConfigurableOperationInput; + translations: Array; }; export type CreateProductInput = { - assetIds?: InputMaybe>; - customFields?: InputMaybe; - enabled?: InputMaybe; - facetValueIds?: InputMaybe>; - featuredAssetId?: InputMaybe; - translations: Array; + assetIds?: InputMaybe>; + customFields?: InputMaybe; + enabled?: InputMaybe; + facetValueIds?: InputMaybe>; + featuredAssetId?: InputMaybe; + translations: Array; }; export type CreateProductOptionGroupInput = { - code: Scalars['String']; - customFields?: InputMaybe; - options: Array; - translations: Array; + code: Scalars['String']; + customFields?: InputMaybe; + options: Array; + translations: Array; }; export type CreateProductOptionInput = { - code: Scalars['String']; - customFields?: InputMaybe; - productOptionGroupId: Scalars['ID']; - translations: Array; + code: Scalars['String']; + customFields?: InputMaybe; + productOptionGroupId: Scalars['ID']; + translations: Array; }; export type CreateProductVariantInput = { - assetIds?: InputMaybe>; - customFields?: InputMaybe; - facetValueIds?: InputMaybe>; - featuredAssetId?: InputMaybe; - optionIds?: InputMaybe>; - outOfStockThreshold?: InputMaybe; - price?: InputMaybe; - productId: Scalars['ID']; - sku: Scalars['String']; - stockLevels?: InputMaybe>; - stockOnHand?: InputMaybe; - taxCategoryId?: InputMaybe; - trackInventory?: InputMaybe; - translations: Array; - useGlobalOutOfStockThreshold?: InputMaybe; + assetIds?: InputMaybe>; + customFields?: InputMaybe; + facetValueIds?: InputMaybe>; + featuredAssetId?: InputMaybe; + optionIds?: InputMaybe>; + outOfStockThreshold?: InputMaybe; + price?: InputMaybe; + productId: Scalars['ID']; + sku: Scalars['String']; + stockLevels?: InputMaybe>; + stockOnHand?: InputMaybe; + taxCategoryId?: InputMaybe; + trackInventory?: InputMaybe; + translations: Array; + useGlobalOutOfStockThreshold?: InputMaybe; }; export type CreateProductVariantOptionInput = { - code: Scalars['String']; - optionGroupId: Scalars['ID']; - translations: Array; + code: Scalars['String']; + optionGroupId: Scalars['ID']; + translations: Array; }; export type CreatePromotionInput = { - actions: Array; - conditions: Array; - couponCode?: InputMaybe; - customFields?: InputMaybe; - enabled: Scalars['Boolean']; - endsAt?: InputMaybe; - perCustomerUsageLimit?: InputMaybe; - startsAt?: InputMaybe; - translations: Array; + actions: Array; + conditions: Array; + couponCode?: InputMaybe; + customFields?: InputMaybe; + enabled: Scalars['Boolean']; + endsAt?: InputMaybe; + perCustomerUsageLimit?: InputMaybe; + startsAt?: InputMaybe; + translations: Array; }; export type CreatePromotionResult = MissingConditionsError | Promotion; export type CreateRoleInput = { - channelIds?: InputMaybe>; - code: Scalars['String']; - description: Scalars['String']; - permissions: Array; + channelIds?: InputMaybe>; + code: Scalars['String']; + description: Scalars['String']; + permissions: Array; }; export type CreateSellerInput = { - customFields?: InputMaybe; - name: Scalars['String']; + customFields?: InputMaybe; + name: Scalars['String']; }; export type CreateShippingMethodInput = { - calculator: ConfigurableOperationInput; - checker: ConfigurableOperationInput; - code: Scalars['String']; - customFields?: InputMaybe; - fulfillmentHandler: Scalars['String']; - translations: Array; + calculator: ConfigurableOperationInput; + checker: ConfigurableOperationInput; + code: Scalars['String']; + customFields?: InputMaybe; + fulfillmentHandler: Scalars['String']; + translations: Array; }; export type CreateStockLocationInput = { - customFields?: InputMaybe; - description?: InputMaybe; - name: Scalars['String']; + customFields?: InputMaybe; + description?: InputMaybe; + name: Scalars['String']; }; export type CreateTagInput = { - value: Scalars['String']; + value: Scalars['String']; }; export type CreateTaxCategoryInput = { - customFields?: InputMaybe; - isDefault?: InputMaybe; - name: Scalars['String']; + customFields?: InputMaybe; + isDefault?: InputMaybe; + name: Scalars['String']; }; export type CreateTaxRateInput = { - categoryId: Scalars['ID']; - customFields?: InputMaybe; - customerGroupId?: InputMaybe; - enabled: Scalars['Boolean']; - name: Scalars['String']; - value: Scalars['Float']; - zoneId: Scalars['ID']; + categoryId: Scalars['ID']; + customFields?: InputMaybe; + customerGroupId?: InputMaybe; + enabled: Scalars['Boolean']; + name: Scalars['String']; + value: Scalars['Float']; + zoneId: Scalars['ID']; }; export type CreateZoneInput = { - customFields?: InputMaybe; - memberIds?: InputMaybe>; - name: Scalars['String']; + customFields?: InputMaybe; + memberIds?: InputMaybe>; + name: Scalars['String']; }; /** @@ -835,510 +853,516 @@ export type CreateZoneInput = { * @docsCategory common */ export enum CurrencyCode { - /** United Arab Emirates dirham */ - AED = 'AED', - /** Afghan afghani */ - AFN = 'AFN', - /** Albanian lek */ - ALL = 'ALL', - /** Armenian dram */ - AMD = 'AMD', - /** Netherlands Antillean guilder */ - ANG = 'ANG', - /** Angolan kwanza */ - AOA = 'AOA', - /** Argentine peso */ - ARS = 'ARS', - /** Australian dollar */ - AUD = 'AUD', - /** Aruban florin */ - AWG = 'AWG', - /** Azerbaijani manat */ - AZN = 'AZN', - /** Bosnia and Herzegovina convertible mark */ - BAM = 'BAM', - /** Barbados dollar */ - BBD = 'BBD', - /** Bangladeshi taka */ - BDT = 'BDT', - /** Bulgarian lev */ - BGN = 'BGN', - /** Bahraini dinar */ - BHD = 'BHD', - /** Burundian franc */ - BIF = 'BIF', - /** Bermudian dollar */ - BMD = 'BMD', - /** Brunei dollar */ - BND = 'BND', - /** Boliviano */ - BOB = 'BOB', - /** Brazilian real */ - BRL = 'BRL', - /** Bahamian dollar */ - BSD = 'BSD', - /** Bhutanese ngultrum */ - BTN = 'BTN', - /** Botswana pula */ - BWP = 'BWP', - /** Belarusian ruble */ - BYN = 'BYN', - /** Belize dollar */ - BZD = 'BZD', - /** Canadian dollar */ - CAD = 'CAD', - /** Congolese franc */ - CDF = 'CDF', - /** Swiss franc */ - CHF = 'CHF', - /** Chilean peso */ - CLP = 'CLP', - /** Renminbi (Chinese) yuan */ - CNY = 'CNY', - /** Colombian peso */ - COP = 'COP', - /** Costa Rican colon */ - CRC = 'CRC', - /** Cuban convertible peso */ - CUC = 'CUC', - /** Cuban peso */ - CUP = 'CUP', - /** Cape Verde escudo */ - CVE = 'CVE', - /** Czech koruna */ - CZK = 'CZK', - /** Djiboutian franc */ - DJF = 'DJF', - /** Danish krone */ - DKK = 'DKK', - /** Dominican peso */ - DOP = 'DOP', - /** Algerian dinar */ - DZD = 'DZD', - /** Egyptian pound */ - EGP = 'EGP', - /** Eritrean nakfa */ - ERN = 'ERN', - /** Ethiopian birr */ - ETB = 'ETB', - /** Euro */ - EUR = 'EUR', - /** Fiji dollar */ - FJD = 'FJD', - /** Falkland Islands pound */ - FKP = 'FKP', - /** Pound sterling */ - GBP = 'GBP', - /** Georgian lari */ - GEL = 'GEL', - /** Ghanaian cedi */ - GHS = 'GHS', - /** Gibraltar pound */ - GIP = 'GIP', - /** Gambian dalasi */ - GMD = 'GMD', - /** Guinean franc */ - GNF = 'GNF', - /** Guatemalan quetzal */ - GTQ = 'GTQ', - /** Guyanese dollar */ - GYD = 'GYD', - /** Hong Kong dollar */ - HKD = 'HKD', - /** Honduran lempira */ - HNL = 'HNL', - /** Croatian kuna */ - HRK = 'HRK', - /** Haitian gourde */ - HTG = 'HTG', - /** Hungarian forint */ - HUF = 'HUF', - /** Indonesian rupiah */ - IDR = 'IDR', - /** Israeli new shekel */ - ILS = 'ILS', - /** Indian rupee */ - INR = 'INR', - /** Iraqi dinar */ - IQD = 'IQD', - /** Iranian rial */ - IRR = 'IRR', - /** Icelandic króna */ - ISK = 'ISK', - /** Jamaican dollar */ - JMD = 'JMD', - /** Jordanian dinar */ - JOD = 'JOD', - /** Japanese yen */ - JPY = 'JPY', - /** Kenyan shilling */ - KES = 'KES', - /** Kyrgyzstani som */ - KGS = 'KGS', - /** Cambodian riel */ - KHR = 'KHR', - /** Comoro franc */ - KMF = 'KMF', - /** North Korean won */ - KPW = 'KPW', - /** South Korean won */ - KRW = 'KRW', - /** Kuwaiti dinar */ - KWD = 'KWD', - /** Cayman Islands dollar */ - KYD = 'KYD', - /** Kazakhstani tenge */ - KZT = 'KZT', - /** Lao kip */ - LAK = 'LAK', - /** Lebanese pound */ - LBP = 'LBP', - /** Sri Lankan rupee */ - LKR = 'LKR', - /** Liberian dollar */ - LRD = 'LRD', - /** Lesotho loti */ - LSL = 'LSL', - /** Libyan dinar */ - LYD = 'LYD', - /** Moroccan dirham */ - MAD = 'MAD', - /** Moldovan leu */ - MDL = 'MDL', - /** Malagasy ariary */ - MGA = 'MGA', - /** Macedonian denar */ - MKD = 'MKD', - /** Myanmar kyat */ - MMK = 'MMK', - /** Mongolian tögrög */ - MNT = 'MNT', - /** Macanese pataca */ - MOP = 'MOP', - /** Mauritanian ouguiya */ - MRU = 'MRU', - /** Mauritian rupee */ - MUR = 'MUR', - /** Maldivian rufiyaa */ - MVR = 'MVR', - /** Malawian kwacha */ - MWK = 'MWK', - /** Mexican peso */ - MXN = 'MXN', - /** Malaysian ringgit */ - MYR = 'MYR', - /** Mozambican metical */ - MZN = 'MZN', - /** Namibian dollar */ - NAD = 'NAD', - /** Nigerian naira */ - NGN = 'NGN', - /** Nicaraguan córdoba */ - NIO = 'NIO', - /** Norwegian krone */ - NOK = 'NOK', - /** Nepalese rupee */ - NPR = 'NPR', - /** New Zealand dollar */ - NZD = 'NZD', - /** Omani rial */ - OMR = 'OMR', - /** Panamanian balboa */ - PAB = 'PAB', - /** Peruvian sol */ - PEN = 'PEN', - /** Papua New Guinean kina */ - PGK = 'PGK', - /** Philippine peso */ - PHP = 'PHP', - /** Pakistani rupee */ - PKR = 'PKR', - /** Polish złoty */ - PLN = 'PLN', - /** Paraguayan guaraní */ - PYG = 'PYG', - /** Qatari riyal */ - QAR = 'QAR', - /** Romanian leu */ - RON = 'RON', - /** Serbian dinar */ - RSD = 'RSD', - /** Russian ruble */ - RUB = 'RUB', - /** Rwandan franc */ - RWF = 'RWF', - /** Saudi riyal */ - SAR = 'SAR', - /** Solomon Islands dollar */ - SBD = 'SBD', - /** Seychelles rupee */ - SCR = 'SCR', - /** Sudanese pound */ - SDG = 'SDG', - /** Swedish krona/kronor */ - SEK = 'SEK', - /** Singapore dollar */ - SGD = 'SGD', - /** Saint Helena pound */ - SHP = 'SHP', - /** Sierra Leonean leone */ - SLL = 'SLL', - /** Somali shilling */ - SOS = 'SOS', - /** Surinamese dollar */ - SRD = 'SRD', - /** South Sudanese pound */ - SSP = 'SSP', - /** São Tomé and Príncipe dobra */ - STN = 'STN', - /** Salvadoran colón */ - SVC = 'SVC', - /** Syrian pound */ - SYP = 'SYP', - /** Swazi lilangeni */ - SZL = 'SZL', - /** Thai baht */ - THB = 'THB', - /** Tajikistani somoni */ - TJS = 'TJS', - /** Turkmenistan manat */ - TMT = 'TMT', - /** Tunisian dinar */ - TND = 'TND', - /** Tongan paʻanga */ - TOP = 'TOP', - /** Turkish lira */ - TRY = 'TRY', - /** Trinidad and Tobago dollar */ - TTD = 'TTD', - /** New Taiwan dollar */ - TWD = 'TWD', - /** Tanzanian shilling */ - TZS = 'TZS', - /** Ukrainian hryvnia */ - UAH = 'UAH', - /** Ugandan shilling */ - UGX = 'UGX', - /** United States dollar */ - USD = 'USD', - /** Uruguayan peso */ - UYU = 'UYU', - /** Uzbekistan som */ - UZS = 'UZS', - /** Venezuelan bolívar soberano */ - VES = 'VES', - /** Vietnamese đồng */ - VND = 'VND', - /** Vanuatu vatu */ - VUV = 'VUV', - /** Samoan tala */ - WST = 'WST', - /** CFA franc BEAC */ - XAF = 'XAF', - /** East Caribbean dollar */ - XCD = 'XCD', - /** CFA franc BCEAO */ - XOF = 'XOF', - /** CFP franc (franc Pacifique) */ - XPF = 'XPF', - /** Yemeni rial */ - YER = 'YER', - /** South African rand */ - ZAR = 'ZAR', - /** Zambian kwacha */ - ZMW = 'ZMW', - /** Zimbabwean dollar */ - ZWL = 'ZWL' + /** United Arab Emirates dirham */ + AED = 'AED', + /** Afghan afghani */ + AFN = 'AFN', + /** Albanian lek */ + ALL = 'ALL', + /** Armenian dram */ + AMD = 'AMD', + /** Netherlands Antillean guilder */ + ANG = 'ANG', + /** Angolan kwanza */ + AOA = 'AOA', + /** Argentine peso */ + ARS = 'ARS', + /** Australian dollar */ + AUD = 'AUD', + /** Aruban florin */ + AWG = 'AWG', + /** Azerbaijani manat */ + AZN = 'AZN', + /** Bosnia and Herzegovina convertible mark */ + BAM = 'BAM', + /** Barbados dollar */ + BBD = 'BBD', + /** Bangladeshi taka */ + BDT = 'BDT', + /** Bulgarian lev */ + BGN = 'BGN', + /** Bahraini dinar */ + BHD = 'BHD', + /** Burundian franc */ + BIF = 'BIF', + /** Bermudian dollar */ + BMD = 'BMD', + /** Brunei dollar */ + BND = 'BND', + /** Boliviano */ + BOB = 'BOB', + /** Brazilian real */ + BRL = 'BRL', + /** Bahamian dollar */ + BSD = 'BSD', + /** Bhutanese ngultrum */ + BTN = 'BTN', + /** Botswana pula */ + BWP = 'BWP', + /** Belarusian ruble */ + BYN = 'BYN', + /** Belize dollar */ + BZD = 'BZD', + /** Canadian dollar */ + CAD = 'CAD', + /** Congolese franc */ + CDF = 'CDF', + /** Swiss franc */ + CHF = 'CHF', + /** Chilean peso */ + CLP = 'CLP', + /** Renminbi (Chinese) yuan */ + CNY = 'CNY', + /** Colombian peso */ + COP = 'COP', + /** Costa Rican colon */ + CRC = 'CRC', + /** Cuban convertible peso */ + CUC = 'CUC', + /** Cuban peso */ + CUP = 'CUP', + /** Cape Verde escudo */ + CVE = 'CVE', + /** Czech koruna */ + CZK = 'CZK', + /** Djiboutian franc */ + DJF = 'DJF', + /** Danish krone */ + DKK = 'DKK', + /** Dominican peso */ + DOP = 'DOP', + /** Algerian dinar */ + DZD = 'DZD', + /** Egyptian pound */ + EGP = 'EGP', + /** Eritrean nakfa */ + ERN = 'ERN', + /** Ethiopian birr */ + ETB = 'ETB', + /** Euro */ + EUR = 'EUR', + /** Fiji dollar */ + FJD = 'FJD', + /** Falkland Islands pound */ + FKP = 'FKP', + /** Pound sterling */ + GBP = 'GBP', + /** Georgian lari */ + GEL = 'GEL', + /** Ghanaian cedi */ + GHS = 'GHS', + /** Gibraltar pound */ + GIP = 'GIP', + /** Gambian dalasi */ + GMD = 'GMD', + /** Guinean franc */ + GNF = 'GNF', + /** Guatemalan quetzal */ + GTQ = 'GTQ', + /** Guyanese dollar */ + GYD = 'GYD', + /** Hong Kong dollar */ + HKD = 'HKD', + /** Honduran lempira */ + HNL = 'HNL', + /** Croatian kuna */ + HRK = 'HRK', + /** Haitian gourde */ + HTG = 'HTG', + /** Hungarian forint */ + HUF = 'HUF', + /** Indonesian rupiah */ + IDR = 'IDR', + /** Israeli new shekel */ + ILS = 'ILS', + /** Indian rupee */ + INR = 'INR', + /** Iraqi dinar */ + IQD = 'IQD', + /** Iranian rial */ + IRR = 'IRR', + /** Icelandic króna */ + ISK = 'ISK', + /** Jamaican dollar */ + JMD = 'JMD', + /** Jordanian dinar */ + JOD = 'JOD', + /** Japanese yen */ + JPY = 'JPY', + /** Kenyan shilling */ + KES = 'KES', + /** Kyrgyzstani som */ + KGS = 'KGS', + /** Cambodian riel */ + KHR = 'KHR', + /** Comoro franc */ + KMF = 'KMF', + /** North Korean won */ + KPW = 'KPW', + /** South Korean won */ + KRW = 'KRW', + /** Kuwaiti dinar */ + KWD = 'KWD', + /** Cayman Islands dollar */ + KYD = 'KYD', + /** Kazakhstani tenge */ + KZT = 'KZT', + /** Lao kip */ + LAK = 'LAK', + /** Lebanese pound */ + LBP = 'LBP', + /** Sri Lankan rupee */ + LKR = 'LKR', + /** Liberian dollar */ + LRD = 'LRD', + /** Lesotho loti */ + LSL = 'LSL', + /** Libyan dinar */ + LYD = 'LYD', + /** Moroccan dirham */ + MAD = 'MAD', + /** Moldovan leu */ + MDL = 'MDL', + /** Malagasy ariary */ + MGA = 'MGA', + /** Macedonian denar */ + MKD = 'MKD', + /** Myanmar kyat */ + MMK = 'MMK', + /** Mongolian tögrög */ + MNT = 'MNT', + /** Macanese pataca */ + MOP = 'MOP', + /** Mauritanian ouguiya */ + MRU = 'MRU', + /** Mauritian rupee */ + MUR = 'MUR', + /** Maldivian rufiyaa */ + MVR = 'MVR', + /** Malawian kwacha */ + MWK = 'MWK', + /** Mexican peso */ + MXN = 'MXN', + /** Malaysian ringgit */ + MYR = 'MYR', + /** Mozambican metical */ + MZN = 'MZN', + /** Namibian dollar */ + NAD = 'NAD', + /** Nigerian naira */ + NGN = 'NGN', + /** Nicaraguan córdoba */ + NIO = 'NIO', + /** Norwegian krone */ + NOK = 'NOK', + /** Nepalese rupee */ + NPR = 'NPR', + /** New Zealand dollar */ + NZD = 'NZD', + /** Omani rial */ + OMR = 'OMR', + /** Panamanian balboa */ + PAB = 'PAB', + /** Peruvian sol */ + PEN = 'PEN', + /** Papua New Guinean kina */ + PGK = 'PGK', + /** Philippine peso */ + PHP = 'PHP', + /** Pakistani rupee */ + PKR = 'PKR', + /** Polish złoty */ + PLN = 'PLN', + /** Paraguayan guaraní */ + PYG = 'PYG', + /** Qatari riyal */ + QAR = 'QAR', + /** Romanian leu */ + RON = 'RON', + /** Serbian dinar */ + RSD = 'RSD', + /** Russian ruble */ + RUB = 'RUB', + /** Rwandan franc */ + RWF = 'RWF', + /** Saudi riyal */ + SAR = 'SAR', + /** Solomon Islands dollar */ + SBD = 'SBD', + /** Seychelles rupee */ + SCR = 'SCR', + /** Sudanese pound */ + SDG = 'SDG', + /** Swedish krona/kronor */ + SEK = 'SEK', + /** Singapore dollar */ + SGD = 'SGD', + /** Saint Helena pound */ + SHP = 'SHP', + /** Sierra Leonean leone */ + SLL = 'SLL', + /** Somali shilling */ + SOS = 'SOS', + /** Surinamese dollar */ + SRD = 'SRD', + /** South Sudanese pound */ + SSP = 'SSP', + /** São Tomé and Príncipe dobra */ + STN = 'STN', + /** Salvadoran colón */ + SVC = 'SVC', + /** Syrian pound */ + SYP = 'SYP', + /** Swazi lilangeni */ + SZL = 'SZL', + /** Thai baht */ + THB = 'THB', + /** Tajikistani somoni */ + TJS = 'TJS', + /** Turkmenistan manat */ + TMT = 'TMT', + /** Tunisian dinar */ + TND = 'TND', + /** Tongan paʻanga */ + TOP = 'TOP', + /** Turkish lira */ + TRY = 'TRY', + /** Trinidad and Tobago dollar */ + TTD = 'TTD', + /** New Taiwan dollar */ + TWD = 'TWD', + /** Tanzanian shilling */ + TZS = 'TZS', + /** Ukrainian hryvnia */ + UAH = 'UAH', + /** Ugandan shilling */ + UGX = 'UGX', + /** United States dollar */ + USD = 'USD', + /** Uruguayan peso */ + UYU = 'UYU', + /** Uzbekistan som */ + UZS = 'UZS', + /** Venezuelan bolívar soberano */ + VES = 'VES', + /** Vietnamese đồng */ + VND = 'VND', + /** Vanuatu vatu */ + VUV = 'VUV', + /** Samoan tala */ + WST = 'WST', + /** CFA franc BEAC */ + XAF = 'XAF', + /** East Caribbean dollar */ + XCD = 'XCD', + /** CFA franc BCEAO */ + XOF = 'XOF', + /** CFP franc (franc Pacifique) */ + XPF = 'XPF', + /** Yemeni rial */ + YER = 'YER', + /** South African rand */ + ZAR = 'ZAR', + /** Zambian kwacha */ + ZMW = 'ZMW', + /** Zimbabwean dollar */ + ZWL = 'ZWL', } export type CurrentUser = { - channels: Array; - id: Scalars['ID']; - identifier: Scalars['String']; + channels: Array; + id: Scalars['ID']; + identifier: Scalars['String']; }; export type CurrentUserChannel = { - code: Scalars['String']; - id: Scalars['ID']; - permissions: Array; - token: Scalars['String']; + code: Scalars['String']; + id: Scalars['ID']; + permissions: Array; + token: Scalars['String']; }; export type CustomField = { - description?: Maybe>; - internal?: Maybe; - label?: Maybe>; - list: Scalars['Boolean']; - name: Scalars['String']; - nullable?: Maybe; - readonly?: Maybe; - type: Scalars['String']; - ui?: Maybe; -}; - -export type CustomFieldConfig = BooleanCustomFieldConfig | DateTimeCustomFieldConfig | FloatCustomFieldConfig | IntCustomFieldConfig | LocaleStringCustomFieldConfig | LocaleTextCustomFieldConfig | RelationCustomFieldConfig | StringCustomFieldConfig | TextCustomFieldConfig; + description?: Maybe>; + internal?: Maybe; + label?: Maybe>; + list: Scalars['Boolean']; + name: Scalars['String']; + nullable?: Maybe; + readonly?: Maybe; + type: Scalars['String']; + ui?: Maybe; +}; + +export type CustomFieldConfig = + | BooleanCustomFieldConfig + | DateTimeCustomFieldConfig + | FloatCustomFieldConfig + | IntCustomFieldConfig + | LocaleStringCustomFieldConfig + | LocaleTextCustomFieldConfig + | RelationCustomFieldConfig + | StringCustomFieldConfig + | TextCustomFieldConfig; export type CustomFields = { - Address: Array; - Administrator: Array; - Asset: Array; - Channel: Array; - Collection: Array; - Country: Array; - Customer: Array; - CustomerGroup: Array; - Facet: Array; - FacetValue: Array; - Fulfillment: Array; - GlobalSettings: Array; - Order: Array; - OrderLine: Array; - PaymentMethod: Array; - Product: Array; - ProductOption: Array; - ProductOptionGroup: Array; - ProductVariant: Array; - Promotion: Array; - Seller: Array; - ShippingMethod: Array; - StockLocation: Array; - TaxCategory: Array; - TaxRate: Array; - User: Array; - Zone: Array; + Address: Array; + Administrator: Array; + Asset: Array; + Channel: Array; + Collection: Array; + Country: Array; + Customer: Array; + CustomerGroup: Array; + Facet: Array; + FacetValue: Array; + Fulfillment: Array; + GlobalSettings: Array; + Order: Array; + OrderLine: Array; + PaymentMethod: Array; + Product: Array; + ProductOption: Array; + ProductOptionGroup: Array; + ProductVariant: Array; + Promotion: Array; + Seller: Array; + ShippingMethod: Array; + StockLocation: Array; + TaxCategory: Array; + TaxRate: Array; + User: Array; + Zone: Array; }; export type Customer = Node & { - addresses?: Maybe>; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - emailAddress: Scalars['String']; - firstName: Scalars['String']; - groups: Array; - history: HistoryEntryList; - id: Scalars['ID']; - lastName: Scalars['String']; - orders: OrderList; - phoneNumber?: Maybe; - title?: Maybe; - updatedAt: Scalars['DateTime']; - user?: Maybe; + addresses?: Maybe>; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + emailAddress: Scalars['String']; + firstName: Scalars['String']; + groups: Array; + history: HistoryEntryList; + id: Scalars['ID']; + lastName: Scalars['String']; + orders: OrderList; + phoneNumber?: Maybe; + title?: Maybe; + updatedAt: Scalars['DateTime']; + user?: Maybe; }; - export type CustomerHistoryArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type CustomerOrdersArgs = { - options?: InputMaybe; + options?: InputMaybe; }; export type CustomerFilterParameter = { - createdAt?: InputMaybe; - emailAddress?: InputMaybe; - firstName?: InputMaybe; - id?: InputMaybe; - lastName?: InputMaybe; - phoneNumber?: InputMaybe; - postalCode?: InputMaybe; - title?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + emailAddress?: InputMaybe; + firstName?: InputMaybe; + id?: InputMaybe; + lastName?: InputMaybe; + phoneNumber?: InputMaybe; + postalCode?: InputMaybe; + title?: InputMaybe; + updatedAt?: InputMaybe; }; export type CustomerGroup = Node & { - createdAt: Scalars['DateTime']; - customFields?: Maybe; - customers: CustomerList; - id: Scalars['ID']; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + customers: CustomerList; + id: Scalars['ID']; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; - export type CustomerGroupCustomersArgs = { - options?: InputMaybe; + options?: InputMaybe; }; export type CustomerGroupFilterParameter = { - createdAt?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + updatedAt?: InputMaybe; }; export type CustomerGroupList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type CustomerGroupListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type CustomerGroupSortParameter = { - createdAt?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + updatedAt?: InputMaybe; }; export type CustomerList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type CustomerListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type CustomerSortParameter = { - createdAt?: InputMaybe; - emailAddress?: InputMaybe; - firstName?: InputMaybe; - id?: InputMaybe; - lastName?: InputMaybe; - phoneNumber?: InputMaybe; - title?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + emailAddress?: InputMaybe; + firstName?: InputMaybe; + id?: InputMaybe; + lastName?: InputMaybe; + phoneNumber?: InputMaybe; + title?: InputMaybe; + updatedAt?: InputMaybe; }; /** Operators for filtering on a list of Date fields */ export type DateListOperators = { - inList: Scalars['DateTime']; + inList: Scalars['DateTime']; }; /** Operators for filtering on a DateTime field */ export type DateOperators = { - after?: InputMaybe; - before?: InputMaybe; - between?: InputMaybe; - eq?: InputMaybe; - isNull?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + between?: InputMaybe; + eq?: InputMaybe; + isNull?: InputMaybe; }; export type DateRange = { - end: Scalars['DateTime']; - start: Scalars['DateTime']; + end: Scalars['DateTime']; + start: Scalars['DateTime']; }; /** @@ -1346,201 +1370,201 @@ export type DateRange = { * See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local#Additional_attributes */ export type DateTimeCustomFieldConfig = CustomField & { - description?: Maybe>; - internal?: Maybe; - label?: Maybe>; - list: Scalars['Boolean']; - max?: Maybe; - min?: Maybe; - name: Scalars['String']; - nullable?: Maybe; - readonly?: Maybe; - step?: Maybe; - type: Scalars['String']; - ui?: Maybe; + description?: Maybe>; + internal?: Maybe; + label?: Maybe>; + list: Scalars['Boolean']; + max?: Maybe; + min?: Maybe; + name: Scalars['String']; + nullable?: Maybe; + readonly?: Maybe; + step?: Maybe; + type: Scalars['String']; + ui?: Maybe; }; export type DeleteAssetInput = { - assetId: Scalars['ID']; - deleteFromAllChannels?: InputMaybe; - force?: InputMaybe; + assetId: Scalars['ID']; + deleteFromAllChannels?: InputMaybe; + force?: InputMaybe; }; export type DeleteAssetsInput = { - assetIds: Array; - deleteFromAllChannels?: InputMaybe; - force?: InputMaybe; + assetIds: Array; + deleteFromAllChannels?: InputMaybe; + force?: InputMaybe; }; export type DeleteStockLocationInput = { - id: Scalars['ID']; - transferToLocationId?: InputMaybe; + id: Scalars['ID']; + transferToLocationId?: InputMaybe; }; export type DeletionResponse = { - message?: Maybe; - result: DeletionResult; + message?: Maybe; + result: DeletionResult; }; export enum DeletionResult { - /** The entity was successfully deleted */ - DELETED = 'DELETED', - /** Deletion did not take place, reason given in message */ - NOT_DELETED = 'NOT_DELETED' + /** The entity was successfully deleted */ + DELETED = 'DELETED', + /** Deletion did not take place, reason given in message */ + NOT_DELETED = 'NOT_DELETED', } export type Discount = { - adjustmentSource: Scalars['String']; - amount: Scalars['Money']; - amountWithTax: Scalars['Money']; - description: Scalars['String']; - type: AdjustmentType; + adjustmentSource: Scalars['String']; + amount: Scalars['Money']; + amountWithTax: Scalars['Money']; + description: Scalars['String']; + type: AdjustmentType; }; /** Returned when attempting to create a Customer with an email address already registered to an existing User. */ export type EmailAddressConflictError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** Returned if no OrderLines have been specified for the operation */ export type EmptyOrderLineSelectionError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; export enum ErrorCode { - ALREADY_REFUNDED_ERROR = 'ALREADY_REFUNDED_ERROR', - CANCEL_ACTIVE_ORDER_ERROR = 'CANCEL_ACTIVE_ORDER_ERROR', - CANCEL_PAYMENT_ERROR = 'CANCEL_PAYMENT_ERROR', - CHANNEL_DEFAULT_LANGUAGE_ERROR = 'CHANNEL_DEFAULT_LANGUAGE_ERROR', - COUPON_CODE_EXPIRED_ERROR = 'COUPON_CODE_EXPIRED_ERROR', - COUPON_CODE_INVALID_ERROR = 'COUPON_CODE_INVALID_ERROR', - COUPON_CODE_LIMIT_ERROR = 'COUPON_CODE_LIMIT_ERROR', - CREATE_FULFILLMENT_ERROR = 'CREATE_FULFILLMENT_ERROR', - EMAIL_ADDRESS_CONFLICT_ERROR = 'EMAIL_ADDRESS_CONFLICT_ERROR', - EMPTY_ORDER_LINE_SELECTION_ERROR = 'EMPTY_ORDER_LINE_SELECTION_ERROR', - FACET_IN_USE_ERROR = 'FACET_IN_USE_ERROR', - FULFILLMENT_STATE_TRANSITION_ERROR = 'FULFILLMENT_STATE_TRANSITION_ERROR', - INELIGIBLE_SHIPPING_METHOD_ERROR = 'INELIGIBLE_SHIPPING_METHOD_ERROR', - INSUFFICIENT_STOCK_ERROR = 'INSUFFICIENT_STOCK_ERROR', - INSUFFICIENT_STOCK_ON_HAND_ERROR = 'INSUFFICIENT_STOCK_ON_HAND_ERROR', - INVALID_CREDENTIALS_ERROR = 'INVALID_CREDENTIALS_ERROR', - INVALID_FULFILLMENT_HANDLER_ERROR = 'INVALID_FULFILLMENT_HANDLER_ERROR', - ITEMS_ALREADY_FULFILLED_ERROR = 'ITEMS_ALREADY_FULFILLED_ERROR', - LANGUAGE_NOT_AVAILABLE_ERROR = 'LANGUAGE_NOT_AVAILABLE_ERROR', - MANUAL_PAYMENT_STATE_ERROR = 'MANUAL_PAYMENT_STATE_ERROR', - MIME_TYPE_ERROR = 'MIME_TYPE_ERROR', - MISSING_CONDITIONS_ERROR = 'MISSING_CONDITIONS_ERROR', - MULTIPLE_ORDER_ERROR = 'MULTIPLE_ORDER_ERROR', - NATIVE_AUTH_STRATEGY_ERROR = 'NATIVE_AUTH_STRATEGY_ERROR', - NEGATIVE_QUANTITY_ERROR = 'NEGATIVE_QUANTITY_ERROR', - NOTHING_TO_REFUND_ERROR = 'NOTHING_TO_REFUND_ERROR', - NO_ACTIVE_ORDER_ERROR = 'NO_ACTIVE_ORDER_ERROR', - NO_CHANGES_SPECIFIED_ERROR = 'NO_CHANGES_SPECIFIED_ERROR', - ORDER_LIMIT_ERROR = 'ORDER_LIMIT_ERROR', - ORDER_MODIFICATION_ERROR = 'ORDER_MODIFICATION_ERROR', - ORDER_MODIFICATION_STATE_ERROR = 'ORDER_MODIFICATION_STATE_ERROR', - ORDER_STATE_TRANSITION_ERROR = 'ORDER_STATE_TRANSITION_ERROR', - PAYMENT_METHOD_MISSING_ERROR = 'PAYMENT_METHOD_MISSING_ERROR', - PAYMENT_ORDER_MISMATCH_ERROR = 'PAYMENT_ORDER_MISMATCH_ERROR', - PAYMENT_STATE_TRANSITION_ERROR = 'PAYMENT_STATE_TRANSITION_ERROR', - PRODUCT_OPTION_IN_USE_ERROR = 'PRODUCT_OPTION_IN_USE_ERROR', - QUANTITY_TOO_GREAT_ERROR = 'QUANTITY_TOO_GREAT_ERROR', - REFUND_ORDER_STATE_ERROR = 'REFUND_ORDER_STATE_ERROR', - REFUND_PAYMENT_ID_MISSING_ERROR = 'REFUND_PAYMENT_ID_MISSING_ERROR', - REFUND_STATE_TRANSITION_ERROR = 'REFUND_STATE_TRANSITION_ERROR', - SETTLE_PAYMENT_ERROR = 'SETTLE_PAYMENT_ERROR', - UNKNOWN_ERROR = 'UNKNOWN_ERROR' + ALREADY_REFUNDED_ERROR = 'ALREADY_REFUNDED_ERROR', + CANCEL_ACTIVE_ORDER_ERROR = 'CANCEL_ACTIVE_ORDER_ERROR', + CANCEL_PAYMENT_ERROR = 'CANCEL_PAYMENT_ERROR', + CHANNEL_DEFAULT_LANGUAGE_ERROR = 'CHANNEL_DEFAULT_LANGUAGE_ERROR', + COUPON_CODE_EXPIRED_ERROR = 'COUPON_CODE_EXPIRED_ERROR', + COUPON_CODE_INVALID_ERROR = 'COUPON_CODE_INVALID_ERROR', + COUPON_CODE_LIMIT_ERROR = 'COUPON_CODE_LIMIT_ERROR', + CREATE_FULFILLMENT_ERROR = 'CREATE_FULFILLMENT_ERROR', + EMAIL_ADDRESS_CONFLICT_ERROR = 'EMAIL_ADDRESS_CONFLICT_ERROR', + EMPTY_ORDER_LINE_SELECTION_ERROR = 'EMPTY_ORDER_LINE_SELECTION_ERROR', + FACET_IN_USE_ERROR = 'FACET_IN_USE_ERROR', + FULFILLMENT_STATE_TRANSITION_ERROR = 'FULFILLMENT_STATE_TRANSITION_ERROR', + INELIGIBLE_SHIPPING_METHOD_ERROR = 'INELIGIBLE_SHIPPING_METHOD_ERROR', + INSUFFICIENT_STOCK_ERROR = 'INSUFFICIENT_STOCK_ERROR', + INSUFFICIENT_STOCK_ON_HAND_ERROR = 'INSUFFICIENT_STOCK_ON_HAND_ERROR', + INVALID_CREDENTIALS_ERROR = 'INVALID_CREDENTIALS_ERROR', + INVALID_FULFILLMENT_HANDLER_ERROR = 'INVALID_FULFILLMENT_HANDLER_ERROR', + ITEMS_ALREADY_FULFILLED_ERROR = 'ITEMS_ALREADY_FULFILLED_ERROR', + LANGUAGE_NOT_AVAILABLE_ERROR = 'LANGUAGE_NOT_AVAILABLE_ERROR', + MANUAL_PAYMENT_STATE_ERROR = 'MANUAL_PAYMENT_STATE_ERROR', + MIME_TYPE_ERROR = 'MIME_TYPE_ERROR', + MISSING_CONDITIONS_ERROR = 'MISSING_CONDITIONS_ERROR', + MULTIPLE_ORDER_ERROR = 'MULTIPLE_ORDER_ERROR', + NATIVE_AUTH_STRATEGY_ERROR = 'NATIVE_AUTH_STRATEGY_ERROR', + NEGATIVE_QUANTITY_ERROR = 'NEGATIVE_QUANTITY_ERROR', + NOTHING_TO_REFUND_ERROR = 'NOTHING_TO_REFUND_ERROR', + NO_ACTIVE_ORDER_ERROR = 'NO_ACTIVE_ORDER_ERROR', + NO_CHANGES_SPECIFIED_ERROR = 'NO_CHANGES_SPECIFIED_ERROR', + ORDER_LIMIT_ERROR = 'ORDER_LIMIT_ERROR', + ORDER_MODIFICATION_ERROR = 'ORDER_MODIFICATION_ERROR', + ORDER_MODIFICATION_STATE_ERROR = 'ORDER_MODIFICATION_STATE_ERROR', + ORDER_STATE_TRANSITION_ERROR = 'ORDER_STATE_TRANSITION_ERROR', + PAYMENT_METHOD_MISSING_ERROR = 'PAYMENT_METHOD_MISSING_ERROR', + PAYMENT_ORDER_MISMATCH_ERROR = 'PAYMENT_ORDER_MISMATCH_ERROR', + PAYMENT_STATE_TRANSITION_ERROR = 'PAYMENT_STATE_TRANSITION_ERROR', + PRODUCT_OPTION_IN_USE_ERROR = 'PRODUCT_OPTION_IN_USE_ERROR', + QUANTITY_TOO_GREAT_ERROR = 'QUANTITY_TOO_GREAT_ERROR', + REFUND_ORDER_STATE_ERROR = 'REFUND_ORDER_STATE_ERROR', + REFUND_PAYMENT_ID_MISSING_ERROR = 'REFUND_PAYMENT_ID_MISSING_ERROR', + REFUND_STATE_TRANSITION_ERROR = 'REFUND_STATE_TRANSITION_ERROR', + SETTLE_PAYMENT_ERROR = 'SETTLE_PAYMENT_ERROR', + UNKNOWN_ERROR = 'UNKNOWN_ERROR', } export type ErrorResult = { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; export type Facet = Node & { - code: Scalars['String']; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - id: Scalars['ID']; - isPrivate: Scalars['Boolean']; - languageCode: LanguageCode; - name: Scalars['String']; - translations: Array; - updatedAt: Scalars['DateTime']; - values: Array; + code: Scalars['String']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + id: Scalars['ID']; + isPrivate: Scalars['Boolean']; + languageCode: LanguageCode; + name: Scalars['String']; + translations: Array; + updatedAt: Scalars['DateTime']; + values: Array; }; export type FacetFilterParameter = { - code?: InputMaybe; - createdAt?: InputMaybe; - id?: InputMaybe; - isPrivate?: InputMaybe; - languageCode?: InputMaybe; - name?: InputMaybe; - updatedAt?: InputMaybe; + code?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + isPrivate?: InputMaybe; + languageCode?: InputMaybe; + name?: InputMaybe; + updatedAt?: InputMaybe; }; export type FacetInUseError = ErrorResult & { - errorCode: ErrorCode; - facetCode: Scalars['String']; - message: Scalars['String']; - productCount: Scalars['Int']; - variantCount: Scalars['Int']; + errorCode: ErrorCode; + facetCode: Scalars['String']; + message: Scalars['String']; + productCount: Scalars['Int']; + variantCount: Scalars['Int']; }; export type FacetList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type FacetListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type FacetSortParameter = { - code?: InputMaybe; - createdAt?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - updatedAt?: InputMaybe; + code?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + updatedAt?: InputMaybe; }; export type FacetTranslation = { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type FacetTranslationInput = { - customFields?: InputMaybe; - id?: InputMaybe; - languageCode: LanguageCode; - name?: InputMaybe; + customFields?: InputMaybe; + id?: InputMaybe; + languageCode: LanguageCode; + name?: InputMaybe; }; export type FacetValue = Node & { - code: Scalars['String']; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - facet: Facet; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - translations: Array; - updatedAt: Scalars['DateTime']; + code: Scalars['String']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + facet: Facet; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + translations: Array; + updatedAt: Scalars['DateTime']; }; /** @@ -1552,35 +1576,35 @@ export type FacetValue = Node & { * * ID=1 AND (ID=2 OR ID=3): `{ facetValueFilters: [{ and: 1 }, { or: [2,3] }] }` */ export type FacetValueFilterInput = { - and?: InputMaybe; - or?: InputMaybe>; + and?: InputMaybe; + or?: InputMaybe>; }; export type FacetValueFilterParameter = { - code?: InputMaybe; - createdAt?: InputMaybe; - id?: InputMaybe; - languageCode?: InputMaybe; - name?: InputMaybe; - updatedAt?: InputMaybe; + code?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + languageCode?: InputMaybe; + name?: InputMaybe; + updatedAt?: InputMaybe; }; export type FacetValueList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type FacetValueListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; /** @@ -1588,202 +1612,202 @@ export type FacetValueListOptions = { * by the search, and in what quantity. */ export type FacetValueResult = { - count: Scalars['Int']; - facetValue: FacetValue; + count: Scalars['Int']; + facetValue: FacetValue; }; export type FacetValueSortParameter = { - code?: InputMaybe; - createdAt?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - updatedAt?: InputMaybe; + code?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + updatedAt?: InputMaybe; }; export type FacetValueTranslation = { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type FacetValueTranslationInput = { - customFields?: InputMaybe; - id?: InputMaybe; - languageCode: LanguageCode; - name?: InputMaybe; + customFields?: InputMaybe; + id?: InputMaybe; + languageCode: LanguageCode; + name?: InputMaybe; }; export type FloatCustomFieldConfig = CustomField & { - description?: Maybe>; - internal?: Maybe; - label?: Maybe>; - list: Scalars['Boolean']; - max?: Maybe; - min?: Maybe; - name: Scalars['String']; - nullable?: Maybe; - readonly?: Maybe; - step?: Maybe; - type: Scalars['String']; - ui?: Maybe; + description?: Maybe>; + internal?: Maybe; + label?: Maybe>; + list: Scalars['Boolean']; + max?: Maybe; + min?: Maybe; + name: Scalars['String']; + nullable?: Maybe; + readonly?: Maybe; + step?: Maybe; + type: Scalars['String']; + ui?: Maybe; }; export type FulfillOrderInput = { - handler: ConfigurableOperationInput; - lines: Array; + handler: ConfigurableOperationInput; + lines: Array; }; export type Fulfillment = Node & { - createdAt: Scalars['DateTime']; - customFields?: Maybe; - id: Scalars['ID']; - lines: Array; - method: Scalars['String']; - nextStates: Array; - state: Scalars['String']; - /** @deprecated Use the `lines` field instead */ - summary: Array; - trackingCode?: Maybe; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + id: Scalars['ID']; + lines: Array; + method: Scalars['String']; + nextStates: Array; + state: Scalars['String']; + /** @deprecated Use the `lines` field instead */ + summary: Array; + trackingCode?: Maybe; + updatedAt: Scalars['DateTime']; }; export type FulfillmentLine = { - fulfillment: Fulfillment; - fulfillmentId: Scalars['ID']; - orderLine: OrderLine; - orderLineId: Scalars['ID']; - quantity: Scalars['Int']; + fulfillment: Fulfillment; + fulfillmentId: Scalars['ID']; + orderLine: OrderLine; + orderLineId: Scalars['ID']; + quantity: Scalars['Int']; }; /** Returned when there is an error in transitioning the Fulfillment state */ export type FulfillmentStateTransitionError = ErrorResult & { - errorCode: ErrorCode; - fromState: Scalars['String']; - message: Scalars['String']; - toState: Scalars['String']; - transitionError: Scalars['String']; + errorCode: ErrorCode; + fromState: Scalars['String']; + message: Scalars['String']; + toState: Scalars['String']; + transitionError: Scalars['String']; }; export enum GlobalFlag { - FALSE = 'FALSE', - INHERIT = 'INHERIT', - TRUE = 'TRUE' + FALSE = 'FALSE', + INHERIT = 'INHERIT', + TRUE = 'TRUE', } export type GlobalSettings = { - availableLanguages: Array; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - id: Scalars['ID']; - outOfStockThreshold: Scalars['Int']; - serverConfig: ServerConfig; - trackInventory: Scalars['Boolean']; - updatedAt: Scalars['DateTime']; + availableLanguages: Array; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + id: Scalars['ID']; + outOfStockThreshold: Scalars['Int']; + serverConfig: ServerConfig; + trackInventory: Scalars['Boolean']; + updatedAt: Scalars['DateTime']; }; export type HistoryEntry = Node & { - administrator?: Maybe; - createdAt: Scalars['DateTime']; - data: Scalars['JSON']; - id: Scalars['ID']; - isPublic: Scalars['Boolean']; - type: HistoryEntryType; - updatedAt: Scalars['DateTime']; + administrator?: Maybe; + createdAt: Scalars['DateTime']; + data: Scalars['JSON']; + id: Scalars['ID']; + isPublic: Scalars['Boolean']; + type: HistoryEntryType; + updatedAt: Scalars['DateTime']; }; export type HistoryEntryFilterParameter = { - createdAt?: InputMaybe; - id?: InputMaybe; - isPublic?: InputMaybe; - type?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + isPublic?: InputMaybe; + type?: InputMaybe; + updatedAt?: InputMaybe; }; export type HistoryEntryList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type HistoryEntryListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type HistoryEntrySortParameter = { - createdAt?: InputMaybe; - id?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + updatedAt?: InputMaybe; }; export enum HistoryEntryType { - CUSTOMER_ADDED_TO_GROUP = 'CUSTOMER_ADDED_TO_GROUP', - CUSTOMER_ADDRESS_CREATED = 'CUSTOMER_ADDRESS_CREATED', - CUSTOMER_ADDRESS_DELETED = 'CUSTOMER_ADDRESS_DELETED', - CUSTOMER_ADDRESS_UPDATED = 'CUSTOMER_ADDRESS_UPDATED', - CUSTOMER_DETAIL_UPDATED = 'CUSTOMER_DETAIL_UPDATED', - CUSTOMER_EMAIL_UPDATE_REQUESTED = 'CUSTOMER_EMAIL_UPDATE_REQUESTED', - CUSTOMER_EMAIL_UPDATE_VERIFIED = 'CUSTOMER_EMAIL_UPDATE_VERIFIED', - CUSTOMER_NOTE = 'CUSTOMER_NOTE', - CUSTOMER_PASSWORD_RESET_REQUESTED = 'CUSTOMER_PASSWORD_RESET_REQUESTED', - CUSTOMER_PASSWORD_RESET_VERIFIED = 'CUSTOMER_PASSWORD_RESET_VERIFIED', - CUSTOMER_PASSWORD_UPDATED = 'CUSTOMER_PASSWORD_UPDATED', - CUSTOMER_REGISTERED = 'CUSTOMER_REGISTERED', - CUSTOMER_REMOVED_FROM_GROUP = 'CUSTOMER_REMOVED_FROM_GROUP', - CUSTOMER_VERIFIED = 'CUSTOMER_VERIFIED', - ORDER_CANCELLATION = 'ORDER_CANCELLATION', - ORDER_COUPON_APPLIED = 'ORDER_COUPON_APPLIED', - ORDER_COUPON_REMOVED = 'ORDER_COUPON_REMOVED', - ORDER_FULFILLMENT = 'ORDER_FULFILLMENT', - ORDER_FULFILLMENT_TRANSITION = 'ORDER_FULFILLMENT_TRANSITION', - ORDER_MODIFIED = 'ORDER_MODIFIED', - ORDER_NOTE = 'ORDER_NOTE', - ORDER_PAYMENT_TRANSITION = 'ORDER_PAYMENT_TRANSITION', - ORDER_REFUND_TRANSITION = 'ORDER_REFUND_TRANSITION', - ORDER_STATE_TRANSITION = 'ORDER_STATE_TRANSITION' + CUSTOMER_ADDED_TO_GROUP = 'CUSTOMER_ADDED_TO_GROUP', + CUSTOMER_ADDRESS_CREATED = 'CUSTOMER_ADDRESS_CREATED', + CUSTOMER_ADDRESS_DELETED = 'CUSTOMER_ADDRESS_DELETED', + CUSTOMER_ADDRESS_UPDATED = 'CUSTOMER_ADDRESS_UPDATED', + CUSTOMER_DETAIL_UPDATED = 'CUSTOMER_DETAIL_UPDATED', + CUSTOMER_EMAIL_UPDATE_REQUESTED = 'CUSTOMER_EMAIL_UPDATE_REQUESTED', + CUSTOMER_EMAIL_UPDATE_VERIFIED = 'CUSTOMER_EMAIL_UPDATE_VERIFIED', + CUSTOMER_NOTE = 'CUSTOMER_NOTE', + CUSTOMER_PASSWORD_RESET_REQUESTED = 'CUSTOMER_PASSWORD_RESET_REQUESTED', + CUSTOMER_PASSWORD_RESET_VERIFIED = 'CUSTOMER_PASSWORD_RESET_VERIFIED', + CUSTOMER_PASSWORD_UPDATED = 'CUSTOMER_PASSWORD_UPDATED', + CUSTOMER_REGISTERED = 'CUSTOMER_REGISTERED', + CUSTOMER_REMOVED_FROM_GROUP = 'CUSTOMER_REMOVED_FROM_GROUP', + CUSTOMER_VERIFIED = 'CUSTOMER_VERIFIED', + ORDER_CANCELLATION = 'ORDER_CANCELLATION', + ORDER_COUPON_APPLIED = 'ORDER_COUPON_APPLIED', + ORDER_COUPON_REMOVED = 'ORDER_COUPON_REMOVED', + ORDER_FULFILLMENT = 'ORDER_FULFILLMENT', + ORDER_FULFILLMENT_TRANSITION = 'ORDER_FULFILLMENT_TRANSITION', + ORDER_MODIFIED = 'ORDER_MODIFIED', + ORDER_NOTE = 'ORDER_NOTE', + ORDER_PAYMENT_TRANSITION = 'ORDER_PAYMENT_TRANSITION', + ORDER_REFUND_TRANSITION = 'ORDER_REFUND_TRANSITION', + ORDER_STATE_TRANSITION = 'ORDER_STATE_TRANSITION', } /** Operators for filtering on a list of ID fields */ export type IdListOperators = { - inList: Scalars['ID']; + inList: Scalars['ID']; }; /** Operators for filtering on an ID field */ export type IdOperators = { - eq?: InputMaybe; - in?: InputMaybe>; - isNull?: InputMaybe; - notEq?: InputMaybe; - notIn?: InputMaybe>; + eq?: InputMaybe; + in?: InputMaybe>; + isNull?: InputMaybe; + notEq?: InputMaybe; + notIn?: InputMaybe>; }; export type ImportInfo = { - errors?: Maybe>; - imported: Scalars['Int']; - processed: Scalars['Int']; + errors?: Maybe>; + imported: Scalars['Int']; + processed: Scalars['Int']; }; /** Returned when attempting to set a ShippingMethod for which the Order is not eligible */ export type IneligibleShippingMethodError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** Returned when attempting to add more items to the Order than are available */ export type InsufficientStockError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; - order: Order; - quantityAvailable: Scalars['Int']; + errorCode: ErrorCode; + message: Scalars['String']; + order: Order; + quantityAvailable: Scalars['Int']; }; /** @@ -1791,116 +1815,116 @@ export type InsufficientStockError = ErrorResult & { * stockOnHand of a ProductVariant to satisfy the requested quantity. */ export type InsufficientStockOnHandError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; - productVariantId: Scalars['ID']; - productVariantName: Scalars['String']; - stockOnHand: Scalars['Int']; + errorCode: ErrorCode; + message: Scalars['String']; + productVariantId: Scalars['ID']; + productVariantName: Scalars['String']; + stockOnHand: Scalars['Int']; }; export type IntCustomFieldConfig = CustomField & { - description?: Maybe>; - internal?: Maybe; - label?: Maybe>; - list: Scalars['Boolean']; - max?: Maybe; - min?: Maybe; - name: Scalars['String']; - nullable?: Maybe; - readonly?: Maybe; - step?: Maybe; - type: Scalars['String']; - ui?: Maybe; + description?: Maybe>; + internal?: Maybe; + label?: Maybe>; + list: Scalars['Boolean']; + max?: Maybe; + min?: Maybe; + name: Scalars['String']; + nullable?: Maybe; + readonly?: Maybe; + step?: Maybe; + type: Scalars['String']; + ui?: Maybe; }; /** Returned if the user authentication credentials are not valid */ export type InvalidCredentialsError = ErrorResult & { - authenticationError: Scalars['String']; - errorCode: ErrorCode; - message: Scalars['String']; + authenticationError: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** Returned if the specified FulfillmentHandler code is not valid */ export type InvalidFulfillmentHandlerError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** Returned if the specified items are already part of a Fulfillment */ export type ItemsAlreadyFulfilledError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; export type Job = Node & { - attempts: Scalars['Int']; - createdAt: Scalars['DateTime']; - data?: Maybe; - duration: Scalars['Int']; - error?: Maybe; - id: Scalars['ID']; - isSettled: Scalars['Boolean']; - progress: Scalars['Float']; - queueName: Scalars['String']; - result?: Maybe; - retries: Scalars['Int']; - settledAt?: Maybe; - startedAt?: Maybe; - state: JobState; + attempts: Scalars['Int']; + createdAt: Scalars['DateTime']; + data?: Maybe; + duration: Scalars['Int']; + error?: Maybe; + id: Scalars['ID']; + isSettled: Scalars['Boolean']; + progress: Scalars['Float']; + queueName: Scalars['String']; + result?: Maybe; + retries: Scalars['Int']; + settledAt?: Maybe; + startedAt?: Maybe; + state: JobState; }; export type JobBufferSize = { - bufferId: Scalars['String']; - size: Scalars['Int']; + bufferId: Scalars['String']; + size: Scalars['Int']; }; export type JobFilterParameter = { - attempts?: InputMaybe; - createdAt?: InputMaybe; - duration?: InputMaybe; - id?: InputMaybe; - isSettled?: InputMaybe; - progress?: InputMaybe; - queueName?: InputMaybe; - retries?: InputMaybe; - settledAt?: InputMaybe; - startedAt?: InputMaybe; - state?: InputMaybe; + attempts?: InputMaybe; + createdAt?: InputMaybe; + duration?: InputMaybe; + id?: InputMaybe; + isSettled?: InputMaybe; + progress?: InputMaybe; + queueName?: InputMaybe; + retries?: InputMaybe; + settledAt?: InputMaybe; + startedAt?: InputMaybe; + state?: InputMaybe; }; export type JobList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type JobListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type JobQueue = { - name: Scalars['String']; - running: Scalars['Boolean']; + name: Scalars['String']; + running: Scalars['Boolean']; }; export type JobSortParameter = { - attempts?: InputMaybe; - createdAt?: InputMaybe; - duration?: InputMaybe; - id?: InputMaybe; - progress?: InputMaybe; - queueName?: InputMaybe; - retries?: InputMaybe; - settledAt?: InputMaybe; - startedAt?: InputMaybe; + attempts?: InputMaybe; + createdAt?: InputMaybe; + duration?: InputMaybe; + id?: InputMaybe; + progress?: InputMaybe; + queueName?: InputMaybe; + retries?: InputMaybe; + settledAt?: InputMaybe; + startedAt?: InputMaybe; }; /** @@ -1910,12 +1934,12 @@ export type JobSortParameter = { * @docsCategory common */ export enum JobState { - CANCELLED = 'CANCELLED', - COMPLETED = 'COMPLETED', - FAILED = 'FAILED', - PENDING = 'PENDING', - RETRYING = 'RETRYING', - RUNNING = 'RUNNING' + CANCELLED = 'CANCELLED', + COMPLETED = 'COMPLETED', + FAILED = 'FAILED', + PENDING = 'PENDING', + RETRYING = 'RETRYING', + RUNNING = 'RUNNING', } /** @@ -1928,370 +1952,370 @@ export enum JobState { * @docsCategory common */ export enum LanguageCode { - /** Afrikaans */ - af = 'af', - /** Akan */ - ak = 'ak', - /** Amharic */ - am = 'am', - /** Arabic */ - ar = 'ar', - /** Assamese */ - as = 'as', - /** Azerbaijani */ - az = 'az', - /** Belarusian */ - be = 'be', - /** Bulgarian */ - bg = 'bg', - /** Bambara */ - bm = 'bm', - /** Bangla */ - bn = 'bn', - /** Tibetan */ - bo = 'bo', - /** Breton */ - br = 'br', - /** Bosnian */ - bs = 'bs', - /** Catalan */ - ca = 'ca', - /** Chechen */ - ce = 'ce', - /** Corsican */ - co = 'co', - /** Czech */ - cs = 'cs', - /** Church Slavic */ - cu = 'cu', - /** Welsh */ - cy = 'cy', - /** Danish */ - da = 'da', - /** German */ - de = 'de', - /** Austrian German */ - de_AT = 'de_AT', - /** Swiss High German */ - de_CH = 'de_CH', - /** Dzongkha */ - dz = 'dz', - /** Ewe */ - ee = 'ee', - /** Greek */ - el = 'el', - /** English */ - en = 'en', - /** Australian English */ - en_AU = 'en_AU', - /** Canadian English */ - en_CA = 'en_CA', - /** British English */ - en_GB = 'en_GB', - /** American English */ - en_US = 'en_US', - /** Esperanto */ - eo = 'eo', - /** Spanish */ - es = 'es', - /** European Spanish */ - es_ES = 'es_ES', - /** Mexican Spanish */ - es_MX = 'es_MX', - /** Estonian */ - et = 'et', - /** Basque */ - eu = 'eu', - /** Persian */ - fa = 'fa', - /** Dari */ - fa_AF = 'fa_AF', - /** Fulah */ - ff = 'ff', - /** Finnish */ - fi = 'fi', - /** Faroese */ - fo = 'fo', - /** French */ - fr = 'fr', - /** Canadian French */ - fr_CA = 'fr_CA', - /** Swiss French */ - fr_CH = 'fr_CH', - /** Western Frisian */ - fy = 'fy', - /** Irish */ - ga = 'ga', - /** Scottish Gaelic */ - gd = 'gd', - /** Galician */ - gl = 'gl', - /** Gujarati */ - gu = 'gu', - /** Manx */ - gv = 'gv', - /** Hausa */ - ha = 'ha', - /** Hebrew */ - he = 'he', - /** Hindi */ - hi = 'hi', - /** Croatian */ - hr = 'hr', - /** Haitian Creole */ - ht = 'ht', - /** Hungarian */ - hu = 'hu', - /** Armenian */ - hy = 'hy', - /** Interlingua */ - ia = 'ia', - /** Indonesian */ - id = 'id', - /** Igbo */ - ig = 'ig', - /** Sichuan Yi */ - ii = 'ii', - /** Icelandic */ - is = 'is', - /** Italian */ - it = 'it', - /** Japanese */ - ja = 'ja', - /** Javanese */ - jv = 'jv', - /** Georgian */ - ka = 'ka', - /** Kikuyu */ - ki = 'ki', - /** Kazakh */ - kk = 'kk', - /** Kalaallisut */ - kl = 'kl', - /** Khmer */ - km = 'km', - /** Kannada */ - kn = 'kn', - /** Korean */ - ko = 'ko', - /** Kashmiri */ - ks = 'ks', - /** Kurdish */ - ku = 'ku', - /** Cornish */ - kw = 'kw', - /** Kyrgyz */ - ky = 'ky', - /** Latin */ - la = 'la', - /** Luxembourgish */ - lb = 'lb', - /** Ganda */ - lg = 'lg', - /** Lingala */ - ln = 'ln', - /** Lao */ - lo = 'lo', - /** Lithuanian */ - lt = 'lt', - /** Luba-Katanga */ - lu = 'lu', - /** Latvian */ - lv = 'lv', - /** Malagasy */ - mg = 'mg', - /** Maori */ - mi = 'mi', - /** Macedonian */ - mk = 'mk', - /** Malayalam */ - ml = 'ml', - /** Mongolian */ - mn = 'mn', - /** Marathi */ - mr = 'mr', - /** Malay */ - ms = 'ms', - /** Maltese */ - mt = 'mt', - /** Burmese */ - my = 'my', - /** Norwegian Bokmål */ - nb = 'nb', - /** North Ndebele */ - nd = 'nd', - /** Nepali */ - ne = 'ne', - /** Dutch */ - nl = 'nl', - /** Flemish */ - nl_BE = 'nl_BE', - /** Norwegian Nynorsk */ - nn = 'nn', - /** Nyanja */ - ny = 'ny', - /** Oromo */ - om = 'om', - /** Odia */ - or = 'or', - /** Ossetic */ - os = 'os', - /** Punjabi */ - pa = 'pa', - /** Polish */ - pl = 'pl', - /** Pashto */ - ps = 'ps', - /** Portuguese */ - pt = 'pt', - /** Brazilian Portuguese */ - pt_BR = 'pt_BR', - /** European Portuguese */ - pt_PT = 'pt_PT', - /** Quechua */ - qu = 'qu', - /** Romansh */ - rm = 'rm', - /** Rundi */ - rn = 'rn', - /** Romanian */ - ro = 'ro', - /** Moldavian */ - ro_MD = 'ro_MD', - /** Russian */ - ru = 'ru', - /** Kinyarwanda */ - rw = 'rw', - /** Sanskrit */ - sa = 'sa', - /** Sindhi */ - sd = 'sd', - /** Northern Sami */ - se = 'se', - /** Sango */ - sg = 'sg', - /** Sinhala */ - si = 'si', - /** Slovak */ - sk = 'sk', - /** Slovenian */ - sl = 'sl', - /** Samoan */ - sm = 'sm', - /** Shona */ - sn = 'sn', - /** Somali */ - so = 'so', - /** Albanian */ - sq = 'sq', - /** Serbian */ - sr = 'sr', - /** Southern Sotho */ - st = 'st', - /** Sundanese */ - su = 'su', - /** Swedish */ - sv = 'sv', - /** Swahili */ - sw = 'sw', - /** Congo Swahili */ - sw_CD = 'sw_CD', - /** Tamil */ - ta = 'ta', - /** Telugu */ - te = 'te', - /** Tajik */ - tg = 'tg', - /** Thai */ - th = 'th', - /** Tigrinya */ - ti = 'ti', - /** Turkmen */ - tk = 'tk', - /** Tongan */ - to = 'to', - /** Turkish */ - tr = 'tr', - /** Tatar */ - tt = 'tt', - /** Uyghur */ - ug = 'ug', - /** Ukrainian */ - uk = 'uk', - /** Urdu */ - ur = 'ur', - /** Uzbek */ - uz = 'uz', - /** Vietnamese */ - vi = 'vi', - /** Volapük */ - vo = 'vo', - /** Wolof */ - wo = 'wo', - /** Xhosa */ - xh = 'xh', - /** Yiddish */ - yi = 'yi', - /** Yoruba */ - yo = 'yo', - /** Chinese */ - zh = 'zh', - /** Simplified Chinese */ - zh_Hans = 'zh_Hans', - /** Traditional Chinese */ - zh_Hant = 'zh_Hant', - /** Zulu */ - zu = 'zu' + /** Afrikaans */ + af = 'af', + /** Akan */ + ak = 'ak', + /** Amharic */ + am = 'am', + /** Arabic */ + ar = 'ar', + /** Assamese */ + as = 'as', + /** Azerbaijani */ + az = 'az', + /** Belarusian */ + be = 'be', + /** Bulgarian */ + bg = 'bg', + /** Bambara */ + bm = 'bm', + /** Bangla */ + bn = 'bn', + /** Tibetan */ + bo = 'bo', + /** Breton */ + br = 'br', + /** Bosnian */ + bs = 'bs', + /** Catalan */ + ca = 'ca', + /** Chechen */ + ce = 'ce', + /** Corsican */ + co = 'co', + /** Czech */ + cs = 'cs', + /** Church Slavic */ + cu = 'cu', + /** Welsh */ + cy = 'cy', + /** Danish */ + da = 'da', + /** German */ + de = 'de', + /** Austrian German */ + de_AT = 'de_AT', + /** Swiss High German */ + de_CH = 'de_CH', + /** Dzongkha */ + dz = 'dz', + /** Ewe */ + ee = 'ee', + /** Greek */ + el = 'el', + /** English */ + en = 'en', + /** Australian English */ + en_AU = 'en_AU', + /** Canadian English */ + en_CA = 'en_CA', + /** British English */ + en_GB = 'en_GB', + /** American English */ + en_US = 'en_US', + /** Esperanto */ + eo = 'eo', + /** Spanish */ + es = 'es', + /** European Spanish */ + es_ES = 'es_ES', + /** Mexican Spanish */ + es_MX = 'es_MX', + /** Estonian */ + et = 'et', + /** Basque */ + eu = 'eu', + /** Persian */ + fa = 'fa', + /** Dari */ + fa_AF = 'fa_AF', + /** Fulah */ + ff = 'ff', + /** Finnish */ + fi = 'fi', + /** Faroese */ + fo = 'fo', + /** French */ + fr = 'fr', + /** Canadian French */ + fr_CA = 'fr_CA', + /** Swiss French */ + fr_CH = 'fr_CH', + /** Western Frisian */ + fy = 'fy', + /** Irish */ + ga = 'ga', + /** Scottish Gaelic */ + gd = 'gd', + /** Galician */ + gl = 'gl', + /** Gujarati */ + gu = 'gu', + /** Manx */ + gv = 'gv', + /** Hausa */ + ha = 'ha', + /** Hebrew */ + he = 'he', + /** Hindi */ + hi = 'hi', + /** Croatian */ + hr = 'hr', + /** Haitian Creole */ + ht = 'ht', + /** Hungarian */ + hu = 'hu', + /** Armenian */ + hy = 'hy', + /** Interlingua */ + ia = 'ia', + /** Indonesian */ + id = 'id', + /** Igbo */ + ig = 'ig', + /** Sichuan Yi */ + ii = 'ii', + /** Icelandic */ + is = 'is', + /** Italian */ + it = 'it', + /** Japanese */ + ja = 'ja', + /** Javanese */ + jv = 'jv', + /** Georgian */ + ka = 'ka', + /** Kikuyu */ + ki = 'ki', + /** Kazakh */ + kk = 'kk', + /** Kalaallisut */ + kl = 'kl', + /** Khmer */ + km = 'km', + /** Kannada */ + kn = 'kn', + /** Korean */ + ko = 'ko', + /** Kashmiri */ + ks = 'ks', + /** Kurdish */ + ku = 'ku', + /** Cornish */ + kw = 'kw', + /** Kyrgyz */ + ky = 'ky', + /** Latin */ + la = 'la', + /** Luxembourgish */ + lb = 'lb', + /** Ganda */ + lg = 'lg', + /** Lingala */ + ln = 'ln', + /** Lao */ + lo = 'lo', + /** Lithuanian */ + lt = 'lt', + /** Luba-Katanga */ + lu = 'lu', + /** Latvian */ + lv = 'lv', + /** Malagasy */ + mg = 'mg', + /** Maori */ + mi = 'mi', + /** Macedonian */ + mk = 'mk', + /** Malayalam */ + ml = 'ml', + /** Mongolian */ + mn = 'mn', + /** Marathi */ + mr = 'mr', + /** Malay */ + ms = 'ms', + /** Maltese */ + mt = 'mt', + /** Burmese */ + my = 'my', + /** Norwegian Bokmål */ + nb = 'nb', + /** North Ndebele */ + nd = 'nd', + /** Nepali */ + ne = 'ne', + /** Dutch */ + nl = 'nl', + /** Flemish */ + nl_BE = 'nl_BE', + /** Norwegian Nynorsk */ + nn = 'nn', + /** Nyanja */ + ny = 'ny', + /** Oromo */ + om = 'om', + /** Odia */ + or = 'or', + /** Ossetic */ + os = 'os', + /** Punjabi */ + pa = 'pa', + /** Polish */ + pl = 'pl', + /** Pashto */ + ps = 'ps', + /** Portuguese */ + pt = 'pt', + /** Brazilian Portuguese */ + pt_BR = 'pt_BR', + /** European Portuguese */ + pt_PT = 'pt_PT', + /** Quechua */ + qu = 'qu', + /** Romansh */ + rm = 'rm', + /** Rundi */ + rn = 'rn', + /** Romanian */ + ro = 'ro', + /** Moldavian */ + ro_MD = 'ro_MD', + /** Russian */ + ru = 'ru', + /** Kinyarwanda */ + rw = 'rw', + /** Sanskrit */ + sa = 'sa', + /** Sindhi */ + sd = 'sd', + /** Northern Sami */ + se = 'se', + /** Sango */ + sg = 'sg', + /** Sinhala */ + si = 'si', + /** Slovak */ + sk = 'sk', + /** Slovenian */ + sl = 'sl', + /** Samoan */ + sm = 'sm', + /** Shona */ + sn = 'sn', + /** Somali */ + so = 'so', + /** Albanian */ + sq = 'sq', + /** Serbian */ + sr = 'sr', + /** Southern Sotho */ + st = 'st', + /** Sundanese */ + su = 'su', + /** Swedish */ + sv = 'sv', + /** Swahili */ + sw = 'sw', + /** Congo Swahili */ + sw_CD = 'sw_CD', + /** Tamil */ + ta = 'ta', + /** Telugu */ + te = 'te', + /** Tajik */ + tg = 'tg', + /** Thai */ + th = 'th', + /** Tigrinya */ + ti = 'ti', + /** Turkmen */ + tk = 'tk', + /** Tongan */ + to = 'to', + /** Turkish */ + tr = 'tr', + /** Tatar */ + tt = 'tt', + /** Uyghur */ + ug = 'ug', + /** Ukrainian */ + uk = 'uk', + /** Urdu */ + ur = 'ur', + /** Uzbek */ + uz = 'uz', + /** Vietnamese */ + vi = 'vi', + /** Volapük */ + vo = 'vo', + /** Wolof */ + wo = 'wo', + /** Xhosa */ + xh = 'xh', + /** Yiddish */ + yi = 'yi', + /** Yoruba */ + yo = 'yo', + /** Chinese */ + zh = 'zh', + /** Simplified Chinese */ + zh_Hans = 'zh_Hans', + /** Traditional Chinese */ + zh_Hant = 'zh_Hant', + /** Zulu */ + zu = 'zu', } /** Returned if attempting to set a Channel's defaultLanguageCode to a language which is not enabled in GlobalSettings */ export type LanguageNotAvailableError = ErrorResult & { - errorCode: ErrorCode; - languageCode: Scalars['String']; - message: Scalars['String']; + errorCode: ErrorCode; + languageCode: Scalars['String']; + message: Scalars['String']; }; export type LocaleStringCustomFieldConfig = CustomField & { - description?: Maybe>; - internal?: Maybe; - label?: Maybe>; - length?: Maybe; - list: Scalars['Boolean']; - name: Scalars['String']; - nullable?: Maybe; - pattern?: Maybe; - readonly?: Maybe; - type: Scalars['String']; - ui?: Maybe; + description?: Maybe>; + internal?: Maybe; + label?: Maybe>; + length?: Maybe; + list: Scalars['Boolean']; + name: Scalars['String']; + nullable?: Maybe; + pattern?: Maybe; + readonly?: Maybe; + type: Scalars['String']; + ui?: Maybe; }; export type LocaleTextCustomFieldConfig = CustomField & { - description?: Maybe>; - internal?: Maybe; - label?: Maybe>; - list: Scalars['Boolean']; - name: Scalars['String']; - nullable?: Maybe; - readonly?: Maybe; - type: Scalars['String']; - ui?: Maybe; + description?: Maybe>; + internal?: Maybe; + label?: Maybe>; + list: Scalars['Boolean']; + name: Scalars['String']; + nullable?: Maybe; + readonly?: Maybe; + type: Scalars['String']; + ui?: Maybe; }; export type LocalizedString = { - languageCode: LanguageCode; - value: Scalars['String']; + languageCode: LanguageCode; + value: Scalars['String']; }; export enum LogicalOperator { - AND = 'AND', - OR = 'OR' + AND = 'AND', + OR = 'OR', } export type ManualPaymentInput = { - metadata?: InputMaybe; - method: Scalars['String']; - orderId: Scalars['ID']; - transactionId?: InputMaybe; + metadata?: InputMaybe; + method: Scalars['String']; + orderId: Scalars['ID']; + transactionId?: InputMaybe; }; /** @@ -2299,1027 +2323,905 @@ export type ManualPaymentInput = { * is not in the required state. */ export type ManualPaymentStateError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; export type MimeTypeError = ErrorResult & { - errorCode: ErrorCode; - fileName: Scalars['String']; - message: Scalars['String']; - mimeType: Scalars['String']; + errorCode: ErrorCode; + fileName: Scalars['String']; + message: Scalars['String']; + mimeType: Scalars['String']; }; /** Returned if a PromotionCondition has neither a couponCode nor any conditions set */ export type MissingConditionsError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; export type ModifyOrderInput = { - addItems?: InputMaybe>; - adjustOrderLines?: InputMaybe>; - couponCodes?: InputMaybe>; - dryRun: Scalars['Boolean']; - note?: InputMaybe; - options?: InputMaybe; - orderId: Scalars['ID']; - refund?: InputMaybe; - surcharges?: InputMaybe>; - updateBillingAddress?: InputMaybe; - updateShippingAddress?: InputMaybe; + addItems?: InputMaybe>; + adjustOrderLines?: InputMaybe>; + couponCodes?: InputMaybe>; + dryRun: Scalars['Boolean']; + note?: InputMaybe; + options?: InputMaybe; + orderId: Scalars['ID']; + refund?: InputMaybe; + surcharges?: InputMaybe>; + updateBillingAddress?: InputMaybe; + updateShippingAddress?: InputMaybe; }; export type ModifyOrderOptions = { - freezePromotions?: InputMaybe; - recalculateShipping?: InputMaybe; -}; - -export type ModifyOrderResult = CouponCodeExpiredError | CouponCodeInvalidError | CouponCodeLimitError | InsufficientStockError | NegativeQuantityError | NoChangesSpecifiedError | Order | OrderLimitError | OrderModificationStateError | PaymentMethodMissingError | RefundPaymentIdMissingError; + freezePromotions?: InputMaybe; + recalculateShipping?: InputMaybe; +}; + +export type ModifyOrderResult = + | CouponCodeExpiredError + | CouponCodeInvalidError + | CouponCodeLimitError + | InsufficientStockError + | NegativeQuantityError + | NoChangesSpecifiedError + | Order + | OrderLimitError + | OrderModificationStateError + | PaymentMethodMissingError + | RefundPaymentIdMissingError; export type MoveCollectionInput = { - collectionId: Scalars['ID']; - index: Scalars['Int']; - parentId: Scalars['ID']; + collectionId: Scalars['ID']; + index: Scalars['Int']; + parentId: Scalars['ID']; }; /** Returned if an operation has specified OrderLines from multiple Orders */ export type MultipleOrderError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; export type Mutation = { - /** Add Customers to a CustomerGroup */ - addCustomersToGroup: CustomerGroup; - addFulfillmentToOrder: AddFulfillmentToOrderResult; - /** Adds an item to the draft Order. */ - addItemToDraftOrder: UpdateOrderItemsResult; - /** - * Used to manually create a new Payment against an Order. - * This can be used by an Administrator when an Order is in the ArrangingPayment state. - * - * It is also used when a completed Order - * has been modified (using `modifyOrder`) and the price has increased. The extra payment - * can then be manually arranged by the administrator, and the details used to create a new - * Payment. - */ - addManualPaymentToOrder: AddManualPaymentToOrderResult; - /** Add members to a Zone */ - addMembersToZone: Zone; - addNoteToCustomer: Customer; - addNoteToOrder: Order; - /** Add an OptionGroup to a Product */ - addOptionGroupToProduct: Product; - /** Adjusts a draft OrderLine. If custom fields are defined on the OrderLine entity, a third argument 'customFields' of type `OrderLineCustomFieldsInput` will be available. */ - adjustDraftOrderLine: UpdateOrderItemsResult; - /** Applies the given coupon code to the draft Order */ - applyCouponCodeToDraftOrder: ApplyCouponCodeResult; - /** Assign assets to channel */ - assignAssetsToChannel: Array; - /** Assigns Collections to the specified Channel */ - assignCollectionsToChannel: Array; - /** Assigns Facets to the specified Channel */ - assignFacetsToChannel: Array; - /** Assigns ProductVariants to the specified Channel */ - assignProductVariantsToChannel: Array; - /** Assigns all ProductVariants of Product to the specified Channel */ - assignProductsToChannel: Array; - /** Assigns Promotions to the specified Channel */ - assignPromotionsToChannel: Array; - /** Assign a Role to an Administrator */ - assignRoleToAdministrator: Administrator; - /** Authenticates the user using a named authentication strategy */ - authenticate: AuthenticationResult; - cancelJob: Job; - cancelOrder: CancelOrderResult; - cancelPayment: CancelPaymentResult; - /** Create a new Administrator */ - createAdministrator: Administrator; - /** Create a new Asset */ - createAssets: Array; - /** Create a new Channel */ - createChannel: CreateChannelResult; - /** Create a new Collection */ - createCollection: Collection; - /** Create a new Country */ - createCountry: Country; - /** Create a new Customer. If a password is provided, a new User will also be created an linked to the Customer. */ - createCustomer: CreateCustomerResult; - /** Create a new Address and associate it with the Customer specified by customerId */ - createCustomerAddress: Address; - /** Create a new CustomerGroup */ - createCustomerGroup: CustomerGroup; - /** Creates a draft Order */ - createDraftOrder: Order; - /** Create a new Facet */ - createFacet: Facet; - /** Create one or more FacetValues */ - createFacetValues: Array; - /** Create existing PaymentMethod */ - createPaymentMethod: PaymentMethod; - /** Create a new Product */ - createProduct: Product; - /** Create a new ProductOption within a ProductOptionGroup */ - createProductOption: ProductOption; - /** Create a new ProductOptionGroup */ - createProductOptionGroup: ProductOptionGroup; - /** Create a set of ProductVariants based on the OptionGroups assigned to the given Product */ - createProductVariants: Array>; - createPromotion: CreatePromotionResult; - /** Create a new Role */ - createRole: Role; - /** Create a new Seller */ - createSeller: Seller; - /** Create a new ShippingMethod */ - createShippingMethod: ShippingMethod; - createStockLocation: StockLocation; - /** Create a new Tag */ - createTag: Tag; - /** Create a new TaxCategory */ - createTaxCategory: TaxCategory; - /** Create a new TaxRate */ - createTaxRate: TaxRate; - /** Create a new Zone */ - createZone: Zone; - /** Delete an Administrator */ - deleteAdministrator: DeletionResponse; - /** Delete an Asset */ - deleteAsset: DeletionResponse; - /** Delete multiple Assets */ - deleteAssets: DeletionResponse; - /** Delete a Channel */ - deleteChannel: DeletionResponse; - /** Delete a Collection and all of its descendants */ - deleteCollection: DeletionResponse; - /** Delete multiple Collections and all of their descendants */ - deleteCollections: Array; - /** Delete a Country */ - deleteCountry: DeletionResponse; - /** Delete a Customer */ - deleteCustomer: DeletionResponse; - /** Update an existing Address */ - deleteCustomerAddress: Success; - /** Delete a CustomerGroup */ - deleteCustomerGroup: DeletionResponse; - deleteCustomerNote: DeletionResponse; - /** Deletes a draft Order */ - deleteDraftOrder: DeletionResponse; - /** Delete an existing Facet */ - deleteFacet: DeletionResponse; - /** Delete one or more FacetValues */ - deleteFacetValues: Array; - /** Delete multiple existing Facets */ - deleteFacets: Array; - deleteOrderNote: DeletionResponse; - /** Delete a PaymentMethod */ - deletePaymentMethod: DeletionResponse; - /** Delete a Product */ - deleteProduct: DeletionResponse; - /** Delete a ProductOption */ - deleteProductOption: DeletionResponse; - /** Delete a ProductVariant */ - deleteProductVariant: DeletionResponse; - /** Delete multiple ProductVariants */ - deleteProductVariants: Array; - /** Delete multiple Products */ - deleteProducts: Array; - deletePromotion: DeletionResponse; - /** Delete an existing Role */ - deleteRole: DeletionResponse; - /** Delete a Seller */ - deleteSeller: DeletionResponse; - /** Delete a ShippingMethod */ - deleteShippingMethod: DeletionResponse; - deleteStockLocation: DeletionResponse; - /** Delete an existing Tag */ - deleteTag: DeletionResponse; - /** Deletes a TaxCategory */ - deleteTaxCategory: DeletionResponse; - /** Delete a TaxRate */ - deleteTaxRate: DeletionResponse; - /** Delete a Zone */ - deleteZone: DeletionResponse; - flushBufferedJobs: Success; - importProducts?: Maybe; - /** Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})` */ - login: NativeAuthenticationResult; - logout: Success; - /** - * Allows an Order to be modified after it has been completed by the Customer. The Order must first - * be in the `Modifying` state. - */ - modifyOrder: ModifyOrderResult; - /** Move a Collection to a different parent or index */ - moveCollection: Collection; - refundOrder: RefundOrderResult; - reindex: Job; - /** Removes Collections from the specified Channel */ - removeCollectionsFromChannel: Array; - /** Removes the given coupon code from the draft Order */ - removeCouponCodeFromDraftOrder?: Maybe; - /** Remove Customers from a CustomerGroup */ - removeCustomersFromGroup: CustomerGroup; - /** Remove an OrderLine from the draft Order */ - removeDraftOrderLine: RemoveOrderItemsResult; - /** Removes Facets from the specified Channel */ - removeFacetsFromChannel: Array; - /** Remove members from a Zone */ - removeMembersFromZone: Zone; - /** Remove an OptionGroup from a Product */ - removeOptionGroupFromProduct: RemoveOptionGroupFromProductResult; - /** Removes ProductVariants from the specified Channel */ - removeProductVariantsFromChannel: Array; - /** Removes all ProductVariants of Product from the specified Channel */ - removeProductsFromChannel: Array; - /** Removes Promotions from the specified Channel */ - removePromotionsFromChannel: Array; - /** Remove all settled jobs in the given queues older than the given date. Returns the number of jobs deleted. */ - removeSettledJobs: Scalars['Int']; - runPendingSearchIndexUpdates: Success; - setCustomerForDraftOrder: SetCustomerForDraftOrderResult; - /** Sets the billing address for a draft Order */ - setDraftOrderBillingAddress: Order; - /** Allows any custom fields to be set for the active order */ - setDraftOrderCustomFields: Order; - /** Sets the shipping address for a draft Order */ - setDraftOrderShippingAddress: Order; - /** Sets the shipping method by id, which can be obtained with the `eligibleShippingMethodsForDraftOrder` query */ - setDraftOrderShippingMethod: SetOrderShippingMethodResult; - setOrderCustomFields?: Maybe; - settlePayment: SettlePaymentResult; - settleRefund: SettleRefundResult; - transitionFulfillmentToState: TransitionFulfillmentToStateResult; - transitionOrderToState?: Maybe; - transitionPaymentToState: TransitionPaymentToStateResult; - /** Update the active (currently logged-in) Administrator */ - updateActiveAdministrator: Administrator; - /** Update an existing Administrator */ - updateAdministrator: Administrator; - /** Update an existing Asset */ - updateAsset: Asset; - /** Update an existing Channel */ - updateChannel: UpdateChannelResult; - /** Update an existing Collection */ - updateCollection: Collection; - /** Update an existing Country */ - updateCountry: Country; - /** Update an existing Customer */ - updateCustomer: UpdateCustomerResult; - /** Update an existing Address */ - updateCustomerAddress: Address; - /** Update an existing CustomerGroup */ - updateCustomerGroup: CustomerGroup; - updateCustomerNote: HistoryEntry; - /** Update an existing Facet */ - updateFacet: Facet; - /** Update one or more FacetValues */ - updateFacetValues: Array; - updateGlobalSettings: UpdateGlobalSettingsResult; - updateOrderNote: HistoryEntry; - /** Update an existing PaymentMethod */ - updatePaymentMethod: PaymentMethod; - /** Update an existing Product */ - updateProduct: Product; - /** Create a new ProductOption within a ProductOptionGroup */ - updateProductOption: ProductOption; - /** Update an existing ProductOptionGroup */ - updateProductOptionGroup: ProductOptionGroup; - /** Update existing ProductVariants */ - updateProductVariants: Array>; - /** Update multiple existing Products */ - updateProducts: Array; - updatePromotion: UpdatePromotionResult; - /** Update an existing Role */ - updateRole: Role; - /** Update an existing Seller */ - updateSeller: Seller; - /** Update an existing ShippingMethod */ - updateShippingMethod: ShippingMethod; - updateStockLocation: StockLocation; - /** Update an existing Tag */ - updateTag: Tag; - /** Update an existing TaxCategory */ - updateTaxCategory: TaxCategory; - /** Update an existing TaxRate */ - updateTaxRate: TaxRate; - /** Update an existing Zone */ - updateZone: Zone; + /** Add Customers to a CustomerGroup */ + addCustomersToGroup: CustomerGroup; + addFulfillmentToOrder: AddFulfillmentToOrderResult; + /** Adds an item to the draft Order. */ + addItemToDraftOrder: UpdateOrderItemsResult; + /** + * Used to manually create a new Payment against an Order. + * This can be used by an Administrator when an Order is in the ArrangingPayment state. + * + * It is also used when a completed Order + * has been modified (using `modifyOrder`) and the price has increased. The extra payment + * can then be manually arranged by the administrator, and the details used to create a new + * Payment. + */ + addManualPaymentToOrder: AddManualPaymentToOrderResult; + /** Add members to a Zone */ + addMembersToZone: Zone; + addNoteToCustomer: Customer; + addNoteToOrder: Order; + /** Add an OptionGroup to a Product */ + addOptionGroupToProduct: Product; + /** Adjusts a draft OrderLine. If custom fields are defined on the OrderLine entity, a third argument 'customFields' of type `OrderLineCustomFieldsInput` will be available. */ + adjustDraftOrderLine: UpdateOrderItemsResult; + /** Applies the given coupon code to the draft Order */ + applyCouponCodeToDraftOrder: ApplyCouponCodeResult; + /** Assign assets to channel */ + assignAssetsToChannel: Array; + /** Assigns Collections to the specified Channel */ + assignCollectionsToChannel: Array; + /** Assigns Facets to the specified Channel */ + assignFacetsToChannel: Array; + /** Assigns ProductVariants to the specified Channel */ + assignProductVariantsToChannel: Array; + /** Assigns all ProductVariants of Product to the specified Channel */ + assignProductsToChannel: Array; + /** Assigns Promotions to the specified Channel */ + assignPromotionsToChannel: Array; + /** Assign a Role to an Administrator */ + assignRoleToAdministrator: Administrator; + /** Authenticates the user using a named authentication strategy */ + authenticate: AuthenticationResult; + cancelJob: Job; + cancelOrder: CancelOrderResult; + cancelPayment: CancelPaymentResult; + /** Create a new Administrator */ + createAdministrator: Administrator; + /** Create a new Asset */ + createAssets: Array; + /** Create a new Channel */ + createChannel: CreateChannelResult; + /** Create a new Collection */ + createCollection: Collection; + /** Create a new Country */ + createCountry: Country; + /** Create a new Customer. If a password is provided, a new User will also be created an linked to the Customer. */ + createCustomer: CreateCustomerResult; + /** Create a new Address and associate it with the Customer specified by customerId */ + createCustomerAddress: Address; + /** Create a new CustomerGroup */ + createCustomerGroup: CustomerGroup; + /** Creates a draft Order */ + createDraftOrder: Order; + /** Create a new Facet */ + createFacet: Facet; + /** Create one or more FacetValues */ + createFacetValues: Array; + /** Create existing PaymentMethod */ + createPaymentMethod: PaymentMethod; + /** Create a new Product */ + createProduct: Product; + /** Create a new ProductOption within a ProductOptionGroup */ + createProductOption: ProductOption; + /** Create a new ProductOptionGroup */ + createProductOptionGroup: ProductOptionGroup; + /** Create a set of ProductVariants based on the OptionGroups assigned to the given Product */ + createProductVariants: Array>; + createPromotion: CreatePromotionResult; + /** Create a new Role */ + createRole: Role; + /** Create a new Seller */ + createSeller: Seller; + /** Create a new ShippingMethod */ + createShippingMethod: ShippingMethod; + createStockLocation: StockLocation; + /** Create a new Tag */ + createTag: Tag; + /** Create a new TaxCategory */ + createTaxCategory: TaxCategory; + /** Create a new TaxRate */ + createTaxRate: TaxRate; + /** Create a new Zone */ + createZone: Zone; + /** Delete an Administrator */ + deleteAdministrator: DeletionResponse; + /** Delete an Asset */ + deleteAsset: DeletionResponse; + /** Delete multiple Assets */ + deleteAssets: DeletionResponse; + /** Delete a Channel */ + deleteChannel: DeletionResponse; + /** Delete a Collection and all of its descendants */ + deleteCollection: DeletionResponse; + /** Delete multiple Collections and all of their descendants */ + deleteCollections: Array; + /** Delete a Country */ + deleteCountry: DeletionResponse; + /** Delete a Customer */ + deleteCustomer: DeletionResponse; + /** Update an existing Address */ + deleteCustomerAddress: Success; + /** Delete a CustomerGroup */ + deleteCustomerGroup: DeletionResponse; + deleteCustomerNote: DeletionResponse; + /** Deletes a draft Order */ + deleteDraftOrder: DeletionResponse; + /** Delete an existing Facet */ + deleteFacet: DeletionResponse; + /** Delete one or more FacetValues */ + deleteFacetValues: Array; + /** Delete multiple existing Facets */ + deleteFacets: Array; + deleteOrderNote: DeletionResponse; + /** Delete a PaymentMethod */ + deletePaymentMethod: DeletionResponse; + /** Delete a Product */ + deleteProduct: DeletionResponse; + /** Delete a ProductOption */ + deleteProductOption: DeletionResponse; + /** Delete a ProductVariant */ + deleteProductVariant: DeletionResponse; + /** Delete multiple ProductVariants */ + deleteProductVariants: Array; + /** Delete multiple Products */ + deleteProducts: Array; + deletePromotion: DeletionResponse; + /** Delete an existing Role */ + deleteRole: DeletionResponse; + /** Delete a Seller */ + deleteSeller: DeletionResponse; + /** Delete a ShippingMethod */ + deleteShippingMethod: DeletionResponse; + deleteStockLocation: DeletionResponse; + /** Delete an existing Tag */ + deleteTag: DeletionResponse; + /** Deletes a TaxCategory */ + deleteTaxCategory: DeletionResponse; + /** Delete a TaxRate */ + deleteTaxRate: DeletionResponse; + /** Delete a Zone */ + deleteZone: DeletionResponse; + flushBufferedJobs: Success; + importProducts?: Maybe; + /** Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})` */ + login: NativeAuthenticationResult; + logout: Success; + /** + * Allows an Order to be modified after it has been completed by the Customer. The Order must first + * be in the `Modifying` state. + */ + modifyOrder: ModifyOrderResult; + /** Move a Collection to a different parent or index */ + moveCollection: Collection; + refundOrder: RefundOrderResult; + reindex: Job; + /** Removes Collections from the specified Channel */ + removeCollectionsFromChannel: Array; + /** Removes the given coupon code from the draft Order */ + removeCouponCodeFromDraftOrder?: Maybe; + /** Remove Customers from a CustomerGroup */ + removeCustomersFromGroup: CustomerGroup; + /** Remove an OrderLine from the draft Order */ + removeDraftOrderLine: RemoveOrderItemsResult; + /** Removes Facets from the specified Channel */ + removeFacetsFromChannel: Array; + /** Remove members from a Zone */ + removeMembersFromZone: Zone; + /** Remove an OptionGroup from a Product */ + removeOptionGroupFromProduct: RemoveOptionGroupFromProductResult; + /** Removes ProductVariants from the specified Channel */ + removeProductVariantsFromChannel: Array; + /** Removes all ProductVariants of Product from the specified Channel */ + removeProductsFromChannel: Array; + /** Removes Promotions from the specified Channel */ + removePromotionsFromChannel: Array; + /** Remove all settled jobs in the given queues older than the given date. Returns the number of jobs deleted. */ + removeSettledJobs: Scalars['Int']; + runPendingSearchIndexUpdates: Success; + setCustomerForDraftOrder: SetCustomerForDraftOrderResult; + /** Sets the billing address for a draft Order */ + setDraftOrderBillingAddress: Order; + /** Allows any custom fields to be set for the active order */ + setDraftOrderCustomFields: Order; + /** Sets the shipping address for a draft Order */ + setDraftOrderShippingAddress: Order; + /** Sets the shipping method by id, which can be obtained with the `eligibleShippingMethodsForDraftOrder` query */ + setDraftOrderShippingMethod: SetOrderShippingMethodResult; + setOrderCustomFields?: Maybe; + settlePayment: SettlePaymentResult; + settleRefund: SettleRefundResult; + transitionFulfillmentToState: TransitionFulfillmentToStateResult; + transitionOrderToState?: Maybe; + transitionPaymentToState: TransitionPaymentToStateResult; + /** Update the active (currently logged-in) Administrator */ + updateActiveAdministrator: Administrator; + /** Update an existing Administrator */ + updateAdministrator: Administrator; + /** Update an existing Asset */ + updateAsset: Asset; + /** Update an existing Channel */ + updateChannel: UpdateChannelResult; + /** Update an existing Collection */ + updateCollection: Collection; + /** Update an existing Country */ + updateCountry: Country; + /** Update an existing Customer */ + updateCustomer: UpdateCustomerResult; + /** Update an existing Address */ + updateCustomerAddress: Address; + /** Update an existing CustomerGroup */ + updateCustomerGroup: CustomerGroup; + updateCustomerNote: HistoryEntry; + /** Update an existing Facet */ + updateFacet: Facet; + /** Update one or more FacetValues */ + updateFacetValues: Array; + updateGlobalSettings: UpdateGlobalSettingsResult; + updateOrderNote: HistoryEntry; + /** Update an existing PaymentMethod */ + updatePaymentMethod: PaymentMethod; + /** Update an existing Product */ + updateProduct: Product; + /** Create a new ProductOption within a ProductOptionGroup */ + updateProductOption: ProductOption; + /** Update an existing ProductOptionGroup */ + updateProductOptionGroup: ProductOptionGroup; + /** Update existing ProductVariants */ + updateProductVariants: Array>; + /** Update multiple existing Products */ + updateProducts: Array; + updatePromotion: UpdatePromotionResult; + /** Update an existing Role */ + updateRole: Role; + /** Update an existing Seller */ + updateSeller: Seller; + /** Update an existing ShippingMethod */ + updateShippingMethod: ShippingMethod; + updateStockLocation: StockLocation; + /** Update an existing Tag */ + updateTag: Tag; + /** Update an existing TaxCategory */ + updateTaxCategory: TaxCategory; + /** Update an existing TaxRate */ + updateTaxRate: TaxRate; + /** Update an existing Zone */ + updateZone: Zone; }; - export type MutationAddCustomersToGroupArgs = { - customerGroupId: Scalars['ID']; - customerIds: Array; + customerGroupId: Scalars['ID']; + customerIds: Array; }; - export type MutationAddFulfillmentToOrderArgs = { - input: FulfillOrderInput; + input: FulfillOrderInput; }; - export type MutationAddItemToDraftOrderArgs = { - input: AddItemToDraftOrderInput; - orderId: Scalars['ID']; + input: AddItemToDraftOrderInput; + orderId: Scalars['ID']; }; - export type MutationAddManualPaymentToOrderArgs = { - input: ManualPaymentInput; + input: ManualPaymentInput; }; - export type MutationAddMembersToZoneArgs = { - memberIds: Array; - zoneId: Scalars['ID']; + memberIds: Array; + zoneId: Scalars['ID']; }; - export type MutationAddNoteToCustomerArgs = { - input: AddNoteToCustomerInput; + input: AddNoteToCustomerInput; }; - export type MutationAddNoteToOrderArgs = { - input: AddNoteToOrderInput; + input: AddNoteToOrderInput; }; - export type MutationAddOptionGroupToProductArgs = { - optionGroupId: Scalars['ID']; - productId: Scalars['ID']; + optionGroupId: Scalars['ID']; + productId: Scalars['ID']; }; - export type MutationAdjustDraftOrderLineArgs = { - input: AdjustDraftOrderLineInput; - orderId: Scalars['ID']; + input: AdjustDraftOrderLineInput; + orderId: Scalars['ID']; }; - export type MutationApplyCouponCodeToDraftOrderArgs = { - couponCode: Scalars['String']; - orderId: Scalars['ID']; + couponCode: Scalars['String']; + orderId: Scalars['ID']; }; - export type MutationAssignAssetsToChannelArgs = { - input: AssignAssetsToChannelInput; + input: AssignAssetsToChannelInput; }; - export type MutationAssignCollectionsToChannelArgs = { - input: AssignCollectionsToChannelInput; + input: AssignCollectionsToChannelInput; }; - export type MutationAssignFacetsToChannelArgs = { - input: AssignFacetsToChannelInput; + input: AssignFacetsToChannelInput; }; - export type MutationAssignProductVariantsToChannelArgs = { - input: AssignProductVariantsToChannelInput; + input: AssignProductVariantsToChannelInput; }; - export type MutationAssignProductsToChannelArgs = { - input: AssignProductsToChannelInput; + input: AssignProductsToChannelInput; }; - export type MutationAssignPromotionsToChannelArgs = { - input: AssignPromotionsToChannelInput; + input: AssignPromotionsToChannelInput; }; - export type MutationAssignRoleToAdministratorArgs = { - administratorId: Scalars['ID']; - roleId: Scalars['ID']; + administratorId: Scalars['ID']; + roleId: Scalars['ID']; }; - export type MutationAuthenticateArgs = { - input: AuthenticationInput; - rememberMe?: InputMaybe; + input: AuthenticationInput; + rememberMe?: InputMaybe; }; - export type MutationCancelJobArgs = { - jobId: Scalars['ID']; + jobId: Scalars['ID']; }; - export type MutationCancelOrderArgs = { - input: CancelOrderInput; + input: CancelOrderInput; }; - export type MutationCancelPaymentArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationCreateAdministratorArgs = { - input: CreateAdministratorInput; + input: CreateAdministratorInput; }; - export type MutationCreateAssetsArgs = { - input: Array; + input: Array; }; - export type MutationCreateChannelArgs = { - input: CreateChannelInput; + input: CreateChannelInput; }; - export type MutationCreateCollectionArgs = { - input: CreateCollectionInput; + input: CreateCollectionInput; }; - export type MutationCreateCountryArgs = { - input: CreateCountryInput; + input: CreateCountryInput; }; - export type MutationCreateCustomerArgs = { - input: CreateCustomerInput; - password?: InputMaybe; + input: CreateCustomerInput; + password?: InputMaybe; }; - export type MutationCreateCustomerAddressArgs = { - customerId: Scalars['ID']; - input: CreateAddressInput; + customerId: Scalars['ID']; + input: CreateAddressInput; }; - export type MutationCreateCustomerGroupArgs = { - input: CreateCustomerGroupInput; + input: CreateCustomerGroupInput; }; - export type MutationCreateFacetArgs = { - input: CreateFacetInput; + input: CreateFacetInput; }; - export type MutationCreateFacetValuesArgs = { - input: Array; + input: Array; }; - export type MutationCreatePaymentMethodArgs = { - input: CreatePaymentMethodInput; + input: CreatePaymentMethodInput; }; - export type MutationCreateProductArgs = { - input: CreateProductInput; + input: CreateProductInput; }; - export type MutationCreateProductOptionArgs = { - input: CreateProductOptionInput; + input: CreateProductOptionInput; }; - export type MutationCreateProductOptionGroupArgs = { - input: CreateProductOptionGroupInput; + input: CreateProductOptionGroupInput; }; - export type MutationCreateProductVariantsArgs = { - input: Array; + input: Array; }; - export type MutationCreatePromotionArgs = { - input: CreatePromotionInput; + input: CreatePromotionInput; }; - export type MutationCreateRoleArgs = { - input: CreateRoleInput; + input: CreateRoleInput; }; - export type MutationCreateSellerArgs = { - input: CreateSellerInput; + input: CreateSellerInput; }; - export type MutationCreateShippingMethodArgs = { - input: CreateShippingMethodInput; + input: CreateShippingMethodInput; }; - export type MutationCreateStockLocationArgs = { - input: CreateStockLocationInput; + input: CreateStockLocationInput; }; - export type MutationCreateTagArgs = { - input: CreateTagInput; + input: CreateTagInput; }; - export type MutationCreateTaxCategoryArgs = { - input: CreateTaxCategoryInput; + input: CreateTaxCategoryInput; }; - export type MutationCreateTaxRateArgs = { - input: CreateTaxRateInput; + input: CreateTaxRateInput; }; - export type MutationCreateZoneArgs = { - input: CreateZoneInput; + input: CreateZoneInput; }; - export type MutationDeleteAdministratorArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationDeleteAssetArgs = { - input: DeleteAssetInput; + input: DeleteAssetInput; }; - export type MutationDeleteAssetsArgs = { - input: DeleteAssetsInput; + input: DeleteAssetsInput; }; - export type MutationDeleteChannelArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationDeleteCollectionArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationDeleteCollectionsArgs = { - ids: Array; + ids: Array; }; - export type MutationDeleteCountryArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationDeleteCustomerArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationDeleteCustomerAddressArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationDeleteCustomerGroupArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationDeleteCustomerNoteArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationDeleteDraftOrderArgs = { - orderId: Scalars['ID']; + orderId: Scalars['ID']; }; - export type MutationDeleteFacetArgs = { - force?: InputMaybe; - id: Scalars['ID']; + force?: InputMaybe; + id: Scalars['ID']; }; - export type MutationDeleteFacetValuesArgs = { - force?: InputMaybe; - ids: Array; + force?: InputMaybe; + ids: Array; }; - export type MutationDeleteFacetsArgs = { - force?: InputMaybe; - ids: Array; + force?: InputMaybe; + ids: Array; }; - export type MutationDeleteOrderNoteArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationDeletePaymentMethodArgs = { - force?: InputMaybe; - id: Scalars['ID']; + force?: InputMaybe; + id: Scalars['ID']; }; - export type MutationDeleteProductArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationDeleteProductOptionArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationDeleteProductVariantArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationDeleteProductVariantsArgs = { - ids: Array; + ids: Array; }; - export type MutationDeleteProductsArgs = { - ids: Array; + ids: Array; }; - export type MutationDeletePromotionArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationDeleteRoleArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationDeleteSellerArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationDeleteShippingMethodArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationDeleteStockLocationArgs = { - input: DeleteStockLocationInput; + input: DeleteStockLocationInput; }; - export type MutationDeleteTagArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationDeleteTaxCategoryArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationDeleteTaxRateArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationDeleteZoneArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationFlushBufferedJobsArgs = { - bufferIds?: InputMaybe>; + bufferIds?: InputMaybe>; }; - export type MutationImportProductsArgs = { - csvFile: Scalars['Upload']; + csvFile: Scalars['Upload']; }; - export type MutationLoginArgs = { - password: Scalars['String']; - rememberMe?: InputMaybe; - username: Scalars['String']; + password: Scalars['String']; + rememberMe?: InputMaybe; + username: Scalars['String']; }; - export type MutationModifyOrderArgs = { - input: ModifyOrderInput; + input: ModifyOrderInput; }; - export type MutationMoveCollectionArgs = { - input: MoveCollectionInput; + input: MoveCollectionInput; }; - export type MutationRefundOrderArgs = { - input: RefundOrderInput; + input: RefundOrderInput; }; - export type MutationRemoveCollectionsFromChannelArgs = { - input: RemoveCollectionsFromChannelInput; + input: RemoveCollectionsFromChannelInput; }; - export type MutationRemoveCouponCodeFromDraftOrderArgs = { - couponCode: Scalars['String']; - orderId: Scalars['ID']; + couponCode: Scalars['String']; + orderId: Scalars['ID']; }; - export type MutationRemoveCustomersFromGroupArgs = { - customerGroupId: Scalars['ID']; - customerIds: Array; + customerGroupId: Scalars['ID']; + customerIds: Array; }; - export type MutationRemoveDraftOrderLineArgs = { - orderId: Scalars['ID']; - orderLineId: Scalars['ID']; + orderId: Scalars['ID']; + orderLineId: Scalars['ID']; }; - export type MutationRemoveFacetsFromChannelArgs = { - input: RemoveFacetsFromChannelInput; + input: RemoveFacetsFromChannelInput; }; - export type MutationRemoveMembersFromZoneArgs = { - memberIds: Array; - zoneId: Scalars['ID']; + memberIds: Array; + zoneId: Scalars['ID']; }; - export type MutationRemoveOptionGroupFromProductArgs = { - optionGroupId: Scalars['ID']; - productId: Scalars['ID']; + optionGroupId: Scalars['ID']; + productId: Scalars['ID']; }; - export type MutationRemoveProductVariantsFromChannelArgs = { - input: RemoveProductVariantsFromChannelInput; + input: RemoveProductVariantsFromChannelInput; }; - export type MutationRemoveProductsFromChannelArgs = { - input: RemoveProductsFromChannelInput; + input: RemoveProductsFromChannelInput; }; - export type MutationRemovePromotionsFromChannelArgs = { - input: RemovePromotionsFromChannelInput; + input: RemovePromotionsFromChannelInput; }; - export type MutationRemoveSettledJobsArgs = { - olderThan?: InputMaybe; - queueNames?: InputMaybe>; + olderThan?: InputMaybe; + queueNames?: InputMaybe>; }; - export type MutationSetCustomerForDraftOrderArgs = { - customerId?: InputMaybe; - input?: InputMaybe; - orderId: Scalars['ID']; + customerId?: InputMaybe; + input?: InputMaybe; + orderId: Scalars['ID']; }; - export type MutationSetDraftOrderBillingAddressArgs = { - input: CreateAddressInput; - orderId: Scalars['ID']; + input: CreateAddressInput; + orderId: Scalars['ID']; }; - export type MutationSetDraftOrderCustomFieldsArgs = { - input: UpdateOrderInput; - orderId: Scalars['ID']; + input: UpdateOrderInput; + orderId: Scalars['ID']; }; - export type MutationSetDraftOrderShippingAddressArgs = { - input: CreateAddressInput; - orderId: Scalars['ID']; + input: CreateAddressInput; + orderId: Scalars['ID']; }; - export type MutationSetDraftOrderShippingMethodArgs = { - orderId: Scalars['ID']; - shippingMethodId: Scalars['ID']; + orderId: Scalars['ID']; + shippingMethodId: Scalars['ID']; }; - export type MutationSetOrderCustomFieldsArgs = { - input: UpdateOrderInput; + input: UpdateOrderInput; }; - export type MutationSettlePaymentArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationSettleRefundArgs = { - input: SettleRefundInput; + input: SettleRefundInput; }; - export type MutationTransitionFulfillmentToStateArgs = { - id: Scalars['ID']; - state: Scalars['String']; + id: Scalars['ID']; + state: Scalars['String']; }; - export type MutationTransitionOrderToStateArgs = { - id: Scalars['ID']; - state: Scalars['String']; + id: Scalars['ID']; + state: Scalars['String']; }; - export type MutationTransitionPaymentToStateArgs = { - id: Scalars['ID']; - state: Scalars['String']; + id: Scalars['ID']; + state: Scalars['String']; }; - export type MutationUpdateActiveAdministratorArgs = { - input: UpdateActiveAdministratorInput; + input: UpdateActiveAdministratorInput; }; - export type MutationUpdateAdministratorArgs = { - input: UpdateAdministratorInput; + input: UpdateAdministratorInput; }; - export type MutationUpdateAssetArgs = { - input: UpdateAssetInput; + input: UpdateAssetInput; }; - export type MutationUpdateChannelArgs = { - input: UpdateChannelInput; + input: UpdateChannelInput; }; - export type MutationUpdateCollectionArgs = { - input: UpdateCollectionInput; + input: UpdateCollectionInput; }; - export type MutationUpdateCountryArgs = { - input: UpdateCountryInput; + input: UpdateCountryInput; }; - export type MutationUpdateCustomerArgs = { - input: UpdateCustomerInput; + input: UpdateCustomerInput; }; - export type MutationUpdateCustomerAddressArgs = { - input: UpdateAddressInput; + input: UpdateAddressInput; }; - export type MutationUpdateCustomerGroupArgs = { - input: UpdateCustomerGroupInput; + input: UpdateCustomerGroupInput; }; - export type MutationUpdateCustomerNoteArgs = { - input: UpdateCustomerNoteInput; + input: UpdateCustomerNoteInput; }; - export type MutationUpdateFacetArgs = { - input: UpdateFacetInput; + input: UpdateFacetInput; }; - export type MutationUpdateFacetValuesArgs = { - input: Array; + input: Array; }; - export type MutationUpdateGlobalSettingsArgs = { - input: UpdateGlobalSettingsInput; + input: UpdateGlobalSettingsInput; }; - export type MutationUpdateOrderNoteArgs = { - input: UpdateOrderNoteInput; + input: UpdateOrderNoteInput; }; - export type MutationUpdatePaymentMethodArgs = { - input: UpdatePaymentMethodInput; + input: UpdatePaymentMethodInput; }; - export type MutationUpdateProductArgs = { - input: UpdateProductInput; + input: UpdateProductInput; }; - export type MutationUpdateProductOptionArgs = { - input: UpdateProductOptionInput; + input: UpdateProductOptionInput; }; - export type MutationUpdateProductOptionGroupArgs = { - input: UpdateProductOptionGroupInput; + input: UpdateProductOptionGroupInput; }; - export type MutationUpdateProductVariantsArgs = { - input: Array; + input: Array; }; - export type MutationUpdateProductsArgs = { - input: Array; + input: Array; }; - export type MutationUpdatePromotionArgs = { - input: UpdatePromotionInput; + input: UpdatePromotionInput; }; - export type MutationUpdateRoleArgs = { - input: UpdateRoleInput; + input: UpdateRoleInput; }; - export type MutationUpdateSellerArgs = { - input: UpdateSellerInput; + input: UpdateSellerInput; }; - export type MutationUpdateShippingMethodArgs = { - input: UpdateShippingMethodInput; + input: UpdateShippingMethodInput; }; - export type MutationUpdateStockLocationArgs = { - input: UpdateStockLocationInput; + input: UpdateStockLocationInput; }; - export type MutationUpdateTagArgs = { - input: UpdateTagInput; + input: UpdateTagInput; }; - export type MutationUpdateTaxCategoryArgs = { - input: UpdateTaxCategoryInput; + input: UpdateTaxCategoryInput; }; - export type MutationUpdateTaxRateArgs = { - input: UpdateTaxRateInput; + input: UpdateTaxRateInput; }; - export type MutationUpdateZoneArgs = { - input: UpdateZoneInput; + input: UpdateZoneInput; }; export type NativeAuthInput = { - password: Scalars['String']; - username: Scalars['String']; + password: Scalars['String']; + username: Scalars['String']; }; /** Returned when attempting an operation that relies on the NativeAuthStrategy, if that strategy is not configured. */ export type NativeAuthStrategyError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; export type NativeAuthenticationResult = CurrentUser | InvalidCredentialsError | NativeAuthStrategyError; /** Returned when attempting to set a negative OrderLine quantity. */ export type NegativeQuantityError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** @@ -3327,343 +3229,342 @@ export type NegativeQuantityError = ErrorResult & { * current session. */ export type NoActiveOrderError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** Returned when a call to modifyOrder fails to specify any changes */ export type NoChangesSpecifiedError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; export type Node = { - id: Scalars['ID']; + id: Scalars['ID']; }; /** Returned if an attempting to refund an Order but neither items nor shipping refund was specified */ export type NothingToRefundError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** Operators for filtering on a list of Number fields */ export type NumberListOperators = { - inList: Scalars['Float']; + inList: Scalars['Float']; }; /** Operators for filtering on a Int or Float field */ export type NumberOperators = { - between?: InputMaybe; - eq?: InputMaybe; - gt?: InputMaybe; - gte?: InputMaybe; - isNull?: InputMaybe; - lt?: InputMaybe; - lte?: InputMaybe; + between?: InputMaybe; + eq?: InputMaybe; + gt?: InputMaybe; + gte?: InputMaybe; + isNull?: InputMaybe; + lt?: InputMaybe; + lte?: InputMaybe; }; export type NumberRange = { - end: Scalars['Float']; - start: Scalars['Float']; + end: Scalars['Float']; + start: Scalars['Float']; }; export type Order = Node & { - /** An order is active as long as the payment process has not been completed */ - active: Scalars['Boolean']; - aggregateOrder?: Maybe; - aggregateOrderId?: Maybe; - billingAddress?: Maybe; - channels: Array; - /** A unique code for the Order */ - code: Scalars['String']; - /** An array of all coupon codes applied to the Order */ - couponCodes: Array; - createdAt: Scalars['DateTime']; - currencyCode: CurrencyCode; - customFields?: Maybe; - customer?: Maybe; - discounts: Array; - fulfillments?: Maybe>; - history: HistoryEntryList; - id: Scalars['ID']; - lines: Array; - modifications: Array; - nextStates: Array; - /** - * The date & time that the Order was placed, i.e. the Customer - * completed the checkout and the Order is no longer "active" - */ - orderPlacedAt?: Maybe; - payments?: Maybe>; - /** Promotions applied to the order. Only gets populated after the payment process has completed. */ - promotions: Array; - sellerOrders?: Maybe>; - shipping: Scalars['Money']; - shippingAddress?: Maybe; - shippingLines: Array; - shippingWithTax: Scalars['Money']; - state: Scalars['String']; - /** - * The subTotal is the total of all OrderLines in the Order. This figure also includes any Order-level - * discounts which have been prorated (proportionally distributed) amongst the OrderItems. - * To get a total of all OrderLines which does not account for prorated discounts, use the - * sum of `OrderLine.discountedLinePrice` values. - */ - subTotal: Scalars['Money']; - /** Same as subTotal, but inclusive of tax */ - subTotalWithTax: Scalars['Money']; - /** - * Surcharges are arbitrary modifications to the Order total which are neither - * ProductVariants nor discounts resulting from applied Promotions. For example, - * one-off discounts based on customer interaction, or surcharges based on payment - * methods. - */ - surcharges: Array; - /** A summary of the taxes being applied to this Order */ - taxSummary: Array; - /** Equal to subTotal plus shipping */ - total: Scalars['Money']; - totalQuantity: Scalars['Int']; - /** The final payable amount. Equal to subTotalWithTax plus shippingWithTax */ - totalWithTax: Scalars['Money']; - type: OrderType; - updatedAt: Scalars['DateTime']; + /** An order is active as long as the payment process has not been completed */ + active: Scalars['Boolean']; + aggregateOrder?: Maybe; + aggregateOrderId?: Maybe; + billingAddress?: Maybe; + channels: Array; + /** A unique code for the Order */ + code: Scalars['String']; + /** An array of all coupon codes applied to the Order */ + couponCodes: Array; + createdAt: Scalars['DateTime']; + currencyCode: CurrencyCode; + customFields?: Maybe; + customer?: Maybe; + discounts: Array; + fulfillments?: Maybe>; + history: HistoryEntryList; + id: Scalars['ID']; + lines: Array; + modifications: Array; + nextStates: Array; + /** + * The date & time that the Order was placed, i.e. the Customer + * completed the checkout and the Order is no longer "active" + */ + orderPlacedAt?: Maybe; + payments?: Maybe>; + /** Promotions applied to the order. Only gets populated after the payment process has completed. */ + promotions: Array; + sellerOrders?: Maybe>; + shipping: Scalars['Money']; + shippingAddress?: Maybe; + shippingLines: Array; + shippingWithTax: Scalars['Money']; + state: Scalars['String']; + /** + * The subTotal is the total of all OrderLines in the Order. This figure also includes any Order-level + * discounts which have been prorated (proportionally distributed) amongst the OrderItems. + * To get a total of all OrderLines which does not account for prorated discounts, use the + * sum of `OrderLine.discountedLinePrice` values. + */ + subTotal: Scalars['Money']; + /** Same as subTotal, but inclusive of tax */ + subTotalWithTax: Scalars['Money']; + /** + * Surcharges are arbitrary modifications to the Order total which are neither + * ProductVariants nor discounts resulting from applied Promotions. For example, + * one-off discounts based on customer interaction, or surcharges based on payment + * methods. + */ + surcharges: Array; + /** A summary of the taxes being applied to this Order */ + taxSummary: Array; + /** Equal to subTotal plus shipping */ + total: Scalars['Money']; + totalQuantity: Scalars['Int']; + /** The final payable amount. Equal to subTotalWithTax plus shippingWithTax */ + totalWithTax: Scalars['Money']; + type: OrderType; + updatedAt: Scalars['DateTime']; }; - export type OrderHistoryArgs = { - options?: InputMaybe; + options?: InputMaybe; }; export type OrderAddress = { - city?: Maybe; - company?: Maybe; - country?: Maybe; - countryCode?: Maybe; - customFields?: Maybe; - fullName?: Maybe; - phoneNumber?: Maybe; - postalCode?: Maybe; - province?: Maybe; - streetLine1?: Maybe; - streetLine2?: Maybe; + city?: Maybe; + company?: Maybe; + country?: Maybe; + countryCode?: Maybe; + customFields?: Maybe; + fullName?: Maybe; + phoneNumber?: Maybe; + postalCode?: Maybe; + province?: Maybe; + streetLine1?: Maybe; + streetLine2?: Maybe; }; export type OrderFilterParameter = { - active?: InputMaybe; - aggregateOrderId?: InputMaybe; - code?: InputMaybe; - createdAt?: InputMaybe; - currencyCode?: InputMaybe; - customerLastName?: InputMaybe; - id?: InputMaybe; - orderPlacedAt?: InputMaybe; - shipping?: InputMaybe; - shippingWithTax?: InputMaybe; - state?: InputMaybe; - subTotal?: InputMaybe; - subTotalWithTax?: InputMaybe; - total?: InputMaybe; - totalQuantity?: InputMaybe; - totalWithTax?: InputMaybe; - transactionId?: InputMaybe; - type?: InputMaybe; - updatedAt?: InputMaybe; + active?: InputMaybe; + aggregateOrderId?: InputMaybe; + code?: InputMaybe; + createdAt?: InputMaybe; + currencyCode?: InputMaybe; + customerLastName?: InputMaybe; + id?: InputMaybe; + orderPlacedAt?: InputMaybe; + shipping?: InputMaybe; + shippingWithTax?: InputMaybe; + state?: InputMaybe; + subTotal?: InputMaybe; + subTotalWithTax?: InputMaybe; + total?: InputMaybe; + totalQuantity?: InputMaybe; + totalWithTax?: InputMaybe; + transactionId?: InputMaybe; + type?: InputMaybe; + updatedAt?: InputMaybe; }; export type OrderItem = Node & { - adjustments: Array; - cancelled: Scalars['Boolean']; - createdAt: Scalars['DateTime']; - /** - * The price of a single unit including discounts, excluding tax. - * - * If Order-level discounts have been applied, this will not be the - * actual taxable unit price (see `proratedUnitPrice`), but is generally the - * correct price to display to customers to avoid confusion - * about the internal handling of distributed Order-level discounts. - */ - discountedUnitPrice: Scalars['Money']; - /** The price of a single unit including discounts and tax */ - discountedUnitPriceWithTax: Scalars['Money']; - fulfillment?: Maybe; - id: Scalars['ID']; - /** - * The actual unit price, taking into account both item discounts _and_ prorated (proportionally-distributed) - * Order-level discounts. This value is the true economic value of the OrderItem, and is used in tax - * and refund calculations. - */ - proratedUnitPrice: Scalars['Money']; - /** The proratedUnitPrice including tax */ - proratedUnitPriceWithTax: Scalars['Money']; - refundId?: Maybe; - taxLines: Array; - taxRate: Scalars['Float']; - /** The price of a single unit, excluding tax and discounts */ - unitPrice: Scalars['Money']; - /** The price of a single unit, including tax but excluding discounts */ - unitPriceWithTax: Scalars['Money']; - unitTax: Scalars['Money']; - updatedAt: Scalars['DateTime']; + adjustments: Array; + cancelled: Scalars['Boolean']; + createdAt: Scalars['DateTime']; + /** + * The price of a single unit including discounts, excluding tax. + * + * If Order-level discounts have been applied, this will not be the + * actual taxable unit price (see `proratedUnitPrice`), but is generally the + * correct price to display to customers to avoid confusion + * about the internal handling of distributed Order-level discounts. + */ + discountedUnitPrice: Scalars['Money']; + /** The price of a single unit including discounts and tax */ + discountedUnitPriceWithTax: Scalars['Money']; + fulfillment?: Maybe; + id: Scalars['ID']; + /** + * The actual unit price, taking into account both item discounts _and_ prorated (proportionally-distributed) + * Order-level discounts. This value is the true economic value of the OrderItem, and is used in tax + * and refund calculations. + */ + proratedUnitPrice: Scalars['Money']; + /** The proratedUnitPrice including tax */ + proratedUnitPriceWithTax: Scalars['Money']; + refundId?: Maybe; + taxLines: Array; + taxRate: Scalars['Float']; + /** The price of a single unit, excluding tax and discounts */ + unitPrice: Scalars['Money']; + /** The price of a single unit, including tax but excluding discounts */ + unitPriceWithTax: Scalars['Money']; + unitTax: Scalars['Money']; + updatedAt: Scalars['DateTime']; }; /** Returned when the maximum order size limit has been reached. */ export type OrderLimitError = ErrorResult & { - errorCode: ErrorCode; - maxItems: Scalars['Int']; - message: Scalars['String']; + errorCode: ErrorCode; + maxItems: Scalars['Int']; + message: Scalars['String']; }; export type OrderLine = Node & { - createdAt: Scalars['DateTime']; - customFields?: Maybe; - /** The price of the line including discounts, excluding tax */ - discountedLinePrice: Scalars['Money']; - /** The price of the line including discounts and tax */ - discountedLinePriceWithTax: Scalars['Money']; - /** - * The price of a single unit including discounts, excluding tax. - * - * If Order-level discounts have been applied, this will not be the - * actual taxable unit price (see `proratedUnitPrice`), but is generally the - * correct price to display to customers to avoid confusion - * about the internal handling of distributed Order-level discounts. - */ - discountedUnitPrice: Scalars['Money']; - /** The price of a single unit including discounts and tax */ - discountedUnitPriceWithTax: Scalars['Money']; - discounts: Array; - featuredAsset?: Maybe; - fulfillmentLines?: Maybe>; - id: Scalars['ID']; - /** The total price of the line excluding tax and discounts. */ - linePrice: Scalars['Money']; - /** The total price of the line including tax but excluding discounts. */ - linePriceWithTax: Scalars['Money']; - /** The total tax on this line */ - lineTax: Scalars['Money']; - order: Order; - /** The quantity at the time the Order was placed */ - orderPlacedQuantity: Scalars['Int']; - productVariant: ProductVariant; - /** - * The actual line price, taking into account both item discounts _and_ prorated (proportionally-distributed) - * Order-level discounts. This value is the true economic value of the OrderLine, and is used in tax - * and refund calculations. - */ - proratedLinePrice: Scalars['Money']; - /** The proratedLinePrice including tax */ - proratedLinePriceWithTax: Scalars['Money']; - /** - * The actual unit price, taking into account both item discounts _and_ prorated (proportionally-distributed) - * Order-level discounts. This value is the true economic value of the OrderItem, and is used in tax - * and refund calculations. - */ - proratedUnitPrice: Scalars['Money']; - /** The proratedUnitPrice including tax */ - proratedUnitPriceWithTax: Scalars['Money']; - quantity: Scalars['Int']; - taxLines: Array; - taxRate: Scalars['Float']; - /** The price of a single unit, excluding tax and discounts */ - unitPrice: Scalars['Money']; - /** Non-zero if the unitPrice has changed since it was initially added to Order */ - unitPriceChangeSinceAdded: Scalars['Money']; - /** The price of a single unit, including tax but excluding discounts */ - unitPriceWithTax: Scalars['Money']; - /** Non-zero if the unitPriceWithTax has changed since it was initially added to Order */ - unitPriceWithTaxChangeSinceAdded: Scalars['Money']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + /** The price of the line including discounts, excluding tax */ + discountedLinePrice: Scalars['Money']; + /** The price of the line including discounts and tax */ + discountedLinePriceWithTax: Scalars['Money']; + /** + * The price of a single unit including discounts, excluding tax. + * + * If Order-level discounts have been applied, this will not be the + * actual taxable unit price (see `proratedUnitPrice`), but is generally the + * correct price to display to customers to avoid confusion + * about the internal handling of distributed Order-level discounts. + */ + discountedUnitPrice: Scalars['Money']; + /** The price of a single unit including discounts and tax */ + discountedUnitPriceWithTax: Scalars['Money']; + discounts: Array; + featuredAsset?: Maybe; + fulfillmentLines?: Maybe>; + id: Scalars['ID']; + /** The total price of the line excluding tax and discounts. */ + linePrice: Scalars['Money']; + /** The total price of the line including tax but excluding discounts. */ + linePriceWithTax: Scalars['Money']; + /** The total tax on this line */ + lineTax: Scalars['Money']; + order: Order; + /** The quantity at the time the Order was placed */ + orderPlacedQuantity: Scalars['Int']; + productVariant: ProductVariant; + /** + * The actual line price, taking into account both item discounts _and_ prorated (proportionally-distributed) + * Order-level discounts. This value is the true economic value of the OrderLine, and is used in tax + * and refund calculations. + */ + proratedLinePrice: Scalars['Money']; + /** The proratedLinePrice including tax */ + proratedLinePriceWithTax: Scalars['Money']; + /** + * The actual unit price, taking into account both item discounts _and_ prorated (proportionally-distributed) + * Order-level discounts. This value is the true economic value of the OrderItem, and is used in tax + * and refund calculations. + */ + proratedUnitPrice: Scalars['Money']; + /** The proratedUnitPrice including tax */ + proratedUnitPriceWithTax: Scalars['Money']; + quantity: Scalars['Int']; + taxLines: Array; + taxRate: Scalars['Float']; + /** The price of a single unit, excluding tax and discounts */ + unitPrice: Scalars['Money']; + /** Non-zero if the unitPrice has changed since it was initially added to Order */ + unitPriceChangeSinceAdded: Scalars['Money']; + /** The price of a single unit, including tax but excluding discounts */ + unitPriceWithTax: Scalars['Money']; + /** Non-zero if the unitPriceWithTax has changed since it was initially added to Order */ + unitPriceWithTaxChangeSinceAdded: Scalars['Money']; + updatedAt: Scalars['DateTime']; }; export type OrderLineInput = { - orderLineId: Scalars['ID']; - quantity: Scalars['Int']; + orderLineId: Scalars['ID']; + quantity: Scalars['Int']; }; export type OrderList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type OrderListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type OrderModification = Node & { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - isSettled: Scalars['Boolean']; - lines: Array; - note: Scalars['String']; - payment?: Maybe; - priceChange: Scalars['Money']; - refund?: Maybe; - surcharges?: Maybe>; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + isSettled: Scalars['Boolean']; + lines: Array; + note: Scalars['String']; + payment?: Maybe; + priceChange: Scalars['Money']; + refund?: Maybe; + surcharges?: Maybe>; + updatedAt: Scalars['DateTime']; }; /** Returned when attempting to modify the contents of an Order that is not in the `AddingItems` state. */ export type OrderModificationError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; export type OrderModificationLine = { - modification: OrderModification; - modificationId: Scalars['ID']; - orderLine: OrderLine; - orderLineId: Scalars['ID']; - quantity: Scalars['Int']; + modification: OrderModification; + modificationId: Scalars['ID']; + orderLine: OrderLine; + orderLineId: Scalars['ID']; + quantity: Scalars['Int']; }; /** Returned when attempting to modify the contents of an Order that is not in the `Modifying` state. */ export type OrderModificationStateError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; export type OrderProcessState = { - name: Scalars['String']; - to: Array; + name: Scalars['String']; + to: Array; }; export type OrderSortParameter = { - aggregateOrderId?: InputMaybe; - code?: InputMaybe; - createdAt?: InputMaybe; - customerLastName?: InputMaybe; - id?: InputMaybe; - orderPlacedAt?: InputMaybe; - shipping?: InputMaybe; - shippingWithTax?: InputMaybe; - state?: InputMaybe; - subTotal?: InputMaybe; - subTotalWithTax?: InputMaybe; - total?: InputMaybe; - totalQuantity?: InputMaybe; - totalWithTax?: InputMaybe; - transactionId?: InputMaybe; - updatedAt?: InputMaybe; + aggregateOrderId?: InputMaybe; + code?: InputMaybe; + createdAt?: InputMaybe; + customerLastName?: InputMaybe; + id?: InputMaybe; + orderPlacedAt?: InputMaybe; + shipping?: InputMaybe; + shippingWithTax?: InputMaybe; + state?: InputMaybe; + subTotal?: InputMaybe; + subTotalWithTax?: InputMaybe; + total?: InputMaybe; + totalQuantity?: InputMaybe; + totalWithTax?: InputMaybe; + transactionId?: InputMaybe; + updatedAt?: InputMaybe; }; /** Returned if there is an error in transitioning the Order state */ export type OrderStateTransitionError = ErrorResult & { - errorCode: ErrorCode; - fromState: Scalars['String']; - message: Scalars['String']; - toState: Scalars['String']; - transitionError: Scalars['String']; + errorCode: ErrorCode; + fromState: Scalars['String']; + message: Scalars['String']; + toState: Scalars['String']; + transitionError: Scalars['String']; }; /** @@ -3671,81 +3572,81 @@ export type OrderStateTransitionError = ErrorResult & { * by taxRate. */ export type OrderTaxSummary = { - /** A description of this tax */ - description: Scalars['String']; - /** The total net price or OrderItems to which this taxRate applies */ - taxBase: Scalars['Money']; - /** The taxRate as a percentage */ - taxRate: Scalars['Float']; - /** The total tax being applied to the Order at this taxRate */ - taxTotal: Scalars['Money']; + /** A description of this tax */ + description: Scalars['String']; + /** The total net price or OrderItems to which this taxRate applies */ + taxBase: Scalars['Money']; + /** The taxRate as a percentage */ + taxRate: Scalars['Float']; + /** The total tax being applied to the Order at this taxRate */ + taxTotal: Scalars['Money']; }; export enum OrderType { - Aggregate = 'Aggregate', - Regular = 'Regular', - Seller = 'Seller' + Aggregate = 'Aggregate', + Regular = 'Regular', + Seller = 'Seller', } export type PaginatedList = { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type Payment = Node & { - amount: Scalars['Money']; - createdAt: Scalars['DateTime']; - errorMessage?: Maybe; - id: Scalars['ID']; - metadata?: Maybe; - method: Scalars['String']; - nextStates: Array; - refunds: Array; - state: Scalars['String']; - transactionId?: Maybe; - updatedAt: Scalars['DateTime']; + amount: Scalars['Money']; + createdAt: Scalars['DateTime']; + errorMessage?: Maybe; + id: Scalars['ID']; + metadata?: Maybe; + method: Scalars['String']; + nextStates: Array; + refunds: Array; + state: Scalars['String']; + transactionId?: Maybe; + updatedAt: Scalars['DateTime']; }; export type PaymentMethod = Node & { - checker?: Maybe; - code: Scalars['String']; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - description: Scalars['String']; - enabled: Scalars['Boolean']; - handler: ConfigurableOperation; - id: Scalars['ID']; - name: Scalars['String']; - translations: Array; - updatedAt: Scalars['DateTime']; + checker?: Maybe; + code: Scalars['String']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + description: Scalars['String']; + enabled: Scalars['Boolean']; + handler: ConfigurableOperation; + id: Scalars['ID']; + name: Scalars['String']; + translations: Array; + updatedAt: Scalars['DateTime']; }; export type PaymentMethodFilterParameter = { - code?: InputMaybe; - createdAt?: InputMaybe; - description?: InputMaybe; - enabled?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - updatedAt?: InputMaybe; + code?: InputMaybe; + createdAt?: InputMaybe; + description?: InputMaybe; + enabled?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + updatedAt?: InputMaybe; }; export type PaymentMethodList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type PaymentMethodListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; /** @@ -3753,59 +3654,59 @@ export type PaymentMethodListOptions = { * though the price has increased as a result of the changes. */ export type PaymentMethodMissingError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; export type PaymentMethodQuote = { - code: Scalars['String']; - customFields?: Maybe; - description: Scalars['String']; - eligibilityMessage?: Maybe; - id: Scalars['ID']; - isEligible: Scalars['Boolean']; - name: Scalars['String']; + code: Scalars['String']; + customFields?: Maybe; + description: Scalars['String']; + eligibilityMessage?: Maybe; + id: Scalars['ID']; + isEligible: Scalars['Boolean']; + name: Scalars['String']; }; export type PaymentMethodSortParameter = { - code?: InputMaybe; - createdAt?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - updatedAt?: InputMaybe; + code?: InputMaybe; + createdAt?: InputMaybe; + description?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + updatedAt?: InputMaybe; }; export type PaymentMethodTranslation = { - createdAt: Scalars['DateTime']; - description: Scalars['String']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + description: Scalars['String']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type PaymentMethodTranslationInput = { - customFields?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - languageCode: LanguageCode; - name?: InputMaybe; + customFields?: InputMaybe; + description?: InputMaybe; + id?: InputMaybe; + languageCode: LanguageCode; + name?: InputMaybe; }; /** Returned if an attempting to refund a Payment against OrderLines from a different Order */ export type PaymentOrderMismatchError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** Returned when there is an error in transitioning the Payment state */ export type PaymentStateTransitionError = ErrorResult & { - errorCode: ErrorCode; - fromState: Scalars['String']; - message: Scalars['String']; - toState: Scalars['String']; - transitionError: Scalars['String']; + errorCode: ErrorCode; + fromState: Scalars['String']; + message: Scalars['String']; + toState: Scalars['String']; + transitionError: Scalars['String']; }; /** @@ -3841,920 +3742,876 @@ export type PaymentStateTransitionError = ErrorResult & { * @docsCategory common */ export enum Permission { - /** Authenticated means simply that the user is logged in */ - Authenticated = 'Authenticated', - /** Grants permission to create Administrator */ - CreateAdministrator = 'CreateAdministrator', - /** Grants permission to create Asset */ - CreateAsset = 'CreateAsset', - /** Grants permission to create Products, Facets, Assets, Collections */ - CreateCatalog = 'CreateCatalog', - /** Grants permission to create Channel */ - CreateChannel = 'CreateChannel', - /** Grants permission to create Collection */ - CreateCollection = 'CreateCollection', - /** Grants permission to create Country */ - CreateCountry = 'CreateCountry', - /** Grants permission to create Customer */ - CreateCustomer = 'CreateCustomer', - /** Grants permission to create CustomerGroup */ - CreateCustomerGroup = 'CreateCustomerGroup', - /** Grants permission to create Facet */ - CreateFacet = 'CreateFacet', - /** Grants permission to create Order */ - CreateOrder = 'CreateOrder', - /** Grants permission to create PaymentMethod */ - CreatePaymentMethod = 'CreatePaymentMethod', - /** Grants permission to create Product */ - CreateProduct = 'CreateProduct', - /** Grants permission to create Promotion */ - CreatePromotion = 'CreatePromotion', - /** Grants permission to create Seller */ - CreateSeller = 'CreateSeller', - /** Grants permission to create PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings */ - CreateSettings = 'CreateSettings', - /** Grants permission to create ShippingMethod */ - CreateShippingMethod = 'CreateShippingMethod', - /** Grants permission to create System */ - CreateSystem = 'CreateSystem', - /** Grants permission to create Tag */ - CreateTag = 'CreateTag', - /** Grants permission to create TaxCategory */ - CreateTaxCategory = 'CreateTaxCategory', - /** Grants permission to create TaxRate */ - CreateTaxRate = 'CreateTaxRate', - /** Grants permission to create Zone */ - CreateZone = 'CreateZone', - /** Grants permission to delete Administrator */ - DeleteAdministrator = 'DeleteAdministrator', - /** Grants permission to delete Asset */ - DeleteAsset = 'DeleteAsset', - /** Grants permission to delete Products, Facets, Assets, Collections */ - DeleteCatalog = 'DeleteCatalog', - /** Grants permission to delete Channel */ - DeleteChannel = 'DeleteChannel', - /** Grants permission to delete Collection */ - DeleteCollection = 'DeleteCollection', - /** Grants permission to delete Country */ - DeleteCountry = 'DeleteCountry', - /** Grants permission to delete Customer */ - DeleteCustomer = 'DeleteCustomer', - /** Grants permission to delete CustomerGroup */ - DeleteCustomerGroup = 'DeleteCustomerGroup', - /** Grants permission to delete Facet */ - DeleteFacet = 'DeleteFacet', - /** Grants permission to delete Order */ - DeleteOrder = 'DeleteOrder', - /** Grants permission to delete PaymentMethod */ - DeletePaymentMethod = 'DeletePaymentMethod', - /** Grants permission to delete Product */ - DeleteProduct = 'DeleteProduct', - /** Grants permission to delete Promotion */ - DeletePromotion = 'DeletePromotion', - /** Grants permission to delete Seller */ - DeleteSeller = 'DeleteSeller', - /** Grants permission to delete PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings */ - DeleteSettings = 'DeleteSettings', - /** Grants permission to delete ShippingMethod */ - DeleteShippingMethod = 'DeleteShippingMethod', - /** Grants permission to delete System */ - DeleteSystem = 'DeleteSystem', - /** Grants permission to delete Tag */ - DeleteTag = 'DeleteTag', - /** Grants permission to delete TaxCategory */ - DeleteTaxCategory = 'DeleteTaxCategory', - /** Grants permission to delete TaxRate */ - DeleteTaxRate = 'DeleteTaxRate', - /** Grants permission to delete Zone */ - DeleteZone = 'DeleteZone', - /** Owner means the user owns this entity, e.g. a Customer's own Order */ - Owner = 'Owner', - /** Public means any unauthenticated user may perform the operation */ - Public = 'Public', - /** Grants permission to read Administrator */ - ReadAdministrator = 'ReadAdministrator', - /** Grants permission to read Asset */ - ReadAsset = 'ReadAsset', - /** Grants permission to read Products, Facets, Assets, Collections */ - ReadCatalog = 'ReadCatalog', - /** Grants permission to read Channel */ - ReadChannel = 'ReadChannel', - /** Grants permission to read Collection */ - ReadCollection = 'ReadCollection', - /** Grants permission to read Country */ - ReadCountry = 'ReadCountry', - /** Grants permission to read Customer */ - ReadCustomer = 'ReadCustomer', - /** Grants permission to read CustomerGroup */ - ReadCustomerGroup = 'ReadCustomerGroup', - /** Grants permission to read Facet */ - ReadFacet = 'ReadFacet', - /** Grants permission to read Order */ - ReadOrder = 'ReadOrder', - /** Grants permission to read PaymentMethod */ - ReadPaymentMethod = 'ReadPaymentMethod', - /** Grants permission to read Product */ - ReadProduct = 'ReadProduct', - /** Grants permission to read Promotion */ - ReadPromotion = 'ReadPromotion', - /** Grants permission to read Seller */ - ReadSeller = 'ReadSeller', - /** Grants permission to read PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings */ - ReadSettings = 'ReadSettings', - /** Grants permission to read ShippingMethod */ - ReadShippingMethod = 'ReadShippingMethod', - /** Grants permission to read System */ - ReadSystem = 'ReadSystem', - /** Grants permission to read Tag */ - ReadTag = 'ReadTag', - /** Grants permission to read TaxCategory */ - ReadTaxCategory = 'ReadTaxCategory', - /** Grants permission to read TaxRate */ - ReadTaxRate = 'ReadTaxRate', - /** Grants permission to read Zone */ - ReadZone = 'ReadZone', - /** SuperAdmin has unrestricted access to all operations */ - SuperAdmin = 'SuperAdmin', - /** Grants permission to update Administrator */ - UpdateAdministrator = 'UpdateAdministrator', - /** Grants permission to update Asset */ - UpdateAsset = 'UpdateAsset', - /** Grants permission to update Products, Facets, Assets, Collections */ - UpdateCatalog = 'UpdateCatalog', - /** Grants permission to update Channel */ - UpdateChannel = 'UpdateChannel', - /** Grants permission to update Collection */ - UpdateCollection = 'UpdateCollection', - /** Grants permission to update Country */ - UpdateCountry = 'UpdateCountry', - /** Grants permission to update Customer */ - UpdateCustomer = 'UpdateCustomer', - /** Grants permission to update CustomerGroup */ - UpdateCustomerGroup = 'UpdateCustomerGroup', - /** Grants permission to update Facet */ - UpdateFacet = 'UpdateFacet', - /** Grants permission to update GlobalSettings */ - UpdateGlobalSettings = 'UpdateGlobalSettings', - /** Grants permission to update Order */ - UpdateOrder = 'UpdateOrder', - /** Grants permission to update PaymentMethod */ - UpdatePaymentMethod = 'UpdatePaymentMethod', - /** Grants permission to update Product */ - UpdateProduct = 'UpdateProduct', - /** Grants permission to update Promotion */ - UpdatePromotion = 'UpdatePromotion', - /** Grants permission to update Seller */ - UpdateSeller = 'UpdateSeller', - /** Grants permission to update PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings */ - UpdateSettings = 'UpdateSettings', - /** Grants permission to update ShippingMethod */ - UpdateShippingMethod = 'UpdateShippingMethod', - /** Grants permission to update System */ - UpdateSystem = 'UpdateSystem', - /** Grants permission to update Tag */ - UpdateTag = 'UpdateTag', - /** Grants permission to update TaxCategory */ - UpdateTaxCategory = 'UpdateTaxCategory', - /** Grants permission to update TaxRate */ - UpdateTaxRate = 'UpdateTaxRate', - /** Grants permission to update Zone */ - UpdateZone = 'UpdateZone' + /** Authenticated means simply that the user is logged in */ + Authenticated = 'Authenticated', + /** Grants permission to create Administrator */ + CreateAdministrator = 'CreateAdministrator', + /** Grants permission to create Asset */ + CreateAsset = 'CreateAsset', + /** Grants permission to create Products, Facets, Assets, Collections */ + CreateCatalog = 'CreateCatalog', + /** Grants permission to create Channel */ + CreateChannel = 'CreateChannel', + /** Grants permission to create Collection */ + CreateCollection = 'CreateCollection', + /** Grants permission to create Country */ + CreateCountry = 'CreateCountry', + /** Grants permission to create Customer */ + CreateCustomer = 'CreateCustomer', + /** Grants permission to create CustomerGroup */ + CreateCustomerGroup = 'CreateCustomerGroup', + /** Grants permission to create Facet */ + CreateFacet = 'CreateFacet', + /** Grants permission to create Order */ + CreateOrder = 'CreateOrder', + /** Grants permission to create PaymentMethod */ + CreatePaymentMethod = 'CreatePaymentMethod', + /** Grants permission to create Product */ + CreateProduct = 'CreateProduct', + /** Grants permission to create Promotion */ + CreatePromotion = 'CreatePromotion', + /** Grants permission to create Seller */ + CreateSeller = 'CreateSeller', + /** Grants permission to create PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings */ + CreateSettings = 'CreateSettings', + /** Grants permission to create ShippingMethod */ + CreateShippingMethod = 'CreateShippingMethod', + /** Grants permission to create System */ + CreateSystem = 'CreateSystem', + /** Grants permission to create Tag */ + CreateTag = 'CreateTag', + /** Grants permission to create TaxCategory */ + CreateTaxCategory = 'CreateTaxCategory', + /** Grants permission to create TaxRate */ + CreateTaxRate = 'CreateTaxRate', + /** Grants permission to create Zone */ + CreateZone = 'CreateZone', + /** Grants permission to delete Administrator */ + DeleteAdministrator = 'DeleteAdministrator', + /** Grants permission to delete Asset */ + DeleteAsset = 'DeleteAsset', + /** Grants permission to delete Products, Facets, Assets, Collections */ + DeleteCatalog = 'DeleteCatalog', + /** Grants permission to delete Channel */ + DeleteChannel = 'DeleteChannel', + /** Grants permission to delete Collection */ + DeleteCollection = 'DeleteCollection', + /** Grants permission to delete Country */ + DeleteCountry = 'DeleteCountry', + /** Grants permission to delete Customer */ + DeleteCustomer = 'DeleteCustomer', + /** Grants permission to delete CustomerGroup */ + DeleteCustomerGroup = 'DeleteCustomerGroup', + /** Grants permission to delete Facet */ + DeleteFacet = 'DeleteFacet', + /** Grants permission to delete Order */ + DeleteOrder = 'DeleteOrder', + /** Grants permission to delete PaymentMethod */ + DeletePaymentMethod = 'DeletePaymentMethod', + /** Grants permission to delete Product */ + DeleteProduct = 'DeleteProduct', + /** Grants permission to delete Promotion */ + DeletePromotion = 'DeletePromotion', + /** Grants permission to delete Seller */ + DeleteSeller = 'DeleteSeller', + /** Grants permission to delete PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings */ + DeleteSettings = 'DeleteSettings', + /** Grants permission to delete ShippingMethod */ + DeleteShippingMethod = 'DeleteShippingMethod', + /** Grants permission to delete System */ + DeleteSystem = 'DeleteSystem', + /** Grants permission to delete Tag */ + DeleteTag = 'DeleteTag', + /** Grants permission to delete TaxCategory */ + DeleteTaxCategory = 'DeleteTaxCategory', + /** Grants permission to delete TaxRate */ + DeleteTaxRate = 'DeleteTaxRate', + /** Grants permission to delete Zone */ + DeleteZone = 'DeleteZone', + /** Owner means the user owns this entity, e.g. a Customer's own Order */ + Owner = 'Owner', + /** Public means any unauthenticated user may perform the operation */ + Public = 'Public', + /** Grants permission to read Administrator */ + ReadAdministrator = 'ReadAdministrator', + /** Grants permission to read Asset */ + ReadAsset = 'ReadAsset', + /** Grants permission to read Products, Facets, Assets, Collections */ + ReadCatalog = 'ReadCatalog', + /** Grants permission to read Channel */ + ReadChannel = 'ReadChannel', + /** Grants permission to read Collection */ + ReadCollection = 'ReadCollection', + /** Grants permission to read Country */ + ReadCountry = 'ReadCountry', + /** Grants permission to read Customer */ + ReadCustomer = 'ReadCustomer', + /** Grants permission to read CustomerGroup */ + ReadCustomerGroup = 'ReadCustomerGroup', + /** Grants permission to read Facet */ + ReadFacet = 'ReadFacet', + /** Grants permission to read Order */ + ReadOrder = 'ReadOrder', + /** Grants permission to read PaymentMethod */ + ReadPaymentMethod = 'ReadPaymentMethod', + /** Grants permission to read Product */ + ReadProduct = 'ReadProduct', + /** Grants permission to read Promotion */ + ReadPromotion = 'ReadPromotion', + /** Grants permission to read Seller */ + ReadSeller = 'ReadSeller', + /** Grants permission to read PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings */ + ReadSettings = 'ReadSettings', + /** Grants permission to read ShippingMethod */ + ReadShippingMethod = 'ReadShippingMethod', + /** Grants permission to read System */ + ReadSystem = 'ReadSystem', + /** Grants permission to read Tag */ + ReadTag = 'ReadTag', + /** Grants permission to read TaxCategory */ + ReadTaxCategory = 'ReadTaxCategory', + /** Grants permission to read TaxRate */ + ReadTaxRate = 'ReadTaxRate', + /** Grants permission to read Zone */ + ReadZone = 'ReadZone', + /** SuperAdmin has unrestricted access to all operations */ + SuperAdmin = 'SuperAdmin', + /** Grants permission to update Administrator */ + UpdateAdministrator = 'UpdateAdministrator', + /** Grants permission to update Asset */ + UpdateAsset = 'UpdateAsset', + /** Grants permission to update Products, Facets, Assets, Collections */ + UpdateCatalog = 'UpdateCatalog', + /** Grants permission to update Channel */ + UpdateChannel = 'UpdateChannel', + /** Grants permission to update Collection */ + UpdateCollection = 'UpdateCollection', + /** Grants permission to update Country */ + UpdateCountry = 'UpdateCountry', + /** Grants permission to update Customer */ + UpdateCustomer = 'UpdateCustomer', + /** Grants permission to update CustomerGroup */ + UpdateCustomerGroup = 'UpdateCustomerGroup', + /** Grants permission to update Facet */ + UpdateFacet = 'UpdateFacet', + /** Grants permission to update GlobalSettings */ + UpdateGlobalSettings = 'UpdateGlobalSettings', + /** Grants permission to update Order */ + UpdateOrder = 'UpdateOrder', + /** Grants permission to update PaymentMethod */ + UpdatePaymentMethod = 'UpdatePaymentMethod', + /** Grants permission to update Product */ + UpdateProduct = 'UpdateProduct', + /** Grants permission to update Promotion */ + UpdatePromotion = 'UpdatePromotion', + /** Grants permission to update Seller */ + UpdateSeller = 'UpdateSeller', + /** Grants permission to update PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings */ + UpdateSettings = 'UpdateSettings', + /** Grants permission to update ShippingMethod */ + UpdateShippingMethod = 'UpdateShippingMethod', + /** Grants permission to update System */ + UpdateSystem = 'UpdateSystem', + /** Grants permission to update Tag */ + UpdateTag = 'UpdateTag', + /** Grants permission to update TaxCategory */ + UpdateTaxCategory = 'UpdateTaxCategory', + /** Grants permission to update TaxRate */ + UpdateTaxRate = 'UpdateTaxRate', + /** Grants permission to update Zone */ + UpdateZone = 'UpdateZone', } export type PermissionDefinition = { - assignable: Scalars['Boolean']; - description: Scalars['String']; - name: Scalars['String']; + assignable: Scalars['Boolean']; + description: Scalars['String']; + name: Scalars['String']; }; export type PreviewCollectionVariantsInput = { - filters: Array; - inheritFilters: Scalars['Boolean']; - parentId?: InputMaybe; + filters: Array; + inheritFilters: Scalars['Boolean']; + parentId?: InputMaybe; }; /** The price range where the result has more than one price */ export type PriceRange = { - max: Scalars['Money']; - min: Scalars['Money']; + max: Scalars['Money']; + min: Scalars['Money']; }; export type Product = Node & { - assets: Array; - channels: Array; - collections: Array; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - description: Scalars['String']; - enabled: Scalars['Boolean']; - facetValues: Array; - featuredAsset?: Maybe; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - optionGroups: Array; - slug: Scalars['String']; - translations: Array; - updatedAt: Scalars['DateTime']; - /** Returns a paginated, sortable, filterable list of ProductVariants */ - variantList: ProductVariantList; - /** Returns all ProductVariants */ - variants: Array; + assets: Array; + channels: Array; + collections: Array; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + description: Scalars['String']; + enabled: Scalars['Boolean']; + facetValues: Array; + featuredAsset?: Maybe; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + optionGroups: Array; + slug: Scalars['String']; + translations: Array; + updatedAt: Scalars['DateTime']; + /** Returns a paginated, sortable, filterable list of ProductVariants */ + variantList: ProductVariantList; + /** Returns all ProductVariants */ + variants: Array; }; - export type ProductVariantListArgs = { - options?: InputMaybe; + options?: InputMaybe; }; export type ProductFilterParameter = { - createdAt?: InputMaybe; - description?: InputMaybe; - enabled?: InputMaybe; - id?: InputMaybe; - languageCode?: InputMaybe; - name?: InputMaybe; - slug?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + description?: InputMaybe; + enabled?: InputMaybe; + id?: InputMaybe; + languageCode?: InputMaybe; + name?: InputMaybe; + slug?: InputMaybe; + updatedAt?: InputMaybe; }; export type ProductList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type ProductListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type ProductOption = Node & { - code: Scalars['String']; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - group: ProductOptionGroup; - groupId: Scalars['ID']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - translations: Array; - updatedAt: Scalars['DateTime']; + code: Scalars['String']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + group: ProductOptionGroup; + groupId: Scalars['ID']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + translations: Array; + updatedAt: Scalars['DateTime']; }; export type ProductOptionGroup = Node & { - code: Scalars['String']; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - options: Array; - translations: Array; - updatedAt: Scalars['DateTime']; + code: Scalars['String']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + options: Array; + translations: Array; + updatedAt: Scalars['DateTime']; }; export type ProductOptionGroupTranslation = { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type ProductOptionGroupTranslationInput = { - customFields?: InputMaybe; - id?: InputMaybe; - languageCode: LanguageCode; - name?: InputMaybe; + customFields?: InputMaybe; + id?: InputMaybe; + languageCode: LanguageCode; + name?: InputMaybe; }; export type ProductOptionInUseError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; - optionGroupCode: Scalars['String']; - productVariantCount: Scalars['Int']; + errorCode: ErrorCode; + message: Scalars['String']; + optionGroupCode: Scalars['String']; + productVariantCount: Scalars['Int']; }; export type ProductOptionTranslation = { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type ProductOptionTranslationInput = { - customFields?: InputMaybe; - id?: InputMaybe; - languageCode: LanguageCode; - name?: InputMaybe; + customFields?: InputMaybe; + id?: InputMaybe; + languageCode: LanguageCode; + name?: InputMaybe; }; export type ProductSortParameter = { - createdAt?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - slug?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + description?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + slug?: InputMaybe; + updatedAt?: InputMaybe; }; export type ProductTranslation = { - createdAt: Scalars['DateTime']; - description: Scalars['String']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - slug: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + description: Scalars['String']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + slug: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type ProductTranslationInput = { - customFields?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - languageCode: LanguageCode; - name?: InputMaybe; - slug?: InputMaybe; + customFields?: InputMaybe; + description?: InputMaybe; + id?: InputMaybe; + languageCode: LanguageCode; + name?: InputMaybe; + slug?: InputMaybe; }; export type ProductVariant = Node & { - assets: Array; - channels: Array; - createdAt: Scalars['DateTime']; - currencyCode: CurrencyCode; - customFields?: Maybe; - enabled: Scalars['Boolean']; - facetValues: Array; - featuredAsset?: Maybe; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - options: Array; - outOfStockThreshold: Scalars['Int']; - price: Scalars['Money']; - priceWithTax: Scalars['Money']; - product: Product; - productId: Scalars['ID']; - sku: Scalars['String']; - /** @deprecated use stockLevels */ - stockAllocated: Scalars['Int']; - stockLevel: Scalars['String']; - stockLevels: Array; - stockMovements: StockMovementList; - /** @deprecated use stockLevels */ - stockOnHand: Scalars['Int']; - taxCategory: TaxCategory; - taxRateApplied: TaxRate; - trackInventory: GlobalFlag; - translations: Array; - updatedAt: Scalars['DateTime']; - useGlobalOutOfStockThreshold: Scalars['Boolean']; + assets: Array; + channels: Array; + createdAt: Scalars['DateTime']; + currencyCode: CurrencyCode; + customFields?: Maybe; + enabled: Scalars['Boolean']; + facetValues: Array; + featuredAsset?: Maybe; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + options: Array; + outOfStockThreshold: Scalars['Int']; + price: Scalars['Money']; + priceWithTax: Scalars['Money']; + product: Product; + productId: Scalars['ID']; + sku: Scalars['String']; + /** @deprecated use stockLevels */ + stockAllocated: Scalars['Int']; + stockLevel: Scalars['String']; + stockLevels: Array; + stockMovements: StockMovementList; + /** @deprecated use stockLevels */ + stockOnHand: Scalars['Int']; + taxCategory: TaxCategory; + taxRateApplied: TaxRate; + trackInventory: GlobalFlag; + translations: Array; + updatedAt: Scalars['DateTime']; + useGlobalOutOfStockThreshold: Scalars['Boolean']; }; - export type ProductVariantStockMovementsArgs = { - options?: InputMaybe; + options?: InputMaybe; }; export type ProductVariantFilterParameter = { - createdAt?: InputMaybe; - currencyCode?: InputMaybe; - enabled?: InputMaybe; - id?: InputMaybe; - languageCode?: InputMaybe; - name?: InputMaybe; - outOfStockThreshold?: InputMaybe; - price?: InputMaybe; - priceWithTax?: InputMaybe; - productId?: InputMaybe; - sku?: InputMaybe; - stockAllocated?: InputMaybe; - stockLevel?: InputMaybe; - stockOnHand?: InputMaybe; - trackInventory?: InputMaybe; - updatedAt?: InputMaybe; - useGlobalOutOfStockThreshold?: InputMaybe; + createdAt?: InputMaybe; + currencyCode?: InputMaybe; + enabled?: InputMaybe; + id?: InputMaybe; + languageCode?: InputMaybe; + name?: InputMaybe; + outOfStockThreshold?: InputMaybe; + price?: InputMaybe; + priceWithTax?: InputMaybe; + productId?: InputMaybe; + sku?: InputMaybe; + stockAllocated?: InputMaybe; + stockLevel?: InputMaybe; + stockOnHand?: InputMaybe; + trackInventory?: InputMaybe; + updatedAt?: InputMaybe; + useGlobalOutOfStockThreshold?: InputMaybe; }; export type ProductVariantList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type ProductVariantListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type ProductVariantSortParameter = { - createdAt?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - outOfStockThreshold?: InputMaybe; - price?: InputMaybe; - priceWithTax?: InputMaybe; - productId?: InputMaybe; - sku?: InputMaybe; - stockAllocated?: InputMaybe; - stockLevel?: InputMaybe; - stockOnHand?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + outOfStockThreshold?: InputMaybe; + price?: InputMaybe; + priceWithTax?: InputMaybe; + productId?: InputMaybe; + sku?: InputMaybe; + stockAllocated?: InputMaybe; + stockLevel?: InputMaybe; + stockOnHand?: InputMaybe; + updatedAt?: InputMaybe; }; export type ProductVariantTranslation = { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type ProductVariantTranslationInput = { - customFields?: InputMaybe; - id?: InputMaybe; - languageCode: LanguageCode; - name?: InputMaybe; + customFields?: InputMaybe; + id?: InputMaybe; + languageCode: LanguageCode; + name?: InputMaybe; }; export type Promotion = Node & { - actions: Array; - conditions: Array; - couponCode?: Maybe; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - description: Scalars['String']; - enabled: Scalars['Boolean']; - endsAt?: Maybe; - id: Scalars['ID']; - name: Scalars['String']; - perCustomerUsageLimit?: Maybe; - startsAt?: Maybe; - translations: Array; - updatedAt: Scalars['DateTime']; + actions: Array; + conditions: Array; + couponCode?: Maybe; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + description: Scalars['String']; + enabled: Scalars['Boolean']; + endsAt?: Maybe; + id: Scalars['ID']; + name: Scalars['String']; + perCustomerUsageLimit?: Maybe; + startsAt?: Maybe; + translations: Array; + updatedAt: Scalars['DateTime']; }; export type PromotionFilterParameter = { - couponCode?: InputMaybe; - createdAt?: InputMaybe; - description?: InputMaybe; - enabled?: InputMaybe; - endsAt?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - perCustomerUsageLimit?: InputMaybe; - startsAt?: InputMaybe; - updatedAt?: InputMaybe; + couponCode?: InputMaybe; + createdAt?: InputMaybe; + description?: InputMaybe; + enabled?: InputMaybe; + endsAt?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + perCustomerUsageLimit?: InputMaybe; + startsAt?: InputMaybe; + updatedAt?: InputMaybe; }; export type PromotionList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type PromotionListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type PromotionSortParameter = { - couponCode?: InputMaybe; - createdAt?: InputMaybe; - description?: InputMaybe; - endsAt?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - perCustomerUsageLimit?: InputMaybe; - startsAt?: InputMaybe; - updatedAt?: InputMaybe; + couponCode?: InputMaybe; + createdAt?: InputMaybe; + description?: InputMaybe; + endsAt?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + perCustomerUsageLimit?: InputMaybe; + startsAt?: InputMaybe; + updatedAt?: InputMaybe; }; export type PromotionTranslation = { - createdAt: Scalars['DateTime']; - description: Scalars['String']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + description: Scalars['String']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type PromotionTranslationInput = { - customFields?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - languageCode: LanguageCode; - name?: InputMaybe; + customFields?: InputMaybe; + description?: InputMaybe; + id?: InputMaybe; + languageCode: LanguageCode; + name?: InputMaybe; }; /** Returned if the specified quantity of an OrderLine is greater than the number of items in that line */ export type QuantityTooGreatError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; export type Query = { - activeAdministrator?: Maybe; - activeChannel: Channel; - administrator?: Maybe; - administrators: AdministratorList; - /** Get a single Asset by id */ - asset?: Maybe; - /** Get a list of Assets */ - assets: AssetList; - channel?: Maybe; - channels: Array; - /** Get a Collection either by id or slug. If neither id nor slug is specified, an error will result. */ - collection?: Maybe; - collectionFilters: Array; - collections: CollectionList; - countries: CountryList; - country?: Maybe; - customer?: Maybe; - customerGroup?: Maybe; - customerGroups: CustomerGroupList; - customers: CustomerList; - /** Returns a list of eligible shipping methods for the draft Order */ - eligibleShippingMethodsForDraftOrder: Array; - facet?: Maybe; - facetValues: FacetValueList; - facets: FacetList; - fulfillmentHandlers: Array; - globalSettings: GlobalSettings; - job?: Maybe; - jobBufferSize: Array; - jobQueues: Array; - jobs: JobList; - jobsById: Array; - me?: Maybe; - order?: Maybe; - orders: OrderList; - paymentMethod?: Maybe; - paymentMethodEligibilityCheckers: Array; - paymentMethodHandlers: Array; - paymentMethods: PaymentMethodList; - pendingSearchIndexUpdates: Scalars['Int']; - /** Used for real-time previews of the contents of a Collection */ - previewCollectionVariants: ProductVariantList; - /** Get a Product either by id or slug. If neither id nor slug is specified, an error will result. */ - product?: Maybe; - productOptionGroup?: Maybe; - productOptionGroups: Array; - /** Get a ProductVariant by id */ - productVariant?: Maybe; - /** List ProductVariants either all or for the specific product. */ - productVariants: ProductVariantList; - /** List Products */ - products: ProductList; - promotion?: Maybe; - promotionActions: Array; - promotionConditions: Array; - promotions: PromotionList; - role?: Maybe; - roles: RoleList; - search: SearchResponse; - seller?: Maybe; - sellers: SellerList; - shippingCalculators: Array; - shippingEligibilityCheckers: Array; - shippingMethod?: Maybe; - shippingMethods: ShippingMethodList; - stockLocation?: Maybe; - stockLocations: StockLocationList; - tag: Tag; - tags: TagList; - taxCategories: Array; - taxCategory?: Maybe; - taxRate?: Maybe; - taxRates: TaxRateList; - testEligibleShippingMethods: Array; - testShippingMethod: TestShippingMethodResult; - zone?: Maybe; - zones: Array; + activeAdministrator?: Maybe; + activeChannel: Channel; + administrator?: Maybe; + administrators: AdministratorList; + /** Get a single Asset by id */ + asset?: Maybe; + /** Get a list of Assets */ + assets: AssetList; + channel?: Maybe; + channels: Array; + /** Get a Collection either by id or slug. If neither id nor slug is specified, an error will result. */ + collection?: Maybe; + collectionFilters: Array; + collections: CollectionList; + countries: CountryList; + country?: Maybe; + customer?: Maybe; + customerGroup?: Maybe; + customerGroups: CustomerGroupList; + customers: CustomerList; + /** Returns a list of eligible shipping methods for the draft Order */ + eligibleShippingMethodsForDraftOrder: Array; + facet?: Maybe; + facetValues: FacetValueList; + facets: FacetList; + fulfillmentHandlers: Array; + globalSettings: GlobalSettings; + job?: Maybe; + jobBufferSize: Array; + jobQueues: Array; + jobs: JobList; + jobsById: Array; + me?: Maybe; + order?: Maybe; + orders: OrderList; + paymentMethod?: Maybe; + paymentMethodEligibilityCheckers: Array; + paymentMethodHandlers: Array; + paymentMethods: PaymentMethodList; + pendingSearchIndexUpdates: Scalars['Int']; + /** Used for real-time previews of the contents of a Collection */ + previewCollectionVariants: ProductVariantList; + /** Get a Product either by id or slug. If neither id nor slug is specified, an error will result. */ + product?: Maybe; + productOptionGroup?: Maybe; + productOptionGroups: Array; + /** Get a ProductVariant by id */ + productVariant?: Maybe; + /** List ProductVariants either all or for the specific product. */ + productVariants: ProductVariantList; + /** List Products */ + products: ProductList; + promotion?: Maybe; + promotionActions: Array; + promotionConditions: Array; + promotions: PromotionList; + role?: Maybe; + roles: RoleList; + search: SearchResponse; + seller?: Maybe; + sellers: SellerList; + shippingCalculators: Array; + shippingEligibilityCheckers: Array; + shippingMethod?: Maybe; + shippingMethods: ShippingMethodList; + stockLocation?: Maybe; + stockLocations: StockLocationList; + tag: Tag; + tags: TagList; + taxCategories: Array; + taxCategory?: Maybe; + taxRate?: Maybe; + taxRates: TaxRateList; + testEligibleShippingMethods: Array; + testShippingMethod: TestShippingMethodResult; + zone?: Maybe; + zones: Array; }; - export type QueryAdministratorArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QueryAdministratorsArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QueryAssetArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QueryAssetsArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QueryChannelArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QueryCollectionArgs = { - id?: InputMaybe; - slug?: InputMaybe; + id?: InputMaybe; + slug?: InputMaybe; }; - export type QueryCollectionsArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QueryCountriesArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QueryCountryArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QueryCustomerArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QueryCustomerGroupArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QueryCustomerGroupsArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QueryCustomersArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QueryEligibleShippingMethodsForDraftOrderArgs = { - orderId: Scalars['ID']; + orderId: Scalars['ID']; }; - export type QueryFacetArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QueryFacetValuesArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QueryFacetsArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QueryJobArgs = { - jobId: Scalars['ID']; + jobId: Scalars['ID']; }; - export type QueryJobBufferSizeArgs = { - bufferIds?: InputMaybe>; + bufferIds?: InputMaybe>; }; - export type QueryJobsArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QueryJobsByIdArgs = { - jobIds: Array; + jobIds: Array; }; - export type QueryOrderArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QueryOrdersArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QueryPaymentMethodArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QueryPaymentMethodsArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QueryPreviewCollectionVariantsArgs = { - input: PreviewCollectionVariantsInput; - options?: InputMaybe; + input: PreviewCollectionVariantsInput; + options?: InputMaybe; }; - export type QueryProductArgs = { - id?: InputMaybe; - slug?: InputMaybe; + id?: InputMaybe; + slug?: InputMaybe; }; - export type QueryProductOptionGroupArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QueryProductOptionGroupsArgs = { - filterTerm?: InputMaybe; + filterTerm?: InputMaybe; }; - export type QueryProductVariantArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QueryProductVariantsArgs = { - options?: InputMaybe; - productId?: InputMaybe; + options?: InputMaybe; + productId?: InputMaybe; }; - export type QueryProductsArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QueryPromotionArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QueryPromotionsArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QueryRoleArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QueryRolesArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QuerySearchArgs = { - input: SearchInput; + input: SearchInput; }; - export type QuerySellerArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QuerySellersArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QueryShippingMethodArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QueryShippingMethodsArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QueryStockLocationArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QueryStockLocationsArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QueryTagArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QueryTagsArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QueryTaxCategoryArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QueryTaxRateArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QueryTaxRatesArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QueryTestEligibleShippingMethodsArgs = { - input: TestEligibleShippingMethodsInput; + input: TestEligibleShippingMethodsInput; }; - export type QueryTestShippingMethodArgs = { - input: TestShippingMethodInput; + input: TestShippingMethodInput; }; - export type QueryZoneArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; export type Refund = Node & { - adjustment: Scalars['Money']; - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - items: Scalars['Money']; - lines: Array; - metadata?: Maybe; - method?: Maybe; - paymentId: Scalars['ID']; - reason?: Maybe; - shipping: Scalars['Money']; - state: Scalars['String']; - total: Scalars['Money']; - transactionId?: Maybe; - updatedAt: Scalars['DateTime']; + adjustment: Scalars['Money']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + items: Scalars['Money']; + lines: Array; + metadata?: Maybe; + method?: Maybe; + paymentId: Scalars['ID']; + reason?: Maybe; + shipping: Scalars['Money']; + state: Scalars['String']; + total: Scalars['Money']; + transactionId?: Maybe; + updatedAt: Scalars['DateTime']; }; export type RefundLine = { - orderLine: OrderLine; - orderLineId: Scalars['ID']; - quantity: Scalars['Int']; - refund: Refund; - refundId: Scalars['ID']; + orderLine: OrderLine; + orderLineId: Scalars['ID']; + quantity: Scalars['Int']; + refund: Refund; + refundId: Scalars['ID']; }; export type RefundOrderInput = { - adjustment: Scalars['Money']; - lines: Array; - paymentId: Scalars['ID']; - reason?: InputMaybe; - shipping: Scalars['Money']; -}; - -export type RefundOrderResult = AlreadyRefundedError | MultipleOrderError | NothingToRefundError | OrderStateTransitionError | PaymentOrderMismatchError | QuantityTooGreatError | Refund | RefundOrderStateError | RefundStateTransitionError; + adjustment: Scalars['Money']; + lines: Array; + paymentId: Scalars['ID']; + reason?: InputMaybe; + shipping: Scalars['Money']; +}; + +export type RefundOrderResult = + | AlreadyRefundedError + | MultipleOrderError + | NothingToRefundError + | OrderStateTransitionError + | PaymentOrderMismatchError + | QuantityTooGreatError + | Refund + | RefundOrderStateError + | RefundStateTransitionError; /** Returned if an attempting to refund an Order which is not in the expected state */ export type RefundOrderStateError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; - orderState: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; + orderState: Scalars['String']; }; /** @@ -4762,54 +4619,55 @@ export type RefundOrderStateError = ErrorResult & { * though the price has decreased as a result of the changes. */ export type RefundPaymentIdMissingError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** Returned when there is an error in transitioning the Refund state */ export type RefundStateTransitionError = ErrorResult & { - errorCode: ErrorCode; - fromState: Scalars['String']; - message: Scalars['String']; - toState: Scalars['String']; - transitionError: Scalars['String']; + errorCode: ErrorCode; + fromState: Scalars['String']; + message: Scalars['String']; + toState: Scalars['String']; + transitionError: Scalars['String']; }; export type RelationCustomFieldConfig = CustomField & { - description?: Maybe>; - entity: Scalars['String']; - internal?: Maybe; - label?: Maybe>; - list: Scalars['Boolean']; - name: Scalars['String']; - nullable?: Maybe; - readonly?: Maybe; - scalarFields: Array; - type: Scalars['String']; - ui?: Maybe; -}; - -export type Release = Node & StockMovement & { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - orderItem: OrderItem; - productVariant: ProductVariant; - quantity: Scalars['Int']; - type: StockMovementType; - updatedAt: Scalars['DateTime']; -}; + description?: Maybe>; + entity: Scalars['String']; + internal?: Maybe; + label?: Maybe>; + list: Scalars['Boolean']; + name: Scalars['String']; + nullable?: Maybe; + readonly?: Maybe; + scalarFields: Array; + type: Scalars['String']; + ui?: Maybe; +}; + +export type Release = Node & + StockMovement & { + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + orderItem: OrderItem; + productVariant: ProductVariant; + quantity: Scalars['Int']; + type: StockMovementType; + updatedAt: Scalars['DateTime']; + }; export type RemoveCollectionsFromChannelInput = { - channelId: Scalars['ID']; - collectionIds: Array; + channelId: Scalars['ID']; + collectionIds: Array; }; export type RemoveFacetFromChannelResult = Facet | FacetInUseError; export type RemoveFacetsFromChannelInput = { - channelId: Scalars['ID']; - facetIds: Array; - force?: InputMaybe; + channelId: Scalars['ID']; + facetIds: Array; + force?: InputMaybe; }; export type RemoveOptionGroupFromProductResult = Product | ProductOptionInUseError; @@ -4817,616 +4675,627 @@ export type RemoveOptionGroupFromProductResult = Product | ProductOptionInUseErr export type RemoveOrderItemsResult = Order | OrderModificationError; export type RemoveProductVariantsFromChannelInput = { - channelId: Scalars['ID']; - productVariantIds: Array; + channelId: Scalars['ID']; + productVariantIds: Array; }; export type RemoveProductsFromChannelInput = { - channelId: Scalars['ID']; - productIds: Array; + channelId: Scalars['ID']; + productIds: Array; }; export type RemovePromotionsFromChannelInput = { - channelId: Scalars['ID']; - promotionIds: Array; + channelId: Scalars['ID']; + promotionIds: Array; }; -export type Return = Node & StockMovement & { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - orderItem: OrderItem; - productVariant: ProductVariant; - quantity: Scalars['Int']; - type: StockMovementType; - updatedAt: Scalars['DateTime']; -}; +export type Return = Node & + StockMovement & { + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + orderItem: OrderItem; + productVariant: ProductVariant; + quantity: Scalars['Int']; + type: StockMovementType; + updatedAt: Scalars['DateTime']; + }; export type Role = Node & { - channels: Array; - code: Scalars['String']; - createdAt: Scalars['DateTime']; - description: Scalars['String']; - id: Scalars['ID']; - permissions: Array; - updatedAt: Scalars['DateTime']; + channels: Array; + code: Scalars['String']; + createdAt: Scalars['DateTime']; + description: Scalars['String']; + id: Scalars['ID']; + permissions: Array; + updatedAt: Scalars['DateTime']; }; export type RoleFilterParameter = { - code?: InputMaybe; - createdAt?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - updatedAt?: InputMaybe; + code?: InputMaybe; + createdAt?: InputMaybe; + description?: InputMaybe; + id?: InputMaybe; + updatedAt?: InputMaybe; }; export type RoleList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type RoleListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type RoleSortParameter = { - code?: InputMaybe; - createdAt?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - updatedAt?: InputMaybe; -}; - -export type Sale = Node & StockMovement & { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - orderItem: OrderItem; - productVariant: ProductVariant; - quantity: Scalars['Int']; - type: StockMovementType; - updatedAt: Scalars['DateTime']; -}; + code?: InputMaybe; + createdAt?: InputMaybe; + description?: InputMaybe; + id?: InputMaybe; + updatedAt?: InputMaybe; +}; + +export type Sale = Node & + StockMovement & { + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + orderItem: OrderItem; + productVariant: ProductVariant; + quantity: Scalars['Int']; + type: StockMovementType; + updatedAt: Scalars['DateTime']; + }; export type SearchInput = { - collectionId?: InputMaybe; - collectionSlug?: InputMaybe; - facetValueFilters?: InputMaybe>; - facetValueIds?: InputMaybe>; - facetValueOperator?: InputMaybe; - groupByProduct?: InputMaybe; - skip?: InputMaybe; - sort?: InputMaybe; - take?: InputMaybe; - term?: InputMaybe; + collectionId?: InputMaybe; + collectionSlug?: InputMaybe; + facetValueFilters?: InputMaybe>; + facetValueIds?: InputMaybe>; + facetValueOperator?: InputMaybe; + groupByProduct?: InputMaybe; + skip?: InputMaybe; + sort?: InputMaybe; + take?: InputMaybe; + term?: InputMaybe; }; export type SearchReindexResponse = { - success: Scalars['Boolean']; + success: Scalars['Boolean']; }; export type SearchResponse = { - collections: Array; - facetValues: Array; - items: Array; - totalItems: Scalars['Int']; + collections: Array; + facetValues: Array; + items: Array; + totalItems: Scalars['Int']; }; export type SearchResult = { - /** An array of ids of the Channels in which this result appears */ - channelIds: Array; - /** An array of ids of the Collections in which this result appears */ - collectionIds: Array; - currencyCode: CurrencyCode; - description: Scalars['String']; - enabled: Scalars['Boolean']; - facetIds: Array; - facetValueIds: Array; - price: SearchResultPrice; - priceWithTax: SearchResultPrice; - productAsset?: Maybe; - productId: Scalars['ID']; - productName: Scalars['String']; - productVariantAsset?: Maybe; - productVariantId: Scalars['ID']; - productVariantName: Scalars['String']; - /** A relevance score for the result. Differs between database implementations */ - score: Scalars['Float']; - sku: Scalars['String']; - slug: Scalars['String']; + /** An array of ids of the Channels in which this result appears */ + channelIds: Array; + /** An array of ids of the Collections in which this result appears */ + collectionIds: Array; + currencyCode: CurrencyCode; + description: Scalars['String']; + enabled: Scalars['Boolean']; + facetIds: Array; + facetValueIds: Array; + price: SearchResultPrice; + priceWithTax: SearchResultPrice; + productAsset?: Maybe; + productId: Scalars['ID']; + productName: Scalars['String']; + productVariantAsset?: Maybe; + productVariantId: Scalars['ID']; + productVariantName: Scalars['String']; + /** A relevance score for the result. Differs between database implementations */ + score: Scalars['Float']; + sku: Scalars['String']; + slug: Scalars['String']; }; export type SearchResultAsset = { - focalPoint?: Maybe; - id: Scalars['ID']; - preview: Scalars['String']; + focalPoint?: Maybe; + id: Scalars['ID']; + preview: Scalars['String']; }; /** The price of a search result product, either as a range or as a single price */ export type SearchResultPrice = PriceRange | SinglePrice; export type SearchResultSortParameter = { - name?: InputMaybe; - price?: InputMaybe; + name?: InputMaybe; + price?: InputMaybe; }; export type Seller = Node & { - createdAt: Scalars['DateTime']; - customFields?: Maybe; - id: Scalars['ID']; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + id: Scalars['ID']; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type SellerFilterParameter = { - createdAt?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + updatedAt?: InputMaybe; }; export type SellerList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type SellerListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type SellerSortParameter = { - createdAt?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + updatedAt?: InputMaybe; }; export type ServerConfig = { - customFieldConfig: CustomFields; - orderProcess: Array; - permissions: Array; - permittedAssetTypes: Array; + customFieldConfig: CustomFields; + orderProcess: Array; + permissions: Array; + permittedAssetTypes: Array; }; export type SetCustomerForDraftOrderResult = EmailAddressConflictError | Order; -export type SetOrderShippingMethodResult = IneligibleShippingMethodError | NoActiveOrderError | Order | OrderModificationError; +export type SetOrderShippingMethodResult = + | IneligibleShippingMethodError + | NoActiveOrderError + | Order + | OrderModificationError; /** Returned if the Payment settlement fails */ export type SettlePaymentError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; - paymentErrorMessage: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; + paymentErrorMessage: Scalars['String']; }; -export type SettlePaymentResult = OrderStateTransitionError | Payment | PaymentStateTransitionError | SettlePaymentError; +export type SettlePaymentResult = + | OrderStateTransitionError + | Payment + | PaymentStateTransitionError + | SettlePaymentError; export type SettleRefundInput = { - id: Scalars['ID']; - transactionId: Scalars['String']; + id: Scalars['ID']; + transactionId: Scalars['String']; }; export type SettleRefundResult = Refund | RefundStateTransitionError; export type ShippingLine = { - discountedPrice: Scalars['Money']; - discountedPriceWithTax: Scalars['Money']; - discounts: Array; - id: Scalars['ID']; - price: Scalars['Money']; - priceWithTax: Scalars['Money']; - shippingMethod: ShippingMethod; + discountedPrice: Scalars['Money']; + discountedPriceWithTax: Scalars['Money']; + discounts: Array; + id: Scalars['ID']; + price: Scalars['Money']; + priceWithTax: Scalars['Money']; + shippingMethod: ShippingMethod; }; export type ShippingMethod = Node & { - calculator: ConfigurableOperation; - checker: ConfigurableOperation; - code: Scalars['String']; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - description: Scalars['String']; - fulfillmentHandlerCode: Scalars['String']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - translations: Array; - updatedAt: Scalars['DateTime']; + calculator: ConfigurableOperation; + checker: ConfigurableOperation; + code: Scalars['String']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + description: Scalars['String']; + fulfillmentHandlerCode: Scalars['String']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + translations: Array; + updatedAt: Scalars['DateTime']; }; export type ShippingMethodFilterParameter = { - code?: InputMaybe; - createdAt?: InputMaybe; - description?: InputMaybe; - fulfillmentHandlerCode?: InputMaybe; - id?: InputMaybe; - languageCode?: InputMaybe; - name?: InputMaybe; - updatedAt?: InputMaybe; + code?: InputMaybe; + createdAt?: InputMaybe; + description?: InputMaybe; + fulfillmentHandlerCode?: InputMaybe; + id?: InputMaybe; + languageCode?: InputMaybe; + name?: InputMaybe; + updatedAt?: InputMaybe; }; export type ShippingMethodList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type ShippingMethodListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type ShippingMethodQuote = { - code: Scalars['String']; - customFields?: Maybe; - description: Scalars['String']; - id: Scalars['ID']; - /** Any optional metadata returned by the ShippingCalculator in the ShippingCalculationResult */ - metadata?: Maybe; - name: Scalars['String']; - price: Scalars['Money']; - priceWithTax: Scalars['Money']; + code: Scalars['String']; + customFields?: Maybe; + description: Scalars['String']; + id: Scalars['ID']; + /** Any optional metadata returned by the ShippingCalculator in the ShippingCalculationResult */ + metadata?: Maybe; + name: Scalars['String']; + price: Scalars['Money']; + priceWithTax: Scalars['Money']; }; export type ShippingMethodSortParameter = { - code?: InputMaybe; - createdAt?: InputMaybe; - description?: InputMaybe; - fulfillmentHandlerCode?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - updatedAt?: InputMaybe; + code?: InputMaybe; + createdAt?: InputMaybe; + description?: InputMaybe; + fulfillmentHandlerCode?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + updatedAt?: InputMaybe; }; export type ShippingMethodTranslation = { - createdAt: Scalars['DateTime']; - description: Scalars['String']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + description: Scalars['String']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type ShippingMethodTranslationInput = { - customFields?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - languageCode: LanguageCode; - name?: InputMaybe; + customFields?: InputMaybe; + description?: InputMaybe; + id?: InputMaybe; + languageCode: LanguageCode; + name?: InputMaybe; }; /** The price value where the result has a single price */ export type SinglePrice = { - value: Scalars['Money']; + value: Scalars['Money']; }; export enum SortOrder { - ASC = 'ASC', - DESC = 'DESC' + ASC = 'ASC', + DESC = 'DESC', } -export type StockAdjustment = Node & StockMovement & { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - productVariant: ProductVariant; - quantity: Scalars['Int']; - type: StockMovementType; - updatedAt: Scalars['DateTime']; -}; +export type StockAdjustment = Node & + StockMovement & { + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + productVariant: ProductVariant; + quantity: Scalars['Int']; + type: StockMovementType; + updatedAt: Scalars['DateTime']; + }; export type StockLevel = Node & { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - stockAllocated: Scalars['Int']; - stockLocation: StockLocation; - stockLocationId: Scalars['ID']; - stockOnHand: Scalars['Int']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + stockAllocated: Scalars['Int']; + stockLocation: StockLocation; + stockLocationId: Scalars['ID']; + stockOnHand: Scalars['Int']; + updatedAt: Scalars['DateTime']; }; export type StockLevelInput = { - stockLocationId: Scalars['ID']; - stockOnHand: Scalars['Int']; + stockLocationId: Scalars['ID']; + stockOnHand: Scalars['Int']; }; export type StockLocation = Node & { - createdAt: Scalars['DateTime']; - customFields?: Maybe; - description: Scalars['String']; - id: Scalars['ID']; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + description: Scalars['String']; + id: Scalars['ID']; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type StockLocationFilterParameter = { - createdAt?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + description?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + updatedAt?: InputMaybe; }; export type StockLocationList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type StockLocationListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type StockLocationSortParameter = { - createdAt?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + description?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + updatedAt?: InputMaybe; }; export type StockMovement = { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - productVariant: ProductVariant; - quantity: Scalars['Int']; - type: StockMovementType; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + productVariant: ProductVariant; + quantity: Scalars['Int']; + type: StockMovementType; + updatedAt: Scalars['DateTime']; }; export type StockMovementItem = Allocation | Cancellation | Release | Return | Sale | StockAdjustment; export type StockMovementList = { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type StockMovementListOptions = { - skip?: InputMaybe; - take?: InputMaybe; - type?: InputMaybe; + skip?: InputMaybe; + take?: InputMaybe; + type?: InputMaybe; }; export enum StockMovementType { - ADJUSTMENT = 'ADJUSTMENT', - ALLOCATION = 'ALLOCATION', - CANCELLATION = 'CANCELLATION', - RELEASE = 'RELEASE', - RETURN = 'RETURN', - SALE = 'SALE' + ADJUSTMENT = 'ADJUSTMENT', + ALLOCATION = 'ALLOCATION', + CANCELLATION = 'CANCELLATION', + RELEASE = 'RELEASE', + RETURN = 'RETURN', + SALE = 'SALE', } export type StringCustomFieldConfig = CustomField & { - description?: Maybe>; - internal?: Maybe; - label?: Maybe>; - length?: Maybe; - list: Scalars['Boolean']; - name: Scalars['String']; - nullable?: Maybe; - options?: Maybe>; - pattern?: Maybe; - readonly?: Maybe; - type: Scalars['String']; - ui?: Maybe; + description?: Maybe>; + internal?: Maybe; + label?: Maybe>; + length?: Maybe; + list: Scalars['Boolean']; + name: Scalars['String']; + nullable?: Maybe; + options?: Maybe>; + pattern?: Maybe; + readonly?: Maybe; + type: Scalars['String']; + ui?: Maybe; }; export type StringFieldOption = { - label?: Maybe>; - value: Scalars['String']; + label?: Maybe>; + value: Scalars['String']; }; /** Operators for filtering on a list of String fields */ export type StringListOperators = { - inList: Scalars['String']; + inList: Scalars['String']; }; /** Operators for filtering on a String field */ export type StringOperators = { - contains?: InputMaybe; - eq?: InputMaybe; - in?: InputMaybe>; - isNull?: InputMaybe; - notContains?: InputMaybe; - notEq?: InputMaybe; - notIn?: InputMaybe>; - regex?: InputMaybe; + contains?: InputMaybe; + eq?: InputMaybe; + in?: InputMaybe>; + isNull?: InputMaybe; + notContains?: InputMaybe; + notEq?: InputMaybe; + notIn?: InputMaybe>; + regex?: InputMaybe; }; /** Indicates that an operation succeeded, where we do not want to return any more specific information. */ export type Success = { - success: Scalars['Boolean']; + success: Scalars['Boolean']; }; export type Surcharge = Node & { - createdAt: Scalars['DateTime']; - description: Scalars['String']; - id: Scalars['ID']; - price: Scalars['Money']; - priceWithTax: Scalars['Money']; - sku?: Maybe; - taxLines: Array; - taxRate: Scalars['Float']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + description: Scalars['String']; + id: Scalars['ID']; + price: Scalars['Money']; + priceWithTax: Scalars['Money']; + sku?: Maybe; + taxLines: Array; + taxRate: Scalars['Float']; + updatedAt: Scalars['DateTime']; }; export type SurchargeInput = { - description: Scalars['String']; - price: Scalars['Money']; - priceIncludesTax: Scalars['Boolean']; - sku?: InputMaybe; - taxDescription?: InputMaybe; - taxRate?: InputMaybe; + description: Scalars['String']; + price: Scalars['Money']; + priceIncludesTax: Scalars['Boolean']; + sku?: InputMaybe; + taxDescription?: InputMaybe; + taxRate?: InputMaybe; }; export type Tag = Node & { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - updatedAt: Scalars['DateTime']; - value: Scalars['String']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + updatedAt: Scalars['DateTime']; + value: Scalars['String']; }; export type TagFilterParameter = { - createdAt?: InputMaybe; - id?: InputMaybe; - updatedAt?: InputMaybe; - value?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + updatedAt?: InputMaybe; + value?: InputMaybe; }; export type TagList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type TagListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type TagSortParameter = { - createdAt?: InputMaybe; - id?: InputMaybe; - updatedAt?: InputMaybe; - value?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + updatedAt?: InputMaybe; + value?: InputMaybe; }; export type TaxCategory = Node & { - createdAt: Scalars['DateTime']; - customFields?: Maybe; - id: Scalars['ID']; - isDefault: Scalars['Boolean']; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + id: Scalars['ID']; + isDefault: Scalars['Boolean']; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type TaxLine = { - description: Scalars['String']; - taxRate: Scalars['Float']; + description: Scalars['String']; + taxRate: Scalars['Float']; }; export type TaxRate = Node & { - category: TaxCategory; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - customerGroup?: Maybe; - enabled: Scalars['Boolean']; - id: Scalars['ID']; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; - value: Scalars['Float']; - zone: Zone; + category: TaxCategory; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + customerGroup?: Maybe; + enabled: Scalars['Boolean']; + id: Scalars['ID']; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; + value: Scalars['Float']; + zone: Zone; }; export type TaxRateFilterParameter = { - createdAt?: InputMaybe; - enabled?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - updatedAt?: InputMaybe; - value?: InputMaybe; + createdAt?: InputMaybe; + enabled?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + updatedAt?: InputMaybe; + value?: InputMaybe; }; export type TaxRateList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type TaxRateListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type TaxRateSortParameter = { - createdAt?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - updatedAt?: InputMaybe; - value?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + updatedAt?: InputMaybe; + value?: InputMaybe; }; export type TestEligibleShippingMethodsInput = { - lines: Array; - shippingAddress: CreateAddressInput; + lines: Array; + shippingAddress: CreateAddressInput; }; export type TestShippingMethodInput = { - calculator: ConfigurableOperationInput; - checker: ConfigurableOperationInput; - lines: Array; - shippingAddress: CreateAddressInput; + calculator: ConfigurableOperationInput; + checker: ConfigurableOperationInput; + lines: Array; + shippingAddress: CreateAddressInput; }; export type TestShippingMethodOrderLineInput = { - productVariantId: Scalars['ID']; - quantity: Scalars['Int']; + productVariantId: Scalars['ID']; + quantity: Scalars['Int']; }; export type TestShippingMethodQuote = { - metadata?: Maybe; - price: Scalars['Money']; - priceWithTax: Scalars['Money']; + metadata?: Maybe; + price: Scalars['Money']; + priceWithTax: Scalars['Money']; }; export type TestShippingMethodResult = { - eligible: Scalars['Boolean']; - quote?: Maybe; + eligible: Scalars['Boolean']; + quote?: Maybe; }; export type TextCustomFieldConfig = CustomField & { - description?: Maybe>; - internal?: Maybe; - label?: Maybe>; - list: Scalars['Boolean']; - name: Scalars['String']; - nullable?: Maybe; - readonly?: Maybe; - type: Scalars['String']; - ui?: Maybe; + description?: Maybe>; + internal?: Maybe; + label?: Maybe>; + list: Scalars['Boolean']; + name: Scalars['String']; + nullable?: Maybe; + readonly?: Maybe; + type: Scalars['String']; + ui?: Maybe; }; export type TransitionFulfillmentToStateResult = Fulfillment | FulfillmentStateTransitionError; @@ -5436,2110 +5305,5890 @@ export type TransitionOrderToStateResult = Order | OrderStateTransitionError; export type TransitionPaymentToStateResult = Payment | PaymentStateTransitionError; export type UpdateActiveAdministratorInput = { - customFields?: InputMaybe; - emailAddress?: InputMaybe; - firstName?: InputMaybe; - lastName?: InputMaybe; - password?: InputMaybe; + customFields?: InputMaybe; + emailAddress?: InputMaybe; + firstName?: InputMaybe; + lastName?: InputMaybe; + password?: InputMaybe; }; export type UpdateAddressInput = { - city?: InputMaybe; - company?: InputMaybe; - countryCode?: InputMaybe; - customFields?: InputMaybe; - defaultBillingAddress?: InputMaybe; - defaultShippingAddress?: InputMaybe; - fullName?: InputMaybe; - id: Scalars['ID']; - phoneNumber?: InputMaybe; - postalCode?: InputMaybe; - province?: InputMaybe; - streetLine1?: InputMaybe; - streetLine2?: InputMaybe; + city?: InputMaybe; + company?: InputMaybe; + countryCode?: InputMaybe; + customFields?: InputMaybe; + defaultBillingAddress?: InputMaybe; + defaultShippingAddress?: InputMaybe; + fullName?: InputMaybe; + id: Scalars['ID']; + phoneNumber?: InputMaybe; + postalCode?: InputMaybe; + province?: InputMaybe; + streetLine1?: InputMaybe; + streetLine2?: InputMaybe; }; export type UpdateAdministratorInput = { - customFields?: InputMaybe; - emailAddress?: InputMaybe; - firstName?: InputMaybe; - id: Scalars['ID']; - lastName?: InputMaybe; - password?: InputMaybe; - roleIds?: InputMaybe>; + customFields?: InputMaybe; + emailAddress?: InputMaybe; + firstName?: InputMaybe; + id: Scalars['ID']; + lastName?: InputMaybe; + password?: InputMaybe; + roleIds?: InputMaybe>; }; export type UpdateAssetInput = { - customFields?: InputMaybe; - focalPoint?: InputMaybe; - id: Scalars['ID']; - name?: InputMaybe; - tags?: InputMaybe>; + customFields?: InputMaybe; + focalPoint?: InputMaybe; + id: Scalars['ID']; + name?: InputMaybe; + tags?: InputMaybe>; }; export type UpdateChannelInput = { - code?: InputMaybe; - currencyCode?: InputMaybe; - customFields?: InputMaybe; - defaultLanguageCode?: InputMaybe; - defaultShippingZoneId?: InputMaybe; - defaultTaxZoneId?: InputMaybe; - id: Scalars['ID']; - pricesIncludeTax?: InputMaybe; - sellerId?: InputMaybe; - token?: InputMaybe; + code?: InputMaybe; + currencyCode?: InputMaybe; + customFields?: InputMaybe; + defaultLanguageCode?: InputMaybe; + defaultShippingZoneId?: InputMaybe; + defaultTaxZoneId?: InputMaybe; + id: Scalars['ID']; + pricesIncludeTax?: InputMaybe; + sellerId?: InputMaybe; + token?: InputMaybe; }; export type UpdateChannelResult = Channel | LanguageNotAvailableError; export type UpdateCollectionInput = { - assetIds?: InputMaybe>; - customFields?: InputMaybe; - featuredAssetId?: InputMaybe; - filters?: InputMaybe>; - id: Scalars['ID']; - inheritFilters?: InputMaybe; - isPrivate?: InputMaybe; - parentId?: InputMaybe; - translations?: InputMaybe>; + assetIds?: InputMaybe>; + customFields?: InputMaybe; + featuredAssetId?: InputMaybe; + filters?: InputMaybe>; + id: Scalars['ID']; + inheritFilters?: InputMaybe; + isPrivate?: InputMaybe; + parentId?: InputMaybe; + translations?: InputMaybe>; }; export type UpdateCollectionTranslationInput = { - customFields?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - languageCode: LanguageCode; - name?: InputMaybe; - slug?: InputMaybe; + customFields?: InputMaybe; + description?: InputMaybe; + id?: InputMaybe; + languageCode: LanguageCode; + name?: InputMaybe; + slug?: InputMaybe; }; export type UpdateCountryInput = { - code?: InputMaybe; - customFields?: InputMaybe; - enabled?: InputMaybe; - id: Scalars['ID']; - translations?: InputMaybe>; + code?: InputMaybe; + customFields?: InputMaybe; + enabled?: InputMaybe; + id: Scalars['ID']; + translations?: InputMaybe>; }; export type UpdateCustomerGroupInput = { - customFields?: InputMaybe; - id: Scalars['ID']; - name?: InputMaybe; + customFields?: InputMaybe; + id: Scalars['ID']; + name?: InputMaybe; }; export type UpdateCustomerInput = { - customFields?: InputMaybe; - emailAddress?: InputMaybe; - firstName?: InputMaybe; - id: Scalars['ID']; - lastName?: InputMaybe; - phoneNumber?: InputMaybe; - title?: InputMaybe; + customFields?: InputMaybe; + emailAddress?: InputMaybe; + firstName?: InputMaybe; + id: Scalars['ID']; + lastName?: InputMaybe; + phoneNumber?: InputMaybe; + title?: InputMaybe; }; export type UpdateCustomerNoteInput = { - note: Scalars['String']; - noteId: Scalars['ID']; + note: Scalars['String']; + noteId: Scalars['ID']; }; export type UpdateCustomerResult = Customer | EmailAddressConflictError; export type UpdateFacetInput = { - code?: InputMaybe; - customFields?: InputMaybe; - id: Scalars['ID']; - isPrivate?: InputMaybe; - translations?: InputMaybe>; + code?: InputMaybe; + customFields?: InputMaybe; + id: Scalars['ID']; + isPrivate?: InputMaybe; + translations?: InputMaybe>; }; export type UpdateFacetValueInput = { - code?: InputMaybe; - customFields?: InputMaybe; - id: Scalars['ID']; - translations?: InputMaybe>; + code?: InputMaybe; + customFields?: InputMaybe; + id: Scalars['ID']; + translations?: InputMaybe>; }; export type UpdateGlobalSettingsInput = { - availableLanguages?: InputMaybe>; - customFields?: InputMaybe; - outOfStockThreshold?: InputMaybe; - trackInventory?: InputMaybe; + availableLanguages?: InputMaybe>; + customFields?: InputMaybe; + outOfStockThreshold?: InputMaybe; + trackInventory?: InputMaybe; }; export type UpdateGlobalSettingsResult = ChannelDefaultLanguageError | GlobalSettings; export type UpdateOrderAddressInput = { - city?: InputMaybe; - company?: InputMaybe; - countryCode?: InputMaybe; - fullName?: InputMaybe; - phoneNumber?: InputMaybe; - postalCode?: InputMaybe; - province?: InputMaybe; - streetLine1?: InputMaybe; - streetLine2?: InputMaybe; + city?: InputMaybe; + company?: InputMaybe; + countryCode?: InputMaybe; + fullName?: InputMaybe; + phoneNumber?: InputMaybe; + postalCode?: InputMaybe; + province?: InputMaybe; + streetLine1?: InputMaybe; + streetLine2?: InputMaybe; }; export type UpdateOrderInput = { - customFields?: InputMaybe; - id: Scalars['ID']; + customFields?: InputMaybe; + id: Scalars['ID']; }; -export type UpdateOrderItemsResult = InsufficientStockError | NegativeQuantityError | Order | OrderLimitError | OrderModificationError; +export type UpdateOrderItemsResult = + | InsufficientStockError + | NegativeQuantityError + | Order + | OrderLimitError + | OrderModificationError; export type UpdateOrderNoteInput = { - isPublic?: InputMaybe; - note?: InputMaybe; - noteId: Scalars['ID']; + isPublic?: InputMaybe; + note?: InputMaybe; + noteId: Scalars['ID']; }; export type UpdatePaymentMethodInput = { - checker?: InputMaybe; - code?: InputMaybe; - customFields?: InputMaybe; - enabled?: InputMaybe; - handler?: InputMaybe; - id: Scalars['ID']; - translations?: InputMaybe>; + checker?: InputMaybe; + code?: InputMaybe; + customFields?: InputMaybe; + enabled?: InputMaybe; + handler?: InputMaybe; + id: Scalars['ID']; + translations?: InputMaybe>; }; export type UpdateProductInput = { - assetIds?: InputMaybe>; - customFields?: InputMaybe; - enabled?: InputMaybe; - facetValueIds?: InputMaybe>; - featuredAssetId?: InputMaybe; - id: Scalars['ID']; - translations?: InputMaybe>; + assetIds?: InputMaybe>; + customFields?: InputMaybe; + enabled?: InputMaybe; + facetValueIds?: InputMaybe>; + featuredAssetId?: InputMaybe; + id: Scalars['ID']; + translations?: InputMaybe>; }; export type UpdateProductOptionGroupInput = { - code?: InputMaybe; - customFields?: InputMaybe; - id: Scalars['ID']; - translations?: InputMaybe>; + code?: InputMaybe; + customFields?: InputMaybe; + id: Scalars['ID']; + translations?: InputMaybe>; }; export type UpdateProductOptionInput = { - code?: InputMaybe; - customFields?: InputMaybe; - id: Scalars['ID']; - translations?: InputMaybe>; + code?: InputMaybe; + customFields?: InputMaybe; + id: Scalars['ID']; + translations?: InputMaybe>; }; export type UpdateProductVariantInput = { - assetIds?: InputMaybe>; - customFields?: InputMaybe; - enabled?: InputMaybe; - facetValueIds?: InputMaybe>; - featuredAssetId?: InputMaybe; - id: Scalars['ID']; - outOfStockThreshold?: InputMaybe; - price?: InputMaybe; - sku?: InputMaybe; - stockLevels?: InputMaybe>; - stockOnHand?: InputMaybe; - taxCategoryId?: InputMaybe; - trackInventory?: InputMaybe; - translations?: InputMaybe>; - useGlobalOutOfStockThreshold?: InputMaybe; + assetIds?: InputMaybe>; + customFields?: InputMaybe; + enabled?: InputMaybe; + facetValueIds?: InputMaybe>; + featuredAssetId?: InputMaybe; + id: Scalars['ID']; + outOfStockThreshold?: InputMaybe; + price?: InputMaybe; + sku?: InputMaybe; + stockLevels?: InputMaybe>; + stockOnHand?: InputMaybe; + taxCategoryId?: InputMaybe; + trackInventory?: InputMaybe; + translations?: InputMaybe>; + useGlobalOutOfStockThreshold?: InputMaybe; }; export type UpdatePromotionInput = { - actions?: InputMaybe>; - conditions?: InputMaybe>; - couponCode?: InputMaybe; - customFields?: InputMaybe; - enabled?: InputMaybe; - endsAt?: InputMaybe; - id: Scalars['ID']; - perCustomerUsageLimit?: InputMaybe; - startsAt?: InputMaybe; - translations?: InputMaybe>; + actions?: InputMaybe>; + conditions?: InputMaybe>; + couponCode?: InputMaybe; + customFields?: InputMaybe; + enabled?: InputMaybe; + endsAt?: InputMaybe; + id: Scalars['ID']; + perCustomerUsageLimit?: InputMaybe; + startsAt?: InputMaybe; + translations?: InputMaybe>; }; export type UpdatePromotionResult = MissingConditionsError | Promotion; export type UpdateRoleInput = { - channelIds?: InputMaybe>; - code?: InputMaybe; - description?: InputMaybe; - id: Scalars['ID']; - permissions?: InputMaybe>; + channelIds?: InputMaybe>; + code?: InputMaybe; + description?: InputMaybe; + id: Scalars['ID']; + permissions?: InputMaybe>; }; export type UpdateSellerInput = { - customFields?: InputMaybe; - id: Scalars['ID']; - name?: InputMaybe; + customFields?: InputMaybe; + id: Scalars['ID']; + name?: InputMaybe; }; export type UpdateShippingMethodInput = { - calculator?: InputMaybe; - checker?: InputMaybe; - code?: InputMaybe; - customFields?: InputMaybe; - fulfillmentHandler?: InputMaybe; - id: Scalars['ID']; - translations: Array; + calculator?: InputMaybe; + checker?: InputMaybe; + code?: InputMaybe; + customFields?: InputMaybe; + fulfillmentHandler?: InputMaybe; + id: Scalars['ID']; + translations: Array; }; export type UpdateStockLocationInput = { - customFields?: InputMaybe; - description?: InputMaybe; - id: Scalars['ID']; - name?: InputMaybe; + customFields?: InputMaybe; + description?: InputMaybe; + id: Scalars['ID']; + name?: InputMaybe; }; export type UpdateTagInput = { - id: Scalars['ID']; - value?: InputMaybe; + id: Scalars['ID']; + value?: InputMaybe; }; export type UpdateTaxCategoryInput = { - customFields?: InputMaybe; - id: Scalars['ID']; - isDefault?: InputMaybe; - name?: InputMaybe; + customFields?: InputMaybe; + id: Scalars['ID']; + isDefault?: InputMaybe; + name?: InputMaybe; }; export type UpdateTaxRateInput = { - categoryId?: InputMaybe; - customFields?: InputMaybe; - customerGroupId?: InputMaybe; - enabled?: InputMaybe; - id: Scalars['ID']; - name?: InputMaybe; - value?: InputMaybe; - zoneId?: InputMaybe; + categoryId?: InputMaybe; + customFields?: InputMaybe; + customerGroupId?: InputMaybe; + enabled?: InputMaybe; + id: Scalars['ID']; + name?: InputMaybe; + value?: InputMaybe; + zoneId?: InputMaybe; }; export type UpdateZoneInput = { - customFields?: InputMaybe; - id: Scalars['ID']; - name?: InputMaybe; + customFields?: InputMaybe; + id: Scalars['ID']; + name?: InputMaybe; }; export type User = Node & { - authenticationMethods: Array; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - id: Scalars['ID']; - identifier: Scalars['String']; - lastLogin?: Maybe; - roles: Array; - updatedAt: Scalars['DateTime']; - verified: Scalars['Boolean']; + authenticationMethods: Array; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + id: Scalars['ID']; + identifier: Scalars['String']; + lastLogin?: Maybe; + roles: Array; + updatedAt: Scalars['DateTime']; + verified: Scalars['Boolean']; }; export type Zone = Node & { - createdAt: Scalars['DateTime']; - customFields?: Maybe; - id: Scalars['ID']; - members: Array; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + id: Scalars['ID']; + members: Array; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type GetAdministratorsQueryVariables = Exact<{ - options?: InputMaybe; -}>; - - -export type GetAdministratorsQuery = { administrators: { totalItems: number, items: Array<{ id: string, firstName: string, lastName: string, emailAddress: string, user: { id: string, identifier: string, lastLogin?: any | null, roles: Array<{ id: string, code: string, description: string, permissions: Array }> } }> } }; + options?: InputMaybe; +}>; + +export type GetAdministratorsQuery = { + administrators: { + totalItems: number; + items: Array<{ + id: string; + firstName: string; + lastName: string; + emailAddress: string; + user: { + id: string; + identifier: string; + lastLogin?: any | null; + roles: Array<{ + id: string; + code: string; + description: string; + permissions: Array; + }>; + }; + }>; + }; +}; export type GetAdministratorQueryVariables = Exact<{ - id: Scalars['ID']; -}>; - - -export type GetAdministratorQuery = { administrator?: { id: string, firstName: string, lastName: string, emailAddress: string, user: { id: string, identifier: string, lastLogin?: any | null, roles: Array<{ id: string, code: string, description: string, permissions: Array }> } } | null }; - -export type ActiveAdministratorQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ActiveAdministratorQuery = { activeAdministrator?: { id: string, firstName: string, lastName: string, emailAddress: string, user: { id: string, identifier: string, lastLogin?: any | null, roles: Array<{ id: string, code: string, description: string, permissions: Array }> } } | null }; + id: Scalars['ID']; +}>; + +export type GetAdministratorQuery = { + administrator?: { + id: string; + firstName: string; + lastName: string; + emailAddress: string; + user: { + id: string; + identifier: string; + lastLogin?: any | null; + roles: Array<{ id: string; code: string; description: string; permissions: Array }>; + }; + } | null; +}; + +export type ActiveAdministratorQueryVariables = Exact<{ [key: string]: never }>; + +export type ActiveAdministratorQuery = { + activeAdministrator?: { + id: string; + firstName: string; + lastName: string; + emailAddress: string; + user: { + id: string; + identifier: string; + lastLogin?: any | null; + roles: Array<{ id: string; code: string; description: string; permissions: Array }>; + }; + } | null; +}; export type UpdateActiveAdministratorMutationVariables = Exact<{ - input: UpdateActiveAdministratorInput; + input: UpdateActiveAdministratorInput; }>; - -export type UpdateActiveAdministratorMutation = { updateActiveAdministrator: { id: string, firstName: string, lastName: string, emailAddress: string, user: { id: string, identifier: string, lastLogin?: any | null, roles: Array<{ id: string, code: string, description: string, permissions: Array }> } } }; +export type UpdateActiveAdministratorMutation = { + updateActiveAdministrator: { + id: string; + firstName: string; + lastName: string; + emailAddress: string; + user: { + id: string; + identifier: string; + lastLogin?: any | null; + roles: Array<{ id: string; code: string; description: string; permissions: Array }>; + }; + }; +}; export type DeleteAdministratorMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; +export type DeleteAdministratorMutation = { + deleteAdministrator: { message?: string | null; result: DeletionResult }; +}; -export type DeleteAdministratorMutation = { deleteAdministrator: { message?: string | null, result: DeletionResult } }; - -export type Q1QueryVariables = Exact<{ [key: string]: never; }>; - - -export type Q1Query = { product?: { id: string, name: string } | null }; +export type Q1QueryVariables = Exact<{ [key: string]: never }>; -export type Q2QueryVariables = Exact<{ [key: string]: never; }>; +export type Q1Query = { product?: { id: string; name: string } | null }; +export type Q2QueryVariables = Exact<{ [key: string]: never }>; -export type Q2Query = { product?: { id: string, name: string } | null }; +export type Q2Query = { product?: { id: string; name: string } | null }; export type AssignAssetsToChannelMutationVariables = Exact<{ - input: AssignAssetsToChannelInput; + input: AssignAssetsToChannelInput; }>; - -export type AssignAssetsToChannelMutation = { assignAssetsToChannel: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }> }; +export type AssignAssetsToChannelMutation = { + assignAssetsToChannel: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; +}; export type CanCreateCustomerMutationVariables = Exact<{ - input: CreateCustomerInput; + input: CreateCustomerInput; }>; - export type CanCreateCustomerMutation = { createCustomer: { id: string } | {} }; -export type GetCustomerCountQueryVariables = Exact<{ [key: string]: never; }>; - +export type GetCustomerCountQueryVariables = Exact<{ [key: string]: never }>; export type GetCustomerCountQuery = { customers: { totalItems: number } }; -export type DeepFieldResolutionTestQueryQueryVariables = Exact<{ [key: string]: never; }>; +export type DeepFieldResolutionTestQueryQueryVariables = Exact<{ [key: string]: never }>; - -export type DeepFieldResolutionTestQueryQuery = { product?: { variants: Array<{ taxRateApplied: { customerGroup?: { customers: { items: Array<{ id: string, emailAddress: string }> } } | null } }> } | null }; +export type DeepFieldResolutionTestQueryQuery = { + product?: { + variants: Array<{ + taxRateApplied: { + customerGroup?: { customers: { items: Array<{ id: string; emailAddress: string }> } } | null; + }; + }>; + } | null; +}; export type AuthenticateMutationVariables = Exact<{ - input: AuthenticationInput; + input: AuthenticationInput; }>; +export type AuthenticateMutation = { + authenticate: + | { + id: string; + identifier: string; + channels: Array<{ code: string; token: string; permissions: Array }>; + } + | { authenticationError: string; errorCode: ErrorCode; message: string }; +}; -export type AuthenticateMutation = { authenticate: { id: string, identifier: string, channels: Array<{ code: string, token: string, permissions: Array }> } | { authenticationError: string, errorCode: ErrorCode, message: string } }; - -export type GetCustomersQueryVariables = Exact<{ [key: string]: never; }>; - +export type GetCustomersQueryVariables = Exact<{ [key: string]: never }>; -export type GetCustomersQuery = { customers: { totalItems: number, items: Array<{ id: string, emailAddress: string }> } }; +export type GetCustomersQuery = { + customers: { totalItems: number; items: Array<{ id: string; emailAddress: string }> }; +}; export type GetCustomerUserAuthQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetCustomerUserAuthQuery = { customer?: { id: string, user?: { id: string, verified: boolean, authenticationMethods: Array<{ id: string, strategy: string }> } | null } | null }; +export type GetCustomerUserAuthQuery = { + customer?: { + id: string; + user?: { + id: string; + verified: boolean; + authenticationMethods: Array<{ id: string; strategy: string }>; + } | null; + } | null; +}; export type DeleteChannelMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type DeleteChannelMutation = { deleteChannel: { message?: string | null, result: DeletionResult } }; +export type DeleteChannelMutation = { deleteChannel: { message?: string | null; result: DeletionResult } }; export type UpdateGlobalLanguagesMutationVariables = Exact<{ - input: UpdateGlobalSettingsInput; + input: UpdateGlobalSettingsInput; }>; +export type UpdateGlobalLanguagesMutation = { + updateGlobalSettings: { id: string; availableLanguages: Array } | {}; +}; -export type UpdateGlobalLanguagesMutation = { updateGlobalSettings: { id: string, availableLanguages: Array } | {} }; +export type GetCollectionsWithAssetsQueryVariables = Exact<{ [key: string]: never }>; -export type GetCollectionsWithAssetsQueryVariables = Exact<{ [key: string]: never; }>; +export type GetCollectionsWithAssetsQuery = { + collections: { items: Array<{ assets: Array<{ name: string }> }> }; +}; +export type GetProductsWithVariantIdsQueryVariables = Exact<{ [key: string]: never }>; -export type GetCollectionsWithAssetsQuery = { collections: { items: Array<{ assets: Array<{ name: string }> }> } }; +export type GetProductsWithVariantIdsQuery = { + products: { items: Array<{ id: string; name: string; variants: Array<{ id: string; name: string }> }> }; +}; -export type GetProductsWithVariantIdsQueryVariables = Exact<{ [key: string]: never; }>; +export type GetCollectionQueryVariables = Exact<{ + id?: InputMaybe; + slug?: InputMaybe; + variantListOptions?: InputMaybe; +}>; + +export type GetCollectionQuery = { + collection?: { + id: string; + name: string; + slug: string; + description: string; + isPrivate: boolean; + languageCode?: LanguageCode | null; + productVariants: { items: Array<{ id: string; name: string; price: number }> }; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + filters: Array<{ code: string; args: Array<{ name: string; value: string }> }>; + translations: Array<{ + id: string; + languageCode: LanguageCode; + name: string; + slug: string; + description: string; + }>; + parent?: { id: string; name: string } | null; + children?: Array<{ id: string; name: string; position: number }> | null; + } | null; +}; +export type GetCollectionListAdminQueryVariables = Exact<{ + options?: InputMaybe; +}>; + +export type GetCollectionListAdminQuery = { + collections: { + totalItems: number; + items: Array<{ + id: string; + name: string; + slug: string; + description: string; + isPrivate: boolean; + languageCode?: LanguageCode | null; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + filters: Array<{ code: string; args: Array<{ name: string; value: string }> }>; + translations: Array<{ + id: string; + languageCode: LanguageCode; + name: string; + slug: string; + description: string; + }>; + parent?: { id: string; name: string } | null; + children?: Array<{ id: string; name: string; position: number }> | null; + }>; + }; +}; -export type GetProductsWithVariantIdsQuery = { products: { items: Array<{ id: string, name: string, variants: Array<{ id: string, name: string }> }> } }; +export type MoveCollectionMutationVariables = Exact<{ + input: MoveCollectionInput; +}>; + +export type MoveCollectionMutation = { + moveCollection: { + id: string; + name: string; + slug: string; + description: string; + isPrivate: boolean; + languageCode?: LanguageCode | null; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + filters: Array<{ code: string; args: Array<{ name: string; value: string }> }>; + translations: Array<{ + id: string; + languageCode: LanguageCode; + name: string; + slug: string; + description: string; + }>; + parent?: { id: string; name: string } | null; + children?: Array<{ id: string; name: string; position: number }> | null; + }; +}; + +export type GetFacetValuesQueryVariables = Exact<{ [key: string]: never }>; + +export type GetFacetValuesQuery = { + facets: { + items: Array<{ + values: Array<{ + id: string; + languageCode: LanguageCode; + code: string; + name: string; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + facet: { id: string; name: string }; + }>; + }>; + }; +}; -export type GetCollectionQueryVariables = Exact<{ - id?: InputMaybe; - slug?: InputMaybe; - variantListOptions?: InputMaybe; +export type GetCollectionProductsQueryVariables = Exact<{ + id: Scalars['ID']; }>; +export type GetCollectionProductsQuery = { + collection?: { + productVariants: { + items: Array<{ + id: string; + name: string; + productId: string; + facetValues: Array<{ code: string }>; + }>; + }; + } | null; +}; -export type GetCollectionQuery = { collection?: { id: string, name: string, slug: string, description: string, isPrivate: boolean, languageCode?: LanguageCode | null, productVariants: { items: Array<{ id: string, name: string, price: number }> }, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, filters: Array<{ code: string, args: Array<{ name: string, value: string }> }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string, slug: string, description: string }>, parent?: { id: string, name: string } | null, children?: Array<{ id: string, name: string, position: number }> | null } | null }; - -export type GetCollectionListAdminQueryVariables = Exact<{ - options?: InputMaybe; +export type CreateCollectionSelectVariantsMutationVariables = Exact<{ + input: CreateCollectionInput; }>; - -export type GetCollectionListAdminQuery = { collections: { totalItems: number, items: Array<{ id: string, name: string, slug: string, description: string, isPrivate: boolean, languageCode?: LanguageCode | null, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, filters: Array<{ code: string, args: Array<{ name: string, value: string }> }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string, slug: string, description: string }>, parent?: { id: string, name: string } | null, children?: Array<{ id: string, name: string, position: number }> | null }> } }; - -export type MoveCollectionMutationVariables = Exact<{ - input: MoveCollectionInput; -}>; - - -export type MoveCollectionMutation = { moveCollection: { id: string, name: string, slug: string, description: string, isPrivate: boolean, languageCode?: LanguageCode | null, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, filters: Array<{ code: string, args: Array<{ name: string, value: string }> }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string, slug: string, description: string }>, parent?: { id: string, name: string } | null, children?: Array<{ id: string, name: string, position: number }> | null } }; - -export type GetFacetValuesQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetFacetValuesQuery = { facets: { items: Array<{ values: Array<{ id: string, languageCode: LanguageCode, code: string, name: string, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, facet: { id: string, name: string } }> }> } }; - -export type GetCollectionProductsQueryVariables = Exact<{ - id: Scalars['ID']; -}>; - - -export type GetCollectionProductsQuery = { collection?: { productVariants: { items: Array<{ id: string, name: string, productId: string, facetValues: Array<{ code: string }> }> } } | null }; - -export type CreateCollectionSelectVariantsMutationVariables = Exact<{ - input: CreateCollectionInput; -}>; - - -export type CreateCollectionSelectVariantsMutation = { createCollection: { id: string, productVariants: { totalItems: number, items: Array<{ name: string }> } } }; +export type CreateCollectionSelectVariantsMutation = { + createCollection: { id: string; productVariants: { totalItems: number; items: Array<{ name: string }> } }; +}; export type GetCollectionBreadcrumbsQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetCollectionBreadcrumbsQuery = { collection?: { breadcrumbs: Array<{ id: string, name: string, slug: string }> } | null }; +export type GetCollectionBreadcrumbsQuery = { + collection?: { breadcrumbs: Array<{ id: string; name: string; slug: string }> } | null; +}; export type GetCollectionsForProductsQueryVariables = Exact<{ - term: Scalars['String']; + term: Scalars['String']; }>; - -export type GetCollectionsForProductsQuery = { products: { items: Array<{ id: string, name: string, collections: Array<{ id: string, name: string }> }> } }; +export type GetCollectionsForProductsQuery = { + products: { + items: Array<{ id: string; name: string; collections: Array<{ id: string; name: string }> }>; + }; +}; export type DeleteCollectionMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type DeleteCollectionMutation = { deleteCollection: { result: DeletionResult, message?: string | null } }; +export type DeleteCollectionMutation = { + deleteCollection: { result: DeletionResult; message?: string | null }; +}; export type GetProductCollectionsQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetProductCollectionsQuery = { product?: { id: string, collections: Array<{ id: string, name: string }> } | null }; +export type GetProductCollectionsQuery = { + product?: { id: string; collections: Array<{ id: string; name: string }> } | null; +}; export type GetProductCollectionsWithParentQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; +export type GetProductCollectionsWithParentQuery = { + product?: { + id: string; + collections: Array<{ id: string; name: string; parent?: { id: string; name: string } | null }>; + } | null; +}; -export type GetProductCollectionsWithParentQuery = { product?: { id: string, collections: Array<{ id: string, name: string, parent?: { id: string, name: string } | null }> } | null }; - -export type GetCollectionNestedParentsQueryVariables = Exact<{ [key: string]: never; }>; - +export type GetCollectionNestedParentsQueryVariables = Exact<{ [key: string]: never }>; -export type GetCollectionNestedParentsQuery = { collections: { items: Array<{ id: string, name: string, parent?: { name: string, parent?: { name: string, parent?: { name: string } | null } | null } | null }> } }; +export type GetCollectionNestedParentsQuery = { + collections: { + items: Array<{ + id: string; + name: string; + parent?: { + name: string; + parent?: { name: string; parent?: { name: string } | null } | null; + } | null; + }>; + }; +}; export type PreviewCollectionVariantsQueryVariables = Exact<{ - input: PreviewCollectionVariantsInput; - options?: InputMaybe; + input: PreviewCollectionVariantsInput; + options?: InputMaybe; }>; - -export type PreviewCollectionVariantsQuery = { previewCollectionVariants: { totalItems: number, items: Array<{ id: string, name: string }> } }; +export type PreviewCollectionVariantsQuery = { + previewCollectionVariants: { totalItems: number; items: Array<{ id: string; name: string }> }; +}; export type AssignCollectionsToChannelMutationVariables = Exact<{ - input: AssignCollectionsToChannelInput; -}>; - - -export type AssignCollectionsToChannelMutation = { assignCollectionsToChannel: Array<{ id: string, name: string, slug: string, description: string, isPrivate: boolean, languageCode?: LanguageCode | null, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, filters: Array<{ code: string, args: Array<{ name: string, value: string }> }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string, slug: string, description: string }>, parent?: { id: string, name: string } | null, children?: Array<{ id: string, name: string, position: number }> | null }> }; + input: AssignCollectionsToChannelInput; +}>; + +export type AssignCollectionsToChannelMutation = { + assignCollectionsToChannel: Array<{ + id: string; + name: string; + slug: string; + description: string; + isPrivate: boolean; + languageCode?: LanguageCode | null; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + filters: Array<{ code: string; args: Array<{ name: string; value: string }> }>; + translations: Array<{ + id: string; + languageCode: LanguageCode; + name: string; + slug: string; + description: string; + }>; + parent?: { id: string; name: string } | null; + children?: Array<{ id: string; name: string; position: number }> | null; + }>; +}; export type RemoveCollectionsFromChannelMutationVariables = Exact<{ - input: RemoveCollectionsFromChannelInput; -}>; - - -export type RemoveCollectionsFromChannelMutation = { removeCollectionsFromChannel: Array<{ id: string, name: string, slug: string, description: string, isPrivate: boolean, languageCode?: LanguageCode | null, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, filters: Array<{ code: string, args: Array<{ name: string, value: string }> }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string, slug: string, description: string }>, parent?: { id: string, name: string } | null, children?: Array<{ id: string, name: string, position: number }> | null }> }; + input: RemoveCollectionsFromChannelInput; +}>; + +export type RemoveCollectionsFromChannelMutation = { + removeCollectionsFromChannel: Array<{ + id: string; + name: string; + slug: string; + description: string; + isPrivate: boolean; + languageCode?: LanguageCode | null; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + filters: Array<{ code: string; args: Array<{ name: string; value: string }> }>; + translations: Array<{ + id: string; + languageCode: LanguageCode; + name: string; + slug: string; + description: string; + }>; + parent?: { id: string; name: string } | null; + children?: Array<{ id: string; name: string; position: number }> | null; + }>; +}; export type DeleteCollectionsBulkMutationVariables = Exact<{ - ids: Array | Scalars['ID']; + ids: Array | Scalars['ID']; }>; +export type DeleteCollectionsBulkMutation = { + deleteCollections: Array<{ message?: string | null; result: DeletionResult }>; +}; -export type DeleteCollectionsBulkMutation = { deleteCollections: Array<{ message?: string | null, result: DeletionResult }> }; - -export type GetCheckersQueryVariables = Exact<{ [key: string]: never; }>; - +export type GetCheckersQueryVariables = Exact<{ [key: string]: never }>; -export type GetCheckersQuery = { shippingEligibilityCheckers: Array<{ code: string, args: Array<{ defaultValue?: any | null, description?: string | null, label?: string | null, list: boolean, name: string, required: boolean, type: string }> }> }; +export type GetCheckersQuery = { + shippingEligibilityCheckers: Array<{ + code: string; + args: Array<{ + defaultValue?: any | null; + description?: string | null; + label?: string | null; + list: boolean; + name: string; + required: boolean; + type: string; + }>; + }>; +}; export type DeleteCountryMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type DeleteCountryMutation = { deleteCountry: { result: DeletionResult, message?: string | null } }; +export type DeleteCountryMutation = { deleteCountry: { result: DeletionResult; message?: string | null } }; export type GetCountryQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetCountryQuery = { country?: { id: string, code: string, name: string, enabled: boolean, translations: Array<{ id: string, languageCode: LanguageCode, name: string }> } | null }; +export type GetCountryQuery = { + country?: { + id: string; + code: string; + name: string; + enabled: boolean; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + } | null; +}; export type CreateCountryMutationVariables = Exact<{ - input: CreateCountryInput; + input: CreateCountryInput; }>; - -export type CreateCountryMutation = { createCountry: { id: string, code: string, name: string, enabled: boolean, translations: Array<{ id: string, languageCode: LanguageCode, name: string }> } }; +export type CreateCountryMutation = { + createCountry: { + id: string; + code: string; + name: string; + enabled: boolean; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + }; +}; export type DeleteCustomerAddressMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - export type DeleteCustomerAddressMutation = { deleteCustomerAddress: { success: boolean } }; export type GetCustomerWithUserQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetCustomerWithUserQuery = { customer?: { id: string, user?: { id: string, identifier: string, verified: boolean } | null } | null }; +export type GetCustomerWithUserQuery = { + customer?: { id: string; user?: { id: string; identifier: string; verified: boolean } | null } | null; +}; export type GetCustomerOrdersQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetCustomerOrdersQuery = { customer?: { orders: { totalItems: number, items: Array<{ id: string }> } } | null }; +export type GetCustomerOrdersQuery = { + customer?: { orders: { totalItems: number; items: Array<{ id: string }> } } | null; +}; export type AddNoteToCustomerMutationVariables = Exact<{ - input: AddNoteToCustomerInput; -}>; - - -export type AddNoteToCustomerMutation = { addNoteToCustomer: { id: string, title?: string | null, firstName: string, lastName: string, phoneNumber?: string | null, emailAddress: string, user?: { id: string, identifier: string, verified: boolean, lastLogin?: any | null } | null, addresses?: Array<{ id: string, fullName?: string | null, company?: string | null, streetLine1: string, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, phoneNumber?: string | null, defaultShippingAddress?: boolean | null, defaultBillingAddress?: boolean | null, country: { id: string, code: string, name: string } }> | null } }; - -export type ReindexMutationVariables = Exact<{ [key: string]: never; }>; - + input: AddNoteToCustomerInput; +}>; + +export type AddNoteToCustomerMutation = { + addNoteToCustomer: { + id: string; + title?: string | null; + firstName: string; + lastName: string; + phoneNumber?: string | null; + emailAddress: string; + user?: { id: string; identifier: string; verified: boolean; lastLogin?: any | null } | null; + addresses?: Array<{ + id: string; + fullName?: string | null; + company?: string | null; + streetLine1: string; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + phoneNumber?: string | null; + defaultShippingAddress?: boolean | null; + defaultBillingAddress?: boolean | null; + country: { id: string; code: string; name: string }; + }> | null; + }; +}; + +export type ReindexMutationVariables = Exact<{ [key: string]: never }>; export type ReindexMutation = { reindex: { id: string } }; export type SearchProductsAdminQueryVariables = Exact<{ - input: SearchInput; + input: SearchInput; }>; - -export type SearchProductsAdminQuery = { search: { totalItems: number, items: Array<{ enabled: boolean, productId: string, productName: string, slug: string, description: string, productVariantId: string, productVariantName: string, sku: string }> } }; +export type SearchProductsAdminQuery = { + search: { + totalItems: number; + items: Array<{ + enabled: boolean; + productId: string; + productName: string; + slug: string; + description: string; + productVariantId: string; + productVariantName: string; + sku: string; + }>; + }; +}; export type SearchFacetValuesQueryVariables = Exact<{ - input: SearchInput; + input: SearchInput; }>; - -export type SearchFacetValuesQuery = { search: { totalItems: number, facetValues: Array<{ count: number, facetValue: { id: string, name: string } }> } }; +export type SearchFacetValuesQuery = { + search: { + totalItems: number; + facetValues: Array<{ count: number; facetValue: { id: string; name: string } }>; + }; +}; export type SearchCollectionsQueryVariables = Exact<{ - input: SearchInput; + input: SearchInput; }>; - -export type SearchCollectionsQuery = { search: { totalItems: number, collections: Array<{ count: number, collection: { id: string, name: string } }> } }; +export type SearchCollectionsQuery = { + search: { + totalItems: number; + collections: Array<{ count: number; collection: { id: string; name: string } }>; + }; +}; export type SearchGetAssetsQueryVariables = Exact<{ - input: SearchInput; -}>; - - -export type SearchGetAssetsQuery = { search: { totalItems: number, items: Array<{ productId: string, productName: string, productVariantName: string, productAsset?: { id: string, preview: string, focalPoint?: { x: number, y: number } | null } | null, productVariantAsset?: { id: string, preview: string, focalPoint?: { x: number, y: number } | null } | null }> } }; + input: SearchInput; +}>; + +export type SearchGetAssetsQuery = { + search: { + totalItems: number; + items: Array<{ + productId: string; + productName: string; + productVariantName: string; + productAsset?: { + id: string; + preview: string; + focalPoint?: { x: number; y: number } | null; + } | null; + productVariantAsset?: { + id: string; + preview: string; + focalPoint?: { x: number; y: number } | null; + } | null; + }>; + }; +}; export type SearchGetPricesQueryVariables = Exact<{ - input: SearchInput; -}>; - - -export type SearchGetPricesQuery = { search: { items: Array<{ price: { min: number, max: number } | { value: number }, priceWithTax: { min: number, max: number } | { value: number } }> } }; - -export type CreateDraftOrderMutationVariables = Exact<{ [key: string]: never; }>; - - -export type CreateDraftOrderMutation = { createDraftOrder: { id: string, createdAt: any, updatedAt: any, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, total: number, totalWithTax: number, totalQuantity: number, currencyCode: CurrencyCode, shipping: number, shippingWithTax: number, customer?: { id: string, firstName: string, lastName: string } | null, lines: Array<{ id: string, unitPrice: number, unitPriceWithTax: number, quantity: number, taxRate: number, linePriceWithTax: number, featuredAsset?: { preview: string } | null, productVariant: { id: string, name: string, sku: string }, taxLines: Array<{ description: string, taxRate: number }> }>, surcharges: Array<{ id: string, description: string, sku?: string | null, price: number, priceWithTax: number }>, shippingLines: Array<{ priceWithTax: number, shippingMethod: { id: string, code: string, name: string, description: string } }>, shippingAddress?: { fullName?: string | null, company?: string | null, streetLine1?: string | null, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, country?: string | null, phoneNumber?: string | null } | null, payments?: Array<{ id: string, transactionId?: string | null, amount: number, method: string, state: string, nextStates: Array, metadata?: any | null, refunds: Array<{ id: string, total: number, reason?: string | null }> }> | null, fulfillments?: Array<{ id: string, state: string, method: string, trackingCode?: string | null, lines: Array<{ orderLineId: string, quantity: number }> }> | null } }; + input: SearchInput; +}>; + +export type SearchGetPricesQuery = { + search: { + items: Array<{ + price: { min: number; max: number } | { value: number }; + priceWithTax: { min: number; max: number } | { value: number }; + }>; + }; +}; + +export type CreateDraftOrderMutationVariables = Exact<{ [key: string]: never }>; + +export type CreateDraftOrderMutation = { + createDraftOrder: { + id: string; + createdAt: any; + updatedAt: any; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + total: number; + totalWithTax: number; + totalQuantity: number; + currencyCode: CurrencyCode; + shipping: number; + shippingWithTax: number; + customer?: { id: string; firstName: string; lastName: string } | null; + lines: Array<{ + id: string; + unitPrice: number; + unitPriceWithTax: number; + quantity: number; + taxRate: number; + linePriceWithTax: number; + featuredAsset?: { preview: string } | null; + productVariant: { id: string; name: string; sku: string }; + taxLines: Array<{ description: string; taxRate: number }>; + }>; + surcharges: Array<{ + id: string; + description: string; + sku?: string | null; + price: number; + priceWithTax: number; + }>; + shippingLines: Array<{ + priceWithTax: number; + shippingMethod: { id: string; code: string; name: string; description: string }; + }>; + shippingAddress?: { + fullName?: string | null; + company?: string | null; + streetLine1?: string | null; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + country?: string | null; + phoneNumber?: string | null; + } | null; + payments?: Array<{ + id: string; + transactionId?: string | null; + amount: number; + method: string; + state: string; + nextStates: Array; + metadata?: any | null; + refunds: Array<{ id: string; total: number; reason?: string | null }>; + }> | null; + fulfillments?: Array<{ + id: string; + state: string; + method: string; + trackingCode?: string | null; + lines: Array<{ orderLineId: string; quantity: number }>; + }> | null; + }; +}; export type AddItemToDraftOrderMutationVariables = Exact<{ - orderId: Scalars['ID']; - input: AddItemToDraftOrderInput; -}>; - - -export type AddItemToDraftOrderMutation = { addItemToDraftOrder: { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { id: string, createdAt: any, updatedAt: any, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, total: number, totalWithTax: number, totalQuantity: number, currencyCode: CurrencyCode, shipping: number, shippingWithTax: number, customer?: { id: string, firstName: string, lastName: string } | null, lines: Array<{ id: string, unitPrice: number, unitPriceWithTax: number, quantity: number, taxRate: number, linePriceWithTax: number, featuredAsset?: { preview: string } | null, productVariant: { id: string, name: string, sku: string }, taxLines: Array<{ description: string, taxRate: number }> }>, surcharges: Array<{ id: string, description: string, sku?: string | null, price: number, priceWithTax: number }>, shippingLines: Array<{ priceWithTax: number, shippingMethod: { id: string, code: string, name: string, description: string } }>, shippingAddress?: { fullName?: string | null, company?: string | null, streetLine1?: string | null, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, country?: string | null, phoneNumber?: string | null } | null, payments?: Array<{ id: string, transactionId?: string | null, amount: number, method: string, state: string, nextStates: Array, metadata?: any | null, refunds: Array<{ id: string, total: number, reason?: string | null }> }> | null, fulfillments?: Array<{ id: string, state: string, method: string, trackingCode?: string | null, lines: Array<{ orderLineId: string, quantity: number }> }> | null } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } }; + orderId: Scalars['ID']; + input: AddItemToDraftOrderInput; +}>; + +export type AddItemToDraftOrderMutation = { + addItemToDraftOrder: + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { + id: string; + createdAt: any; + updatedAt: any; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + total: number; + totalWithTax: number; + totalQuantity: number; + currencyCode: CurrencyCode; + shipping: number; + shippingWithTax: number; + customer?: { id: string; firstName: string; lastName: string } | null; + lines: Array<{ + id: string; + unitPrice: number; + unitPriceWithTax: number; + quantity: number; + taxRate: number; + linePriceWithTax: number; + featuredAsset?: { preview: string } | null; + productVariant: { id: string; name: string; sku: string }; + taxLines: Array<{ description: string; taxRate: number }>; + }>; + surcharges: Array<{ + id: string; + description: string; + sku?: string | null; + price: number; + priceWithTax: number; + }>; + shippingLines: Array<{ + priceWithTax: number; + shippingMethod: { id: string; code: string; name: string; description: string }; + }>; + shippingAddress?: { + fullName?: string | null; + company?: string | null; + streetLine1?: string | null; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + country?: string | null; + phoneNumber?: string | null; + } | null; + payments?: Array<{ + id: string; + transactionId?: string | null; + amount: number; + method: string; + state: string; + nextStates: Array; + metadata?: any | null; + refunds: Array<{ id: string; total: number; reason?: string | null }>; + }> | null; + fulfillments?: Array<{ + id: string; + state: string; + method: string; + trackingCode?: string | null; + lines: Array<{ orderLineId: string; quantity: number }>; + }> | null; + } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string }; +}; export type AdjustDraftOrderLineMutationVariables = Exact<{ - orderId: Scalars['ID']; - input: AdjustDraftOrderLineInput; -}>; - - -export type AdjustDraftOrderLineMutation = { adjustDraftOrderLine: { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { id: string, createdAt: any, updatedAt: any, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, total: number, totalWithTax: number, totalQuantity: number, currencyCode: CurrencyCode, shipping: number, shippingWithTax: number, customer?: { id: string, firstName: string, lastName: string } | null, lines: Array<{ id: string, unitPrice: number, unitPriceWithTax: number, quantity: number, taxRate: number, linePriceWithTax: number, featuredAsset?: { preview: string } | null, productVariant: { id: string, name: string, sku: string }, taxLines: Array<{ description: string, taxRate: number }> }>, surcharges: Array<{ id: string, description: string, sku?: string | null, price: number, priceWithTax: number }>, shippingLines: Array<{ priceWithTax: number, shippingMethod: { id: string, code: string, name: string, description: string } }>, shippingAddress?: { fullName?: string | null, company?: string | null, streetLine1?: string | null, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, country?: string | null, phoneNumber?: string | null } | null, payments?: Array<{ id: string, transactionId?: string | null, amount: number, method: string, state: string, nextStates: Array, metadata?: any | null, refunds: Array<{ id: string, total: number, reason?: string | null }> }> | null, fulfillments?: Array<{ id: string, state: string, method: string, trackingCode?: string | null, lines: Array<{ orderLineId: string, quantity: number }> }> | null } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } }; + orderId: Scalars['ID']; + input: AdjustDraftOrderLineInput; +}>; + +export type AdjustDraftOrderLineMutation = { + adjustDraftOrderLine: + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { + id: string; + createdAt: any; + updatedAt: any; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + total: number; + totalWithTax: number; + totalQuantity: number; + currencyCode: CurrencyCode; + shipping: number; + shippingWithTax: number; + customer?: { id: string; firstName: string; lastName: string } | null; + lines: Array<{ + id: string; + unitPrice: number; + unitPriceWithTax: number; + quantity: number; + taxRate: number; + linePriceWithTax: number; + featuredAsset?: { preview: string } | null; + productVariant: { id: string; name: string; sku: string }; + taxLines: Array<{ description: string; taxRate: number }>; + }>; + surcharges: Array<{ + id: string; + description: string; + sku?: string | null; + price: number; + priceWithTax: number; + }>; + shippingLines: Array<{ + priceWithTax: number; + shippingMethod: { id: string; code: string; name: string; description: string }; + }>; + shippingAddress?: { + fullName?: string | null; + company?: string | null; + streetLine1?: string | null; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + country?: string | null; + phoneNumber?: string | null; + } | null; + payments?: Array<{ + id: string; + transactionId?: string | null; + amount: number; + method: string; + state: string; + nextStates: Array; + metadata?: any | null; + refunds: Array<{ id: string; total: number; reason?: string | null }>; + }> | null; + fulfillments?: Array<{ + id: string; + state: string; + method: string; + trackingCode?: string | null; + lines: Array<{ orderLineId: string; quantity: number }>; + }> | null; + } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string }; +}; export type RemoveDraftOrderLineMutationVariables = Exact<{ - orderId: Scalars['ID']; - orderLineId: Scalars['ID']; -}>; - - -export type RemoveDraftOrderLineMutation = { removeDraftOrderLine: { id: string, createdAt: any, updatedAt: any, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, total: number, totalWithTax: number, totalQuantity: number, currencyCode: CurrencyCode, shipping: number, shippingWithTax: number, customer?: { id: string, firstName: string, lastName: string } | null, lines: Array<{ id: string, unitPrice: number, unitPriceWithTax: number, quantity: number, taxRate: number, linePriceWithTax: number, featuredAsset?: { preview: string } | null, productVariant: { id: string, name: string, sku: string }, taxLines: Array<{ description: string, taxRate: number }> }>, surcharges: Array<{ id: string, description: string, sku?: string | null, price: number, priceWithTax: number }>, shippingLines: Array<{ priceWithTax: number, shippingMethod: { id: string, code: string, name: string, description: string } }>, shippingAddress?: { fullName?: string | null, company?: string | null, streetLine1?: string | null, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, country?: string | null, phoneNumber?: string | null } | null, payments?: Array<{ id: string, transactionId?: string | null, amount: number, method: string, state: string, nextStates: Array, metadata?: any | null, refunds: Array<{ id: string, total: number, reason?: string | null }> }> | null, fulfillments?: Array<{ id: string, state: string, method: string, trackingCode?: string | null, lines: Array<{ orderLineId: string, quantity: number }> }> | null } | { errorCode: ErrorCode, message: string } }; + orderId: Scalars['ID']; + orderLineId: Scalars['ID']; +}>; + +export type RemoveDraftOrderLineMutation = { + removeDraftOrderLine: + | { + id: string; + createdAt: any; + updatedAt: any; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + total: number; + totalWithTax: number; + totalQuantity: number; + currencyCode: CurrencyCode; + shipping: number; + shippingWithTax: number; + customer?: { id: string; firstName: string; lastName: string } | null; + lines: Array<{ + id: string; + unitPrice: number; + unitPriceWithTax: number; + quantity: number; + taxRate: number; + linePriceWithTax: number; + featuredAsset?: { preview: string } | null; + productVariant: { id: string; name: string; sku: string }; + taxLines: Array<{ description: string; taxRate: number }>; + }>; + surcharges: Array<{ + id: string; + description: string; + sku?: string | null; + price: number; + priceWithTax: number; + }>; + shippingLines: Array<{ + priceWithTax: number; + shippingMethod: { id: string; code: string; name: string; description: string }; + }>; + shippingAddress?: { + fullName?: string | null; + company?: string | null; + streetLine1?: string | null; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + country?: string | null; + phoneNumber?: string | null; + } | null; + payments?: Array<{ + id: string; + transactionId?: string | null; + amount: number; + method: string; + state: string; + nextStates: Array; + metadata?: any | null; + refunds: Array<{ id: string; total: number; reason?: string | null }>; + }> | null; + fulfillments?: Array<{ + id: string; + state: string; + method: string; + trackingCode?: string | null; + lines: Array<{ orderLineId: string; quantity: number }>; + }> | null; + } + | { errorCode: ErrorCode; message: string }; +}; export type SetCustomerForDraftOrderMutationVariables = Exact<{ - orderId: Scalars['ID']; - customerId?: InputMaybe; - input?: InputMaybe; -}>; - - -export type SetCustomerForDraftOrderMutation = { setCustomerForDraftOrder: { errorCode: ErrorCode, message: string } | { id: string, createdAt: any, updatedAt: any, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, total: number, totalWithTax: number, totalQuantity: number, currencyCode: CurrencyCode, shipping: number, shippingWithTax: number, customer?: { id: string, firstName: string, lastName: string } | null, lines: Array<{ id: string, unitPrice: number, unitPriceWithTax: number, quantity: number, taxRate: number, linePriceWithTax: number, featuredAsset?: { preview: string } | null, productVariant: { id: string, name: string, sku: string }, taxLines: Array<{ description: string, taxRate: number }> }>, surcharges: Array<{ id: string, description: string, sku?: string | null, price: number, priceWithTax: number }>, shippingLines: Array<{ priceWithTax: number, shippingMethod: { id: string, code: string, name: string, description: string } }>, shippingAddress?: { fullName?: string | null, company?: string | null, streetLine1?: string | null, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, country?: string | null, phoneNumber?: string | null } | null, payments?: Array<{ id: string, transactionId?: string | null, amount: number, method: string, state: string, nextStates: Array, metadata?: any | null, refunds: Array<{ id: string, total: number, reason?: string | null }> }> | null, fulfillments?: Array<{ id: string, state: string, method: string, trackingCode?: string | null, lines: Array<{ orderLineId: string, quantity: number }> }> | null } }; + orderId: Scalars['ID']; + customerId?: InputMaybe; + input?: InputMaybe; +}>; + +export type SetCustomerForDraftOrderMutation = { + setCustomerForDraftOrder: + | { errorCode: ErrorCode; message: string } + | { + id: string; + createdAt: any; + updatedAt: any; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + total: number; + totalWithTax: number; + totalQuantity: number; + currencyCode: CurrencyCode; + shipping: number; + shippingWithTax: number; + customer?: { id: string; firstName: string; lastName: string } | null; + lines: Array<{ + id: string; + unitPrice: number; + unitPriceWithTax: number; + quantity: number; + taxRate: number; + linePriceWithTax: number; + featuredAsset?: { preview: string } | null; + productVariant: { id: string; name: string; sku: string }; + taxLines: Array<{ description: string; taxRate: number }>; + }>; + surcharges: Array<{ + id: string; + description: string; + sku?: string | null; + price: number; + priceWithTax: number; + }>; + shippingLines: Array<{ + priceWithTax: number; + shippingMethod: { id: string; code: string; name: string; description: string }; + }>; + shippingAddress?: { + fullName?: string | null; + company?: string | null; + streetLine1?: string | null; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + country?: string | null; + phoneNumber?: string | null; + } | null; + payments?: Array<{ + id: string; + transactionId?: string | null; + amount: number; + method: string; + state: string; + nextStates: Array; + metadata?: any | null; + refunds: Array<{ id: string; total: number; reason?: string | null }>; + }> | null; + fulfillments?: Array<{ + id: string; + state: string; + method: string; + trackingCode?: string | null; + lines: Array<{ orderLineId: string; quantity: number }>; + }> | null; + }; +}; export type SetDraftOrderShippingAddressMutationVariables = Exact<{ - orderId: Scalars['ID']; - input: CreateAddressInput; -}>; - - -export type SetDraftOrderShippingAddressMutation = { setDraftOrderShippingAddress: { id: string, createdAt: any, updatedAt: any, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, total: number, totalWithTax: number, totalQuantity: number, currencyCode: CurrencyCode, shipping: number, shippingWithTax: number, customer?: { id: string, firstName: string, lastName: string } | null, lines: Array<{ id: string, unitPrice: number, unitPriceWithTax: number, quantity: number, taxRate: number, linePriceWithTax: number, featuredAsset?: { preview: string } | null, productVariant: { id: string, name: string, sku: string }, taxLines: Array<{ description: string, taxRate: number }> }>, surcharges: Array<{ id: string, description: string, sku?: string | null, price: number, priceWithTax: number }>, shippingLines: Array<{ priceWithTax: number, shippingMethod: { id: string, code: string, name: string, description: string } }>, shippingAddress?: { fullName?: string | null, company?: string | null, streetLine1?: string | null, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, country?: string | null, phoneNumber?: string | null } | null, payments?: Array<{ id: string, transactionId?: string | null, amount: number, method: string, state: string, nextStates: Array, metadata?: any | null, refunds: Array<{ id: string, total: number, reason?: string | null }> }> | null, fulfillments?: Array<{ id: string, state: string, method: string, trackingCode?: string | null, lines: Array<{ orderLineId: string, quantity: number }> }> | null } }; + orderId: Scalars['ID']; + input: CreateAddressInput; +}>; + +export type SetDraftOrderShippingAddressMutation = { + setDraftOrderShippingAddress: { + id: string; + createdAt: any; + updatedAt: any; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + total: number; + totalWithTax: number; + totalQuantity: number; + currencyCode: CurrencyCode; + shipping: number; + shippingWithTax: number; + customer?: { id: string; firstName: string; lastName: string } | null; + lines: Array<{ + id: string; + unitPrice: number; + unitPriceWithTax: number; + quantity: number; + taxRate: number; + linePriceWithTax: number; + featuredAsset?: { preview: string } | null; + productVariant: { id: string; name: string; sku: string }; + taxLines: Array<{ description: string; taxRate: number }>; + }>; + surcharges: Array<{ + id: string; + description: string; + sku?: string | null; + price: number; + priceWithTax: number; + }>; + shippingLines: Array<{ + priceWithTax: number; + shippingMethod: { id: string; code: string; name: string; description: string }; + }>; + shippingAddress?: { + fullName?: string | null; + company?: string | null; + streetLine1?: string | null; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + country?: string | null; + phoneNumber?: string | null; + } | null; + payments?: Array<{ + id: string; + transactionId?: string | null; + amount: number; + method: string; + state: string; + nextStates: Array; + metadata?: any | null; + refunds: Array<{ id: string; total: number; reason?: string | null }>; + }> | null; + fulfillments?: Array<{ + id: string; + state: string; + method: string; + trackingCode?: string | null; + lines: Array<{ orderLineId: string; quantity: number }>; + }> | null; + }; +}; export type SetDraftOrderBillingAddressMutationVariables = Exact<{ - orderId: Scalars['ID']; - input: CreateAddressInput; -}>; - - -export type SetDraftOrderBillingAddressMutation = { setDraftOrderBillingAddress: { id: string, createdAt: any, updatedAt: any, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, total: number, totalWithTax: number, totalQuantity: number, currencyCode: CurrencyCode, shipping: number, shippingWithTax: number, billingAddress?: { fullName?: string | null, company?: string | null, streetLine1?: string | null, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, country?: string | null, phoneNumber?: string | null } | null, customer?: { id: string, firstName: string, lastName: string } | null, lines: Array<{ id: string, unitPrice: number, unitPriceWithTax: number, quantity: number, taxRate: number, linePriceWithTax: number, featuredAsset?: { preview: string } | null, productVariant: { id: string, name: string, sku: string }, taxLines: Array<{ description: string, taxRate: number }> }>, surcharges: Array<{ id: string, description: string, sku?: string | null, price: number, priceWithTax: number }>, shippingLines: Array<{ priceWithTax: number, shippingMethod: { id: string, code: string, name: string, description: string } }>, shippingAddress?: { fullName?: string | null, company?: string | null, streetLine1?: string | null, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, country?: string | null, phoneNumber?: string | null } | null, payments?: Array<{ id: string, transactionId?: string | null, amount: number, method: string, state: string, nextStates: Array, metadata?: any | null, refunds: Array<{ id: string, total: number, reason?: string | null }> }> | null, fulfillments?: Array<{ id: string, state: string, method: string, trackingCode?: string | null, lines: Array<{ orderLineId: string, quantity: number }> }> | null } }; + orderId: Scalars['ID']; + input: CreateAddressInput; +}>; + +export type SetDraftOrderBillingAddressMutation = { + setDraftOrderBillingAddress: { + id: string; + createdAt: any; + updatedAt: any; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + total: number; + totalWithTax: number; + totalQuantity: number; + currencyCode: CurrencyCode; + shipping: number; + shippingWithTax: number; + billingAddress?: { + fullName?: string | null; + company?: string | null; + streetLine1?: string | null; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + country?: string | null; + phoneNumber?: string | null; + } | null; + customer?: { id: string; firstName: string; lastName: string } | null; + lines: Array<{ + id: string; + unitPrice: number; + unitPriceWithTax: number; + quantity: number; + taxRate: number; + linePriceWithTax: number; + featuredAsset?: { preview: string } | null; + productVariant: { id: string; name: string; sku: string }; + taxLines: Array<{ description: string; taxRate: number }>; + }>; + surcharges: Array<{ + id: string; + description: string; + sku?: string | null; + price: number; + priceWithTax: number; + }>; + shippingLines: Array<{ + priceWithTax: number; + shippingMethod: { id: string; code: string; name: string; description: string }; + }>; + shippingAddress?: { + fullName?: string | null; + company?: string | null; + streetLine1?: string | null; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + country?: string | null; + phoneNumber?: string | null; + } | null; + payments?: Array<{ + id: string; + transactionId?: string | null; + amount: number; + method: string; + state: string; + nextStates: Array; + metadata?: any | null; + refunds: Array<{ id: string; total: number; reason?: string | null }>; + }> | null; + fulfillments?: Array<{ + id: string; + state: string; + method: string; + trackingCode?: string | null; + lines: Array<{ orderLineId: string; quantity: number }>; + }> | null; + }; +}; export type ApplyCouponCodeToDraftOrderMutationVariables = Exact<{ - orderId: Scalars['ID']; - couponCode: Scalars['String']; -}>; - - -export type ApplyCouponCodeToDraftOrderMutation = { applyCouponCodeToDraftOrder: { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { couponCodes: Array, id: string, createdAt: any, updatedAt: any, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, total: number, totalWithTax: number, totalQuantity: number, currencyCode: CurrencyCode, shipping: number, shippingWithTax: number, customer?: { id: string, firstName: string, lastName: string } | null, lines: Array<{ id: string, unitPrice: number, unitPriceWithTax: number, quantity: number, taxRate: number, linePriceWithTax: number, featuredAsset?: { preview: string } | null, productVariant: { id: string, name: string, sku: string }, taxLines: Array<{ description: string, taxRate: number }> }>, surcharges: Array<{ id: string, description: string, sku?: string | null, price: number, priceWithTax: number }>, shippingLines: Array<{ priceWithTax: number, shippingMethod: { id: string, code: string, name: string, description: string } }>, shippingAddress?: { fullName?: string | null, company?: string | null, streetLine1?: string | null, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, country?: string | null, phoneNumber?: string | null } | null, payments?: Array<{ id: string, transactionId?: string | null, amount: number, method: string, state: string, nextStates: Array, metadata?: any | null, refunds: Array<{ id: string, total: number, reason?: string | null }> }> | null, fulfillments?: Array<{ id: string, state: string, method: string, trackingCode?: string | null, lines: Array<{ orderLineId: string, quantity: number }> }> | null } }; + orderId: Scalars['ID']; + couponCode: Scalars['String']; +}>; + +export type ApplyCouponCodeToDraftOrderMutation = { + applyCouponCodeToDraftOrder: + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { + couponCodes: Array; + id: string; + createdAt: any; + updatedAt: any; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + total: number; + totalWithTax: number; + totalQuantity: number; + currencyCode: CurrencyCode; + shipping: number; + shippingWithTax: number; + customer?: { id: string; firstName: string; lastName: string } | null; + lines: Array<{ + id: string; + unitPrice: number; + unitPriceWithTax: number; + quantity: number; + taxRate: number; + linePriceWithTax: number; + featuredAsset?: { preview: string } | null; + productVariant: { id: string; name: string; sku: string }; + taxLines: Array<{ description: string; taxRate: number }>; + }>; + surcharges: Array<{ + id: string; + description: string; + sku?: string | null; + price: number; + priceWithTax: number; + }>; + shippingLines: Array<{ + priceWithTax: number; + shippingMethod: { id: string; code: string; name: string; description: string }; + }>; + shippingAddress?: { + fullName?: string | null; + company?: string | null; + streetLine1?: string | null; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + country?: string | null; + phoneNumber?: string | null; + } | null; + payments?: Array<{ + id: string; + transactionId?: string | null; + amount: number; + method: string; + state: string; + nextStates: Array; + metadata?: any | null; + refunds: Array<{ id: string; total: number; reason?: string | null }>; + }> | null; + fulfillments?: Array<{ + id: string; + state: string; + method: string; + trackingCode?: string | null; + lines: Array<{ orderLineId: string; quantity: number }>; + }> | null; + }; +}; export type RemoveCouponCodeFromDraftOrderMutationVariables = Exact<{ - orderId: Scalars['ID']; - couponCode: Scalars['String']; -}>; - - -export type RemoveCouponCodeFromDraftOrderMutation = { removeCouponCodeFromDraftOrder?: { couponCodes: Array, id: string, createdAt: any, updatedAt: any, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, total: number, totalWithTax: number, totalQuantity: number, currencyCode: CurrencyCode, shipping: number, shippingWithTax: number, customer?: { id: string, firstName: string, lastName: string } | null, lines: Array<{ id: string, unitPrice: number, unitPriceWithTax: number, quantity: number, taxRate: number, linePriceWithTax: number, featuredAsset?: { preview: string } | null, productVariant: { id: string, name: string, sku: string }, taxLines: Array<{ description: string, taxRate: number }> }>, surcharges: Array<{ id: string, description: string, sku?: string | null, price: number, priceWithTax: number }>, shippingLines: Array<{ priceWithTax: number, shippingMethod: { id: string, code: string, name: string, description: string } }>, shippingAddress?: { fullName?: string | null, company?: string | null, streetLine1?: string | null, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, country?: string | null, phoneNumber?: string | null } | null, payments?: Array<{ id: string, transactionId?: string | null, amount: number, method: string, state: string, nextStates: Array, metadata?: any | null, refunds: Array<{ id: string, total: number, reason?: string | null }> }> | null, fulfillments?: Array<{ id: string, state: string, method: string, trackingCode?: string | null, lines: Array<{ orderLineId: string, quantity: number }> }> | null } | null }; + orderId: Scalars['ID']; + couponCode: Scalars['String']; +}>; + +export type RemoveCouponCodeFromDraftOrderMutation = { + removeCouponCodeFromDraftOrder?: { + couponCodes: Array; + id: string; + createdAt: any; + updatedAt: any; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + total: number; + totalWithTax: number; + totalQuantity: number; + currencyCode: CurrencyCode; + shipping: number; + shippingWithTax: number; + customer?: { id: string; firstName: string; lastName: string } | null; + lines: Array<{ + id: string; + unitPrice: number; + unitPriceWithTax: number; + quantity: number; + taxRate: number; + linePriceWithTax: number; + featuredAsset?: { preview: string } | null; + productVariant: { id: string; name: string; sku: string }; + taxLines: Array<{ description: string; taxRate: number }>; + }>; + surcharges: Array<{ + id: string; + description: string; + sku?: string | null; + price: number; + priceWithTax: number; + }>; + shippingLines: Array<{ + priceWithTax: number; + shippingMethod: { id: string; code: string; name: string; description: string }; + }>; + shippingAddress?: { + fullName?: string | null; + company?: string | null; + streetLine1?: string | null; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + country?: string | null; + phoneNumber?: string | null; + } | null; + payments?: Array<{ + id: string; + transactionId?: string | null; + amount: number; + method: string; + state: string; + nextStates: Array; + metadata?: any | null; + refunds: Array<{ id: string; total: number; reason?: string | null }>; + }> | null; + fulfillments?: Array<{ + id: string; + state: string; + method: string; + trackingCode?: string | null; + lines: Array<{ orderLineId: string; quantity: number }>; + }> | null; + } | null; +}; export type DraftOrderEligibleShippingMethodsQueryVariables = Exact<{ - orderId: Scalars['ID']; + orderId: Scalars['ID']; }>; - -export type DraftOrderEligibleShippingMethodsQuery = { eligibleShippingMethodsForDraftOrder: Array<{ id: string, name: string, code: string, description: string, price: number, priceWithTax: number, metadata?: any | null }> }; +export type DraftOrderEligibleShippingMethodsQuery = { + eligibleShippingMethodsForDraftOrder: Array<{ + id: string; + name: string; + code: string; + description: string; + price: number; + priceWithTax: number; + metadata?: any | null; + }>; +}; export type SetDraftOrderShippingMethodMutationVariables = Exact<{ - orderId: Scalars['ID']; - shippingMethodId: Scalars['ID']; -}>; - - -export type SetDraftOrderShippingMethodMutation = { setDraftOrderShippingMethod: { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { id: string, createdAt: any, updatedAt: any, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, total: number, totalWithTax: number, totalQuantity: number, currencyCode: CurrencyCode, shipping: number, shippingWithTax: number, customer?: { id: string, firstName: string, lastName: string } | null, lines: Array<{ id: string, unitPrice: number, unitPriceWithTax: number, quantity: number, taxRate: number, linePriceWithTax: number, featuredAsset?: { preview: string } | null, productVariant: { id: string, name: string, sku: string }, taxLines: Array<{ description: string, taxRate: number }> }>, surcharges: Array<{ id: string, description: string, sku?: string | null, price: number, priceWithTax: number }>, shippingLines: Array<{ priceWithTax: number, shippingMethod: { id: string, code: string, name: string, description: string } }>, shippingAddress?: { fullName?: string | null, company?: string | null, streetLine1?: string | null, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, country?: string | null, phoneNumber?: string | null } | null, payments?: Array<{ id: string, transactionId?: string | null, amount: number, method: string, state: string, nextStates: Array, metadata?: any | null, refunds: Array<{ id: string, total: number, reason?: string | null }> }> | null, fulfillments?: Array<{ id: string, state: string, method: string, trackingCode?: string | null, lines: Array<{ orderLineId: string, quantity: number }> }> | null } | { errorCode: ErrorCode, message: string } }; - -export type IdTest1QueryVariables = Exact<{ [key: string]: never; }>; - + orderId: Scalars['ID']; + shippingMethodId: Scalars['ID']; +}>; + +export type SetDraftOrderShippingMethodMutation = { + setDraftOrderShippingMethod: + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { + id: string; + createdAt: any; + updatedAt: any; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + total: number; + totalWithTax: number; + totalQuantity: number; + currencyCode: CurrencyCode; + shipping: number; + shippingWithTax: number; + customer?: { id: string; firstName: string; lastName: string } | null; + lines: Array<{ + id: string; + unitPrice: number; + unitPriceWithTax: number; + quantity: number; + taxRate: number; + linePriceWithTax: number; + featuredAsset?: { preview: string } | null; + productVariant: { id: string; name: string; sku: string }; + taxLines: Array<{ description: string; taxRate: number }>; + }>; + surcharges: Array<{ + id: string; + description: string; + sku?: string | null; + price: number; + priceWithTax: number; + }>; + shippingLines: Array<{ + priceWithTax: number; + shippingMethod: { id: string; code: string; name: string; description: string }; + }>; + shippingAddress?: { + fullName?: string | null; + company?: string | null; + streetLine1?: string | null; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + country?: string | null; + phoneNumber?: string | null; + } | null; + payments?: Array<{ + id: string; + transactionId?: string | null; + amount: number; + method: string; + state: string; + nextStates: Array; + metadata?: any | null; + refunds: Array<{ id: string; total: number; reason?: string | null }>; + }> | null; + fulfillments?: Array<{ + id: string; + state: string; + method: string; + trackingCode?: string | null; + lines: Array<{ orderLineId: string; quantity: number }>; + }> | null; + } + | { errorCode: ErrorCode; message: string }; +}; + +export type IdTest1QueryVariables = Exact<{ [key: string]: never }>; export type IdTest1Query = { products: { items: Array<{ id: string }> } }; -export type IdTest2QueryVariables = Exact<{ [key: string]: never; }>; - - -export type IdTest2Query = { products: { items: Array<{ id: string, variants: Array<{ id: string, options: Array<{ id: string, name: string }> }> }> } }; +export type IdTest2QueryVariables = Exact<{ [key: string]: never }>; -export type IdTest3QueryVariables = Exact<{ [key: string]: never; }>; +export type IdTest2Query = { + products: { + items: Array<{ + id: string; + variants: Array<{ id: string; options: Array<{ id: string; name: string }> }>; + }>; + }; +}; +export type IdTest3QueryVariables = Exact<{ [key: string]: never }>; export type IdTest3Query = { product?: { id: string } | null }; -export type IdTest4MutationVariables = Exact<{ [key: string]: never; }>; - +export type IdTest4MutationVariables = Exact<{ [key: string]: never }>; -export type IdTest4Mutation = { updateProduct: { id: string, featuredAsset?: { id: string } | null } }; +export type IdTest4Mutation = { updateProduct: { id: string; featuredAsset?: { id: string } | null } }; -export type IdTest5MutationVariables = Exact<{ [key: string]: never; }>; +export type IdTest5MutationVariables = Exact<{ [key: string]: never }>; - -export type IdTest5Mutation = { updateProduct: { id: string, name: string } }; +export type IdTest5Mutation = { updateProduct: { id: string; name: string } }; export type IdTest6QueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - export type IdTest6Query = { product?: { id: string } | null }; export type IdTest7MutationVariables = Exact<{ - input: UpdateProductInput; + input: UpdateProductInput; }>; - -export type IdTest7Mutation = { updateProduct: { id: string, featuredAsset?: { id: string } | null } }; +export type IdTest7Mutation = { updateProduct: { id: string; featuredAsset?: { id: string } | null } }; export type IdTest8MutationVariables = Exact<{ - input: UpdateProductInput; + input: UpdateProductInput; }>; +export type IdTest8Mutation = { updateProduct: { id: string; name: string } }; -export type IdTest8Mutation = { updateProduct: { id: string, name: string } }; - -export type IdTest9QueryVariables = Exact<{ [key: string]: never; }>; - +export type IdTest9QueryVariables = Exact<{ [key: string]: never }>; -export type IdTest9Query = { products: { items: Array<{ id: string, featuredAsset?: { id: string } | null }> } }; - -export type ProdFragmentFragment = { id: string, featuredAsset?: { id: string } | null }; - -export type IdTest10QueryVariables = Exact<{ [key: string]: never; }>; +export type IdTest9Query = { + products: { items: Array<{ id: string; featuredAsset?: { id: string } | null }> }; +}; +export type ProdFragmentFragment = { id: string; featuredAsset?: { id: string } | null }; -export type IdTest10Query = { products: { items: Array<{ id: string, featuredAsset?: { id: string } | null }> } }; +export type IdTest10QueryVariables = Exact<{ [key: string]: never }>; -export type ProdFragment1Fragment = { id: string, featuredAsset?: { id: string } | null }; +export type IdTest10Query = { + products: { items: Array<{ id: string; featuredAsset?: { id: string } | null }> }; +}; -export type ProdFragment2Fragment = { id: string, featuredAsset?: { id: string } | null }; +export type ProdFragment1Fragment = { id: string; featuredAsset?: { id: string } | null }; -export type IdTest11QueryVariables = Exact<{ [key: string]: never; }>; +export type ProdFragment2Fragment = { id: string; featuredAsset?: { id: string } | null }; +export type IdTest11QueryVariables = Exact<{ [key: string]: never }>; -export type IdTest11Query = { products: { items: Array<{ id: string, featuredAsset?: { id: string } | null }> } }; +export type IdTest11Query = { + products: { items: Array<{ id: string; featuredAsset?: { id: string } | null }> }; +}; -export type ProdFragment1_1Fragment = { id: string, featuredAsset?: { id: string } | null }; +export type ProdFragment1_1Fragment = { id: string; featuredAsset?: { id: string } | null }; -export type ProdFragment2_1Fragment = { id: string, featuredAsset?: { id: string } | null }; +export type ProdFragment2_1Fragment = { id: string; featuredAsset?: { id: string } | null }; -export type ProdFragment3_1Fragment = { id: string, featuredAsset?: { id: string } | null }; +export type ProdFragment3_1Fragment = { id: string; featuredAsset?: { id: string } | null }; export type GetFacetWithValuesQueryVariables = Exact<{ - id: Scalars['ID']; -}>; - - -export type GetFacetWithValuesQuery = { facet?: { id: string, languageCode: LanguageCode, isPrivate: boolean, code: string, name: string, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, values: Array<{ id: string, languageCode: LanguageCode, code: string, name: string, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, facet: { id: string, name: string } }> } | null }; + id: Scalars['ID']; +}>; + +export type GetFacetWithValuesQuery = { + facet?: { + id: string; + languageCode: LanguageCode; + isPrivate: boolean; + code: string; + name: string; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + values: Array<{ + id: string; + languageCode: LanguageCode; + code: string; + name: string; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + facet: { id: string; name: string }; + }>; + } | null; +}; export type DeleteFacetValuesMutationVariables = Exact<{ - ids: Array | Scalars['ID']; - force?: InputMaybe; + ids: Array | Scalars['ID']; + force?: InputMaybe; }>; - -export type DeleteFacetValuesMutation = { deleteFacetValues: Array<{ result: DeletionResult, message?: string | null }> }; +export type DeleteFacetValuesMutation = { + deleteFacetValues: Array<{ result: DeletionResult; message?: string | null }>; +}; export type DeleteFacetMutationVariables = Exact<{ - id: Scalars['ID']; - force?: InputMaybe; + id: Scalars['ID']; + force?: InputMaybe; }>; - -export type DeleteFacetMutation = { deleteFacet: { result: DeletionResult, message?: string | null } }; +export type DeleteFacetMutation = { deleteFacet: { result: DeletionResult; message?: string | null } }; export type GetProductWithFacetValuesQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; +export type GetProductWithFacetValuesQuery = { + product?: { + id: string; + facetValues: Array<{ id: string; name: string; code: string }>; + variants: Array<{ id: string; facetValues: Array<{ id: string; name: string; code: string }> }>; + } | null; +}; -export type GetProductWithFacetValuesQuery = { product?: { id: string, facetValues: Array<{ id: string, name: string, code: string }>, variants: Array<{ id: string, facetValues: Array<{ id: string, name: string, code: string }> }> } | null }; - -export type GetProductListWithVariantsQueryVariables = Exact<{ [key: string]: never; }>; - +export type GetProductListWithVariantsQueryVariables = Exact<{ [key: string]: never }>; -export type GetProductListWithVariantsQuery = { products: { totalItems: number, items: Array<{ id: string, name: string, variants: Array<{ id: string, name: string }> }> } }; +export type GetProductListWithVariantsQuery = { + products: { + totalItems: number; + items: Array<{ id: string; name: string; variants: Array<{ id: string; name: string }> }>; + }; +}; export type CreateFacetValuesMutationVariables = Exact<{ - input: Array | CreateFacetValueInput; + input: Array | CreateFacetValueInput; }>; - -export type CreateFacetValuesMutation = { createFacetValues: Array<{ id: string, languageCode: LanguageCode, code: string, name: string, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, facet: { id: string, name: string } }> }; +export type CreateFacetValuesMutation = { + createFacetValues: Array<{ + id: string; + languageCode: LanguageCode; + code: string; + name: string; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + facet: { id: string; name: string }; + }>; +}; export type UpdateFacetValuesMutationVariables = Exact<{ - input: Array | UpdateFacetValueInput; + input: Array | UpdateFacetValueInput; }>; - -export type UpdateFacetValuesMutation = { updateFacetValues: Array<{ id: string, languageCode: LanguageCode, code: string, name: string, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, facet: { id: string, name: string } }> }; +export type UpdateFacetValuesMutation = { + updateFacetValues: Array<{ + id: string; + languageCode: LanguageCode; + code: string; + name: string; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + facet: { id: string; name: string }; + }>; +}; export type AssignFacetsToChannelMutationVariables = Exact<{ - input: AssignFacetsToChannelInput; + input: AssignFacetsToChannelInput; }>; - -export type AssignFacetsToChannelMutation = { assignFacetsToChannel: Array<{ id: string, name: string }> }; +export type AssignFacetsToChannelMutation = { assignFacetsToChannel: Array<{ id: string; name: string }> }; export type RemoveFacetsFromChannelMutationVariables = Exact<{ - input: RemoveFacetsFromChannelInput; -}>; - - -export type RemoveFacetsFromChannelMutation = { removeFacetsFromChannel: Array<{ id: string, name: string } | { errorCode: ErrorCode, message: string, productCount: number, variantCount: number }> }; - -export type GetGlobalSettingsQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetGlobalSettingsQuery = { globalSettings: { id: string, availableLanguages: Array, trackInventory: boolean, outOfStockThreshold: number, serverConfig: { permittedAssetTypes: Array, orderProcess: Array<{ name: string, to: Array }>, permissions: Array<{ name: string, description: string, assignable: boolean }>, customFieldConfig: { Customer: Array<{ name: string } | { name: string } | { name: string } | { name: string } | { name: string } | { name: string } | { name: string } | { name: string } | { name: string }> } } } }; - -export type AdministratorFragment = { id: string, firstName: string, lastName: string, emailAddress: string, user: { id: string, identifier: string, lastLogin?: any | null, roles: Array<{ id: string, code: string, description: string, permissions: Array }> } }; - -export type AssetFragment = { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }; - -export type ProductVariantFragment = { id: string, createdAt: any, updatedAt: any, enabled: boolean, languageCode: LanguageCode, name: string, currencyCode: CurrencyCode, price: number, priceWithTax: number, stockOnHand: number, trackInventory: GlobalFlag, sku: string, taxRateApplied: { id: string, name: string, value: number }, taxCategory: { id: string, name: string }, options: Array<{ id: string, code: string, languageCode: LanguageCode, name: string }>, facetValues: Array<{ id: string, code: string, name: string, facet: { id: string, name: string } }>, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, channels: Array<{ id: string, code: string }> }; - -export type ProductWithVariantsFragment = { id: string, enabled: boolean, languageCode: LanguageCode, name: string, slug: string, description: string, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, translations: Array<{ languageCode: LanguageCode, name: string, slug: string, description: string }>, optionGroups: Array<{ id: string, languageCode: LanguageCode, code: string, name: string }>, variants: Array<{ id: string, createdAt: any, updatedAt: any, enabled: boolean, languageCode: LanguageCode, name: string, currencyCode: CurrencyCode, price: number, priceWithTax: number, stockOnHand: number, trackInventory: GlobalFlag, sku: string, taxRateApplied: { id: string, name: string, value: number }, taxCategory: { id: string, name: string }, options: Array<{ id: string, code: string, languageCode: LanguageCode, name: string }>, facetValues: Array<{ id: string, code: string, name: string, facet: { id: string, name: string } }>, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, channels: Array<{ id: string, code: string }> }>, facetValues: Array<{ id: string, code: string, name: string, facet: { id: string, name: string } }>, channels: Array<{ id: string, code: string }> }; - -export type RoleFragment = { id: string, code: string, description: string, permissions: Array, channels: Array<{ id: string, code: string, token: string }> }; - -export type ConfigurableOperationFragment = { code: string, args: Array<{ name: string, value: string }> }; - -export type CollectionFragment = { id: string, name: string, slug: string, description: string, isPrivate: boolean, languageCode?: LanguageCode | null, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, filters: Array<{ code: string, args: Array<{ name: string, value: string }> }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string, slug: string, description: string }>, parent?: { id: string, name: string } | null, children?: Array<{ id: string, name: string, position: number }> | null }; - -export type FacetValueFragment = { id: string, languageCode: LanguageCode, code: string, name: string, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, facet: { id: string, name: string } }; - -export type FacetWithValuesFragment = { id: string, languageCode: LanguageCode, isPrivate: boolean, code: string, name: string, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, values: Array<{ id: string, languageCode: LanguageCode, code: string, name: string, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, facet: { id: string, name: string } }> }; - -export type CountryFragment = { id: string, code: string, name: string, enabled: boolean, translations: Array<{ id: string, languageCode: LanguageCode, name: string }> }; - -export type AddressFragment = { id: string, fullName?: string | null, company?: string | null, streetLine1: string, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, phoneNumber?: string | null, defaultShippingAddress?: boolean | null, defaultBillingAddress?: boolean | null, country: { id: string, code: string, name: string } }; - -export type CustomerFragment = { id: string, title?: string | null, firstName: string, lastName: string, phoneNumber?: string | null, emailAddress: string, user?: { id: string, identifier: string, verified: boolean, lastLogin?: any | null } | null, addresses?: Array<{ id: string, fullName?: string | null, company?: string | null, streetLine1: string, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, phoneNumber?: string | null, defaultShippingAddress?: boolean | null, defaultBillingAddress?: boolean | null, country: { id: string, code: string, name: string } }> | null }; - -export type AdjustmentFragment = { adjustmentSource: string, amount: number, description: string, type: AdjustmentType }; - -export type ShippingAddressFragment = { fullName?: string | null, company?: string | null, streetLine1?: string | null, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, country?: string | null, phoneNumber?: string | null }; - -export type OrderFragment = { id: string, createdAt: any, updatedAt: any, code: string, active: boolean, state: string, total: number, totalWithTax: number, totalQuantity: number, currencyCode: CurrencyCode, customer?: { id: string, firstName: string, lastName: string } | null }; - -export type PaymentFragment = { id: string, transactionId?: string | null, amount: number, method: string, state: string, nextStates: Array, metadata?: any | null, refunds: Array<{ id: string, total: number, reason?: string | null }> }; - -export type OrderWithLinesFragment = { id: string, createdAt: any, updatedAt: any, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, total: number, totalWithTax: number, totalQuantity: number, currencyCode: CurrencyCode, shipping: number, shippingWithTax: number, customer?: { id: string, firstName: string, lastName: string } | null, lines: Array<{ id: string, unitPrice: number, unitPriceWithTax: number, quantity: number, taxRate: number, linePriceWithTax: number, featuredAsset?: { preview: string } | null, productVariant: { id: string, name: string, sku: string }, taxLines: Array<{ description: string, taxRate: number }> }>, surcharges: Array<{ id: string, description: string, sku?: string | null, price: number, priceWithTax: number }>, shippingLines: Array<{ priceWithTax: number, shippingMethod: { id: string, code: string, name: string, description: string } }>, shippingAddress?: { fullName?: string | null, company?: string | null, streetLine1?: string | null, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, country?: string | null, phoneNumber?: string | null } | null, payments?: Array<{ id: string, transactionId?: string | null, amount: number, method: string, state: string, nextStates: Array, metadata?: any | null, refunds: Array<{ id: string, total: number, reason?: string | null }> }> | null, fulfillments?: Array<{ id: string, state: string, method: string, trackingCode?: string | null, lines: Array<{ orderLineId: string, quantity: number }> }> | null }; - -export type PromotionFragment = { id: string, createdAt: any, updatedAt: any, couponCode?: string | null, startsAt?: any | null, endsAt?: any | null, name: string, enabled: boolean, conditions: Array<{ code: string, args: Array<{ name: string, value: string }> }>, actions: Array<{ code: string, args: Array<{ name: string, value: string }> }> }; - -export type ZoneFragment = { id: string, name: string, members: Array<{ id: string, code: string, name: string, enabled: boolean, translations: Array<{ id: string, languageCode: LanguageCode, name: string }> }> }; - -export type TaxRateFragment = { id: string, name: string, enabled: boolean, value: number, category: { id: string, name: string }, zone: { id: string, name: string }, customerGroup?: { id: string, name: string } | null }; - -export type CurrentUserFragment = { id: string, identifier: string, channels: Array<{ code: string, token: string, permissions: Array }> }; - -export type VariantWithStockFragment = { id: string, stockOnHand: number, stockAllocated: number, stockMovements: { totalItems: number, items: Array<{ id: string, type: StockMovementType, quantity: number } | { id: string, type: StockMovementType, quantity: number } | { id: string, type: StockMovementType, quantity: number } | { id: string, type: StockMovementType, quantity: number } | { id: string, type: StockMovementType, quantity: number } | { id: string, type: StockMovementType, quantity: number }> } }; - -export type FulfillmentFragment = { id: string, state: string, nextStates: Array, method: string, trackingCode?: string | null, lines: Array<{ orderLineId: string, quantity: number }> }; - -export type ChannelFragment = { id: string, code: string, token: string, currencyCode: CurrencyCode, defaultLanguageCode: LanguageCode, pricesIncludeTax: boolean, defaultShippingZone?: { id: string } | null, defaultTaxZone?: { id: string } | null }; - -export type GlobalSettingsFragment = { id: string, availableLanguages: Array, trackInventory: boolean, outOfStockThreshold: number, serverConfig: { permittedAssetTypes: Array, orderProcess: Array<{ name: string, to: Array }>, permissions: Array<{ name: string, description: string, assignable: boolean }>, customFieldConfig: { Customer: Array<{ name: string } | { name: string } | { name: string } | { name: string } | { name: string } | { name: string } | { name: string } | { name: string } | { name: string }> } } }; - -export type CustomerGroupFragment = { id: string, name: string, customers: { totalItems: number, items: Array<{ id: string }> } }; - -export type ProductOptionGroupFragment = { id: string, code: string, name: string, options: Array<{ id: string, code: string, name: string }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string }> }; - -export type ProductWithOptionsFragment = { id: string, optionGroups: Array<{ id: string, code: string, options: Array<{ id: string, code: string }> }> }; - -export type ShippingMethodFragment = { id: string, code: string, name: string, description: string, calculator: { code: string, args: Array<{ name: string, value: string }> }, checker: { code: string, args: Array<{ name: string, value: string }> } }; + input: RemoveFacetsFromChannelInput; +}>; + +export type RemoveFacetsFromChannelMutation = { + removeFacetsFromChannel: Array< + | { id: string; name: string } + | { errorCode: ErrorCode; message: string; productCount: number; variantCount: number } + >; +}; + +export type GetGlobalSettingsQueryVariables = Exact<{ [key: string]: never }>; + +export type GetGlobalSettingsQuery = { + globalSettings: { + id: string; + availableLanguages: Array; + trackInventory: boolean; + outOfStockThreshold: number; + serverConfig: { + permittedAssetTypes: Array; + orderProcess: Array<{ name: string; to: Array }>; + permissions: Array<{ name: string; description: string; assignable: boolean }>; + customFieldConfig: { + Customer: Array< + | { name: string } + | { name: string } + | { name: string } + | { name: string } + | { name: string } + | { name: string } + | { name: string } + | { name: string } + | { name: string } + >; + }; + }; + }; +}; + +export type AdministratorFragment = { + id: string; + firstName: string; + lastName: string; + emailAddress: string; + user: { + id: string; + identifier: string; + lastLogin?: any | null; + roles: Array<{ id: string; code: string; description: string; permissions: Array }>; + }; +}; + +export type AssetFragment = { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; +}; + +export type ProductVariantFragment = { + id: string; + createdAt: any; + updatedAt: any; + enabled: boolean; + languageCode: LanguageCode; + name: string; + currencyCode: CurrencyCode; + price: number; + priceWithTax: number; + stockOnHand: number; + trackInventory: GlobalFlag; + sku: string; + taxRateApplied: { id: string; name: string; value: number }; + taxCategory: { id: string; name: string }; + options: Array<{ id: string; code: string; languageCode: LanguageCode; name: string }>; + facetValues: Array<{ id: string; code: string; name: string; facet: { id: string; name: string } }>; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + channels: Array<{ id: string; code: string }>; +}; + +export type ProductWithVariantsFragment = { + id: string; + enabled: boolean; + languageCode: LanguageCode; + name: string; + slug: string; + description: string; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + translations: Array<{ languageCode: LanguageCode; name: string; slug: string; description: string }>; + optionGroups: Array<{ id: string; languageCode: LanguageCode; code: string; name: string }>; + variants: Array<{ + id: string; + createdAt: any; + updatedAt: any; + enabled: boolean; + languageCode: LanguageCode; + name: string; + currencyCode: CurrencyCode; + price: number; + priceWithTax: number; + stockOnHand: number; + trackInventory: GlobalFlag; + sku: string; + taxRateApplied: { id: string; name: string; value: number }; + taxCategory: { id: string; name: string }; + options: Array<{ id: string; code: string; languageCode: LanguageCode; name: string }>; + facetValues: Array<{ id: string; code: string; name: string; facet: { id: string; name: string } }>; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + channels: Array<{ id: string; code: string }>; + }>; + facetValues: Array<{ id: string; code: string; name: string; facet: { id: string; name: string } }>; + channels: Array<{ id: string; code: string }>; +}; + +export type RoleFragment = { + id: string; + code: string; + description: string; + permissions: Array; + channels: Array<{ id: string; code: string; token: string }>; +}; + +export type ConfigurableOperationFragment = { code: string; args: Array<{ name: string; value: string }> }; + +export type CollectionFragment = { + id: string; + name: string; + slug: string; + description: string; + isPrivate: boolean; + languageCode?: LanguageCode | null; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + filters: Array<{ code: string; args: Array<{ name: string; value: string }> }>; + translations: Array<{ + id: string; + languageCode: LanguageCode; + name: string; + slug: string; + description: string; + }>; + parent?: { id: string; name: string } | null; + children?: Array<{ id: string; name: string; position: number }> | null; +}; + +export type FacetValueFragment = { + id: string; + languageCode: LanguageCode; + code: string; + name: string; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + facet: { id: string; name: string }; +}; + +export type FacetWithValuesFragment = { + id: string; + languageCode: LanguageCode; + isPrivate: boolean; + code: string; + name: string; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + values: Array<{ + id: string; + languageCode: LanguageCode; + code: string; + name: string; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + facet: { id: string; name: string }; + }>; +}; + +export type CountryFragment = { + id: string; + code: string; + name: string; + enabled: boolean; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; +}; + +export type AddressFragment = { + id: string; + fullName?: string | null; + company?: string | null; + streetLine1: string; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + phoneNumber?: string | null; + defaultShippingAddress?: boolean | null; + defaultBillingAddress?: boolean | null; + country: { id: string; code: string; name: string }; +}; + +export type CustomerFragment = { + id: string; + title?: string | null; + firstName: string; + lastName: string; + phoneNumber?: string | null; + emailAddress: string; + user?: { id: string; identifier: string; verified: boolean; lastLogin?: any | null } | null; + addresses?: Array<{ + id: string; + fullName?: string | null; + company?: string | null; + streetLine1: string; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + phoneNumber?: string | null; + defaultShippingAddress?: boolean | null; + defaultBillingAddress?: boolean | null; + country: { id: string; code: string; name: string }; + }> | null; +}; + +export type AdjustmentFragment = { + adjustmentSource: string; + amount: number; + description: string; + type: AdjustmentType; +}; + +export type ShippingAddressFragment = { + fullName?: string | null; + company?: string | null; + streetLine1?: string | null; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + country?: string | null; + phoneNumber?: string | null; +}; + +export type OrderFragment = { + id: string; + createdAt: any; + updatedAt: any; + code: string; + active: boolean; + state: string; + total: number; + totalWithTax: number; + totalQuantity: number; + currencyCode: CurrencyCode; + customer?: { id: string; firstName: string; lastName: string } | null; +}; + +export type PaymentFragment = { + id: string; + transactionId?: string | null; + amount: number; + method: string; + state: string; + nextStates: Array; + metadata?: any | null; + refunds: Array<{ id: string; total: number; reason?: string | null }>; +}; + +export type OrderWithLinesFragment = { + id: string; + createdAt: any; + updatedAt: any; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + total: number; + totalWithTax: number; + totalQuantity: number; + currencyCode: CurrencyCode; + shipping: number; + shippingWithTax: number; + customer?: { id: string; firstName: string; lastName: string } | null; + lines: Array<{ + id: string; + unitPrice: number; + unitPriceWithTax: number; + quantity: number; + taxRate: number; + linePriceWithTax: number; + featuredAsset?: { preview: string } | null; + productVariant: { id: string; name: string; sku: string }; + taxLines: Array<{ description: string; taxRate: number }>; + }>; + surcharges: Array<{ + id: string; + description: string; + sku?: string | null; + price: number; + priceWithTax: number; + }>; + shippingLines: Array<{ + priceWithTax: number; + shippingMethod: { id: string; code: string; name: string; description: string }; + }>; + shippingAddress?: { + fullName?: string | null; + company?: string | null; + streetLine1?: string | null; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + country?: string | null; + phoneNumber?: string | null; + } | null; + payments?: Array<{ + id: string; + transactionId?: string | null; + amount: number; + method: string; + state: string; + nextStates: Array; + metadata?: any | null; + refunds: Array<{ id: string; total: number; reason?: string | null }>; + }> | null; + fulfillments?: Array<{ + id: string; + state: string; + method: string; + trackingCode?: string | null; + lines: Array<{ orderLineId: string; quantity: number }>; + }> | null; +}; + +export type PromotionFragment = { + id: string; + createdAt: any; + updatedAt: any; + couponCode?: string | null; + startsAt?: any | null; + endsAt?: any | null; + name: string; + enabled: boolean; + conditions: Array<{ code: string; args: Array<{ name: string; value: string }> }>; + actions: Array<{ code: string; args: Array<{ name: string; value: string }> }>; +}; + +export type ZoneFragment = { + id: string; + name: string; + members: Array<{ + id: string; + code: string; + name: string; + enabled: boolean; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + }>; +}; + +export type TaxRateFragment = { + id: string; + name: string; + enabled: boolean; + value: number; + category: { id: string; name: string }; + zone: { id: string; name: string }; + customerGroup?: { id: string; name: string } | null; +}; + +export type CurrentUserFragment = { + id: string; + identifier: string; + channels: Array<{ code: string; token: string; permissions: Array }>; +}; + +export type VariantWithStockFragment = { + id: string; + stockOnHand: number; + stockAllocated: number; + stockMovements: { + totalItems: number; + items: Array< + | { id: string; type: StockMovementType; quantity: number } + | { id: string; type: StockMovementType; quantity: number } + | { id: string; type: StockMovementType; quantity: number } + | { id: string; type: StockMovementType; quantity: number } + | { id: string; type: StockMovementType; quantity: number } + | { id: string; type: StockMovementType; quantity: number } + >; + }; +}; + +export type FulfillmentFragment = { + id: string; + state: string; + nextStates: Array; + method: string; + trackingCode?: string | null; + lines: Array<{ orderLineId: string; quantity: number }>; +}; + +export type ChannelFragment = { + id: string; + code: string; + token: string; + currencyCode: CurrencyCode; + defaultLanguageCode: LanguageCode; + pricesIncludeTax: boolean; + defaultShippingZone?: { id: string } | null; + defaultTaxZone?: { id: string } | null; +}; + +export type GlobalSettingsFragment = { + id: string; + availableLanguages: Array; + trackInventory: boolean; + outOfStockThreshold: number; + serverConfig: { + permittedAssetTypes: Array; + orderProcess: Array<{ name: string; to: Array }>; + permissions: Array<{ name: string; description: string; assignable: boolean }>; + customFieldConfig: { + Customer: Array< + | { name: string } + | { name: string } + | { name: string } + | { name: string } + | { name: string } + | { name: string } + | { name: string } + | { name: string } + | { name: string } + >; + }; + }; +}; + +export type CustomerGroupFragment = { + id: string; + name: string; + customers: { totalItems: number; items: Array<{ id: string }> }; +}; + +export type ProductOptionGroupFragment = { + id: string; + code: string; + name: string; + options: Array<{ id: string; code: string; name: string }>; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; +}; + +export type ProductWithOptionsFragment = { + id: string; + optionGroups: Array<{ id: string; code: string; options: Array<{ id: string; code: string }> }>; +}; + +export type ShippingMethodFragment = { + id: string; + code: string; + name: string; + description: string; + calculator: { code: string; args: Array<{ name: string; value: string }> }; + checker: { code: string; args: Array<{ name: string; value: string }> }; +}; export type CreateAdministratorMutationVariables = Exact<{ - input: CreateAdministratorInput; + input: CreateAdministratorInput; }>; - -export type CreateAdministratorMutation = { createAdministrator: { id: string, firstName: string, lastName: string, emailAddress: string, user: { id: string, identifier: string, lastLogin?: any | null, roles: Array<{ id: string, code: string, description: string, permissions: Array }> } } }; +export type CreateAdministratorMutation = { + createAdministrator: { + id: string; + firstName: string; + lastName: string; + emailAddress: string; + user: { + id: string; + identifier: string; + lastLogin?: any | null; + roles: Array<{ id: string; code: string; description: string; permissions: Array }>; + }; + }; +}; export type UpdateProductMutationVariables = Exact<{ - input: UpdateProductInput; -}>; - - -export type UpdateProductMutation = { updateProduct: { id: string, enabled: boolean, languageCode: LanguageCode, name: string, slug: string, description: string, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, translations: Array<{ languageCode: LanguageCode, name: string, slug: string, description: string }>, optionGroups: Array<{ id: string, languageCode: LanguageCode, code: string, name: string }>, variants: Array<{ id: string, createdAt: any, updatedAt: any, enabled: boolean, languageCode: LanguageCode, name: string, currencyCode: CurrencyCode, price: number, priceWithTax: number, stockOnHand: number, trackInventory: GlobalFlag, sku: string, taxRateApplied: { id: string, name: string, value: number }, taxCategory: { id: string, name: string }, options: Array<{ id: string, code: string, languageCode: LanguageCode, name: string }>, facetValues: Array<{ id: string, code: string, name: string, facet: { id: string, name: string } }>, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, channels: Array<{ id: string, code: string }> }>, facetValues: Array<{ id: string, code: string, name: string, facet: { id: string, name: string } }>, channels: Array<{ id: string, code: string }> } }; + input: UpdateProductInput; +}>; + +export type UpdateProductMutation = { + updateProduct: { + id: string; + enabled: boolean; + languageCode: LanguageCode; + name: string; + slug: string; + description: string; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + translations: Array<{ languageCode: LanguageCode; name: string; slug: string; description: string }>; + optionGroups: Array<{ id: string; languageCode: LanguageCode; code: string; name: string }>; + variants: Array<{ + id: string; + createdAt: any; + updatedAt: any; + enabled: boolean; + languageCode: LanguageCode; + name: string; + currencyCode: CurrencyCode; + price: number; + priceWithTax: number; + stockOnHand: number; + trackInventory: GlobalFlag; + sku: string; + taxRateApplied: { id: string; name: string; value: number }; + taxCategory: { id: string; name: string }; + options: Array<{ id: string; code: string; languageCode: LanguageCode; name: string }>; + facetValues: Array<{ + id: string; + code: string; + name: string; + facet: { id: string; name: string }; + }>; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + channels: Array<{ id: string; code: string }>; + }>; + facetValues: Array<{ id: string; code: string; name: string; facet: { id: string; name: string } }>; + channels: Array<{ id: string; code: string }>; + }; +}; export type CreateProductMutationVariables = Exact<{ - input: CreateProductInput; -}>; - - -export type CreateProductMutation = { createProduct: { id: string, enabled: boolean, languageCode: LanguageCode, name: string, slug: string, description: string, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, translations: Array<{ languageCode: LanguageCode, name: string, slug: string, description: string }>, optionGroups: Array<{ id: string, languageCode: LanguageCode, code: string, name: string }>, variants: Array<{ id: string, createdAt: any, updatedAt: any, enabled: boolean, languageCode: LanguageCode, name: string, currencyCode: CurrencyCode, price: number, priceWithTax: number, stockOnHand: number, trackInventory: GlobalFlag, sku: string, taxRateApplied: { id: string, name: string, value: number }, taxCategory: { id: string, name: string }, options: Array<{ id: string, code: string, languageCode: LanguageCode, name: string }>, facetValues: Array<{ id: string, code: string, name: string, facet: { id: string, name: string } }>, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, channels: Array<{ id: string, code: string }> }>, facetValues: Array<{ id: string, code: string, name: string, facet: { id: string, name: string } }>, channels: Array<{ id: string, code: string }> } }; + input: CreateProductInput; +}>; + +export type CreateProductMutation = { + createProduct: { + id: string; + enabled: boolean; + languageCode: LanguageCode; + name: string; + slug: string; + description: string; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + translations: Array<{ languageCode: LanguageCode; name: string; slug: string; description: string }>; + optionGroups: Array<{ id: string; languageCode: LanguageCode; code: string; name: string }>; + variants: Array<{ + id: string; + createdAt: any; + updatedAt: any; + enabled: boolean; + languageCode: LanguageCode; + name: string; + currencyCode: CurrencyCode; + price: number; + priceWithTax: number; + stockOnHand: number; + trackInventory: GlobalFlag; + sku: string; + taxRateApplied: { id: string; name: string; value: number }; + taxCategory: { id: string; name: string }; + options: Array<{ id: string; code: string; languageCode: LanguageCode; name: string }>; + facetValues: Array<{ + id: string; + code: string; + name: string; + facet: { id: string; name: string }; + }>; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + channels: Array<{ id: string; code: string }>; + }>; + facetValues: Array<{ id: string; code: string; name: string; facet: { id: string; name: string } }>; + channels: Array<{ id: string; code: string }>; + }; +}; export type GetProductWithVariantsQueryVariables = Exact<{ - id?: InputMaybe; - slug?: InputMaybe; -}>; - - -export type GetProductWithVariantsQuery = { product?: { id: string, enabled: boolean, languageCode: LanguageCode, name: string, slug: string, description: string, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, translations: Array<{ languageCode: LanguageCode, name: string, slug: string, description: string }>, optionGroups: Array<{ id: string, languageCode: LanguageCode, code: string, name: string }>, variants: Array<{ id: string, createdAt: any, updatedAt: any, enabled: boolean, languageCode: LanguageCode, name: string, currencyCode: CurrencyCode, price: number, priceWithTax: number, stockOnHand: number, trackInventory: GlobalFlag, sku: string, taxRateApplied: { id: string, name: string, value: number }, taxCategory: { id: string, name: string }, options: Array<{ id: string, code: string, languageCode: LanguageCode, name: string }>, facetValues: Array<{ id: string, code: string, name: string, facet: { id: string, name: string } }>, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, channels: Array<{ id: string, code: string }> }>, facetValues: Array<{ id: string, code: string, name: string, facet: { id: string, name: string } }>, channels: Array<{ id: string, code: string }> } | null }; + id?: InputMaybe; + slug?: InputMaybe; +}>; + +export type GetProductWithVariantsQuery = { + product?: { + id: string; + enabled: boolean; + languageCode: LanguageCode; + name: string; + slug: string; + description: string; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + translations: Array<{ languageCode: LanguageCode; name: string; slug: string; description: string }>; + optionGroups: Array<{ id: string; languageCode: LanguageCode; code: string; name: string }>; + variants: Array<{ + id: string; + createdAt: any; + updatedAt: any; + enabled: boolean; + languageCode: LanguageCode; + name: string; + currencyCode: CurrencyCode; + price: number; + priceWithTax: number; + stockOnHand: number; + trackInventory: GlobalFlag; + sku: string; + taxRateApplied: { id: string; name: string; value: number }; + taxCategory: { id: string; name: string }; + options: Array<{ id: string; code: string; languageCode: LanguageCode; name: string }>; + facetValues: Array<{ + id: string; + code: string; + name: string; + facet: { id: string; name: string }; + }>; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + channels: Array<{ id: string; code: string }>; + }>; + facetValues: Array<{ id: string; code: string; name: string; facet: { id: string; name: string } }>; + channels: Array<{ id: string; code: string }>; + } | null; +}; export type GetProductListQueryVariables = Exact<{ - options?: InputMaybe; + options?: InputMaybe; }>; - -export type GetProductListQuery = { products: { totalItems: number, items: Array<{ id: string, languageCode: LanguageCode, name: string, slug: string, featuredAsset?: { id: string, preview: string } | null }> } }; +export type GetProductListQuery = { + products: { + totalItems: number; + items: Array<{ + id: string; + languageCode: LanguageCode; + name: string; + slug: string; + featuredAsset?: { id: string; preview: string } | null; + }>; + }; +}; export type CreateProductVariantsMutationVariables = Exact<{ - input: Array | CreateProductVariantInput; -}>; - - -export type CreateProductVariantsMutation = { createProductVariants: Array<{ id: string, createdAt: any, updatedAt: any, enabled: boolean, languageCode: LanguageCode, name: string, currencyCode: CurrencyCode, price: number, priceWithTax: number, stockOnHand: number, trackInventory: GlobalFlag, sku: string, taxRateApplied: { id: string, name: string, value: number }, taxCategory: { id: string, name: string }, options: Array<{ id: string, code: string, languageCode: LanguageCode, name: string }>, facetValues: Array<{ id: string, code: string, name: string, facet: { id: string, name: string } }>, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, channels: Array<{ id: string, code: string }> } | null> }; + input: Array | CreateProductVariantInput; +}>; + +export type CreateProductVariantsMutation = { + createProductVariants: Array<{ + id: string; + createdAt: any; + updatedAt: any; + enabled: boolean; + languageCode: LanguageCode; + name: string; + currencyCode: CurrencyCode; + price: number; + priceWithTax: number; + stockOnHand: number; + trackInventory: GlobalFlag; + sku: string; + taxRateApplied: { id: string; name: string; value: number }; + taxCategory: { id: string; name: string }; + options: Array<{ id: string; code: string; languageCode: LanguageCode; name: string }>; + facetValues: Array<{ id: string; code: string; name: string; facet: { id: string; name: string } }>; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + channels: Array<{ id: string; code: string }>; + } | null>; +}; export type UpdateProductVariantsMutationVariables = Exact<{ - input: Array | UpdateProductVariantInput; -}>; - - -export type UpdateProductVariantsMutation = { updateProductVariants: Array<{ id: string, createdAt: any, updatedAt: any, enabled: boolean, languageCode: LanguageCode, name: string, currencyCode: CurrencyCode, price: number, priceWithTax: number, stockOnHand: number, trackInventory: GlobalFlag, sku: string, taxRateApplied: { id: string, name: string, value: number }, taxCategory: { id: string, name: string }, options: Array<{ id: string, code: string, languageCode: LanguageCode, name: string }>, facetValues: Array<{ id: string, code: string, name: string, facet: { id: string, name: string } }>, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, channels: Array<{ id: string, code: string }> } | null> }; + input: Array | UpdateProductVariantInput; +}>; + +export type UpdateProductVariantsMutation = { + updateProductVariants: Array<{ + id: string; + createdAt: any; + updatedAt: any; + enabled: boolean; + languageCode: LanguageCode; + name: string; + currencyCode: CurrencyCode; + price: number; + priceWithTax: number; + stockOnHand: number; + trackInventory: GlobalFlag; + sku: string; + taxRateApplied: { id: string; name: string; value: number }; + taxCategory: { id: string; name: string }; + options: Array<{ id: string; code: string; languageCode: LanguageCode; name: string }>; + facetValues: Array<{ id: string; code: string; name: string; facet: { id: string; name: string } }>; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + channels: Array<{ id: string; code: string }>; + } | null>; +}; export type UpdateTaxRateMutationVariables = Exact<{ - input: UpdateTaxRateInput; + input: UpdateTaxRateInput; }>; - -export type UpdateTaxRateMutation = { updateTaxRate: { id: string, name: string, enabled: boolean, value: number, category: { id: string, name: string }, zone: { id: string, name: string }, customerGroup?: { id: string, name: string } | null } }; +export type UpdateTaxRateMutation = { + updateTaxRate: { + id: string; + name: string; + enabled: boolean; + value: number; + category: { id: string; name: string }; + zone: { id: string; name: string }; + customerGroup?: { id: string; name: string } | null; + }; +}; export type CreateFacetMutationVariables = Exact<{ - input: CreateFacetInput; -}>; - - -export type CreateFacetMutation = { createFacet: { id: string, languageCode: LanguageCode, isPrivate: boolean, code: string, name: string, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, values: Array<{ id: string, languageCode: LanguageCode, code: string, name: string, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, facet: { id: string, name: string } }> } }; + input: CreateFacetInput; +}>; + +export type CreateFacetMutation = { + createFacet: { + id: string; + languageCode: LanguageCode; + isPrivate: boolean; + code: string; + name: string; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + values: Array<{ + id: string; + languageCode: LanguageCode; + code: string; + name: string; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + facet: { id: string; name: string }; + }>; + }; +}; export type UpdateFacetMutationVariables = Exact<{ - input: UpdateFacetInput; -}>; - - -export type UpdateFacetMutation = { updateFacet: { id: string, languageCode: LanguageCode, isPrivate: boolean, code: string, name: string, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, values: Array<{ id: string, languageCode: LanguageCode, code: string, name: string, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, facet: { id: string, name: string } }> } }; + input: UpdateFacetInput; +}>; + +export type UpdateFacetMutation = { + updateFacet: { + id: string; + languageCode: LanguageCode; + isPrivate: boolean; + code: string; + name: string; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + values: Array<{ + id: string; + languageCode: LanguageCode; + code: string; + name: string; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + facet: { id: string; name: string }; + }>; + }; +}; export type GetCustomerListQueryVariables = Exact<{ - options?: InputMaybe; + options?: InputMaybe; }>; - -export type GetCustomerListQuery = { customers: { totalItems: number, items: Array<{ id: string, title?: string | null, firstName: string, lastName: string, emailAddress: string, phoneNumber?: string | null, user?: { id: string, verified: boolean } | null }> } }; +export type GetCustomerListQuery = { + customers: { + totalItems: number; + items: Array<{ + id: string; + title?: string | null; + firstName: string; + lastName: string; + emailAddress: string; + phoneNumber?: string | null; + user?: { id: string; verified: boolean } | null; + }>; + }; +}; export type GetAssetListQueryVariables = Exact<{ - options?: InputMaybe; + options?: InputMaybe; }>; - -export type GetAssetListQuery = { assets: { totalItems: number, items: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }> } }; +export type GetAssetListQuery = { + assets: { + totalItems: number; + items: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + }; +}; export type CreateRoleMutationVariables = Exact<{ - input: CreateRoleInput; + input: CreateRoleInput; }>; - -export type CreateRoleMutation = { createRole: { id: string, code: string, description: string, permissions: Array, channels: Array<{ id: string, code: string, token: string }> } }; +export type CreateRoleMutation = { + createRole: { + id: string; + code: string; + description: string; + permissions: Array; + channels: Array<{ id: string; code: string; token: string }>; + }; +}; export type CreateCollectionMutationVariables = Exact<{ - input: CreateCollectionInput; -}>; - - -export type CreateCollectionMutation = { createCollection: { id: string, name: string, slug: string, description: string, isPrivate: boolean, languageCode?: LanguageCode | null, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, filters: Array<{ code: string, args: Array<{ name: string, value: string }> }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string, slug: string, description: string }>, parent?: { id: string, name: string } | null, children?: Array<{ id: string, name: string, position: number }> | null } }; + input: CreateCollectionInput; +}>; + +export type CreateCollectionMutation = { + createCollection: { + id: string; + name: string; + slug: string; + description: string; + isPrivate: boolean; + languageCode?: LanguageCode | null; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + filters: Array<{ code: string; args: Array<{ name: string; value: string }> }>; + translations: Array<{ + id: string; + languageCode: LanguageCode; + name: string; + slug: string; + description: string; + }>; + parent?: { id: string; name: string } | null; + children?: Array<{ id: string; name: string; position: number }> | null; + }; +}; export type UpdateCollectionMutationVariables = Exact<{ - input: UpdateCollectionInput; -}>; - - -export type UpdateCollectionMutation = { updateCollection: { id: string, name: string, slug: string, description: string, isPrivate: boolean, languageCode?: LanguageCode | null, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, filters: Array<{ code: string, args: Array<{ name: string, value: string }> }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string, slug: string, description: string }>, parent?: { id: string, name: string } | null, children?: Array<{ id: string, name: string, position: number }> | null } }; + input: UpdateCollectionInput; +}>; + +export type UpdateCollectionMutation = { + updateCollection: { + id: string; + name: string; + slug: string; + description: string; + isPrivate: boolean; + languageCode?: LanguageCode | null; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + filters: Array<{ code: string; args: Array<{ name: string; value: string }> }>; + translations: Array<{ + id: string; + languageCode: LanguageCode; + name: string; + slug: string; + description: string; + }>; + parent?: { id: string; name: string } | null; + children?: Array<{ id: string; name: string; position: number }> | null; + }; +}; export type GetCustomerQueryVariables = Exact<{ - id: Scalars['ID']; - orderListOptions?: InputMaybe; -}>; - - -export type GetCustomerQuery = { customer?: { id: string, title?: string | null, firstName: string, lastName: string, phoneNumber?: string | null, emailAddress: string, orders: { totalItems: number, items: Array<{ id: string, code: string, state: string, total: number, currencyCode: CurrencyCode, updatedAt: any }> }, user?: { id: string, identifier: string, verified: boolean, lastLogin?: any | null } | null, addresses?: Array<{ id: string, fullName?: string | null, company?: string | null, streetLine1: string, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, phoneNumber?: string | null, defaultShippingAddress?: boolean | null, defaultBillingAddress?: boolean | null, country: { id: string, code: string, name: string } }> | null } | null }; + id: Scalars['ID']; + orderListOptions?: InputMaybe; +}>; + +export type GetCustomerQuery = { + customer?: { + id: string; + title?: string | null; + firstName: string; + lastName: string; + phoneNumber?: string | null; + emailAddress: string; + orders: { + totalItems: number; + items: Array<{ + id: string; + code: string; + state: string; + total: number; + currencyCode: CurrencyCode; + updatedAt: any; + }>; + }; + user?: { id: string; identifier: string; verified: boolean; lastLogin?: any | null } | null; + addresses?: Array<{ + id: string; + fullName?: string | null; + company?: string | null; + streetLine1: string; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + phoneNumber?: string | null; + defaultShippingAddress?: boolean | null; + defaultBillingAddress?: boolean | null; + country: { id: string; code: string; name: string }; + }> | null; + } | null; +}; export type AttemptLoginMutationVariables = Exact<{ - username: Scalars['String']; - password: Scalars['String']; - rememberMe?: InputMaybe; + username: Scalars['String']; + password: Scalars['String']; + rememberMe?: InputMaybe; }>; - -export type AttemptLoginMutation = { login: { id: string, identifier: string, channels: Array<{ code: string, token: string, permissions: Array }> } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } }; +export type AttemptLoginMutation = { + login: + | { + id: string; + identifier: string; + channels: Array<{ code: string; token: string; permissions: Array }>; + } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string }; +}; export type GetCountryListQueryVariables = Exact<{ - options?: InputMaybe; + options?: InputMaybe; }>; - -export type GetCountryListQuery = { countries: { totalItems: number, items: Array<{ id: string, code: string, name: string, enabled: boolean }> } }; +export type GetCountryListQuery = { + countries: { + totalItems: number; + items: Array<{ id: string; code: string; name: string; enabled: boolean }>; + }; +}; export type UpdateCountryMutationVariables = Exact<{ - input: UpdateCountryInput; + input: UpdateCountryInput; }>; - -export type UpdateCountryMutation = { updateCountry: { id: string, code: string, name: string, enabled: boolean, translations: Array<{ id: string, languageCode: LanguageCode, name: string }> } }; +export type UpdateCountryMutation = { + updateCountry: { + id: string; + code: string; + name: string; + enabled: boolean; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + }; +}; export type GetFacetListQueryVariables = Exact<{ - options?: InputMaybe; -}>; - - -export type GetFacetListQuery = { facets: { totalItems: number, items: Array<{ id: string, languageCode: LanguageCode, isPrivate: boolean, code: string, name: string, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, values: Array<{ id: string, languageCode: LanguageCode, code: string, name: string, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, facet: { id: string, name: string } }> }> } }; + options?: InputMaybe; +}>; + +export type GetFacetListQuery = { + facets: { + totalItems: number; + items: Array<{ + id: string; + languageCode: LanguageCode; + isPrivate: boolean; + code: string; + name: string; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + values: Array<{ + id: string; + languageCode: LanguageCode; + code: string; + name: string; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + facet: { id: string; name: string }; + }>; + }>; + }; +}; export type GetFacetListSimpleQueryVariables = Exact<{ - options?: InputMaybe; + options?: InputMaybe; }>; - -export type GetFacetListSimpleQuery = { facets: { totalItems: number, items: Array<{ id: string, name: string }> } }; +export type GetFacetListSimpleQuery = { + facets: { totalItems: number; items: Array<{ id: string; name: string }> }; +}; export type DeleteProductMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - export type DeleteProductMutation = { deleteProduct: { result: DeletionResult } }; export type GetProductSimpleQueryVariables = Exact<{ - id?: InputMaybe; - slug?: InputMaybe; + id?: InputMaybe; + slug?: InputMaybe; }>; - -export type GetProductSimpleQuery = { product?: { id: string, slug: string } | null }; +export type GetProductSimpleQuery = { product?: { id: string; slug: string } | null }; export type GetStockMovementQueryVariables = Exact<{ - id: Scalars['ID']; -}>; - - -export type GetStockMovementQuery = { product?: { id: string, variants: Array<{ id: string, stockOnHand: number, stockAllocated: number, stockMovements: { totalItems: number, items: Array<{ id: string, type: StockMovementType, quantity: number } | { id: string, type: StockMovementType, quantity: number } | { id: string, type: StockMovementType, quantity: number } | { id: string, type: StockMovementType, quantity: number } | { id: string, type: StockMovementType, quantity: number } | { id: string, type: StockMovementType, quantity: number }> } }> } | null }; + id: Scalars['ID']; +}>; + +export type GetStockMovementQuery = { + product?: { + id: string; + variants: Array<{ + id: string; + stockOnHand: number; + stockAllocated: number; + stockMovements: { + totalItems: number; + items: Array< + | { id: string; type: StockMovementType; quantity: number } + | { id: string; type: StockMovementType; quantity: number } + | { id: string; type: StockMovementType; quantity: number } + | { id: string; type: StockMovementType; quantity: number } + | { id: string; type: StockMovementType; quantity: number } + | { id: string; type: StockMovementType; quantity: number } + >; + }; + }>; + } | null; +}; export type GetRunningJobsQueryVariables = Exact<{ - options?: InputMaybe; + options?: InputMaybe; }>; - -export type GetRunningJobsQuery = { jobs: { totalItems: number, items: Array<{ id: string, queueName: string, state: JobState, isSettled: boolean, duration: number }> } }; +export type GetRunningJobsQuery = { + jobs: { + totalItems: number; + items: Array<{ + id: string; + queueName: string; + state: JobState; + isSettled: boolean; + duration: number; + }>; + }; +}; export type CreatePromotionMutationVariables = Exact<{ - input: CreatePromotionInput; + input: CreatePromotionInput; }>; +export type CreatePromotionMutation = { + createPromotion: + | { errorCode: ErrorCode; message: string } + | { + id: string; + createdAt: any; + updatedAt: any; + couponCode?: string | null; + startsAt?: any | null; + endsAt?: any | null; + name: string; + enabled: boolean; + conditions: Array<{ code: string; args: Array<{ name: string; value: string }> }>; + actions: Array<{ code: string; args: Array<{ name: string; value: string }> }>; + }; +}; -export type CreatePromotionMutation = { createPromotion: { errorCode: ErrorCode, message: string } | { id: string, createdAt: any, updatedAt: any, couponCode?: string | null, startsAt?: any | null, endsAt?: any | null, name: string, enabled: boolean, conditions: Array<{ code: string, args: Array<{ name: string, value: string }> }>, actions: Array<{ code: string, args: Array<{ name: string, value: string }> }> } }; - -export type MeQueryVariables = Exact<{ [key: string]: never; }>; - +export type MeQueryVariables = Exact<{ [key: string]: never }>; -export type MeQuery = { me?: { id: string, identifier: string, channels: Array<{ code: string, token: string, permissions: Array }> } | null }; +export type MeQuery = { + me?: { + id: string; + identifier: string; + channels: Array<{ code: string; token: string; permissions: Array }>; + } | null; +}; export type CreateChannelMutationVariables = Exact<{ - input: CreateChannelInput; + input: CreateChannelInput; }>; - -export type CreateChannelMutation = { createChannel: { id: string, code: string, token: string, currencyCode: CurrencyCode, defaultLanguageCode: LanguageCode, pricesIncludeTax: boolean, defaultShippingZone?: { id: string } | null, defaultTaxZone?: { id: string } | null } | { errorCode: ErrorCode, message: string, languageCode: string } }; +export type CreateChannelMutation = { + createChannel: + | { + id: string; + code: string; + token: string; + currencyCode: CurrencyCode; + defaultLanguageCode: LanguageCode; + pricesIncludeTax: boolean; + defaultShippingZone?: { id: string } | null; + defaultTaxZone?: { id: string } | null; + } + | { errorCode: ErrorCode; message: string; languageCode: string }; +}; export type DeleteProductVariantMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type DeleteProductVariantMutation = { deleteProductVariant: { result: DeletionResult, message?: string | null } }; +export type DeleteProductVariantMutation = { + deleteProductVariant: { result: DeletionResult; message?: string | null }; +}; export type AssignProductsToChannelMutationVariables = Exact<{ - input: AssignProductsToChannelInput; -}>; - - -export type AssignProductsToChannelMutation = { assignProductsToChannel: Array<{ id: string, enabled: boolean, languageCode: LanguageCode, name: string, slug: string, description: string, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, translations: Array<{ languageCode: LanguageCode, name: string, slug: string, description: string }>, optionGroups: Array<{ id: string, languageCode: LanguageCode, code: string, name: string }>, variants: Array<{ id: string, createdAt: any, updatedAt: any, enabled: boolean, languageCode: LanguageCode, name: string, currencyCode: CurrencyCode, price: number, priceWithTax: number, stockOnHand: number, trackInventory: GlobalFlag, sku: string, taxRateApplied: { id: string, name: string, value: number }, taxCategory: { id: string, name: string }, options: Array<{ id: string, code: string, languageCode: LanguageCode, name: string }>, facetValues: Array<{ id: string, code: string, name: string, facet: { id: string, name: string } }>, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, channels: Array<{ id: string, code: string }> }>, facetValues: Array<{ id: string, code: string, name: string, facet: { id: string, name: string } }>, channels: Array<{ id: string, code: string }> }> }; + input: AssignProductsToChannelInput; +}>; + +export type AssignProductsToChannelMutation = { + assignProductsToChannel: Array<{ + id: string; + enabled: boolean; + languageCode: LanguageCode; + name: string; + slug: string; + description: string; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + translations: Array<{ languageCode: LanguageCode; name: string; slug: string; description: string }>; + optionGroups: Array<{ id: string; languageCode: LanguageCode; code: string; name: string }>; + variants: Array<{ + id: string; + createdAt: any; + updatedAt: any; + enabled: boolean; + languageCode: LanguageCode; + name: string; + currencyCode: CurrencyCode; + price: number; + priceWithTax: number; + stockOnHand: number; + trackInventory: GlobalFlag; + sku: string; + taxRateApplied: { id: string; name: string; value: number }; + taxCategory: { id: string; name: string }; + options: Array<{ id: string; code: string; languageCode: LanguageCode; name: string }>; + facetValues: Array<{ + id: string; + code: string; + name: string; + facet: { id: string; name: string }; + }>; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + channels: Array<{ id: string; code: string }>; + }>; + facetValues: Array<{ id: string; code: string; name: string; facet: { id: string; name: string } }>; + channels: Array<{ id: string; code: string }>; + }>; +}; export type RemoveProductsFromChannelMutationVariables = Exact<{ - input: RemoveProductsFromChannelInput; -}>; - - -export type RemoveProductsFromChannelMutation = { removeProductsFromChannel: Array<{ id: string, enabled: boolean, languageCode: LanguageCode, name: string, slug: string, description: string, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, translations: Array<{ languageCode: LanguageCode, name: string, slug: string, description: string }>, optionGroups: Array<{ id: string, languageCode: LanguageCode, code: string, name: string }>, variants: Array<{ id: string, createdAt: any, updatedAt: any, enabled: boolean, languageCode: LanguageCode, name: string, currencyCode: CurrencyCode, price: number, priceWithTax: number, stockOnHand: number, trackInventory: GlobalFlag, sku: string, taxRateApplied: { id: string, name: string, value: number }, taxCategory: { id: string, name: string }, options: Array<{ id: string, code: string, languageCode: LanguageCode, name: string }>, facetValues: Array<{ id: string, code: string, name: string, facet: { id: string, name: string } }>, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, channels: Array<{ id: string, code: string }> }>, facetValues: Array<{ id: string, code: string, name: string, facet: { id: string, name: string } }>, channels: Array<{ id: string, code: string }> }> }; + input: RemoveProductsFromChannelInput; +}>; + +export type RemoveProductsFromChannelMutation = { + removeProductsFromChannel: Array<{ + id: string; + enabled: boolean; + languageCode: LanguageCode; + name: string; + slug: string; + description: string; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + translations: Array<{ languageCode: LanguageCode; name: string; slug: string; description: string }>; + optionGroups: Array<{ id: string; languageCode: LanguageCode; code: string; name: string }>; + variants: Array<{ + id: string; + createdAt: any; + updatedAt: any; + enabled: boolean; + languageCode: LanguageCode; + name: string; + currencyCode: CurrencyCode; + price: number; + priceWithTax: number; + stockOnHand: number; + trackInventory: GlobalFlag; + sku: string; + taxRateApplied: { id: string; name: string; value: number }; + taxCategory: { id: string; name: string }; + options: Array<{ id: string; code: string; languageCode: LanguageCode; name: string }>; + facetValues: Array<{ + id: string; + code: string; + name: string; + facet: { id: string; name: string }; + }>; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + channels: Array<{ id: string; code: string }>; + }>; + facetValues: Array<{ id: string; code: string; name: string; facet: { id: string; name: string } }>; + channels: Array<{ id: string; code: string }>; + }>; +}; export type AssignProductVariantsToChannelMutationVariables = Exact<{ - input: AssignProductVariantsToChannelInput; -}>; - - -export type AssignProductVariantsToChannelMutation = { assignProductVariantsToChannel: Array<{ id: string, createdAt: any, updatedAt: any, enabled: boolean, languageCode: LanguageCode, name: string, currencyCode: CurrencyCode, price: number, priceWithTax: number, stockOnHand: number, trackInventory: GlobalFlag, sku: string, taxRateApplied: { id: string, name: string, value: number }, taxCategory: { id: string, name: string }, options: Array<{ id: string, code: string, languageCode: LanguageCode, name: string }>, facetValues: Array<{ id: string, code: string, name: string, facet: { id: string, name: string } }>, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, channels: Array<{ id: string, code: string }> }> }; + input: AssignProductVariantsToChannelInput; +}>; + +export type AssignProductVariantsToChannelMutation = { + assignProductVariantsToChannel: Array<{ + id: string; + createdAt: any; + updatedAt: any; + enabled: boolean; + languageCode: LanguageCode; + name: string; + currencyCode: CurrencyCode; + price: number; + priceWithTax: number; + stockOnHand: number; + trackInventory: GlobalFlag; + sku: string; + taxRateApplied: { id: string; name: string; value: number }; + taxCategory: { id: string; name: string }; + options: Array<{ id: string; code: string; languageCode: LanguageCode; name: string }>; + facetValues: Array<{ id: string; code: string; name: string; facet: { id: string; name: string } }>; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + channels: Array<{ id: string; code: string }>; + }>; +}; export type RemoveProductVariantsFromChannelMutationVariables = Exact<{ - input: RemoveProductVariantsFromChannelInput; -}>; - - -export type RemoveProductVariantsFromChannelMutation = { removeProductVariantsFromChannel: Array<{ id: string, createdAt: any, updatedAt: any, enabled: boolean, languageCode: LanguageCode, name: string, currencyCode: CurrencyCode, price: number, priceWithTax: number, stockOnHand: number, trackInventory: GlobalFlag, sku: string, taxRateApplied: { id: string, name: string, value: number }, taxCategory: { id: string, name: string }, options: Array<{ id: string, code: string, languageCode: LanguageCode, name: string }>, facetValues: Array<{ id: string, code: string, name: string, facet: { id: string, name: string } }>, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, channels: Array<{ id: string, code: string }> }> }; + input: RemoveProductVariantsFromChannelInput; +}>; + +export type RemoveProductVariantsFromChannelMutation = { + removeProductVariantsFromChannel: Array<{ + id: string; + createdAt: any; + updatedAt: any; + enabled: boolean; + languageCode: LanguageCode; + name: string; + currencyCode: CurrencyCode; + price: number; + priceWithTax: number; + stockOnHand: number; + trackInventory: GlobalFlag; + sku: string; + taxRateApplied: { id: string; name: string; value: number }; + taxCategory: { id: string; name: string }; + options: Array<{ id: string; code: string; languageCode: LanguageCode; name: string }>; + facetValues: Array<{ id: string; code: string; name: string; facet: { id: string; name: string } }>; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + channels: Array<{ id: string; code: string }>; + }>; +}; export type UpdateAssetMutationVariables = Exact<{ - input: UpdateAssetInput; + input: UpdateAssetInput; }>; - -export type UpdateAssetMutation = { updateAsset: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string, tags: Array<{ id: string, value: string }>, focalPoint?: { x: number, y: number } | null } }; +export type UpdateAssetMutation = { + updateAsset: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + tags: Array<{ id: string; value: string }>; + focalPoint?: { x: number; y: number } | null; + }; +}; export type DeleteAssetMutationVariables = Exact<{ - input: DeleteAssetInput; + input: DeleteAssetInput; }>; - -export type DeleteAssetMutation = { deleteAsset: { result: DeletionResult, message?: string | null } }; +export type DeleteAssetMutation = { deleteAsset: { result: DeletionResult; message?: string | null } }; export type UpdateChannelMutationVariables = Exact<{ - input: UpdateChannelInput; + input: UpdateChannelInput; }>; - -export type UpdateChannelMutation = { updateChannel: { id: string, code: string, token: string, currencyCode: CurrencyCode, defaultLanguageCode: LanguageCode, pricesIncludeTax: boolean, defaultShippingZone?: { id: string } | null, defaultTaxZone?: { id: string } | null } | { errorCode: ErrorCode, message: string, languageCode: string } }; +export type UpdateChannelMutation = { + updateChannel: + | { + id: string; + code: string; + token: string; + currencyCode: CurrencyCode; + defaultLanguageCode: LanguageCode; + pricesIncludeTax: boolean; + defaultShippingZone?: { id: string } | null; + defaultTaxZone?: { id: string } | null; + } + | { errorCode: ErrorCode; message: string; languageCode: string }; +}; export type GetCustomerHistoryQueryVariables = Exact<{ - id: Scalars['ID']; - options?: InputMaybe; + id: Scalars['ID']; + options?: InputMaybe; }>; - -export type GetCustomerHistoryQuery = { customer?: { id: string, history: { totalItems: number, items: Array<{ id: string, type: HistoryEntryType, data: any, administrator?: { id: string } | null }> } } | null }; +export type GetCustomerHistoryQuery = { + customer?: { + id: string; + history: { + totalItems: number; + items: Array<{ + id: string; + type: HistoryEntryType; + data: any; + administrator?: { id: string } | null; + }>; + }; + } | null; +}; export type GetOrderQueryVariables = Exact<{ - id: Scalars['ID']; -}>; - - -export type GetOrderQuery = { order?: { id: string, createdAt: any, updatedAt: any, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, total: number, totalWithTax: number, totalQuantity: number, currencyCode: CurrencyCode, shipping: number, shippingWithTax: number, customer?: { id: string, firstName: string, lastName: string } | null, lines: Array<{ id: string, unitPrice: number, unitPriceWithTax: number, quantity: number, taxRate: number, linePriceWithTax: number, featuredAsset?: { preview: string } | null, productVariant: { id: string, name: string, sku: string }, taxLines: Array<{ description: string, taxRate: number }> }>, surcharges: Array<{ id: string, description: string, sku?: string | null, price: number, priceWithTax: number }>, shippingLines: Array<{ priceWithTax: number, shippingMethod: { id: string, code: string, name: string, description: string } }>, shippingAddress?: { fullName?: string | null, company?: string | null, streetLine1?: string | null, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, country?: string | null, phoneNumber?: string | null } | null, payments?: Array<{ id: string, transactionId?: string | null, amount: number, method: string, state: string, nextStates: Array, metadata?: any | null, refunds: Array<{ id: string, total: number, reason?: string | null }> }> | null, fulfillments?: Array<{ id: string, state: string, method: string, trackingCode?: string | null, lines: Array<{ orderLineId: string, quantity: number }> }> | null } | null }; + id: Scalars['ID']; +}>; + +export type GetOrderQuery = { + order?: { + id: string; + createdAt: any; + updatedAt: any; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + total: number; + totalWithTax: number; + totalQuantity: number; + currencyCode: CurrencyCode; + shipping: number; + shippingWithTax: number; + customer?: { id: string; firstName: string; lastName: string } | null; + lines: Array<{ + id: string; + unitPrice: number; + unitPriceWithTax: number; + quantity: number; + taxRate: number; + linePriceWithTax: number; + featuredAsset?: { preview: string } | null; + productVariant: { id: string; name: string; sku: string }; + taxLines: Array<{ description: string; taxRate: number }>; + }>; + surcharges: Array<{ + id: string; + description: string; + sku?: string | null; + price: number; + priceWithTax: number; + }>; + shippingLines: Array<{ + priceWithTax: number; + shippingMethod: { id: string; code: string; name: string; description: string }; + }>; + shippingAddress?: { + fullName?: string | null; + company?: string | null; + streetLine1?: string | null; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + country?: string | null; + phoneNumber?: string | null; + } | null; + payments?: Array<{ + id: string; + transactionId?: string | null; + amount: number; + method: string; + state: string; + nextStates: Array; + metadata?: any | null; + refunds: Array<{ id: string; total: number; reason?: string | null }>; + }> | null; + fulfillments?: Array<{ + id: string; + state: string; + method: string; + trackingCode?: string | null; + lines: Array<{ orderLineId: string; quantity: number }>; + }> | null; + } | null; +}; export type CreateCustomerGroupMutationVariables = Exact<{ - input: CreateCustomerGroupInput; + input: CreateCustomerGroupInput; }>; - -export type CreateCustomerGroupMutation = { createCustomerGroup: { id: string, name: string, customers: { totalItems: number, items: Array<{ id: string }> } } }; +export type CreateCustomerGroupMutation = { + createCustomerGroup: { + id: string; + name: string; + customers: { totalItems: number; items: Array<{ id: string }> }; + }; +}; export type RemoveCustomersFromGroupMutationVariables = Exact<{ - groupId: Scalars['ID']; - customerIds: Array | Scalars['ID']; + groupId: Scalars['ID']; + customerIds: Array | Scalars['ID']; }>; - -export type RemoveCustomersFromGroupMutation = { removeCustomersFromGroup: { id: string, name: string, customers: { totalItems: number, items: Array<{ id: string }> } } }; +export type RemoveCustomersFromGroupMutation = { + removeCustomersFromGroup: { + id: string; + name: string; + customers: { totalItems: number; items: Array<{ id: string }> }; + }; +}; export type CreateFulfillmentMutationVariables = Exact<{ - input: FulfillOrderInput; -}>; - - -export type CreateFulfillmentMutation = { addFulfillmentToOrder: { errorCode: ErrorCode, message: string, fulfillmentHandlerError: string } | { errorCode: ErrorCode, message: string } | { id: string, state: string, nextStates: Array, method: string, trackingCode?: string | null, lines: Array<{ orderLineId: string, quantity: number }> } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } }; + input: FulfillOrderInput; +}>; + +export type CreateFulfillmentMutation = { + addFulfillmentToOrder: + | { errorCode: ErrorCode; message: string; fulfillmentHandlerError: string } + | { errorCode: ErrorCode; message: string } + | { + id: string; + state: string; + nextStates: Array; + method: string; + trackingCode?: string | null; + lines: Array<{ orderLineId: string; quantity: number }>; + } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string }; +}; export type TransitFulfillmentMutationVariables = Exact<{ - id: Scalars['ID']; - state: Scalars['String']; -}>; - - -export type TransitFulfillmentMutation = { transitionFulfillmentToState: { id: string, state: string, nextStates: Array, method: string, trackingCode?: string | null, lines: Array<{ orderLineId: string, quantity: number }> } | { errorCode: ErrorCode, message: string, transitionError: string, fromState: string, toState: string } }; + id: Scalars['ID']; + state: Scalars['String']; +}>; + +export type TransitFulfillmentMutation = { + transitionFulfillmentToState: + | { + id: string; + state: string; + nextStates: Array; + method: string; + trackingCode?: string | null; + lines: Array<{ orderLineId: string; quantity: number }>; + } + | { + errorCode: ErrorCode; + message: string; + transitionError: string; + fromState: string; + toState: string; + }; +}; export type GetOrderFulfillmentsQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetOrderFulfillmentsQuery = { order?: { id: string, state: string, fulfillments?: Array<{ id: string, state: string, nextStates: Array, method: string, summary: Array<{ quantity: number, orderLine: { id: string } }> }> | null } | null }; +export type GetOrderFulfillmentsQuery = { + order?: { + id: string; + state: string; + fulfillments?: Array<{ + id: string; + state: string; + nextStates: Array; + method: string; + summary: Array<{ quantity: number; orderLine: { id: string } }>; + }> | null; + } | null; +}; export type GetOrderListQueryVariables = Exact<{ - options?: InputMaybe; -}>; - - -export type GetOrderListQuery = { orders: { totalItems: number, items: Array<{ id: string, createdAt: any, updatedAt: any, code: string, active: boolean, state: string, total: number, totalWithTax: number, totalQuantity: number, currencyCode: CurrencyCode, customer?: { id: string, firstName: string, lastName: string } | null }> } }; + options?: InputMaybe; +}>; + +export type GetOrderListQuery = { + orders: { + totalItems: number; + items: Array<{ + id: string; + createdAt: any; + updatedAt: any; + code: string; + active: boolean; + state: string; + total: number; + totalWithTax: number; + totalQuantity: number; + currencyCode: CurrencyCode; + customer?: { id: string; firstName: string; lastName: string } | null; + }>; + }; +}; export type CreateAddressMutationVariables = Exact<{ - id: Scalars['ID']; - input: CreateAddressInput; -}>; - - -export type CreateAddressMutation = { createCustomerAddress: { id: string, fullName?: string | null, company?: string | null, streetLine1: string, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, phoneNumber?: string | null, defaultShippingAddress?: boolean | null, defaultBillingAddress?: boolean | null, country: { code: string, name: string } } }; + id: Scalars['ID']; + input: CreateAddressInput; +}>; + +export type CreateAddressMutation = { + createCustomerAddress: { + id: string; + fullName?: string | null; + company?: string | null; + streetLine1: string; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + phoneNumber?: string | null; + defaultShippingAddress?: boolean | null; + defaultBillingAddress?: boolean | null; + country: { code: string; name: string }; + }; +}; export type UpdateAddressMutationVariables = Exact<{ - input: UpdateAddressInput; + input: UpdateAddressInput; }>; - -export type UpdateAddressMutation = { updateCustomerAddress: { id: string, defaultShippingAddress?: boolean | null, defaultBillingAddress?: boolean | null, country: { code: string, name: string } } }; +export type UpdateAddressMutation = { + updateCustomerAddress: { + id: string; + defaultShippingAddress?: boolean | null; + defaultBillingAddress?: boolean | null; + country: { code: string; name: string }; + }; +}; export type CreateCustomerMutationVariables = Exact<{ - input: CreateCustomerInput; - password?: InputMaybe; -}>; - - -export type CreateCustomerMutation = { createCustomer: { id: string, title?: string | null, firstName: string, lastName: string, phoneNumber?: string | null, emailAddress: string, user?: { id: string, identifier: string, verified: boolean, lastLogin?: any | null } | null, addresses?: Array<{ id: string, fullName?: string | null, company?: string | null, streetLine1: string, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, phoneNumber?: string | null, defaultShippingAddress?: boolean | null, defaultBillingAddress?: boolean | null, country: { id: string, code: string, name: string } }> | null } | { errorCode: ErrorCode, message: string } }; + input: CreateCustomerInput; + password?: InputMaybe; +}>; + +export type CreateCustomerMutation = { + createCustomer: + | { + id: string; + title?: string | null; + firstName: string; + lastName: string; + phoneNumber?: string | null; + emailAddress: string; + user?: { id: string; identifier: string; verified: boolean; lastLogin?: any | null } | null; + addresses?: Array<{ + id: string; + fullName?: string | null; + company?: string | null; + streetLine1: string; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + phoneNumber?: string | null; + defaultShippingAddress?: boolean | null; + defaultBillingAddress?: boolean | null; + country: { id: string; code: string; name: string }; + }> | null; + } + | { errorCode: ErrorCode; message: string }; +}; export type UpdateCustomerMutationVariables = Exact<{ - input: UpdateCustomerInput; -}>; - - -export type UpdateCustomerMutation = { updateCustomer: { id: string, title?: string | null, firstName: string, lastName: string, phoneNumber?: string | null, emailAddress: string, user?: { id: string, identifier: string, verified: boolean, lastLogin?: any | null } | null, addresses?: Array<{ id: string, fullName?: string | null, company?: string | null, streetLine1: string, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, phoneNumber?: string | null, defaultShippingAddress?: boolean | null, defaultBillingAddress?: boolean | null, country: { id: string, code: string, name: string } }> | null } | { errorCode: ErrorCode, message: string } }; + input: UpdateCustomerInput; +}>; + +export type UpdateCustomerMutation = { + updateCustomer: + | { + id: string; + title?: string | null; + firstName: string; + lastName: string; + phoneNumber?: string | null; + emailAddress: string; + user?: { id: string; identifier: string; verified: boolean; lastLogin?: any | null } | null; + addresses?: Array<{ + id: string; + fullName?: string | null; + company?: string | null; + streetLine1: string; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + phoneNumber?: string | null; + defaultShippingAddress?: boolean | null; + defaultBillingAddress?: boolean | null; + country: { id: string; code: string; name: string }; + }> | null; + } + | { errorCode: ErrorCode; message: string }; +}; export type DeleteCustomerMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - export type DeleteCustomerMutation = { deleteCustomer: { result: DeletionResult } }; export type UpdateCustomerNoteMutationVariables = Exact<{ - input: UpdateCustomerNoteInput; + input: UpdateCustomerNoteInput; }>; - -export type UpdateCustomerNoteMutation = { updateCustomerNote: { id: string, data: any, isPublic: boolean } }; +export type UpdateCustomerNoteMutation = { updateCustomerNote: { id: string; data: any; isPublic: boolean } }; export type DeleteCustomerNoteMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type DeleteCustomerNoteMutation = { deleteCustomerNote: { result: DeletionResult, message?: string | null } }; +export type DeleteCustomerNoteMutation = { + deleteCustomerNote: { result: DeletionResult; message?: string | null }; +}; export type UpdateCustomerGroupMutationVariables = Exact<{ - input: UpdateCustomerGroupInput; + input: UpdateCustomerGroupInput; }>; - -export type UpdateCustomerGroupMutation = { updateCustomerGroup: { id: string, name: string, customers: { totalItems: number, items: Array<{ id: string }> } } }; +export type UpdateCustomerGroupMutation = { + updateCustomerGroup: { + id: string; + name: string; + customers: { totalItems: number; items: Array<{ id: string }> }; + }; +}; export type DeleteCustomerGroupMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type DeleteCustomerGroupMutation = { deleteCustomerGroup: { result: DeletionResult, message?: string | null } }; +export type DeleteCustomerGroupMutation = { + deleteCustomerGroup: { result: DeletionResult; message?: string | null }; +}; export type GetCustomerGroupsQueryVariables = Exact<{ - options?: InputMaybe; + options?: InputMaybe; }>; - -export type GetCustomerGroupsQuery = { customerGroups: { totalItems: number, items: Array<{ id: string, name: string }> } }; +export type GetCustomerGroupsQuery = { + customerGroups: { totalItems: number; items: Array<{ id: string; name: string }> }; +}; export type GetCustomerGroupQueryVariables = Exact<{ - id: Scalars['ID']; - options?: InputMaybe; + id: Scalars['ID']; + options?: InputMaybe; }>; - -export type GetCustomerGroupQuery = { customerGroup?: { id: string, name: string, customers: { totalItems: number, items: Array<{ id: string }> } } | null }; +export type GetCustomerGroupQuery = { + customerGroup?: { + id: string; + name: string; + customers: { totalItems: number; items: Array<{ id: string }> }; + } | null; +}; export type AddCustomersToGroupMutationVariables = Exact<{ - groupId: Scalars['ID']; - customerIds: Array | Scalars['ID']; + groupId: Scalars['ID']; + customerIds: Array | Scalars['ID']; }>; - -export type AddCustomersToGroupMutation = { addCustomersToGroup: { id: string, name: string, customers: { totalItems: number, items: Array<{ id: string }> } } }; +export type AddCustomersToGroupMutation = { + addCustomersToGroup: { + id: string; + name: string; + customers: { totalItems: number; items: Array<{ id: string }> }; + }; +}; export type GetCustomerWithGroupsQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetCustomerWithGroupsQuery = { customer?: { id: string, groups: Array<{ id: string, name: string }> } | null }; +export type GetCustomerWithGroupsQuery = { + customer?: { id: string; groups: Array<{ id: string; name: string }> } | null; +}; export type AdminTransitionMutationVariables = Exact<{ - id: Scalars['ID']; - state: Scalars['String']; -}>; - - -export type AdminTransitionMutation = { transitionOrderToState?: { id: string, createdAt: any, updatedAt: any, code: string, active: boolean, state: string, total: number, totalWithTax: number, totalQuantity: number, currencyCode: CurrencyCode, customer?: { id: string, firstName: string, lastName: string } | null } | { errorCode: ErrorCode, message: string, transitionError: string, fromState: string, toState: string } | null }; + id: Scalars['ID']; + state: Scalars['String']; +}>; + +export type AdminTransitionMutation = { + transitionOrderToState?: + | { + id: string; + createdAt: any; + updatedAt: any; + code: string; + active: boolean; + state: string; + total: number; + totalWithTax: number; + totalQuantity: number; + currencyCode: CurrencyCode; + customer?: { id: string; firstName: string; lastName: string } | null; + } + | { + errorCode: ErrorCode; + message: string; + transitionError: string; + fromState: string; + toState: string; + } + | null; +}; export type CancelOrderMutationVariables = Exact<{ - input: CancelOrderInput; + input: CancelOrderInput; }>; +export type CancelOrderMutation = { + cancelOrder: + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { id: string; state: string; lines: Array<{ id: string; quantity: number }> } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string }; +}; -export type CancelOrderMutation = { cancelOrder: { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { id: string, state: string, lines: Array<{ id: string, quantity: number }> } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } }; - -export type CanceledOrderFragment = { id: string, state: string, lines: Array<{ id: string, quantity: number }> }; +export type CanceledOrderFragment = { + id: string; + state: string; + lines: Array<{ id: string; quantity: number }>; +}; export type UpdateGlobalSettingsMutationVariables = Exact<{ - input: UpdateGlobalSettingsInput; -}>; - - -export type UpdateGlobalSettingsMutation = { updateGlobalSettings: { errorCode: ErrorCode, message: string } | { id: string, availableLanguages: Array, trackInventory: boolean, outOfStockThreshold: number, serverConfig: { permittedAssetTypes: Array, orderProcess: Array<{ name: string, to: Array }>, permissions: Array<{ name: string, description: string, assignable: boolean }>, customFieldConfig: { Customer: Array<{ name: string } | { name: string } | { name: string } | { name: string } | { name: string } | { name: string } | { name: string } | { name: string } | { name: string }> } } } }; + input: UpdateGlobalSettingsInput; +}>; + +export type UpdateGlobalSettingsMutation = { + updateGlobalSettings: + | { errorCode: ErrorCode; message: string } + | { + id: string; + availableLanguages: Array; + trackInventory: boolean; + outOfStockThreshold: number; + serverConfig: { + permittedAssetTypes: Array; + orderProcess: Array<{ name: string; to: Array }>; + permissions: Array<{ name: string; description: string; assignable: boolean }>; + customFieldConfig: { + Customer: Array< + | { name: string } + | { name: string } + | { name: string } + | { name: string } + | { name: string } + | { name: string } + | { name: string } + | { name: string } + | { name: string } + >; + }; + }; + }; +}; export type UpdateRoleMutationVariables = Exact<{ - input: UpdateRoleInput; + input: UpdateRoleInput; }>; +export type UpdateRoleMutation = { + updateRole: { + id: string; + code: string; + description: string; + permissions: Array; + channels: Array<{ id: string; code: string; token: string }>; + }; +}; -export type UpdateRoleMutation = { updateRole: { id: string, code: string, description: string, permissions: Array, channels: Array<{ id: string, code: string, token: string }> } }; - -export type GetProductsWithVariantPricesQueryVariables = Exact<{ [key: string]: never; }>; - +export type GetProductsWithVariantPricesQueryVariables = Exact<{ [key: string]: never }>; -export type GetProductsWithVariantPricesQuery = { products: { items: Array<{ id: string, slug: string, variants: Array<{ id: string, price: number, priceWithTax: number, sku: string, facetValues: Array<{ id: string, code: string }> }> }> } }; +export type GetProductsWithVariantPricesQuery = { + products: { + items: Array<{ + id: string; + slug: string; + variants: Array<{ + id: string; + price: number; + priceWithTax: number; + sku: string; + facetValues: Array<{ id: string; code: string }>; + }>; + }>; + }; +}; export type CreateProductOptionGroupMutationVariables = Exact<{ - input: CreateProductOptionGroupInput; + input: CreateProductOptionGroupInput; }>; - -export type CreateProductOptionGroupMutation = { createProductOptionGroup: { id: string, code: string, name: string, options: Array<{ id: string, code: string, name: string }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string }> } }; +export type CreateProductOptionGroupMutation = { + createProductOptionGroup: { + id: string; + code: string; + name: string; + options: Array<{ id: string; code: string; name: string }>; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + }; +}; export type AddOptionGroupToProductMutationVariables = Exact<{ - productId: Scalars['ID']; - optionGroupId: Scalars['ID']; + productId: Scalars['ID']; + optionGroupId: Scalars['ID']; }>; - -export type AddOptionGroupToProductMutation = { addOptionGroupToProduct: { id: string, optionGroups: Array<{ id: string, code: string, options: Array<{ id: string, code: string }> }> } }; +export type AddOptionGroupToProductMutation = { + addOptionGroupToProduct: { + id: string; + optionGroups: Array<{ id: string; code: string; options: Array<{ id: string; code: string }> }>; + }; +}; export type CreateShippingMethodMutationVariables = Exact<{ - input: CreateShippingMethodInput; + input: CreateShippingMethodInput; }>; - -export type CreateShippingMethodMutation = { createShippingMethod: { id: string, code: string, name: string, description: string, calculator: { code: string, args: Array<{ name: string, value: string }> }, checker: { code: string, args: Array<{ name: string, value: string }> } } }; +export type CreateShippingMethodMutation = { + createShippingMethod: { + id: string; + code: string; + name: string; + description: string; + calculator: { code: string; args: Array<{ name: string; value: string }> }; + checker: { code: string; args: Array<{ name: string; value: string }> }; + }; +}; export type SettlePaymentMutationVariables = Exact<{ - id: Scalars['ID']; -}>; - - -export type SettlePaymentMutation = { settlePayment: { errorCode: ErrorCode, message: string } | { id: string, transactionId?: string | null, amount: number, method: string, state: string, nextStates: Array, metadata?: any | null, refunds: Array<{ id: string, total: number, reason?: string | null }> } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string, paymentErrorMessage: string } }; + id: Scalars['ID']; +}>; + +export type SettlePaymentMutation = { + settlePayment: + | { errorCode: ErrorCode; message: string } + | { + id: string; + transactionId?: string | null; + amount: number; + method: string; + state: string; + nextStates: Array; + metadata?: any | null; + refunds: Array<{ id: string; total: number; reason?: string | null }>; + } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string; paymentErrorMessage: string }; +}; export type GetOrderHistoryQueryVariables = Exact<{ - id: Scalars['ID']; - options?: InputMaybe; + id: Scalars['ID']; + options?: InputMaybe; }>; - -export type GetOrderHistoryQuery = { order?: { id: string, history: { totalItems: number, items: Array<{ id: string, type: HistoryEntryType, data: any, administrator?: { id: string } | null }> } } | null }; +export type GetOrderHistoryQuery = { + order?: { + id: string; + history: { + totalItems: number; + items: Array<{ + id: string; + type: HistoryEntryType; + data: any; + administrator?: { id: string } | null; + }>; + }; + } | null; +}; export type UpdateShippingMethodMutationVariables = Exact<{ - input: UpdateShippingMethodInput; + input: UpdateShippingMethodInput; }>; - -export type UpdateShippingMethodMutation = { updateShippingMethod: { id: string, code: string, name: string, description: string, calculator: { code: string, args: Array<{ name: string, value: string }> }, checker: { code: string, args: Array<{ name: string, value: string }> } } }; +export type UpdateShippingMethodMutation = { + updateShippingMethod: { + id: string; + code: string; + name: string; + description: string; + calculator: { code: string; args: Array<{ name: string; value: string }> }; + checker: { code: string; args: Array<{ name: string; value: string }> }; + }; +}; export type GetAssetQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; +export type GetAssetQuery = { + asset?: { + width: number; + height: number; + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; +}; -export type GetAssetQuery = { asset?: { width: number, height: number, id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null }; - -export type AssetFragFirstFragment = { id: string, preview: string }; +export type AssetFragFirstFragment = { id: string; preview: string }; export type GetAssetFragmentFirstQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; +export type GetAssetFragmentFirstQuery = { asset?: { id: string; preview: string } | null }; -export type GetAssetFragmentFirstQuery = { asset?: { id: string, preview: string } | null }; - -export type AssetWithTagsAndFocalPointFragment = { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string, focalPoint?: { x: number, y: number } | null, tags: Array<{ id: string, value: string }> }; +export type AssetWithTagsAndFocalPointFragment = { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + focalPoint?: { x: number; y: number } | null; + tags: Array<{ id: string; value: string }>; +}; export type CreateAssetsMutationVariables = Exact<{ - input: Array | CreateAssetInput; -}>; - - -export type CreateAssetsMutation = { createAssets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string, focalPoint?: { x: number, y: number } | null, tags: Array<{ id: string, value: string }> } | { message: string, fileName: string, mimeType: string }> }; + input: Array | CreateAssetInput; +}>; + +export type CreateAssetsMutation = { + createAssets: Array< + | { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + focalPoint?: { x: number; y: number } | null; + tags: Array<{ id: string; value: string }>; + } + | { message: string; fileName: string; mimeType: string } + >; +}; export type DeleteShippingMethodMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type DeleteShippingMethodMutation = { deleteShippingMethod: { result: DeletionResult, message?: string | null } }; +export type DeleteShippingMethodMutation = { + deleteShippingMethod: { result: DeletionResult; message?: string | null }; +}; export type AssignPromotionToChannelMutationVariables = Exact<{ - input: AssignPromotionsToChannelInput; + input: AssignPromotionsToChannelInput; }>; - -export type AssignPromotionToChannelMutation = { assignPromotionsToChannel: Array<{ id: string, name: string }> }; +export type AssignPromotionToChannelMutation = { + assignPromotionsToChannel: Array<{ id: string; name: string }>; +}; export type RemovePromotionFromChannelMutationVariables = Exact<{ - input: RemovePromotionsFromChannelInput; + input: RemovePromotionsFromChannelInput; }>; - -export type RemovePromotionFromChannelMutation = { removePromotionsFromChannel: Array<{ id: string, name: string }> }; +export type RemovePromotionFromChannelMutation = { + removePromotionsFromChannel: Array<{ id: string; name: string }>; +}; export type GetTaxRatesQueryVariables = Exact<{ - options?: InputMaybe; -}>; - - -export type GetTaxRatesQuery = { taxRates: { totalItems: number, items: Array<{ id: string, name: string, enabled: boolean, value: number, category: { id: string, name: string }, zone: { id: string, name: string }, customerGroup?: { id: string, name: string } | null }> } }; - -export type GetShippingMethodListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetShippingMethodListQuery = { shippingMethods: { totalItems: number, items: Array<{ id: string, code: string, name: string, description: string, calculator: { code: string, args: Array<{ name: string, value: string }> }, checker: { code: string, args: Array<{ name: string, value: string }> } }> } }; - -export type GetCollectionsQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetCollectionsQuery = { collections: { items: Array<{ id: string, name: string, position: number, parent?: { id: string, name: string } | null }> } }; + options?: InputMaybe; +}>; + +export type GetTaxRatesQuery = { + taxRates: { + totalItems: number; + items: Array<{ + id: string; + name: string; + enabled: boolean; + value: number; + category: { id: string; name: string }; + zone: { id: string; name: string }; + customerGroup?: { id: string; name: string } | null; + }>; + }; +}; + +export type GetShippingMethodListQueryVariables = Exact<{ [key: string]: never }>; + +export type GetShippingMethodListQuery = { + shippingMethods: { + totalItems: number; + items: Array<{ + id: string; + code: string; + name: string; + description: string; + calculator: { code: string; args: Array<{ name: string; value: string }> }; + checker: { code: string; args: Array<{ name: string; value: string }> }; + }>; + }; +}; + +export type GetCollectionsQueryVariables = Exact<{ [key: string]: never }>; + +export type GetCollectionsQuery = { + collections: { + items: Array<{ + id: string; + name: string; + position: number; + parent?: { id: string; name: string } | null; + }>; + }; +}; export type TransitionPaymentToStateMutationVariables = Exact<{ - id: Scalars['ID']; - state: Scalars['String']; + id: Scalars['ID']; + state: Scalars['String']; }>; - -export type TransitionPaymentToStateMutation = { transitionPaymentToState: { id: string, transactionId?: string | null, amount: number, method: string, state: string, nextStates: Array, metadata?: any | null, refunds: Array<{ id: string, total: number, reason?: string | null }> } | { errorCode: ErrorCode, message: string, transitionError: string } }; +export type TransitionPaymentToStateMutation = { + transitionPaymentToState: + | { + id: string; + transactionId?: string | null; + amount: number; + method: string; + state: string; + nextStates: Array; + metadata?: any | null; + refunds: Array<{ id: string; total: number; reason?: string | null }>; + } + | { errorCode: ErrorCode; message: string; transitionError: string }; +}; export type GetProductVariantListQueryVariables = Exact<{ - options?: InputMaybe; - productId?: InputMaybe; + options?: InputMaybe; + productId?: InputMaybe; }>; - -export type GetProductVariantListQuery = { productVariants: { totalItems: number, items: Array<{ id: string, name: string, sku: string, price: number, priceWithTax: number }> } }; +export type GetProductVariantListQuery = { + productVariants: { + totalItems: number; + items: Array<{ id: string; name: string; sku: string; price: number; priceWithTax: number }>; + }; +}; export type DeletePromotionMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - export type DeletePromotionMutation = { deletePromotion: { result: DeletionResult } }; -export type GetChannelsQueryVariables = Exact<{ [key: string]: never; }>; +export type GetChannelsQueryVariables = Exact<{ [key: string]: never }>; - -export type GetChannelsQuery = { channels: Array<{ id: string, code: string, token: string }> }; +export type GetChannelsQuery = { channels: Array<{ id: string; code: string; token: string }> }; export type UpdateAdministratorMutationVariables = Exact<{ - input: UpdateAdministratorInput; + input: UpdateAdministratorInput; }>; - -export type UpdateAdministratorMutation = { updateAdministrator: { id: string, firstName: string, lastName: string, emailAddress: string, user: { id: string, identifier: string, lastLogin?: any | null, roles: Array<{ id: string, code: string, description: string, permissions: Array }> } } }; +export type UpdateAdministratorMutation = { + updateAdministrator: { + id: string; + firstName: string; + lastName: string; + emailAddress: string; + user: { + id: string; + identifier: string; + lastLogin?: any | null; + roles: Array<{ id: string; code: string; description: string; permissions: Array }>; + }; + }; +}; export type CancelJobMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type CancelJobMutation = { cancelJob: { id: string, state: JobState, isSettled: boolean, settledAt?: any | null } }; +export type CancelJobMutation = { + cancelJob: { id: string; state: JobState; isSettled: boolean; settledAt?: any | null }; +}; export type UpdateOptionGroupMutationVariables = Exact<{ - input: UpdateProductOptionGroupInput; + input: UpdateProductOptionGroupInput; }>; - export type UpdateOptionGroupMutation = { updateProductOptionGroup: { id: string } }; -export type GetFulfillmentHandlersQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetFulfillmentHandlersQuery = { fulfillmentHandlers: Array<{ code: string, description: string, args: Array<{ name: string, type: string, description?: string | null, label?: string | null, ui?: any | null }> }> }; - -export type OrderWithModificationsFragment = { id: string, state: string, subTotal: number, subTotalWithTax: number, shipping: number, shippingWithTax: number, total: number, totalWithTax: number, lines: Array<{ id: string, quantity: number, orderPlacedQuantity: number, linePrice: number, linePriceWithTax: number, unitPriceWithTax: number, discountedLinePriceWithTax: number, proratedLinePriceWithTax: number, proratedUnitPriceWithTax: number, discounts: Array<{ description: string, amountWithTax: number }>, productVariant: { id: string, name: string } }>, surcharges: Array<{ id: string, description: string, sku?: string | null, price: number, priceWithTax: number, taxRate: number }>, payments?: Array<{ id: string, transactionId?: string | null, state: string, amount: number, method: string, metadata?: any | null, refunds: Array<{ id: string, state: string, total: number, paymentId: string }> }> | null, modifications: Array<{ id: string, note: string, priceChange: number, isSettled: boolean, lines: Array<{ orderLineId: string, quantity: number }>, surcharges?: Array<{ id: string }> | null, payment?: { id: string, state: string, amount: number, method: string } | null, refund?: { id: string, state: string, total: number, paymentId: string } | null }>, promotions: Array<{ id: string, name: string, couponCode?: string | null }>, discounts: Array<{ description: string, adjustmentSource: string, amount: number, amountWithTax: number }>, shippingAddress?: { streetLine1?: string | null, city?: string | null, postalCode?: string | null, province?: string | null, countryCode?: string | null, country?: string | null } | null, billingAddress?: { streetLine1?: string | null, city?: string | null, postalCode?: string | null, province?: string | null, countryCode?: string | null, country?: string | null } | null }; +export type GetFulfillmentHandlersQueryVariables = Exact<{ [key: string]: never }>; + +export type GetFulfillmentHandlersQuery = { + fulfillmentHandlers: Array<{ + code: string; + description: string; + args: Array<{ + name: string; + type: string; + description?: string | null; + label?: string | null; + ui?: any | null; + }>; + }>; +}; + +export type OrderWithModificationsFragment = { + id: string; + state: string; + subTotal: number; + subTotalWithTax: number; + shipping: number; + shippingWithTax: number; + total: number; + totalWithTax: number; + lines: Array<{ + id: string; + quantity: number; + orderPlacedQuantity: number; + linePrice: number; + linePriceWithTax: number; + unitPriceWithTax: number; + discountedLinePriceWithTax: number; + proratedLinePriceWithTax: number; + proratedUnitPriceWithTax: number; + discounts: Array<{ description: string; amountWithTax: number }>; + productVariant: { id: string; name: string }; + }>; + surcharges: Array<{ + id: string; + description: string; + sku?: string | null; + price: number; + priceWithTax: number; + taxRate: number; + }>; + payments?: Array<{ + id: string; + transactionId?: string | null; + state: string; + amount: number; + method: string; + metadata?: any | null; + refunds: Array<{ id: string; state: string; total: number; paymentId: string }>; + }> | null; + modifications: Array<{ + id: string; + note: string; + priceChange: number; + isSettled: boolean; + lines: Array<{ orderLineId: string; quantity: number }>; + surcharges?: Array<{ id: string }> | null; + payment?: { id: string; state: string; amount: number; method: string } | null; + refund?: { id: string; state: string; total: number; paymentId: string } | null; + }>; + promotions: Array<{ id: string; name: string; couponCode?: string | null }>; + discounts: Array<{ + description: string; + adjustmentSource: string; + amount: number; + amountWithTax: number; + }>; + shippingAddress?: { + streetLine1?: string | null; + city?: string | null; + postalCode?: string | null; + province?: string | null; + countryCode?: string | null; + country?: string | null; + } | null; + billingAddress?: { + streetLine1?: string | null; + city?: string | null; + postalCode?: string | null; + province?: string | null; + countryCode?: string | null; + country?: string | null; + } | null; +}; export type GetOrderWithModificationsQueryVariables = Exact<{ - id: Scalars['ID']; -}>; - - -export type GetOrderWithModificationsQuery = { order?: { id: string, state: string, subTotal: number, subTotalWithTax: number, shipping: number, shippingWithTax: number, total: number, totalWithTax: number, lines: Array<{ id: string, quantity: number, orderPlacedQuantity: number, linePrice: number, linePriceWithTax: number, unitPriceWithTax: number, discountedLinePriceWithTax: number, proratedLinePriceWithTax: number, proratedUnitPriceWithTax: number, discounts: Array<{ description: string, amountWithTax: number }>, productVariant: { id: string, name: string } }>, surcharges: Array<{ id: string, description: string, sku?: string | null, price: number, priceWithTax: number, taxRate: number }>, payments?: Array<{ id: string, transactionId?: string | null, state: string, amount: number, method: string, metadata?: any | null, refunds: Array<{ id: string, state: string, total: number, paymentId: string }> }> | null, modifications: Array<{ id: string, note: string, priceChange: number, isSettled: boolean, lines: Array<{ orderLineId: string, quantity: number }>, surcharges?: Array<{ id: string }> | null, payment?: { id: string, state: string, amount: number, method: string } | null, refund?: { id: string, state: string, total: number, paymentId: string } | null }>, promotions: Array<{ id: string, name: string, couponCode?: string | null }>, discounts: Array<{ description: string, adjustmentSource: string, amount: number, amountWithTax: number }>, shippingAddress?: { streetLine1?: string | null, city?: string | null, postalCode?: string | null, province?: string | null, countryCode?: string | null, country?: string | null } | null, billingAddress?: { streetLine1?: string | null, city?: string | null, postalCode?: string | null, province?: string | null, countryCode?: string | null, country?: string | null } | null } | null }; + id: Scalars['ID']; +}>; + +export type GetOrderWithModificationsQuery = { + order?: { + id: string; + state: string; + subTotal: number; + subTotalWithTax: number; + shipping: number; + shippingWithTax: number; + total: number; + totalWithTax: number; + lines: Array<{ + id: string; + quantity: number; + orderPlacedQuantity: number; + linePrice: number; + linePriceWithTax: number; + unitPriceWithTax: number; + discountedLinePriceWithTax: number; + proratedLinePriceWithTax: number; + proratedUnitPriceWithTax: number; + discounts: Array<{ description: string; amountWithTax: number }>; + productVariant: { id: string; name: string }; + }>; + surcharges: Array<{ + id: string; + description: string; + sku?: string | null; + price: number; + priceWithTax: number; + taxRate: number; + }>; + payments?: Array<{ + id: string; + transactionId?: string | null; + state: string; + amount: number; + method: string; + metadata?: any | null; + refunds: Array<{ id: string; state: string; total: number; paymentId: string }>; + }> | null; + modifications: Array<{ + id: string; + note: string; + priceChange: number; + isSettled: boolean; + lines: Array<{ orderLineId: string; quantity: number }>; + surcharges?: Array<{ id: string }> | null; + payment?: { id: string; state: string; amount: number; method: string } | null; + refund?: { id: string; state: string; total: number; paymentId: string } | null; + }>; + promotions: Array<{ id: string; name: string; couponCode?: string | null }>; + discounts: Array<{ + description: string; + adjustmentSource: string; + amount: number; + amountWithTax: number; + }>; + shippingAddress?: { + streetLine1?: string | null; + city?: string | null; + postalCode?: string | null; + province?: string | null; + countryCode?: string | null; + country?: string | null; + } | null; + billingAddress?: { + streetLine1?: string | null; + city?: string | null; + postalCode?: string | null; + province?: string | null; + countryCode?: string | null; + country?: string | null; + } | null; + } | null; +}; export type ModifyOrderMutationVariables = Exact<{ - input: ModifyOrderInput; -}>; - - -export type ModifyOrderMutation = { modifyOrder: { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { id: string, state: string, subTotal: number, subTotalWithTax: number, shipping: number, shippingWithTax: number, total: number, totalWithTax: number, lines: Array<{ id: string, quantity: number, orderPlacedQuantity: number, linePrice: number, linePriceWithTax: number, unitPriceWithTax: number, discountedLinePriceWithTax: number, proratedLinePriceWithTax: number, proratedUnitPriceWithTax: number, discounts: Array<{ description: string, amountWithTax: number }>, productVariant: { id: string, name: string } }>, surcharges: Array<{ id: string, description: string, sku?: string | null, price: number, priceWithTax: number, taxRate: number }>, payments?: Array<{ id: string, transactionId?: string | null, state: string, amount: number, method: string, metadata?: any | null, refunds: Array<{ id: string, state: string, total: number, paymentId: string }> }> | null, modifications: Array<{ id: string, note: string, priceChange: number, isSettled: boolean, lines: Array<{ orderLineId: string, quantity: number }>, surcharges?: Array<{ id: string }> | null, payment?: { id: string, state: string, amount: number, method: string } | null, refund?: { id: string, state: string, total: number, paymentId: string } | null }>, promotions: Array<{ id: string, name: string, couponCode?: string | null }>, discounts: Array<{ description: string, adjustmentSource: string, amount: number, amountWithTax: number }>, shippingAddress?: { streetLine1?: string | null, city?: string | null, postalCode?: string | null, province?: string | null, countryCode?: string | null, country?: string | null } | null, billingAddress?: { streetLine1?: string | null, city?: string | null, postalCode?: string | null, province?: string | null, countryCode?: string | null, country?: string | null } | null } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } }; + input: ModifyOrderInput; +}>; + +export type ModifyOrderMutation = { + modifyOrder: + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { + id: string; + state: string; + subTotal: number; + subTotalWithTax: number; + shipping: number; + shippingWithTax: number; + total: number; + totalWithTax: number; + lines: Array<{ + id: string; + quantity: number; + orderPlacedQuantity: number; + linePrice: number; + linePriceWithTax: number; + unitPriceWithTax: number; + discountedLinePriceWithTax: number; + proratedLinePriceWithTax: number; + proratedUnitPriceWithTax: number; + discounts: Array<{ description: string; amountWithTax: number }>; + productVariant: { id: string; name: string }; + }>; + surcharges: Array<{ + id: string; + description: string; + sku?: string | null; + price: number; + priceWithTax: number; + taxRate: number; + }>; + payments?: Array<{ + id: string; + transactionId?: string | null; + state: string; + amount: number; + method: string; + metadata?: any | null; + refunds: Array<{ id: string; state: string; total: number; paymentId: string }>; + }> | null; + modifications: Array<{ + id: string; + note: string; + priceChange: number; + isSettled: boolean; + lines: Array<{ orderLineId: string; quantity: number }>; + surcharges?: Array<{ id: string }> | null; + payment?: { id: string; state: string; amount: number; method: string } | null; + refund?: { id: string; state: string; total: number; paymentId: string } | null; + }>; + promotions: Array<{ id: string; name: string; couponCode?: string | null }>; + discounts: Array<{ + description: string; + adjustmentSource: string; + amount: number; + amountWithTax: number; + }>; + shippingAddress?: { + streetLine1?: string | null; + city?: string | null; + postalCode?: string | null; + province?: string | null; + countryCode?: string | null; + country?: string | null; + } | null; + billingAddress?: { + streetLine1?: string | null; + city?: string | null; + postalCode?: string | null; + province?: string | null; + countryCode?: string | null; + country?: string | null; + } | null; + } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string }; +}; export type AddManualPaymentMutationVariables = Exact<{ - input: ManualPaymentInput; -}>; - - -export type AddManualPaymentMutation = { addManualPaymentToOrder: { errorCode: ErrorCode, message: string } | { id: string, state: string, subTotal: number, subTotalWithTax: number, shipping: number, shippingWithTax: number, total: number, totalWithTax: number, lines: Array<{ id: string, quantity: number, orderPlacedQuantity: number, linePrice: number, linePriceWithTax: number, unitPriceWithTax: number, discountedLinePriceWithTax: number, proratedLinePriceWithTax: number, proratedUnitPriceWithTax: number, discounts: Array<{ description: string, amountWithTax: number }>, productVariant: { id: string, name: string } }>, surcharges: Array<{ id: string, description: string, sku?: string | null, price: number, priceWithTax: number, taxRate: number }>, payments?: Array<{ id: string, transactionId?: string | null, state: string, amount: number, method: string, metadata?: any | null, refunds: Array<{ id: string, state: string, total: number, paymentId: string }> }> | null, modifications: Array<{ id: string, note: string, priceChange: number, isSettled: boolean, lines: Array<{ orderLineId: string, quantity: number }>, surcharges?: Array<{ id: string }> | null, payment?: { id: string, state: string, amount: number, method: string } | null, refund?: { id: string, state: string, total: number, paymentId: string } | null }>, promotions: Array<{ id: string, name: string, couponCode?: string | null }>, discounts: Array<{ description: string, adjustmentSource: string, amount: number, amountWithTax: number }>, shippingAddress?: { streetLine1?: string | null, city?: string | null, postalCode?: string | null, province?: string | null, countryCode?: string | null, country?: string | null } | null, billingAddress?: { streetLine1?: string | null, city?: string | null, postalCode?: string | null, province?: string | null, countryCode?: string | null, country?: string | null } | null } }; - -export type DeletePromotionAdHoc1MutationVariables = Exact<{ [key: string]: never; }>; - + input: ManualPaymentInput; +}>; + +export type AddManualPaymentMutation = { + addManualPaymentToOrder: + | { errorCode: ErrorCode; message: string } + | { + id: string; + state: string; + subTotal: number; + subTotalWithTax: number; + shipping: number; + shippingWithTax: number; + total: number; + totalWithTax: number; + lines: Array<{ + id: string; + quantity: number; + orderPlacedQuantity: number; + linePrice: number; + linePriceWithTax: number; + unitPriceWithTax: number; + discountedLinePriceWithTax: number; + proratedLinePriceWithTax: number; + proratedUnitPriceWithTax: number; + discounts: Array<{ description: string; amountWithTax: number }>; + productVariant: { id: string; name: string }; + }>; + surcharges: Array<{ + id: string; + description: string; + sku?: string | null; + price: number; + priceWithTax: number; + taxRate: number; + }>; + payments?: Array<{ + id: string; + transactionId?: string | null; + state: string; + amount: number; + method: string; + metadata?: any | null; + refunds: Array<{ id: string; state: string; total: number; paymentId: string }>; + }> | null; + modifications: Array<{ + id: string; + note: string; + priceChange: number; + isSettled: boolean; + lines: Array<{ orderLineId: string; quantity: number }>; + surcharges?: Array<{ id: string }> | null; + payment?: { id: string; state: string; amount: number; method: string } | null; + refund?: { id: string; state: string; total: number; paymentId: string } | null; + }>; + promotions: Array<{ id: string; name: string; couponCode?: string | null }>; + discounts: Array<{ + description: string; + adjustmentSource: string; + amount: number; + amountWithTax: number; + }>; + shippingAddress?: { + streetLine1?: string | null; + city?: string | null; + postalCode?: string | null; + province?: string | null; + countryCode?: string | null; + country?: string | null; + } | null; + billingAddress?: { + streetLine1?: string | null; + city?: string | null; + postalCode?: string | null; + province?: string | null; + countryCode?: string | null; + country?: string | null; + } | null; + }; +}; + +export type DeletePromotionAdHoc1MutationVariables = Exact<{ [key: string]: never }>; export type DeletePromotionAdHoc1Mutation = { deletePromotion: { result: DeletionResult } }; export type GetTaxRateListQueryVariables = Exact<{ - options?: InputMaybe; + options?: InputMaybe; }>; - -export type GetTaxRateListQuery = { taxRates: { totalItems: number, items: Array<{ id: string, name: string, enabled: boolean, value: number, category: { id: string, name: string }, zone: { id: string, name: string } }> } }; +export type GetTaxRateListQuery = { + taxRates: { + totalItems: number; + items: Array<{ + id: string; + name: string; + enabled: boolean; + value: number; + category: { id: string; name: string }; + zone: { id: string; name: string }; + }>; + }; +}; export type GetOrderWithLineCalculatedPropsQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; +export type GetOrderWithLineCalculatedPropsQuery = { + order?: { id: string; lines: Array<{ id: string; linePriceWithTax: number; quantity: number }> } | null; +}; -export type GetOrderWithLineCalculatedPropsQuery = { order?: { id: string, lines: Array<{ id: string, linePriceWithTax: number, quantity: number }> } | null }; - -export type GetOrderListFulfillmentsQueryVariables = Exact<{ [key: string]: never; }>; - +export type GetOrderListFulfillmentsQueryVariables = Exact<{ [key: string]: never }>; -export type GetOrderListFulfillmentsQuery = { orders: { items: Array<{ id: string, state: string, fulfillments?: Array<{ id: string, state: string, nextStates: Array, method: string }> | null }> } }; +export type GetOrderListFulfillmentsQuery = { + orders: { + items: Array<{ + id: string; + state: string; + fulfillments?: Array<{ + id: string; + state: string; + nextStates: Array; + method: string; + }> | null; + }>; + }; +}; export type GetOrderFulfillmentItemsQueryVariables = Exact<{ - id: Scalars['ID']; -}>; - - -export type GetOrderFulfillmentItemsQuery = { order?: { id: string, state: string, fulfillments?: Array<{ id: string, state: string, nextStates: Array, method: string, trackingCode?: string | null, lines: Array<{ orderLineId: string, quantity: number }> }> | null } | null }; - -export type RefundFragment = { id: string, state: string, items: number, transactionId?: string | null, shipping: number, total: number, metadata?: any | null }; + id: Scalars['ID']; +}>; + +export type GetOrderFulfillmentItemsQuery = { + order?: { + id: string; + state: string; + fulfillments?: Array<{ + id: string; + state: string; + nextStates: Array; + method: string; + trackingCode?: string | null; + lines: Array<{ orderLineId: string; quantity: number }>; + }> | null; + } | null; +}; + +export type RefundFragment = { + id: string; + state: string; + items: number; + transactionId?: string | null; + shipping: number; + total: number; + metadata?: any | null; +}; export type RefundOrderMutationVariables = Exact<{ - input: RefundOrderInput; -}>; - - -export type RefundOrderMutation = { refundOrder: { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { id: string, state: string, items: number, transactionId?: string | null, shipping: number, total: number, metadata?: any | null } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } }; + input: RefundOrderInput; +}>; + +export type RefundOrderMutation = { + refundOrder: + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { + id: string; + state: string; + items: number; + transactionId?: string | null; + shipping: number; + total: number; + metadata?: any | null; + } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string }; +}; export type SettleRefundMutationVariables = Exact<{ - input: SettleRefundInput; + input: SettleRefundInput; }>; - -export type SettleRefundMutation = { settleRefund: { id: string, state: string, items: number, transactionId?: string | null, shipping: number, total: number, metadata?: any | null } | { errorCode: ErrorCode, message: string } }; +export type SettleRefundMutation = { + settleRefund: + | { + id: string; + state: string; + items: number; + transactionId?: string | null; + shipping: number; + total: number; + metadata?: any | null; + } + | { errorCode: ErrorCode; message: string }; +}; export type AddNoteToOrderMutationVariables = Exact<{ - input: AddNoteToOrderInput; + input: AddNoteToOrderInput; }>; - export type AddNoteToOrderMutation = { addNoteToOrder: { id: string } }; export type UpdateOrderNoteMutationVariables = Exact<{ - input: UpdateOrderNoteInput; + input: UpdateOrderNoteInput; }>; - -export type UpdateOrderNoteMutation = { updateOrderNote: { id: string, data: any, isPublic: boolean } }; +export type UpdateOrderNoteMutation = { updateOrderNote: { id: string; data: any; isPublic: boolean } }; export type DeleteOrderNoteMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type DeleteOrderNoteMutation = { deleteOrderNote: { result: DeletionResult, message?: string | null } }; +export type DeleteOrderNoteMutation = { + deleteOrderNote: { result: DeletionResult; message?: string | null }; +}; export type GetOrderWithPaymentsQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetOrderWithPaymentsQuery = { order?: { id: string, payments?: Array<{ id: string, errorMessage?: string | null, metadata?: any | null, refunds: Array<{ id: string, total: number }> }> | null } | null }; +export type GetOrderWithPaymentsQuery = { + order?: { + id: string; + payments?: Array<{ + id: string; + errorMessage?: string | null; + metadata?: any | null; + refunds: Array<{ id: string; total: number }>; + }> | null; + } | null; +}; export type GetOrderLineFulfillmentsQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetOrderLineFulfillmentsQuery = { order?: { id: string, lines: Array<{ id: string, fulfillmentLines?: Array<{ orderLineId: string, quantity: number, fulfillment: { id: string, state: string } }> | null }> } | null }; +export type GetOrderLineFulfillmentsQuery = { + order?: { + id: string; + lines: Array<{ + id: string; + fulfillmentLines?: Array<{ + orderLineId: string; + quantity: number; + fulfillment: { id: string; state: string }; + }> | null; + }>; + } | null; +}; export type GetOrderListWithQtyQueryVariables = Exact<{ - options?: InputMaybe; + options?: InputMaybe; }>; - -export type GetOrderListWithQtyQuery = { orders: { items: Array<{ id: string, code: string, totalQuantity: number, lines: Array<{ id: string, quantity: number }> }> } }; +export type GetOrderListWithQtyQuery = { + orders: { + items: Array<{ + id: string; + code: string; + totalQuantity: number; + lines: Array<{ id: string; quantity: number }>; + }>; + }; +}; export type CancelPaymentMutationVariables = Exact<{ - paymentId: Scalars['ID']; -}>; - - -export type CancelPaymentMutation = { cancelPayment: { errorCode: ErrorCode, message: string, paymentErrorMessage: string } | { id: string, transactionId?: string | null, amount: number, method: string, state: string, nextStates: Array, metadata?: any | null, refunds: Array<{ id: string, total: number, reason?: string | null }> } | { errorCode: ErrorCode, message: string, transitionError: string } }; - -export type PaymentMethodFragment = { id: string, code: string, name: string, description: string, enabled: boolean, checker?: { code: string, args: Array<{ name: string, value: string }> } | null, handler: { code: string, args: Array<{ name: string, value: string }> } }; + paymentId: Scalars['ID']; +}>; + +export type CancelPaymentMutation = { + cancelPayment: + | { errorCode: ErrorCode; message: string; paymentErrorMessage: string } + | { + id: string; + transactionId?: string | null; + amount: number; + method: string; + state: string; + nextStates: Array; + metadata?: any | null; + refunds: Array<{ id: string; total: number; reason?: string | null }>; + } + | { errorCode: ErrorCode; message: string; transitionError: string }; +}; + +export type PaymentMethodFragment = { + id: string; + code: string; + name: string; + description: string; + enabled: boolean; + checker?: { code: string; args: Array<{ name: string; value: string }> } | null; + handler: { code: string; args: Array<{ name: string; value: string }> }; +}; export type CreatePaymentMethodMutationVariables = Exact<{ - input: CreatePaymentMethodInput; + input: CreatePaymentMethodInput; }>; - -export type CreatePaymentMethodMutation = { createPaymentMethod: { id: string, code: string, name: string, description: string, enabled: boolean, checker?: { code: string, args: Array<{ name: string, value: string }> } | null, handler: { code: string, args: Array<{ name: string, value: string }> } } }; +export type CreatePaymentMethodMutation = { + createPaymentMethod: { + id: string; + code: string; + name: string; + description: string; + enabled: boolean; + checker?: { code: string; args: Array<{ name: string; value: string }> } | null; + handler: { code: string; args: Array<{ name: string; value: string }> }; + }; +}; export type UpdatePaymentMethodMutationVariables = Exact<{ - input: UpdatePaymentMethodInput; + input: UpdatePaymentMethodInput; }>; +export type UpdatePaymentMethodMutation = { + updatePaymentMethod: { + id: string; + code: string; + name: string; + description: string; + enabled: boolean; + checker?: { code: string; args: Array<{ name: string; value: string }> } | null; + handler: { code: string; args: Array<{ name: string; value: string }> }; + }; +}; -export type UpdatePaymentMethodMutation = { updatePaymentMethod: { id: string, code: string, name: string, description: string, enabled: boolean, checker?: { code: string, args: Array<{ name: string, value: string }> } | null, handler: { code: string, args: Array<{ name: string, value: string }> } } }; - -export type GetPaymentMethodHandlersQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetPaymentMethodHandlersQuery = { paymentMethodHandlers: Array<{ code: string, args: Array<{ name: string, type: string }> }> }; +export type GetPaymentMethodHandlersQueryVariables = Exact<{ [key: string]: never }>; -export type GetPaymentMethodCheckersQueryVariables = Exact<{ [key: string]: never; }>; +export type GetPaymentMethodHandlersQuery = { + paymentMethodHandlers: Array<{ code: string; args: Array<{ name: string; type: string }> }>; +}; +export type GetPaymentMethodCheckersQueryVariables = Exact<{ [key: string]: never }>; -export type GetPaymentMethodCheckersQuery = { paymentMethodEligibilityCheckers: Array<{ code: string, args: Array<{ name: string, type: string }> }> }; +export type GetPaymentMethodCheckersQuery = { + paymentMethodEligibilityCheckers: Array<{ code: string; args: Array<{ name: string; type: string }> }>; +}; export type GetPaymentMethodQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetPaymentMethodQuery = { paymentMethod?: { id: string, code: string, name: string, description: string, enabled: boolean, checker?: { code: string, args: Array<{ name: string, value: string }> } | null, handler: { code: string, args: Array<{ name: string, value: string }> } } | null }; +export type GetPaymentMethodQuery = { + paymentMethod?: { + id: string; + code: string; + name: string; + description: string; + enabled: boolean; + checker?: { code: string; args: Array<{ name: string; value: string }> } | null; + handler: { code: string; args: Array<{ name: string; value: string }> }; + } | null; +}; export type GetPaymentMethodListQueryVariables = Exact<{ - options?: InputMaybe; + options?: InputMaybe; }>; - -export type GetPaymentMethodListQuery = { paymentMethods: { totalItems: number, items: Array<{ id: string, code: string, name: string, description: string, enabled: boolean, checker?: { code: string, args: Array<{ name: string, value: string }> } | null, handler: { code: string, args: Array<{ name: string, value: string }> } }> } }; +export type GetPaymentMethodListQuery = { + paymentMethods: { + totalItems: number; + items: Array<{ + id: string; + code: string; + name: string; + description: string; + enabled: boolean; + checker?: { code: string; args: Array<{ name: string; value: string }> } | null; + handler: { code: string; args: Array<{ name: string; value: string }> }; + }>; + }; +}; export type DeletePaymentMethodMutationVariables = Exact<{ - id: Scalars['ID']; - force?: InputMaybe; + id: Scalars['ID']; + force?: InputMaybe; }>; - -export type DeletePaymentMethodMutation = { deletePaymentMethod: { message?: string | null, result: DeletionResult } }; +export type DeletePaymentMethodMutation = { + deletePaymentMethod: { message?: string | null; result: DeletionResult }; +}; export type AddManualPayment2MutationVariables = Exact<{ - input: ManualPaymentInput; -}>; - - -export type AddManualPayment2Mutation = { addManualPaymentToOrder: { errorCode: ErrorCode, message: string } | { id: string, createdAt: any, updatedAt: any, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, total: number, totalWithTax: number, totalQuantity: number, currencyCode: CurrencyCode, shipping: number, shippingWithTax: number, customer?: { id: string, firstName: string, lastName: string } | null, lines: Array<{ id: string, unitPrice: number, unitPriceWithTax: number, quantity: number, taxRate: number, linePriceWithTax: number, featuredAsset?: { preview: string } | null, productVariant: { id: string, name: string, sku: string }, taxLines: Array<{ description: string, taxRate: number }> }>, surcharges: Array<{ id: string, description: string, sku?: string | null, price: number, priceWithTax: number }>, shippingLines: Array<{ priceWithTax: number, shippingMethod: { id: string, code: string, name: string, description: string } }>, shippingAddress?: { fullName?: string | null, company?: string | null, streetLine1?: string | null, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, country?: string | null, phoneNumber?: string | null } | null, payments?: Array<{ id: string, transactionId?: string | null, amount: number, method: string, state: string, nextStates: Array, metadata?: any | null, refunds: Array<{ id: string, total: number, reason?: string | null }> }> | null, fulfillments?: Array<{ id: string, state: string, method: string, trackingCode?: string | null, lines: Array<{ orderLineId: string, quantity: number }> }> | null } }; + input: ManualPaymentInput; +}>; + +export type AddManualPayment2Mutation = { + addManualPaymentToOrder: + | { errorCode: ErrorCode; message: string } + | { + id: string; + createdAt: any; + updatedAt: any; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + total: number; + totalWithTax: number; + totalQuantity: number; + currencyCode: CurrencyCode; + shipping: number; + shippingWithTax: number; + customer?: { id: string; firstName: string; lastName: string } | null; + lines: Array<{ + id: string; + unitPrice: number; + unitPriceWithTax: number; + quantity: number; + taxRate: number; + linePriceWithTax: number; + featuredAsset?: { preview: string } | null; + productVariant: { id: string; name: string; sku: string }; + taxLines: Array<{ description: string; taxRate: number }>; + }>; + surcharges: Array<{ + id: string; + description: string; + sku?: string | null; + price: number; + priceWithTax: number; + }>; + shippingLines: Array<{ + priceWithTax: number; + shippingMethod: { id: string; code: string; name: string; description: string }; + }>; + shippingAddress?: { + fullName?: string | null; + company?: string | null; + streetLine1?: string | null; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + country?: string | null; + phoneNumber?: string | null; + } | null; + payments?: Array<{ + id: string; + transactionId?: string | null; + amount: number; + method: string; + state: string; + nextStates: Array; + metadata?: any | null; + refunds: Array<{ id: string; total: number; reason?: string | null }>; + }> | null; + fulfillments?: Array<{ + id: string; + state: string; + method: string; + trackingCode?: string | null; + lines: Array<{ orderLineId: string; quantity: number }>; + }> | null; + }; +}; export type GetProductOptionGroupQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetProductOptionGroupQuery = { productOptionGroup?: { id: string, code: string, name: string, options: Array<{ id: string, code: string, name: string }> } | null }; +export type GetProductOptionGroupQuery = { + productOptionGroup?: { + id: string; + code: string; + name: string; + options: Array<{ id: string; code: string; name: string }>; + } | null; +}; export type UpdateProductOptionGroupMutationVariables = Exact<{ - input: UpdateProductOptionGroupInput; + input: UpdateProductOptionGroupInput; }>; - -export type UpdateProductOptionGroupMutation = { updateProductOptionGroup: { id: string, code: string, name: string, options: Array<{ id: string, code: string, name: string }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string }> } }; +export type UpdateProductOptionGroupMutation = { + updateProductOptionGroup: { + id: string; + code: string; + name: string; + options: Array<{ id: string; code: string; name: string }>; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + }; +}; export type CreateProductOptionMutationVariables = Exact<{ - input: CreateProductOptionInput; + input: CreateProductOptionInput; }>; - -export type CreateProductOptionMutation = { createProductOption: { id: string, code: string, name: string, groupId: string, translations: Array<{ id: string, languageCode: LanguageCode, name: string }> } }; +export type CreateProductOptionMutation = { + createProductOption: { + id: string; + code: string; + name: string; + groupId: string; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + }; +}; export type UpdateProductOptionMutationVariables = Exact<{ - input: UpdateProductOptionInput; + input: UpdateProductOptionInput; }>; - -export type UpdateProductOptionMutation = { updateProductOption: { id: string, code: string, name: string, groupId: string } }; +export type UpdateProductOptionMutation = { + updateProductOption: { id: string; code: string; name: string; groupId: string }; +}; export type DeleteProductOptionMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type DeleteProductOptionMutation = { deleteProductOption: { result: DeletionResult, message?: string | null } }; +export type DeleteProductOptionMutation = { + deleteProductOption: { result: DeletionResult; message?: string | null }; +}; export type RemoveOptionGroupFromProductMutationVariables = Exact<{ - productId: Scalars['ID']; - optionGroupId: Scalars['ID']; + productId: Scalars['ID']; + optionGroupId: Scalars['ID']; }>; - -export type RemoveOptionGroupFromProductMutation = { removeOptionGroupFromProduct: { id: string, optionGroups: Array<{ id: string, code: string, options: Array<{ id: string, code: string }> }> } | { errorCode: ErrorCode, message: string, optionGroupCode: string, productVariantCount: number } }; +export type RemoveOptionGroupFromProductMutation = { + removeOptionGroupFromProduct: + | { + id: string; + optionGroups: Array<{ id: string; code: string; options: Array<{ id: string; code: string }> }>; + } + | { errorCode: ErrorCode; message: string; optionGroupCode: string; productVariantCount: number }; +}; export type GetOptionGroupQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetOptionGroupQuery = { productOptionGroup?: { id: string, code: string, options: Array<{ id: string, code: string }> } | null }; +export type GetOptionGroupQuery = { + productOptionGroup?: { id: string; code: string; options: Array<{ id: string; code: string }> } | null; +}; export type GetProductVariantQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetProductVariantQuery = { productVariant?: { id: string, name: string } | null }; +export type GetProductVariantQuery = { productVariant?: { id: string; name: string } | null }; export type GetProductWithVariantListQueryVariables = Exact<{ - id?: InputMaybe; - variantListOptions?: InputMaybe; -}>; - - -export type GetProductWithVariantListQuery = { product?: { id: string, variantList: { totalItems: number, items: Array<{ id: string, createdAt: any, updatedAt: any, enabled: boolean, languageCode: LanguageCode, name: string, currencyCode: CurrencyCode, price: number, priceWithTax: number, stockOnHand: number, trackInventory: GlobalFlag, sku: string, taxRateApplied: { id: string, name: string, value: number }, taxCategory: { id: string, name: string }, options: Array<{ id: string, code: string, languageCode: LanguageCode, name: string }>, facetValues: Array<{ id: string, code: string, name: string, facet: { id: string, name: string } }>, featuredAsset?: { id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string } | null, assets: Array<{ id: string, name: string, fileSize: number, mimeType: string, type: AssetType, preview: string, source: string }>, translations: Array<{ id: string, languageCode: LanguageCode, name: string }>, channels: Array<{ id: string, code: string }> }> } } | null }; + id?: InputMaybe; + variantListOptions?: InputMaybe; +}>; + +export type GetProductWithVariantListQuery = { + product?: { + id: string; + variantList: { + totalItems: number; + items: Array<{ + id: string; + createdAt: any; + updatedAt: any; + enabled: boolean; + languageCode: LanguageCode; + name: string; + currencyCode: CurrencyCode; + price: number; + priceWithTax: number; + stockOnHand: number; + trackInventory: GlobalFlag; + sku: string; + taxRateApplied: { id: string; name: string; value: number }; + taxCategory: { id: string; name: string }; + options: Array<{ id: string; code: string; languageCode: LanguageCode; name: string }>; + facetValues: Array<{ + id: string; + code: string; + name: string; + facet: { id: string; name: string }; + }>; + featuredAsset?: { + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + } | null; + assets: Array<{ + id: string; + name: string; + fileSize: number; + mimeType: string; + type: AssetType; + preview: string; + source: string; + }>; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + channels: Array<{ id: string; code: string }>; + }>; + }; + } | null; +}; export type GetPromotionListQueryVariables = Exact<{ - options?: InputMaybe; -}>; - - -export type GetPromotionListQuery = { promotions: { totalItems: number, items: Array<{ id: string, createdAt: any, updatedAt: any, couponCode?: string | null, startsAt?: any | null, endsAt?: any | null, name: string, enabled: boolean, conditions: Array<{ code: string, args: Array<{ name: string, value: string }> }>, actions: Array<{ code: string, args: Array<{ name: string, value: string }> }> }> } }; + options?: InputMaybe; +}>; + +export type GetPromotionListQuery = { + promotions: { + totalItems: number; + items: Array<{ + id: string; + createdAt: any; + updatedAt: any; + couponCode?: string | null; + startsAt?: any | null; + endsAt?: any | null; + name: string; + enabled: boolean; + conditions: Array<{ code: string; args: Array<{ name: string; value: string }> }>; + actions: Array<{ code: string; args: Array<{ name: string; value: string }> }>; + }>; + }; +}; export type GetPromotionQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetPromotionQuery = { promotion?: { id: string, createdAt: any, updatedAt: any, couponCode?: string | null, startsAt?: any | null, endsAt?: any | null, name: string, enabled: boolean, conditions: Array<{ code: string, args: Array<{ name: string, value: string }> }>, actions: Array<{ code: string, args: Array<{ name: string, value: string }> }> } | null }; +export type GetPromotionQuery = { + promotion?: { + id: string; + createdAt: any; + updatedAt: any; + couponCode?: string | null; + startsAt?: any | null; + endsAt?: any | null; + name: string; + enabled: boolean; + conditions: Array<{ code: string; args: Array<{ name: string; value: string }> }>; + actions: Array<{ code: string; args: Array<{ name: string; value: string }> }>; + } | null; +}; export type UpdatePromotionMutationVariables = Exact<{ - input: UpdatePromotionInput; -}>; - - -export type UpdatePromotionMutation = { updatePromotion: { errorCode: ErrorCode, message: string } | { id: string, createdAt: any, updatedAt: any, couponCode?: string | null, startsAt?: any | null, endsAt?: any | null, name: string, enabled: boolean, conditions: Array<{ code: string, args: Array<{ name: string, value: string }> }>, actions: Array<{ code: string, args: Array<{ name: string, value: string }> }> } }; - -export type ConfigurableOperationDefFragment = { code: string, description: string, args: Array<{ name: string, type: string, ui?: any | null }> }; - -export type GetAdjustmentOperationsQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetAdjustmentOperationsQuery = { promotionActions: Array<{ code: string, description: string, args: Array<{ name: string, type: string, ui?: any | null }> }>, promotionConditions: Array<{ code: string, description: string, args: Array<{ name: string, type: string, ui?: any | null }> }> }; + input: UpdatePromotionInput; +}>; + +export type UpdatePromotionMutation = { + updatePromotion: + | { errorCode: ErrorCode; message: string } + | { + id: string; + createdAt: any; + updatedAt: any; + couponCode?: string | null; + startsAt?: any | null; + endsAt?: any | null; + name: string; + enabled: boolean; + conditions: Array<{ code: string; args: Array<{ name: string; value: string }> }>; + actions: Array<{ code: string; args: Array<{ name: string; value: string }> }>; + }; +}; + +export type ConfigurableOperationDefFragment = { + code: string; + description: string; + args: Array<{ name: string; type: string; ui?: any | null }>; +}; + +export type GetAdjustmentOperationsQueryVariables = Exact<{ [key: string]: never }>; + +export type GetAdjustmentOperationsQuery = { + promotionActions: Array<{ + code: string; + description: string; + args: Array<{ name: string; type: string; ui?: any | null }>; + }>; + promotionConditions: Array<{ + code: string; + description: string; + args: Array<{ name: string; type: string; ui?: any | null }>; + }>; +}; export type GetRolesQueryVariables = Exact<{ - options?: InputMaybe; + options?: InputMaybe; }>; - -export type GetRolesQuery = { roles: { totalItems: number, items: Array<{ id: string, code: string, description: string, permissions: Array, channels: Array<{ id: string, code: string, token: string }> }> } }; +export type GetRolesQuery = { + roles: { + totalItems: number; + items: Array<{ + id: string; + code: string; + description: string; + permissions: Array; + channels: Array<{ id: string; code: string; token: string }>; + }>; + }; +}; export type GetRoleQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetRoleQuery = { role?: { id: string, code: string, description: string, permissions: Array, channels: Array<{ id: string, code: string, token: string }> } | null }; +export type GetRoleQuery = { + role?: { + id: string; + code: string; + description: string; + permissions: Array; + channels: Array<{ id: string; code: string; token: string }>; + } | null; +}; export type DeleteRoleMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; +export type DeleteRoleMutation = { deleteRole: { result: DeletionResult; message?: string | null } }; -export type DeleteRoleMutation = { deleteRole: { result: DeletionResult, message?: string | null } }; - -export type LogoutMutationVariables = Exact<{ [key: string]: never; }>; - +export type LogoutMutationVariables = Exact<{ [key: string]: never }>; export type LogoutMutation = { logout: { success: boolean } }; export type GetShippingMethodQueryVariables = Exact<{ - id: Scalars['ID']; -}>; - - -export type GetShippingMethodQuery = { shippingMethod?: { id: string, code: string, name: string, description: string, calculator: { code: string, args: Array<{ name: string, value: string }> }, checker: { code: string, args: Array<{ name: string, value: string }> } } | null }; - -export type GetEligibilityCheckersQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetEligibilityCheckersQuery = { shippingEligibilityCheckers: Array<{ code: string, description: string, args: Array<{ name: string, type: string, description?: string | null, label?: string | null, ui?: any | null }> }> }; - -export type GetCalculatorsQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetCalculatorsQuery = { shippingCalculators: Array<{ code: string, description: string, args: Array<{ name: string, type: string, description?: string | null, label?: string | null, ui?: any | null }> }> }; + id: Scalars['ID']; +}>; + +export type GetShippingMethodQuery = { + shippingMethod?: { + id: string; + code: string; + name: string; + description: string; + calculator: { code: string; args: Array<{ name: string; value: string }> }; + checker: { code: string; args: Array<{ name: string; value: string }> }; + } | null; +}; + +export type GetEligibilityCheckersQueryVariables = Exact<{ [key: string]: never }>; + +export type GetEligibilityCheckersQuery = { + shippingEligibilityCheckers: Array<{ + code: string; + description: string; + args: Array<{ + name: string; + type: string; + description?: string | null; + label?: string | null; + ui?: any | null; + }>; + }>; +}; + +export type GetCalculatorsQueryVariables = Exact<{ [key: string]: never }>; + +export type GetCalculatorsQuery = { + shippingCalculators: Array<{ + code: string; + description: string; + args: Array<{ + name: string; + type: string; + description?: string | null; + label?: string | null; + ui?: any | null; + }>; + }>; +}; export type TestShippingMethodQueryVariables = Exact<{ - input: TestShippingMethodInput; + input: TestShippingMethodInput; }>; - -export type TestShippingMethodQuery = { testShippingMethod: { eligible: boolean, quote?: { price: number, priceWithTax: number, metadata?: any | null } | null } }; +export type TestShippingMethodQuery = { + testShippingMethod: { + eligible: boolean; + quote?: { price: number; priceWithTax: number; metadata?: any | null } | null; + }; +}; export type TestEligibleMethodsQueryVariables = Exact<{ - input: TestEligibleShippingMethodsInput; + input: TestEligibleShippingMethodsInput; }>; +export type TestEligibleMethodsQuery = { + testEligibleShippingMethods: Array<{ + id: string; + name: string; + description: string; + price: number; + priceWithTax: number; + metadata?: any | null; + }>; +}; -export type TestEligibleMethodsQuery = { testEligibleShippingMethods: Array<{ id: string, name: string, description: string, price: number, priceWithTax: number, metadata?: any | null }> }; - -export type GetMeQueryVariables = Exact<{ [key: string]: never; }>; - +export type GetMeQueryVariables = Exact<{ [key: string]: never }>; export type GetMeQuery = { me?: { identifier: string } | null }; -export type GetProductsTake3QueryVariables = Exact<{ [key: string]: never; }>; - +export type GetProductsTake3QueryVariables = Exact<{ [key: string]: never }>; export type GetProductsTake3Query = { products: { items: Array<{ id: string }> } }; -export type GetProduct1QueryVariables = Exact<{ [key: string]: never; }>; - +export type GetProduct1QueryVariables = Exact<{ [key: string]: never }>; export type GetProduct1Query = { product?: { id: string } | null }; -export type GetProduct2VariantsQueryVariables = Exact<{ [key: string]: never; }>; - +export type GetProduct2VariantsQueryVariables = Exact<{ [key: string]: never }>; -export type GetProduct2VariantsQuery = { product?: { id: string, variants: Array<{ id: string, name: string }> } | null }; - -export type GetProductCollectionQueryVariables = Exact<{ [key: string]: never; }>; +export type GetProduct2VariantsQuery = { + product?: { id: string; variants: Array<{ id: string; name: string }> } | null; +}; +export type GetProductCollectionQueryVariables = Exact<{ [key: string]: never }>; -export type GetProductCollectionQuery = { product?: { collections: Array<{ id: string, name: string }> } | null }; +export type GetProductCollectionQuery = { + product?: { collections: Array<{ id: string; name: string }> } | null; +}; export type GetCollectionShopQueryVariables = Exact<{ - id?: InputMaybe; - slug?: InputMaybe; + id?: InputMaybe; + slug?: InputMaybe; }>; - -export type GetCollectionShopQuery = { collection?: { id: string, name: string, slug: string, description: string, parent?: { id: string, name: string } | null, children?: Array<{ id: string, name: string }> | null } | null }; +export type GetCollectionShopQuery = { + collection?: { + id: string; + name: string; + slug: string; + description: string; + parent?: { id: string; name: string } | null; + children?: Array<{ id: string; name: string }> | null; + } | null; +}; export type DisableProductMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - export type DisableProductMutation = { updateProduct: { id: string } }; export type GetCollectionVariantsQueryVariables = Exact<{ - id?: InputMaybe; - slug?: InputMaybe; + id?: InputMaybe; + slug?: InputMaybe; }>; +export type GetCollectionVariantsQuery = { + collection?: { id: string; productVariants: { items: Array<{ id: string; name: string }> } } | null; +}; -export type GetCollectionVariantsQuery = { collection?: { id: string, productVariants: { items: Array<{ id: string, name: string }> } } | null }; - -export type GetCollectionListQueryVariables = Exact<{ [key: string]: never; }>; - +export type GetCollectionListQueryVariables = Exact<{ [key: string]: never }>; -export type GetCollectionListQuery = { collections: { items: Array<{ id: string, name: string }> } }; +export type GetCollectionListQuery = { collections: { items: Array<{ id: string; name: string }> } }; export type GetProductFacetValuesQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetProductFacetValuesQuery = { product?: { id: string, name: string, facetValues: Array<{ name: string }> } | null }; +export type GetProductFacetValuesQuery = { + product?: { id: string; name: string; facetValues: Array<{ name: string }> } | null; +}; export type GetVariantFacetValuesQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; +export type GetVariantFacetValuesQuery = { + product?: { + id: string; + name: string; + variants: Array<{ id: string; facetValues: Array<{ name: string }> }>; + } | null; +}; -export type GetVariantFacetValuesQuery = { product?: { id: string, name: string, variants: Array<{ id: string, facetValues: Array<{ name: string }> }> } | null }; - -export type GetCustomerIdsQueryVariables = Exact<{ [key: string]: never; }>; - +export type GetCustomerIdsQueryVariables = Exact<{ [key: string]: never }>; export type GetCustomerIdsQuery = { customers: { items: Array<{ id: string }> } }; -export type StockLocationFragment = { id: string, name: string, description: string }; +export type StockLocationFragment = { id: string; name: string; description: string }; export type GetStockLocationQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetStockLocationQuery = { stockLocation?: { id: string, name: string, description: string } | null }; +export type GetStockLocationQuery = { + stockLocation?: { id: string; name: string; description: string } | null; +}; export type GetStockLocationsQueryVariables = Exact<{ - options?: InputMaybe; + options?: InputMaybe; }>; - -export type GetStockLocationsQuery = { stockLocations: { totalItems: number, items: Array<{ id: string, name: string, description: string }> } }; +export type GetStockLocationsQuery = { + stockLocations: { totalItems: number; items: Array<{ id: string; name: string; description: string }> }; +}; export type CreateStockLocationMutationVariables = Exact<{ - input: CreateStockLocationInput; + input: CreateStockLocationInput; }>; - -export type CreateStockLocationMutation = { createStockLocation: { id: string, name: string, description: string } }; +export type CreateStockLocationMutation = { + createStockLocation: { id: string; name: string; description: string }; +}; export type UpdateStockLocationMutationVariables = Exact<{ - input: UpdateStockLocationInput; + input: UpdateStockLocationInput; }>; - -export type UpdateStockLocationMutation = { updateStockLocation: { id: string, name: string, description: string } }; +export type UpdateStockLocationMutation = { + updateStockLocation: { id: string; name: string; description: string }; +}; export type GetVariantStockLevelsQueryVariables = Exact<{ - options?: InputMaybe; + options?: InputMaybe; }>; - -export type GetVariantStockLevelsQuery = { productVariants: { items: Array<{ id: string, name: string, stockOnHand: number, stockAllocated: number, stockLevels: Array<{ stockLocationId: string, stockOnHand: number, stockAllocated: number }> }> } }; +export type GetVariantStockLevelsQuery = { + productVariants: { + items: Array<{ + id: string; + name: string; + stockOnHand: number; + stockAllocated: number; + stockLevels: Array<{ stockLocationId: string; stockOnHand: number; stockAllocated: number }>; + }>; + }; +}; export type UpdateStockMutationVariables = Exact<{ - input: Array | UpdateProductVariantInput; -}>; - - -export type UpdateStockMutation = { updateProductVariants: Array<{ id: string, stockOnHand: number, stockAllocated: number, stockMovements: { totalItems: number, items: Array<{ id: string, type: StockMovementType, quantity: number } | { id: string, type: StockMovementType, quantity: number } | { id: string, type: StockMovementType, quantity: number } | { id: string, type: StockMovementType, quantity: number } | { id: string, type: StockMovementType, quantity: number } | { id: string, type: StockMovementType, quantity: number }> } } | null> }; + input: Array | UpdateProductVariantInput; +}>; + +export type UpdateStockMutation = { + updateProductVariants: Array<{ + id: string; + stockOnHand: number; + stockAllocated: number; + stockMovements: { + totalItems: number; + items: Array< + | { id: string; type: StockMovementType; quantity: number } + | { id: string; type: StockMovementType; quantity: number } + | { id: string; type: StockMovementType; quantity: number } + | { id: string; type: StockMovementType; quantity: number } + | { id: string; type: StockMovementType; quantity: number } + | { id: string; type: StockMovementType; quantity: number } + >; + }; + } | null>; +}; export type TransitionFulfillmentToStateMutationVariables = Exact<{ - id: Scalars['ID']; - state: Scalars['String']; + id: Scalars['ID']; + state: Scalars['String']; }>; - -export type TransitionFulfillmentToStateMutation = { transitionFulfillmentToState: { id: string, state: string, nextStates: Array, createdAt: any } | { errorCode: ErrorCode, message: string, transitionError: string } }; +export type TransitionFulfillmentToStateMutation = { + transitionFulfillmentToState: + | { id: string; state: string; nextStates: Array; createdAt: any } + | { errorCode: ErrorCode; message: string; transitionError: string }; +}; export type UpdateOrderCustomFieldsMutationVariables = Exact<{ - input: UpdateOrderInput; + input: UpdateOrderInput; }>; - export type UpdateOrderCustomFieldsMutation = { setOrderCustomFields?: { id: string } | null }; export type GetTagListQueryVariables = Exact<{ - options?: InputMaybe; + options?: InputMaybe; }>; - -export type GetTagListQuery = { tags: { totalItems: number, items: Array<{ id: string, value: string }> } }; +export type GetTagListQuery = { tags: { totalItems: number; items: Array<{ id: string; value: string }> } }; export type GetTagQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetTagQuery = { tag: { id: string, value: string } }; +export type GetTagQuery = { tag: { id: string; value: string } }; export type CreateTagMutationVariables = Exact<{ - input: CreateTagInput; + input: CreateTagInput; }>; - -export type CreateTagMutation = { createTag: { id: string, value: string } }; +export type CreateTagMutation = { createTag: { id: string; value: string } }; export type UpdateTagMutationVariables = Exact<{ - input: UpdateTagInput; + input: UpdateTagInput; }>; - -export type UpdateTagMutation = { updateTag: { id: string, value: string } }; +export type UpdateTagMutation = { updateTag: { id: string; value: string } }; export type DeleteTagMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; +export type DeleteTagMutation = { deleteTag: { message?: string | null; result: DeletionResult } }; -export type DeleteTagMutation = { deleteTag: { message?: string | null, result: DeletionResult } }; - -export type GetTaxCategoryListQueryVariables = Exact<{ [key: string]: never; }>; +export type GetTaxCategoryListQueryVariables = Exact<{ [key: string]: never }>; - -export type GetTaxCategoryListQuery = { taxCategories: Array<{ id: string, name: string, isDefault: boolean }> }; +export type GetTaxCategoryListQuery = { + taxCategories: Array<{ id: string; name: string; isDefault: boolean }>; +}; export type GetTaxCategoryQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetTaxCategoryQuery = { taxCategory?: { id: string, name: string, isDefault: boolean } | null }; +export type GetTaxCategoryQuery = { taxCategory?: { id: string; name: string; isDefault: boolean } | null }; export type CreateTaxCategoryMutationVariables = Exact<{ - input: CreateTaxCategoryInput; + input: CreateTaxCategoryInput; }>; - -export type CreateTaxCategoryMutation = { createTaxCategory: { id: string, name: string, isDefault: boolean } }; +export type CreateTaxCategoryMutation = { + createTaxCategory: { id: string; name: string; isDefault: boolean }; +}; export type UpdateTaxCategoryMutationVariables = Exact<{ - input: UpdateTaxCategoryInput; + input: UpdateTaxCategoryInput; }>; - -export type UpdateTaxCategoryMutation = { updateTaxCategory: { id: string, name: string, isDefault: boolean } }; +export type UpdateTaxCategoryMutation = { + updateTaxCategory: { id: string; name: string; isDefault: boolean }; +}; export type DeleteTaxCategoryMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type DeleteTaxCategoryMutation = { deleteTaxCategory: { result: DeletionResult, message?: string | null } }; +export type DeleteTaxCategoryMutation = { + deleteTaxCategory: { result: DeletionResult; message?: string | null }; +}; export type GetTaxRateQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetTaxRateQuery = { taxRate?: { id: string, name: string, enabled: boolean, value: number, category: { id: string, name: string }, zone: { id: string, name: string }, customerGroup?: { id: string, name: string } | null } | null }; +export type GetTaxRateQuery = { + taxRate?: { + id: string; + name: string; + enabled: boolean; + value: number; + category: { id: string; name: string }; + zone: { id: string; name: string }; + customerGroup?: { id: string; name: string } | null; + } | null; +}; export type CreateTaxRateMutationVariables = Exact<{ - input: CreateTaxRateInput; + input: CreateTaxRateInput; }>; - -export type CreateTaxRateMutation = { createTaxRate: { id: string, name: string, enabled: boolean, value: number, category: { id: string, name: string }, zone: { id: string, name: string }, customerGroup?: { id: string, name: string } | null } }; +export type CreateTaxRateMutation = { + createTaxRate: { + id: string; + name: string; + enabled: boolean; + value: number; + category: { id: string; name: string }; + zone: { id: string; name: string }; + customerGroup?: { id: string; name: string } | null; + }; +}; export type DeleteTaxRateMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type DeleteTaxRateMutation = { deleteTaxRate: { result: DeletionResult, message?: string | null } }; +export type DeleteTaxRateMutation = { deleteTaxRate: { result: DeletionResult; message?: string | null } }; export type DeleteZoneMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; +export type DeleteZoneMutation = { deleteZone: { result: DeletionResult; message?: string | null } }; -export type DeleteZoneMutation = { deleteZone: { result: DeletionResult, message?: string | null } }; +export type GetZonesQueryVariables = Exact<{ [key: string]: never }>; -export type GetZonesQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetZonesQuery = { zones: Array<{ id: string, name: string }> }; +export type GetZonesQuery = { zones: Array<{ id: string; name: string }> }; export type GetZoneQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; +export type GetZoneQuery = { + zone?: { + id: string; + name: string; + members: Array<{ + id: string; + code: string; + name: string; + enabled: boolean; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + }>; + } | null; +}; -export type GetZoneQuery = { zone?: { id: string, name: string, members: Array<{ id: string, code: string, name: string, enabled: boolean, translations: Array<{ id: string, languageCode: LanguageCode, name: string }> }> } | null }; - -export type GetActiveChannelWithZoneMembersQueryVariables = Exact<{ [key: string]: never; }>; - +export type GetActiveChannelWithZoneMembersQueryVariables = Exact<{ [key: string]: never }>; -export type GetActiveChannelWithZoneMembersQuery = { activeChannel: { id: string, defaultShippingZone?: { id: string, members: Array<{ name: string }> } | null } }; +export type GetActiveChannelWithZoneMembersQuery = { + activeChannel: { + id: string; + defaultShippingZone?: { id: string; members: Array<{ name: string }> } | null; + }; +}; export type CreateZoneMutationVariables = Exact<{ - input: CreateZoneInput; + input: CreateZoneInput; }>; - -export type CreateZoneMutation = { createZone: { id: string, name: string, members: Array<{ id: string, code: string, name: string, enabled: boolean, translations: Array<{ id: string, languageCode: LanguageCode, name: string }> }> } }; +export type CreateZoneMutation = { + createZone: { + id: string; + name: string; + members: Array<{ + id: string; + code: string; + name: string; + enabled: boolean; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + }>; + }; +}; export type UpdateZoneMutationVariables = Exact<{ - input: UpdateZoneInput; + input: UpdateZoneInput; }>; - -export type UpdateZoneMutation = { updateZone: { id: string, name: string, members: Array<{ id: string, code: string, name: string, enabled: boolean, translations: Array<{ id: string, languageCode: LanguageCode, name: string }> }> } }; +export type UpdateZoneMutation = { + updateZone: { + id: string; + name: string; + members: Array<{ + id: string; + code: string; + name: string; + enabled: boolean; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + }>; + }; +}; export type AddMembersToZoneMutationVariables = Exact<{ - zoneId: Scalars['ID']; - memberIds: Array | Scalars['ID']; + zoneId: Scalars['ID']; + memberIds: Array | Scalars['ID']; }>; - -export type AddMembersToZoneMutation = { addMembersToZone: { id: string, name: string, members: Array<{ id: string, code: string, name: string, enabled: boolean, translations: Array<{ id: string, languageCode: LanguageCode, name: string }> }> } }; +export type AddMembersToZoneMutation = { + addMembersToZone: { + id: string; + name: string; + members: Array<{ + id: string; + code: string; + name: string; + enabled: boolean; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + }>; + }; +}; export type RemoveMembersFromZoneMutationVariables = Exact<{ - zoneId: Scalars['ID']; - memberIds: Array | Scalars['ID']; -}>; - - -export type RemoveMembersFromZoneMutation = { removeMembersFromZone: { id: string, name: string, members: Array<{ id: string, code: string, name: string, enabled: boolean, translations: Array<{ id: string, languageCode: LanguageCode, name: string }> }> } }; + zoneId: Scalars['ID']; + memberIds: Array | Scalars['ID']; +}>; + +export type RemoveMembersFromZoneMutation = { + removeMembersFromZone: { + id: string; + name: string; + members: Array<{ + id: string; + code: string; + name: string; + enabled: boolean; + translations: Array<{ id: string; languageCode: LanguageCode; name: string }>; + }>; + }; +}; diff --git a/packages/core/e2e/graphql/generated-e2e-shop-types.ts b/packages/core/e2e/graphql/generated-e2e-shop-types.ts index 8b93cbab91..1fa5838ab8 100644 --- a/packages/core/e2e/graphql/generated-e2e-shop-types.ts +++ b/packages/core/e2e/graphql/generated-e2e-shop-types.ts @@ -1,4 +1,4 @@ -// tslint:disable +/* eslint-disable */ export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; @@ -6,198 +6,208 @@ export type MakeOptional = Omit & { [SubKey in K]?: export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - DateTime: any; - JSON: any; - Money: number; - Upload: any; + ID: string; + String: string; + Boolean: boolean; + Int: number; + Float: number; + DateTime: any; + JSON: any; + Money: number; + Upload: any; }; export type ActiveOrderResult = NoActiveOrderError | Order; -export type AddPaymentToOrderResult = IneligiblePaymentMethodError | NoActiveOrderError | Order | OrderPaymentStateError | OrderStateTransitionError | PaymentDeclinedError | PaymentFailedError; +export type AddPaymentToOrderResult = + | IneligiblePaymentMethodError + | NoActiveOrderError + | Order + | OrderPaymentStateError + | OrderStateTransitionError + | PaymentDeclinedError + | PaymentFailedError; export type Address = Node & { - city?: Maybe; - company?: Maybe; - country: Country; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - defaultBillingAddress?: Maybe; - defaultShippingAddress?: Maybe; - fullName?: Maybe; - id: Scalars['ID']; - phoneNumber?: Maybe; - postalCode?: Maybe; - province?: Maybe; - streetLine1: Scalars['String']; - streetLine2?: Maybe; - updatedAt: Scalars['DateTime']; + city?: Maybe; + company?: Maybe; + country: Country; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + defaultBillingAddress?: Maybe; + defaultShippingAddress?: Maybe; + fullName?: Maybe; + id: Scalars['ID']; + phoneNumber?: Maybe; + postalCode?: Maybe; + province?: Maybe; + streetLine1: Scalars['String']; + streetLine2?: Maybe; + updatedAt: Scalars['DateTime']; }; export type Adjustment = { - adjustmentSource: Scalars['String']; - amount: Scalars['Money']; - data?: Maybe; - description: Scalars['String']; - type: AdjustmentType; + adjustmentSource: Scalars['String']; + amount: Scalars['Money']; + data?: Maybe; + description: Scalars['String']; + type: AdjustmentType; }; export enum AdjustmentType { - DISTRIBUTED_ORDER_PROMOTION = 'DISTRIBUTED_ORDER_PROMOTION', - OTHER = 'OTHER', - PROMOTION = 'PROMOTION' + DISTRIBUTED_ORDER_PROMOTION = 'DISTRIBUTED_ORDER_PROMOTION', + OTHER = 'OTHER', + PROMOTION = 'PROMOTION', } /** Returned when attempting to set the Customer for an Order when already logged in. */ export type AlreadyLoggedInError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; -export type ApplyCouponCodeResult = CouponCodeExpiredError | CouponCodeInvalidError | CouponCodeLimitError | Order; +export type ApplyCouponCodeResult = + | CouponCodeExpiredError + | CouponCodeInvalidError + | CouponCodeLimitError + | Order; export type Asset = Node & { - createdAt: Scalars['DateTime']; - customFields?: Maybe; - fileSize: Scalars['Int']; - focalPoint?: Maybe; - height: Scalars['Int']; - id: Scalars['ID']; - mimeType: Scalars['String']; - name: Scalars['String']; - preview: Scalars['String']; - source: Scalars['String']; - tags: Array; - type: AssetType; - updatedAt: Scalars['DateTime']; - width: Scalars['Int']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + fileSize: Scalars['Int']; + focalPoint?: Maybe; + height: Scalars['Int']; + id: Scalars['ID']; + mimeType: Scalars['String']; + name: Scalars['String']; + preview: Scalars['String']; + source: Scalars['String']; + tags: Array; + type: AssetType; + updatedAt: Scalars['DateTime']; + width: Scalars['Int']; }; export type AssetList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export enum AssetType { - BINARY = 'BINARY', - IMAGE = 'IMAGE', - VIDEO = 'VIDEO' + BINARY = 'BINARY', + IMAGE = 'IMAGE', + VIDEO = 'VIDEO', } export type AuthenticationInput = { - native?: InputMaybe; + native?: InputMaybe; }; export type AuthenticationMethod = Node & { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - strategy: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + strategy: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type AuthenticationResult = CurrentUser | InvalidCredentialsError | NotVerifiedError; export type BooleanCustomFieldConfig = CustomField & { - description?: Maybe>; - internal?: Maybe; - label?: Maybe>; - list: Scalars['Boolean']; - name: Scalars['String']; - nullable?: Maybe; - readonly?: Maybe; - type: Scalars['String']; - ui?: Maybe; + description?: Maybe>; + internal?: Maybe; + label?: Maybe>; + list: Scalars['Boolean']; + name: Scalars['String']; + nullable?: Maybe; + readonly?: Maybe; + type: Scalars['String']; + ui?: Maybe; }; /** Operators for filtering on a list of Boolean fields */ export type BooleanListOperators = { - inList: Scalars['Boolean']; + inList: Scalars['Boolean']; }; /** Operators for filtering on a Boolean field */ export type BooleanOperators = { - eq?: InputMaybe; - isNull?: InputMaybe; + eq?: InputMaybe; + isNull?: InputMaybe; }; export type Channel = Node & { - code: Scalars['String']; - createdAt: Scalars['DateTime']; - currencyCode: CurrencyCode; - customFields?: Maybe; - defaultLanguageCode: LanguageCode; - defaultShippingZone?: Maybe; - defaultTaxZone?: Maybe; - id: Scalars['ID']; - pricesIncludeTax: Scalars['Boolean']; - seller?: Maybe; - token: Scalars['String']; - updatedAt: Scalars['DateTime']; + code: Scalars['String']; + createdAt: Scalars['DateTime']; + currencyCode: CurrencyCode; + customFields?: Maybe; + defaultLanguageCode: LanguageCode; + defaultShippingZone?: Maybe; + defaultTaxZone?: Maybe; + id: Scalars['ID']; + pricesIncludeTax: Scalars['Boolean']; + seller?: Maybe; + token: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type Collection = Node & { - assets: Array; - breadcrumbs: Array; - children?: Maybe>; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - description: Scalars['String']; - featuredAsset?: Maybe; - filters: Array; - id: Scalars['ID']; - languageCode?: Maybe; - name: Scalars['String']; - parent?: Maybe; - position: Scalars['Int']; - productVariants: ProductVariantList; - slug: Scalars['String']; - translations: Array; - updatedAt: Scalars['DateTime']; + assets: Array; + breadcrumbs: Array; + children?: Maybe>; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + description: Scalars['String']; + featuredAsset?: Maybe; + filters: Array; + id: Scalars['ID']; + languageCode?: Maybe; + name: Scalars['String']; + parent?: Maybe; + position: Scalars['Int']; + productVariants: ProductVariantList; + slug: Scalars['String']; + translations: Array; + updatedAt: Scalars['DateTime']; }; - export type CollectionProductVariantsArgs = { - options?: InputMaybe; + options?: InputMaybe; }; export type CollectionBreadcrumb = { - id: Scalars['ID']; - name: Scalars['String']; - slug: Scalars['String']; + id: Scalars['ID']; + name: Scalars['String']; + slug: Scalars['String']; }; export type CollectionFilterParameter = { - createdAt?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - languageCode?: InputMaybe; - name?: InputMaybe; - position?: InputMaybe; - slug?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + description?: InputMaybe; + id?: InputMaybe; + languageCode?: InputMaybe; + name?: InputMaybe; + position?: InputMaybe; + slug?: InputMaybe; + updatedAt?: InputMaybe; }; export type CollectionList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type CollectionListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; /** @@ -205,142 +215,142 @@ export type CollectionListOptions = { * by the search, and in what quantity. */ export type CollectionResult = { - collection: Collection; - count: Scalars['Int']; + collection: Collection; + count: Scalars['Int']; }; export type CollectionSortParameter = { - createdAt?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - position?: InputMaybe; - slug?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + description?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + position?: InputMaybe; + slug?: InputMaybe; + updatedAt?: InputMaybe; }; export type CollectionTranslation = { - createdAt: Scalars['DateTime']; - description: Scalars['String']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - slug: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + description: Scalars['String']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + slug: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type ConfigArg = { - name: Scalars['String']; - value: Scalars['String']; + name: Scalars['String']; + value: Scalars['String']; }; export type ConfigArgDefinition = { - defaultValue?: Maybe; - description?: Maybe; - label?: Maybe; - list: Scalars['Boolean']; - name: Scalars['String']; - required: Scalars['Boolean']; - type: Scalars['String']; - ui?: Maybe; + defaultValue?: Maybe; + description?: Maybe; + label?: Maybe; + list: Scalars['Boolean']; + name: Scalars['String']; + required: Scalars['Boolean']; + type: Scalars['String']; + ui?: Maybe; }; export type ConfigArgInput = { - name: Scalars['String']; - /** A JSON stringified representation of the actual value */ - value: Scalars['String']; + name: Scalars['String']; + /** A JSON stringified representation of the actual value */ + value: Scalars['String']; }; export type ConfigurableOperation = { - args: Array; - code: Scalars['String']; + args: Array; + code: Scalars['String']; }; export type ConfigurableOperationDefinition = { - args: Array; - code: Scalars['String']; - description: Scalars['String']; + args: Array; + code: Scalars['String']; + description: Scalars['String']; }; export type ConfigurableOperationInput = { - arguments: Array; - code: Scalars['String']; + arguments: Array; + code: Scalars['String']; }; export type Coordinate = { - x: Scalars['Float']; - y: Scalars['Float']; + x: Scalars['Float']; + y: Scalars['Float']; }; export type Country = Node & { - code: Scalars['String']; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - enabled: Scalars['Boolean']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - translations: Array; - updatedAt: Scalars['DateTime']; + code: Scalars['String']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + enabled: Scalars['Boolean']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + translations: Array; + updatedAt: Scalars['DateTime']; }; export type CountryList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type CountryTranslation = { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; /** Returned if the provided coupon code is invalid */ export type CouponCodeExpiredError = ErrorResult & { - couponCode: Scalars['String']; - errorCode: ErrorCode; - message: Scalars['String']; + couponCode: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** Returned if the provided coupon code is invalid */ export type CouponCodeInvalidError = ErrorResult & { - couponCode: Scalars['String']; - errorCode: ErrorCode; - message: Scalars['String']; + couponCode: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** Returned if the provided coupon code is invalid */ export type CouponCodeLimitError = ErrorResult & { - couponCode: Scalars['String']; - errorCode: ErrorCode; - limit: Scalars['Int']; - message: Scalars['String']; + couponCode: Scalars['String']; + errorCode: ErrorCode; + limit: Scalars['Int']; + message: Scalars['String']; }; export type CreateAddressInput = { - city?: InputMaybe; - company?: InputMaybe; - countryCode: Scalars['String']; - customFields?: InputMaybe; - defaultBillingAddress?: InputMaybe; - defaultShippingAddress?: InputMaybe; - fullName?: InputMaybe; - phoneNumber?: InputMaybe; - postalCode?: InputMaybe; - province?: InputMaybe; - streetLine1: Scalars['String']; - streetLine2?: InputMaybe; + city?: InputMaybe; + company?: InputMaybe; + countryCode: Scalars['String']; + customFields?: InputMaybe; + defaultBillingAddress?: InputMaybe; + defaultShippingAddress?: InputMaybe; + fullName?: InputMaybe; + phoneNumber?: InputMaybe; + postalCode?: InputMaybe; + province?: InputMaybe; + streetLine1: Scalars['String']; + streetLine2?: InputMaybe; }; export type CreateCustomerInput = { - customFields?: InputMaybe; - emailAddress: Scalars['String']; - firstName: Scalars['String']; - lastName: Scalars['String']; - phoneNumber?: InputMaybe; - title?: InputMaybe; + customFields?: InputMaybe; + emailAddress: Scalars['String']; + firstName: Scalars['String']; + lastName: Scalars['String']; + phoneNumber?: InputMaybe; + title?: InputMaybe; }; /** @@ -350,440 +360,447 @@ export type CreateCustomerInput = { * @docsCategory common */ export enum CurrencyCode { - /** United Arab Emirates dirham */ - AED = 'AED', - /** Afghan afghani */ - AFN = 'AFN', - /** Albanian lek */ - ALL = 'ALL', - /** Armenian dram */ - AMD = 'AMD', - /** Netherlands Antillean guilder */ - ANG = 'ANG', - /** Angolan kwanza */ - AOA = 'AOA', - /** Argentine peso */ - ARS = 'ARS', - /** Australian dollar */ - AUD = 'AUD', - /** Aruban florin */ - AWG = 'AWG', - /** Azerbaijani manat */ - AZN = 'AZN', - /** Bosnia and Herzegovina convertible mark */ - BAM = 'BAM', - /** Barbados dollar */ - BBD = 'BBD', - /** Bangladeshi taka */ - BDT = 'BDT', - /** Bulgarian lev */ - BGN = 'BGN', - /** Bahraini dinar */ - BHD = 'BHD', - /** Burundian franc */ - BIF = 'BIF', - /** Bermudian dollar */ - BMD = 'BMD', - /** Brunei dollar */ - BND = 'BND', - /** Boliviano */ - BOB = 'BOB', - /** Brazilian real */ - BRL = 'BRL', - /** Bahamian dollar */ - BSD = 'BSD', - /** Bhutanese ngultrum */ - BTN = 'BTN', - /** Botswana pula */ - BWP = 'BWP', - /** Belarusian ruble */ - BYN = 'BYN', - /** Belize dollar */ - BZD = 'BZD', - /** Canadian dollar */ - CAD = 'CAD', - /** Congolese franc */ - CDF = 'CDF', - /** Swiss franc */ - CHF = 'CHF', - /** Chilean peso */ - CLP = 'CLP', - /** Renminbi (Chinese) yuan */ - CNY = 'CNY', - /** Colombian peso */ - COP = 'COP', - /** Costa Rican colon */ - CRC = 'CRC', - /** Cuban convertible peso */ - CUC = 'CUC', - /** Cuban peso */ - CUP = 'CUP', - /** Cape Verde escudo */ - CVE = 'CVE', - /** Czech koruna */ - CZK = 'CZK', - /** Djiboutian franc */ - DJF = 'DJF', - /** Danish krone */ - DKK = 'DKK', - /** Dominican peso */ - DOP = 'DOP', - /** Algerian dinar */ - DZD = 'DZD', - /** Egyptian pound */ - EGP = 'EGP', - /** Eritrean nakfa */ - ERN = 'ERN', - /** Ethiopian birr */ - ETB = 'ETB', - /** Euro */ - EUR = 'EUR', - /** Fiji dollar */ - FJD = 'FJD', - /** Falkland Islands pound */ - FKP = 'FKP', - /** Pound sterling */ - GBP = 'GBP', - /** Georgian lari */ - GEL = 'GEL', - /** Ghanaian cedi */ - GHS = 'GHS', - /** Gibraltar pound */ - GIP = 'GIP', - /** Gambian dalasi */ - GMD = 'GMD', - /** Guinean franc */ - GNF = 'GNF', - /** Guatemalan quetzal */ - GTQ = 'GTQ', - /** Guyanese dollar */ - GYD = 'GYD', - /** Hong Kong dollar */ - HKD = 'HKD', - /** Honduran lempira */ - HNL = 'HNL', - /** Croatian kuna */ - HRK = 'HRK', - /** Haitian gourde */ - HTG = 'HTG', - /** Hungarian forint */ - HUF = 'HUF', - /** Indonesian rupiah */ - IDR = 'IDR', - /** Israeli new shekel */ - ILS = 'ILS', - /** Indian rupee */ - INR = 'INR', - /** Iraqi dinar */ - IQD = 'IQD', - /** Iranian rial */ - IRR = 'IRR', - /** Icelandic króna */ - ISK = 'ISK', - /** Jamaican dollar */ - JMD = 'JMD', - /** Jordanian dinar */ - JOD = 'JOD', - /** Japanese yen */ - JPY = 'JPY', - /** Kenyan shilling */ - KES = 'KES', - /** Kyrgyzstani som */ - KGS = 'KGS', - /** Cambodian riel */ - KHR = 'KHR', - /** Comoro franc */ - KMF = 'KMF', - /** North Korean won */ - KPW = 'KPW', - /** South Korean won */ - KRW = 'KRW', - /** Kuwaiti dinar */ - KWD = 'KWD', - /** Cayman Islands dollar */ - KYD = 'KYD', - /** Kazakhstani tenge */ - KZT = 'KZT', - /** Lao kip */ - LAK = 'LAK', - /** Lebanese pound */ - LBP = 'LBP', - /** Sri Lankan rupee */ - LKR = 'LKR', - /** Liberian dollar */ - LRD = 'LRD', - /** Lesotho loti */ - LSL = 'LSL', - /** Libyan dinar */ - LYD = 'LYD', - /** Moroccan dirham */ - MAD = 'MAD', - /** Moldovan leu */ - MDL = 'MDL', - /** Malagasy ariary */ - MGA = 'MGA', - /** Macedonian denar */ - MKD = 'MKD', - /** Myanmar kyat */ - MMK = 'MMK', - /** Mongolian tögrög */ - MNT = 'MNT', - /** Macanese pataca */ - MOP = 'MOP', - /** Mauritanian ouguiya */ - MRU = 'MRU', - /** Mauritian rupee */ - MUR = 'MUR', - /** Maldivian rufiyaa */ - MVR = 'MVR', - /** Malawian kwacha */ - MWK = 'MWK', - /** Mexican peso */ - MXN = 'MXN', - /** Malaysian ringgit */ - MYR = 'MYR', - /** Mozambican metical */ - MZN = 'MZN', - /** Namibian dollar */ - NAD = 'NAD', - /** Nigerian naira */ - NGN = 'NGN', - /** Nicaraguan córdoba */ - NIO = 'NIO', - /** Norwegian krone */ - NOK = 'NOK', - /** Nepalese rupee */ - NPR = 'NPR', - /** New Zealand dollar */ - NZD = 'NZD', - /** Omani rial */ - OMR = 'OMR', - /** Panamanian balboa */ - PAB = 'PAB', - /** Peruvian sol */ - PEN = 'PEN', - /** Papua New Guinean kina */ - PGK = 'PGK', - /** Philippine peso */ - PHP = 'PHP', - /** Pakistani rupee */ - PKR = 'PKR', - /** Polish złoty */ - PLN = 'PLN', - /** Paraguayan guaraní */ - PYG = 'PYG', - /** Qatari riyal */ - QAR = 'QAR', - /** Romanian leu */ - RON = 'RON', - /** Serbian dinar */ - RSD = 'RSD', - /** Russian ruble */ - RUB = 'RUB', - /** Rwandan franc */ - RWF = 'RWF', - /** Saudi riyal */ - SAR = 'SAR', - /** Solomon Islands dollar */ - SBD = 'SBD', - /** Seychelles rupee */ - SCR = 'SCR', - /** Sudanese pound */ - SDG = 'SDG', - /** Swedish krona/kronor */ - SEK = 'SEK', - /** Singapore dollar */ - SGD = 'SGD', - /** Saint Helena pound */ - SHP = 'SHP', - /** Sierra Leonean leone */ - SLL = 'SLL', - /** Somali shilling */ - SOS = 'SOS', - /** Surinamese dollar */ - SRD = 'SRD', - /** South Sudanese pound */ - SSP = 'SSP', - /** São Tomé and Príncipe dobra */ - STN = 'STN', - /** Salvadoran colón */ - SVC = 'SVC', - /** Syrian pound */ - SYP = 'SYP', - /** Swazi lilangeni */ - SZL = 'SZL', - /** Thai baht */ - THB = 'THB', - /** Tajikistani somoni */ - TJS = 'TJS', - /** Turkmenistan manat */ - TMT = 'TMT', - /** Tunisian dinar */ - TND = 'TND', - /** Tongan paʻanga */ - TOP = 'TOP', - /** Turkish lira */ - TRY = 'TRY', - /** Trinidad and Tobago dollar */ - TTD = 'TTD', - /** New Taiwan dollar */ - TWD = 'TWD', - /** Tanzanian shilling */ - TZS = 'TZS', - /** Ukrainian hryvnia */ - UAH = 'UAH', - /** Ugandan shilling */ - UGX = 'UGX', - /** United States dollar */ - USD = 'USD', - /** Uruguayan peso */ - UYU = 'UYU', - /** Uzbekistan som */ - UZS = 'UZS', - /** Venezuelan bolívar soberano */ - VES = 'VES', - /** Vietnamese đồng */ - VND = 'VND', - /** Vanuatu vatu */ - VUV = 'VUV', - /** Samoan tala */ - WST = 'WST', - /** CFA franc BEAC */ - XAF = 'XAF', - /** East Caribbean dollar */ - XCD = 'XCD', - /** CFA franc BCEAO */ - XOF = 'XOF', - /** CFP franc (franc Pacifique) */ - XPF = 'XPF', - /** Yemeni rial */ - YER = 'YER', - /** South African rand */ - ZAR = 'ZAR', - /** Zambian kwacha */ - ZMW = 'ZMW', - /** Zimbabwean dollar */ - ZWL = 'ZWL' + /** United Arab Emirates dirham */ + AED = 'AED', + /** Afghan afghani */ + AFN = 'AFN', + /** Albanian lek */ + ALL = 'ALL', + /** Armenian dram */ + AMD = 'AMD', + /** Netherlands Antillean guilder */ + ANG = 'ANG', + /** Angolan kwanza */ + AOA = 'AOA', + /** Argentine peso */ + ARS = 'ARS', + /** Australian dollar */ + AUD = 'AUD', + /** Aruban florin */ + AWG = 'AWG', + /** Azerbaijani manat */ + AZN = 'AZN', + /** Bosnia and Herzegovina convertible mark */ + BAM = 'BAM', + /** Barbados dollar */ + BBD = 'BBD', + /** Bangladeshi taka */ + BDT = 'BDT', + /** Bulgarian lev */ + BGN = 'BGN', + /** Bahraini dinar */ + BHD = 'BHD', + /** Burundian franc */ + BIF = 'BIF', + /** Bermudian dollar */ + BMD = 'BMD', + /** Brunei dollar */ + BND = 'BND', + /** Boliviano */ + BOB = 'BOB', + /** Brazilian real */ + BRL = 'BRL', + /** Bahamian dollar */ + BSD = 'BSD', + /** Bhutanese ngultrum */ + BTN = 'BTN', + /** Botswana pula */ + BWP = 'BWP', + /** Belarusian ruble */ + BYN = 'BYN', + /** Belize dollar */ + BZD = 'BZD', + /** Canadian dollar */ + CAD = 'CAD', + /** Congolese franc */ + CDF = 'CDF', + /** Swiss franc */ + CHF = 'CHF', + /** Chilean peso */ + CLP = 'CLP', + /** Renminbi (Chinese) yuan */ + CNY = 'CNY', + /** Colombian peso */ + COP = 'COP', + /** Costa Rican colon */ + CRC = 'CRC', + /** Cuban convertible peso */ + CUC = 'CUC', + /** Cuban peso */ + CUP = 'CUP', + /** Cape Verde escudo */ + CVE = 'CVE', + /** Czech koruna */ + CZK = 'CZK', + /** Djiboutian franc */ + DJF = 'DJF', + /** Danish krone */ + DKK = 'DKK', + /** Dominican peso */ + DOP = 'DOP', + /** Algerian dinar */ + DZD = 'DZD', + /** Egyptian pound */ + EGP = 'EGP', + /** Eritrean nakfa */ + ERN = 'ERN', + /** Ethiopian birr */ + ETB = 'ETB', + /** Euro */ + EUR = 'EUR', + /** Fiji dollar */ + FJD = 'FJD', + /** Falkland Islands pound */ + FKP = 'FKP', + /** Pound sterling */ + GBP = 'GBP', + /** Georgian lari */ + GEL = 'GEL', + /** Ghanaian cedi */ + GHS = 'GHS', + /** Gibraltar pound */ + GIP = 'GIP', + /** Gambian dalasi */ + GMD = 'GMD', + /** Guinean franc */ + GNF = 'GNF', + /** Guatemalan quetzal */ + GTQ = 'GTQ', + /** Guyanese dollar */ + GYD = 'GYD', + /** Hong Kong dollar */ + HKD = 'HKD', + /** Honduran lempira */ + HNL = 'HNL', + /** Croatian kuna */ + HRK = 'HRK', + /** Haitian gourde */ + HTG = 'HTG', + /** Hungarian forint */ + HUF = 'HUF', + /** Indonesian rupiah */ + IDR = 'IDR', + /** Israeli new shekel */ + ILS = 'ILS', + /** Indian rupee */ + INR = 'INR', + /** Iraqi dinar */ + IQD = 'IQD', + /** Iranian rial */ + IRR = 'IRR', + /** Icelandic króna */ + ISK = 'ISK', + /** Jamaican dollar */ + JMD = 'JMD', + /** Jordanian dinar */ + JOD = 'JOD', + /** Japanese yen */ + JPY = 'JPY', + /** Kenyan shilling */ + KES = 'KES', + /** Kyrgyzstani som */ + KGS = 'KGS', + /** Cambodian riel */ + KHR = 'KHR', + /** Comoro franc */ + KMF = 'KMF', + /** North Korean won */ + KPW = 'KPW', + /** South Korean won */ + KRW = 'KRW', + /** Kuwaiti dinar */ + KWD = 'KWD', + /** Cayman Islands dollar */ + KYD = 'KYD', + /** Kazakhstani tenge */ + KZT = 'KZT', + /** Lao kip */ + LAK = 'LAK', + /** Lebanese pound */ + LBP = 'LBP', + /** Sri Lankan rupee */ + LKR = 'LKR', + /** Liberian dollar */ + LRD = 'LRD', + /** Lesotho loti */ + LSL = 'LSL', + /** Libyan dinar */ + LYD = 'LYD', + /** Moroccan dirham */ + MAD = 'MAD', + /** Moldovan leu */ + MDL = 'MDL', + /** Malagasy ariary */ + MGA = 'MGA', + /** Macedonian denar */ + MKD = 'MKD', + /** Myanmar kyat */ + MMK = 'MMK', + /** Mongolian tögrög */ + MNT = 'MNT', + /** Macanese pataca */ + MOP = 'MOP', + /** Mauritanian ouguiya */ + MRU = 'MRU', + /** Mauritian rupee */ + MUR = 'MUR', + /** Maldivian rufiyaa */ + MVR = 'MVR', + /** Malawian kwacha */ + MWK = 'MWK', + /** Mexican peso */ + MXN = 'MXN', + /** Malaysian ringgit */ + MYR = 'MYR', + /** Mozambican metical */ + MZN = 'MZN', + /** Namibian dollar */ + NAD = 'NAD', + /** Nigerian naira */ + NGN = 'NGN', + /** Nicaraguan córdoba */ + NIO = 'NIO', + /** Norwegian krone */ + NOK = 'NOK', + /** Nepalese rupee */ + NPR = 'NPR', + /** New Zealand dollar */ + NZD = 'NZD', + /** Omani rial */ + OMR = 'OMR', + /** Panamanian balboa */ + PAB = 'PAB', + /** Peruvian sol */ + PEN = 'PEN', + /** Papua New Guinean kina */ + PGK = 'PGK', + /** Philippine peso */ + PHP = 'PHP', + /** Pakistani rupee */ + PKR = 'PKR', + /** Polish złoty */ + PLN = 'PLN', + /** Paraguayan guaraní */ + PYG = 'PYG', + /** Qatari riyal */ + QAR = 'QAR', + /** Romanian leu */ + RON = 'RON', + /** Serbian dinar */ + RSD = 'RSD', + /** Russian ruble */ + RUB = 'RUB', + /** Rwandan franc */ + RWF = 'RWF', + /** Saudi riyal */ + SAR = 'SAR', + /** Solomon Islands dollar */ + SBD = 'SBD', + /** Seychelles rupee */ + SCR = 'SCR', + /** Sudanese pound */ + SDG = 'SDG', + /** Swedish krona/kronor */ + SEK = 'SEK', + /** Singapore dollar */ + SGD = 'SGD', + /** Saint Helena pound */ + SHP = 'SHP', + /** Sierra Leonean leone */ + SLL = 'SLL', + /** Somali shilling */ + SOS = 'SOS', + /** Surinamese dollar */ + SRD = 'SRD', + /** South Sudanese pound */ + SSP = 'SSP', + /** São Tomé and Príncipe dobra */ + STN = 'STN', + /** Salvadoran colón */ + SVC = 'SVC', + /** Syrian pound */ + SYP = 'SYP', + /** Swazi lilangeni */ + SZL = 'SZL', + /** Thai baht */ + THB = 'THB', + /** Tajikistani somoni */ + TJS = 'TJS', + /** Turkmenistan manat */ + TMT = 'TMT', + /** Tunisian dinar */ + TND = 'TND', + /** Tongan paʻanga */ + TOP = 'TOP', + /** Turkish lira */ + TRY = 'TRY', + /** Trinidad and Tobago dollar */ + TTD = 'TTD', + /** New Taiwan dollar */ + TWD = 'TWD', + /** Tanzanian shilling */ + TZS = 'TZS', + /** Ukrainian hryvnia */ + UAH = 'UAH', + /** Ugandan shilling */ + UGX = 'UGX', + /** United States dollar */ + USD = 'USD', + /** Uruguayan peso */ + UYU = 'UYU', + /** Uzbekistan som */ + UZS = 'UZS', + /** Venezuelan bolívar soberano */ + VES = 'VES', + /** Vietnamese đồng */ + VND = 'VND', + /** Vanuatu vatu */ + VUV = 'VUV', + /** Samoan tala */ + WST = 'WST', + /** CFA franc BEAC */ + XAF = 'XAF', + /** East Caribbean dollar */ + XCD = 'XCD', + /** CFA franc BCEAO */ + XOF = 'XOF', + /** CFP franc (franc Pacifique) */ + XPF = 'XPF', + /** Yemeni rial */ + YER = 'YER', + /** South African rand */ + ZAR = 'ZAR', + /** Zambian kwacha */ + ZMW = 'ZMW', + /** Zimbabwean dollar */ + ZWL = 'ZWL', } export type CurrentUser = { - channels: Array; - id: Scalars['ID']; - identifier: Scalars['String']; + channels: Array; + id: Scalars['ID']; + identifier: Scalars['String']; }; export type CurrentUserChannel = { - code: Scalars['String']; - id: Scalars['ID']; - permissions: Array; - token: Scalars['String']; + code: Scalars['String']; + id: Scalars['ID']; + permissions: Array; + token: Scalars['String']; }; export type CustomField = { - description?: Maybe>; - internal?: Maybe; - label?: Maybe>; - list: Scalars['Boolean']; - name: Scalars['String']; - nullable?: Maybe; - readonly?: Maybe; - type: Scalars['String']; - ui?: Maybe; -}; - -export type CustomFieldConfig = BooleanCustomFieldConfig | DateTimeCustomFieldConfig | FloatCustomFieldConfig | IntCustomFieldConfig | LocaleStringCustomFieldConfig | LocaleTextCustomFieldConfig | RelationCustomFieldConfig | StringCustomFieldConfig | TextCustomFieldConfig; + description?: Maybe>; + internal?: Maybe; + label?: Maybe>; + list: Scalars['Boolean']; + name: Scalars['String']; + nullable?: Maybe; + readonly?: Maybe; + type: Scalars['String']; + ui?: Maybe; +}; + +export type CustomFieldConfig = + | BooleanCustomFieldConfig + | DateTimeCustomFieldConfig + | FloatCustomFieldConfig + | IntCustomFieldConfig + | LocaleStringCustomFieldConfig + | LocaleTextCustomFieldConfig + | RelationCustomFieldConfig + | StringCustomFieldConfig + | TextCustomFieldConfig; export type Customer = Node & { - addresses?: Maybe>; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - emailAddress: Scalars['String']; - firstName: Scalars['String']; - id: Scalars['ID']; - lastName: Scalars['String']; - orders: OrderList; - phoneNumber?: Maybe; - title?: Maybe; - updatedAt: Scalars['DateTime']; - user?: Maybe; + addresses?: Maybe>; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + emailAddress: Scalars['String']; + firstName: Scalars['String']; + id: Scalars['ID']; + lastName: Scalars['String']; + orders: OrderList; + phoneNumber?: Maybe; + title?: Maybe; + updatedAt: Scalars['DateTime']; + user?: Maybe; }; - export type CustomerOrdersArgs = { - options?: InputMaybe; + options?: InputMaybe; }; export type CustomerFilterParameter = { - createdAt?: InputMaybe; - emailAddress?: InputMaybe; - firstName?: InputMaybe; - id?: InputMaybe; - lastName?: InputMaybe; - phoneNumber?: InputMaybe; - title?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + emailAddress?: InputMaybe; + firstName?: InputMaybe; + id?: InputMaybe; + lastName?: InputMaybe; + phoneNumber?: InputMaybe; + title?: InputMaybe; + updatedAt?: InputMaybe; }; export type CustomerGroup = Node & { - createdAt: Scalars['DateTime']; - customFields?: Maybe; - customers: CustomerList; - id: Scalars['ID']; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + customers: CustomerList; + id: Scalars['ID']; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; - export type CustomerGroupCustomersArgs = { - options?: InputMaybe; + options?: InputMaybe; }; export type CustomerList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type CustomerListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type CustomerSortParameter = { - createdAt?: InputMaybe; - emailAddress?: InputMaybe; - firstName?: InputMaybe; - id?: InputMaybe; - lastName?: InputMaybe; - phoneNumber?: InputMaybe; - title?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + emailAddress?: InputMaybe; + firstName?: InputMaybe; + id?: InputMaybe; + lastName?: InputMaybe; + phoneNumber?: InputMaybe; + title?: InputMaybe; + updatedAt?: InputMaybe; }; /** Operators for filtering on a list of Date fields */ export type DateListOperators = { - inList: Scalars['DateTime']; + inList: Scalars['DateTime']; }; /** Operators for filtering on a DateTime field */ export type DateOperators = { - after?: InputMaybe; - before?: InputMaybe; - between?: InputMaybe; - eq?: InputMaybe; - isNull?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + between?: InputMaybe; + eq?: InputMaybe; + isNull?: InputMaybe; }; export type DateRange = { - end: Scalars['DateTime']; - start: Scalars['DateTime']; + end: Scalars['DateTime']; + start: Scalars['DateTime']; }; /** @@ -791,148 +808,148 @@ export type DateRange = { * See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local#Additional_attributes */ export type DateTimeCustomFieldConfig = CustomField & { - description?: Maybe>; - internal?: Maybe; - label?: Maybe>; - list: Scalars['Boolean']; - max?: Maybe; - min?: Maybe; - name: Scalars['String']; - nullable?: Maybe; - readonly?: Maybe; - step?: Maybe; - type: Scalars['String']; - ui?: Maybe; + description?: Maybe>; + internal?: Maybe; + label?: Maybe>; + list: Scalars['Boolean']; + max?: Maybe; + min?: Maybe; + name: Scalars['String']; + nullable?: Maybe; + readonly?: Maybe; + step?: Maybe; + type: Scalars['String']; + ui?: Maybe; }; export type DeletionResponse = { - message?: Maybe; - result: DeletionResult; + message?: Maybe; + result: DeletionResult; }; export enum DeletionResult { - /** The entity was successfully deleted */ - DELETED = 'DELETED', - /** Deletion did not take place, reason given in message */ - NOT_DELETED = 'NOT_DELETED' + /** The entity was successfully deleted */ + DELETED = 'DELETED', + /** Deletion did not take place, reason given in message */ + NOT_DELETED = 'NOT_DELETED', } export type Discount = { - adjustmentSource: Scalars['String']; - amount: Scalars['Money']; - amountWithTax: Scalars['Money']; - description: Scalars['String']; - type: AdjustmentType; + adjustmentSource: Scalars['String']; + amount: Scalars['Money']; + amountWithTax: Scalars['Money']; + description: Scalars['String']; + type: AdjustmentType; }; /** Returned when attempting to create a Customer with an email address already registered to an existing User. */ export type EmailAddressConflictError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; export enum ErrorCode { - ALREADY_LOGGED_IN_ERROR = 'ALREADY_LOGGED_IN_ERROR', - COUPON_CODE_EXPIRED_ERROR = 'COUPON_CODE_EXPIRED_ERROR', - COUPON_CODE_INVALID_ERROR = 'COUPON_CODE_INVALID_ERROR', - COUPON_CODE_LIMIT_ERROR = 'COUPON_CODE_LIMIT_ERROR', - EMAIL_ADDRESS_CONFLICT_ERROR = 'EMAIL_ADDRESS_CONFLICT_ERROR', - IDENTIFIER_CHANGE_TOKEN_EXPIRED_ERROR = 'IDENTIFIER_CHANGE_TOKEN_EXPIRED_ERROR', - IDENTIFIER_CHANGE_TOKEN_INVALID_ERROR = 'IDENTIFIER_CHANGE_TOKEN_INVALID_ERROR', - INELIGIBLE_PAYMENT_METHOD_ERROR = 'INELIGIBLE_PAYMENT_METHOD_ERROR', - INELIGIBLE_SHIPPING_METHOD_ERROR = 'INELIGIBLE_SHIPPING_METHOD_ERROR', - INSUFFICIENT_STOCK_ERROR = 'INSUFFICIENT_STOCK_ERROR', - INVALID_CREDENTIALS_ERROR = 'INVALID_CREDENTIALS_ERROR', - MISSING_PASSWORD_ERROR = 'MISSING_PASSWORD_ERROR', - NATIVE_AUTH_STRATEGY_ERROR = 'NATIVE_AUTH_STRATEGY_ERROR', - NEGATIVE_QUANTITY_ERROR = 'NEGATIVE_QUANTITY_ERROR', - NOT_VERIFIED_ERROR = 'NOT_VERIFIED_ERROR', - NO_ACTIVE_ORDER_ERROR = 'NO_ACTIVE_ORDER_ERROR', - ORDER_LIMIT_ERROR = 'ORDER_LIMIT_ERROR', - ORDER_MODIFICATION_ERROR = 'ORDER_MODIFICATION_ERROR', - ORDER_PAYMENT_STATE_ERROR = 'ORDER_PAYMENT_STATE_ERROR', - ORDER_STATE_TRANSITION_ERROR = 'ORDER_STATE_TRANSITION_ERROR', - PASSWORD_ALREADY_SET_ERROR = 'PASSWORD_ALREADY_SET_ERROR', - PASSWORD_RESET_TOKEN_EXPIRED_ERROR = 'PASSWORD_RESET_TOKEN_EXPIRED_ERROR', - PASSWORD_RESET_TOKEN_INVALID_ERROR = 'PASSWORD_RESET_TOKEN_INVALID_ERROR', - PASSWORD_VALIDATION_ERROR = 'PASSWORD_VALIDATION_ERROR', - PAYMENT_DECLINED_ERROR = 'PAYMENT_DECLINED_ERROR', - PAYMENT_FAILED_ERROR = 'PAYMENT_FAILED_ERROR', - UNKNOWN_ERROR = 'UNKNOWN_ERROR', - VERIFICATION_TOKEN_EXPIRED_ERROR = 'VERIFICATION_TOKEN_EXPIRED_ERROR', - VERIFICATION_TOKEN_INVALID_ERROR = 'VERIFICATION_TOKEN_INVALID_ERROR' + ALREADY_LOGGED_IN_ERROR = 'ALREADY_LOGGED_IN_ERROR', + COUPON_CODE_EXPIRED_ERROR = 'COUPON_CODE_EXPIRED_ERROR', + COUPON_CODE_INVALID_ERROR = 'COUPON_CODE_INVALID_ERROR', + COUPON_CODE_LIMIT_ERROR = 'COUPON_CODE_LIMIT_ERROR', + EMAIL_ADDRESS_CONFLICT_ERROR = 'EMAIL_ADDRESS_CONFLICT_ERROR', + IDENTIFIER_CHANGE_TOKEN_EXPIRED_ERROR = 'IDENTIFIER_CHANGE_TOKEN_EXPIRED_ERROR', + IDENTIFIER_CHANGE_TOKEN_INVALID_ERROR = 'IDENTIFIER_CHANGE_TOKEN_INVALID_ERROR', + INELIGIBLE_PAYMENT_METHOD_ERROR = 'INELIGIBLE_PAYMENT_METHOD_ERROR', + INELIGIBLE_SHIPPING_METHOD_ERROR = 'INELIGIBLE_SHIPPING_METHOD_ERROR', + INSUFFICIENT_STOCK_ERROR = 'INSUFFICIENT_STOCK_ERROR', + INVALID_CREDENTIALS_ERROR = 'INVALID_CREDENTIALS_ERROR', + MISSING_PASSWORD_ERROR = 'MISSING_PASSWORD_ERROR', + NATIVE_AUTH_STRATEGY_ERROR = 'NATIVE_AUTH_STRATEGY_ERROR', + NEGATIVE_QUANTITY_ERROR = 'NEGATIVE_QUANTITY_ERROR', + NOT_VERIFIED_ERROR = 'NOT_VERIFIED_ERROR', + NO_ACTIVE_ORDER_ERROR = 'NO_ACTIVE_ORDER_ERROR', + ORDER_LIMIT_ERROR = 'ORDER_LIMIT_ERROR', + ORDER_MODIFICATION_ERROR = 'ORDER_MODIFICATION_ERROR', + ORDER_PAYMENT_STATE_ERROR = 'ORDER_PAYMENT_STATE_ERROR', + ORDER_STATE_TRANSITION_ERROR = 'ORDER_STATE_TRANSITION_ERROR', + PASSWORD_ALREADY_SET_ERROR = 'PASSWORD_ALREADY_SET_ERROR', + PASSWORD_RESET_TOKEN_EXPIRED_ERROR = 'PASSWORD_RESET_TOKEN_EXPIRED_ERROR', + PASSWORD_RESET_TOKEN_INVALID_ERROR = 'PASSWORD_RESET_TOKEN_INVALID_ERROR', + PASSWORD_VALIDATION_ERROR = 'PASSWORD_VALIDATION_ERROR', + PAYMENT_DECLINED_ERROR = 'PAYMENT_DECLINED_ERROR', + PAYMENT_FAILED_ERROR = 'PAYMENT_FAILED_ERROR', + UNKNOWN_ERROR = 'UNKNOWN_ERROR', + VERIFICATION_TOKEN_EXPIRED_ERROR = 'VERIFICATION_TOKEN_EXPIRED_ERROR', + VERIFICATION_TOKEN_INVALID_ERROR = 'VERIFICATION_TOKEN_INVALID_ERROR', } export type ErrorResult = { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; export type Facet = Node & { - code: Scalars['String']; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - translations: Array; - updatedAt: Scalars['DateTime']; - values: Array; + code: Scalars['String']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + translations: Array; + updatedAt: Scalars['DateTime']; + values: Array; }; export type FacetFilterParameter = { - code?: InputMaybe; - createdAt?: InputMaybe; - id?: InputMaybe; - languageCode?: InputMaybe; - name?: InputMaybe; - updatedAt?: InputMaybe; + code?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + languageCode?: InputMaybe; + name?: InputMaybe; + updatedAt?: InputMaybe; }; export type FacetList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type FacetListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type FacetSortParameter = { - code?: InputMaybe; - createdAt?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - updatedAt?: InputMaybe; + code?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + updatedAt?: InputMaybe; }; export type FacetTranslation = { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type FacetValue = Node & { - code: Scalars['String']; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - facet: Facet; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - translations: Array; - updatedAt: Scalars['DateTime']; + code: Scalars['String']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + facet: Facet; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + translations: Array; + updatedAt: Scalars['DateTime']; }; /** @@ -944,8 +961,8 @@ export type FacetValue = Node & { * * ID=1 AND (ID=2 OR ID=3): `{ facetValueFilters: [{ and: 1 }, { or: [2,3] }] }` */ export type FacetValueFilterInput = { - and?: InputMaybe; - or?: InputMaybe>; + and?: InputMaybe; + or?: InputMaybe>; }; /** @@ -953,138 +970,138 @@ export type FacetValueFilterInput = { * by the search, and in what quantity. */ export type FacetValueResult = { - count: Scalars['Int']; - facetValue: FacetValue; + count: Scalars['Int']; + facetValue: FacetValue; }; export type FacetValueTranslation = { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type FloatCustomFieldConfig = CustomField & { - description?: Maybe>; - internal?: Maybe; - label?: Maybe>; - list: Scalars['Boolean']; - max?: Maybe; - min?: Maybe; - name: Scalars['String']; - nullable?: Maybe; - readonly?: Maybe; - step?: Maybe; - type: Scalars['String']; - ui?: Maybe; + description?: Maybe>; + internal?: Maybe; + label?: Maybe>; + list: Scalars['Boolean']; + max?: Maybe; + min?: Maybe; + name: Scalars['String']; + nullable?: Maybe; + readonly?: Maybe; + step?: Maybe; + type: Scalars['String']; + ui?: Maybe; }; export type Fulfillment = Node & { - createdAt: Scalars['DateTime']; - customFields?: Maybe; - id: Scalars['ID']; - lines: Array; - method: Scalars['String']; - state: Scalars['String']; - /** @deprecated Use the `lines` field instead */ - summary: Array; - trackingCode?: Maybe; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + id: Scalars['ID']; + lines: Array; + method: Scalars['String']; + state: Scalars['String']; + /** @deprecated Use the `lines` field instead */ + summary: Array; + trackingCode?: Maybe; + updatedAt: Scalars['DateTime']; }; export type FulfillmentLine = { - fulfillment: Fulfillment; - fulfillmentId: Scalars['ID']; - orderLine: OrderLine; - orderLineId: Scalars['ID']; - quantity: Scalars['Int']; + fulfillment: Fulfillment; + fulfillmentId: Scalars['ID']; + orderLine: OrderLine; + orderLineId: Scalars['ID']; + quantity: Scalars['Int']; }; export enum GlobalFlag { - FALSE = 'FALSE', - INHERIT = 'INHERIT', - TRUE = 'TRUE' + FALSE = 'FALSE', + INHERIT = 'INHERIT', + TRUE = 'TRUE', } export type HistoryEntry = Node & { - createdAt: Scalars['DateTime']; - data: Scalars['JSON']; - id: Scalars['ID']; - type: HistoryEntryType; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + data: Scalars['JSON']; + id: Scalars['ID']; + type: HistoryEntryType; + updatedAt: Scalars['DateTime']; }; export type HistoryEntryFilterParameter = { - createdAt?: InputMaybe; - id?: InputMaybe; - type?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + type?: InputMaybe; + updatedAt?: InputMaybe; }; export type HistoryEntryList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type HistoryEntryListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type HistoryEntrySortParameter = { - createdAt?: InputMaybe; - id?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + updatedAt?: InputMaybe; }; export enum HistoryEntryType { - CUSTOMER_ADDED_TO_GROUP = 'CUSTOMER_ADDED_TO_GROUP', - CUSTOMER_ADDRESS_CREATED = 'CUSTOMER_ADDRESS_CREATED', - CUSTOMER_ADDRESS_DELETED = 'CUSTOMER_ADDRESS_DELETED', - CUSTOMER_ADDRESS_UPDATED = 'CUSTOMER_ADDRESS_UPDATED', - CUSTOMER_DETAIL_UPDATED = 'CUSTOMER_DETAIL_UPDATED', - CUSTOMER_EMAIL_UPDATE_REQUESTED = 'CUSTOMER_EMAIL_UPDATE_REQUESTED', - CUSTOMER_EMAIL_UPDATE_VERIFIED = 'CUSTOMER_EMAIL_UPDATE_VERIFIED', - CUSTOMER_NOTE = 'CUSTOMER_NOTE', - CUSTOMER_PASSWORD_RESET_REQUESTED = 'CUSTOMER_PASSWORD_RESET_REQUESTED', - CUSTOMER_PASSWORD_RESET_VERIFIED = 'CUSTOMER_PASSWORD_RESET_VERIFIED', - CUSTOMER_PASSWORD_UPDATED = 'CUSTOMER_PASSWORD_UPDATED', - CUSTOMER_REGISTERED = 'CUSTOMER_REGISTERED', - CUSTOMER_REMOVED_FROM_GROUP = 'CUSTOMER_REMOVED_FROM_GROUP', - CUSTOMER_VERIFIED = 'CUSTOMER_VERIFIED', - ORDER_CANCELLATION = 'ORDER_CANCELLATION', - ORDER_COUPON_APPLIED = 'ORDER_COUPON_APPLIED', - ORDER_COUPON_REMOVED = 'ORDER_COUPON_REMOVED', - ORDER_FULFILLMENT = 'ORDER_FULFILLMENT', - ORDER_FULFILLMENT_TRANSITION = 'ORDER_FULFILLMENT_TRANSITION', - ORDER_MODIFIED = 'ORDER_MODIFIED', - ORDER_NOTE = 'ORDER_NOTE', - ORDER_PAYMENT_TRANSITION = 'ORDER_PAYMENT_TRANSITION', - ORDER_REFUND_TRANSITION = 'ORDER_REFUND_TRANSITION', - ORDER_STATE_TRANSITION = 'ORDER_STATE_TRANSITION' + CUSTOMER_ADDED_TO_GROUP = 'CUSTOMER_ADDED_TO_GROUP', + CUSTOMER_ADDRESS_CREATED = 'CUSTOMER_ADDRESS_CREATED', + CUSTOMER_ADDRESS_DELETED = 'CUSTOMER_ADDRESS_DELETED', + CUSTOMER_ADDRESS_UPDATED = 'CUSTOMER_ADDRESS_UPDATED', + CUSTOMER_DETAIL_UPDATED = 'CUSTOMER_DETAIL_UPDATED', + CUSTOMER_EMAIL_UPDATE_REQUESTED = 'CUSTOMER_EMAIL_UPDATE_REQUESTED', + CUSTOMER_EMAIL_UPDATE_VERIFIED = 'CUSTOMER_EMAIL_UPDATE_VERIFIED', + CUSTOMER_NOTE = 'CUSTOMER_NOTE', + CUSTOMER_PASSWORD_RESET_REQUESTED = 'CUSTOMER_PASSWORD_RESET_REQUESTED', + CUSTOMER_PASSWORD_RESET_VERIFIED = 'CUSTOMER_PASSWORD_RESET_VERIFIED', + CUSTOMER_PASSWORD_UPDATED = 'CUSTOMER_PASSWORD_UPDATED', + CUSTOMER_REGISTERED = 'CUSTOMER_REGISTERED', + CUSTOMER_REMOVED_FROM_GROUP = 'CUSTOMER_REMOVED_FROM_GROUP', + CUSTOMER_VERIFIED = 'CUSTOMER_VERIFIED', + ORDER_CANCELLATION = 'ORDER_CANCELLATION', + ORDER_COUPON_APPLIED = 'ORDER_COUPON_APPLIED', + ORDER_COUPON_REMOVED = 'ORDER_COUPON_REMOVED', + ORDER_FULFILLMENT = 'ORDER_FULFILLMENT', + ORDER_FULFILLMENT_TRANSITION = 'ORDER_FULFILLMENT_TRANSITION', + ORDER_MODIFIED = 'ORDER_MODIFIED', + ORDER_NOTE = 'ORDER_NOTE', + ORDER_PAYMENT_TRANSITION = 'ORDER_PAYMENT_TRANSITION', + ORDER_REFUND_TRANSITION = 'ORDER_REFUND_TRANSITION', + ORDER_STATE_TRANSITION = 'ORDER_STATE_TRANSITION', } /** Operators for filtering on a list of ID fields */ export type IdListOperators = { - inList: Scalars['ID']; + inList: Scalars['ID']; }; /** Operators for filtering on an ID field */ export type IdOperators = { - eq?: InputMaybe; - in?: InputMaybe>; - isNull?: InputMaybe; - notEq?: InputMaybe; - notIn?: InputMaybe>; + eq?: InputMaybe; + in?: InputMaybe>; + isNull?: InputMaybe; + notEq?: InputMaybe; + notIn?: InputMaybe>; }; /** @@ -1092,8 +1109,8 @@ export type IdOperators = { * expired according to the `verificationTokenDuration` setting in the AuthOptions. */ export type IdentifierChangeTokenExpiredError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** @@ -1101,51 +1118,51 @@ export type IdentifierChangeTokenExpiredError = ErrorResult & { * invalid or does not match any expected tokens. */ export type IdentifierChangeTokenInvalidError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** Returned when attempting to add a Payment using a PaymentMethod for which the Order is not eligible. */ export type IneligiblePaymentMethodError = ErrorResult & { - eligibilityCheckerMessage?: Maybe; - errorCode: ErrorCode; - message: Scalars['String']; + eligibilityCheckerMessage?: Maybe; + errorCode: ErrorCode; + message: Scalars['String']; }; /** Returned when attempting to set a ShippingMethod for which the Order is not eligible */ export type IneligibleShippingMethodError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** Returned when attempting to add more items to the Order than are available */ export type InsufficientStockError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; - order: Order; - quantityAvailable: Scalars['Int']; + errorCode: ErrorCode; + message: Scalars['String']; + order: Order; + quantityAvailable: Scalars['Int']; }; export type IntCustomFieldConfig = CustomField & { - description?: Maybe>; - internal?: Maybe; - label?: Maybe>; - list: Scalars['Boolean']; - max?: Maybe; - min?: Maybe; - name: Scalars['String']; - nullable?: Maybe; - readonly?: Maybe; - step?: Maybe; - type: Scalars['String']; - ui?: Maybe; + description?: Maybe>; + internal?: Maybe; + label?: Maybe>; + list: Scalars['Boolean']; + max?: Maybe; + min?: Maybe; + name: Scalars['String']; + nullable?: Maybe; + readonly?: Maybe; + step?: Maybe; + type: Scalars['String']; + ui?: Maybe; }; /** Returned if the user authentication credentials are not valid */ export type InvalidCredentialsError = ErrorResult & { - authenticationError: Scalars['String']; - errorCode: ErrorCode; - message: Scalars['String']; + authenticationError: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** @@ -1158,612 +1175,590 @@ export type InvalidCredentialsError = ErrorResult & { * @docsCategory common */ export enum LanguageCode { - /** Afrikaans */ - af = 'af', - /** Akan */ - ak = 'ak', - /** Amharic */ - am = 'am', - /** Arabic */ - ar = 'ar', - /** Assamese */ - as = 'as', - /** Azerbaijani */ - az = 'az', - /** Belarusian */ - be = 'be', - /** Bulgarian */ - bg = 'bg', - /** Bambara */ - bm = 'bm', - /** Bangla */ - bn = 'bn', - /** Tibetan */ - bo = 'bo', - /** Breton */ - br = 'br', - /** Bosnian */ - bs = 'bs', - /** Catalan */ - ca = 'ca', - /** Chechen */ - ce = 'ce', - /** Corsican */ - co = 'co', - /** Czech */ - cs = 'cs', - /** Church Slavic */ - cu = 'cu', - /** Welsh */ - cy = 'cy', - /** Danish */ - da = 'da', - /** German */ - de = 'de', - /** Austrian German */ - de_AT = 'de_AT', - /** Swiss High German */ - de_CH = 'de_CH', - /** Dzongkha */ - dz = 'dz', - /** Ewe */ - ee = 'ee', - /** Greek */ - el = 'el', - /** English */ - en = 'en', - /** Australian English */ - en_AU = 'en_AU', - /** Canadian English */ - en_CA = 'en_CA', - /** British English */ - en_GB = 'en_GB', - /** American English */ - en_US = 'en_US', - /** Esperanto */ - eo = 'eo', - /** Spanish */ - es = 'es', - /** European Spanish */ - es_ES = 'es_ES', - /** Mexican Spanish */ - es_MX = 'es_MX', - /** Estonian */ - et = 'et', - /** Basque */ - eu = 'eu', - /** Persian */ - fa = 'fa', - /** Dari */ - fa_AF = 'fa_AF', - /** Fulah */ - ff = 'ff', - /** Finnish */ - fi = 'fi', - /** Faroese */ - fo = 'fo', - /** French */ - fr = 'fr', - /** Canadian French */ - fr_CA = 'fr_CA', - /** Swiss French */ - fr_CH = 'fr_CH', - /** Western Frisian */ - fy = 'fy', - /** Irish */ - ga = 'ga', - /** Scottish Gaelic */ - gd = 'gd', - /** Galician */ - gl = 'gl', - /** Gujarati */ - gu = 'gu', - /** Manx */ - gv = 'gv', - /** Hausa */ - ha = 'ha', - /** Hebrew */ - he = 'he', - /** Hindi */ - hi = 'hi', - /** Croatian */ - hr = 'hr', - /** Haitian Creole */ - ht = 'ht', - /** Hungarian */ - hu = 'hu', - /** Armenian */ - hy = 'hy', - /** Interlingua */ - ia = 'ia', - /** Indonesian */ - id = 'id', - /** Igbo */ - ig = 'ig', - /** Sichuan Yi */ - ii = 'ii', - /** Icelandic */ - is = 'is', - /** Italian */ - it = 'it', - /** Japanese */ - ja = 'ja', - /** Javanese */ - jv = 'jv', - /** Georgian */ - ka = 'ka', - /** Kikuyu */ - ki = 'ki', - /** Kazakh */ - kk = 'kk', - /** Kalaallisut */ - kl = 'kl', - /** Khmer */ - km = 'km', - /** Kannada */ - kn = 'kn', - /** Korean */ - ko = 'ko', - /** Kashmiri */ - ks = 'ks', - /** Kurdish */ - ku = 'ku', - /** Cornish */ - kw = 'kw', - /** Kyrgyz */ - ky = 'ky', - /** Latin */ - la = 'la', - /** Luxembourgish */ - lb = 'lb', - /** Ganda */ - lg = 'lg', - /** Lingala */ - ln = 'ln', - /** Lao */ - lo = 'lo', - /** Lithuanian */ - lt = 'lt', - /** Luba-Katanga */ - lu = 'lu', - /** Latvian */ - lv = 'lv', - /** Malagasy */ - mg = 'mg', - /** Maori */ - mi = 'mi', - /** Macedonian */ - mk = 'mk', - /** Malayalam */ - ml = 'ml', - /** Mongolian */ - mn = 'mn', - /** Marathi */ - mr = 'mr', - /** Malay */ - ms = 'ms', - /** Maltese */ - mt = 'mt', - /** Burmese */ - my = 'my', - /** Norwegian Bokmål */ - nb = 'nb', - /** North Ndebele */ - nd = 'nd', - /** Nepali */ - ne = 'ne', - /** Dutch */ - nl = 'nl', - /** Flemish */ - nl_BE = 'nl_BE', - /** Norwegian Nynorsk */ - nn = 'nn', - /** Nyanja */ - ny = 'ny', - /** Oromo */ - om = 'om', - /** Odia */ - or = 'or', - /** Ossetic */ - os = 'os', - /** Punjabi */ - pa = 'pa', - /** Polish */ - pl = 'pl', - /** Pashto */ - ps = 'ps', - /** Portuguese */ - pt = 'pt', - /** Brazilian Portuguese */ - pt_BR = 'pt_BR', - /** European Portuguese */ - pt_PT = 'pt_PT', - /** Quechua */ - qu = 'qu', - /** Romansh */ - rm = 'rm', - /** Rundi */ - rn = 'rn', - /** Romanian */ - ro = 'ro', - /** Moldavian */ - ro_MD = 'ro_MD', - /** Russian */ - ru = 'ru', - /** Kinyarwanda */ - rw = 'rw', - /** Sanskrit */ - sa = 'sa', - /** Sindhi */ - sd = 'sd', - /** Northern Sami */ - se = 'se', - /** Sango */ - sg = 'sg', - /** Sinhala */ - si = 'si', - /** Slovak */ - sk = 'sk', - /** Slovenian */ - sl = 'sl', - /** Samoan */ - sm = 'sm', - /** Shona */ - sn = 'sn', - /** Somali */ - so = 'so', - /** Albanian */ - sq = 'sq', - /** Serbian */ - sr = 'sr', - /** Southern Sotho */ - st = 'st', - /** Sundanese */ - su = 'su', - /** Swedish */ - sv = 'sv', - /** Swahili */ - sw = 'sw', - /** Congo Swahili */ - sw_CD = 'sw_CD', - /** Tamil */ - ta = 'ta', - /** Telugu */ - te = 'te', - /** Tajik */ - tg = 'tg', - /** Thai */ - th = 'th', - /** Tigrinya */ - ti = 'ti', - /** Turkmen */ - tk = 'tk', - /** Tongan */ - to = 'to', - /** Turkish */ - tr = 'tr', - /** Tatar */ - tt = 'tt', - /** Uyghur */ - ug = 'ug', - /** Ukrainian */ - uk = 'uk', - /** Urdu */ - ur = 'ur', - /** Uzbek */ - uz = 'uz', - /** Vietnamese */ - vi = 'vi', - /** Volapük */ - vo = 'vo', - /** Wolof */ - wo = 'wo', - /** Xhosa */ - xh = 'xh', - /** Yiddish */ - yi = 'yi', - /** Yoruba */ - yo = 'yo', - /** Chinese */ - zh = 'zh', - /** Simplified Chinese */ - zh_Hans = 'zh_Hans', - /** Traditional Chinese */ - zh_Hant = 'zh_Hant', - /** Zulu */ - zu = 'zu' + /** Afrikaans */ + af = 'af', + /** Akan */ + ak = 'ak', + /** Amharic */ + am = 'am', + /** Arabic */ + ar = 'ar', + /** Assamese */ + as = 'as', + /** Azerbaijani */ + az = 'az', + /** Belarusian */ + be = 'be', + /** Bulgarian */ + bg = 'bg', + /** Bambara */ + bm = 'bm', + /** Bangla */ + bn = 'bn', + /** Tibetan */ + bo = 'bo', + /** Breton */ + br = 'br', + /** Bosnian */ + bs = 'bs', + /** Catalan */ + ca = 'ca', + /** Chechen */ + ce = 'ce', + /** Corsican */ + co = 'co', + /** Czech */ + cs = 'cs', + /** Church Slavic */ + cu = 'cu', + /** Welsh */ + cy = 'cy', + /** Danish */ + da = 'da', + /** German */ + de = 'de', + /** Austrian German */ + de_AT = 'de_AT', + /** Swiss High German */ + de_CH = 'de_CH', + /** Dzongkha */ + dz = 'dz', + /** Ewe */ + ee = 'ee', + /** Greek */ + el = 'el', + /** English */ + en = 'en', + /** Australian English */ + en_AU = 'en_AU', + /** Canadian English */ + en_CA = 'en_CA', + /** British English */ + en_GB = 'en_GB', + /** American English */ + en_US = 'en_US', + /** Esperanto */ + eo = 'eo', + /** Spanish */ + es = 'es', + /** European Spanish */ + es_ES = 'es_ES', + /** Mexican Spanish */ + es_MX = 'es_MX', + /** Estonian */ + et = 'et', + /** Basque */ + eu = 'eu', + /** Persian */ + fa = 'fa', + /** Dari */ + fa_AF = 'fa_AF', + /** Fulah */ + ff = 'ff', + /** Finnish */ + fi = 'fi', + /** Faroese */ + fo = 'fo', + /** French */ + fr = 'fr', + /** Canadian French */ + fr_CA = 'fr_CA', + /** Swiss French */ + fr_CH = 'fr_CH', + /** Western Frisian */ + fy = 'fy', + /** Irish */ + ga = 'ga', + /** Scottish Gaelic */ + gd = 'gd', + /** Galician */ + gl = 'gl', + /** Gujarati */ + gu = 'gu', + /** Manx */ + gv = 'gv', + /** Hausa */ + ha = 'ha', + /** Hebrew */ + he = 'he', + /** Hindi */ + hi = 'hi', + /** Croatian */ + hr = 'hr', + /** Haitian Creole */ + ht = 'ht', + /** Hungarian */ + hu = 'hu', + /** Armenian */ + hy = 'hy', + /** Interlingua */ + ia = 'ia', + /** Indonesian */ + id = 'id', + /** Igbo */ + ig = 'ig', + /** Sichuan Yi */ + ii = 'ii', + /** Icelandic */ + is = 'is', + /** Italian */ + it = 'it', + /** Japanese */ + ja = 'ja', + /** Javanese */ + jv = 'jv', + /** Georgian */ + ka = 'ka', + /** Kikuyu */ + ki = 'ki', + /** Kazakh */ + kk = 'kk', + /** Kalaallisut */ + kl = 'kl', + /** Khmer */ + km = 'km', + /** Kannada */ + kn = 'kn', + /** Korean */ + ko = 'ko', + /** Kashmiri */ + ks = 'ks', + /** Kurdish */ + ku = 'ku', + /** Cornish */ + kw = 'kw', + /** Kyrgyz */ + ky = 'ky', + /** Latin */ + la = 'la', + /** Luxembourgish */ + lb = 'lb', + /** Ganda */ + lg = 'lg', + /** Lingala */ + ln = 'ln', + /** Lao */ + lo = 'lo', + /** Lithuanian */ + lt = 'lt', + /** Luba-Katanga */ + lu = 'lu', + /** Latvian */ + lv = 'lv', + /** Malagasy */ + mg = 'mg', + /** Maori */ + mi = 'mi', + /** Macedonian */ + mk = 'mk', + /** Malayalam */ + ml = 'ml', + /** Mongolian */ + mn = 'mn', + /** Marathi */ + mr = 'mr', + /** Malay */ + ms = 'ms', + /** Maltese */ + mt = 'mt', + /** Burmese */ + my = 'my', + /** Norwegian Bokmål */ + nb = 'nb', + /** North Ndebele */ + nd = 'nd', + /** Nepali */ + ne = 'ne', + /** Dutch */ + nl = 'nl', + /** Flemish */ + nl_BE = 'nl_BE', + /** Norwegian Nynorsk */ + nn = 'nn', + /** Nyanja */ + ny = 'ny', + /** Oromo */ + om = 'om', + /** Odia */ + or = 'or', + /** Ossetic */ + os = 'os', + /** Punjabi */ + pa = 'pa', + /** Polish */ + pl = 'pl', + /** Pashto */ + ps = 'ps', + /** Portuguese */ + pt = 'pt', + /** Brazilian Portuguese */ + pt_BR = 'pt_BR', + /** European Portuguese */ + pt_PT = 'pt_PT', + /** Quechua */ + qu = 'qu', + /** Romansh */ + rm = 'rm', + /** Rundi */ + rn = 'rn', + /** Romanian */ + ro = 'ro', + /** Moldavian */ + ro_MD = 'ro_MD', + /** Russian */ + ru = 'ru', + /** Kinyarwanda */ + rw = 'rw', + /** Sanskrit */ + sa = 'sa', + /** Sindhi */ + sd = 'sd', + /** Northern Sami */ + se = 'se', + /** Sango */ + sg = 'sg', + /** Sinhala */ + si = 'si', + /** Slovak */ + sk = 'sk', + /** Slovenian */ + sl = 'sl', + /** Samoan */ + sm = 'sm', + /** Shona */ + sn = 'sn', + /** Somali */ + so = 'so', + /** Albanian */ + sq = 'sq', + /** Serbian */ + sr = 'sr', + /** Southern Sotho */ + st = 'st', + /** Sundanese */ + su = 'su', + /** Swedish */ + sv = 'sv', + /** Swahili */ + sw = 'sw', + /** Congo Swahili */ + sw_CD = 'sw_CD', + /** Tamil */ + ta = 'ta', + /** Telugu */ + te = 'te', + /** Tajik */ + tg = 'tg', + /** Thai */ + th = 'th', + /** Tigrinya */ + ti = 'ti', + /** Turkmen */ + tk = 'tk', + /** Tongan */ + to = 'to', + /** Turkish */ + tr = 'tr', + /** Tatar */ + tt = 'tt', + /** Uyghur */ + ug = 'ug', + /** Ukrainian */ + uk = 'uk', + /** Urdu */ + ur = 'ur', + /** Uzbek */ + uz = 'uz', + /** Vietnamese */ + vi = 'vi', + /** Volapük */ + vo = 'vo', + /** Wolof */ + wo = 'wo', + /** Xhosa */ + xh = 'xh', + /** Yiddish */ + yi = 'yi', + /** Yoruba */ + yo = 'yo', + /** Chinese */ + zh = 'zh', + /** Simplified Chinese */ + zh_Hans = 'zh_Hans', + /** Traditional Chinese */ + zh_Hant = 'zh_Hant', + /** Zulu */ + zu = 'zu', } export type LocaleStringCustomFieldConfig = CustomField & { - description?: Maybe>; - internal?: Maybe; - label?: Maybe>; - length?: Maybe; - list: Scalars['Boolean']; - name: Scalars['String']; - nullable?: Maybe; - pattern?: Maybe; - readonly?: Maybe; - type: Scalars['String']; - ui?: Maybe; + description?: Maybe>; + internal?: Maybe; + label?: Maybe>; + length?: Maybe; + list: Scalars['Boolean']; + name: Scalars['String']; + nullable?: Maybe; + pattern?: Maybe; + readonly?: Maybe; + type: Scalars['String']; + ui?: Maybe; }; export type LocaleTextCustomFieldConfig = CustomField & { - description?: Maybe>; - internal?: Maybe; - label?: Maybe>; - list: Scalars['Boolean']; - name: Scalars['String']; - nullable?: Maybe; - readonly?: Maybe; - type: Scalars['String']; - ui?: Maybe; + description?: Maybe>; + internal?: Maybe; + label?: Maybe>; + list: Scalars['Boolean']; + name: Scalars['String']; + nullable?: Maybe; + readonly?: Maybe; + type: Scalars['String']; + ui?: Maybe; }; export type LocalizedString = { - languageCode: LanguageCode; - value: Scalars['String']; + languageCode: LanguageCode; + value: Scalars['String']; }; export enum LogicalOperator { - AND = 'AND', - OR = 'OR' + AND = 'AND', + OR = 'OR', } /** Returned when attempting to register or verify a customer account without a password, when one is required. */ export type MissingPasswordError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; export type Mutation = { - /** Adds an item to the order. If custom fields are defined on the OrderLine entity, a third argument 'customFields' will be available. */ - addItemToOrder: UpdateOrderItemsResult; - /** Add a Payment to the Order */ - addPaymentToOrder: AddPaymentToOrderResult; - /** Adjusts an OrderLine. If custom fields are defined on the OrderLine entity, a third argument 'customFields' of type `OrderLineCustomFieldsInput` will be available. */ - adjustOrderLine: UpdateOrderItemsResult; - /** Applies the given coupon code to the active Order */ - applyCouponCode: ApplyCouponCodeResult; - /** Authenticates the user using a named authentication strategy */ - authenticate: AuthenticationResult; - /** Create a new Customer Address */ - createCustomerAddress: Address; - /** Delete an existing Address */ - deleteCustomerAddress: Success; - /** Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})` */ - login: NativeAuthenticationResult; - /** End the current authenticated session */ - logout: Success; - /** Regenerate and send a verification token for a new Customer registration. Only applicable if `authOptions.requireVerification` is set to true. */ - refreshCustomerVerification: RefreshCustomerVerificationResult; - /** - * Register a Customer account with the given credentials. There are three possible registration flows: - * - * _If `authOptions.requireVerification` is set to `true`:_ - * - * 1. **The Customer is registered _with_ a password**. A verificationToken will be created (and typically emailed to the Customer). That - * verificationToken would then be passed to the `verifyCustomerAccount` mutation _without_ a password. The Customer is then - * verified and authenticated in one step. - * 2. **The Customer is registered _without_ a password**. A verificationToken will be created (and typically emailed to the Customer). That - * verificationToken would then be passed to the `verifyCustomerAccount` mutation _with_ the chosen password of the Customer. The Customer is then - * verified and authenticated in one step. - * - * _If `authOptions.requireVerification` is set to `false`:_ - * - * 3. The Customer _must_ be registered _with_ a password. No further action is needed - the Customer is able to authenticate immediately. - */ - registerCustomerAccount: RegisterCustomerAccountResult; - /** Remove all OrderLine from the Order */ - removeAllOrderLines: RemoveOrderItemsResult; - /** Removes the given coupon code from the active Order */ - removeCouponCode?: Maybe; - /** Remove an OrderLine from the Order */ - removeOrderLine: RemoveOrderItemsResult; - /** Requests a password reset email to be sent */ - requestPasswordReset?: Maybe; - /** - * Request to update the emailAddress of the active Customer. If `authOptions.requireVerification` is enabled - * (as is the default), then the `identifierChangeToken` will be assigned to the current User and - * a IdentifierChangeRequestEvent will be raised. This can then be used e.g. by the EmailPlugin to email - * that verification token to the Customer, which is then used to verify the change of email address. - */ - requestUpdateCustomerEmailAddress: RequestUpdateCustomerEmailAddressResult; - /** Resets a Customer's password based on the provided token */ - resetPassword: ResetPasswordResult; - /** Set the Customer for the Order. Required only if the Customer is not currently logged in */ - setCustomerForOrder: SetCustomerForOrderResult; - /** Sets the billing address for this order */ - setOrderBillingAddress: ActiveOrderResult; - /** Allows any custom fields to be set for the active order */ - setOrderCustomFields: ActiveOrderResult; - /** Sets the shipping address for this order */ - setOrderShippingAddress: ActiveOrderResult; - /** - * Sets the shipping method by id, which can be obtained with the `eligibleShippingMethods` query. - * An Order can have multiple shipping methods, in which case you can pass an array of ids. In this case, - * you should configure a custom ShippingLineAssignmentStrategy in order to know which OrderLines each - * shipping method will apply to. - */ - setOrderShippingMethod: SetOrderShippingMethodResult; - /** Transitions an Order to a new state. Valid next states can be found by querying `nextOrderStates` */ - transitionOrderToState?: Maybe; - /** Update an existing Customer */ - updateCustomer: Customer; - /** Update an existing Address */ - updateCustomerAddress: Address; - /** - * Confirm the update of the emailAddress with the provided token, which has been generated by the - * `requestUpdateCustomerEmailAddress` mutation. - */ - updateCustomerEmailAddress: UpdateCustomerEmailAddressResult; - /** Update the password of the active Customer */ - updateCustomerPassword: UpdateCustomerPasswordResult; - /** - * Verify a Customer email address with the token sent to that address. Only applicable if `authOptions.requireVerification` is set to true. - * - * If the Customer was not registered with a password in the `registerCustomerAccount` mutation, the password _must_ be - * provided here. - */ - verifyCustomerAccount: VerifyCustomerAccountResult; + /** Adds an item to the order. If custom fields are defined on the OrderLine entity, a third argument 'customFields' will be available. */ + addItemToOrder: UpdateOrderItemsResult; + /** Add a Payment to the Order */ + addPaymentToOrder: AddPaymentToOrderResult; + /** Adjusts an OrderLine. If custom fields are defined on the OrderLine entity, a third argument 'customFields' of type `OrderLineCustomFieldsInput` will be available. */ + adjustOrderLine: UpdateOrderItemsResult; + /** Applies the given coupon code to the active Order */ + applyCouponCode: ApplyCouponCodeResult; + /** Authenticates the user using a named authentication strategy */ + authenticate: AuthenticationResult; + /** Create a new Customer Address */ + createCustomerAddress: Address; + /** Delete an existing Address */ + deleteCustomerAddress: Success; + /** Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})` */ + login: NativeAuthenticationResult; + /** End the current authenticated session */ + logout: Success; + /** Regenerate and send a verification token for a new Customer registration. Only applicable if `authOptions.requireVerification` is set to true. */ + refreshCustomerVerification: RefreshCustomerVerificationResult; + /** + * Register a Customer account with the given credentials. There are three possible registration flows: + * + * _If `authOptions.requireVerification` is set to `true`:_ + * + * 1. **The Customer is registered _with_ a password**. A verificationToken will be created (and typically emailed to the Customer). That + * verificationToken would then be passed to the `verifyCustomerAccount` mutation _without_ a password. The Customer is then + * verified and authenticated in one step. + * 2. **The Customer is registered _without_ a password**. A verificationToken will be created (and typically emailed to the Customer). That + * verificationToken would then be passed to the `verifyCustomerAccount` mutation _with_ the chosen password of the Customer. The Customer is then + * verified and authenticated in one step. + * + * _If `authOptions.requireVerification` is set to `false`:_ + * + * 3. The Customer _must_ be registered _with_ a password. No further action is needed - the Customer is able to authenticate immediately. + */ + registerCustomerAccount: RegisterCustomerAccountResult; + /** Remove all OrderLine from the Order */ + removeAllOrderLines: RemoveOrderItemsResult; + /** Removes the given coupon code from the active Order */ + removeCouponCode?: Maybe; + /** Remove an OrderLine from the Order */ + removeOrderLine: RemoveOrderItemsResult; + /** Requests a password reset email to be sent */ + requestPasswordReset?: Maybe; + /** + * Request to update the emailAddress of the active Customer. If `authOptions.requireVerification` is enabled + * (as is the default), then the `identifierChangeToken` will be assigned to the current User and + * a IdentifierChangeRequestEvent will be raised. This can then be used e.g. by the EmailPlugin to email + * that verification token to the Customer, which is then used to verify the change of email address. + */ + requestUpdateCustomerEmailAddress: RequestUpdateCustomerEmailAddressResult; + /** Resets a Customer's password based on the provided token */ + resetPassword: ResetPasswordResult; + /** Set the Customer for the Order. Required only if the Customer is not currently logged in */ + setCustomerForOrder: SetCustomerForOrderResult; + /** Sets the billing address for this order */ + setOrderBillingAddress: ActiveOrderResult; + /** Allows any custom fields to be set for the active order */ + setOrderCustomFields: ActiveOrderResult; + /** Sets the shipping address for this order */ + setOrderShippingAddress: ActiveOrderResult; + /** + * Sets the shipping method by id, which can be obtained with the `eligibleShippingMethods` query. + * An Order can have multiple shipping methods, in which case you can pass an array of ids. In this case, + * you should configure a custom ShippingLineAssignmentStrategy in order to know which OrderLines each + * shipping method will apply to. + */ + setOrderShippingMethod: SetOrderShippingMethodResult; + /** Transitions an Order to a new state. Valid next states can be found by querying `nextOrderStates` */ + transitionOrderToState?: Maybe; + /** Update an existing Customer */ + updateCustomer: Customer; + /** Update an existing Address */ + updateCustomerAddress: Address; + /** + * Confirm the update of the emailAddress with the provided token, which has been generated by the + * `requestUpdateCustomerEmailAddress` mutation. + */ + updateCustomerEmailAddress: UpdateCustomerEmailAddressResult; + /** Update the password of the active Customer */ + updateCustomerPassword: UpdateCustomerPasswordResult; + /** + * Verify a Customer email address with the token sent to that address. Only applicable if `authOptions.requireVerification` is set to true. + * + * If the Customer was not registered with a password in the `registerCustomerAccount` mutation, the password _must_ be + * provided here. + */ + verifyCustomerAccount: VerifyCustomerAccountResult; }; - export type MutationAddItemToOrderArgs = { - productVariantId: Scalars['ID']; - quantity: Scalars['Int']; + productVariantId: Scalars['ID']; + quantity: Scalars['Int']; }; - export type MutationAddPaymentToOrderArgs = { - input: PaymentInput; + input: PaymentInput; }; - export type MutationAdjustOrderLineArgs = { - orderLineId: Scalars['ID']; - quantity: Scalars['Int']; + orderLineId: Scalars['ID']; + quantity: Scalars['Int']; }; - export type MutationApplyCouponCodeArgs = { - couponCode: Scalars['String']; + couponCode: Scalars['String']; }; - export type MutationAuthenticateArgs = { - input: AuthenticationInput; - rememberMe?: InputMaybe; + input: AuthenticationInput; + rememberMe?: InputMaybe; }; - export type MutationCreateCustomerAddressArgs = { - input: CreateAddressInput; + input: CreateAddressInput; }; - export type MutationDeleteCustomerAddressArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type MutationLoginArgs = { - password: Scalars['String']; - rememberMe?: InputMaybe; - username: Scalars['String']; + password: Scalars['String']; + rememberMe?: InputMaybe; + username: Scalars['String']; }; - export type MutationRefreshCustomerVerificationArgs = { - emailAddress: Scalars['String']; + emailAddress: Scalars['String']; }; - export type MutationRegisterCustomerAccountArgs = { - input: RegisterCustomerInput; + input: RegisterCustomerInput; }; - export type MutationRemoveCouponCodeArgs = { - couponCode: Scalars['String']; + couponCode: Scalars['String']; }; - export type MutationRemoveOrderLineArgs = { - orderLineId: Scalars['ID']; + orderLineId: Scalars['ID']; }; - export type MutationRequestPasswordResetArgs = { - emailAddress: Scalars['String']; + emailAddress: Scalars['String']; }; - export type MutationRequestUpdateCustomerEmailAddressArgs = { - newEmailAddress: Scalars['String']; - password: Scalars['String']; + newEmailAddress: Scalars['String']; + password: Scalars['String']; }; - export type MutationResetPasswordArgs = { - password: Scalars['String']; - token: Scalars['String']; + password: Scalars['String']; + token: Scalars['String']; }; - export type MutationSetCustomerForOrderArgs = { - input: CreateCustomerInput; + input: CreateCustomerInput; }; - export type MutationSetOrderBillingAddressArgs = { - input: CreateAddressInput; + input: CreateAddressInput; }; - export type MutationSetOrderCustomFieldsArgs = { - input: UpdateOrderInput; + input: UpdateOrderInput; }; - export type MutationSetOrderShippingAddressArgs = { - input: CreateAddressInput; + input: CreateAddressInput; }; - export type MutationSetOrderShippingMethodArgs = { - shippingMethodId: Array; + shippingMethodId: Array; }; - export type MutationTransitionOrderToStateArgs = { - state: Scalars['String']; + state: Scalars['String']; }; - export type MutationUpdateCustomerArgs = { - input: UpdateCustomerInput; + input: UpdateCustomerInput; }; - export type MutationUpdateCustomerAddressArgs = { - input: UpdateAddressInput; + input: UpdateAddressInput; }; - export type MutationUpdateCustomerEmailAddressArgs = { - token: Scalars['String']; + token: Scalars['String']; }; - export type MutationUpdateCustomerPasswordArgs = { - currentPassword: Scalars['String']; - newPassword: Scalars['String']; + currentPassword: Scalars['String']; + newPassword: Scalars['String']; }; - export type MutationVerifyCustomerAccountArgs = { - password?: InputMaybe; - token: Scalars['String']; + password?: InputMaybe; + token: Scalars['String']; }; export type NativeAuthInput = { - password: Scalars['String']; - username: Scalars['String']; + password: Scalars['String']; + username: Scalars['String']; }; /** Returned when attempting an operation that relies on the NativeAuthStrategy, if that strategy is not configured. */ export type NativeAuthStrategyError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; -export type NativeAuthenticationResult = CurrentUser | InvalidCredentialsError | NativeAuthStrategyError | NotVerifiedError; +export type NativeAuthenticationResult = + | CurrentUser + | InvalidCredentialsError + | NativeAuthStrategyError + | NotVerifiedError; /** Returned when attempting to set a negative OrderLine quantity. */ export type NegativeQuantityError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** @@ -1771,12 +1766,12 @@ export type NegativeQuantityError = ErrorResult & { * current session. */ export type NoActiveOrderError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; export type Node = { - id: Scalars['ID']; + id: Scalars['ID']; }; /** @@ -1784,284 +1779,283 @@ export type Node = { * and an unverified user attempts to authenticate. */ export type NotVerifiedError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** Operators for filtering on a list of Number fields */ export type NumberListOperators = { - inList: Scalars['Float']; + inList: Scalars['Float']; }; /** Operators for filtering on a Int or Float field */ export type NumberOperators = { - between?: InputMaybe; - eq?: InputMaybe; - gt?: InputMaybe; - gte?: InputMaybe; - isNull?: InputMaybe; - lt?: InputMaybe; - lte?: InputMaybe; + between?: InputMaybe; + eq?: InputMaybe; + gt?: InputMaybe; + gte?: InputMaybe; + isNull?: InputMaybe; + lt?: InputMaybe; + lte?: InputMaybe; }; export type NumberRange = { - end: Scalars['Float']; - start: Scalars['Float']; + end: Scalars['Float']; + start: Scalars['Float']; }; export type Order = Node & { - /** An order is active as long as the payment process has not been completed */ - active: Scalars['Boolean']; - billingAddress?: Maybe; - /** A unique code for the Order */ - code: Scalars['String']; - /** An array of all coupon codes applied to the Order */ - couponCodes: Array; - createdAt: Scalars['DateTime']; - currencyCode: CurrencyCode; - customFields?: Maybe; - customer?: Maybe; - discounts: Array; - fulfillments?: Maybe>; - history: HistoryEntryList; - id: Scalars['ID']; - lines: Array; - /** - * The date & time that the Order was placed, i.e. the Customer - * completed the checkout and the Order is no longer "active" - */ - orderPlacedAt?: Maybe; - payments?: Maybe>; - /** Promotions applied to the order. Only gets populated after the payment process has completed. */ - promotions: Array; - shipping: Scalars['Money']; - shippingAddress?: Maybe; - shippingLines: Array; - shippingWithTax: Scalars['Money']; - state: Scalars['String']; - /** - * The subTotal is the total of all OrderLines in the Order. This figure also includes any Order-level - * discounts which have been prorated (proportionally distributed) amongst the OrderItems. - * To get a total of all OrderLines which does not account for prorated discounts, use the - * sum of `OrderLine.discountedLinePrice` values. - */ - subTotal: Scalars['Money']; - /** Same as subTotal, but inclusive of tax */ - subTotalWithTax: Scalars['Money']; - /** - * Surcharges are arbitrary modifications to the Order total which are neither - * ProductVariants nor discounts resulting from applied Promotions. For example, - * one-off discounts based on customer interaction, or surcharges based on payment - * methods. - */ - surcharges: Array; - /** A summary of the taxes being applied to this Order */ - taxSummary: Array; - /** Equal to subTotal plus shipping */ - total: Scalars['Money']; - totalQuantity: Scalars['Int']; - /** The final payable amount. Equal to subTotalWithTax plus shippingWithTax */ - totalWithTax: Scalars['Money']; - type: OrderType; - updatedAt: Scalars['DateTime']; + /** An order is active as long as the payment process has not been completed */ + active: Scalars['Boolean']; + billingAddress?: Maybe; + /** A unique code for the Order */ + code: Scalars['String']; + /** An array of all coupon codes applied to the Order */ + couponCodes: Array; + createdAt: Scalars['DateTime']; + currencyCode: CurrencyCode; + customFields?: Maybe; + customer?: Maybe; + discounts: Array; + fulfillments?: Maybe>; + history: HistoryEntryList; + id: Scalars['ID']; + lines: Array; + /** + * The date & time that the Order was placed, i.e. the Customer + * completed the checkout and the Order is no longer "active" + */ + orderPlacedAt?: Maybe; + payments?: Maybe>; + /** Promotions applied to the order. Only gets populated after the payment process has completed. */ + promotions: Array; + shipping: Scalars['Money']; + shippingAddress?: Maybe; + shippingLines: Array; + shippingWithTax: Scalars['Money']; + state: Scalars['String']; + /** + * The subTotal is the total of all OrderLines in the Order. This figure also includes any Order-level + * discounts which have been prorated (proportionally distributed) amongst the OrderItems. + * To get a total of all OrderLines which does not account for prorated discounts, use the + * sum of `OrderLine.discountedLinePrice` values. + */ + subTotal: Scalars['Money']; + /** Same as subTotal, but inclusive of tax */ + subTotalWithTax: Scalars['Money']; + /** + * Surcharges are arbitrary modifications to the Order total which are neither + * ProductVariants nor discounts resulting from applied Promotions. For example, + * one-off discounts based on customer interaction, or surcharges based on payment + * methods. + */ + surcharges: Array; + /** A summary of the taxes being applied to this Order */ + taxSummary: Array; + /** Equal to subTotal plus shipping */ + total: Scalars['Money']; + totalQuantity: Scalars['Int']; + /** The final payable amount. Equal to subTotalWithTax plus shippingWithTax */ + totalWithTax: Scalars['Money']; + type: OrderType; + updatedAt: Scalars['DateTime']; }; - export type OrderHistoryArgs = { - options?: InputMaybe; + options?: InputMaybe; }; export type OrderAddress = { - city?: Maybe; - company?: Maybe; - country?: Maybe; - countryCode?: Maybe; - customFields?: Maybe; - fullName?: Maybe; - phoneNumber?: Maybe; - postalCode?: Maybe; - province?: Maybe; - streetLine1?: Maybe; - streetLine2?: Maybe; + city?: Maybe; + company?: Maybe; + country?: Maybe; + countryCode?: Maybe; + customFields?: Maybe; + fullName?: Maybe; + phoneNumber?: Maybe; + postalCode?: Maybe; + province?: Maybe; + streetLine1?: Maybe; + streetLine2?: Maybe; }; export type OrderFilterParameter = { - active?: InputMaybe; - code?: InputMaybe; - createdAt?: InputMaybe; - currencyCode?: InputMaybe; - id?: InputMaybe; - orderPlacedAt?: InputMaybe; - shipping?: InputMaybe; - shippingWithTax?: InputMaybe; - state?: InputMaybe; - subTotal?: InputMaybe; - subTotalWithTax?: InputMaybe; - total?: InputMaybe; - totalQuantity?: InputMaybe; - totalWithTax?: InputMaybe; - type?: InputMaybe; - updatedAt?: InputMaybe; + active?: InputMaybe; + code?: InputMaybe; + createdAt?: InputMaybe; + currencyCode?: InputMaybe; + id?: InputMaybe; + orderPlacedAt?: InputMaybe; + shipping?: InputMaybe; + shippingWithTax?: InputMaybe; + state?: InputMaybe; + subTotal?: InputMaybe; + subTotalWithTax?: InputMaybe; + total?: InputMaybe; + totalQuantity?: InputMaybe; + totalWithTax?: InputMaybe; + type?: InputMaybe; + updatedAt?: InputMaybe; }; export type OrderItem = Node & { - adjustments: Array; - cancelled: Scalars['Boolean']; - createdAt: Scalars['DateTime']; - /** - * The price of a single unit including discounts, excluding tax. - * - * If Order-level discounts have been applied, this will not be the - * actual taxable unit price (see `proratedUnitPrice`), but is generally the - * correct price to display to customers to avoid confusion - * about the internal handling of distributed Order-level discounts. - */ - discountedUnitPrice: Scalars['Money']; - /** The price of a single unit including discounts and tax */ - discountedUnitPriceWithTax: Scalars['Money']; - fulfillment?: Maybe; - id: Scalars['ID']; - /** - * The actual unit price, taking into account both item discounts _and_ prorated (proportionally-distributed) - * Order-level discounts. This value is the true economic value of the OrderItem, and is used in tax - * and refund calculations. - */ - proratedUnitPrice: Scalars['Money']; - /** The proratedUnitPrice including tax */ - proratedUnitPriceWithTax: Scalars['Money']; - refundId?: Maybe; - taxLines: Array; - taxRate: Scalars['Float']; - /** The price of a single unit, excluding tax and discounts */ - unitPrice: Scalars['Money']; - /** The price of a single unit, including tax but excluding discounts */ - unitPriceWithTax: Scalars['Money']; - unitTax: Scalars['Money']; - updatedAt: Scalars['DateTime']; + adjustments: Array; + cancelled: Scalars['Boolean']; + createdAt: Scalars['DateTime']; + /** + * The price of a single unit including discounts, excluding tax. + * + * If Order-level discounts have been applied, this will not be the + * actual taxable unit price (see `proratedUnitPrice`), but is generally the + * correct price to display to customers to avoid confusion + * about the internal handling of distributed Order-level discounts. + */ + discountedUnitPrice: Scalars['Money']; + /** The price of a single unit including discounts and tax */ + discountedUnitPriceWithTax: Scalars['Money']; + fulfillment?: Maybe; + id: Scalars['ID']; + /** + * The actual unit price, taking into account both item discounts _and_ prorated (proportionally-distributed) + * Order-level discounts. This value is the true economic value of the OrderItem, and is used in tax + * and refund calculations. + */ + proratedUnitPrice: Scalars['Money']; + /** The proratedUnitPrice including tax */ + proratedUnitPriceWithTax: Scalars['Money']; + refundId?: Maybe; + taxLines: Array; + taxRate: Scalars['Float']; + /** The price of a single unit, excluding tax and discounts */ + unitPrice: Scalars['Money']; + /** The price of a single unit, including tax but excluding discounts */ + unitPriceWithTax: Scalars['Money']; + unitTax: Scalars['Money']; + updatedAt: Scalars['DateTime']; }; /** Returned when the maximum order size limit has been reached. */ export type OrderLimitError = ErrorResult & { - errorCode: ErrorCode; - maxItems: Scalars['Int']; - message: Scalars['String']; + errorCode: ErrorCode; + maxItems: Scalars['Int']; + message: Scalars['String']; }; export type OrderLine = Node & { - createdAt: Scalars['DateTime']; - customFields?: Maybe; - /** The price of the line including discounts, excluding tax */ - discountedLinePrice: Scalars['Money']; - /** The price of the line including discounts and tax */ - discountedLinePriceWithTax: Scalars['Money']; - /** - * The price of a single unit including discounts, excluding tax. - * - * If Order-level discounts have been applied, this will not be the - * actual taxable unit price (see `proratedUnitPrice`), but is generally the - * correct price to display to customers to avoid confusion - * about the internal handling of distributed Order-level discounts. - */ - discountedUnitPrice: Scalars['Money']; - /** The price of a single unit including discounts and tax */ - discountedUnitPriceWithTax: Scalars['Money']; - discounts: Array; - featuredAsset?: Maybe; - fulfillmentLines?: Maybe>; - id: Scalars['ID']; - /** The total price of the line excluding tax and discounts. */ - linePrice: Scalars['Money']; - /** The total price of the line including tax but excluding discounts. */ - linePriceWithTax: Scalars['Money']; - /** The total tax on this line */ - lineTax: Scalars['Money']; - order: Order; - /** The quantity at the time the Order was placed */ - orderPlacedQuantity: Scalars['Int']; - productVariant: ProductVariant; - /** - * The actual line price, taking into account both item discounts _and_ prorated (proportionally-distributed) - * Order-level discounts. This value is the true economic value of the OrderLine, and is used in tax - * and refund calculations. - */ - proratedLinePrice: Scalars['Money']; - /** The proratedLinePrice including tax */ - proratedLinePriceWithTax: Scalars['Money']; - /** - * The actual unit price, taking into account both item discounts _and_ prorated (proportionally-distributed) - * Order-level discounts. This value is the true economic value of the OrderItem, and is used in tax - * and refund calculations. - */ - proratedUnitPrice: Scalars['Money']; - /** The proratedUnitPrice including tax */ - proratedUnitPriceWithTax: Scalars['Money']; - quantity: Scalars['Int']; - taxLines: Array; - taxRate: Scalars['Float']; - /** The price of a single unit, excluding tax and discounts */ - unitPrice: Scalars['Money']; - /** Non-zero if the unitPrice has changed since it was initially added to Order */ - unitPriceChangeSinceAdded: Scalars['Money']; - /** The price of a single unit, including tax but excluding discounts */ - unitPriceWithTax: Scalars['Money']; - /** Non-zero if the unitPriceWithTax has changed since it was initially added to Order */ - unitPriceWithTaxChangeSinceAdded: Scalars['Money']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + /** The price of the line including discounts, excluding tax */ + discountedLinePrice: Scalars['Money']; + /** The price of the line including discounts and tax */ + discountedLinePriceWithTax: Scalars['Money']; + /** + * The price of a single unit including discounts, excluding tax. + * + * If Order-level discounts have been applied, this will not be the + * actual taxable unit price (see `proratedUnitPrice`), but is generally the + * correct price to display to customers to avoid confusion + * about the internal handling of distributed Order-level discounts. + */ + discountedUnitPrice: Scalars['Money']; + /** The price of a single unit including discounts and tax */ + discountedUnitPriceWithTax: Scalars['Money']; + discounts: Array; + featuredAsset?: Maybe; + fulfillmentLines?: Maybe>; + id: Scalars['ID']; + /** The total price of the line excluding tax and discounts. */ + linePrice: Scalars['Money']; + /** The total price of the line including tax but excluding discounts. */ + linePriceWithTax: Scalars['Money']; + /** The total tax on this line */ + lineTax: Scalars['Money']; + order: Order; + /** The quantity at the time the Order was placed */ + orderPlacedQuantity: Scalars['Int']; + productVariant: ProductVariant; + /** + * The actual line price, taking into account both item discounts _and_ prorated (proportionally-distributed) + * Order-level discounts. This value is the true economic value of the OrderLine, and is used in tax + * and refund calculations. + */ + proratedLinePrice: Scalars['Money']; + /** The proratedLinePrice including tax */ + proratedLinePriceWithTax: Scalars['Money']; + /** + * The actual unit price, taking into account both item discounts _and_ prorated (proportionally-distributed) + * Order-level discounts. This value is the true economic value of the OrderItem, and is used in tax + * and refund calculations. + */ + proratedUnitPrice: Scalars['Money']; + /** The proratedUnitPrice including tax */ + proratedUnitPriceWithTax: Scalars['Money']; + quantity: Scalars['Int']; + taxLines: Array; + taxRate: Scalars['Float']; + /** The price of a single unit, excluding tax and discounts */ + unitPrice: Scalars['Money']; + /** Non-zero if the unitPrice has changed since it was initially added to Order */ + unitPriceChangeSinceAdded: Scalars['Money']; + /** The price of a single unit, including tax but excluding discounts */ + unitPriceWithTax: Scalars['Money']; + /** Non-zero if the unitPriceWithTax has changed since it was initially added to Order */ + unitPriceWithTaxChangeSinceAdded: Scalars['Money']; + updatedAt: Scalars['DateTime']; }; export type OrderList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type OrderListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; /** Returned when attempting to modify the contents of an Order that is not in the `AddingItems` state. */ export type OrderModificationError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** Returned when attempting to add a Payment to an Order that is not in the `ArrangingPayment` state. */ export type OrderPaymentStateError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; export type OrderSortParameter = { - code?: InputMaybe; - createdAt?: InputMaybe; - id?: InputMaybe; - orderPlacedAt?: InputMaybe; - shipping?: InputMaybe; - shippingWithTax?: InputMaybe; - state?: InputMaybe; - subTotal?: InputMaybe; - subTotalWithTax?: InputMaybe; - total?: InputMaybe; - totalQuantity?: InputMaybe; - totalWithTax?: InputMaybe; - updatedAt?: InputMaybe; + code?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + orderPlacedAt?: InputMaybe; + shipping?: InputMaybe; + shippingWithTax?: InputMaybe; + state?: InputMaybe; + subTotal?: InputMaybe; + subTotalWithTax?: InputMaybe; + total?: InputMaybe; + totalQuantity?: InputMaybe; + totalWithTax?: InputMaybe; + updatedAt?: InputMaybe; }; /** Returned if there is an error in transitioning the Order state */ export type OrderStateTransitionError = ErrorResult & { - errorCode: ErrorCode; - fromState: Scalars['String']; - message: Scalars['String']; - toState: Scalars['String']; - transitionError: Scalars['String']; + errorCode: ErrorCode; + fromState: Scalars['String']; + message: Scalars['String']; + toState: Scalars['String']; + transitionError: Scalars['String']; }; /** @@ -2069,31 +2063,31 @@ export type OrderStateTransitionError = ErrorResult & { * by taxRate. */ export type OrderTaxSummary = { - /** A description of this tax */ - description: Scalars['String']; - /** The total net price or OrderItems to which this taxRate applies */ - taxBase: Scalars['Money']; - /** The taxRate as a percentage */ - taxRate: Scalars['Float']; - /** The total tax being applied to the Order at this taxRate */ - taxTotal: Scalars['Money']; + /** A description of this tax */ + description: Scalars['String']; + /** The total net price or OrderItems to which this taxRate applies */ + taxBase: Scalars['Money']; + /** The taxRate as a percentage */ + taxRate: Scalars['Float']; + /** The total tax being applied to the Order at this taxRate */ + taxTotal: Scalars['Money']; }; export enum OrderType { - Aggregate = 'Aggregate', - Regular = 'Regular', - Seller = 'Seller' + Aggregate = 'Aggregate', + Regular = 'Regular', + Seller = 'Seller', } export type PaginatedList = { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; /** Returned when attempting to verify a customer account with a password, when a password has already been set. */ export type PasswordAlreadySetError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** @@ -2101,8 +2095,8 @@ export type PasswordAlreadySetError = ErrorResult & { * expired according to the `verificationTokenDuration` setting in the AuthOptions. */ export type PasswordResetTokenExpiredError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** @@ -2110,87 +2104,87 @@ export type PasswordResetTokenExpiredError = ErrorResult & { * invalid or does not match any expected tokens. */ export type PasswordResetTokenInvalidError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** Returned when attempting to register or verify a customer account where the given password fails password validation. */ export type PasswordValidationError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; - validationErrorMessage: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; + validationErrorMessage: Scalars['String']; }; export type Payment = Node & { - amount: Scalars['Money']; - createdAt: Scalars['DateTime']; - errorMessage?: Maybe; - id: Scalars['ID']; - metadata?: Maybe; - method: Scalars['String']; - refunds: Array; - state: Scalars['String']; - transactionId?: Maybe; - updatedAt: Scalars['DateTime']; + amount: Scalars['Money']; + createdAt: Scalars['DateTime']; + errorMessage?: Maybe; + id: Scalars['ID']; + metadata?: Maybe; + method: Scalars['String']; + refunds: Array; + state: Scalars['String']; + transactionId?: Maybe; + updatedAt: Scalars['DateTime']; }; /** Returned when a Payment is declined by the payment provider. */ export type PaymentDeclinedError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; - paymentErrorMessage: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; + paymentErrorMessage: Scalars['String']; }; /** Returned when a Payment fails due to an error. */ export type PaymentFailedError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; - paymentErrorMessage: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; + paymentErrorMessage: Scalars['String']; }; /** Passed as input to the `addPaymentToOrder` mutation. */ export type PaymentInput = { - /** - * This field should contain arbitrary data passed to the specified PaymentMethodHandler's `createPayment()` method - * as the "metadata" argument. For example, it could contain an ID for the payment and other - * data generated by the payment provider. - */ - metadata: Scalars['JSON']; - /** This field should correspond to the `code` property of a PaymentMethod. */ - method: Scalars['String']; + /** + * This field should contain arbitrary data passed to the specified PaymentMethodHandler's `createPayment()` method + * as the "metadata" argument. For example, it could contain an ID for the payment and other + * data generated by the payment provider. + */ + metadata: Scalars['JSON']; + /** This field should correspond to the `code` property of a PaymentMethod. */ + method: Scalars['String']; }; export type PaymentMethod = Node & { - checker?: Maybe; - code: Scalars['String']; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - description: Scalars['String']; - enabled: Scalars['Boolean']; - handler: ConfigurableOperation; - id: Scalars['ID']; - name: Scalars['String']; - translations: Array; - updatedAt: Scalars['DateTime']; + checker?: Maybe; + code: Scalars['String']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + description: Scalars['String']; + enabled: Scalars['Boolean']; + handler: ConfigurableOperation; + id: Scalars['ID']; + name: Scalars['String']; + translations: Array; + updatedAt: Scalars['DateTime']; }; export type PaymentMethodQuote = { - code: Scalars['String']; - customFields?: Maybe; - description: Scalars['String']; - eligibilityMessage?: Maybe; - id: Scalars['ID']; - isEligible: Scalars['Boolean']; - name: Scalars['String']; + code: Scalars['String']; + customFields?: Maybe; + description: Scalars['String']; + eligibilityMessage?: Maybe; + id: Scalars['ID']; + isEligible: Scalars['Boolean']; + name: Scalars['String']; }; export type PaymentMethodTranslation = { - createdAt: Scalars['DateTime']; - description: Scalars['String']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + description: Scalars['String']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; /** @@ -2226,871 +2220,896 @@ export type PaymentMethodTranslation = { * @docsCategory common */ export enum Permission { - /** Authenticated means simply that the user is logged in */ - Authenticated = 'Authenticated', - /** Grants permission to create Administrator */ - CreateAdministrator = 'CreateAdministrator', - /** Grants permission to create Asset */ - CreateAsset = 'CreateAsset', - /** Grants permission to create Products, Facets, Assets, Collections */ - CreateCatalog = 'CreateCatalog', - /** Grants permission to create Channel */ - CreateChannel = 'CreateChannel', - /** Grants permission to create Collection */ - CreateCollection = 'CreateCollection', - /** Grants permission to create Country */ - CreateCountry = 'CreateCountry', - /** Grants permission to create Customer */ - CreateCustomer = 'CreateCustomer', - /** Grants permission to create CustomerGroup */ - CreateCustomerGroup = 'CreateCustomerGroup', - /** Grants permission to create Facet */ - CreateFacet = 'CreateFacet', - /** Grants permission to create Order */ - CreateOrder = 'CreateOrder', - /** Grants permission to create PaymentMethod */ - CreatePaymentMethod = 'CreatePaymentMethod', - /** Grants permission to create Product */ - CreateProduct = 'CreateProduct', - /** Grants permission to create Promotion */ - CreatePromotion = 'CreatePromotion', - /** Grants permission to create Seller */ - CreateSeller = 'CreateSeller', - /** Grants permission to create PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings */ - CreateSettings = 'CreateSettings', - /** Grants permission to create ShippingMethod */ - CreateShippingMethod = 'CreateShippingMethod', - /** Grants permission to create System */ - CreateSystem = 'CreateSystem', - /** Grants permission to create Tag */ - CreateTag = 'CreateTag', - /** Grants permission to create TaxCategory */ - CreateTaxCategory = 'CreateTaxCategory', - /** Grants permission to create TaxRate */ - CreateTaxRate = 'CreateTaxRate', - /** Grants permission to create Zone */ - CreateZone = 'CreateZone', - /** Grants permission to delete Administrator */ - DeleteAdministrator = 'DeleteAdministrator', - /** Grants permission to delete Asset */ - DeleteAsset = 'DeleteAsset', - /** Grants permission to delete Products, Facets, Assets, Collections */ - DeleteCatalog = 'DeleteCatalog', - /** Grants permission to delete Channel */ - DeleteChannel = 'DeleteChannel', - /** Grants permission to delete Collection */ - DeleteCollection = 'DeleteCollection', - /** Grants permission to delete Country */ - DeleteCountry = 'DeleteCountry', - /** Grants permission to delete Customer */ - DeleteCustomer = 'DeleteCustomer', - /** Grants permission to delete CustomerGroup */ - DeleteCustomerGroup = 'DeleteCustomerGroup', - /** Grants permission to delete Facet */ - DeleteFacet = 'DeleteFacet', - /** Grants permission to delete Order */ - DeleteOrder = 'DeleteOrder', - /** Grants permission to delete PaymentMethod */ - DeletePaymentMethod = 'DeletePaymentMethod', - /** Grants permission to delete Product */ - DeleteProduct = 'DeleteProduct', - /** Grants permission to delete Promotion */ - DeletePromotion = 'DeletePromotion', - /** Grants permission to delete Seller */ - DeleteSeller = 'DeleteSeller', - /** Grants permission to delete PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings */ - DeleteSettings = 'DeleteSettings', - /** Grants permission to delete ShippingMethod */ - DeleteShippingMethod = 'DeleteShippingMethod', - /** Grants permission to delete System */ - DeleteSystem = 'DeleteSystem', - /** Grants permission to delete Tag */ - DeleteTag = 'DeleteTag', - /** Grants permission to delete TaxCategory */ - DeleteTaxCategory = 'DeleteTaxCategory', - /** Grants permission to delete TaxRate */ - DeleteTaxRate = 'DeleteTaxRate', - /** Grants permission to delete Zone */ - DeleteZone = 'DeleteZone', - /** Owner means the user owns this entity, e.g. a Customer's own Order */ - Owner = 'Owner', - /** Public means any unauthenticated user may perform the operation */ - Public = 'Public', - /** Grants permission to read Administrator */ - ReadAdministrator = 'ReadAdministrator', - /** Grants permission to read Asset */ - ReadAsset = 'ReadAsset', - /** Grants permission to read Products, Facets, Assets, Collections */ - ReadCatalog = 'ReadCatalog', - /** Grants permission to read Channel */ - ReadChannel = 'ReadChannel', - /** Grants permission to read Collection */ - ReadCollection = 'ReadCollection', - /** Grants permission to read Country */ - ReadCountry = 'ReadCountry', - /** Grants permission to read Customer */ - ReadCustomer = 'ReadCustomer', - /** Grants permission to read CustomerGroup */ - ReadCustomerGroup = 'ReadCustomerGroup', - /** Grants permission to read Facet */ - ReadFacet = 'ReadFacet', - /** Grants permission to read Order */ - ReadOrder = 'ReadOrder', - /** Grants permission to read PaymentMethod */ - ReadPaymentMethod = 'ReadPaymentMethod', - /** Grants permission to read Product */ - ReadProduct = 'ReadProduct', - /** Grants permission to read Promotion */ - ReadPromotion = 'ReadPromotion', - /** Grants permission to read Seller */ - ReadSeller = 'ReadSeller', - /** Grants permission to read PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings */ - ReadSettings = 'ReadSettings', - /** Grants permission to read ShippingMethod */ - ReadShippingMethod = 'ReadShippingMethod', - /** Grants permission to read System */ - ReadSystem = 'ReadSystem', - /** Grants permission to read Tag */ - ReadTag = 'ReadTag', - /** Grants permission to read TaxCategory */ - ReadTaxCategory = 'ReadTaxCategory', - /** Grants permission to read TaxRate */ - ReadTaxRate = 'ReadTaxRate', - /** Grants permission to read Zone */ - ReadZone = 'ReadZone', - /** SuperAdmin has unrestricted access to all operations */ - SuperAdmin = 'SuperAdmin', - /** Grants permission to update Administrator */ - UpdateAdministrator = 'UpdateAdministrator', - /** Grants permission to update Asset */ - UpdateAsset = 'UpdateAsset', - /** Grants permission to update Products, Facets, Assets, Collections */ - UpdateCatalog = 'UpdateCatalog', - /** Grants permission to update Channel */ - UpdateChannel = 'UpdateChannel', - /** Grants permission to update Collection */ - UpdateCollection = 'UpdateCollection', - /** Grants permission to update Country */ - UpdateCountry = 'UpdateCountry', - /** Grants permission to update Customer */ - UpdateCustomer = 'UpdateCustomer', - /** Grants permission to update CustomerGroup */ - UpdateCustomerGroup = 'UpdateCustomerGroup', - /** Grants permission to update Facet */ - UpdateFacet = 'UpdateFacet', - /** Grants permission to update GlobalSettings */ - UpdateGlobalSettings = 'UpdateGlobalSettings', - /** Grants permission to update Order */ - UpdateOrder = 'UpdateOrder', - /** Grants permission to update PaymentMethod */ - UpdatePaymentMethod = 'UpdatePaymentMethod', - /** Grants permission to update Product */ - UpdateProduct = 'UpdateProduct', - /** Grants permission to update Promotion */ - UpdatePromotion = 'UpdatePromotion', - /** Grants permission to update Seller */ - UpdateSeller = 'UpdateSeller', - /** Grants permission to update PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings */ - UpdateSettings = 'UpdateSettings', - /** Grants permission to update ShippingMethod */ - UpdateShippingMethod = 'UpdateShippingMethod', - /** Grants permission to update System */ - UpdateSystem = 'UpdateSystem', - /** Grants permission to update Tag */ - UpdateTag = 'UpdateTag', - /** Grants permission to update TaxCategory */ - UpdateTaxCategory = 'UpdateTaxCategory', - /** Grants permission to update TaxRate */ - UpdateTaxRate = 'UpdateTaxRate', - /** Grants permission to update Zone */ - UpdateZone = 'UpdateZone' + /** Authenticated means simply that the user is logged in */ + Authenticated = 'Authenticated', + /** Grants permission to create Administrator */ + CreateAdministrator = 'CreateAdministrator', + /** Grants permission to create Asset */ + CreateAsset = 'CreateAsset', + /** Grants permission to create Products, Facets, Assets, Collections */ + CreateCatalog = 'CreateCatalog', + /** Grants permission to create Channel */ + CreateChannel = 'CreateChannel', + /** Grants permission to create Collection */ + CreateCollection = 'CreateCollection', + /** Grants permission to create Country */ + CreateCountry = 'CreateCountry', + /** Grants permission to create Customer */ + CreateCustomer = 'CreateCustomer', + /** Grants permission to create CustomerGroup */ + CreateCustomerGroup = 'CreateCustomerGroup', + /** Grants permission to create Facet */ + CreateFacet = 'CreateFacet', + /** Grants permission to create Order */ + CreateOrder = 'CreateOrder', + /** Grants permission to create PaymentMethod */ + CreatePaymentMethod = 'CreatePaymentMethod', + /** Grants permission to create Product */ + CreateProduct = 'CreateProduct', + /** Grants permission to create Promotion */ + CreatePromotion = 'CreatePromotion', + /** Grants permission to create Seller */ + CreateSeller = 'CreateSeller', + /** Grants permission to create PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings */ + CreateSettings = 'CreateSettings', + /** Grants permission to create ShippingMethod */ + CreateShippingMethod = 'CreateShippingMethod', + /** Grants permission to create System */ + CreateSystem = 'CreateSystem', + /** Grants permission to create Tag */ + CreateTag = 'CreateTag', + /** Grants permission to create TaxCategory */ + CreateTaxCategory = 'CreateTaxCategory', + /** Grants permission to create TaxRate */ + CreateTaxRate = 'CreateTaxRate', + /** Grants permission to create Zone */ + CreateZone = 'CreateZone', + /** Grants permission to delete Administrator */ + DeleteAdministrator = 'DeleteAdministrator', + /** Grants permission to delete Asset */ + DeleteAsset = 'DeleteAsset', + /** Grants permission to delete Products, Facets, Assets, Collections */ + DeleteCatalog = 'DeleteCatalog', + /** Grants permission to delete Channel */ + DeleteChannel = 'DeleteChannel', + /** Grants permission to delete Collection */ + DeleteCollection = 'DeleteCollection', + /** Grants permission to delete Country */ + DeleteCountry = 'DeleteCountry', + /** Grants permission to delete Customer */ + DeleteCustomer = 'DeleteCustomer', + /** Grants permission to delete CustomerGroup */ + DeleteCustomerGroup = 'DeleteCustomerGroup', + /** Grants permission to delete Facet */ + DeleteFacet = 'DeleteFacet', + /** Grants permission to delete Order */ + DeleteOrder = 'DeleteOrder', + /** Grants permission to delete PaymentMethod */ + DeletePaymentMethod = 'DeletePaymentMethod', + /** Grants permission to delete Product */ + DeleteProduct = 'DeleteProduct', + /** Grants permission to delete Promotion */ + DeletePromotion = 'DeletePromotion', + /** Grants permission to delete Seller */ + DeleteSeller = 'DeleteSeller', + /** Grants permission to delete PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings */ + DeleteSettings = 'DeleteSettings', + /** Grants permission to delete ShippingMethod */ + DeleteShippingMethod = 'DeleteShippingMethod', + /** Grants permission to delete System */ + DeleteSystem = 'DeleteSystem', + /** Grants permission to delete Tag */ + DeleteTag = 'DeleteTag', + /** Grants permission to delete TaxCategory */ + DeleteTaxCategory = 'DeleteTaxCategory', + /** Grants permission to delete TaxRate */ + DeleteTaxRate = 'DeleteTaxRate', + /** Grants permission to delete Zone */ + DeleteZone = 'DeleteZone', + /** Owner means the user owns this entity, e.g. a Customer's own Order */ + Owner = 'Owner', + /** Public means any unauthenticated user may perform the operation */ + Public = 'Public', + /** Grants permission to read Administrator */ + ReadAdministrator = 'ReadAdministrator', + /** Grants permission to read Asset */ + ReadAsset = 'ReadAsset', + /** Grants permission to read Products, Facets, Assets, Collections */ + ReadCatalog = 'ReadCatalog', + /** Grants permission to read Channel */ + ReadChannel = 'ReadChannel', + /** Grants permission to read Collection */ + ReadCollection = 'ReadCollection', + /** Grants permission to read Country */ + ReadCountry = 'ReadCountry', + /** Grants permission to read Customer */ + ReadCustomer = 'ReadCustomer', + /** Grants permission to read CustomerGroup */ + ReadCustomerGroup = 'ReadCustomerGroup', + /** Grants permission to read Facet */ + ReadFacet = 'ReadFacet', + /** Grants permission to read Order */ + ReadOrder = 'ReadOrder', + /** Grants permission to read PaymentMethod */ + ReadPaymentMethod = 'ReadPaymentMethod', + /** Grants permission to read Product */ + ReadProduct = 'ReadProduct', + /** Grants permission to read Promotion */ + ReadPromotion = 'ReadPromotion', + /** Grants permission to read Seller */ + ReadSeller = 'ReadSeller', + /** Grants permission to read PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings */ + ReadSettings = 'ReadSettings', + /** Grants permission to read ShippingMethod */ + ReadShippingMethod = 'ReadShippingMethod', + /** Grants permission to read System */ + ReadSystem = 'ReadSystem', + /** Grants permission to read Tag */ + ReadTag = 'ReadTag', + /** Grants permission to read TaxCategory */ + ReadTaxCategory = 'ReadTaxCategory', + /** Grants permission to read TaxRate */ + ReadTaxRate = 'ReadTaxRate', + /** Grants permission to read Zone */ + ReadZone = 'ReadZone', + /** SuperAdmin has unrestricted access to all operations */ + SuperAdmin = 'SuperAdmin', + /** Grants permission to update Administrator */ + UpdateAdministrator = 'UpdateAdministrator', + /** Grants permission to update Asset */ + UpdateAsset = 'UpdateAsset', + /** Grants permission to update Products, Facets, Assets, Collections */ + UpdateCatalog = 'UpdateCatalog', + /** Grants permission to update Channel */ + UpdateChannel = 'UpdateChannel', + /** Grants permission to update Collection */ + UpdateCollection = 'UpdateCollection', + /** Grants permission to update Country */ + UpdateCountry = 'UpdateCountry', + /** Grants permission to update Customer */ + UpdateCustomer = 'UpdateCustomer', + /** Grants permission to update CustomerGroup */ + UpdateCustomerGroup = 'UpdateCustomerGroup', + /** Grants permission to update Facet */ + UpdateFacet = 'UpdateFacet', + /** Grants permission to update GlobalSettings */ + UpdateGlobalSettings = 'UpdateGlobalSettings', + /** Grants permission to update Order */ + UpdateOrder = 'UpdateOrder', + /** Grants permission to update PaymentMethod */ + UpdatePaymentMethod = 'UpdatePaymentMethod', + /** Grants permission to update Product */ + UpdateProduct = 'UpdateProduct', + /** Grants permission to update Promotion */ + UpdatePromotion = 'UpdatePromotion', + /** Grants permission to update Seller */ + UpdateSeller = 'UpdateSeller', + /** Grants permission to update PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings */ + UpdateSettings = 'UpdateSettings', + /** Grants permission to update ShippingMethod */ + UpdateShippingMethod = 'UpdateShippingMethod', + /** Grants permission to update System */ + UpdateSystem = 'UpdateSystem', + /** Grants permission to update Tag */ + UpdateTag = 'UpdateTag', + /** Grants permission to update TaxCategory */ + UpdateTaxCategory = 'UpdateTaxCategory', + /** Grants permission to update TaxRate */ + UpdateTaxRate = 'UpdateTaxRate', + /** Grants permission to update Zone */ + UpdateZone = 'UpdateZone', } /** The price range where the result has more than one price */ export type PriceRange = { - max: Scalars['Money']; - min: Scalars['Money']; + max: Scalars['Money']; + min: Scalars['Money']; }; export type Product = Node & { - assets: Array; - collections: Array; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - description: Scalars['String']; - facetValues: Array; - featuredAsset?: Maybe; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - optionGroups: Array; - slug: Scalars['String']; - translations: Array; - updatedAt: Scalars['DateTime']; - /** Returns a paginated, sortable, filterable list of ProductVariants */ - variantList: ProductVariantList; - /** Returns all ProductVariants */ - variants: Array; + assets: Array; + collections: Array; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + description: Scalars['String']; + facetValues: Array; + featuredAsset?: Maybe; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + optionGroups: Array; + slug: Scalars['String']; + translations: Array; + updatedAt: Scalars['DateTime']; + /** Returns a paginated, sortable, filterable list of ProductVariants */ + variantList: ProductVariantList; + /** Returns all ProductVariants */ + variants: Array; }; - export type ProductVariantListArgs = { - options?: InputMaybe; + options?: InputMaybe; }; export type ProductFilterParameter = { - createdAt?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - languageCode?: InputMaybe; - name?: InputMaybe; - slug?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + description?: InputMaybe; + id?: InputMaybe; + languageCode?: InputMaybe; + name?: InputMaybe; + slug?: InputMaybe; + updatedAt?: InputMaybe; }; export type ProductList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type ProductListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type ProductOption = Node & { - code: Scalars['String']; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - group: ProductOptionGroup; - groupId: Scalars['ID']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - translations: Array; - updatedAt: Scalars['DateTime']; + code: Scalars['String']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + group: ProductOptionGroup; + groupId: Scalars['ID']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + translations: Array; + updatedAt: Scalars['DateTime']; }; export type ProductOptionGroup = Node & { - code: Scalars['String']; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - options: Array; - translations: Array; - updatedAt: Scalars['DateTime']; + code: Scalars['String']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + options: Array; + translations: Array; + updatedAt: Scalars['DateTime']; }; export type ProductOptionGroupTranslation = { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type ProductOptionTranslation = { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type ProductSortParameter = { - createdAt?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - slug?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + description?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + slug?: InputMaybe; + updatedAt?: InputMaybe; }; export type ProductTranslation = { - createdAt: Scalars['DateTime']; - description: Scalars['String']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - slug: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + description: Scalars['String']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + slug: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type ProductVariant = Node & { - assets: Array; - createdAt: Scalars['DateTime']; - currencyCode: CurrencyCode; - customFields?: Maybe; - facetValues: Array; - featuredAsset?: Maybe; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - options: Array; - price: Scalars['Money']; - priceWithTax: Scalars['Money']; - product: Product; - productId: Scalars['ID']; - sku: Scalars['String']; - stockLevel: Scalars['String']; - taxCategory: TaxCategory; - taxRateApplied: TaxRate; - translations: Array; - updatedAt: Scalars['DateTime']; + assets: Array; + createdAt: Scalars['DateTime']; + currencyCode: CurrencyCode; + customFields?: Maybe; + facetValues: Array; + featuredAsset?: Maybe; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + options: Array; + price: Scalars['Money']; + priceWithTax: Scalars['Money']; + product: Product; + productId: Scalars['ID']; + sku: Scalars['String']; + stockLevel: Scalars['String']; + taxCategory: TaxCategory; + taxRateApplied: TaxRate; + translations: Array; + updatedAt: Scalars['DateTime']; }; export type ProductVariantFilterParameter = { - createdAt?: InputMaybe; - currencyCode?: InputMaybe; - id?: InputMaybe; - languageCode?: InputMaybe; - name?: InputMaybe; - price?: InputMaybe; - priceWithTax?: InputMaybe; - productId?: InputMaybe; - sku?: InputMaybe; - stockLevel?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + currencyCode?: InputMaybe; + id?: InputMaybe; + languageCode?: InputMaybe; + name?: InputMaybe; + price?: InputMaybe; + priceWithTax?: InputMaybe; + productId?: InputMaybe; + sku?: InputMaybe; + stockLevel?: InputMaybe; + updatedAt?: InputMaybe; }; export type ProductVariantList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type ProductVariantListOptions = { - /** Allows the results to be filtered */ - filter?: InputMaybe; - /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ - filterOperator?: InputMaybe; - /** Skips the first n results, for use in pagination */ - skip?: InputMaybe; - /** Specifies which properties to sort the results by */ - sort?: InputMaybe; - /** Takes n results, for use in pagination */ - take?: InputMaybe; + /** Allows the results to be filtered */ + filter?: InputMaybe; + /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */ + filterOperator?: InputMaybe; + /** Skips the first n results, for use in pagination */ + skip?: InputMaybe; + /** Specifies which properties to sort the results by */ + sort?: InputMaybe; + /** Takes n results, for use in pagination */ + take?: InputMaybe; }; export type ProductVariantSortParameter = { - createdAt?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - price?: InputMaybe; - priceWithTax?: InputMaybe; - productId?: InputMaybe; - sku?: InputMaybe; - stockLevel?: InputMaybe; - updatedAt?: InputMaybe; + createdAt?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + price?: InputMaybe; + priceWithTax?: InputMaybe; + productId?: InputMaybe; + sku?: InputMaybe; + stockLevel?: InputMaybe; + updatedAt?: InputMaybe; }; export type ProductVariantTranslation = { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type Promotion = Node & { - actions: Array; - conditions: Array; - couponCode?: Maybe; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - description: Scalars['String']; - enabled: Scalars['Boolean']; - endsAt?: Maybe; - id: Scalars['ID']; - name: Scalars['String']; - perCustomerUsageLimit?: Maybe; - startsAt?: Maybe; - translations: Array; - updatedAt: Scalars['DateTime']; + actions: Array; + conditions: Array; + couponCode?: Maybe; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + description: Scalars['String']; + enabled: Scalars['Boolean']; + endsAt?: Maybe; + id: Scalars['ID']; + name: Scalars['String']; + perCustomerUsageLimit?: Maybe; + startsAt?: Maybe; + translations: Array; + updatedAt: Scalars['DateTime']; }; export type PromotionList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type PromotionTranslation = { - createdAt: Scalars['DateTime']; - description: Scalars['String']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + description: Scalars['String']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type Query = { - /** The active Channel */ - activeChannel: Channel; - /** The active Customer */ - activeCustomer?: Maybe; - /** - * The active Order. Will be `null` until an Order is created via `addItemToOrder`. Once an Order reaches the - * state of `PaymentAuthorized` or `PaymentSettled`, then that Order is no longer considered "active" and this - * query will once again return `null`. - */ - activeOrder?: Maybe; - /** An array of supported Countries */ - availableCountries: Array; - /** Returns a Collection either by its id or slug. If neither 'id' nor 'slug' is specified, an error will result. */ - collection?: Maybe; - /** A list of Collections available to the shop */ - collections: CollectionList; - /** Returns a list of payment methods and their eligibility based on the current active Order */ - eligiblePaymentMethods: Array; - /** Returns a list of eligible shipping methods based on the current active Order */ - eligibleShippingMethods: Array; - /** Returns a Facet by its id */ - facet?: Maybe; - /** A list of Facets available to the shop */ - facets: FacetList; - /** Returns information about the current authenticated User */ - me?: Maybe; - /** Returns the possible next states that the activeOrder can transition to */ - nextOrderStates: Array; - /** - * Returns an Order based on the id. Note that in the Shop API, only orders belonging to the - * currently-authenticated User may be queried. - */ - order?: Maybe; - /** - * Returns an Order based on the order `code`. For guest Orders (i.e. Orders placed by non-authenticated Customers) - * this query will only return the Order within 2 hours of the Order being placed. This allows an Order confirmation - * screen to be shown immediately after completion of a guest checkout, yet prevents security risks of allowing - * general anonymous access to Order data. - */ - orderByCode?: Maybe; - /** Get a Product either by id or slug. If neither 'id' nor 'slug' is specified, an error will result. */ - product?: Maybe; - /** Get a list of Products */ - products: ProductList; - /** Search Products based on the criteria set by the `SearchInput` */ - search: SearchResponse; + /** The active Channel */ + activeChannel: Channel; + /** The active Customer */ + activeCustomer?: Maybe; + /** + * The active Order. Will be `null` until an Order is created via `addItemToOrder`. Once an Order reaches the + * state of `PaymentAuthorized` or `PaymentSettled`, then that Order is no longer considered "active" and this + * query will once again return `null`. + */ + activeOrder?: Maybe; + /** An array of supported Countries */ + availableCountries: Array; + /** Returns a Collection either by its id or slug. If neither 'id' nor 'slug' is specified, an error will result. */ + collection?: Maybe; + /** A list of Collections available to the shop */ + collections: CollectionList; + /** Returns a list of payment methods and their eligibility based on the current active Order */ + eligiblePaymentMethods: Array; + /** Returns a list of eligible shipping methods based on the current active Order */ + eligibleShippingMethods: Array; + /** Returns a Facet by its id */ + facet?: Maybe; + /** A list of Facets available to the shop */ + facets: FacetList; + /** Returns information about the current authenticated User */ + me?: Maybe; + /** Returns the possible next states that the activeOrder can transition to */ + nextOrderStates: Array; + /** + * Returns an Order based on the id. Note that in the Shop API, only orders belonging to the + * currently-authenticated User may be queried. + */ + order?: Maybe; + /** + * Returns an Order based on the order `code`. For guest Orders (i.e. Orders placed by non-authenticated Customers) + * this query will only return the Order within 2 hours of the Order being placed. This allows an Order confirmation + * screen to be shown immediately after completion of a guest checkout, yet prevents security risks of allowing + * general anonymous access to Order data. + */ + orderByCode?: Maybe; + /** Get a Product either by id or slug. If neither 'id' nor 'slug' is specified, an error will result. */ + product?: Maybe; + /** Get a list of Products */ + products: ProductList; + /** Search Products based on the criteria set by the `SearchInput` */ + search: SearchResponse; }; - export type QueryCollectionArgs = { - id?: InputMaybe; - slug?: InputMaybe; + id?: InputMaybe; + slug?: InputMaybe; }; - export type QueryCollectionsArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QueryFacetArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QueryFacetsArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QueryOrderArgs = { - id: Scalars['ID']; + id: Scalars['ID']; }; - export type QueryOrderByCodeArgs = { - code: Scalars['String']; + code: Scalars['String']; }; - export type QueryProductArgs = { - id?: InputMaybe; - slug?: InputMaybe; + id?: InputMaybe; + slug?: InputMaybe; }; - export type QueryProductsArgs = { - options?: InputMaybe; + options?: InputMaybe; }; - export type QuerySearchArgs = { - input: SearchInput; + input: SearchInput; }; export type RefreshCustomerVerificationResult = NativeAuthStrategyError | Success; export type Refund = Node & { - adjustment: Scalars['Money']; - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - items: Scalars['Money']; - lines: Array; - metadata?: Maybe; - method?: Maybe; - paymentId: Scalars['ID']; - reason?: Maybe; - shipping: Scalars['Money']; - state: Scalars['String']; - total: Scalars['Money']; - transactionId?: Maybe; - updatedAt: Scalars['DateTime']; + adjustment: Scalars['Money']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + items: Scalars['Money']; + lines: Array; + metadata?: Maybe; + method?: Maybe; + paymentId: Scalars['ID']; + reason?: Maybe; + shipping: Scalars['Money']; + state: Scalars['String']; + total: Scalars['Money']; + transactionId?: Maybe; + updatedAt: Scalars['DateTime']; }; export type RefundLine = { - orderLine: OrderLine; - orderLineId: Scalars['ID']; - quantity: Scalars['Int']; - refund: Refund; - refundId: Scalars['ID']; + orderLine: OrderLine; + orderLineId: Scalars['ID']; + quantity: Scalars['Int']; + refund: Refund; + refundId: Scalars['ID']; }; -export type RegisterCustomerAccountResult = MissingPasswordError | NativeAuthStrategyError | PasswordValidationError | Success; +export type RegisterCustomerAccountResult = + | MissingPasswordError + | NativeAuthStrategyError + | PasswordValidationError + | Success; export type RegisterCustomerInput = { - emailAddress: Scalars['String']; - firstName?: InputMaybe; - lastName?: InputMaybe; - password?: InputMaybe; - phoneNumber?: InputMaybe; - title?: InputMaybe; + emailAddress: Scalars['String']; + firstName?: InputMaybe; + lastName?: InputMaybe; + password?: InputMaybe; + phoneNumber?: InputMaybe; + title?: InputMaybe; }; export type RelationCustomFieldConfig = CustomField & { - description?: Maybe>; - entity: Scalars['String']; - internal?: Maybe; - label?: Maybe>; - list: Scalars['Boolean']; - name: Scalars['String']; - nullable?: Maybe; - readonly?: Maybe; - scalarFields: Array; - type: Scalars['String']; - ui?: Maybe; + description?: Maybe>; + entity: Scalars['String']; + internal?: Maybe; + label?: Maybe>; + list: Scalars['Boolean']; + name: Scalars['String']; + nullable?: Maybe; + readonly?: Maybe; + scalarFields: Array; + type: Scalars['String']; + ui?: Maybe; }; export type RemoveOrderItemsResult = Order | OrderModificationError; export type RequestPasswordResetResult = NativeAuthStrategyError | Success; -export type RequestUpdateCustomerEmailAddressResult = EmailAddressConflictError | InvalidCredentialsError | NativeAuthStrategyError | Success; +export type RequestUpdateCustomerEmailAddressResult = + | EmailAddressConflictError + | InvalidCredentialsError + | NativeAuthStrategyError + | Success; -export type ResetPasswordResult = CurrentUser | NativeAuthStrategyError | NotVerifiedError | PasswordResetTokenExpiredError | PasswordResetTokenInvalidError | PasswordValidationError; +export type ResetPasswordResult = + | CurrentUser + | NativeAuthStrategyError + | NotVerifiedError + | PasswordResetTokenExpiredError + | PasswordResetTokenInvalidError + | PasswordValidationError; export type Role = Node & { - channels: Array; - code: Scalars['String']; - createdAt: Scalars['DateTime']; - description: Scalars['String']; - id: Scalars['ID']; - permissions: Array; - updatedAt: Scalars['DateTime']; + channels: Array; + code: Scalars['String']; + createdAt: Scalars['DateTime']; + description: Scalars['String']; + id: Scalars['ID']; + permissions: Array; + updatedAt: Scalars['DateTime']; }; export type RoleList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type SearchInput = { - collectionId?: InputMaybe; - collectionSlug?: InputMaybe; - facetValueFilters?: InputMaybe>; - facetValueIds?: InputMaybe>; - facetValueOperator?: InputMaybe; - groupByProduct?: InputMaybe; - skip?: InputMaybe; - sort?: InputMaybe; - take?: InputMaybe; - term?: InputMaybe; + collectionId?: InputMaybe; + collectionSlug?: InputMaybe; + facetValueFilters?: InputMaybe>; + facetValueIds?: InputMaybe>; + facetValueOperator?: InputMaybe; + groupByProduct?: InputMaybe; + skip?: InputMaybe; + sort?: InputMaybe; + take?: InputMaybe; + term?: InputMaybe; }; export type SearchReindexResponse = { - success: Scalars['Boolean']; + success: Scalars['Boolean']; }; export type SearchResponse = { - collections: Array; - facetValues: Array; - items: Array; - totalItems: Scalars['Int']; + collections: Array; + facetValues: Array; + items: Array; + totalItems: Scalars['Int']; }; export type SearchResult = { - /** An array of ids of the Collections in which this result appears */ - collectionIds: Array; - currencyCode: CurrencyCode; - description: Scalars['String']; - facetIds: Array; - facetValueIds: Array; - price: SearchResultPrice; - priceWithTax: SearchResultPrice; - productAsset?: Maybe; - productId: Scalars['ID']; - productName: Scalars['String']; - productVariantAsset?: Maybe; - productVariantId: Scalars['ID']; - productVariantName: Scalars['String']; - /** A relevance score for the result. Differs between database implementations */ - score: Scalars['Float']; - sku: Scalars['String']; - slug: Scalars['String']; + /** An array of ids of the Collections in which this result appears */ + collectionIds: Array; + currencyCode: CurrencyCode; + description: Scalars['String']; + facetIds: Array; + facetValueIds: Array; + price: SearchResultPrice; + priceWithTax: SearchResultPrice; + productAsset?: Maybe; + productId: Scalars['ID']; + productName: Scalars['String']; + productVariantAsset?: Maybe; + productVariantId: Scalars['ID']; + productVariantName: Scalars['String']; + /** A relevance score for the result. Differs between database implementations */ + score: Scalars['Float']; + sku: Scalars['String']; + slug: Scalars['String']; }; export type SearchResultAsset = { - focalPoint?: Maybe; - id: Scalars['ID']; - preview: Scalars['String']; + focalPoint?: Maybe; + id: Scalars['ID']; + preview: Scalars['String']; }; /** The price of a search result product, either as a range or as a single price */ export type SearchResultPrice = PriceRange | SinglePrice; export type SearchResultSortParameter = { - name?: InputMaybe; - price?: InputMaybe; + name?: InputMaybe; + price?: InputMaybe; }; export type Seller = Node & { - createdAt: Scalars['DateTime']; - customFields?: Maybe; - id: Scalars['ID']; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + id: Scalars['ID']; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; -export type SetCustomerForOrderResult = AlreadyLoggedInError | EmailAddressConflictError | NoActiveOrderError | Order; +export type SetCustomerForOrderResult = + | AlreadyLoggedInError + | EmailAddressConflictError + | NoActiveOrderError + | Order; -export type SetOrderShippingMethodResult = IneligibleShippingMethodError | NoActiveOrderError | Order | OrderModificationError; +export type SetOrderShippingMethodResult = + | IneligibleShippingMethodError + | NoActiveOrderError + | Order + | OrderModificationError; export type ShippingLine = { - discountedPrice: Scalars['Money']; - discountedPriceWithTax: Scalars['Money']; - discounts: Array; - id: Scalars['ID']; - price: Scalars['Money']; - priceWithTax: Scalars['Money']; - shippingMethod: ShippingMethod; + discountedPrice: Scalars['Money']; + discountedPriceWithTax: Scalars['Money']; + discounts: Array; + id: Scalars['ID']; + price: Scalars['Money']; + priceWithTax: Scalars['Money']; + shippingMethod: ShippingMethod; }; export type ShippingMethod = Node & { - calculator: ConfigurableOperation; - checker: ConfigurableOperation; - code: Scalars['String']; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - description: Scalars['String']; - fulfillmentHandlerCode: Scalars['String']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - translations: Array; - updatedAt: Scalars['DateTime']; + calculator: ConfigurableOperation; + checker: ConfigurableOperation; + code: Scalars['String']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + description: Scalars['String']; + fulfillmentHandlerCode: Scalars['String']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + translations: Array; + updatedAt: Scalars['DateTime']; }; export type ShippingMethodList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type ShippingMethodQuote = { - code: Scalars['String']; - customFields?: Maybe; - description: Scalars['String']; - id: Scalars['ID']; - /** Any optional metadata returned by the ShippingCalculator in the ShippingCalculationResult */ - metadata?: Maybe; - name: Scalars['String']; - price: Scalars['Money']; - priceWithTax: Scalars['Money']; + code: Scalars['String']; + customFields?: Maybe; + description: Scalars['String']; + id: Scalars['ID']; + /** Any optional metadata returned by the ShippingCalculator in the ShippingCalculationResult */ + metadata?: Maybe; + name: Scalars['String']; + price: Scalars['Money']; + priceWithTax: Scalars['Money']; }; export type ShippingMethodTranslation = { - createdAt: Scalars['DateTime']; - description: Scalars['String']; - id: Scalars['ID']; - languageCode: LanguageCode; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + description: Scalars['String']; + id: Scalars['ID']; + languageCode: LanguageCode; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; /** The price value where the result has a single price */ export type SinglePrice = { - value: Scalars['Money']; + value: Scalars['Money']; }; export enum SortOrder { - ASC = 'ASC', - DESC = 'DESC' + ASC = 'ASC', + DESC = 'DESC', } export type StringCustomFieldConfig = CustomField & { - description?: Maybe>; - internal?: Maybe; - label?: Maybe>; - length?: Maybe; - list: Scalars['Boolean']; - name: Scalars['String']; - nullable?: Maybe; - options?: Maybe>; - pattern?: Maybe; - readonly?: Maybe; - type: Scalars['String']; - ui?: Maybe; + description?: Maybe>; + internal?: Maybe; + label?: Maybe>; + length?: Maybe; + list: Scalars['Boolean']; + name: Scalars['String']; + nullable?: Maybe; + options?: Maybe>; + pattern?: Maybe; + readonly?: Maybe; + type: Scalars['String']; + ui?: Maybe; }; export type StringFieldOption = { - label?: Maybe>; - value: Scalars['String']; + label?: Maybe>; + value: Scalars['String']; }; /** Operators for filtering on a list of String fields */ export type StringListOperators = { - inList: Scalars['String']; + inList: Scalars['String']; }; /** Operators for filtering on a String field */ export type StringOperators = { - contains?: InputMaybe; - eq?: InputMaybe; - in?: InputMaybe>; - isNull?: InputMaybe; - notContains?: InputMaybe; - notEq?: InputMaybe; - notIn?: InputMaybe>; - regex?: InputMaybe; + contains?: InputMaybe; + eq?: InputMaybe; + in?: InputMaybe>; + isNull?: InputMaybe; + notContains?: InputMaybe; + notEq?: InputMaybe; + notIn?: InputMaybe>; + regex?: InputMaybe; }; /** Indicates that an operation succeeded, where we do not want to return any more specific information. */ export type Success = { - success: Scalars['Boolean']; + success: Scalars['Boolean']; }; export type Surcharge = Node & { - createdAt: Scalars['DateTime']; - description: Scalars['String']; - id: Scalars['ID']; - price: Scalars['Money']; - priceWithTax: Scalars['Money']; - sku?: Maybe; - taxLines: Array; - taxRate: Scalars['Float']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + description: Scalars['String']; + id: Scalars['ID']; + price: Scalars['Money']; + priceWithTax: Scalars['Money']; + sku?: Maybe; + taxLines: Array; + taxRate: Scalars['Float']; + updatedAt: Scalars['DateTime']; }; export type Tag = Node & { - createdAt: Scalars['DateTime']; - id: Scalars['ID']; - updatedAt: Scalars['DateTime']; - value: Scalars['String']; + createdAt: Scalars['DateTime']; + id: Scalars['ID']; + updatedAt: Scalars['DateTime']; + value: Scalars['String']; }; export type TagList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type TaxCategory = Node & { - createdAt: Scalars['DateTime']; - customFields?: Maybe; - id: Scalars['ID']; - isDefault: Scalars['Boolean']; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + id: Scalars['ID']; + isDefault: Scalars['Boolean']; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; }; export type TaxLine = { - description: Scalars['String']; - taxRate: Scalars['Float']; + description: Scalars['String']; + taxRate: Scalars['Float']; }; export type TaxRate = Node & { - category: TaxCategory; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - customerGroup?: Maybe; - enabled: Scalars['Boolean']; - id: Scalars['ID']; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; - value: Scalars['Float']; - zone: Zone; + category: TaxCategory; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + customerGroup?: Maybe; + enabled: Scalars['Boolean']; + id: Scalars['ID']; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; + value: Scalars['Float']; + zone: Zone; }; export type TaxRateList = PaginatedList & { - items: Array; - totalItems: Scalars['Int']; + items: Array; + totalItems: Scalars['Int']; }; export type TextCustomFieldConfig = CustomField & { - description?: Maybe>; - internal?: Maybe; - label?: Maybe>; - list: Scalars['Boolean']; - name: Scalars['String']; - nullable?: Maybe; - readonly?: Maybe; - type: Scalars['String']; - ui?: Maybe; + description?: Maybe>; + internal?: Maybe; + label?: Maybe>; + list: Scalars['Boolean']; + name: Scalars['String']; + nullable?: Maybe; + readonly?: Maybe; + type: Scalars['String']; + ui?: Maybe; }; export type TransitionOrderToStateResult = Order | OrderStateTransitionError; export type UpdateAddressInput = { - city?: InputMaybe; - company?: InputMaybe; - countryCode?: InputMaybe; - customFields?: InputMaybe; - defaultBillingAddress?: InputMaybe; - defaultShippingAddress?: InputMaybe; - fullName?: InputMaybe; - id: Scalars['ID']; - phoneNumber?: InputMaybe; - postalCode?: InputMaybe; - province?: InputMaybe; - streetLine1?: InputMaybe; - streetLine2?: InputMaybe; -}; - -export type UpdateCustomerEmailAddressResult = IdentifierChangeTokenExpiredError | IdentifierChangeTokenInvalidError | NativeAuthStrategyError | Success; + city?: InputMaybe; + company?: InputMaybe; + countryCode?: InputMaybe; + customFields?: InputMaybe; + defaultBillingAddress?: InputMaybe; + defaultShippingAddress?: InputMaybe; + fullName?: InputMaybe; + id: Scalars['ID']; + phoneNumber?: InputMaybe; + postalCode?: InputMaybe; + province?: InputMaybe; + streetLine1?: InputMaybe; + streetLine2?: InputMaybe; +}; + +export type UpdateCustomerEmailAddressResult = + | IdentifierChangeTokenExpiredError + | IdentifierChangeTokenInvalidError + | NativeAuthStrategyError + | Success; export type UpdateCustomerInput = { - customFields?: InputMaybe; - firstName?: InputMaybe; - lastName?: InputMaybe; - phoneNumber?: InputMaybe; - title?: InputMaybe; + customFields?: InputMaybe; + firstName?: InputMaybe; + lastName?: InputMaybe; + phoneNumber?: InputMaybe; + title?: InputMaybe; }; -export type UpdateCustomerPasswordResult = InvalidCredentialsError | NativeAuthStrategyError | PasswordValidationError | Success; +export type UpdateCustomerPasswordResult = + | InvalidCredentialsError + | NativeAuthStrategyError + | PasswordValidationError + | Success; export type UpdateOrderInput = { - customFields?: InputMaybe; + customFields?: InputMaybe; }; -export type UpdateOrderItemsResult = InsufficientStockError | NegativeQuantityError | Order | OrderLimitError | OrderModificationError; +export type UpdateOrderItemsResult = + | InsufficientStockError + | NegativeQuantityError + | Order + | OrderLimitError + | OrderModificationError; export type User = Node & { - authenticationMethods: Array; - createdAt: Scalars['DateTime']; - customFields?: Maybe; - id: Scalars['ID']; - identifier: Scalars['String']; - lastLogin?: Maybe; - roles: Array; - updatedAt: Scalars['DateTime']; - verified: Scalars['Boolean']; + authenticationMethods: Array; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + id: Scalars['ID']; + identifier: Scalars['String']; + lastLogin?: Maybe; + roles: Array; + updatedAt: Scalars['DateTime']; + verified: Scalars['Boolean']; }; /** @@ -3098,8 +3117,8 @@ export type User = Node & { * expired according to the `verificationTokenDuration` setting in the AuthOptions. */ export type VerificationTokenExpiredError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; /** @@ -3107,320 +3126,1357 @@ export type VerificationTokenExpiredError = ErrorResult & { * invalid or does not match any expected tokens. */ export type VerificationTokenInvalidError = ErrorResult & { - errorCode: ErrorCode; - message: Scalars['String']; + errorCode: ErrorCode; + message: Scalars['String']; }; -export type VerifyCustomerAccountResult = CurrentUser | MissingPasswordError | NativeAuthStrategyError | PasswordAlreadySetError | PasswordValidationError | VerificationTokenExpiredError | VerificationTokenInvalidError; +export type VerifyCustomerAccountResult = + | CurrentUser + | MissingPasswordError + | NativeAuthStrategyError + | PasswordAlreadySetError + | PasswordValidationError + | VerificationTokenExpiredError + | VerificationTokenInvalidError; export type Zone = Node & { - createdAt: Scalars['DateTime']; - customFields?: Maybe; - id: Scalars['ID']; - members: Array; - name: Scalars['String']; - updatedAt: Scalars['DateTime']; + createdAt: Scalars['DateTime']; + customFields?: Maybe; + id: Scalars['ID']; + members: Array; + name: Scalars['String']; + updatedAt: Scalars['DateTime']; +}; + +export type TestOrderFragmentFragment = { + id: string; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + shipping: number; + shippingWithTax: number; + total: number; + totalWithTax: number; + couponCodes: Array; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + lines: Array<{ + id: string; + quantity: number; + linePrice: number; + linePriceWithTax: number; + unitPrice: number; + unitPriceWithTax: number; + unitPriceChangeSinceAdded: number; + unitPriceWithTaxChangeSinceAdded: number; + discountedUnitPriceWithTax: number; + proratedUnitPriceWithTax: number; + productVariant: { id: string }; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + }>; + shippingLines: Array<{ shippingMethod: { id: string; code: string; description: string } }>; + customer?: { id: string; user?: { id: string; identifier: string } | null } | null; + history: { items: Array<{ id: string; type: HistoryEntryType; data: any }> }; +}; + +export type UpdatedOrderFragment = { + id: string; + code: string; + state: string; + active: boolean; + total: number; + totalWithTax: number; + lines: Array<{ + id: string; + quantity: number; + linePrice: number; + linePriceWithTax: number; + productVariant: { id: string }; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + }>; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; }; -export type TestOrderFragmentFragment = { id: string, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, shipping: number, shippingWithTax: number, total: number, totalWithTax: number, couponCodes: Array, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }>, lines: Array<{ id: string, quantity: number, linePrice: number, linePriceWithTax: number, unitPrice: number, unitPriceWithTax: number, unitPriceChangeSinceAdded: number, unitPriceWithTaxChangeSinceAdded: number, discountedUnitPriceWithTax: number, proratedUnitPriceWithTax: number, productVariant: { id: string }, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> }>, shippingLines: Array<{ shippingMethod: { id: string, code: string, description: string } }>, customer?: { id: string, user?: { id: string, identifier: string } | null } | null, history: { items: Array<{ id: string, type: HistoryEntryType, data: any }> } }; - -export type UpdatedOrderFragment = { id: string, code: string, state: string, active: boolean, total: number, totalWithTax: number, lines: Array<{ id: string, quantity: number, linePrice: number, linePriceWithTax: number, productVariant: { id: string }, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> }>, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> }; - export type AddItemToOrderMutationVariables = Exact<{ - productVariantId: Scalars['ID']; - quantity: Scalars['Int']; + productVariantId: Scalars['ID']; + quantity: Scalars['Int']; }>; - -export type AddItemToOrderMutation = { addItemToOrder: { errorCode: ErrorCode, message: string, quantityAvailable: number, order: { id: string, code: string, state: string, active: boolean, total: number, totalWithTax: number, lines: Array<{ id: string, quantity: number, linePrice: number, linePriceWithTax: number, productVariant: { id: string }, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> }>, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> } } | { errorCode: ErrorCode, message: string } | { id: string, code: string, state: string, active: boolean, total: number, totalWithTax: number, lines: Array<{ id: string, quantity: number, linePrice: number, linePriceWithTax: number, productVariant: { id: string }, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> }>, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } }; +export type AddItemToOrderMutation = { + addItemToOrder: + | { + errorCode: ErrorCode; + message: string; + quantityAvailable: number; + order: { + id: string; + code: string; + state: string; + active: boolean; + total: number; + totalWithTax: number; + lines: Array<{ + id: string; + quantity: number; + linePrice: number; + linePriceWithTax: number; + productVariant: { id: string }; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + }>; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + }; + } + | { errorCode: ErrorCode; message: string } + | { + id: string; + code: string; + state: string; + active: boolean; + total: number; + totalWithTax: number; + lines: Array<{ + id: string; + quantity: number; + linePrice: number; + linePriceWithTax: number; + productVariant: { id: string }; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + }>; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string }; +}; export type SearchProductsShopQueryVariables = Exact<{ - input: SearchInput; + input: SearchInput; }>; - -export type SearchProductsShopQuery = { search: { totalItems: number, items: Array<{ productId: string, productName: string, productVariantId: string, productVariantName: string, sku: string, collectionIds: Array, price: { min: number, max: number } | { value: number } }> } }; +export type SearchProductsShopQuery = { + search: { + totalItems: number; + items: Array<{ + productId: string; + productName: string; + productVariantId: string; + productVariantName: string; + sku: string; + collectionIds: Array; + price: { min: number; max: number } | { value: number }; + }>; + }; +}; export type RegisterMutationVariables = Exact<{ - input: RegisterCustomerInput; + input: RegisterCustomerInput; }>; +export type RegisterMutation = { + registerCustomerAccount: + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string; validationErrorMessage: string } + | { success: boolean }; +}; -export type RegisterMutation = { registerCustomerAccount: { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string, validationErrorMessage: string } | { success: boolean } }; - -export type CurrentUserShopFragment = { id: string, identifier: string, channels: Array<{ code: string, token: string, permissions: Array }> }; +export type CurrentUserShopFragment = { + id: string; + identifier: string; + channels: Array<{ code: string; token: string; permissions: Array }>; +}; export type VerifyMutationVariables = Exact<{ - password?: InputMaybe; - token: Scalars['String']; + password?: InputMaybe; + token: Scalars['String']; }>; - -export type VerifyMutation = { verifyCustomerAccount: { id: string, identifier: string, channels: Array<{ code: string, token: string, permissions: Array }> } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string, validationErrorMessage: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } }; +export type VerifyMutation = { + verifyCustomerAccount: + | { + id: string; + identifier: string; + channels: Array<{ code: string; token: string; permissions: Array }>; + } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string; validationErrorMessage: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string }; +}; export type RefreshTokenMutationVariables = Exact<{ - emailAddress: Scalars['String']; + emailAddress: Scalars['String']; }>; - -export type RefreshTokenMutation = { refreshCustomerVerification: { errorCode: ErrorCode, message: string } | { success: boolean } }; +export type RefreshTokenMutation = { + refreshCustomerVerification: { errorCode: ErrorCode; message: string } | { success: boolean }; +}; export type RequestPasswordResetMutationVariables = Exact<{ - identifier: Scalars['String']; + identifier: Scalars['String']; }>; - -export type RequestPasswordResetMutation = { requestPasswordReset?: { errorCode: ErrorCode, message: string } | { success: boolean } | null }; +export type RequestPasswordResetMutation = { + requestPasswordReset?: { errorCode: ErrorCode; message: string } | { success: boolean } | null; +}; export type ResetPasswordMutationVariables = Exact<{ - token: Scalars['String']; - password: Scalars['String']; + token: Scalars['String']; + password: Scalars['String']; }>; - -export type ResetPasswordMutation = { resetPassword: { id: string, identifier: string, channels: Array<{ code: string, token: string, permissions: Array }> } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string, validationErrorMessage: string } }; +export type ResetPasswordMutation = { + resetPassword: + | { + id: string; + identifier: string; + channels: Array<{ code: string; token: string; permissions: Array }>; + } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string; validationErrorMessage: string }; +}; export type RequestUpdateEmailAddressMutationVariables = Exact<{ - password: Scalars['String']; - newEmailAddress: Scalars['String']; + password: Scalars['String']; + newEmailAddress: Scalars['String']; }>; - -export type RequestUpdateEmailAddressMutation = { requestUpdateCustomerEmailAddress: { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { success: boolean } }; +export type RequestUpdateEmailAddressMutation = { + requestUpdateCustomerEmailAddress: + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { success: boolean }; +}; export type UpdateEmailAddressMutationVariables = Exact<{ - token: Scalars['String']; + token: Scalars['String']; }>; +export type UpdateEmailAddressMutation = { + updateCustomerEmailAddress: + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { success: boolean }; +}; -export type UpdateEmailAddressMutation = { updateCustomerEmailAddress: { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { success: boolean } }; - -export type GetActiveCustomerQueryVariables = Exact<{ [key: string]: never; }>; - +export type GetActiveCustomerQueryVariables = Exact<{ [key: string]: never }>; -export type GetActiveCustomerQuery = { activeCustomer?: { id: string, emailAddress: string } | null }; +export type GetActiveCustomerQuery = { activeCustomer?: { id: string; emailAddress: string } | null }; export type CreateAddressShopMutationVariables = Exact<{ - input: CreateAddressInput; + input: CreateAddressInput; }>; - -export type CreateAddressShopMutation = { createCustomerAddress: { id: string, streetLine1: string, country: { code: string } } }; +export type CreateAddressShopMutation = { + createCustomerAddress: { id: string; streetLine1: string; country: { code: string } }; +}; export type UpdateAddressShopMutationVariables = Exact<{ - input: UpdateAddressInput; + input: UpdateAddressInput; }>; - -export type UpdateAddressShopMutation = { updateCustomerAddress: { streetLine1: string, country: { code: string } } }; +export type UpdateAddressShopMutation = { + updateCustomerAddress: { streetLine1: string; country: { code: string } }; +}; export type DeleteAddressShopMutationVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - export type DeleteAddressShopMutation = { deleteCustomerAddress: { success: boolean } }; export type UpdateCustomerMutationVariables = Exact<{ - input: UpdateCustomerInput; + input: UpdateCustomerInput; }>; - -export type UpdateCustomerMutation = { updateCustomer: { id: string, firstName: string, lastName: string } }; +export type UpdateCustomerMutation = { updateCustomer: { id: string; firstName: string; lastName: string } }; export type UpdatePasswordMutationVariables = Exact<{ - old: Scalars['String']; - new: Scalars['String']; + old: Scalars['String']; + new: Scalars['String']; }>; - -export type UpdatePasswordMutation = { updateCustomerPassword: { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { success: boolean } }; - -export type GetActiveOrderQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetActiveOrderQuery = { activeOrder?: { id: string, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, shipping: number, shippingWithTax: number, total: number, totalWithTax: number, couponCodes: Array, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }>, lines: Array<{ id: string, quantity: number, linePrice: number, linePriceWithTax: number, unitPrice: number, unitPriceWithTax: number, unitPriceChangeSinceAdded: number, unitPriceWithTaxChangeSinceAdded: number, discountedUnitPriceWithTax: number, proratedUnitPriceWithTax: number, productVariant: { id: string }, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> }>, shippingLines: Array<{ shippingMethod: { id: string, code: string, description: string } }>, customer?: { id: string, user?: { id: string, identifier: string } | null } | null, history: { items: Array<{ id: string, type: HistoryEntryType, data: any }> } } | null }; - -export type GetActiveOrderWithPriceDataQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetActiveOrderWithPriceDataQuery = { activeOrder?: { id: string, subTotal: number, subTotalWithTax: number, total: number, totalWithTax: number, lines: Array<{ id: string, unitPrice: number, unitPriceWithTax: number, taxRate: number, linePrice: number, lineTax: number, linePriceWithTax: number, taxLines: Array<{ taxRate: number, description: string }> }>, taxSummary: Array<{ description: string, taxRate: number, taxBase: number, taxTotal: number }> } | null }; +export type UpdatePasswordMutation = { + updateCustomerPassword: + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { success: boolean }; +}; + +export type GetActiveOrderQueryVariables = Exact<{ [key: string]: never }>; + +export type GetActiveOrderQuery = { + activeOrder?: { + id: string; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + shipping: number; + shippingWithTax: number; + total: number; + totalWithTax: number; + couponCodes: Array; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + lines: Array<{ + id: string; + quantity: number; + linePrice: number; + linePriceWithTax: number; + unitPrice: number; + unitPriceWithTax: number; + unitPriceChangeSinceAdded: number; + unitPriceWithTaxChangeSinceAdded: number; + discountedUnitPriceWithTax: number; + proratedUnitPriceWithTax: number; + productVariant: { id: string }; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + }>; + shippingLines: Array<{ shippingMethod: { id: string; code: string; description: string } }>; + customer?: { id: string; user?: { id: string; identifier: string } | null } | null; + history: { items: Array<{ id: string; type: HistoryEntryType; data: any }> }; + } | null; +}; + +export type GetActiveOrderWithPriceDataQueryVariables = Exact<{ [key: string]: never }>; + +export type GetActiveOrderWithPriceDataQuery = { + activeOrder?: { + id: string; + subTotal: number; + subTotalWithTax: number; + total: number; + totalWithTax: number; + lines: Array<{ + id: string; + unitPrice: number; + unitPriceWithTax: number; + taxRate: number; + linePrice: number; + lineTax: number; + linePriceWithTax: number; + taxLines: Array<{ taxRate: number; description: string }>; + }>; + taxSummary: Array<{ description: string; taxRate: number; taxBase: number; taxTotal: number }>; + } | null; +}; export type AdjustItemQuantityMutationVariables = Exact<{ - orderLineId: Scalars['ID']; - quantity: Scalars['Int']; + orderLineId: Scalars['ID']; + quantity: Scalars['Int']; }>; - -export type AdjustItemQuantityMutation = { adjustOrderLine: { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { id: string, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, shipping: number, shippingWithTax: number, total: number, totalWithTax: number, couponCodes: Array, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }>, lines: Array<{ id: string, quantity: number, linePrice: number, linePriceWithTax: number, unitPrice: number, unitPriceWithTax: number, unitPriceChangeSinceAdded: number, unitPriceWithTaxChangeSinceAdded: number, discountedUnitPriceWithTax: number, proratedUnitPriceWithTax: number, productVariant: { id: string }, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> }>, shippingLines: Array<{ shippingMethod: { id: string, code: string, description: string } }>, customer?: { id: string, user?: { id: string, identifier: string } | null } | null, history: { items: Array<{ id: string, type: HistoryEntryType, data: any }> } } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } }; +export type AdjustItemQuantityMutation = { + adjustOrderLine: + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { + id: string; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + shipping: number; + shippingWithTax: number; + total: number; + totalWithTax: number; + couponCodes: Array; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + lines: Array<{ + id: string; + quantity: number; + linePrice: number; + linePriceWithTax: number; + unitPrice: number; + unitPriceWithTax: number; + unitPriceChangeSinceAdded: number; + unitPriceWithTaxChangeSinceAdded: number; + discountedUnitPriceWithTax: number; + proratedUnitPriceWithTax: number; + productVariant: { id: string }; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + }>; + shippingLines: Array<{ shippingMethod: { id: string; code: string; description: string } }>; + customer?: { id: string; user?: { id: string; identifier: string } | null } | null; + history: { items: Array<{ id: string; type: HistoryEntryType; data: any }> }; + } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string }; +}; export type RemoveItemFromOrderMutationVariables = Exact<{ - orderLineId: Scalars['ID']; + orderLineId: Scalars['ID']; }>; - -export type RemoveItemFromOrderMutation = { removeOrderLine: { id: string, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, shipping: number, shippingWithTax: number, total: number, totalWithTax: number, couponCodes: Array, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }>, lines: Array<{ id: string, quantity: number, linePrice: number, linePriceWithTax: number, unitPrice: number, unitPriceWithTax: number, unitPriceChangeSinceAdded: number, unitPriceWithTaxChangeSinceAdded: number, discountedUnitPriceWithTax: number, proratedUnitPriceWithTax: number, productVariant: { id: string }, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> }>, shippingLines: Array<{ shippingMethod: { id: string, code: string, description: string } }>, customer?: { id: string, user?: { id: string, identifier: string } | null } | null, history: { items: Array<{ id: string, type: HistoryEntryType, data: any }> } } | { errorCode: ErrorCode, message: string } }; - -export type GetShippingMethodsQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetShippingMethodsQuery = { eligibleShippingMethods: Array<{ id: string, code: string, price: number, name: string, description: string }> }; +export type RemoveItemFromOrderMutation = { + removeOrderLine: + | { + id: string; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + shipping: number; + shippingWithTax: number; + total: number; + totalWithTax: number; + couponCodes: Array; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + lines: Array<{ + id: string; + quantity: number; + linePrice: number; + linePriceWithTax: number; + unitPrice: number; + unitPriceWithTax: number; + unitPriceChangeSinceAdded: number; + unitPriceWithTaxChangeSinceAdded: number; + discountedUnitPriceWithTax: number; + proratedUnitPriceWithTax: number; + productVariant: { id: string }; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + }>; + shippingLines: Array<{ shippingMethod: { id: string; code: string; description: string } }>; + customer?: { id: string; user?: { id: string; identifier: string } | null } | null; + history: { items: Array<{ id: string; type: HistoryEntryType; data: any }> }; + } + | { errorCode: ErrorCode; message: string }; +}; + +export type GetShippingMethodsQueryVariables = Exact<{ [key: string]: never }>; + +export type GetShippingMethodsQuery = { + eligibleShippingMethods: Array<{ + id: string; + code: string; + price: number; + name: string; + description: string; + }>; +}; export type SetShippingMethodMutationVariables = Exact<{ - id: Array | Scalars['ID']; + id: Array | Scalars['ID']; }>; - -export type SetShippingMethodMutation = { setOrderShippingMethod: { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { id: string, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, shipping: number, shippingWithTax: number, total: number, totalWithTax: number, couponCodes: Array, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }>, lines: Array<{ id: string, quantity: number, linePrice: number, linePriceWithTax: number, unitPrice: number, unitPriceWithTax: number, unitPriceChangeSinceAdded: number, unitPriceWithTaxChangeSinceAdded: number, discountedUnitPriceWithTax: number, proratedUnitPriceWithTax: number, productVariant: { id: string }, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> }>, shippingLines: Array<{ shippingMethod: { id: string, code: string, description: string } }>, customer?: { id: string, user?: { id: string, identifier: string } | null } | null, history: { items: Array<{ id: string, type: HistoryEntryType, data: any }> } } | { errorCode: ErrorCode, message: string } }; - -export type ActiveOrderCustomerFragment = { id: string, customer?: { id: string, emailAddress: string, firstName: string, lastName: string } | null, lines: Array<{ id: string }> }; +export type SetShippingMethodMutation = { + setOrderShippingMethod: + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { + id: string; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + shipping: number; + shippingWithTax: number; + total: number; + totalWithTax: number; + couponCodes: Array; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + lines: Array<{ + id: string; + quantity: number; + linePrice: number; + linePriceWithTax: number; + unitPrice: number; + unitPriceWithTax: number; + unitPriceChangeSinceAdded: number; + unitPriceWithTaxChangeSinceAdded: number; + discountedUnitPriceWithTax: number; + proratedUnitPriceWithTax: number; + productVariant: { id: string }; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + }>; + shippingLines: Array<{ shippingMethod: { id: string; code: string; description: string } }>; + customer?: { id: string; user?: { id: string; identifier: string } | null } | null; + history: { items: Array<{ id: string; type: HistoryEntryType; data: any }> }; + } + | { errorCode: ErrorCode; message: string }; +}; + +export type ActiveOrderCustomerFragment = { + id: string; + customer?: { id: string; emailAddress: string; firstName: string; lastName: string } | null; + lines: Array<{ id: string }>; +}; export type SetCustomerForOrderMutationVariables = Exact<{ - input: CreateCustomerInput; + input: CreateCustomerInput; }>; - -export type SetCustomerForOrderMutation = { setCustomerForOrder: { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { id: string, customer?: { id: string, emailAddress: string, firstName: string, lastName: string } | null, lines: Array<{ id: string }> } }; +export type SetCustomerForOrderMutation = { + setCustomerForOrder: + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { + id: string; + customer?: { id: string; emailAddress: string; firstName: string; lastName: string } | null; + lines: Array<{ id: string }>; + }; +}; export type GetOrderByCodeQueryVariables = Exact<{ - code: Scalars['String']; + code: Scalars['String']; }>; - -export type GetOrderByCodeQuery = { orderByCode?: { id: string, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, shipping: number, shippingWithTax: number, total: number, totalWithTax: number, couponCodes: Array, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }>, lines: Array<{ id: string, quantity: number, linePrice: number, linePriceWithTax: number, unitPrice: number, unitPriceWithTax: number, unitPriceChangeSinceAdded: number, unitPriceWithTaxChangeSinceAdded: number, discountedUnitPriceWithTax: number, proratedUnitPriceWithTax: number, productVariant: { id: string }, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> }>, shippingLines: Array<{ shippingMethod: { id: string, code: string, description: string } }>, customer?: { id: string, user?: { id: string, identifier: string } | null } | null, history: { items: Array<{ id: string, type: HistoryEntryType, data: any }> } } | null }; +export type GetOrderByCodeQuery = { + orderByCode?: { + id: string; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + shipping: number; + shippingWithTax: number; + total: number; + totalWithTax: number; + couponCodes: Array; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + lines: Array<{ + id: string; + quantity: number; + linePrice: number; + linePriceWithTax: number; + unitPrice: number; + unitPriceWithTax: number; + unitPriceChangeSinceAdded: number; + unitPriceWithTaxChangeSinceAdded: number; + discountedUnitPriceWithTax: number; + proratedUnitPriceWithTax: number; + productVariant: { id: string }; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + }>; + shippingLines: Array<{ shippingMethod: { id: string; code: string; description: string } }>; + customer?: { id: string; user?: { id: string; identifier: string } | null } | null; + history: { items: Array<{ id: string; type: HistoryEntryType; data: any }> }; + } | null; +}; export type GetOrderShopQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetOrderShopQuery = { order?: { id: string, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, shipping: number, shippingWithTax: number, total: number, totalWithTax: number, couponCodes: Array, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }>, lines: Array<{ id: string, quantity: number, linePrice: number, linePriceWithTax: number, unitPrice: number, unitPriceWithTax: number, unitPriceChangeSinceAdded: number, unitPriceWithTaxChangeSinceAdded: number, discountedUnitPriceWithTax: number, proratedUnitPriceWithTax: number, productVariant: { id: string }, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> }>, shippingLines: Array<{ shippingMethod: { id: string, code: string, description: string } }>, customer?: { id: string, user?: { id: string, identifier: string } | null } | null, history: { items: Array<{ id: string, type: HistoryEntryType, data: any }> } } | null }; +export type GetOrderShopQuery = { + order?: { + id: string; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + shipping: number; + shippingWithTax: number; + total: number; + totalWithTax: number; + couponCodes: Array; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + lines: Array<{ + id: string; + quantity: number; + linePrice: number; + linePriceWithTax: number; + unitPrice: number; + unitPriceWithTax: number; + unitPriceChangeSinceAdded: number; + unitPriceWithTaxChangeSinceAdded: number; + discountedUnitPriceWithTax: number; + proratedUnitPriceWithTax: number; + productVariant: { id: string }; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + }>; + shippingLines: Array<{ shippingMethod: { id: string; code: string; description: string } }>; + customer?: { id: string; user?: { id: string; identifier: string } | null } | null; + history: { items: Array<{ id: string; type: HistoryEntryType; data: any }> }; + } | null; +}; export type GetOrderPromotionsByCodeQueryVariables = Exact<{ - code: Scalars['String']; + code: Scalars['String']; }>; - -export type GetOrderPromotionsByCodeQuery = { orderByCode?: { id: string, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, shipping: number, shippingWithTax: number, total: number, totalWithTax: number, couponCodes: Array, promotions: Array<{ id: string, name: string }>, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }>, lines: Array<{ id: string, quantity: number, linePrice: number, linePriceWithTax: number, unitPrice: number, unitPriceWithTax: number, unitPriceChangeSinceAdded: number, unitPriceWithTaxChangeSinceAdded: number, discountedUnitPriceWithTax: number, proratedUnitPriceWithTax: number, productVariant: { id: string }, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> }>, shippingLines: Array<{ shippingMethod: { id: string, code: string, description: string } }>, customer?: { id: string, user?: { id: string, identifier: string } | null } | null, history: { items: Array<{ id: string, type: HistoryEntryType, data: any }> } } | null }; - -export type GetAvailableCountriesQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetAvailableCountriesQuery = { availableCountries: Array<{ id: string, code: string }> }; +export type GetOrderPromotionsByCodeQuery = { + orderByCode?: { + id: string; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + shipping: number; + shippingWithTax: number; + total: number; + totalWithTax: number; + couponCodes: Array; + promotions: Array<{ id: string; name: string }>; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + lines: Array<{ + id: string; + quantity: number; + linePrice: number; + linePriceWithTax: number; + unitPrice: number; + unitPriceWithTax: number; + unitPriceChangeSinceAdded: number; + unitPriceWithTaxChangeSinceAdded: number; + discountedUnitPriceWithTax: number; + proratedUnitPriceWithTax: number; + productVariant: { id: string }; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + }>; + shippingLines: Array<{ shippingMethod: { id: string; code: string; description: string } }>; + customer?: { id: string; user?: { id: string; identifier: string } | null } | null; + history: { items: Array<{ id: string; type: HistoryEntryType; data: any }> }; + } | null; +}; + +export type GetAvailableCountriesQueryVariables = Exact<{ [key: string]: never }>; + +export type GetAvailableCountriesQuery = { availableCountries: Array<{ id: string; code: string }> }; export type TransitionToStateMutationVariables = Exact<{ - state: Scalars['String']; + state: Scalars['String']; }>; - -export type TransitionToStateMutation = { transitionOrderToState?: { id: string, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, shipping: number, shippingWithTax: number, total: number, totalWithTax: number, couponCodes: Array, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }>, lines: Array<{ id: string, quantity: number, linePrice: number, linePriceWithTax: number, unitPrice: number, unitPriceWithTax: number, unitPriceChangeSinceAdded: number, unitPriceWithTaxChangeSinceAdded: number, discountedUnitPriceWithTax: number, proratedUnitPriceWithTax: number, productVariant: { id: string }, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> }>, shippingLines: Array<{ shippingMethod: { id: string, code: string, description: string } }>, customer?: { id: string, user?: { id: string, identifier: string } | null } | null, history: { items: Array<{ id: string, type: HistoryEntryType, data: any }> } } | { errorCode: ErrorCode, message: string, transitionError: string, fromState: string, toState: string } | null }; +export type TransitionToStateMutation = { + transitionOrderToState?: + | { + id: string; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + shipping: number; + shippingWithTax: number; + total: number; + totalWithTax: number; + couponCodes: Array; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + lines: Array<{ + id: string; + quantity: number; + linePrice: number; + linePriceWithTax: number; + unitPrice: number; + unitPriceWithTax: number; + unitPriceChangeSinceAdded: number; + unitPriceWithTaxChangeSinceAdded: number; + discountedUnitPriceWithTax: number; + proratedUnitPriceWithTax: number; + productVariant: { id: string }; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + }>; + shippingLines: Array<{ shippingMethod: { id: string; code: string; description: string } }>; + customer?: { id: string; user?: { id: string; identifier: string } | null } | null; + history: { items: Array<{ id: string; type: HistoryEntryType; data: any }> }; + } + | { + errorCode: ErrorCode; + message: string; + transitionError: string; + fromState: string; + toState: string; + } + | null; +}; export type SetShippingAddressMutationVariables = Exact<{ - input: CreateAddressInput; + input: CreateAddressInput; }>; - -export type SetShippingAddressMutation = { setOrderShippingAddress: { errorCode: ErrorCode, message: string } | { shippingAddress?: { fullName?: string | null, company?: string | null, streetLine1?: string | null, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, country?: string | null, phoneNumber?: string | null } | null } }; +export type SetShippingAddressMutation = { + setOrderShippingAddress: + | { errorCode: ErrorCode; message: string } + | { + shippingAddress?: { + fullName?: string | null; + company?: string | null; + streetLine1?: string | null; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + country?: string | null; + phoneNumber?: string | null; + } | null; + }; +}; export type SetBillingAddressMutationVariables = Exact<{ - input: CreateAddressInput; + input: CreateAddressInput; }>; - -export type SetBillingAddressMutation = { setOrderBillingAddress: { errorCode: ErrorCode, message: string } | { billingAddress?: { fullName?: string | null, company?: string | null, streetLine1?: string | null, streetLine2?: string | null, city?: string | null, province?: string | null, postalCode?: string | null, country?: string | null, phoneNumber?: string | null } | null } }; - -export type TestOrderWithPaymentsFragment = { id: string, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, shipping: number, shippingWithTax: number, total: number, totalWithTax: number, couponCodes: Array, payments?: Array<{ id: string, transactionId?: string | null, method: string, amount: number, state: string, metadata?: any | null }> | null, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }>, lines: Array<{ id: string, quantity: number, linePrice: number, linePriceWithTax: number, unitPrice: number, unitPriceWithTax: number, unitPriceChangeSinceAdded: number, unitPriceWithTaxChangeSinceAdded: number, discountedUnitPriceWithTax: number, proratedUnitPriceWithTax: number, productVariant: { id: string }, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> }>, shippingLines: Array<{ shippingMethod: { id: string, code: string, description: string } }>, customer?: { id: string, user?: { id: string, identifier: string } | null } | null, history: { items: Array<{ id: string, type: HistoryEntryType, data: any }> } }; - -export type GetActiveOrderWithPaymentsQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetActiveOrderWithPaymentsQuery = { activeOrder?: { id: string, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, shipping: number, shippingWithTax: number, total: number, totalWithTax: number, couponCodes: Array, payments?: Array<{ id: string, transactionId?: string | null, method: string, amount: number, state: string, metadata?: any | null }> | null, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }>, lines: Array<{ id: string, quantity: number, linePrice: number, linePriceWithTax: number, unitPrice: number, unitPriceWithTax: number, unitPriceChangeSinceAdded: number, unitPriceWithTaxChangeSinceAdded: number, discountedUnitPriceWithTax: number, proratedUnitPriceWithTax: number, productVariant: { id: string }, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> }>, shippingLines: Array<{ shippingMethod: { id: string, code: string, description: string } }>, customer?: { id: string, user?: { id: string, identifier: string } | null } | null, history: { items: Array<{ id: string, type: HistoryEntryType, data: any }> } } | null }; +export type SetBillingAddressMutation = { + setOrderBillingAddress: + | { errorCode: ErrorCode; message: string } + | { + billingAddress?: { + fullName?: string | null; + company?: string | null; + streetLine1?: string | null; + streetLine2?: string | null; + city?: string | null; + province?: string | null; + postalCode?: string | null; + country?: string | null; + phoneNumber?: string | null; + } | null; + }; +}; + +export type TestOrderWithPaymentsFragment = { + id: string; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + shipping: number; + shippingWithTax: number; + total: number; + totalWithTax: number; + couponCodes: Array; + payments?: Array<{ + id: string; + transactionId?: string | null; + method: string; + amount: number; + state: string; + metadata?: any | null; + }> | null; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + lines: Array<{ + id: string; + quantity: number; + linePrice: number; + linePriceWithTax: number; + unitPrice: number; + unitPriceWithTax: number; + unitPriceChangeSinceAdded: number; + unitPriceWithTaxChangeSinceAdded: number; + discountedUnitPriceWithTax: number; + proratedUnitPriceWithTax: number; + productVariant: { id: string }; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + }>; + shippingLines: Array<{ shippingMethod: { id: string; code: string; description: string } }>; + customer?: { id: string; user?: { id: string; identifier: string } | null } | null; + history: { items: Array<{ id: string; type: HistoryEntryType; data: any }> }; +}; + +export type GetActiveOrderWithPaymentsQueryVariables = Exact<{ [key: string]: never }>; + +export type GetActiveOrderWithPaymentsQuery = { + activeOrder?: { + id: string; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + shipping: number; + shippingWithTax: number; + total: number; + totalWithTax: number; + couponCodes: Array; + payments?: Array<{ + id: string; + transactionId?: string | null; + method: string; + amount: number; + state: string; + metadata?: any | null; + }> | null; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + lines: Array<{ + id: string; + quantity: number; + linePrice: number; + linePriceWithTax: number; + unitPrice: number; + unitPriceWithTax: number; + unitPriceChangeSinceAdded: number; + unitPriceWithTaxChangeSinceAdded: number; + discountedUnitPriceWithTax: number; + proratedUnitPriceWithTax: number; + productVariant: { id: string }; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + }>; + shippingLines: Array<{ shippingMethod: { id: string; code: string; description: string } }>; + customer?: { id: string; user?: { id: string; identifier: string } | null } | null; + history: { items: Array<{ id: string; type: HistoryEntryType; data: any }> }; + } | null; +}; export type AddPaymentToOrderMutationVariables = Exact<{ - input: PaymentInput; + input: PaymentInput; }>; - -export type AddPaymentToOrderMutation = { addPaymentToOrder: { errorCode: ErrorCode, message: string, eligibilityCheckerMessage?: string | null } | { errorCode: ErrorCode, message: string } | { id: string, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, shipping: number, shippingWithTax: number, total: number, totalWithTax: number, couponCodes: Array, payments?: Array<{ id: string, transactionId?: string | null, method: string, amount: number, state: string, metadata?: any | null }> | null, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }>, lines: Array<{ id: string, quantity: number, linePrice: number, linePriceWithTax: number, unitPrice: number, unitPriceWithTax: number, unitPriceChangeSinceAdded: number, unitPriceWithTaxChangeSinceAdded: number, discountedUnitPriceWithTax: number, proratedUnitPriceWithTax: number, productVariant: { id: string }, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> }>, shippingLines: Array<{ shippingMethod: { id: string, code: string, description: string } }>, customer?: { id: string, user?: { id: string, identifier: string } | null } | null, history: { items: Array<{ id: string, type: HistoryEntryType, data: any }> } } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string, transitionError: string } | { errorCode: ErrorCode, message: string, paymentErrorMessage: string } | { errorCode: ErrorCode, message: string, paymentErrorMessage: string } }; - -export type GetActiveOrderPaymentsQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetActiveOrderPaymentsQuery = { activeOrder?: { id: string, payments?: Array<{ id: string, transactionId?: string | null, method: string, amount: number, state: string, errorMessage?: string | null, metadata?: any | null }> | null } | null }; +export type AddPaymentToOrderMutation = { + addPaymentToOrder: + | { errorCode: ErrorCode; message: string; eligibilityCheckerMessage?: string | null } + | { errorCode: ErrorCode; message: string } + | { + id: string; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + shipping: number; + shippingWithTax: number; + total: number; + totalWithTax: number; + couponCodes: Array; + payments?: Array<{ + id: string; + transactionId?: string | null; + method: string; + amount: number; + state: string; + metadata?: any | null; + }> | null; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + lines: Array<{ + id: string; + quantity: number; + linePrice: number; + linePriceWithTax: number; + unitPrice: number; + unitPriceWithTax: number; + unitPriceChangeSinceAdded: number; + unitPriceWithTaxChangeSinceAdded: number; + discountedUnitPriceWithTax: number; + proratedUnitPriceWithTax: number; + productVariant: { id: string }; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + }>; + shippingLines: Array<{ shippingMethod: { id: string; code: string; description: string } }>; + customer?: { id: string; user?: { id: string; identifier: string } | null } | null; + history: { items: Array<{ id: string; type: HistoryEntryType; data: any }> }; + } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string; transitionError: string } + | { errorCode: ErrorCode; message: string; paymentErrorMessage: string } + | { errorCode: ErrorCode; message: string; paymentErrorMessage: string }; +}; + +export type GetActiveOrderPaymentsQueryVariables = Exact<{ [key: string]: never }>; + +export type GetActiveOrderPaymentsQuery = { + activeOrder?: { + id: string; + payments?: Array<{ + id: string; + transactionId?: string | null; + method: string; + amount: number; + state: string; + errorMessage?: string | null; + metadata?: any | null; + }> | null; + } | null; +}; export type GetOrderByCodeWithPaymentsQueryVariables = Exact<{ - code: Scalars['String']; + code: Scalars['String']; }>; - -export type GetOrderByCodeWithPaymentsQuery = { orderByCode?: { id: string, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, shipping: number, shippingWithTax: number, total: number, totalWithTax: number, couponCodes: Array, payments?: Array<{ id: string, transactionId?: string | null, method: string, amount: number, state: string, metadata?: any | null }> | null, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }>, lines: Array<{ id: string, quantity: number, linePrice: number, linePriceWithTax: number, unitPrice: number, unitPriceWithTax: number, unitPriceChangeSinceAdded: number, unitPriceWithTaxChangeSinceAdded: number, discountedUnitPriceWithTax: number, proratedUnitPriceWithTax: number, productVariant: { id: string }, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> }>, shippingLines: Array<{ shippingMethod: { id: string, code: string, description: string } }>, customer?: { id: string, user?: { id: string, identifier: string } | null } | null, history: { items: Array<{ id: string, type: HistoryEntryType, data: any }> } } | null }; - -export type GetActiveCustomerOrderWithItemFulfillmentsQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetActiveCustomerOrderWithItemFulfillmentsQuery = { activeCustomer?: { orders: { totalItems: number, items: Array<{ id: string, code: string, state: string, lines: Array<{ id: string }>, fulfillments?: Array<{ id: string, state: string, method: string, trackingCode?: string | null }> | null }> } } | null }; - -export type GetNextOrderStatesQueryVariables = Exact<{ [key: string]: never; }>; - +export type GetOrderByCodeWithPaymentsQuery = { + orderByCode?: { + id: string; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + shipping: number; + shippingWithTax: number; + total: number; + totalWithTax: number; + couponCodes: Array; + payments?: Array<{ + id: string; + transactionId?: string | null; + method: string; + amount: number; + state: string; + metadata?: any | null; + }> | null; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + lines: Array<{ + id: string; + quantity: number; + linePrice: number; + linePriceWithTax: number; + unitPrice: number; + unitPriceWithTax: number; + unitPriceChangeSinceAdded: number; + unitPriceWithTaxChangeSinceAdded: number; + discountedUnitPriceWithTax: number; + proratedUnitPriceWithTax: number; + productVariant: { id: string }; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + }>; + shippingLines: Array<{ shippingMethod: { id: string; code: string; description: string } }>; + customer?: { id: string; user?: { id: string; identifier: string } | null } | null; + history: { items: Array<{ id: string; type: HistoryEntryType; data: any }> }; + } | null; +}; + +export type GetActiveCustomerOrderWithItemFulfillmentsQueryVariables = Exact<{ [key: string]: never }>; + +export type GetActiveCustomerOrderWithItemFulfillmentsQuery = { + activeCustomer?: { + orders: { + totalItems: number; + items: Array<{ + id: string; + code: string; + state: string; + lines: Array<{ id: string }>; + fulfillments?: Array<{ + id: string; + state: string; + method: string; + trackingCode?: string | null; + }> | null; + }>; + }; + } | null; +}; + +export type GetNextOrderStatesQueryVariables = Exact<{ [key: string]: never }>; export type GetNextOrderStatesQuery = { nextOrderStates: Array }; -export type GetCustomerAddressesQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetCustomerAddressesQuery = { activeOrder?: { customer?: { addresses?: Array<{ id: string, streetLine1: string }> | null } | null } | null }; - -export type GetCustomerOrdersQueryVariables = Exact<{ [key: string]: never; }>; +export type GetCustomerAddressesQueryVariables = Exact<{ [key: string]: never }>; +export type GetCustomerAddressesQuery = { + activeOrder?: { + customer?: { addresses?: Array<{ id: string; streetLine1: string }> | null } | null; + } | null; +}; -export type GetCustomerOrdersQuery = { activeOrder?: { customer?: { orders: { items: Array<{ id: string }> } } | null } | null }; +export type GetCustomerOrdersQueryVariables = Exact<{ [key: string]: never }>; -export type GetActiveCustomerOrdersQueryVariables = Exact<{ [key: string]: never; }>; +export type GetCustomerOrdersQuery = { + activeOrder?: { customer?: { orders: { items: Array<{ id: string }> } } | null } | null; +}; +export type GetActiveCustomerOrdersQueryVariables = Exact<{ [key: string]: never }>; -export type GetActiveCustomerOrdersQuery = { activeCustomer?: { id: string, orders: { totalItems: number, items: Array<{ id: string, state: string }> } } | null }; +export type GetActiveCustomerOrdersQuery = { + activeCustomer?: { + id: string; + orders: { totalItems: number; items: Array<{ id: string; state: string }> }; + } | null; +}; export type ApplyCouponCodeMutationVariables = Exact<{ - couponCode: Scalars['String']; + couponCode: Scalars['String']; }>; - -export type ApplyCouponCodeMutation = { applyCouponCode: { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { errorCode: ErrorCode, message: string } | { id: string, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, shipping: number, shippingWithTax: number, total: number, totalWithTax: number, couponCodes: Array, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }>, lines: Array<{ id: string, quantity: number, linePrice: number, linePriceWithTax: number, unitPrice: number, unitPriceWithTax: number, unitPriceChangeSinceAdded: number, unitPriceWithTaxChangeSinceAdded: number, discountedUnitPriceWithTax: number, proratedUnitPriceWithTax: number, productVariant: { id: string }, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> }>, shippingLines: Array<{ shippingMethod: { id: string, code: string, description: string } }>, customer?: { id: string, user?: { id: string, identifier: string } | null } | null, history: { items: Array<{ id: string, type: HistoryEntryType, data: any }> } } }; +export type ApplyCouponCodeMutation = { + applyCouponCode: + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { errorCode: ErrorCode; message: string } + | { + id: string; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + shipping: number; + shippingWithTax: number; + total: number; + totalWithTax: number; + couponCodes: Array; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + lines: Array<{ + id: string; + quantity: number; + linePrice: number; + linePriceWithTax: number; + unitPrice: number; + unitPriceWithTax: number; + unitPriceChangeSinceAdded: number; + unitPriceWithTaxChangeSinceAdded: number; + discountedUnitPriceWithTax: number; + proratedUnitPriceWithTax: number; + productVariant: { id: string }; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + }>; + shippingLines: Array<{ shippingMethod: { id: string; code: string; description: string } }>; + customer?: { id: string; user?: { id: string; identifier: string } | null } | null; + history: { items: Array<{ id: string; type: HistoryEntryType; data: any }> }; + }; +}; export type RemoveCouponCodeMutationVariables = Exact<{ - couponCode: Scalars['String']; + couponCode: Scalars['String']; }>; - -export type RemoveCouponCodeMutation = { removeCouponCode?: { id: string, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, shipping: number, shippingWithTax: number, total: number, totalWithTax: number, couponCodes: Array, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }>, lines: Array<{ id: string, quantity: number, linePrice: number, linePriceWithTax: number, unitPrice: number, unitPriceWithTax: number, unitPriceChangeSinceAdded: number, unitPriceWithTaxChangeSinceAdded: number, discountedUnitPriceWithTax: number, proratedUnitPriceWithTax: number, productVariant: { id: string }, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> }>, shippingLines: Array<{ shippingMethod: { id: string, code: string, description: string } }>, customer?: { id: string, user?: { id: string, identifier: string } | null } | null, history: { items: Array<{ id: string, type: HistoryEntryType, data: any }> } } | null }; - -export type RemoveAllOrderLinesMutationVariables = Exact<{ [key: string]: never; }>; - - -export type RemoveAllOrderLinesMutation = { removeAllOrderLines: { id: string, code: string, state: string, active: boolean, subTotal: number, subTotalWithTax: number, shipping: number, shippingWithTax: number, total: number, totalWithTax: number, couponCodes: Array, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }>, lines: Array<{ id: string, quantity: number, linePrice: number, linePriceWithTax: number, unitPrice: number, unitPriceWithTax: number, unitPriceChangeSinceAdded: number, unitPriceWithTaxChangeSinceAdded: number, discountedUnitPriceWithTax: number, proratedUnitPriceWithTax: number, productVariant: { id: string }, discounts: Array<{ adjustmentSource: string, amount: number, amountWithTax: number, description: string, type: AdjustmentType }> }>, shippingLines: Array<{ shippingMethod: { id: string, code: string, description: string } }>, customer?: { id: string, user?: { id: string, identifier: string } | null } | null, history: { items: Array<{ id: string, type: HistoryEntryType, data: any }> } } | { errorCode: ErrorCode, message: string } }; - -export type GetEligiblePaymentMethodsQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetEligiblePaymentMethodsQuery = { eligiblePaymentMethods: Array<{ id: string, code: string, eligibilityMessage?: string | null, isEligible: boolean }> }; +export type RemoveCouponCodeMutation = { + removeCouponCode?: { + id: string; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + shipping: number; + shippingWithTax: number; + total: number; + totalWithTax: number; + couponCodes: Array; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + lines: Array<{ + id: string; + quantity: number; + linePrice: number; + linePriceWithTax: number; + unitPrice: number; + unitPriceWithTax: number; + unitPriceChangeSinceAdded: number; + unitPriceWithTaxChangeSinceAdded: number; + discountedUnitPriceWithTax: number; + proratedUnitPriceWithTax: number; + productVariant: { id: string }; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + }>; + shippingLines: Array<{ shippingMethod: { id: string; code: string; description: string } }>; + customer?: { id: string; user?: { id: string; identifier: string } | null } | null; + history: { items: Array<{ id: string; type: HistoryEntryType; data: any }> }; + } | null; +}; + +export type RemoveAllOrderLinesMutationVariables = Exact<{ [key: string]: never }>; + +export type RemoveAllOrderLinesMutation = { + removeAllOrderLines: + | { + id: string; + code: string; + state: string; + active: boolean; + subTotal: number; + subTotalWithTax: number; + shipping: number; + shippingWithTax: number; + total: number; + totalWithTax: number; + couponCodes: Array; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + lines: Array<{ + id: string; + quantity: number; + linePrice: number; + linePriceWithTax: number; + unitPrice: number; + unitPriceWithTax: number; + unitPriceChangeSinceAdded: number; + unitPriceWithTaxChangeSinceAdded: number; + discountedUnitPriceWithTax: number; + proratedUnitPriceWithTax: number; + productVariant: { id: string }; + discounts: Array<{ + adjustmentSource: string; + amount: number; + amountWithTax: number; + description: string; + type: AdjustmentType; + }>; + }>; + shippingLines: Array<{ shippingMethod: { id: string; code: string; description: string } }>; + customer?: { id: string; user?: { id: string; identifier: string } | null } | null; + history: { items: Array<{ id: string; type: HistoryEntryType; data: any }> }; + } + | { errorCode: ErrorCode; message: string }; +}; + +export type GetEligiblePaymentMethodsQueryVariables = Exact<{ [key: string]: never }>; + +export type GetEligiblePaymentMethodsQuery = { + eligiblePaymentMethods: Array<{ + id: string; + code: string; + eligibilityMessage?: string | null; + isEligible: boolean; + }>; +}; export type GetProductStockLevelQueryVariables = Exact<{ - id: Scalars['ID']; + id: Scalars['ID']; }>; - -export type GetProductStockLevelQuery = { product?: { id: string, variants: Array<{ id: string, stockLevel: string }> } | null }; +export type GetProductStockLevelQuery = { + product?: { id: string; variants: Array<{ id: string; stockLevel: string }> } | null; +}; export type GetActiveCustomerWithOrdersProductSlugQueryVariables = Exact<{ - options?: InputMaybe; + options?: InputMaybe; }>; - -export type GetActiveCustomerWithOrdersProductSlugQuery = { activeCustomer?: { orders: { items: Array<{ lines: Array<{ productVariant: { product: { slug: string } } }> }> } } | null }; +export type GetActiveCustomerWithOrdersProductSlugQuery = { + activeCustomer?: { + orders: { items: Array<{ lines: Array<{ productVariant: { product: { slug: string } } }> }> }; + } | null; +}; export type GetActiveCustomerWithOrdersProductPriceQueryVariables = Exact<{ - options?: InputMaybe; + options?: InputMaybe; }>; - -export type GetActiveCustomerWithOrdersProductPriceQuery = { activeCustomer?: { orders: { items: Array<{ lines: Array<{ linePrice: number, productVariant: { id: string, name: string, price: number } }> }> } } | null }; +export type GetActiveCustomerWithOrdersProductPriceQuery = { + activeCustomer?: { + orders: { + items: Array<{ + lines: Array<{ + linePrice: number; + productVariant: { id: string; name: string; price: number }; + }>; + }>; + }; + } | null; +}; diff --git a/packages/core/e2e/localization.e2e-spec.ts b/packages/core/e2e/localization.e2e-spec.ts index 1e5307c0a5..7e4856b638 100644 --- a/packages/core/e2e/localization.e2e-spec.ts +++ b/packages/core/e2e/localization.e2e-spec.ts @@ -11,7 +11,7 @@ import { LanguageCode } from './graphql/generated-e2e-admin-types'; import * as Codegen from './graphql/generated-e2e-admin-types'; import { GET_PRODUCT_WITH_VARIANTS, UPDATE_PRODUCT } from './graphql/shared-definitions'; -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ describe('Localization', () => { const { server, adminClient } = createTestEnvironment(testConfig()); diff --git a/packages/core/e2e/money-strategy.e2e-spec.ts b/packages/core/e2e/money-strategy.e2e-spec.ts index fbdff93373..05dd7bfe53 100644 --- a/packages/core/e2e/money-strategy.e2e-spec.ts +++ b/packages/core/e2e/money-strategy.e2e-spec.ts @@ -14,7 +14,7 @@ import { AddItemToOrderMutation, AddItemToOrderMutationVariables } from './graph import { GET_PRODUCT_VARIANT_LIST } from './graphql/shared-definitions'; import { ADD_ITEM_TO_ORDER } from './graphql/shop-definitions'; -// tslint:disable:no-non-null-assertion +/* eslint-disable @typescript-eslint/no-non-null-assertion */ const orderGuard: ErrorResultGuard = createErrorResultGuard( input => !!input.total, diff --git a/packages/core/e2e/order-changed-price-handling.e2e-spec.ts b/packages/core/e2e/order-changed-price-handling.e2e-spec.ts index 9b7d7e27f3..3d25b2ef82 100644 --- a/packages/core/e2e/order-changed-price-handling.e2e-spec.ts +++ b/packages/core/e2e/order-changed-price-handling.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { ChangedPriceHandlingStrategy, mergeConfig, diff --git a/packages/core/e2e/order-channel.e2e-spec.ts b/packages/core/e2e/order-channel.e2e-spec.ts index 9a5e35d91b..6f41defd40 100644 --- a/packages/core/e2e/order-channel.e2e-spec.ts +++ b/packages/core/e2e/order-channel.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { createErrorResultGuard, createTestEnvironment, @@ -139,11 +139,11 @@ describe('Channelaware orders', () => { }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.lines.length).toBe(1); - expect(addItemToOrder!.lines[0].quantity).toBe(1); - expect(addItemToOrder!.lines[0].productVariant.id).toBe(product1!.variants[0].id); + expect(addItemToOrder.lines.length).toBe(1); + expect(addItemToOrder.lines[0].quantity).toBe(1); + expect(addItemToOrder.lines[0].productVariant.id).toBe(product1!.variants[0].id); - order1Id = addItemToOrder!.id; + order1Id = addItemToOrder.id; }); it('sets active order to null when switching channel', async () => { @@ -162,11 +162,11 @@ describe('Channelaware orders', () => { }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.lines.length).toBe(1); - expect(addItemToOrder!.lines[0].quantity).toBe(1); - expect(addItemToOrder!.lines[0].productVariant.id).toBe(product2!.variants[0].id); + expect(addItemToOrder.lines.length).toBe(1); + expect(addItemToOrder.lines[0].quantity).toBe(1); + expect(addItemToOrder.lines[0].productVariant.id).toBe(product2!.variants[0].id); - order2Id = addItemToOrder!.id; + order2Id = addItemToOrder.id; }); it('goes back to most recent active order when switching channel', async () => { @@ -179,7 +179,7 @@ describe('Channelaware orders', () => { const result = await shopClient.query(GET_ORDER_SHOP, { id: order2Id, }); - expect(result!.order).toBeNull(); + expect(result.order).toBeNull(); }); it('returns order when requesting order from correct channel', async () => { diff --git a/packages/core/e2e/order-item-price-calculation-strategy.e2e-spec.ts b/packages/core/e2e/order-item-price-calculation-strategy.e2e-spec.ts index 9cd03f108e..886a9a7df0 100644 --- a/packages/core/e2e/order-item-price-calculation-strategy.e2e-spec.ts +++ b/packages/core/e2e/order-item-price-calculation-strategy.e2e-spec.ts @@ -77,7 +77,7 @@ describe('custom OrderItemPriceCalculationStrategy', () => { }, }); - const variantPrice = (variant0.price as SinglePrice).value as number; + const variantPrice = (variant0.price as SinglePrice).value; expect(addItemToOrder.lines[0].unitPrice).toEqual(variantPrice); expect(addItemToOrder.lines[1].unitPrice).toEqual(variantPrice + 500); expect(addItemToOrder.subTotal).toEqual(variantPrice + variantPrice + 500); @@ -93,7 +93,7 @@ describe('custom OrderItemPriceCalculationStrategy', () => { }, }); - const variantPrice = (variants[0].price as SinglePrice).value as number; + const variantPrice = (variants[0].price as SinglePrice).value; expect(adjustOrderLine.lines[0].unitPrice).toEqual(variantPrice); expect(adjustOrderLine.lines[1].unitPrice).toEqual(variantPrice); expect(adjustOrderLine.subTotal).toEqual(variantPrice + variantPrice); diff --git a/packages/core/e2e/order-merge.e2e-spec.ts b/packages/core/e2e/order-merge.e2e-spec.ts index 2e0ab1aac6..259813c310 100644 --- a/packages/core/e2e/order-merge.e2e-spec.ts +++ b/packages/core/e2e/order-merge.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { mergeConfig, MergedOrderLine, diff --git a/packages/core/e2e/order-modification.e2e-spec.ts b/packages/core/e2e/order-modification.e2e-spec.ts index c0e36e37ed..77a3ffbd58 100644 --- a/packages/core/e2e/order-modification.e2e-spec.ts +++ b/packages/core/e2e/order-modification.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { omit } from '@vendure/common/lib/omit'; import { pick } from '@vendure/common/lib/pick'; import { summate } from '@vendure/common/lib/shared-utils'; @@ -703,12 +703,12 @@ describe('Order modification', () => { >(GET_ORDER, { id: order.id, }); - expect(order2!.totalWithTax).toBe(order!.totalWithTax); - expect(order2!.lines.length).toBe(order!.lines.length); - expect(order2!.surcharges.length).toBe(order!.surcharges.length); - expect(order2!.payments!.length).toBe(order!.payments!.length); + expect(order2!.totalWithTax).toBe(order.totalWithTax); + expect(order2!.lines.length).toBe(order.lines.length); + expect(order2!.surcharges.length).toBe(order.surcharges.length); + expect(order2!.payments!.length).toBe(order.payments!.length); expect(order2!.payments!.map(p => pick(p, ['id', 'amount', 'method']))).toEqual( - order!.payments!.map(p => pick(p, ['id', 'amount', 'method'])), + order.payments!.map(p => pick(p, ['id', 'amount', 'method'])), ); } @@ -732,9 +732,9 @@ describe('Order modification', () => { orderGuard.assertSuccess(modifyOrder); const priceDelta = Math.round(14374 * 1.2); // price of variant T_5 - const expectedTotal = order!.totalWithTax + priceDelta; + const expectedTotal = order.totalWithTax + priceDelta; expect(modifyOrder.totalWithTax).toBe(expectedTotal); - expect(modifyOrder.lines.length).toBe(order!.lines.length + 1); + expect(modifyOrder.lines.length).toBe(order.lines.length + 1); expect(modifyOrder.modifications.length).toBe(1); expect(modifyOrder.modifications[0].priceChange).toBe(priceDelta); expect(modifyOrder.modifications[0].lines.length).toBe(1); @@ -759,13 +759,13 @@ describe('Order modification', () => { input: { dryRun: false, orderId: order.id, - adjustOrderLines: [{ orderLineId: order!.lines[0].id, quantity: 2 }], + adjustOrderLines: [{ orderLineId: order.lines[0].id, quantity: 2 }], }, }); orderGuard.assertSuccess(modifyOrder); - const priceDelta = order!.lines[0].unitPriceWithTax; - const expectedTotal = order!.totalWithTax + priceDelta; + const priceDelta = order.lines[0].unitPriceWithTax; + const expectedTotal = order.totalWithTax + priceDelta; expect(modifyOrder.totalWithTax).toBe(expectedTotal); expect(modifyOrder.lines[0].quantity).toBe(2); expect(modifyOrder.modifications.length).toBe(1); @@ -789,14 +789,14 @@ describe('Order modification', () => { input: { dryRun: false, orderId: order.id, - adjustOrderLines: [{ orderLineId: order!.lines[0].id, quantity: 1 }], - refund: { paymentId: order!.payments![0].id }, + adjustOrderLines: [{ orderLineId: order.lines[0].id, quantity: 1 }], + refund: { paymentId: order.payments![0].id }, }, }); orderGuard.assertSuccess(modifyOrder); - const priceDelta = -order!.lines[0].unitPriceWithTax; - const expectedTotal = order!.totalWithTax + priceDelta; + const priceDelta = -order.lines[0].unitPriceWithTax; + const expectedTotal = order.totalWithTax + priceDelta; expect(modifyOrder.totalWithTax).toBe(expectedTotal); expect(modifyOrder.lines[0].quantity).toBe(1); expect(modifyOrder.payments?.length).toBe(1); @@ -834,7 +834,7 @@ describe('Order modification', () => { orderId: order.id, adjustOrderLines: [ { - orderLineId: order!.lines[0].id, + orderLineId: order.lines[0].id, quantity: 1, customFields: { color: 'black' }, } as any, @@ -848,7 +848,7 @@ describe('Order modification', () => { id: order.id, }); expect(orderWithLines.lines[0]).toEqual({ - id: order!.lines[0].id, + id: order.lines[0].id, customFields: { color: 'black' }, }); }); @@ -922,7 +922,7 @@ describe('Order modification', () => { orderGuard.assertSuccess(modifyOrder); const priceDelta = 300; - const expectedTotal = order!.totalWithTax + priceDelta; + const expectedTotal = order.totalWithTax + priceDelta; expect(modifyOrder.totalWithTax).toBe(expectedTotal); expect(modifyOrder.surcharges.map(s => omit(s, ['id']))).toEqual([ { @@ -952,7 +952,7 @@ describe('Order modification', () => { >(MODIFY_ORDER, { input: { dryRun: false, - orderId: order!.id, + orderId: order.id, surcharges: [ { description: 'special discount', @@ -964,13 +964,13 @@ describe('Order modification', () => { }, ], refund: { - paymentId: order!.payments![0].id, + paymentId: order.payments![0].id, }, }, }); orderGuard.assertSuccess(modifyOrder); - const expectedTotal = order!.totalWithTax + -300; + const expectedTotal = order.totalWithTax + -300; expect(modifyOrder.totalWithTax).toBe(expectedTotal); expect(modifyOrder.surcharges.map(s => omit(s, ['id']))).toEqual([ { @@ -1000,7 +1000,7 @@ describe('Order modification', () => { >(MODIFY_ORDER, { input: { dryRun: false, - orderId: order!.id, + orderId: order.id, updateShippingAddress: { countryCode: 'US', }, @@ -1012,7 +1012,7 @@ describe('Order modification', () => { orderGuard.assertSuccess(modifyOrder); const priceDelta = SHIPPING_US - SHIPPING_OTHER; - const expectedTotal = order!.totalWithTax + priceDelta; + const expectedTotal = order.totalWithTax + priceDelta; expect(modifyOrder.totalWithTax).toBe(expectedTotal); expect(modifyOrder.shippingAddress?.countryCode).toBe('US'); expect(modifyOrder.modifications.length).toBe(1); @@ -1034,7 +1034,7 @@ describe('Order modification', () => { >(MODIFY_ORDER, { input: { dryRun: false, - orderId: order!.id, + orderId: order.id, updateShippingAddress: { countryCode: 'US', }, @@ -1046,7 +1046,7 @@ describe('Order modification', () => { orderGuard.assertSuccess(modifyOrder); const priceDelta = 0; - const expectedTotal = order!.totalWithTax + priceDelta; + const expectedTotal = order.totalWithTax + priceDelta; expect(modifyOrder.totalWithTax).toBe(expectedTotal); expect(modifyOrder.shippingAddress?.countryCode).toBe('US'); expect(modifyOrder.modifications.length).toBe(1); @@ -1157,7 +1157,7 @@ describe('Order modification', () => { orderGuard.assertErrorResult(transitionOrderToState); expect(transitionOrderToState!.errorCode).toBe(ErrorCode.ORDER_STATE_TRANSITION_ERROR); expect(transitionOrderToState!.transitionError).toBe( - `Can only transition to the "ArrangingAdditionalPayment" state`, + 'Can only transition to the "ArrangingAdditionalPayment" state', ); }); @@ -1167,7 +1167,7 @@ describe('Order modification', () => { 'ArrangingAdditionalPayment', ); orderGuard.assertSuccess(transitionOrderToState); - expect(transitionOrderToState!.state).toBe('ArrangingAdditionalPayment'); + expect(transitionOrderToState.state).toBe('ArrangingAdditionalPayment'); }); it('cannot transition from ArrangingAdditionalPayment when total not covered by Payments', async () => { @@ -1175,7 +1175,7 @@ describe('Order modification', () => { orderGuard.assertErrorResult(transitionOrderToState); expect(transitionOrderToState!.errorCode).toBe(ErrorCode.ORDER_STATE_TRANSITION_ERROR); expect(transitionOrderToState!.transitionError).toBe( - `Cannot transition away from "ArrangingAdditionalPayment" unless Order total is covered by Payments`, + 'Cannot transition away from "ArrangingAdditionalPayment" unless Order total is covered by Payments', ); }); @@ -1275,14 +1275,14 @@ describe('Order modification', () => { orderGuard.assertErrorResult(transitionOrderToState); expect(transitionOrderToState!.errorCode).toBe(ErrorCode.ORDER_STATE_TRANSITION_ERROR); expect(transitionOrderToState!.transitionError).toBe( - `Cannot transition Order to the \"ArrangingAdditionalPayment\" state as no additional payments are needed`, + 'Cannot transition Order to the "ArrangingAdditionalPayment" state as no additional payments are needed', ); }); it('can transition to original state', async () => { const transitionOrderToState = await adminTransitionOrderToState(orderId3, 'PaymentSettled'); orderGuard.assertSuccess(transitionOrderToState); - expect(transitionOrderToState!.state).toBe('PaymentSettled'); + expect(transitionOrderToState.state).toBe('PaymentSettled'); const { order } = await adminClient.query( GET_ORDER, @@ -1361,7 +1361,7 @@ describe('Order modification', () => { }, }); orderGuard.assertSuccess(addManualPaymentToOrder); - additionalPaymentId = addManualPaymentToOrder.payments?.[1].id!; + additionalPaymentId = addManualPaymentToOrder.payments![1].id!; const transitionOrderToState2 = await adminTransitionOrderToState(orderId2, 'PaymentSettled'); orderGuard.assertSuccess(transitionOrderToState2); @@ -1533,7 +1533,7 @@ describe('Order modification', () => { input: { dryRun: true, orderId: order.id, - adjustOrderLines: [{ orderLineId: order!.lines[0].id, quantity: 2 }], + adjustOrderLines: [{ orderLineId: order.lines[0].id, quantity: 2 }], }, }); orderGuard.assertSuccess(modifyOrder); @@ -1672,7 +1672,7 @@ describe('Order modification', () => { expect(modifyOrder.totalWithTax).toBe( originalTotalWithTax - order.lines[0].proratedUnitPriceWithTax, ); - expect(modifyOrder.payments![0].refunds![0].total).toBe(order.lines[0].proratedUnitPriceWithTax); + expect(modifyOrder.payments![0].refunds[0].total).toBe(order.lines[0].proratedUnitPriceWithTax); expect(modifyOrder.totalWithTax).toBe(getOrderPaymentsTotalWithRefunds(modifyOrder)); }); @@ -1771,14 +1771,14 @@ describe('Order modification', () => { const expectedNewTotal = order.lines[0].unitPriceWithTax + shippingPrice; expect(modifyOrder.totalWithTax).toBe(expectedNewTotal); - expect(modifyOrder.payments![0].refunds![0].total).toBe(expectedTotal - expectedNewTotal); + expect(modifyOrder.payments![0].refunds[0].total).toBe(expectedTotal - expectedNewTotal); expect(modifyOrder.totalWithTax).toBe(getOrderPaymentsTotalWithRefunds(modifyOrder)); }); it('transition back to original state', async () => { const transitionOrderToState2 = await adminTransitionOrderToState(orderId2, 'PaymentSettled'); orderGuard.assertSuccess(transitionOrderToState2); - expect(transitionOrderToState2!.state).toBe('PaymentSettled'); + expect(transitionOrderToState2.state).toBe('PaymentSettled'); }); it('order no longer has promotions', async () => { @@ -1853,7 +1853,7 @@ describe('Order modification', () => { >(GET_STOCK_MOVEMENT, { id: 'T_1', }); - return product?.variants.find(v => v.id === id)!; + return product!.variants.find(v => v.id === id)!; } let orderId4: string; @@ -1896,7 +1896,7 @@ describe('Order modification', () => { it('updates stock when increasing quantity after fulfillment', async () => { const result = await adminTransitionOrderToState(orderId4, 'ArrangingAdditionalPayment'); orderGuard.assertSuccess(result); - expect(result!.state).toBe('ArrangingAdditionalPayment'); + expect(result.state).toBe('ArrangingAdditionalPayment'); const { order } = await adminClient.query( GET_ORDER, { @@ -1982,7 +1982,7 @@ describe('Order modification', () => { >(MODIFY_ORDER, { input: { dryRun: false, - orderId: order!.id, + orderId: order.id, addItems: [{ productVariantId: 'T_3', quantity: 1 }], }, }); @@ -2072,12 +2072,12 @@ describe('Order modification', () => { orderId: order.id, adjustOrderLines: [ { - orderLineId: order!.lines.find(l => l.productVariant.id === 'T_3')!.id, + orderLineId: order.lines.find(l => l.productVariant.id === 'T_3')!.id, quantity: 0, }, ], refund: { - paymentId: order!.payments![0].id, + paymentId: order.payments![0].id, }, }, }); @@ -2304,7 +2304,7 @@ describe('Order modification', () => { }); orderGuard.assertSuccess(modifyOrder); expect(modifyOrder.shippingWithTax).toBe(0); - expect(modifyOrder!.totalWithTax).toBe(getOrderPaymentsTotalWithRefunds(modifyOrder!)); + expect(modifyOrder.totalWithTax).toBe(getOrderPaymentsTotalWithRefunds(modifyOrder)); expect(modifyOrder.payments![0].refunds[0].total).toBe(shippingWithTax); }); }); @@ -2327,10 +2327,10 @@ describe('Order modification', () => { >(GET_ORDER, { id: order.id, }); - expect(order2!.totalWithTax).toBe(order!.totalWithTax); - expect(order2!.lines.length).toBe(order!.lines.length); - expect(order2!.surcharges.length).toBe(order!.surcharges.length); - expect(order2!.totalQuantity).toBe(order!.totalQuantity); + expect(order2!.totalWithTax).toBe(order.totalWithTax); + expect(order2!.lines.length).toBe(order.lines.length); + expect(order2!.surcharges.length).toBe(order.surcharges.length); + expect(order2!.totalQuantity).toBe(order.totalQuantity); } async function createOrderAndCheckout( diff --git a/packages/core/e2e/order-process.e2e-spec.ts b/packages/core/e2e/order-process.e2e-spec.ts index a5b55c88af..dbf1d28862 100644 --- a/packages/core/e2e/order-process.e2e-spec.ts +++ b/packages/core/e2e/order-process.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { CustomOrderProcess, defaultOrderProcess, diff --git a/packages/core/e2e/order-promotion.e2e-spec.ts b/packages/core/e2e/order-promotion.e2e-spec.ts index eccb5166a0..5bbbc499e9 100644 --- a/packages/core/e2e/order-promotion.e2e-spec.ts +++ b/packages/core/e2e/order-promotion.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { omit } from '@vendure/common/lib/omit'; import { pick } from '@vendure/common/lib/pick'; import { @@ -196,10 +196,10 @@ describe('Promotions applied to Orders', () => { couponCode: TEST_COUPON_CODE, }); orderResultGuard.assertSuccess(applyCouponCode); - expect(applyCouponCode!.couponCodes).toEqual([TEST_COUPON_CODE]); - expect(applyCouponCode!.discounts.length).toBe(1); - expect(applyCouponCode!.discounts[0].description).toBe('Free with test coupon'); - expect(applyCouponCode!.totalWithTax).toBe(0); + expect(applyCouponCode.couponCodes).toEqual([TEST_COUPON_CODE]); + expect(applyCouponCode.discounts.length).toBe(1); + expect(applyCouponCode.discounts[0].description).toBe('Free with test coupon'); + expect(applyCouponCode.totalWithTax).toBe(0); }); it('order history records application', async () => { @@ -231,7 +231,7 @@ describe('Promotions applied to Orders', () => { couponCode: TEST_COUPON_CODE, }); orderResultGuard.assertSuccess(applyCouponCode); - expect(applyCouponCode!.couponCodes).toEqual([TEST_COUPON_CODE]); + expect(applyCouponCode.couponCodes).toEqual([TEST_COUPON_CODE]); }); it('removes a coupon code', async () => { @@ -355,7 +355,7 @@ describe('Promotions applied to Orders', () => { couponCode: OTHER_CHANNEL_COUPON_CODE, }); orderResultGuard.assertErrorResult(applyCouponCode); - expect(applyCouponCode!.errorCode).toEqual('COUPON_CODE_INVALID_ERROR'); + expect(applyCouponCode.errorCode).toEqual('COUPON_CODE_INVALID_ERROR'); }); }); }); @@ -380,20 +380,20 @@ describe('Promotions applied to Orders', () => { quantity: 1, }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.totalWithTax).toBe(6000); - expect(addItemToOrder!.discounts.length).toBe(0); + expect(addItemToOrder.totalWithTax).toBe(6000); + expect(addItemToOrder.discounts.length).toBe(0); const { adjustOrderLine } = await shopClient.query< CodegenShop.AdjustItemQuantityMutation, CodegenShop.AdjustItemQuantityMutationVariables >(ADJUST_ITEM_QUANTITY, { - orderLineId: addItemToOrder!.lines[0].id, + orderLineId: addItemToOrder.lines[0].id, quantity: 2, }); orderResultGuard.assertSuccess(adjustOrderLine); - expect(adjustOrderLine!.totalWithTax).toBe(0); - expect(adjustOrderLine!.discounts[0].description).toBe('Free if order total greater than 100'); - expect(adjustOrderLine!.discounts[0].amountWithTax).toBe(-12000); + expect(adjustOrderLine.totalWithTax).toBe(0); + expect(adjustOrderLine.discounts[0].description).toBe('Free if order total greater than 100'); + expect(adjustOrderLine.discounts[0].amountWithTax).toBe(-12000); await deletePromotion(promotion.id); }); @@ -424,8 +424,8 @@ describe('Promotions applied to Orders', () => { quantity: 1, }); orderResultGuard.assertSuccess(res1); - expect(res1!.totalWithTax).toBe(120); - expect(res1!.discounts.length).toBe(0); + expect(res1.totalWithTax).toBe(120); + expect(res1.discounts.length).toBe(0); const { addItemToOrder: res2 } = await shopClient.query< CodegenShop.AddItemToOrderMutation, @@ -435,13 +435,13 @@ describe('Promotions applied to Orders', () => { quantity: 1, }); orderResultGuard.assertSuccess(res2); - expect(res2!.totalWithTax).toBe(0); - expect(res2!.discounts.length).toBe(1); - expect(res2!.totalWithTax).toBe(0); - expect(res2!.discounts[0].description).toBe( + expect(res2.totalWithTax).toBe(0); + expect(res2.discounts.length).toBe(1); + expect(res2.totalWithTax).toBe(0); + expect(res2.discounts[0].description).toBe( 'Free if order contains 2 items with Sale facet value', ); - expect(res2!.discounts[0].amountWithTax).toBe(-1320); + expect(res2.discounts[0].amountWithTax).toBe(-1320); await deletePromotion(promotion.id); }); @@ -481,20 +481,20 @@ describe('Promotions applied to Orders', () => { quantity: 1, }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.totalWithTax).toBe(7200); - expect(addItemToOrder!.discounts.length).toBe(0); + expect(addItemToOrder.totalWithTax).toBe(7200); + expect(addItemToOrder.discounts.length).toBe(0); const { adjustOrderLine } = await shopClient.query< CodegenShop.AdjustItemQuantityMutation, CodegenShop.AdjustItemQuantityMutationVariables >(ADJUST_ITEM_QUANTITY, { - orderLineId: addItemToOrder!.lines.find(l => l.productVariant.id === item5000.id)!.id, + orderLineId: addItemToOrder.lines.find(l => l.productVariant.id === item5000.id)!.id, quantity: 2, }); orderResultGuard.assertSuccess(adjustOrderLine); - expect(adjustOrderLine!.total).toBe(0); - expect(adjustOrderLine!.discounts[0].description).toBe('Free if buying 3 or more offer products'); - expect(adjustOrderLine!.discounts[0].amountWithTax).toBe(-13200); + expect(adjustOrderLine.total).toBe(0); + expect(adjustOrderLine.discounts[0].description).toBe('Free if buying 3 or more offer products'); + expect(adjustOrderLine.discounts[0].amountWithTax).toBe(-13200); await deletePromotion(promotion.id); }); @@ -529,10 +529,10 @@ describe('Promotions applied to Orders', () => { quantity: 1, }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.totalWithTax).toBe(0); - expect(addItemToOrder!.discounts.length).toBe(1); - expect(addItemToOrder!.discounts[0].description).toBe('Free for group members'); - expect(addItemToOrder!.discounts[0].amountWithTax).toBe(-6000); + expect(addItemToOrder.totalWithTax).toBe(0); + expect(addItemToOrder.discounts.length).toBe(1); + expect(addItemToOrder.discounts[0].description).toBe('Free for group members'); + expect(addItemToOrder.discounts[0].amountWithTax).toBe(-6000); await adminClient.query< Codegen.RemoveCustomersFromGroupMutation, @@ -546,12 +546,12 @@ describe('Promotions applied to Orders', () => { CodegenShop.AdjustItemQuantityMutation, CodegenShop.AdjustItemQuantityMutationVariables >(ADJUST_ITEM_QUANTITY, { - orderLineId: addItemToOrder!.lines[0].id, + orderLineId: addItemToOrder.lines[0].id, quantity: 2, }); orderResultGuard.assertSuccess(adjustOrderLine); - expect(adjustOrderLine!.totalWithTax).toBe(12000); - expect(adjustOrderLine!.discounts.length).toBe(0); + expect(adjustOrderLine.totalWithTax).toBe(12000); + expect(adjustOrderLine.discounts.length).toBe(0); await deletePromotion(promotion.id); }); @@ -641,8 +641,8 @@ describe('Promotions applied to Orders', () => { quantity: 1, }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.totalWithTax).toBe(6000); - expect(addItemToOrder!.discounts.length).toBe(0); + expect(addItemToOrder.totalWithTax).toBe(6000); + expect(addItemToOrder.discounts.length).toBe(0); const { applyCouponCode } = await shopClient.query< CodegenShop.ApplyCouponCodeMutation, @@ -651,9 +651,9 @@ describe('Promotions applied to Orders', () => { couponCode, }); orderResultGuard.assertSuccess(applyCouponCode); - expect(applyCouponCode!.discounts.length).toBe(1); - expect(applyCouponCode!.discounts[0].description).toBe('20% discount on order'); - expect(applyCouponCode!.totalWithTax).toBe(4800); + expect(applyCouponCode.discounts.length).toBe(1); + expect(applyCouponCode.discounts[0].description).toBe('20% discount on order'); + expect(applyCouponCode.totalWithTax).toBe(4800); }); it('prices include tax', async () => { @@ -666,8 +666,8 @@ describe('Promotions applied to Orders', () => { quantity: 1, }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.totalWithTax).toBe(6000); - expect(addItemToOrder!.discounts.length).toBe(0); + expect(addItemToOrder.totalWithTax).toBe(6000); + expect(addItemToOrder.discounts.length).toBe(0); const { applyCouponCode } = await shopClient.query< CodegenShop.ApplyCouponCodeMutation, @@ -676,9 +676,9 @@ describe('Promotions applied to Orders', () => { couponCode, }); orderResultGuard.assertSuccess(applyCouponCode); - expect(applyCouponCode!.discounts.length).toBe(1); - expect(applyCouponCode!.discounts[0].description).toBe('20% discount on order'); - expect(applyCouponCode!.totalWithTax).toBe(4800); + expect(applyCouponCode.discounts.length).toBe(1); + expect(applyCouponCode.discounts[0].description).toBe('20% discount on order'); + expect(applyCouponCode.totalWithTax).toBe(4800); }); // https://github.com/vendure-ecommerce/vendure/issues/1773 @@ -705,8 +705,8 @@ describe('Promotions applied to Orders', () => { quantity: 1, }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.totalWithTax).toBe(6000); - expect(addItemToOrder!.discounts.length).toBe(0); + expect(addItemToOrder.totalWithTax).toBe(6000); + expect(addItemToOrder.discounts.length).toBe(0); const { applyCouponCode } = await shopClient.query< ApplyCouponCode.Mutation, @@ -715,9 +715,9 @@ describe('Promotions applied to Orders', () => { couponCode: decimalPercentageCouponCode, }); orderResultGuard.assertSuccess(applyCouponCode); - expect(applyCouponCode!.discounts.length).toBe(1); - expect(applyCouponCode!.discounts[0].description).toBe('10.5% discount on order'); - expect(applyCouponCode!.totalWithTax).toBe(5370); + expect(applyCouponCode.discounts.length).toBe(1); + expect(applyCouponCode.discounts[0].description).toBe('10.5% discount on order'); + expect(applyCouponCode.totalWithTax).toBe(5370); }); }); @@ -756,9 +756,9 @@ describe('Promotions applied to Orders', () => { quantity: 1, }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.total).toBe(5000); - expect(addItemToOrder!.totalWithTax).toBe(6000); - expect(addItemToOrder!.discounts.length).toBe(0); + expect(addItemToOrder.total).toBe(5000); + expect(addItemToOrder.totalWithTax).toBe(6000); + expect(addItemToOrder.discounts.length).toBe(0); const { applyCouponCode } = await shopClient.query< CodegenShop.ApplyCouponCodeMutation, @@ -767,10 +767,10 @@ describe('Promotions applied to Orders', () => { couponCode, }); orderResultGuard.assertSuccess(applyCouponCode); - expect(applyCouponCode!.discounts.length).toBe(1); - expect(applyCouponCode!.discounts[0].description).toBe('$10 discount on order'); - expect(applyCouponCode!.total).toBe(4000); - expect(applyCouponCode!.totalWithTax).toBe(4800); + expect(applyCouponCode.discounts.length).toBe(1); + expect(applyCouponCode.discounts[0].description).toBe('$10 discount on order'); + expect(applyCouponCode.total).toBe(4000); + expect(applyCouponCode.totalWithTax).toBe(4800); }); it('prices include tax', async () => { @@ -783,8 +783,8 @@ describe('Promotions applied to Orders', () => { quantity: 1, }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.totalWithTax).toBe(6000); - expect(addItemToOrder!.discounts.length).toBe(0); + expect(addItemToOrder.totalWithTax).toBe(6000); + expect(addItemToOrder.discounts.length).toBe(0); const { applyCouponCode } = await shopClient.query< CodegenShop.ApplyCouponCodeMutation, @@ -793,9 +793,9 @@ describe('Promotions applied to Orders', () => { couponCode, }); orderResultGuard.assertSuccess(applyCouponCode); - expect(applyCouponCode!.discounts.length).toBe(1); - expect(applyCouponCode!.discounts[0].description).toBe('$10 discount on order'); - expect(applyCouponCode!.totalWithTax).toBe(5000); + expect(applyCouponCode.discounts.length).toBe(1); + expect(applyCouponCode.discounts[0].description).toBe('$10 discount on order'); + expect(applyCouponCode.totalWithTax).toBe(5000); }); it('does not result in negative total when shipping is included', async () => { @@ -808,8 +808,8 @@ describe('Promotions applied to Orders', () => { quantity: 1, }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.totalWithTax).toBe(120); - expect(addItemToOrder!.discounts.length).toBe(0); + expect(addItemToOrder.totalWithTax).toBe(120); + expect(addItemToOrder.discounts.length).toBe(0); const { setOrderShippingMethod } = await shopClient.query< CodegenShop.SetShippingMethodMutation, @@ -827,10 +827,10 @@ describe('Promotions applied to Orders', () => { couponCode, }); orderResultGuard.assertSuccess(applyCouponCode); - expect(applyCouponCode!.discounts.length).toBe(1); - expect(applyCouponCode!.discounts[0].description).toBe('$10 discount on order'); - expect(applyCouponCode!.subTotalWithTax).toBe(0); - expect(applyCouponCode!.totalWithTax).toBe(500); // shipping price + expect(applyCouponCode.discounts.length).toBe(1); + expect(applyCouponCode.discounts[0].description).toBe('$10 discount on order'); + expect(applyCouponCode.subTotalWithTax).toBe(0); + expect(applyCouponCode.totalWithTax).toBe(500); // shipping price }); }); @@ -896,10 +896,10 @@ describe('Promotions applied to Orders', () => { }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.discounts.length).toBe(0); - expect(getItemSale1Line(addItemToOrder!.lines).discounts.length).toBe(0); - expect(addItemToOrder!.total).toBe(2200); - expect(addItemToOrder!.totalWithTax).toBe(2640); + expect(addItemToOrder.discounts.length).toBe(0); + expect(getItemSale1Line(addItemToOrder.lines).discounts.length).toBe(0); + expect(addItemToOrder.total).toBe(2200); + expect(addItemToOrder.totalWithTax).toBe(2640); const { applyCouponCode } = await shopClient.query< CodegenShop.ApplyCouponCodeMutation, @@ -909,9 +909,9 @@ describe('Promotions applied to Orders', () => { }); orderResultGuard.assertSuccess(applyCouponCode); - expect(applyCouponCode!.total).toBe(1600); - expect(applyCouponCode!.totalWithTax).toBe(1920); - expect(getItemSale1Line(applyCouponCode!.lines).discounts.length).toBe(1); // 1x promotion + expect(applyCouponCode.total).toBe(1600); + expect(applyCouponCode.totalWithTax).toBe(1920); + expect(getItemSale1Line(applyCouponCode.lines).discounts.length).toBe(1); // 1x promotion const { removeCouponCode } = await shopClient.query< CodegenShop.RemoveCouponCodeMutation, @@ -957,10 +957,10 @@ describe('Promotions applied to Orders', () => { }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.discounts.length).toBe(0); - expect(getItemSale1Line(addItemToOrder!.lines).discounts.length).toBe(0); - expect(addItemToOrder!.total).toBe(2200); - expect(addItemToOrder!.totalWithTax).toBe(2640); + expect(addItemToOrder.discounts.length).toBe(0); + expect(getItemSale1Line(addItemToOrder.lines).discounts.length).toBe(0); + expect(addItemToOrder.total).toBe(2200); + expect(addItemToOrder.totalWithTax).toBe(2640); const { applyCouponCode } = await shopClient.query< CodegenShop.ApplyCouponCodeMutation, @@ -970,9 +970,9 @@ describe('Promotions applied to Orders', () => { }); orderResultGuard.assertSuccess(applyCouponCode); - expect(applyCouponCode!.total).toBe(1600); - expect(applyCouponCode!.totalWithTax).toBe(1920); - expect(getItemSale1Line(applyCouponCode!.lines).discounts.length).toBe(1); // 1x promotion + expect(applyCouponCode.total).toBe(1600); + expect(applyCouponCode.totalWithTax).toBe(1920); + expect(getItemSale1Line(applyCouponCode.lines).discounts.length).toBe(1); // 1x promotion const { removeCouponCode } = await shopClient.query< CodegenShop.RemoveCouponCodeMutation, @@ -1034,10 +1034,10 @@ describe('Promotions applied to Orders', () => { quantity: 1, }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.discounts.length).toBe(0); - expect(addItemToOrder!.lines[0].discounts.length).toBe(0); - expect(addItemToOrder!.total).toBe(5000); - expect(addItemToOrder!.totalWithTax).toBe(6000); + expect(addItemToOrder.discounts.length).toBe(0); + expect(addItemToOrder.lines[0].discounts.length).toBe(0); + expect(addItemToOrder.total).toBe(5000); + expect(addItemToOrder.totalWithTax).toBe(6000); const { applyCouponCode } = await shopClient.query< CodegenShop.ApplyCouponCodeMutation, @@ -1047,9 +1047,9 @@ describe('Promotions applied to Orders', () => { }); orderResultGuard.assertSuccess(applyCouponCode); - expect(applyCouponCode!.total).toBe(2500); - expect(applyCouponCode!.totalWithTax).toBe(3000); - expect(applyCouponCode!.lines[0].discounts.length).toBe(1); // 1x promotion + expect(applyCouponCode.total).toBe(2500); + expect(applyCouponCode.totalWithTax).toBe(3000); + expect(applyCouponCode.lines[0].discounts.length).toBe(1); // 1x promotion }); it('prices include tax', async () => { @@ -1062,10 +1062,10 @@ describe('Promotions applied to Orders', () => { quantity: 1, }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.discounts.length).toBe(0); - expect(addItemToOrder!.lines[0].discounts.length).toBe(0); - expect(addItemToOrder!.total).toBe(5000); - expect(addItemToOrder!.totalWithTax).toBe(6000); + expect(addItemToOrder.discounts.length).toBe(0); + expect(addItemToOrder.lines[0].discounts.length).toBe(0); + expect(addItemToOrder.total).toBe(5000); + expect(addItemToOrder.totalWithTax).toBe(6000); const { applyCouponCode } = await shopClient.query< CodegenShop.ApplyCouponCodeMutation, @@ -1075,9 +1075,9 @@ describe('Promotions applied to Orders', () => { }); orderResultGuard.assertSuccess(applyCouponCode); - expect(applyCouponCode!.total).toBe(2500); - expect(applyCouponCode!.totalWithTax).toBe(3000); - expect(applyCouponCode!.lines[0].discounts.length).toBe(1); // 1x promotion + expect(applyCouponCode.total).toBe(2500); + expect(applyCouponCode.totalWithTax).toBe(3000); + expect(applyCouponCode.lines[0].discounts.length).toBe(1); // 1x promotion }); }); @@ -1478,8 +1478,8 @@ describe('Promotions applied to Orders', () => { >(APPLY_COUPON_CODE, { couponCode: TEST_COUPON_CODE }); orderResultGuard.assertSuccess(applyCouponCode); - expect(applyCouponCode!.totalWithTax).toBe(0); - expect(applyCouponCode!.couponCodes).toEqual([TEST_COUPON_CODE]); + expect(applyCouponCode.totalWithTax).toBe(0); + expect(applyCouponCode.couponCodes).toEqual([TEST_COUPON_CODE]); await proceedToArrangingPayment(shopClient); const order = await addPaymentToOrder(shopClient, testSuccessfulPaymentMethod); @@ -1528,8 +1528,8 @@ describe('Promotions applied to Orders', () => { >(APPLY_COUPON_CODE, { couponCode: TEST_COUPON_CODE }); orderResultGuard.assertSuccess(applyCouponCode); - expect(applyCouponCode!.totalWithTax).toBe(0); - expect(applyCouponCode!.couponCodes).toEqual([TEST_COUPON_CODE]); + expect(applyCouponCode.totalWithTax).toBe(0); + expect(applyCouponCode.couponCodes).toEqual([TEST_COUPON_CODE]); await addGuestCustomerToOrder(); @@ -1557,8 +1557,8 @@ describe('Promotions applied to Orders', () => { >(APPLY_COUPON_CODE, { couponCode: TEST_COUPON_CODE }); orderResultGuard.assertSuccess(applyCouponCode); - expect(applyCouponCode!.totalWithTax).toBe(0); - expect(applyCouponCode!.couponCodes).toEqual([TEST_COUPON_CODE]); + expect(applyCouponCode.totalWithTax).toBe(0); + expect(applyCouponCode.couponCodes).toEqual([TEST_COUPON_CODE]); await proceedToArrangingPayment(shopClient); const order = await addPaymentToOrder(shopClient, testSuccessfulPaymentMethod); @@ -1592,8 +1592,8 @@ describe('Promotions applied to Orders', () => { >(APPLY_COUPON_CODE, { couponCode: TEST_COUPON_CODE }); orderResultGuard.assertSuccess(applyCouponCode); - expect(applyCouponCode!.couponCodes).toEqual([TEST_COUPON_CODE]); - expect(applyCouponCode!.totalWithTax).toBe(0); + expect(applyCouponCode.couponCodes).toEqual([TEST_COUPON_CODE]); + expect(applyCouponCode.totalWithTax).toBe(0); await logInAsRegisteredCustomer(); @@ -1627,8 +1627,8 @@ describe('Promotions applied to Orders', () => { >(APPLY_COUPON_CODE, { couponCode: TEST_COUPON_CODE }); orderResultGuard.assertSuccess(applyCouponCode); - expect(applyCouponCode!.totalWithTax).toBe(0); - expect(applyCouponCode!.couponCodes).toEqual([TEST_COUPON_CODE]); + expect(applyCouponCode.totalWithTax).toBe(0); + expect(applyCouponCode.couponCodes).toEqual([TEST_COUPON_CODE]); }); }); }); @@ -1663,8 +1663,8 @@ describe('Promotions applied to Orders', () => { quantity: 1, }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.discounts.length).toBe(1); - expect(addItemToOrder!.discounts[0].description).toBe('Test Promo'); + expect(addItemToOrder.discounts.length).toBe(1); + expect(addItemToOrder.discounts[0].description).toBe('Test Promo'); const { activeOrder: check1 } = await shopClient.query( GET_ACTIVE_ORDER, diff --git a/packages/core/e2e/order-taxes.e2e-spec.ts b/packages/core/e2e/order-taxes.e2e-spec.ts index b133cbbae9..bdf3bc821c 100644 --- a/packages/core/e2e/order-taxes.e2e-spec.ts +++ b/packages/core/e2e/order-taxes.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { summate } from '@vendure/common/lib/shared-utils'; import { Channel, diff --git a/packages/core/e2e/order.e2e-spec.ts b/packages/core/e2e/order.e2e-spec.ts index 7f3fe2cdbd..3da634fbca 100644 --- a/packages/core/e2e/order.e2e-spec.ts +++ b/packages/core/e2e/order.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { omit } from '@vendure/common/lib/omit'; import { pick } from '@vendure/common/lib/pick'; import { @@ -493,10 +493,10 @@ describe('Orders resolver', () => { }); paymentGuard.assertSuccess(settlePayment); - expect(settlePayment!.id).toBe(payment.id); - expect(settlePayment!.state).toBe('Settled'); + expect(settlePayment.id).toBe(payment.id); + expect(settlePayment.state).toBe('Settled'); // further metadata is combined into existing object - expect(settlePayment!.metadata).toEqual({ + expect(settlePayment.metadata).toEqual({ moreData: 42, public: { baz: 'quux', @@ -690,7 +690,7 @@ describe('Orders resolver', () => { ); expect(result.order!.fulfillments?.length).toBe(1); - expect(result.order!.fulfillments![0]!.id).toBe(addFulfillmentToOrder!.id); + expect(result.order!.fulfillments![0]!.id).toBe(addFulfillmentToOrder.id); expect(result.order!.fulfillments![0]!.lines).toEqual([ { orderLineId: order?.lines[0].id, @@ -1628,7 +1628,7 @@ describe('Orders resolver', () => { }); paymentGuard.assertSuccess(settlePayment); - expect(settlePayment!.state).toBe('Settled'); + expect(settlePayment.state).toBe('Settled'); const { refundOrder } = await adminClient.query< Codegen.RefundOrderMutation, @@ -1667,7 +1667,7 @@ describe('Orders resolver', () => { paymentId: 'T_999', }, }); - }, `No Payment with the id '999' could be found`), + }, "No Payment with the id '999' could be found"), ); it('returns error result if payment and order lines do not belong to the same Order', async () => { @@ -1852,8 +1852,8 @@ describe('Orders resolver', () => { Codegen.RefundOrderMutationVariables >(REFUND_ORDER, { input: { - lines: order!.lines.map(l => ({ orderLineId: l.id, quantity: l.quantity })), - shipping: order!.shipping, + lines: order.lines.map(l => ({ orderLineId: l.id, quantity: l.quantity })), + shipping: order.shipping, adjustment: 0, reason: 'foo', paymentId: order.payments![0].id, @@ -1868,8 +1868,8 @@ describe('Orders resolver', () => { Codegen.RefundOrderMutationVariables >(REFUND_ORDER, { input: { - lines: order!.lines.map(l => ({ orderLineId: l.id, quantity: l.quantity })), - shipping: order!.shipping, + lines: order.lines.map(l => ({ orderLineId: l.id, quantity: l.quantity })), + shipping: order.shipping, adjustment: 0, reason: 'foo', paymentId: order.payments![0].id, @@ -2150,7 +2150,7 @@ describe('Orders resolver', () => { expect(order.state).toBe('PaymentSettled'); expect(order.payments?.length).toBe(2); expect( - omit(order.payments?.find(p => p.method === singleStageRefundablePaymentMethod.code)!, [ + omit(order.payments!.find(p => p.method === singleStageRefundablePaymentMethod.code)!, [ 'id', ]), ).toEqual({ @@ -2436,7 +2436,7 @@ describe('Orders resolver', () => { Codegen.RefundOrderMutationVariables >(REFUND_ORDER, { input: { - lines: order!.lines.map(l => ({ orderLineId: l.id, quantity: 1 })), + lines: order.lines.map(l => ({ orderLineId: l.id, quantity: 1 })), shipping: 0, adjustment: 0, reason: 'foo', @@ -2450,7 +2450,7 @@ describe('Orders resolver', () => { Codegen.RefundOrderMutationVariables >(REFUND_ORDER, { input: { - lines: order!.lines.map(l => ({ orderLineId: l.id, quantity: 1 })), + lines: order.lines.map(l => ({ orderLineId: l.id, quantity: 1 })), shipping: 0, adjustment: 0, reason: 'foo', diff --git a/packages/core/e2e/parallel-transactions.e2e-spec.ts b/packages/core/e2e/parallel-transactions.e2e-spec.ts index edf8ee2890..50f254206e 100644 --- a/packages/core/e2e/parallel-transactions.e2e-spec.ts +++ b/packages/core/e2e/parallel-transactions.e2e-spec.ts @@ -74,7 +74,7 @@ describe('Parallel transactions', () => { }, }); - const sizes = Array.from({ length: CONCURRENCY_LIMIT }).map(i => `size-${i}`); + const sizes = Array.from({ length: CONCURRENCY_LIMIT }).map(i => `size-${i as string}`); const { createProductOptionGroup } = await adminClient.query< Codegen.CreateProductOptionGroupMutation, diff --git a/packages/core/e2e/payment-method.e2e-spec.ts b/packages/core/e2e/payment-method.e2e-spec.ts index e66c7163aa..570c466876 100644 --- a/packages/core/e2e/payment-method.e2e-spec.ts +++ b/packages/core/e2e/payment-method.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { DefaultLogger, dummyPaymentHandler, @@ -42,7 +42,7 @@ const minPriceChecker = new PaymentMethodEligibilityChecker({ if (order.totalWithTax >= args.minPrice) { return true; } else { - return `Order total too low`; + return 'Order total too low'; } }, }); diff --git a/packages/core/e2e/payment-process.e2e-spec.ts b/packages/core/e2e/payment-process.e2e-spec.ts index ba50e5f47c..8241a8d49d 100644 --- a/packages/core/e2e/payment-process.e2e-spec.ts +++ b/packages/core/e2e/payment-process.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { CustomOrderProcess, CustomPaymentProcess, @@ -198,7 +198,7 @@ describe('Payment process', () => { expect(order?.state).toBe('ArrangingPayment'); expect(order?.payments?.length).toBe(1); expect(order?.payments?.[0].state).toBe('Validating'); - payment1Id = addPaymentToOrder?.payments?.[0].id!; + payment1Id = addPaymentToOrder.payments![0].id; }); it('calls transition hooks', async () => { @@ -291,7 +291,7 @@ describe('Payment process', () => { }); orderGuard.assertSuccess(addPaymentToOrder); - payment2Id = addPaymentToOrder!.payments![0].id; + payment2Id = addPaymentToOrder.payments![0].id; await adminClient.query< Codegen.AdminTransitionMutation, diff --git a/packages/core/e2e/populate.e2e-spec.ts b/packages/core/e2e/populate.e2e-spec.ts index 85f9024e0f..f4a9c1db2c 100644 --- a/packages/core/e2e/populate.e2e-spec.ts +++ b/packages/core/e2e/populate.e2e-spec.ts @@ -177,7 +177,7 @@ describe('populate() function', () => { it('populates products', async () => { await adminClient.asSuperAdmin(); - await adminClient.setChannelToken(channel2.token); + adminClient.setChannelToken(channel2.token); const { products } = await adminClient.query(GET_PRODUCT_LIST); expect(products.totalItems).toBe(1); expect(products.items.map(i => i.name).sort()).toEqual(['Model Hand']); @@ -194,7 +194,7 @@ describe('populate() function', () => { }); it('product also assigned to default channel', async () => { - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { products } = await adminClient.query(GET_PRODUCT_LIST); expect(products.items.map(i => i.name).includes('Model Hand')).toBe(true); }); @@ -231,7 +231,7 @@ describe('populate() function', () => { it('populates variants & options', async () => { await adminClient.asSuperAdmin(); - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { products } = await adminClient.query( GET_PRODUCT_LIST, { diff --git a/packages/core/e2e/product-channel.e2e-spec.ts b/packages/core/e2e/product-channel.e2e-spec.ts index c98e31dd75..26449ced86 100644 --- a/packages/core/e2e/product-channel.e2e-spec.ts +++ b/packages/core/e2e/product-channel.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { createTestEnvironment, E2E_DEFAULT_CHANNEL_TOKEN } from '@vendure/testing'; import path from 'path'; import { afterAll, beforeAll, describe, expect, it } from 'vitest'; @@ -115,7 +115,7 @@ describe('ChannelAware Products and ProductVariants', () => { beforeAll(async () => { await adminClient.asSuperAdmin(); - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { product } = await adminClient.query< Codegen.GetProductWithVariantsQuery, @@ -158,7 +158,7 @@ describe('ChannelAware Products and ProductVariants', () => { }); expect(assignProductsToChannel[0].channels.map(c => c.id).sort()).toEqual(['T_1', 'T_2']); - await adminClient.setChannelToken(SECOND_CHANNEL_TOKEN); + adminClient.setChannelToken(SECOND_CHANNEL_TOKEN); const { product } = await adminClient.query< Codegen.GetProductWithVariantsQuery, Codegen.GetProductWithVariantsQueryVariables @@ -231,7 +231,7 @@ describe('ChannelAware Products and ProductVariants', () => { it('removes Product from Channel', async () => { await adminClient.asSuperAdmin(); - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { removeProductsFromChannel } = await adminClient.query< Codegen.RemoveProductsFromChannelMutation, Codegen.RemoveProductsFromChannelMutationVariables @@ -251,7 +251,7 @@ describe('ChannelAware Products and ProductVariants', () => { beforeAll(async () => { await adminClient.asSuperAdmin(); - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { product } = await adminClient.query< Codegen.GetProductWithVariantsQuery, @@ -281,7 +281,7 @@ describe('ChannelAware Products and ProductVariants', () => { it('assigns ProductVariant to Channel and applies price factor', async () => { const PRICE_FACTOR = 0.5; await adminClient.asSuperAdmin(); - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { assignProductVariantsToChannel } = await adminClient.query< Codegen.AssignProductVariantsToChannelMutation, Codegen.AssignProductVariantsToChannelMutationVariables @@ -294,7 +294,7 @@ describe('ChannelAware Products and ProductVariants', () => { }); expect(assignProductVariantsToChannel[0].channels.map(c => c.id).sort()).toEqual(['T_1', 'T_3']); - await adminClient.setChannelToken(THIRD_CHANNEL_TOKEN); + adminClient.setChannelToken(THIRD_CHANNEL_TOKEN); const { product } = await adminClient.query< Codegen.GetProductWithVariantsQuery, Codegen.GetProductWithVariantsQueryVariables @@ -307,7 +307,7 @@ describe('ChannelAware Products and ProductVariants', () => { Math.round(product1.variants[0].priceWithTax * PRICE_FACTOR), ]); - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { product: check } = await adminClient.query< Codegen.GetProductWithVariantsQuery, Codegen.GetProductWithVariantsQueryVariables @@ -323,7 +323,7 @@ describe('ChannelAware Products and ProductVariants', () => { it('does not assign ProductVariant to same channel twice', async () => { await adminClient.asSuperAdmin(); - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { assignProductVariantsToChannel } = await adminClient.query< Codegen.AssignProductVariantsToChannelMutation, Codegen.AssignProductVariantsToChannelMutationVariables @@ -353,7 +353,7 @@ describe('ChannelAware Products and ProductVariants', () => { it('removes ProductVariant but not Product from Channel', async () => { await adminClient.asSuperAdmin(); - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { assignProductVariantsToChannel } = await adminClient.query< Codegen.AssignProductVariantsToChannelMutation, Codegen.AssignProductVariantsToChannelMutationVariables @@ -387,7 +387,7 @@ describe('ChannelAware Products and ProductVariants', () => { it('removes ProductVariant and Product from Channel', async () => { await adminClient.asSuperAdmin(); - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); const { removeProductVariantsFromChannel } = await adminClient.query< Codegen.RemoveProductVariantsFromChannelMutation, Codegen.RemoveProductVariantsFromChannelMutationVariables @@ -482,7 +482,7 @@ describe('ChannelAware Products and ProductVariants', () => { translations: [{ languageCode: LanguageCode.en, name: 'xyz' }], }, }); - }, `No Product with the id '2' could be found`), + }, "No Product with the id '2' could be found"), ); }); }); diff --git a/packages/core/e2e/product-option.e2e-spec.ts b/packages/core/e2e/product-option.e2e-spec.ts index 37bce3a10e..a0c35bb3a8 100644 --- a/packages/core/e2e/product-option.e2e-spec.ts +++ b/packages/core/e2e/product-option.e2e-spec.ts @@ -19,7 +19,7 @@ import { } from './graphql/shared-definitions'; import { assertThrowsWithMessage } from './utils/assert-throws-with-message'; -// tslint:disable:no-non-null-assertion +/* eslint-disable @typescript-eslint/no-non-null-assertion */ describe('ProductOption resolver', () => { const { server, adminClient } = createTestEnvironment(testConfig()); diff --git a/packages/core/e2e/product.e2e-spec.ts b/packages/core/e2e/product.e2e-spec.ts index 8bf5c8025d..ba1b91c34f 100644 --- a/packages/core/e2e/product.e2e-spec.ts +++ b/packages/core/e2e/product.e2e-spec.ts @@ -31,7 +31,7 @@ import { } from './graphql/shared-definitions'; import { assertThrowsWithMessage } from './utils/assert-throws-with-message'; -// tslint:disable:no-non-null-assertion +/* eslint-disable @typescript-eslint/no-non-null-assertion */ describe('Product resolver', () => { const { server, adminClient, shopClient } = createTestEnvironment({ @@ -1200,7 +1200,7 @@ describe('Product resolver', () => { }, }, ), - `No Product with the id '999' could be found`, + "No Product with the id '999' could be found", ), ); @@ -1238,7 +1238,7 @@ describe('Product resolver', () => { optionGroupId: 'T_1', productId: 'T_999', }), - `No Product with the id '999' could be found`, + "No Product with the id '999' could be found", ), ); @@ -1253,7 +1253,7 @@ describe('Product resolver', () => { optionGroupId: 'T_1', productId: 'T_2', }), - `The ProductOptionGroup "laptop-screen-size" is already assigned to the Product "Laptop"`, + 'The ProductOptionGroup "laptop-screen-size" is already assigned to the Product "Laptop"', ), ); @@ -1268,7 +1268,7 @@ describe('Product resolver', () => { optionGroupId: '999', productId: newProduct.id, }), - `No ProductOptionGroup with the id '999' could be found`, + "No ProductOptionGroup with the id '999' could be found", ), ); @@ -1306,7 +1306,7 @@ describe('Product resolver', () => { removeOptionGuard.assertErrorResult(removeOptionGroupFromProduct); expect(removeOptionGroupFromProduct.message).toBe( - `Cannot remove ProductOptionGroup "curvy-monitor-monitor-size" as it is used by 2 ProductVariants`, + 'Cannot remove ProductOptionGroup "curvy-monitor-monitor-size" as it is used by 2 ProductVariants', ); expect(removeOptionGroupFromProduct.errorCode).toBe(ErrorCode.PRODUCT_OPTION_IN_USE_ERROR); expect(removeOptionGroupFromProduct.optionGroupCode).toBe('curvy-monitor-monitor-size'); @@ -1351,7 +1351,7 @@ describe('Product resolver', () => { optionGroupId: '1', productId: '999', }), - `No Product with the id '999' could be found`, + "No Product with the id '999' could be found", ), ); @@ -1366,7 +1366,7 @@ describe('Product resolver', () => { optionGroupId: '999', productId: newProduct.id, }), - `No ProductOptionGroup with the id '999' could be found`, + "No ProductOptionGroup with the id '999' could be found", ), ); @@ -1663,7 +1663,7 @@ describe('Product resolver', () => { }, ], }), - `No ProductVariant with the id '999' could be found`, + "No ProductVariant with the id '999' could be found", ), ); @@ -1696,7 +1696,7 @@ describe('Product resolver', () => { }); expect(result2.product!.variants.map(v => v.id).sort()).toEqual(['T_36', 'T_37']); - deletedVariant = result1.product?.variants.find(v => v.id === 'T_35')!; + deletedVariant = result1.product!.variants.find(v => v.id === 'T_35')!; }); /** Testing https://github.com/vendure-ecommerce/vendure/issues/412 **/ @@ -1981,7 +1981,7 @@ describe('Product resolver', () => { }, }, ), - `No Product with the id '1' could be found`, + "No Product with the id '1' could be found", ), ); @@ -1996,7 +1996,7 @@ describe('Product resolver', () => { optionGroupId: 'T_1', productId: productToDelete.id, }), - `No Product with the id '1' could be found`, + "No Product with the id '1' could be found", ), ); @@ -2011,7 +2011,7 @@ describe('Product resolver', () => { optionGroupId: 'T_1', productId: productToDelete.id, }), - `No Product with the id '1' could be found`, + "No Product with the id '1' could be found", ), ); diff --git a/packages/core/e2e/promotion.e2e-spec.ts b/packages/core/e2e/promotion.e2e-spec.ts index 0bcc04af2b..1e70ebfc69 100644 --- a/packages/core/e2e/promotion.e2e-spec.ts +++ b/packages/core/e2e/promotion.e2e-spec.ts @@ -25,7 +25,7 @@ import { } from './graphql/shared-definitions'; import { assertThrowsWithMessage } from './utils/assert-throws-with-message'; -// tslint:disable:no-non-null-assertion +/* eslint-disable @typescript-eslint/no-non-null-assertion */ describe('Promotion resolver', () => { const promoCondition = generateTestCondition('promo_condition'); @@ -370,7 +370,7 @@ describe('Promotion resolver', () => { enabled: false, }, }), - `No Promotion with the id '1' could be found`, + "No Promotion with the id '1' could be found", ), ); }); diff --git a/packages/core/e2e/role.e2e-spec.ts b/packages/core/e2e/role.e2e-spec.ts index 484c71c5d4..62e64dca54 100644 --- a/packages/core/e2e/role.e2e-spec.ts +++ b/packages/core/e2e/role.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { omit } from '@vendure/common/lib/omit'; import { CUSTOMER_ROLE_CODE, @@ -275,7 +275,7 @@ describe('Role resolver', () => { assertThrowsWithMessage(async () => { const superAdminRole = defaultRoles.find(r => r.code === SUPER_ADMIN_ROLE_CODE); if (!superAdminRole) { - fail(`Could not find SuperAdmin role`); + fail('Could not find SuperAdmin role'); return; } return adminClient.query( @@ -297,7 +297,7 @@ describe('Role resolver', () => { assertThrowsWithMessage(async () => { const customerRole = defaultRoles.find(r => r.code === CUSTOMER_ROLE_CODE); if (!customerRole) { - fail(`Could not find Customer role`); + fail('Could not find Customer role'); return; } return adminClient.query( @@ -320,7 +320,7 @@ describe('Role resolver', () => { assertThrowsWithMessage(async () => { const customerRole = defaultRoles.find(r => r.code === CUSTOMER_ROLE_CODE); if (!customerRole) { - fail(`Could not find Customer role`); + fail('Could not find Customer role'); return; } return adminClient.query( @@ -337,7 +337,7 @@ describe('Role resolver', () => { assertThrowsWithMessage(async () => { const superAdminRole = defaultRoles.find(r => r.code === SUPER_ADMIN_ROLE_CODE); if (!superAdminRole) { - fail(`Could not find Customer role`); + fail('Could not find Customer role'); return; } return adminClient.query( @@ -459,7 +459,7 @@ describe('Role resolver', () => { const { channels } = await adminClient.query(GET_CHANNELS); defaultChannel = channels.find(c => c.token === E2E_DEFAULT_CHANNEL_TOKEN)!; secondChannel = channels.find(c => c.token !== E2E_DEFAULT_CHANNEL_TOKEN)!; - await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); + adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN); await adminClient.asSuperAdmin(); const { createRole } = await adminClient.query< Codegen.CreateRoleMutation, diff --git a/packages/core/e2e/session-management.e2e-spec.ts b/packages/core/e2e/session-management.e2e-spec.ts index 18d73ca5fe..8142034562 100644 --- a/packages/core/e2e/session-management.e2e-spec.ts +++ b/packages/core/e2e/session-management.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { CachedSession, mergeConfig, SessionCacheStrategy } from '@vendure/core'; import { createTestEnvironment } from '@vendure/testing'; import gql from 'graphql-tag'; diff --git a/packages/core/e2e/shipping-method.e2e-spec.ts b/packages/core/e2e/shipping-method.e2e-spec.ts index 851ec2741e..7457681e0b 100644 --- a/packages/core/e2e/shipping-method.e2e-spec.ts +++ b/packages/core/e2e/shipping-method.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { defaultShippingCalculator, defaultShippingEligibilityChecker, diff --git a/packages/core/e2e/shop-auth.e2e-spec.ts b/packages/core/e2e/shop-auth.e2e-spec.ts index ac98e75ba7..059268a114 100644 --- a/packages/core/e2e/shop-auth.e2e-spec.ts +++ b/packages/core/e2e/shop-auth.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { OnModuleInit } from '@nestjs/common'; import { ErrorCode, RegisterCustomerInput } from '@vendure/common/lib/generated-shop-types'; import { pick } from '@vendure/common/lib/pick'; @@ -93,7 +93,7 @@ class TestPasswordValidationStrategy implements PasswordValidationStrategy { return 'Password must be more than 8 characters'; } if (password === '12345678') { - return `Don't use 12345678!`; + return "Don't use 12345678!"; } return true; } @@ -267,7 +267,7 @@ describe('Shop auth & accounts', () => { }); currentUserErrorGuard.assertErrorResult(verifyCustomerAccount); - expect(verifyCustomerAccount.message).toBe(`Verification token not recognized`); + expect(verifyCustomerAccount.message).toBe('Verification token not recognized'); expect(verifyCustomerAccount.errorCode).toBe(ErrorCode.VERIFICATION_TOKEN_INVALID_ERROR); }); @@ -280,7 +280,7 @@ describe('Shop auth & accounts', () => { }); currentUserErrorGuard.assertErrorResult(verifyCustomerAccount); - expect(verifyCustomerAccount.message).toBe(`A password must be provided.`); + expect(verifyCustomerAccount.message).toBe('A password must be provided.'); expect(verifyCustomerAccount.errorCode).toBe(ErrorCode.MISSING_PASSWORD_ERROR); }); @@ -294,9 +294,9 @@ describe('Shop auth & accounts', () => { }); currentUserErrorGuard.assertErrorResult(verifyCustomerAccount); - expect(verifyCustomerAccount.message).toBe(`Password is invalid`); + expect(verifyCustomerAccount.message).toBe('Password is invalid'); expect((verifyCustomerAccount as PasswordValidationError).validationErrorMessage).toBe( - `Password must be more than 8 characters`, + 'Password must be more than 8 characters', ); expect(verifyCustomerAccount.errorCode).toBe(ErrorCode.PASSWORD_VALIDATION_ERROR); }); @@ -347,7 +347,7 @@ describe('Shop auth & accounts', () => { }); currentUserErrorGuard.assertErrorResult(verifyCustomerAccount); - expect(verifyCustomerAccount.message).toBe(`Verification token not recognized`); + expect(verifyCustomerAccount.message).toBe('Verification token not recognized'); expect(verifyCustomerAccount.errorCode).toBe(ErrorCode.VERIFICATION_TOKEN_INVALID_ERROR); }); @@ -404,9 +404,9 @@ describe('Shop auth & accounts', () => { }); successErrorGuard.assertErrorResult(registerCustomerAccount); expect(registerCustomerAccount.errorCode).toBe(ErrorCode.PASSWORD_VALIDATION_ERROR); - expect(registerCustomerAccount.message).toBe(`Password is invalid`); + expect(registerCustomerAccount.message).toBe('Password is invalid'); expect((registerCustomerAccount as PasswordValidationError).validationErrorMessage).toBe( - `Don't use 12345678!`, + "Don't use 12345678!", ); }); @@ -467,7 +467,7 @@ describe('Shop auth & accounts', () => { }); currentUserErrorGuard.assertErrorResult(verifyCustomerAccount); - expect(verifyCustomerAccount.message).toBe(`A password has already been set during registration`); + expect(verifyCustomerAccount.message).toBe('A password has already been set during registration'); expect(verifyCustomerAccount.errorCode).toBe(ErrorCode.PASSWORD_ALREADY_SET_ERROR); }); @@ -547,7 +547,7 @@ describe('Shop auth & accounts', () => { }); currentUserErrorGuard.assertErrorResult(resetPassword); - expect(resetPassword.message).toBe(`Password reset token not recognized`); + expect(resetPassword.message).toBe('Password reset token not recognized'); expect(resetPassword.errorCode).toBe(ErrorCode.PASSWORD_RESET_TOKEN_INVALID_ERROR); }); @@ -561,9 +561,9 @@ describe('Shop auth & accounts', () => { }); currentUserErrorGuard.assertErrorResult(resetPassword); - expect(resetPassword.message).toBe(`Password is invalid`); + expect(resetPassword.message).toBe('Password is invalid'); expect((resetPassword as PasswordValidationError).validationErrorMessage).toBe( - `Password must be more than 8 characters`, + 'Password must be more than 8 characters', ); expect(resetPassword.errorCode).toBe(ErrorCode.PASSWORD_VALIDATION_ERROR); }); @@ -876,7 +876,7 @@ describe('Shop auth & accounts', () => { } catch (e: any) { const errorCode = getErrorCode(e); if (!errorCode) { - fail(`Unexpected failure: ${e}`); + fail(`Unexpected failure: ${JSON.stringify(e)}`); } else { fail(`Operation should be allowed, got status ${getErrorCode(e)}`); } @@ -886,7 +886,7 @@ describe('Shop auth & accounts', () => { async function assertRequestForbidden(operation: DocumentNode, variables: V) { try { const status = await shopClient.query(operation, variables); - fail(`Should have thrown`); + fail('Should have thrown'); } catch (e: any) { expect(getErrorCode(e)).toBe('FORBIDDEN'); } @@ -914,7 +914,7 @@ describe('Shop auth & accounts', () => { const role = roleResult.createRole; const identifier = `${code}@${Math.random().toString(16).substr(2, 8)}`; - const password = `test`; + const password = 'test'; const adminResult = await shopClient.query< Codegen.CreateAdministratorMutation, @@ -1004,7 +1004,7 @@ describe('Expiring tokens', () => { currentUserErrorGuard.assertErrorResult(verifyCustomerAccount); expect(verifyCustomerAccount.message).toBe( - `Verification token has expired. Use refreshCustomerVerification to send a new token.`, + 'Verification token has expired. Use refreshCustomerVerification to send a new token.', ); expect(verifyCustomerAccount.errorCode).toBe(ErrorCode.VERIFICATION_TOKEN_EXPIRED_ERROR); }); @@ -1044,7 +1044,7 @@ describe('Expiring tokens', () => { currentUserErrorGuard.assertErrorResult(resetPassword); - expect(resetPassword.message).toBe(`Password reset token has expired`); + expect(resetPassword.message).toBe('Password reset token has expired'); expect(resetPassword.errorCode).toBe(ErrorCode.PASSWORD_RESET_TOKEN_EXPIRED_ERROR); }); }); diff --git a/packages/core/e2e/shop-catalog.e2e-spec.ts b/packages/core/e2e/shop-catalog.e2e-spec.ts index 0e40f1eeb1..c611e98efa 100644 --- a/packages/core/e2e/shop-catalog.e2e-spec.ts +++ b/packages/core/e2e/shop-catalog.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { facetValueCollectionFilter, JobQueueService } from '@vendure/core'; import { createTestEnvironment } from '@vendure/testing'; import gql from 'graphql-tag'; @@ -260,7 +260,7 @@ describe('Shop catalog', () => { }, { name: 'containsAny', - value: `false`, + value: 'false', }, ], }, diff --git a/packages/core/e2e/shop-customer.e2e-spec.ts b/packages/core/e2e/shop-customer.e2e-spec.ts index 6be51033ef..c52e35ad8b 100644 --- a/packages/core/e2e/shop-customer.e2e-spec.ts +++ b/packages/core/e2e/shop-customer.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { pick } from '@vendure/common/lib/pick'; import { createErrorResultGuard, createTestEnvironment, ErrorResultGuard } from '@vendure/testing'; import gql from 'graphql-tag'; diff --git a/packages/core/e2e/shop-order.e2e-spec.ts b/packages/core/e2e/shop-order.e2e-spec.ts index c97d15e986..fdb3657421 100644 --- a/packages/core/e2e/shop-order.e2e-spec.ts +++ b/packages/core/e2e/shop-order.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { pick } from '@vendure/common/lib/pick'; import { Asset, @@ -191,12 +191,12 @@ describe('Shop orders', () => { }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.lines.length).toBe(1); - expect(addItemToOrder!.lines[0].quantity).toBe(1); - expect(addItemToOrder!.lines[0].productVariant.id).toBe('T_1'); - expect(addItemToOrder!.lines[0].id).toBe('T_1'); - firstOrderLineId = addItemToOrder!.lines[0].id; - orderCode = addItemToOrder!.code; + expect(addItemToOrder.lines.length).toBe(1); + expect(addItemToOrder.lines[0].quantity).toBe(1); + expect(addItemToOrder.lines[0].productVariant.id).toBe('T_1'); + expect(addItemToOrder.lines[0].id).toBe('T_1'); + firstOrderLineId = addItemToOrder.lines[0].id; + orderCode = addItemToOrder.code; }); it( @@ -210,7 +210,7 @@ describe('Shop orders', () => { productVariantId: 'T_999', quantity: 1, }), - `No ProductVariant with the id '999' could be found`, + "No ProductVariant with the id '999' could be found", ), ); @@ -224,7 +224,7 @@ describe('Shop orders', () => { }); orderResultGuard.assertErrorResult(addItemToOrder); - expect(addItemToOrder.message).toEqual(`The quantity for an OrderItem cannot be negative`); + expect(addItemToOrder.message).toEqual('The quantity for an OrderItem cannot be negative'); expect(addItemToOrder.errorCode).toEqual(ErrorCode.NEGATIVE_QUANTITY_ERROR); }); @@ -237,8 +237,8 @@ describe('Shop orders', () => { quantity: 2, }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.lines.length).toBe(1); - expect(addItemToOrder!.lines[0].quantity).toBe(3); + expect(addItemToOrder.lines.length).toBe(1); + expect(addItemToOrder.lines[0].quantity).toBe(3); }); describe('OrderLine customFields', () => { @@ -290,8 +290,8 @@ describe('Shop orders', () => { }, ); orderResultGuard.assertSuccess(add1); - expect(add1!.lines.length).toBe(2); - expect(add1!.lines[1].quantity).toBe(1); + expect(add1.lines.length).toBe(2); + expect(add1.lines[1].quantity).toBe(1); const { addItemToOrder: add2 } = await shopClient.query( ADD_ITEM_TO_ORDER_WITH_CUSTOM_FIELDS, @@ -304,14 +304,14 @@ describe('Shop orders', () => { }, ); orderResultGuard.assertSuccess(add2); - expect(add2!.lines.length).toBe(2); - expect(add2!.lines[1].quantity).toBe(2); + expect(add2.lines.length).toBe(2); + expect(add2.lines[1].quantity).toBe(2); await shopClient.query< CodegenShop.RemoveItemFromOrderMutation, CodegenShop.RemoveItemFromOrderMutationVariables >(REMOVE_ITEM_FROM_ORDER, { - orderLineId: add2!.lines[1].id, + orderLineId: add2.lines[1].id, }); }); @@ -327,8 +327,8 @@ describe('Shop orders', () => { }, ); orderResultGuard.assertSuccess(add1); - expect(add1!.lines.length).toBe(2); - expect(add1!.lines[1].quantity).toBe(1); + expect(add1.lines.length).toBe(2); + expect(add1.lines[1].quantity).toBe(1); const { addItemToOrder: add2 } = await shopClient.query( ADD_ITEM_TO_ORDER_WITH_CUSTOM_FIELDS, @@ -341,21 +341,21 @@ describe('Shop orders', () => { }, ); orderResultGuard.assertSuccess(add2); - expect(add2!.lines.length).toBe(3); - expect(add2!.lines[1].quantity).toBe(1); - expect(add2!.lines[2].quantity).toBe(1); + expect(add2.lines.length).toBe(3); + expect(add2.lines[1].quantity).toBe(1); + expect(add2.lines[2].quantity).toBe(1); await shopClient.query< CodegenShop.RemoveItemFromOrderMutation, CodegenShop.RemoveItemFromOrderMutationVariables >(REMOVE_ITEM_FROM_ORDER, { - orderLineId: add2!.lines[1].id, + orderLineId: add2.lines[1].id, }); await shopClient.query< CodegenShop.RemoveItemFromOrderMutation, CodegenShop.RemoveItemFromOrderMutationVariables >(REMOVE_ITEM_FROM_ORDER, { - orderLineId: add2!.lines[2].id, + orderLineId: add2.lines[2].id, }); }); @@ -369,8 +369,8 @@ describe('Shop orders', () => { }, ); orderResultGuard.assertSuccess(add1); - expect(add1!.lines.length).toBe(2); - expect(add1!.lines[1].quantity).toBe(1); + expect(add1.lines.length).toBe(2); + expect(add1.lines[1].quantity).toBe(1); const { adjustOrderLine } = await shopClient.query(ADJUST_ORDER_LINE_WITH_CUSTOM_FIELDS, { orderLineId: add1.lines[1].id, @@ -400,9 +400,9 @@ describe('Shop orders', () => { }, ); orderResultGuard.assertSuccess(add2); - expect(add2!.lines.length).toBe(3); - expect(add2!.lines[1].quantity).toBe(1); - expect(add2!.lines[2].quantity).toBe(1); + expect(add2.lines.length).toBe(3); + expect(add2.lines[1].quantity).toBe(1); + expect(add2.lines[2].quantity).toBe(1); const { activeOrder } = await shopClient.query(GET_ORDER_WITH_ORDER_LINE_CUSTOM_FIELDS); expect(activeOrder.lines.find((l: any) => l.id === updatedNotesLineId)?.customFields).toEqual( @@ -418,13 +418,13 @@ describe('Shop orders', () => { CodegenShop.RemoveItemFromOrderMutation, CodegenShop.RemoveItemFromOrderMutationVariables >(REMOVE_ITEM_FROM_ORDER, { - orderLineId: add2!.lines[1].id, + orderLineId: add2.lines[1].id, }); const { removeOrderLine } = await shopClient.query< CodegenShop.RemoveItemFromOrderMutation, CodegenShop.RemoveItemFromOrderMutationVariables >(REMOVE_ITEM_FROM_ORDER, { - orderLineId: add2!.lines[2].id, + orderLineId: add2.lines[2].id, }); orderResultGuard.assertSuccess(removeOrderLine); expect(removeOrderLine.lines.length).toBe(1); @@ -443,8 +443,8 @@ describe('Shop orders', () => { ); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.lines.length).toBe(2); - expect(addItemToOrder!.lines[1].quantity).toBe(1); + expect(addItemToOrder.lines.length).toBe(2); + expect(addItemToOrder.lines[1].quantity).toBe(1); const { activeOrder } = await shopClient.query(GET_ORDER_WITH_ORDER_LINE_CUSTOM_FIELDS); @@ -464,8 +464,8 @@ describe('Shop orders', () => { ); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.lines.length).toBe(2); - expect(addItemToOrder!.lines[1].quantity).toBe(2); + expect(addItemToOrder.lines.length).toBe(2); + expect(addItemToOrder.lines[1].quantity).toBe(2); const { activeOrder } = await shopClient.query(GET_ORDER_WITH_ORDER_LINE_CUSTOM_FIELDS); @@ -485,8 +485,8 @@ describe('Shop orders', () => { ); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.lines.length).toBe(3); - expect(addItemToOrder!.lines[2].quantity).toBe(1); + expect(addItemToOrder.lines.length).toBe(3); + expect(addItemToOrder.lines[2].quantity).toBe(1); const { activeOrder } = await shopClient.query(GET_ORDER_WITH_ORDER_LINE_CUSTOM_FIELDS); @@ -509,13 +509,13 @@ describe('Shop orders', () => { CodegenShop.RemoveItemFromOrderMutation, CodegenShop.RemoveItemFromOrderMutationVariables >(REMOVE_ITEM_FROM_ORDER, { - orderLineId: activeOrder!.lines[2].id, + orderLineId: activeOrder.lines[2].id, }); const { removeOrderLine } = await shopClient.query< CodegenShop.RemoveItemFromOrderMutation, CodegenShop.RemoveItemFromOrderMutationVariables >(REMOVE_ITEM_FROM_ORDER, { - orderLineId: activeOrder!.lines[1].id, + orderLineId: activeOrder.lines[1].id, }); orderResultGuard.assertSuccess(removeOrderLine); expect(removeOrderLine.lines.length).toBe(1); @@ -534,8 +534,8 @@ describe('Shop orders', () => { ); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.lines.length).toBe(2); - expect(addItemToOrder!.lines[1].quantity).toBe(1); + expect(addItemToOrder.lines.length).toBe(2); + expect(addItemToOrder.lines[1].quantity).toBe(1); const { activeOrder } = await shopClient.query(GET_ORDER_WITH_ORDER_LINE_CUSTOM_FIELDS); expect(activeOrder.lines[1].customFields.lineImages.length).toBe(2); @@ -556,8 +556,8 @@ describe('Shop orders', () => { ); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.lines.length).toBe(2); - expect(addItemToOrder!.lines[1].quantity).toBe(2); + expect(addItemToOrder.lines.length).toBe(2); + expect(addItemToOrder.lines[1].quantity).toBe(2); const { activeOrder } = await shopClient.query(GET_ORDER_WITH_ORDER_LINE_CUSTOM_FIELDS); @@ -579,8 +579,8 @@ describe('Shop orders', () => { ); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.lines.length).toBe(3); - expect(addItemToOrder!.lines[2].quantity).toBe(1); + expect(addItemToOrder.lines.length).toBe(3); + expect(addItemToOrder.lines[2].quantity).toBe(1); const { activeOrder } = await shopClient.query(GET_ORDER_WITH_ORDER_LINE_CUSTOM_FIELDS); @@ -590,13 +590,13 @@ describe('Shop orders', () => { CodegenShop.RemoveItemFromOrderMutation, CodegenShop.RemoveItemFromOrderMutationVariables >(REMOVE_ITEM_FROM_ORDER, { - orderLineId: activeOrder!.lines[2].id, + orderLineId: activeOrder.lines[2].id, }); const { removeOrderLine } = await shopClient.query< CodegenShop.RemoveItemFromOrderMutation, CodegenShop.RemoveItemFromOrderMutationVariables >(REMOVE_ITEM_FROM_ORDER, { - orderLineId: activeOrder!.lines[1].id, + orderLineId: activeOrder.lines[1].id, }); orderResultGuard.assertSuccess(removeOrderLine); expect(removeOrderLine.lines.length).toBe(1); @@ -628,8 +628,8 @@ describe('Shop orders', () => { quantity: 50, }); orderResultGuard.assertSuccess(adjustOrderLine); - expect(adjustOrderLine!.lines.length).toBe(1); - expect(adjustOrderLine!.lines[0].quantity).toBe(50); + expect(adjustOrderLine.lines.length).toBe(1); + expect(adjustOrderLine.lines[0].quantity).toBe(50); }); it('adjustOrderLine with quantity 0 removes the line', async () => { @@ -641,19 +641,19 @@ describe('Shop orders', () => { quantity: 3, }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.lines.length).toBe(2); - expect(addItemToOrder!.lines.map(i => i.productVariant.id)).toEqual(['T_1', 'T_3']); + expect(addItemToOrder.lines.length).toBe(2); + expect(addItemToOrder.lines.map(i => i.productVariant.id)).toEqual(['T_1', 'T_3']); const { adjustOrderLine } = await shopClient.query< CodegenShop.AdjustItemQuantityMutation, CodegenShop.AdjustItemQuantityMutationVariables >(ADJUST_ITEM_QUANTITY, { - orderLineId: addItemToOrder?.lines[1].id!, + orderLineId: addItemToOrder?.lines[1].id, quantity: 0, }); orderResultGuard.assertSuccess(adjustOrderLine); - expect(adjustOrderLine!.lines.length).toBe(1); - expect(adjustOrderLine!.lines.map(i => i.productVariant.id)).toEqual(['T_1']); + expect(adjustOrderLine.lines.length).toBe(1); + expect(adjustOrderLine.lines.map(i => i.productVariant.id)).toEqual(['T_1']); }); it('adjustOrderLine with quantity > stockOnHand only allows user to have stock on hand', async () => { @@ -669,13 +669,13 @@ describe('Shop orders', () => { expect(addItemToOrder.errorCode).toBe('INSUFFICIENT_STOCK_ERROR'); // But it should still add the item to the order - expect(addItemToOrder!.order.lines[1].quantity).toBe(100); + expect(addItemToOrder.order.lines[1].quantity).toBe(100); const { adjustOrderLine } = await shopClient.query< CodegenShop.AdjustItemQuantityMutation, CodegenShop.AdjustItemQuantityMutationVariables >(ADJUST_ITEM_QUANTITY, { - orderLineId: addItemToOrder!.order.lines[1].id, + orderLineId: addItemToOrder.order.lines[1].id, quantity: 101, }); orderResultGuard.assertErrorResult(adjustOrderLine); @@ -691,12 +691,12 @@ describe('Shop orders', () => { CodegenShop.AdjustItemQuantityMutation, CodegenShop.AdjustItemQuantityMutationVariables >(ADJUST_ITEM_QUANTITY, { - orderLineId: addItemToOrder!.order.lines[1].id, + orderLineId: addItemToOrder.order.lines[1].id, quantity: 0, }); orderResultGuard.assertSuccess(adjustLine2); - expect(adjustLine2!.lines.length).toBe(1); - expect(adjustLine2!.lines.map(i => i.productVariant.id)).toEqual(['T_1']); + expect(adjustLine2.lines.length).toBe(1); + expect(adjustLine2.lines.map(i => i.productVariant.id)).toEqual(['T_1']); }); it('adjustOrderLine errors when going beyond orderItemsLimit', async () => { @@ -738,7 +738,7 @@ describe('Shop orders', () => { orderLineId: 'T_999', quantity: 5, }), - `This order does not contain an OrderLine with the id 999`, + 'This order does not contain an OrderLine with the id 999', ), ); @@ -751,8 +751,8 @@ describe('Shop orders', () => { quantity: 3, }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.lines.length).toBe(2); - expect(addItemToOrder!.lines.map(i => i.productVariant.id)).toEqual(['T_1', 'T_3']); + expect(addItemToOrder.lines.length).toBe(2); + expect(addItemToOrder.lines.map(i => i.productVariant.id)).toEqual(['T_1', 'T_3']); const { removeOrderLine } = await shopClient.query< CodegenShop.RemoveItemFromOrderMutation, @@ -761,8 +761,8 @@ describe('Shop orders', () => { orderLineId: firstOrderLineId, }); orderResultGuard.assertSuccess(removeOrderLine); - expect(removeOrderLine!.lines.length).toBe(1); - expect(removeOrderLine!.lines.map(i => i.productVariant.id)).toEqual(['T_3']); + expect(removeOrderLine.lines.length).toBe(1); + expect(removeOrderLine.lines.map(i => i.productVariant.id)).toEqual(['T_3']); }); it( @@ -775,7 +775,7 @@ describe('Shop orders', () => { >(REMOVE_ITEM_FROM_ORDER, { orderLineId: 'T_999', }), - `This order does not contain an OrderLine with the id 999`, + 'This order does not contain an OrderLine with the id 999', ), ); @@ -793,7 +793,7 @@ describe('Shop orders', () => { orderResultGuard.assertErrorResult(transitionOrderToState); expect(transitionOrderToState!.message).toBe( - `Cannot transition Order from "AddingItems" to "Completed"`, + 'Cannot transition Order from "AddingItems" to "Completed"', ); expect(transitionOrderToState!.errorCode).toBe(ErrorCode.ORDER_STATE_TRANSITION_ERROR); }); @@ -806,7 +806,7 @@ describe('Shop orders', () => { orderResultGuard.assertErrorResult(transitionOrderToState); expect(transitionOrderToState!.transitionError).toBe( - `Cannot transition Order to the "ArrangingPayment" state without Customer details`, + 'Cannot transition Order to the "ArrangingPayment" state without Customer details', ); expect(transitionOrderToState!.errorCode).toBe(ErrorCode.ORDER_STATE_TRANSITION_ERROR); }); @@ -826,8 +826,8 @@ describe('Shop orders', () => { }); orderResultGuard.assertErrorResult(setCustomerForOrder); - expect(setCustomerForOrder!.message).toBe('The email address is not available.'); - expect(setCustomerForOrder!.errorCode).toBe(ErrorCode.EMAIL_ADDRESS_CONFLICT_ERROR); + expect(setCustomerForOrder.message).toBe('The email address is not available.'); + expect(setCustomerForOrder.errorCode).toBe(ErrorCode.EMAIL_ADDRESS_CONFLICT_ERROR); }); it('setCustomerForOrder creates a new Customer and associates it with the Order', async () => { @@ -843,7 +843,7 @@ describe('Shop orders', () => { }); orderResultGuard.assertSuccess(setCustomerForOrder); - const customer = setCustomerForOrder!.customer!; + const customer = setCustomerForOrder.customer!; expect(customer.firstName).toBe('Test'); expect(customer.lastName).toBe('Person'); expect(customer.emailAddress).toBe('test@test.com'); @@ -863,7 +863,7 @@ describe('Shop orders', () => { }); orderResultGuard.assertSuccess(setCustomerForOrder); - const customer = setCustomerForOrder!.customer!; + const customer = setCustomerForOrder.customer!; expect(customer.firstName).toBe('Changed'); expect(customer.lastName).toBe('Person'); expect(customer.emailAddress).toBe('test@test.com'); @@ -889,7 +889,7 @@ describe('Shop orders', () => { input: address, }); - expect(setOrderShippingAddress!.shippingAddress).toEqual({ + expect(setOrderShippingAddress.shippingAddress).toEqual({ fullName: 'name', company: 'company', streetLine1: '12 Shipping Street', @@ -921,7 +921,7 @@ describe('Shop orders', () => { input: address, }); - expect(setOrderBillingAddress!.billingAddress).toEqual({ + expect(setOrderBillingAddress.billingAddress).toEqual({ fullName: 'name', company: 'company', streetLine1: '22 Billing Avenue', @@ -952,7 +952,7 @@ describe('Shop orders', () => { orderResultGuard.assertErrorResult(transitionOrderToState); expect(transitionOrderToState!.transitionError).toBe( - `Cannot transition Order to the "ArrangingPayment" state without a ShippingMethod`, + 'Cannot transition Order to the "ArrangingPayment" state without a ShippingMethod', ); expect(transitionOrderToState!.errorCode).toBe(ErrorCode.ORDER_STATE_TRANSITION_ERROR); }); @@ -994,10 +994,10 @@ describe('Shop orders', () => { }); orderResultGuard.assertSuccess(addPaymentToOrder); - const payment = addPaymentToOrder!.payments![0]; - expect(addPaymentToOrder!.state).toBe('PaymentSettled'); - expect(addPaymentToOrder!.active).toBe(false); - expect(addPaymentToOrder!.payments!.length).toBe(1); + const payment = addPaymentToOrder.payments![0]; + expect(addPaymentToOrder.state).toBe('PaymentSettled'); + expect(addPaymentToOrder.active).toBe(false); + expect(addPaymentToOrder.payments!.length).toBe(1); expect(payment.method).toBe(testSuccessfulPaymentMethod.code); expect(payment.state).toBe('Settled'); }); @@ -1016,14 +1016,14 @@ describe('Shop orders', () => { id: createdCustomerId, }); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const shippingAddress = result.customer!.addresses!.find(a => a.defaultShippingAddress)!; expect(shippingAddress.streetLine1).toBe('12 Shipping Street'); expect(shippingAddress.postalCode).toBe('123456'); expect(shippingAddress.defaultBillingAddress).toBe(false); expect(shippingAddress.defaultShippingAddress).toBe(true); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const billingAddress = result.customer!.addresses!.find(a => a.defaultBillingAddress)!; expect(billingAddress.streetLine1).toBe('22 Billing Avenue'); expect(billingAddress.postalCode).toBe('123456'); @@ -1068,11 +1068,11 @@ describe('Shop orders', () => { quantity: 1, }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.lines.length).toBe(1); - expect(addItemToOrder!.lines[0].quantity).toBe(1); - expect(addItemToOrder!.lines[0].productVariant.id).toBe('T_1'); + expect(addItemToOrder.lines.length).toBe(1); + expect(addItemToOrder.lines[0].quantity).toBe(1); + expect(addItemToOrder.lines[0].productVariant.id).toBe('T_1'); activeOrder = addItemToOrder!; - firstOrderLineId = addItemToOrder!.lines[0].id; + firstOrderLineId = addItemToOrder.lines[0].id; }); it('activeOrder returns order after item has been added', async () => { @@ -1098,8 +1098,8 @@ describe('Shop orders', () => { quantity: 2, }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.lines.length).toBe(1); - expect(addItemToOrder!.lines[0].quantity).toBe(3); + expect(addItemToOrder.lines.length).toBe(1); + expect(addItemToOrder.lines[0].quantity).toBe(3); }); it('adjustOrderLine adjusts the quantity', async () => { @@ -1111,8 +1111,8 @@ describe('Shop orders', () => { quantity: 50, }); orderResultGuard.assertSuccess(adjustOrderLine); - expect(adjustOrderLine!.lines.length).toBe(1); - expect(adjustOrderLine!.lines[0].quantity).toBe(50); + expect(adjustOrderLine.lines.length).toBe(1); + expect(adjustOrderLine.lines[0].quantity).toBe(50); }); it('removeItemFromOrder removes the correct item', async () => { @@ -1124,8 +1124,8 @@ describe('Shop orders', () => { quantity: 3, }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.lines.length).toBe(2); - expect(addItemToOrder!.lines.map(i => i.productVariant.id)).toEqual(['T_1', 'T_3']); + expect(addItemToOrder.lines.length).toBe(2); + expect(addItemToOrder.lines.map(i => i.productVariant.id)).toEqual(['T_1', 'T_3']); const { removeOrderLine } = await shopClient.query< CodegenShop.RemoveItemFromOrderMutation, @@ -1134,8 +1134,8 @@ describe('Shop orders', () => { orderLineId: firstOrderLineId, }); orderResultGuard.assertSuccess(removeOrderLine); - expect(removeOrderLine!.lines.length).toBe(1); - expect(removeOrderLine!.lines.map(i => i.productVariant.id)).toEqual(['T_3']); + expect(removeOrderLine.lines.length).toBe(1); + expect(removeOrderLine.lines.map(i => i.productVariant.id)).toEqual(['T_3']); }); it('nextOrderStates returns next valid states', async () => { @@ -1167,10 +1167,10 @@ describe('Shop orders', () => { }); orderResultGuard.assertErrorResult(setCustomerForOrder); - expect(setCustomerForOrder!.message).toBe( + expect(setCustomerForOrder.message).toBe( 'Cannot set a Customer for the Order when already logged in', ); - expect(setCustomerForOrder!.errorCode).toBe(ErrorCode.ALREADY_LOGGED_IN_ERROR); + expect(setCustomerForOrder.errorCode).toBe(ErrorCode.ALREADY_LOGGED_IN_ERROR); }); describe('shipping', () => { @@ -1190,7 +1190,7 @@ describe('Shop orders', () => { >(SET_SHIPPING_ADDRESS, { input: address, }); - }, `The countryCode "INVALID" was not recognized`), + }, 'The countryCode "INVALID" was not recognized'), ); it('setOrderShippingAddress sets shipping address', async () => { @@ -1212,7 +1212,7 @@ describe('Shop orders', () => { input: address, }); - expect(setOrderShippingAddress!.shippingAddress).toEqual({ + expect(setOrderShippingAddress.shippingAddress).toEqual({ fullName: 'name', company: 'company', streetLine1: '12 the street', @@ -1272,8 +1272,8 @@ describe('Shop orders', () => { const order = activeOrderResult.activeOrder!; expect(order.shipping).toBe(shippingMethods[1].price); - expect(order.shippingLines[0].shippingMethod!.id).toBe(shippingMethods[1].id); - expect(order.shippingLines[0].shippingMethod!.description).toBe( + expect(order.shippingLines[0].shippingMethod.id).toBe(shippingMethods[1].id); + expect(order.shippingLines[0].shippingMethod.description).toBe( shippingMethods[1].description, ); }); @@ -1291,9 +1291,9 @@ describe('Shop orders', () => { quantity: 10, }); orderResultGuard.assertSuccess(adjustOrderLine); - expect(adjustOrderLine!.shipping).toBe(shippingMethods[1].price); - expect(adjustOrderLine!.shippingLines[0].shippingMethod!.id).toBe(shippingMethods[1].id); - expect(adjustOrderLine!.shippingLines[0].shippingMethod!.description).toBe( + expect(adjustOrderLine.shipping).toBe(shippingMethods[1].price); + expect(adjustOrderLine.shippingLines[0].shippingMethod.id).toBe(shippingMethods[1].id); + expect(adjustOrderLine.shippingLines[0].shippingMethod.description).toBe( shippingMethods[1].description, ); }); @@ -1312,10 +1312,10 @@ describe('Shop orders', () => { }); orderResultGuard.assertErrorResult(addPaymentToOrder); - expect(addPaymentToOrder!.message).toBe( - `A Payment may only be added when Order is in "ArrangingPayment" state`, + expect(addPaymentToOrder.message).toBe( + 'A Payment may only be added when Order is in "ArrangingPayment" state', ); - expect(addPaymentToOrder!.errorCode).toBe(ErrorCode.ORDER_PAYMENT_STATE_ERROR); + expect(addPaymentToOrder.errorCode).toBe(ErrorCode.ORDER_PAYMENT_STATE_ERROR); }); it('transitions to the ArrangingPayment state', async () => { @@ -1342,7 +1342,7 @@ describe('Shop orders', () => { orderResultGuard.assertErrorResult(addItemToOrder); expect(addItemToOrder.message).toBe( - `Order contents may only be modified when in the "AddingItems" state`, + 'Order contents may only be modified when in the "AddingItems" state', ); expect(addItemToOrder.errorCode).toBe(ErrorCode.ORDER_MODIFICATION_ERROR); }); @@ -1357,7 +1357,7 @@ describe('Shop orders', () => { }); orderResultGuard.assertErrorResult(adjustOrderLine); expect(adjustOrderLine.message).toBe( - `Order contents may only be modified when in the "AddingItems" state`, + 'Order contents may only be modified when in the "AddingItems" state', ); expect(adjustOrderLine.errorCode).toBe(ErrorCode.ORDER_MODIFICATION_ERROR); }); @@ -1371,7 +1371,7 @@ describe('Shop orders', () => { }); orderResultGuard.assertErrorResult(removeOrderLine); expect(removeOrderLine.message).toBe( - `Order contents may only be modified when in the "AddingItems" state`, + 'Order contents may only be modified when in the "AddingItems" state', ); expect(removeOrderLine.errorCode).toBe(ErrorCode.ORDER_MODIFICATION_ERROR); }); @@ -1381,7 +1381,7 @@ describe('Shop orders', () => { await shopClient.query(REMOVE_ALL_ORDER_LINES); orderResultGuard.assertErrorResult(removeAllOrderLines); expect(removeAllOrderLines.message).toBe( - `Order contents may only be modified when in the "AddingItems" state`, + 'Order contents may only be modified when in the "AddingItems" state', ); expect(removeAllOrderLines.errorCode).toBe(ErrorCode.ORDER_MODIFICATION_ERROR); }); @@ -1399,7 +1399,7 @@ describe('Shop orders', () => { }); orderResultGuard.assertErrorResult(setOrderShippingMethod); expect(setOrderShippingMethod.message).toBe( - `Order contents may only be modified when in the "AddingItems" state`, + 'Order contents may only be modified when in the "AddingItems" state', ); expect(setOrderShippingMethod.errorCode).toBe(ErrorCode.ORDER_MODIFICATION_ERROR); }); @@ -1418,8 +1418,8 @@ describe('Shop orders', () => { }); orderResultGuard.assertErrorResult(addPaymentToOrder); - expect(addPaymentToOrder!.message).toBe('The payment was declined'); - expect(addPaymentToOrder!.errorCode).toBe(ErrorCode.PAYMENT_DECLINED_ERROR); + expect(addPaymentToOrder.message).toBe('The payment was declined'); + expect(addPaymentToOrder.errorCode).toBe(ErrorCode.PAYMENT_DECLINED_ERROR); expect((addPaymentToOrder as any).paymentErrorMessage).toBe('Insufficient funds'); const { activeOrder: order } = @@ -1451,8 +1451,8 @@ describe('Shop orders', () => { }); orderResultGuard.assertErrorResult(addPaymentToOrder); - expect(addPaymentToOrder!.message).toBe('The payment failed'); - expect(addPaymentToOrder!.errorCode).toBe(ErrorCode.PAYMENT_FAILED_ERROR); + expect(addPaymentToOrder.message).toBe('The payment failed'); + expect(addPaymentToOrder.errorCode).toBe(ErrorCode.PAYMENT_FAILED_ERROR); expect((addPaymentToOrder as any).paymentErrorMessage).toBe('Something went horribly wrong'); const result = await shopClient.query( @@ -1479,10 +1479,10 @@ describe('Shop orders', () => { }); orderResultGuard.assertSuccess(addPaymentToOrder); - const payment = addPaymentToOrder!.payments!.find(p => p.transactionId === '12345')!; - expect(addPaymentToOrder!.state).toBe('PaymentSettled'); - expect(addPaymentToOrder!.active).toBe(false); - expect(addPaymentToOrder!.payments!.length).toBe(3); + const payment = addPaymentToOrder.payments!.find(p => p.transactionId === '12345')!; + expect(addPaymentToOrder.state).toBe('PaymentSettled'); + expect(addPaymentToOrder.active).toBe(false); + expect(addPaymentToOrder.payments!.length).toBe(3); expect(payment.method).toBe(testSuccessfulPaymentMethod.code); expect(payment.state).toBe('Settled'); expect(payment.transactionId).toBe('12345'); @@ -1526,7 +1526,7 @@ describe('Shop orders', () => { }); it( - `throws error for another user's Order`, + "throws error for another user's Order", assertThrowsWithMessage(async () => { authenticatedUserEmailAddress = customers[1].emailAddress; await shopClient.asUserWithCredentials(authenticatedUserEmailAddress, password); @@ -1536,7 +1536,7 @@ describe('Shop orders', () => { >(GET_ORDER_BY_CODE, { code: activeOrder.code, }); - }, `You are not currently authorized to perform this action`), + }, 'You are not currently authorized to perform this action'), ); }); @@ -1571,7 +1571,7 @@ describe('Shop orders', () => { >(GET_ORDER_BY_CODE, { code: activeOrder.code, }); - }, `You are not currently authorized to perform this action`), + }, 'You are not currently authorized to perform this action'), ); afterAll(() => { @@ -1600,8 +1600,8 @@ describe('Shop orders', () => { quantity: 1, }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.lines.length).toBe(1); - expect(addItemToOrder!.lines[0].productVariant.id).toBe('T_1'); + expect(addItemToOrder.lines.length).toBe(1); + expect(addItemToOrder.lines[0].productVariant.id).toBe('T_1'); await shopClient.query( ATTEMPT_LOGIN, @@ -1626,8 +1626,8 @@ describe('Shop orders', () => { quantity: 1, }); orderResultGuard.assertSuccess(addItemToOrder); - expect(addItemToOrder!.lines.length).toBe(1); - expect(addItemToOrder!.lines[0].productVariant.id).toBe('T_2'); + expect(addItemToOrder.lines.length).toBe(1); + expect(addItemToOrder.lines[0].productVariant.id).toBe('T_2'); await shopClient.query( ATTEMPT_LOGIN, @@ -1771,8 +1771,8 @@ describe('Shop orders', () => { }); orderResultGuard.assertErrorResult(setCustomerForOrder); - expect(setCustomerForOrder!.message).toBe('The email address is not available.'); - expect(setCustomerForOrder!.errorCode).toBe(ErrorCode.EMAIL_ADDRESS_CONFLICT_ERROR); + expect(setCustomerForOrder.message).toBe('The email address is not available.'); + expect(setCustomerForOrder.errorCode).toBe(ErrorCode.EMAIL_ADDRESS_CONFLICT_ERROR); const { customer } = await adminClient.query< Codegen.GetCustomerQuery, @@ -1937,7 +1937,7 @@ describe('Shop orders', () => { productVariantId: bonsaiVariantId, quantity: 1, }); - }, `No ProductVariant with the id '34' could be found`), + }, "No ProductVariant with the id '34' could be found"), ); it( @@ -1971,7 +1971,7 @@ describe('Shop orders', () => { productVariantId: bonsaiVariantId, quantity: 1, }); - }, `No ProductVariant with the id '34' could be found`), + }, "No ProductVariant with the id '34' could be found"), ); it( 'addItemToOrder errors when product is deleted', @@ -1990,7 +1990,7 @@ describe('Shop orders', () => { productVariantId: bonsaiVariantId, quantity: 1, }); - }, `No ProductVariant with the id '34' could be found`), + }, "No ProductVariant with the id '34' could be found"), ); it( 'addItemToOrder errors when product variant is deleted', @@ -2009,7 +2009,7 @@ describe('Shop orders', () => { productVariantId: bonsaiVariantId, quantity: 1, }); - }, `No ProductVariant with the id '34' could be found`), + }, "No ProductVariant with the id '34' could be found"), ); let orderWithDeletedProductVariantId: string; @@ -2045,7 +2045,7 @@ describe('Shop orders', () => { orderResultGuard.assertErrorResult(transitionOrderToState); expect(transitionOrderToState!.transitionError).toBe( - `Cannot transition to "ArrangingPayment" because the Order contains ProductVariants which are no longer available`, + 'Cannot transition to "ArrangingPayment" because the Order contains ProductVariants which are no longer available', ); expect(transitionOrderToState!.errorCode).toBe(ErrorCode.ORDER_STATE_TRANSITION_ERROR); }); @@ -2199,9 +2199,9 @@ describe('Shop orders', () => { CreateShippingMethod.Variables >(CREATE_SHIPPING_METHOD, { input: { - code: `min-price-shipping`, + code: 'min-price-shipping', translations: [ - { languageCode: LanguageCode.en, name: `min price shipping`, description: '' }, + { languageCode: LanguageCode.en, name: 'min price shipping', description: '' }, ], fulfillmentHandler: manualFulfillmentHandler.code, checker: { diff --git a/packages/core/e2e/stock-control-multi-location.e2e-spec.ts b/packages/core/e2e/stock-control-multi-location.e2e-spec.ts index 3093bea39b..f6a776d1da 100644 --- a/packages/core/e2e/stock-control-multi-location.e2e-spec.ts +++ b/packages/core/e2e/stock-control-multi-location.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { manualFulfillmentHandler, mergeConfig } from '@vendure/core'; import { createErrorResultGuard, createTestEnvironment, ErrorResultGuard } from '@vendure/testing'; import gql from 'graphql-tag'; diff --git a/packages/core/e2e/stock-control.e2e-spec.ts b/packages/core/e2e/stock-control.e2e-spec.ts index fd9a5465f6..c2b589466e 100644 --- a/packages/core/e2e/stock-control.e2e-spec.ts +++ b/packages/core/e2e/stock-control.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { pick } from '@vendure/common/lib/pick'; import { DefaultOrderPlacedStrategy, @@ -480,7 +480,7 @@ describe('Stock control', () => { it('creates Cancellations & adjusts stock when cancelling a Fulfillment', async () => { async function getTrackedVariant() { const result = await getProductWithStockMovement('T_2'); - return result?.variants[1]!; + return result!.variants[1]; } const trackedVariant1 = await getTrackedVariant(); @@ -582,7 +582,7 @@ describe('Stock control', () => { Codegen.CancelOrderMutationVariables >(CANCEL_ORDER, { input: { - orderId: order!.id, + orderId: order.id, reason: 'Not needed', }, }); @@ -682,7 +682,7 @@ describe('Stock control', () => { orderGuard.assertErrorResult(addItemToOrder); expect(addItemToOrder.errorCode).toBe(ErrorCode.INSUFFICIENT_STOCK_ERROR); - expect(addItemToOrder.message).toBe(`No items were added to the order due to insufficient stock`); + expect(addItemToOrder.message).toBe('No items were added to the order due to insufficient stock'); expect((addItemToOrder as any).quantityAvailable).toBe(0); expect((addItemToOrder as any).order.lines.length).toBe(0); }); @@ -701,7 +701,7 @@ describe('Stock control', () => { expect(addItemToOrder.errorCode).toBe(ErrorCode.INSUFFICIENT_STOCK_ERROR); expect(addItemToOrder.message).toBe( - `Only 3 items were added to the order due to insufficient stock`, + 'Only 3 items were added to the order due to insufficient stock', ); expect((addItemToOrder as any).quantityAvailable).toBe(3); // Still adds as many as available to the Order @@ -754,7 +754,7 @@ describe('Stock control', () => { expect(addItemToOrder.errorCode).toBe(ErrorCode.INSUFFICIENT_STOCK_ERROR); expect(addItemToOrder.message).toBe( - `Only 1 item was added to the order due to insufficient stock`, + 'Only 1 item was added to the order due to insufficient stock', ); expect((addItemToOrder as any).quantityAvailable).toBe(1); // Still adds as many as available to the Order @@ -861,7 +861,7 @@ describe('Stock control', () => { expect(addFulfillmentToOrder.errorCode).toBe(AdminErrorCode.INSUFFICIENT_STOCK_ON_HAND_ERROR); expect(addFulfillmentToOrder.message).toBe( - `Cannot create a Fulfillment as 'Laptop 15 inch 16GB' has insufficient stockOnHand (3)`, + "Cannot create a Fulfillment as 'Laptop 15 inch 16GB' has insufficient stockOnHand (3)", ); }); @@ -1105,7 +1105,7 @@ describe('Stock control', () => { expect(addItemToOrder.errorCode).toBe(ErrorCode.INSUFFICIENT_STOCK_ERROR); expect(addItemToOrder.message).toBe( - `No items were added to the order due to insufficient stock`, + 'No items were added to the order due to insufficient stock', ); }); @@ -1134,7 +1134,7 @@ describe('Stock control', () => { expect(addItemToOrder.errorCode).toBe(ErrorCode.INSUFFICIENT_STOCK_ERROR); expect(addItemToOrder.message).toBe( - `No items were added to the order due to insufficient stock`, + 'No items were added to the order due to insufficient stock', ); }); @@ -1162,7 +1162,7 @@ describe('Stock control', () => { orderGuard.assertErrorResult(add2); expect(add2.errorCode).toBe(ErrorCode.INSUFFICIENT_STOCK_ERROR); - expect(add2.message).toBe(`No items were added to the order due to insufficient stock`); + expect(add2.message).toBe('No items were added to the order due to insufficient stock'); expect((add2 as any).quantityAvailable).toBe(0); // Still adds as many as available to the Order expect((add2 as any).order.lines[0].productVariant.id).toBe(variant6Id); diff --git a/packages/core/e2e/tax-category.e2e-spec.ts b/packages/core/e2e/tax-category.e2e-spec.ts index 4e21a9cf90..fe6e870c8a 100644 --- a/packages/core/e2e/tax-category.e2e-spec.ts +++ b/packages/core/e2e/tax-category.e2e-spec.ts @@ -155,7 +155,7 @@ describe('TaxCategory resolver', () => { expect(deleteTaxCategory.result).toBe(DeletionResult.NOT_DELETED); expect(deleteTaxCategory.message).toBe( - `Cannot remove TaxCategory "Reduced Tax" as it is referenced by 5 TaxRates`, + 'Cannot remove TaxCategory "Reduced Tax" as it is referenced by 5 TaxRates', ); }); diff --git a/packages/core/e2e/tax-rate.e2e-spec.ts b/packages/core/e2e/tax-rate.e2e-spec.ts index 8545d9989a..e159aaac22 100644 --- a/packages/core/e2e/tax-rate.e2e-spec.ts +++ b/packages/core/e2e/tax-rate.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { pick } from '@vendure/common/lib/pick'; import { createTestEnvironment } from '@vendure/testing'; import gql from 'graphql-tag'; diff --git a/packages/core/e2e/utils/fix-pg-timezone.ts b/packages/core/e2e/utils/fix-pg-timezone.ts index c29491f5b7..03324ef93c 100644 --- a/packages/core/e2e/utils/fix-pg-timezone.ts +++ b/packages/core/e2e/utils/fix-pg-timezone.ts @@ -3,7 +3,7 @@ */ export function fixPostgresTimezone() { if (process.env.DB === 'postgres') { - // tslint:disable-next-line:no-var-requires + // eslint-disable-next-line @typescript-eslint/no-var-requires const pg = require('pg'); pg.types.setTypeParser(1114, (stringValue: string) => new Date(`${stringValue}+0000`)); } diff --git a/packages/core/e2e/utils/test-order-utils.ts b/packages/core/e2e/utils/test-order-utils.ts index 09f3d53250..9895830910 100644 --- a/packages/core/e2e/utils/test-order-utils.ts +++ b/packages/core/e2e/utils/test-order-utils.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { ID } from '@vendure/common/lib/shared-types'; import { PaymentMethodHandler } from '@vendure/core'; import { SimpleGraphQLClient } from '@vendure/testing'; @@ -62,7 +62,7 @@ export async function addPaymentToOrder( }, }, }); - const order = result.addPaymentToOrder!; + const order = result.addPaymentToOrder; return order as any; } diff --git a/packages/core/e2e/zone.e2e-spec.ts b/packages/core/e2e/zone.e2e-spec.ts index c1fdd96b34..13bb52e2be 100644 --- a/packages/core/e2e/zone.e2e-spec.ts +++ b/packages/core/e2e/zone.e2e-spec.ts @@ -11,7 +11,7 @@ import * as Codegen from './graphql/generated-e2e-admin-types'; import { DeletionResult } from './graphql/generated-e2e-admin-types'; import { GET_COUNTRY_LIST, UPDATE_CHANNEL } from './graphql/shared-definitions'; -// tslint:disable:no-non-null-assertion +/* eslint-disable @typescript-eslint/no-non-null-assertion */ describe('Zone resolver', () => { const { server, adminClient } = createTestEnvironment(testConfig()); diff --git a/packages/core/package.json b/packages/core/package.json index 9ab303f823..3fc19e565a 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -23,7 +23,7 @@ "gulp:watch": "gulp -f ./build/gulpfile.ts watch", "build": "rimraf dist && tsc -p ./build/tsconfig.build.json && tsc -p ./build/tsconfig.cli.json && gulp -f ./build/gulpfile.ts build", "watch": "concurrently yarn:tsc:watch yarn:gulp:watch", - "lint": "tslint --fix --project ./", + "lint": "eslint --fix .", "test": "vitest --config ./vitest.config.ts --run", "e2e": "cross-env PACKAGE=core vitest --config ../../e2e-common/vitest.config.ts --run", "e2e:watch": "cross-env PACKAGE=core vitest --config ../../e2e-common/vitest.config.ts", diff --git a/packages/core/src/api/common/custom-field-relation-resolver.service.ts b/packages/core/src/api/common/custom-field-relation-resolver.service.ts index 5ba1e0f88c..27ebba13ec 100644 --- a/packages/core/src/api/common/custom-field-relation-resolver.service.ts +++ b/packages/core/src/api/common/custom-field-relation-resolver.service.ts @@ -50,7 +50,7 @@ export class CustomFieldRelationResolverService { .createQueryBuilder('relation') .where(`relation.id IN (${subQb.getQuery()})`) .setParameters({ id: entityId }); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion FindOptionsUtils.joinEagerRelations(qb, qb.alias, qb.expressionMap.mainAlias!.metadata); const result = fieldDef.list ? await qb.getMany() : await qb.getOne(); diff --git a/packages/core/src/api/common/id-codec.spec.ts b/packages/core/src/api/common/id-codec.spec.ts index 8b0da16d60..fb5f2d7c65 100644 --- a/packages/core/src/api/common/id-codec.spec.ts +++ b/packages/core/src/api/common/id-codec.spec.ts @@ -61,7 +61,7 @@ describe('IdCodecService', () => { }); it('does not clone complex object instances', () => { - // tslint:disable:no-floating-promises + /* eslint-disable @typescript-eslint/no-floating-promises */ const promise = new Promise(() => { /**/ }); @@ -76,7 +76,7 @@ describe('IdCodecService', () => { expect(result.promise).toBe(promise); expect(result.date).toBe(date); expect(result.regex).toBe(regex); - // tslint:enable:no-floating-promises + /* eslint-enable @typescript-eslint/no-floating-promises */ }); it('works with simple entity', () => { diff --git a/packages/core/src/api/common/request-context.spec.ts b/packages/core/src/api/common/request-context.spec.ts index 08148317d2..719dd63dbc 100644 --- a/packages/core/src/api/common/request-context.spec.ts +++ b/packages/core/src/api/common/request-context.spec.ts @@ -131,16 +131,12 @@ describe('RequestContext', () => { }); function createRequestContext(req?: any) { - let session: CachedSession; - let channel: Channel; - let activeOrder: Order; - let zone: Zone; - activeOrder = new Order({ + const activeOrder = new Order({ id: '55555', active: true, code: 'ADAWDJAWD', }); - session = { + const session = { cacheExpiry: Number.MAX_SAFE_INTEGER, expires: new Date(), id: '1234', @@ -152,12 +148,12 @@ describe('RequestContext', () => { verified: true, channelPermissions: [], }, - }; - zone = new Zone({ + } satisfies CachedSession; + const zone = new Zone({ id: '62626', name: 'Europe', }); - channel = new Channel({ + const channel = new Channel({ token: 'oiajwodij09au3r', id: '995859', code: '__default_channel__', diff --git a/packages/core/src/api/common/request-context.ts b/packages/core/src/api/common/request-context.ts index 726f386068..13ec5b0707 100644 --- a/packages/core/src/api/common/request-context.ts +++ b/packages/core/src/api/common/request-context.ts @@ -102,7 +102,7 @@ export class RequestContext { */ static deserialize(ctxObject: SerializedRequestContext): RequestContext { return new RequestContext({ - req: ctxObject._req as any, + req: ctxObject._req, apiType: ctxObject._apiType, channel: new Channel(ctxObject._channel), session: { @@ -227,7 +227,7 @@ export class RequestContext { try { return this._translationFn(key, variables); } catch (e: any) { - return `Translation format error: ${e.message}). Original key: ${key}`; + return `Translation format error: ${JSON.stringify(e.message)}). Original key: ${key}`; } } @@ -249,7 +249,7 @@ export class RequestContext { private shallowCloneRequestObject(req: Request) { function copySimpleFieldsToDepth(target: any, maxDepth: number, depth: number = 0) { const result: any = {}; - // tslint:disable-next-line:forin + // eslint-disable-next-line guard-for-in for (const key in target) { if (key === 'host' && depth === 0) { // avoid Express "deprecated: req.host" warning @@ -257,7 +257,7 @@ export class RequestContext { } let val: any; try { - val = (target as any)[key]; + val = target[key]; } catch (e: any) { val = String(e); } diff --git a/packages/core/src/api/common/validate-custom-field-value.spec.ts b/packages/core/src/api/common/validate-custom-field-value.spec.ts index 6afd983f4e..49a1a51be1 100644 --- a/packages/core/src/api/common/validate-custom-field-value.spec.ts +++ b/packages/core/src/api/common/validate-custom-field-value.spec.ts @@ -31,9 +31,9 @@ describe('validateCustomFieldValue()', () => { ); it('passes valid pattern', async () => { - expect(await validate('1')).not.toThrow(); - expect(await validate('123')).not.toThrow(); - expect(await validate('1foo')).not.toThrow(); + expect(validate('1')).not.toThrow(); + expect(validate('123')).not.toThrow(); + expect(validate('1foo')).not.toThrow(); }); it('throws on invalid pattern', async () => { @@ -56,8 +56,8 @@ describe('validateCustomFieldValue()', () => { ); it('passes valid option', async () => { - expect(await validate('small')).not.toThrow(); - expect(await validate('large')).not.toThrow(); + expect(validate('small')).not.toThrow(); + expect(validate('large')).not.toThrow(); }); it('throws on invalid option', async () => { @@ -81,9 +81,9 @@ describe('validateCustomFieldValue()', () => { ); it('passes valid range', async () => { - expect(await validate(5)).not.toThrow(); - expect(await validate(7)).not.toThrow(); - expect(await validate(10)).not.toThrow(); + expect(validate(5)).not.toThrow(); + expect(validate(7)).not.toThrow(); + expect(validate(10)).not.toThrow(); }); it('throws on invalid range', async () => { @@ -107,9 +107,9 @@ describe('validateCustomFieldValue()', () => { ); it('passes valid range', async () => { - expect(await validate('2019-01-01T08:30:00.000')).not.toThrow(); - expect(await validate('2019-06-01T08:30:00.000')).not.toThrow(); - expect(await validate('2019-04-12T14:15:51.200')).not.toThrow(); + expect(validate('2019-01-01T08:30:00.000')).not.toThrow(); + expect(validate('2019-06-01T08:30:00.000')).not.toThrow(); + expect(validate('2019-04-12T14:15:51.200')).not.toThrow(); }); it('throws on invalid range', async () => { @@ -159,11 +159,11 @@ describe('validateCustomFieldValue()', () => { ); it('passes validate fn string', async () => { - expect(await validate1('valid')).not.toThrow(); + expect(validate1('valid')).not.toThrow(); }); it('passes validate fn localized string', async () => { - expect(await validate2('valid', LanguageCode.de)).not.toThrow(); + expect(validate2('valid', LanguageCode.de)).not.toThrow(); }); it('fails validate fn string', async () => { @@ -194,7 +194,7 @@ describe('validateCustomFieldValue()', () => { injector, ); - expect(await validate([1, 2, 6])).not.toThrow(); + expect(validate([1, 2, 6])).not.toThrow(); await assertThrowsError(validate([1, 15, 3]), 'error.field-invalid-number-range-max'); }); @@ -211,7 +211,7 @@ describe('validateCustomFieldValue()', () => { injector, ); - expect(await validate(['small', 'large'])).not.toThrow(); + expect(validate(['small', 'large'])).not.toThrow(); await assertThrowsError(validate(['small', 'huge']), 'error.field-invalid-string-option'); }); @@ -232,7 +232,7 @@ describe('validateCustomFieldValue()', () => { injector, ); - expect(await validate(['valid', 'valid'])).not.toThrow(); + expect(validate(['valid', 'valid'])).not.toThrow(); await assertThrowsError(validate(['bad input', 'valid']), 'invalid'); }); }); diff --git a/packages/core/src/api/config/configure-graphql-module.ts b/packages/core/src/api/config/configure-graphql-module.ts index 45cd10c644..c568ff8010 100644 --- a/packages/core/src/api/config/configure-graphql-module.ts +++ b/packages/core/src/api/config/configure-graphql-module.ts @@ -43,7 +43,7 @@ export interface GraphQLApiOptions { apiPath: string; debug: boolean; playground: boolean | any; - // tslint:disable-next-line:ban-types + // eslint-disable-next-line @typescript-eslint/ban-types resolverModule: Function; validationRules: Array<(context: ValidationContext) => any>; } diff --git a/packages/core/src/api/config/generate-list-options.spec.ts b/packages/core/src/api/config/generate-list-options.spec.ts index 6e88431c2c..c98e7487c2 100644 --- a/packages/core/src/api/config/generate-list-options.spec.ts +++ b/packages/core/src/api/config/generate-list-options.spec.ts @@ -1,11 +1,13 @@ // Using require right now to force the commonjs version of GraphQL to be used // when running vitest tests. See https://github.com/vitejs/vite/issues/7879 -// tslint:disable-next-line:no-var-requires -const { buildSchema, printType } = require('graphql'); +// eslint-disable-next-line @typescript-eslint/no-var-requires import { describe, expect, it } from 'vitest'; import { generateListOptions } from './generate-list-options'; -// tslint:disable:no-non-null-assertion + +// eslint-disable-next-line @typescript-eslint/no-var-requires +const { buildSchema, printType } = require('graphql'); +/* eslint-disable @typescript-eslint/no-non-null-assertion */ describe('generateListOptions()', () => { const COMMON_TYPES = ` diff --git a/packages/core/src/api/config/generate-list-options.ts b/packages/core/src/api/config/generate-list-options.ts index 567735f8c4..ba977650c6 100644 --- a/packages/core/src/api/config/generate-list-options.ts +++ b/packages/core/src/api/config/generate-list-options.ts @@ -69,7 +69,8 @@ export function generateListOptions(typeDefsOrSchema: string | GraphQLSchema): G filterOperator: { type: logicalOperatorEnum as GraphQLEnumType, description: - 'Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND.', + 'Specifies whether multiple "filter" arguments should be combines ' + + 'with a logical AND or OR operation. Defaults to AND.', }, } : {}), @@ -224,7 +225,7 @@ function getCommonTypes(schema: GraphQLSchema) { !DateOperators || !IDOperators ) { - throw new Error(`A common type was not defined`); + throw new Error('A common type was not defined'); } return { SortOrder, diff --git a/packages/core/src/api/config/generate-resolvers.ts b/packages/core/src/api/config/generate-resolvers.ts index 5e969feec6..eb251f9a44 100644 --- a/packages/core/src/api/config/generate-resolvers.ts +++ b/packages/core/src/api/config/generate-resolvers.ts @@ -91,7 +91,7 @@ export async function generateResolvers( Money: GraphQLMoney, Node: dummyResolveType, PaginatedList: dummyResolveType, - Upload: (GraphQLUpload as any) || dummyResolveType, + Upload: GraphQLUpload || dummyResolveType, SearchResultPrice: { __resolveType(value: any) { return value.hasOwnProperty('value') ? 'SinglePrice' : 'PriceRange'; diff --git a/packages/core/src/api/config/graphql-custom-fields.ts b/packages/core/src/api/config/graphql-custom-fields.ts index 5840bac6b7..8731dcd09e 100644 --- a/packages/core/src/api/config/graphql-custom-fields.ts +++ b/packages/core/src/api/config/graphql-custom-fields.ts @@ -47,7 +47,9 @@ export function addGraphQLCustomFields( if (fieldDef.type === 'relation') { if (!schema.getType(fieldDef.graphQLType || fieldDef.entity.name)) { throw new Error( - `The GraphQL type "${fieldDef.graphQLType}" specified by the ${entityName}.${fieldDef.name} custom field does not exist`, + `The GraphQL type "${ + fieldDef?.graphQLType ?? '(unknown)' + }" specified by the ${entityName}.${fieldDef.name} custom field does not exist`, ); } } @@ -229,7 +231,7 @@ export function addServerConfigCustomFields( const customFieldTypeDefs = ` type CustomFields { ${Object.keys(customFieldConfig).reduce( - (output, name) => output + name + `: [CustomFieldConfig!]!\n`, + (output, name) => output + name + ': [CustomFieldConfig!]!\n', '', )} } @@ -335,7 +337,7 @@ export function addOrderLineCustomFieldsInput( name: 'OrderLineCustomFieldsInput', fields: publicCustomFields.reduce((fields, field) => { const name = getGraphQlInputName(field); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const primitiveType = schema.getType(getGraphQlInputType(field))!; const type = field.list === true ? new GraphQLList(primitiveType) : primitiveType; return { ...fields, [name]: { type } }; @@ -420,7 +422,7 @@ export function addShippingMethodQuoteCustomFields( shippingMethodCustomFields: CustomFieldConfig[], ) { const schema = typeof typeDefsOrSchema === 'string' ? buildSchema(typeDefsOrSchema) : typeDefsOrSchema; - let customFieldTypeDefs = ``; + let customFieldTypeDefs = ''; const publicCustomFields = shippingMethodCustomFields.filter(f => f.public !== false); if (0 < publicCustomFields.length) { customFieldTypeDefs = ` @@ -443,7 +445,7 @@ export function addPaymentMethodQuoteCustomFields( paymentMethodCustomFields: CustomFieldConfig[], ) { const schema = typeof typeDefsOrSchema === 'string' ? buildSchema(typeDefsOrSchema) : typeDefsOrSchema; - let customFieldTypeDefs = ``; + let customFieldTypeDefs = ''; const publicCustomFields = paymentMethodCustomFields.filter(f => f.public !== false); if (0 < publicCustomFields.length) { customFieldTypeDefs = ` @@ -505,7 +507,7 @@ function getFilterOperator(config: CustomFieldConfig): string | undefined { } function getGraphQlInputType(config: CustomFieldConfig): string { - return config.type === 'relation' ? `ID` : getGraphQlType(config); + return config.type === 'relation' ? 'ID' : getGraphQlType(config); } function wrapListType( diff --git a/packages/core/src/api/config/money-scalar.ts b/packages/core/src/api/config/money-scalar.ts index 2f776d2cac..5d39af4a24 100644 --- a/packages/core/src/api/config/money-scalar.ts +++ b/packages/core/src/api/config/money-scalar.ts @@ -2,7 +2,7 @@ import { GraphQLError, GraphQLScalarType, Kind, print } from 'graphql'; import { inspect } from 'graphql/jsutils/inspect'; export function isObjectLike(value: unknown): value is { [key: string]: unknown } { - // tslint:disable-next-line:triple-equals + // eslint-disable-next-line eqeqeq return typeof value == 'object' && value !== null; } @@ -31,7 +31,8 @@ function serializeObject(outputValue: unknown): unknown { export const GraphQLMoney = new GraphQLScalarType({ name: 'Money', description: - 'The `Money` scalar type represents monetary values and supports signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).', + 'The `Money` scalar type represents monetary values and supports signed double-precision ' + + 'fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).', serialize(outputValue) { const coercedValue = serializeObject(outputValue); diff --git a/packages/core/src/api/decorators/relations.decorator.ts b/packages/core/src/api/decorators/relations.decorator.ts index feb7678f94..aaebe350cc 100644 --- a/packages/core/src/api/decorators/relations.decorator.ts +++ b/packages/core/src/api/decorators/relations.decorator.ts @@ -8,7 +8,7 @@ import { CalculatedColumnDefinition, CALCULATED_PROPERTIES } from '../../common/ import { EntityRelationPaths, InternalServerError, TtlCache } from '../../common/index'; import { VendureEntity } from '../../entity/base/base.entity'; -// tslint:disable-next-line:no-var-requires +// eslint-disable-next-line @typescript-eslint/no-var-requires const graphqlFields = require('graphql-fields'); export type RelationPaths = Array>; @@ -135,12 +135,12 @@ export const Relations: (data: FieldsDecoratorConfig createParamDecorator>((data, ctx: ExecutionContext) => { const info = ctx.getArgByIndex(3); if (data == null) { - throw new InternalServerError(`The @Relations() decorator requires an entity type argument`); + throw new InternalServerError('The @Relations() decorator requires an entity type argument'); } if (!isGraphQLResolveInfo(info)) { return []; } - const cacheKey = info.fieldName + '__' + ctx.getArgByIndex(2).req.body.query; + const cacheKey = info.fieldName + '__' + (ctx.getArgByIndex(2).req.body.query as string); const cachedResult = cache.get(cacheKey); if (cachedResult) { return cachedResult; diff --git a/packages/core/src/api/decorators/request-context.decorator.ts b/packages/core/src/api/decorators/request-context.decorator.ts index 91c51d92ac..5763cebaff 100644 --- a/packages/core/src/api/decorators/request-context.decorator.ts +++ b/packages/core/src/api/decorators/request-context.decorator.ts @@ -20,13 +20,14 @@ import { REQUEST_CONTEXT_KEY, REQUEST_CONTEXT_MAP_KEY } from '../../common/const */ export const Ctx = createParamDecorator((data, ctx: ExecutionContext) => { const getContext = (req: any) => { + // eslint-disable-next-line @typescript-eslint/ban-types const map: Map | undefined = req[REQUEST_CONTEXT_MAP_KEY]; // If a map contains associated transactional context with this handler // we have to use it. It means that this handler was wrapped with @Transaction decorator. // Otherwise use default context. return map?.get(ctx.getHandler()) || req[REQUEST_CONTEXT_KEY]; - } + }; if (ctx.getType() === 'graphql') { // GraphQL request diff --git a/packages/core/src/api/middleware/transaction-interceptor.ts b/packages/core/src/api/middleware/transaction-interceptor.ts index 7ff02cb81c..841170c692 100644 --- a/packages/core/src/api/middleware/transaction-interceptor.ts +++ b/packages/core/src/api/middleware/transaction-interceptor.ts @@ -1,8 +1,8 @@ import { CallHandler, ExecutionContext, Injectable, NestInterceptor } from '@nestjs/common'; import { Reflector } from '@nestjs/core'; import { Observable, of } from 'rxjs'; -import { RequestContext } from '..'; +import { RequestContext } from '..'; import { REQUEST_CONTEXT_KEY, REQUEST_CONTEXT_MAP_KEY } from '../../common/constants'; import { TransactionWrapper } from '../../connection/transaction-wrapper'; import { TransactionalConnection } from '../../connection/transactional-connection'; @@ -31,18 +31,18 @@ export class TransactionInterceptor implements NestInterceptor { TRANSACTION_MODE_METADATA_KEY, context.getHandler(), ); - + return of( this.transactionWrapper.executeInTransaction( ctx, - (ctx) => { - this.registerTransactionalContext(ctx, context.getHandler(), req); + _ctx => { + this.registerTransactionalContext(_ctx, context.getHandler(), req); - return next.handle() + return next.handle(); }, transactionMode, this.connection.rawConnection, - ) + ), ); } else { return next.handle(); @@ -51,12 +51,14 @@ export class TransactionInterceptor implements NestInterceptor { /** * Registers transactional request context associated with execution handler function - * + * * @param ctx transactional request context * @param handler handler function from ExecutionContext * @param req Request object */ + // eslint-disable-next-line @typescript-eslint/ban-types registerTransactionalContext(ctx: RequestContext, handler: Function, req: any) { + // eslint-disable-next-line @typescript-eslint/ban-types const map: Map = req[REQUEST_CONTEXT_MAP_KEY] || new Map(); map.set(handler, ctx); diff --git a/packages/core/src/api/middleware/translate-errors-plugin.ts b/packages/core/src/api/middleware/translate-errors-plugin.ts index 670a5e3107..c4c22918d9 100644 --- a/packages/core/src/api/middleware/translate-errors-plugin.ts +++ b/packages/core/src/api/middleware/translate-errors-plugin.ts @@ -16,7 +16,7 @@ export class TranslateErrorsPlugin implements ApolloServerPlugin { const { errors, context } = requestContext; if (errors) { (requestContext.response as any).errors = errors.map(err => { - return this.i18nService.translateError(context.req, err as GraphQLError) as any; + return this.i18nService.translateError(context.req, err) as any; }); } }, diff --git a/packages/core/src/api/resolvers/admin/collection.resolver.ts b/packages/core/src/api/resolvers/admin/collection.resolver.ts index 84b28904ab..8f73bd2fa6 100644 --- a/packages/core/src/api/resolvers/admin/collection.resolver.ts +++ b/packages/core/src/api/resolvers/admin/collection.resolver.ts @@ -75,12 +75,12 @@ export class CollectionResolver { if (args.id) { collection = await this.collectionService.findOne(ctx, args.id, relations); if (args.slug && collection && collection.slug !== args.slug) { - throw new UserInputError(`error.collection-id-slug-mismatch`); + throw new UserInputError('error.collection-id-slug-mismatch'); } } else if (args.slug) { collection = await this.collectionService.findOneBySlug(ctx, args.slug, relations); } else { - throw new UserInputError(`error.collection-id-or-slug-must-be-provided`); + throw new UserInputError('error.collection-id-or-slug-must-be-provided'); } return collection; } diff --git a/packages/core/src/api/resolvers/admin/draft-order.resolver.ts b/packages/core/src/api/resolvers/admin/draft-order.resolver.ts index 8aec835ec0..2b3ffb843c 100644 --- a/packages/core/src/api/resolvers/admin/draft-order.resolver.ts +++ b/packages/core/src/api/resolvers/admin/draft-order.resolver.ts @@ -128,7 +128,7 @@ export class DraftOrderResolver { async setCustomerForDraftOrder( @Ctx() ctx: RequestContext, @Args() args: MutationSetCustomerForDraftOrderArgs, - ): Promise> { + ): Promise> { let customer: Customer; if (args.customerId) { const result = await this.customerService.findOne(ctx, args.customerId); @@ -146,7 +146,7 @@ export class DraftOrderResolver { customer = result; } else { throw new UserInputError( - `Either "customerId" or "input" must be supplied to setCustomerForDraftOrder`, + 'Either "customerId" or "input" must be supplied to setCustomerForDraftOrder', ); } diff --git a/packages/core/src/api/resolvers/admin/facet.resolver.ts b/packages/core/src/api/resolvers/admin/facet.resolver.ts index 5d0cefd4e9..875776f860 100644 --- a/packages/core/src/api/resolvers/admin/facet.resolver.ts +++ b/packages/core/src/api/resolvers/admin/facet.resolver.ts @@ -22,8 +22,8 @@ import { EntityNotFoundError } from '../../../common/error/errors'; import { ErrorResultUnion } from '../../../common/index'; import { Translated } from '../../../common/types/locale-types'; import { ConfigService } from '../../../config/config.service'; -import { FacetValue } from '../../../entity/facet-value/facet-value.entity'; import { Facet } from '../../../entity/facet/facet.entity'; +import { FacetValue } from '../../../entity/facet-value/facet-value.entity'; import { FacetValueService } from '../../../service/services/facet-value.service'; import { FacetService } from '../../../service/services/facet.service'; import { RequestContext } from '../../common/request-context'; diff --git a/packages/core/src/api/resolvers/admin/product-option.resolver.ts b/packages/core/src/api/resolvers/admin/product-option.resolver.ts index ce9c33c39f..4584afa555 100644 --- a/packages/core/src/api/resolvers/admin/product-option.resolver.ts +++ b/packages/core/src/api/resolvers/admin/product-option.resolver.ts @@ -13,8 +13,8 @@ import { } from '@vendure/common/lib/generated-types'; import { Translated } from '../../../common/types/locale-types'; -import { ProductOptionGroup } from '../../../entity/product-option-group/product-option-group.entity'; import { ProductOption } from '../../../entity/product-option/product-option.entity'; +import { ProductOptionGroup } from '../../../entity/product-option-group/product-option-group.entity'; import { ProductOptionGroupService } from '../../../service/services/product-option-group.service'; import { ProductOptionService } from '../../../service/services/product-option.service'; import { RequestContext } from '../../common/request-context'; diff --git a/packages/core/src/api/resolvers/admin/product.resolver.ts b/packages/core/src/api/resolvers/admin/product.resolver.ts index 9b3a1edc4e..9e31866f70 100644 --- a/packages/core/src/api/resolvers/admin/product.resolver.ts +++ b/packages/core/src/api/resolvers/admin/product.resolver.ts @@ -28,8 +28,8 @@ import { PaginatedList } from '@vendure/common/lib/shared-types'; import { ErrorResultUnion } from '../../../common/error/error-result'; import { UserInputError } from '../../../common/error/errors'; import { Translated } from '../../../common/types/locale-types'; -import { ProductVariant } from '../../../entity/product-variant/product-variant.entity'; import { Product } from '../../../entity/product/product.entity'; +import { ProductVariant } from '../../../entity/product-variant/product-variant.entity'; import { FacetValueService } from '../../../service/services/facet-value.service'; import { ProductVariantService } from '../../../service/services/product-variant.service'; import { ProductService } from '../../../service/services/product.service'; @@ -67,13 +67,13 @@ export class ProductResolver { if (args.id) { const product = await this.productService.findOne(ctx, args.id, relations); if (args.slug && product && product.slug !== args.slug) { - throw new UserInputError(`error.product-id-slug-mismatch`); + throw new UserInputError('error.product-id-slug-mismatch'); } return product; } else if (args.slug) { return this.productService.findOneBySlug(ctx, args.slug, relations); } else { - throw new UserInputError(`error.product-id-or-slug-must-be-provided`); + throw new UserInputError('error.product-id-or-slug-must-be-provided'); } } diff --git a/packages/core/src/api/resolvers/admin/search.resolver.ts b/packages/core/src/api/resolvers/admin/search.resolver.ts index fb38653489..da90431de3 100644 --- a/packages/core/src/api/resolvers/admin/search.resolver.ts +++ b/packages/core/src/api/resolvers/admin/search.resolver.ts @@ -12,34 +12,34 @@ export class SearchResolver { @Query() @Allow(Permission.ReadCatalog, Permission.ReadProduct) async search(...args: any): Promise> { - throw new InternalServerError(`error.no-search-plugin-configured`); + throw new InternalServerError('error.no-search-plugin-configured'); } @ResolveField() async facetValues(...args: any[]): Promise> { - throw new InternalServerError(`error.no-search-plugin-configured`); + throw new InternalServerError('error.no-search-plugin-configured'); } @ResolveField() async collections(...args: any[]): Promise> { - throw new InternalServerError(`error.no-search-plugin-configured`); + throw new InternalServerError('error.no-search-plugin-configured'); } @Mutation() @Allow(Permission.UpdateCatalog, Permission.UpdateProduct) async reindex(...args: any[]): Promise { - throw new InternalServerError(`error.no-search-plugin-configured`); + throw new InternalServerError('error.no-search-plugin-configured'); } @Query() @Allow(Permission.ReadCatalog, Permission.ReadProduct) async pendingSearchIndexUpdates(...args: any[]): Promise { - throw new InternalServerError(`error.no-search-plugin-configured`); + throw new InternalServerError('error.no-search-plugin-configured'); } @Mutation() @Allow(Permission.UpdateCatalog, Permission.UpdateProduct) async runPendingSearchIndexUpdates(...args: any[]): Promise { - throw new InternalServerError(`error.no-search-plugin-configured`); + throw new InternalServerError('error.no-search-plugin-configured'); } } diff --git a/packages/core/src/api/resolvers/entity/collection-entity.resolver.ts b/packages/core/src/api/resolvers/entity/collection-entity.resolver.ts index 1be1350669..59c7947935 100644 --- a/packages/core/src/api/resolvers/entity/collection-entity.resolver.ts +++ b/packages/core/src/api/resolvers/entity/collection-entity.resolver.ts @@ -136,7 +136,9 @@ export class CollectionEntityResolver { ); } catch (e: any) { Logger.error( - `Could not decode the collection filter arguments for "${collection.name}" (id: ${collection.id}). Error message: ${e.message}`, + `Could not decode the collection filter arguments for "${collection.name}" (id: ${ + collection.id + }). Error message: ${JSON.stringify(e.message)}`, ); return []; } diff --git a/packages/core/src/api/resolvers/entity/customer-group-entity.resolver.ts b/packages/core/src/api/resolvers/entity/customer-group-entity.resolver.ts index 6f9e86e53a..ab09444d82 100644 --- a/packages/core/src/api/resolvers/entity/customer-group-entity.resolver.ts +++ b/packages/core/src/api/resolvers/entity/customer-group-entity.resolver.ts @@ -2,8 +2,8 @@ import { Args, Parent, ResolveField, Resolver } from '@nestjs/graphql'; import { Permission, QueryCustomersArgs } from '@vendure/common/lib/generated-types'; import { PaginatedList } from '@vendure/common/lib/shared-types'; -import { CustomerGroup } from '../../../entity/customer-group/customer-group.entity'; import { Customer } from '../../../entity/customer/customer.entity'; +import { CustomerGroup } from '../../../entity/customer-group/customer-group.entity'; import { CustomerGroupService } from '../../../service/services/customer-group.service'; import { RequestContext } from '../../common/request-context'; import { Allow } from '../../decorators/allow.decorator'; diff --git a/packages/core/src/api/resolvers/entity/facet-entity.resolver.ts b/packages/core/src/api/resolvers/entity/facet-entity.resolver.ts index 89d04d5bf2..3c3f6454d2 100644 --- a/packages/core/src/api/resolvers/entity/facet-entity.resolver.ts +++ b/packages/core/src/api/resolvers/entity/facet-entity.resolver.ts @@ -1,8 +1,8 @@ import { Parent, ResolveField, Resolver } from '@nestjs/graphql'; import { RequestContextCacheService } from '../../../cache/request-context-cache.service'; -import { FacetValue } from '../../../entity/facet-value/facet-value.entity'; import { Facet } from '../../../entity/facet/facet.entity'; +import { FacetValue } from '../../../entity/facet-value/facet-value.entity'; import { LocaleStringHydrator } from '../../../service/helpers/locale-string-hydrator/locale-string-hydrator'; import { FacetValueService } from '../../../service/services/facet-value.service'; import { RequestContext } from '../../common/request-context'; diff --git a/packages/core/src/api/resolvers/entity/facet-value-entity.resolver.ts b/packages/core/src/api/resolvers/entity/facet-value-entity.resolver.ts index 3818822ce1..9bbb67f5b7 100644 --- a/packages/core/src/api/resolvers/entity/facet-value-entity.resolver.ts +++ b/packages/core/src/api/resolvers/entity/facet-value-entity.resolver.ts @@ -1,8 +1,8 @@ import { Parent, ResolveField, Resolver } from '@nestjs/graphql'; import { RequestContextCacheService } from '../../../cache/request-context-cache.service'; -import { FacetValue } from '../../../entity/facet-value/facet-value.entity'; import { Facet } from '../../../entity/facet/facet.entity'; +import { FacetValue } from '../../../entity/facet-value/facet-value.entity'; import { LocaleStringHydrator } from '../../../service/helpers/locale-string-hydrator/locale-string-hydrator'; import { FacetService } from '../../../service/services/facet.service'; import { RequestContext } from '../../common/request-context'; diff --git a/packages/core/src/api/resolvers/entity/fulfillment-line-entity.resolver.ts b/packages/core/src/api/resolvers/entity/fulfillment-line-entity.resolver.ts index 77ee7719a6..90ca078630 100644 --- a/packages/core/src/api/resolvers/entity/fulfillment-line-entity.resolver.ts +++ b/packages/core/src/api/resolvers/entity/fulfillment-line-entity.resolver.ts @@ -2,8 +2,8 @@ import { Parent, ResolveField, Resolver } from '@nestjs/graphql'; import { TransactionalConnection } from '../../../connection/index'; import { Fulfillment } from '../../../entity/fulfillment/fulfillment.entity'; -import { FulfillmentLine } from '../../../entity/order-line-reference/fulfillment-line.entity'; import { OrderLine } from '../../../entity/order-line/order-line.entity'; +import { FulfillmentLine } from '../../../entity/order-line-reference/fulfillment-line.entity'; import { RequestContext } from '../../common/request-context'; import { Ctx } from '../../decorators/request-context.decorator'; diff --git a/packages/core/src/api/resolvers/entity/product-entity.resolver.ts b/packages/core/src/api/resolvers/entity/product-entity.resolver.ts index df964dbf1d..8dc5d0a8ae 100644 --- a/packages/core/src/api/resolvers/entity/product-entity.resolver.ts +++ b/packages/core/src/api/resolvers/entity/product-entity.resolver.ts @@ -9,9 +9,9 @@ import { Asset } from '../../../entity/asset/asset.entity'; import { Channel } from '../../../entity/channel/channel.entity'; import { Collection } from '../../../entity/collection/collection.entity'; import { FacetValue } from '../../../entity/facet-value/facet-value.entity'; +import { Product } from '../../../entity/product/product.entity'; import { ProductOptionGroup } from '../../../entity/product-option-group/product-option-group.entity'; import { ProductVariant } from '../../../entity/product-variant/product-variant.entity'; -import { Product } from '../../../entity/product/product.entity'; import { LocaleStringHydrator } from '../../../service/helpers/locale-string-hydrator/locale-string-hydrator'; import { AssetService } from '../../../service/services/asset.service'; import { CollectionService } from '../../../service/services/collection.service'; diff --git a/packages/core/src/api/resolvers/entity/product-option-entity.resolver.ts b/packages/core/src/api/resolvers/entity/product-option-entity.resolver.ts index 14a2f1c59a..da108c37d3 100644 --- a/packages/core/src/api/resolvers/entity/product-option-entity.resolver.ts +++ b/packages/core/src/api/resolvers/entity/product-option-entity.resolver.ts @@ -4,8 +4,8 @@ import { Permission } from '@vendure/common/lib/generated-types'; import { RequestContextCacheService } from '../../../cache/request-context-cache.service'; import { Translated } from '../../../common/types/locale-types'; import { assertFound } from '../../../common/utils'; -import { ProductOptionGroup } from '../../../entity/product-option-group/product-option-group.entity'; import { ProductOption } from '../../../entity/product-option/product-option.entity'; +import { ProductOptionGroup } from '../../../entity/product-option-group/product-option-group.entity'; import { LocaleStringHydrator } from '../../../service/helpers/locale-string-hydrator/locale-string-hydrator'; import { ProductOptionGroupService } from '../../../service/services/product-option-group.service'; import { RequestContext } from '../../common/request-context'; diff --git a/packages/core/src/api/resolvers/entity/product-option-group-entity.resolver.ts b/packages/core/src/api/resolvers/entity/product-option-group-entity.resolver.ts index b50e7caa65..fb7f6ae776 100644 --- a/packages/core/src/api/resolvers/entity/product-option-group-entity.resolver.ts +++ b/packages/core/src/api/resolvers/entity/product-option-group-entity.resolver.ts @@ -2,8 +2,8 @@ import { Parent, ResolveField, Resolver } from '@nestjs/graphql'; import { Permission } from '@vendure/common/lib/generated-types'; import { Translated } from '../../../common/types/locale-types'; -import { ProductOptionGroup } from '../../../entity/product-option-group/product-option-group.entity'; import { ProductOption } from '../../../entity/product-option/product-option.entity'; +import { ProductOptionGroup } from '../../../entity/product-option-group/product-option-group.entity'; import { LocaleStringHydrator } from '../../../service/helpers/locale-string-hydrator/locale-string-hydrator'; import { ProductOptionGroupService } from '../../../service/services/product-option-group.service'; import { RequestContext } from '../../common/request-context'; diff --git a/packages/core/src/api/resolvers/entity/refund-line-entity.resolver.ts b/packages/core/src/api/resolvers/entity/refund-line-entity.resolver.ts index e4b704fe2f..e7e1d61410 100644 --- a/packages/core/src/api/resolvers/entity/refund-line-entity.resolver.ts +++ b/packages/core/src/api/resolvers/entity/refund-line-entity.resolver.ts @@ -1,8 +1,8 @@ import { Parent, ResolveField, Resolver } from '@nestjs/graphql'; import { TransactionalConnection } from '../../../connection/index'; -import { RefundLine } from '../../../entity/order-line-reference/refund-line.entity'; import { OrderLine } from '../../../entity/order-line/order-line.entity'; +import { RefundLine } from '../../../entity/order-line-reference/refund-line.entity'; import { Refund } from '../../../entity/refund/refund.entity'; import { RequestContext } from '../../common/request-context'; import { Ctx } from '../../decorators/request-context.decorator'; diff --git a/packages/core/src/api/resolvers/shop/shop-auth.resolver.ts b/packages/core/src/api/resolvers/shop/shop-auth.resolver.ts index 36851650f9..b929bd1b97 100644 --- a/packages/core/src/api/resolvers/shop/shop-auth.resolver.ts +++ b/packages/core/src/api/resolvers/shop/shop-auth.resolver.ts @@ -153,7 +153,7 @@ export class ShopAuthResolver extends BaseAuthResolver { ctx, // We know that there is a user, since the Customer // was found with the .getCustomerByUserId() method. - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion customer.user!, NATIVE_AUTH_STRATEGY_NAME, ); diff --git a/packages/core/src/api/resolvers/shop/shop-customer.resolver.ts b/packages/core/src/api/resolvers/shop/shop-customer.resolver.ts index 205cc09f47..2215809592 100644 --- a/packages/core/src/api/resolvers/shop/shop-customer.resolver.ts +++ b/packages/core/src/api/resolvers/shop/shop-customer.resolver.ts @@ -98,7 +98,7 @@ export class ShopCustomerResolver { } const customer = await this.customerService.findOneByUserId(ctx, userId); if (!customer) { - throw new InternalServerError(`error.no-customer-found-for-current-user`); + throw new InternalServerError('error.no-customer-found-for-current-user'); } return customer; } diff --git a/packages/core/src/api/resolvers/shop/shop-order.resolver.ts b/packages/core/src/api/resolvers/shop/shop-order.resolver.ts index 1809c69795..65f2ab0af9 100644 --- a/packages/core/src/api/resolvers/shop/shop-order.resolver.ts +++ b/packages/core/src/api/resolvers/shop/shop-order.resolver.ts @@ -258,7 +258,7 @@ export class ShopOrderResolver { async nextOrderStates( @Ctx() ctx: RequestContext, @Args() args: ActiveOrderArgs, - ): Promise> { + ): Promise { if (ctx.authorizedAsOwnerOnly) { const sessionOrder = await this.activeOrderService.getActiveOrder( ctx, diff --git a/packages/core/src/api/resolvers/shop/shop-products.resolver.ts b/packages/core/src/api/resolvers/shop/shop-products.resolver.ts index f888f18545..34841f0932 100644 --- a/packages/core/src/api/resolvers/shop/shop-products.resolver.ts +++ b/packages/core/src/api/resolvers/shop/shop-products.resolver.ts @@ -63,7 +63,7 @@ export class ShopProductsResolver { } else if (args.slug) { result = await this.productService.findOneBySlug(ctx, args.slug, relations); } else { - throw new UserInputError(`error.product-id-or-slug-must-be-provided`); + throw new UserInputError('error.product-id-or-slug-must-be-provided'); } if (!result) { return; @@ -109,12 +109,12 @@ export class ShopProductsResolver { if (args.id) { collection = await this.collectionService.findOne(ctx, args.id, relations); if (args.slug && collection && collection.slug !== args.slug) { - throw new UserInputError(`error.collection-id-slug-mismatch`); + throw new UserInputError('error.collection-id-slug-mismatch'); } } else if (args.slug) { collection = await this.collectionService.findOneBySlug(ctx, args.slug, relations); } else { - throw new UserInputError(`error.collection-id-or-slug-must-be-provided`); + throw new UserInputError('error.collection-id-or-slug-must-be-provided'); } if (collection && collection.isPrivate) { return; @@ -124,7 +124,7 @@ export class ShopProductsResolver { @Query() async search(...args: any): Promise> { - throw new InternalServerError(`error.no-search-plugin-configured`); + throw new InternalServerError('error.no-search-plugin-configured'); } @Query() diff --git a/packages/core/src/bootstrap.ts b/packages/core/src/bootstrap.ts index 281f8fb8fd..fce786c64d 100644 --- a/packages/core/src/bootstrap.ts +++ b/packages/core/src/bootstrap.ts @@ -46,7 +46,7 @@ export async function bootstrap(userConfig: Partial): Promise): Promis // which conflict with existing entities. for (const pluginEntity of pluginEntities) { if (allEntities.find(e => e.name === pluginEntity.name)) { - throw new InternalServerError(`error.entity-name-conflict`, { entityName: pluginEntity.name }); + throw new InternalServerError('error.entity-name-conflict', { entityName: pluginEntity.name }); } else { allEntities.push(pluginEntity); } @@ -225,6 +225,7 @@ function setExposedHeaders(config: Readonly) { function logWelcomeMessage(config: RuntimeVendureConfig) { let version: string; try { + // eslint-disable-next-line @typescript-eslint/no-var-requires version = require('../package.json').version; } catch (e: any) { version = ' unknown'; @@ -241,11 +242,11 @@ function logWelcomeMessage(config: RuntimeVendureConfig) { const title = `Vendure server (v${version}) now running on port ${port}`; const maxLineLength = Math.max(title.length, ...columnarGreetings.map(l => l.length)); const titlePadLength = title.length < maxLineLength ? Math.floor((maxLineLength - title.length) / 2) : 0; - Logger.info(`=`.repeat(maxLineLength)); + Logger.info('='.repeat(maxLineLength)); Logger.info(title.padStart(title.length + titlePadLength)); Logger.info('-'.repeat(maxLineLength).padStart(titlePadLength)); columnarGreetings.forEach(line => Logger.info(line)); - Logger.info(`=`.repeat(maxLineLength)); + Logger.info('='.repeat(maxLineLength)); } function arrangeCliGreetingsInColumns(lines: Array): string[] { @@ -306,6 +307,6 @@ async function validateDbTablesForWorker(worker: INestApplicationContext) { ); await new Promise(resolve1 => setTimeout(resolve1, pollIntervalMs)); } - reject(`Could not validate DB table structure. Aborting bootstrap.`); + reject('Could not validate DB table structure. Aborting bootstrap.'); }); } diff --git a/packages/core/src/cli/cli-utils.ts b/packages/core/src/cli/cli-utils.ts index 8fa1b21ec1..a509a92185 100644 --- a/packages/core/src/cli/cli-utils.ts +++ b/packages/core/src/cli/cli-utils.ts @@ -1,4 +1,4 @@ -// tslint:disable:no-console +/* eslint-disable no-console */ /** * Logs to the console in a fetching blueish color. */ diff --git a/packages/core/src/cli/populate.ts b/packages/core/src/cli/populate.ts index c215182fea..692f9a4529 100644 --- a/packages/core/src/cli/populate.ts +++ b/packages/core/src/cli/populate.ts @@ -5,7 +5,7 @@ import { lastValueFrom } from 'rxjs'; const loggerCtx = 'Populate'; -// tslint:disable:no-console +/* eslint-disable no-console */ /** * @description * Populates the Vendure server with some initial data and (optionally) product data from @@ -112,7 +112,7 @@ export async function populateInitialData( const populator = app.get(Populator); try { await populator.populateInitialData(initialData, channel); - Logger.info(`Populated initial data`, loggerCtx); + Logger.info('Populated initial data', loggerCtx); } catch (err: any) { Logger.error(err.message, loggerCtx); } diff --git a/packages/core/src/cli/vendure-cli.ts b/packages/core/src/cli/vendure-cli.ts index cc718d682e..48c6b95354 100644 --- a/packages/core/src/cli/vendure-cli.ts +++ b/packages/core/src/cli/vendure-cli.ts @@ -1,4 +1,5 @@ #!/usr/bin/env node +/* eslint-disable @typescript-eslint/no-var-requires */ import { INestApplication } from '@nestjs/common'; import program from 'commander'; import fs from 'fs-extra'; @@ -6,10 +7,11 @@ import path from 'path'; import { logColored } from './cli-utils'; import { importProductsFromCsv, populateCollections, populateInitialData } from './populate'; -// tslint:disable-next-line:no-var-requires + +// eslint-disable-next-line @typescript-eslint/no-var-requires const version = require('../../package.json').version; -// tslint:disable:no-console +/* eslint-disable no-console */ logColored(` _ | | @@ -19,7 +21,7 @@ logColored(` \\_/ \\___|_| |_|\\__,_|\\__,_|_| \\___| `); -program.version(`Vendure CLI v${version}`, '-v --version').name('vendure'); +program.version(`Vendure CLI v${version as string}`, '-v --version').name('vendure'); program .command('import-products ') @@ -88,7 +90,7 @@ async function getApplicationRef(): Promise { } if (!configFile) { - console.error(`Could not find a config file`); + console.error('Could not find a config file'); console.error(`Checked "${tsConfigFile}", "${jsConfigFile}"`); process.exit(1); return; @@ -98,7 +100,7 @@ async function getApplicationRef(): Promise { // we expect ts-node to be available const tsNode = require('ts-node'); if (!tsNode) { - console.error(`For "populate" to work with TypeScript projects, you must have ts-node installed`); + console.error('For "populate" to work with TypeScript projects, you must have ts-node installed'); process.exit(1); return; } @@ -122,7 +124,7 @@ async function getApplicationRef(): Promise { // Force the sync mode on, so that all the tables are created // on this initial run. - (config.dbConnectionOptions as any).synchronize = true; + config.dbConnectionOptions.synchronize = true; const { bootstrap } = require('@vendure/core'); console.log('Bootstrapping Vendure server...'); diff --git a/packages/core/src/common/async-queue.ts b/packages/core/src/common/async-queue.ts index 55dedd00c5..7f621f77f3 100644 --- a/packages/core/src/common/async-queue.ts +++ b/packages/core/src/common/async-queue.ts @@ -41,9 +41,9 @@ export class AsyncQueue { */ push(task: Task): Promise { return new Promise((resolve, reject) => { - this.running < this.concurrency + void (this.running < this.concurrency ? this.runTask(task, resolve, reject) - : this.enqueueTask(task, resolve, reject); + : this.enqueueTask(task, resolve, reject)); }); } diff --git a/packages/core/src/common/configurable-operation.ts b/packages/core/src/common/configurable-operation.ts index 58bcffe88d..ad0ca0fb0f 100644 --- a/packages/core/src/common/configurable-operation.ts +++ b/packages/core/src/common/configurable-operation.ts @@ -440,7 +440,9 @@ function coerceValueToType( try { return (JSON.parse(value) as string[]).map(v => coerceValueToType(v, type, false)) as any; } catch (err: any) { - throw new InternalServerError(`Could not parse list value "${value}": ` + err.message); + throw new InternalServerError( + `Could not parse list value "${value}": ` + JSON.stringify(err.message), + ); } } switch (type) { diff --git a/packages/core/src/common/constants.ts b/packages/core/src/common/constants.ts index 26040abd84..2e244800c1 100644 --- a/packages/core/src/common/constants.ts +++ b/packages/core/src/common/constants.ts @@ -25,19 +25,19 @@ export const DEFAULT_PERMISSIONS: PermissionDefinition[] = [ }), new PermissionDefinition({ name: 'Owner', - description: `Owner means the user owns this entity, e.g. a Customer's own Order`, + description: "Owner means the user owns this entity, e.g. a Customer's own Order", assignable: false, internal: true, }), new PermissionDefinition({ name: 'Public', - description: `Public means any unauthenticated user may perform the operation`, + description: 'Public means any unauthenticated user may perform the operation', assignable: false, internal: true, }), new PermissionDefinition({ name: 'UpdateGlobalSettings', - description: `Grants permission to update GlobalSettings`, + description: 'Grants permission to update GlobalSettings', assignable: true, internal: false, }), diff --git a/packages/core/src/common/error/errors.ts b/packages/core/src/common/error/errors.ts index c2db6ba7b9..fff9705f79 100644 --- a/packages/core/src/common/error/errors.ts +++ b/packages/core/src/common/error/errors.ts @@ -93,8 +93,6 @@ export class ChannelNotFoundError extends I18nError { * @docsPage Error Types */ export class EntityNotFoundError extends I18nError { - constructor(entityName: keyof typeof coreEntitiesMap, id: ID) - constructor(entityName: string, id: ID) constructor(entityName: keyof typeof coreEntitiesMap | string, id: ID) { super('error.entity-with-id-not-found', { entityName, id }, 'ENTITY_NOT_FOUND', LogLevel.Warn); } diff --git a/packages/core/src/common/error/generated-graphql-admin-errors.ts b/packages/core/src/common/error/generated-graphql-admin-errors.ts index ed300875d3..9bfd3e3e53 100644 --- a/packages/core/src/common/error/generated-graphql-admin-errors.ts +++ b/packages/core/src/common/error/generated-graphql-admin-errors.ts @@ -1,4 +1,4 @@ -// tslint:disable +/* eslint-disable */ /** This file was generated by the graphql-errors-plugin, which is part of the "codegen" npm script. */ export type Scalars = { diff --git a/packages/core/src/common/error/generated-graphql-shop-errors.ts b/packages/core/src/common/error/generated-graphql-shop-errors.ts index 5fbf46eb97..84921fab5e 100644 --- a/packages/core/src/common/error/generated-graphql-shop-errors.ts +++ b/packages/core/src/common/error/generated-graphql-shop-errors.ts @@ -1,4 +1,4 @@ -// tslint:disable +/* eslint-disable */ /** This file was generated by the graphql-errors-plugin, which is part of the "codegen" npm script. */ export type Scalars = { diff --git a/packages/core/src/common/finite-state-machine/finite-state-machine.spec.ts b/packages/core/src/common/finite-state-machine/finite-state-machine.spec.ts index 13f5b96ce6..175934f27a 100644 --- a/packages/core/src/common/finite-state-machine/finite-state-machine.spec.ts +++ b/packages/core/src/common/finite-state-machine/finite-state-machine.spec.ts @@ -33,35 +33,35 @@ describe('Finite State Machine', () => { expect(fsm.getNextStates()).toEqual(['Moving', 'DoorsOpen']); }); - it('allows valid transitions', () => { + it('allows valid transitions', async () => { const initialState = 'DoorsClosed'; const fsm = new FSM({ transitions }, initialState); - fsm.transitionTo('Moving', {}); + await fsm.transitionTo('Moving', {}); expect(fsm.currentState).toBe('Moving'); - fsm.transitionTo('DoorsClosed', {}); + await fsm.transitionTo('DoorsClosed', {}); expect(fsm.currentState).toBe('DoorsClosed'); - fsm.transitionTo('DoorsOpen', {}); + await fsm.transitionTo('DoorsOpen', {}); expect(fsm.currentState).toBe('DoorsOpen'); - fsm.transitionTo('DoorsClosed', {}); + await fsm.transitionTo('DoorsClosed', {}); expect(fsm.currentState).toBe('DoorsClosed'); }); - it('does not allow invalid transitions', () => { + it('does not allow invalid transitions', async () => { const initialState = 'DoorsOpen'; const fsm = new FSM({ transitions }, initialState); - fsm.transitionTo('Moving', {}); + await fsm.transitionTo('Moving', {}); expect(fsm.currentState).toBe('DoorsOpen'); - fsm.transitionTo('DoorsClosed', {}); + await fsm.transitionTo('DoorsClosed', {}); expect(fsm.currentState).toBe('DoorsClosed'); - fsm.transitionTo('Moving', {}); + await fsm.transitionTo('Moving', {}); expect(fsm.currentState).toBe('Moving'); - fsm.transitionTo('DoorsOpen', {}); + await fsm.transitionTo('DoorsOpen', {}); expect(fsm.currentState).toBe('Moving'); }); - it('onTransitionStart() is invoked before a transition takes place', () => { + it('onTransitionStart() is invoked before a transition takes place', async () => { const initialState = 'DoorsClosed'; const spy = vi.fn(); const data = 123; @@ -76,7 +76,7 @@ describe('Finite State Machine', () => { initialState, ); - fsm.transitionTo('Moving', data); + await fsm.transitionTo('Moving', data); expect(spy).toHaveBeenCalledWith(initialState, 'Moving', data); expect(currentStateDuringCallback).toBe(initialState); diff --git a/packages/core/src/common/finite-state-machine/finite-state-machine.ts b/packages/core/src/common/finite-state-machine/finite-state-machine.ts index 83386875ab..d8b3d49728 100644 --- a/packages/core/src/common/finite-state-machine/finite-state-machine.ts +++ b/packages/core/src/common/finite-state-machine/finite-state-machine.ts @@ -82,7 +82,7 @@ export class FSM { /** * Returns an array of state to which the machine may transition from the current state. */ - getNextStates(): ReadonlyArray { + getNextStates(): readonly T[] { return this.config.transitions[this._currentState]?.to ?? []; } diff --git a/packages/core/src/common/generate-public-id.ts b/packages/core/src/common/generate-public-id.ts index c851c00a94..a45e7f5877 100644 --- a/packages/core/src/common/generate-public-id.ts +++ b/packages/core/src/common/generate-public-id.ts @@ -1,4 +1,4 @@ -// tslint:disable-next-line:no-var-requires +// eslint-disable-next-line @typescript-eslint/no-var-requires const { customAlphabet } = require('nanoid'); const nanoid = customAlphabet('123456789ABCDEFGHJKLMNPQRSTUVWXYZ', 16); diff --git a/packages/core/src/common/self-refreshing-cache.ts b/packages/core/src/common/self-refreshing-cache.ts index ccd62fb36c..d961a90eb5 100644 --- a/packages/core/src/common/self-refreshing-cache.ts +++ b/packages/core/src/common/self-refreshing-cache.ts @@ -83,9 +83,11 @@ export async function createSelfRefreshingCache( } return value; }) - .catch(err => { + .catch((err: any) => { + const _message = err.message; + const message = typeof _message === 'string' ? _message : JSON.stringify(err.message); Logger.error( - `Failed to update SelfRefreshingCache "${name}": ${err.message}`, + `Failed to update SelfRefreshingCache "${name}": ${message}`, undefined, err.stack, ); diff --git a/packages/core/src/common/types/common-types.ts b/packages/core/src/common/types/common-types.ts index 2807512b4e..0a8416987b 100644 --- a/packages/core/src/common/types/common-types.ts +++ b/packages/core/src/common/types/common-types.ts @@ -173,7 +173,7 @@ export type PriceCalculationResult = { priceIncludesTax: boolean; }; -// tslint:disable-next-line:ban-types +// eslint-disable-next-line @typescript-eslint/ban-types export type MiddlewareHandler = Type | Function; /** diff --git a/packages/core/src/common/types/entity-relation-paths.ts b/packages/core/src/common/types/entity-relation-paths.ts index 09e761c56d..1add49f1b4 100644 --- a/packages/core/src/common/types/entity-relation-paths.ts +++ b/packages/core/src/common/types/entity-relation-paths.ts @@ -61,7 +61,7 @@ export type Join, D extends string> = T extends [] ? never : T extends [infer F] ? F - : // tslint:disable-next-line:no-shadowed-variable + : // eslint-disable-next-line no-shadow,@typescript-eslint/no-shadow T extends [infer F, ...infer R] ? F extends string ? `${F}${D}${Join, D>}` diff --git a/packages/core/src/common/utils.ts b/packages/core/src/common/utils.ts index 63e23258db..741095a161 100644 --- a/packages/core/src/common/utils.ts +++ b/packages/core/src/common/utils.ts @@ -103,7 +103,7 @@ export async function awaitPromiseOrObservable(value: T | Promise | Observ */ export function asyncObservable(work: (observer: Observer) => Promise): Observable { return new Observable(subscriber => { - (async () => { + void (async () => { try { const result = await work(subscriber); if (result) { diff --git a/packages/core/src/config/asset-import-strategy/default-asset-import-strategy.ts b/packages/core/src/config/asset-import-strategy/default-asset-import-strategy.ts index 7e6cf31e0b..c542779895 100644 --- a/packages/core/src/config/asset-import-strategy/default-asset-import-strategy.ts +++ b/packages/core/src/config/asset-import-strategy/default-asset-import-strategy.ts @@ -25,8 +25,12 @@ function fetchUrl(urlString: string): Promise { res => { const { statusCode } = res; if (statusCode !== 200) { - Logger.error(`Failed to fetch "${urlString.substr(0, 100)}", statusCode: ${statusCode}`); - reject(new Error(`Request failed. Status code: ${statusCode}`)); + Logger.error( + `Failed to fetch "${urlString.substr(0, 100)}", statusCode: ${ + statusCode || 'unknown' + }`, + ); + reject(new Error(`Request failed. Status code: ${statusCode || 'unknown'}`)); } else { resolve(res); } diff --git a/packages/core/src/config/catalog/collection-filter.ts b/packages/core/src/config/catalog/collection-filter.ts index 8e1a049f27..6e86fa40f5 100644 --- a/packages/core/src/config/catalog/collection-filter.ts +++ b/packages/core/src/config/catalog/collection-filter.ts @@ -17,7 +17,7 @@ export type ApplyCollectionFilterFn = ( export interface CollectionFilterConfig extends ConfigurableOperationDefOptions { apply: ApplyCollectionFilterFn; } -// tslint:disable:max-line-length +/* eslint-disable max-len */ /** * @description * A CollectionFilter defines a rule which can be used to associate ProductVariants with a Collection. @@ -62,7 +62,7 @@ export interface CollectionFilterConfig extends Configurab * @docsCategory configuration */ export class CollectionFilter extends ConfigurableOperationDef { - // tslint:enable:max-line-length + /* eslint-enable max-len */ private readonly applyFn: ApplyCollectionFilterFn; constructor(config: CollectionFilterConfig) { super(config); diff --git a/packages/core/src/config/catalog/default-collection-filters.ts b/packages/core/src/config/catalog/default-collection-filters.ts index de6015fee9..dfb39ce3c5 100644 --- a/packages/core/src/config/catalog/default-collection-filters.ts +++ b/packages/core/src/config/catalog/default-collection-filters.ts @@ -1,6 +1,6 @@ import { LanguageCode } from '@vendure/common/lib/generated-types'; -// tslint:disable-next-line:no-var-requires -const { customAlphabet } = require('nanoid'); + +// eslint-disable-next-line @typescript-eslint/no-var-requires import { ConfigArgDef } from '../../common/configurable-operation'; import { UserInputError } from '../../common/error/errors'; @@ -8,6 +8,9 @@ import { ProductVariant } from '../../entity/product-variant/product-variant.ent import { CollectionFilter } from './collection-filter'; +// eslint-disable-next-line @typescript-eslint/no-var-requires +const { customAlphabet } = require('nanoid'); + /** * @description * Used to created unique key names for DB query parameters, to avoid conflicts if the @@ -15,7 +18,7 @@ import { CollectionFilter } from './collection-filter'; */ export function randomSuffix(prefix: string) { const nanoid = customAlphabet('123456789abcdefghijklmnopqrstuvwxyz', 6); - return `${prefix}_${nanoid()}`; + return `${prefix}_${nanoid() as string}`; } /** @@ -29,7 +32,7 @@ export const combineWithAndArg: ConfigArgDef<'boolean'> = { description: [ { languageCode: LanguageCode.en, - // tslint:disable-next-line:max-line-length + // eslint-disable-next-line max-len value: 'If this filter is being combined with other filters, do all conditions need to be satisfied (AND), or just one or the other (OR)?', }, ], @@ -58,7 +61,9 @@ export const facetValueCollectionFilter = new CollectionFilter({ description: [ { languageCode: LanguageCode.en, - value: 'If checked, product variants must have at least one of the selected facet values. If not checked, the variant must have all selected values.', + value: + 'If checked, product variants must have at least one of the selected facet values. ' + + 'If not checked, the variant must have all selected values.', }, ], }, @@ -144,8 +149,8 @@ export const variantNameCollectionFilter = new CollectionFilter({ code: 'variant-name-filter', description: [{ languageCode: LanguageCode.en, value: 'Filter by product variant name' }], apply: (qb, args) => { - let translationAlias = `variant_name_filter_translation`; - const termName = randomSuffix(`term`); + let translationAlias = 'variant_name_filter_translation'; + const termName = randomSuffix('term'); const translationsJoin = qb.expressionMap.joinAttributes.find( ja => ja.entityOrProperty === 'productVariant.translations', ); @@ -212,7 +217,7 @@ export const variantIdCollectionFilter = new CollectionFilter({ if (args.variantIds.length === 0) { return qb; } - const variantIdsKey = randomSuffix(`variantIds`); + const variantIdsKey = randomSuffix('variantIds'); const clause = `productVariant.id IN (:...${variantIdsKey})`; const params = { [variantIdsKey]: args.variantIds }; if (args.combineWithAnd === false) { @@ -242,7 +247,7 @@ export const productIdCollectionFilter = new CollectionFilter({ if (args.productIds.length === 0) { return qb; } - const productIdsKey = randomSuffix(`productIds`); + const productIdsKey = randomSuffix('productIds'); const clause = `productVariant.productId IN (:...${productIdsKey})`; const params = { [productIdsKey]: args.productIds }; if (args.combineWithAnd === false) { diff --git a/packages/core/src/config/catalog/default-stock-location-strategy.ts b/packages/core/src/config/catalog/default-stock-location-strategy.ts index b9dc8e6a08..f11244f198 100644 --- a/packages/core/src/config/catalog/default-stock-location-strategy.ts +++ b/packages/core/src/config/catalog/default-stock-location-strategy.ts @@ -98,7 +98,7 @@ export class DefaultStockLocationStrategy implements StockLocationStrategy { unallocated -= qtyToAdd; } return [...quantityByLocationId.entries()].map(([locationId, qty]) => ({ - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion location: stockLocations.find(l => idsAreEqual(l.id, locationId))!, quantity: qty, })); diff --git a/packages/core/src/config/config-helpers.ts b/packages/core/src/config/config-helpers.ts index 75fe2e3b02..14e1ab83c8 100644 --- a/packages/core/src/config/config-helpers.ts +++ b/packages/core/src/config/config-helpers.ts @@ -9,6 +9,7 @@ const defaultConfigPath = path.join(__dirname, 'default-config'); * Reset the activeConfig object back to the initial default state. */ export function resetConfig() { + // eslint-disable-next-line @typescript-eslint/no-var-requires activeConfig = require(defaultConfigPath).defaultConfig; } @@ -39,14 +40,14 @@ export async function ensureConfigLoaded() { * should be used to access config settings. */ export function getConfig(): Readonly { - // @ts-ignore if (!activeConfig) { try { + // eslint-disable-next-line @typescript-eslint/no-var-requires activeConfig = require(defaultConfigPath).defaultConfig; } catch (e: any) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.log( - `Error loading config. If this is a test, make sure you have called ensureConfigLoaded() before using the config.`, + 'Error loading config. If this is a test, make sure you have called ensureConfigLoaded() before using the config.', ); } } diff --git a/packages/core/src/config/config.service.mock.ts b/packages/core/src/config/config.service.mock.ts index 6f32a8c59c..e6f362a6cc 100644 --- a/packages/core/src/config/config.service.mock.ts +++ b/packages/core/src/config/config.service.mock.ts @@ -1,4 +1,5 @@ -import { vi } from 'vitest'; +/* eslint-disable @typescript-eslint/ban-types */ +import { vi, Mock } from 'vitest'; import { VendureEntity } from '../entity/base/base.entity'; import { MockClass } from '../testing/testing-types'; @@ -22,7 +23,7 @@ export class MockConfigService implements MockClass { }; authOptions: {}; defaultChannelToken: 'channel-token'; - defaultLanguageCode: vi.Mock; + defaultLanguageCode: Mock; roundingStrategy: {}; entityIdStrategy = new MockIdStrategy(); entityOptions = {}; diff --git a/packages/core/src/config/config.service.ts b/packages/core/src/config/config.service.ts index 1aa42b2a43..f6a3beb8e7 100644 --- a/packages/core/src/config/config.service.ts +++ b/packages/core/src/config/config.service.ts @@ -31,7 +31,7 @@ export class ConfigService implements VendureConfig { constructor() { this.activeConfig = getConfig(); if (this.activeConfig.authOptions.disableAuth) { - // tslint:disable-next-line + // eslint-disable-next-line Logger.warn('Auth has been disabled. This should never be the case for a production system!'); } } @@ -81,7 +81,7 @@ export class ConfigService implements VendureConfig { } get orderOptions(): Required { - return this.activeConfig.orderOptions as Required; + return this.activeConfig.orderOptions; } get paymentOptions(): Required { diff --git a/packages/core/src/config/job-queue/job-queue-strategy.ts b/packages/core/src/config/job-queue/job-queue-strategy.ts index 031724444c..36024545fd 100644 --- a/packages/core/src/config/job-queue/job-queue-strategy.ts +++ b/packages/core/src/config/job-queue/job-queue-strategy.ts @@ -18,13 +18,13 @@ export interface JobQueueStrategy extends InjectableStrategy { * @description * Add a new job to the queue. */ - add = {}>(job: Job): Promise>; + add = object>(job: Job): Promise>; /** * @description * Start the job queue */ - start = {}>( + start = object>( queueName: string, process: (job: Job) => Promise, ): Promise; @@ -33,7 +33,7 @@ export interface JobQueueStrategy extends InjectableStrategy { * @description * Stops a queue from running. Its not guaranteed to stop immediately. */ - stop = {}>( + stop = object>( queueName: string, process: (job: Job) => Promise, ): Promise; diff --git a/packages/core/src/config/logger/default-logger.ts b/packages/core/src/config/logger/default-logger.ts index a3057d9773..705feb31db 100644 --- a/packages/core/src/config/logger/default-logger.ts +++ b/packages/core/src/config/logger/default-logger.ts @@ -90,7 +90,7 @@ export class DefaultLogger implements VendureLogger { } if (this.level >= LogLevel.Error) { this.logMessage( - chalk.red(`error`), + chalk.red('error'), chalk.red(this.ensureString(message) + (trace ? `\n${trace}` : '')), context, ); @@ -98,22 +98,22 @@ export class DefaultLogger implements VendureLogger { } warn(message: string, context?: string): void { if (this.level >= LogLevel.Warn) { - this.logMessage(chalk.yellow(`warn`), chalk.yellow(this.ensureString(message)), context); + this.logMessage(chalk.yellow('warn'), chalk.yellow(this.ensureString(message)), context); } } info(message: string, context?: string): void { if (this.level >= LogLevel.Info) { - this.logMessage(chalk.blue(`info`), this.ensureString(message), context); + this.logMessage(chalk.blue('info'), this.ensureString(message), context); } } verbose(message: string, context?: string): void { if (this.level >= LogLevel.Verbose) { - this.logMessage(chalk.magenta(`verbose`), this.ensureString(message), context); + this.logMessage(chalk.magenta('verbose'), this.ensureString(message), context); } } debug(message: string, context?: string): void { if (this.level >= LogLevel.Debug) { - this.logMessage(chalk.magenta(`debug`), this.ensureString(message), context); + this.logMessage(chalk.magenta('debug'), this.ensureString(message), context); } } diff --git a/packages/core/src/config/logger/typeorm-logger.ts b/packages/core/src/config/logger/typeorm-logger.ts index c6994719d1..38a8377078 100644 --- a/packages/core/src/config/logger/typeorm-logger.ts +++ b/packages/core/src/config/logger/typeorm-logger.ts @@ -56,8 +56,8 @@ export class TypeOrmLogger implements TypeOrmLoggerInterface { logQuerySlow(time: number, query: string, parameters?: any[], queryRunner?: QueryRunner): any { const sql = this.formatQueryWithParams(query, parameters); - Logger.warn(`Query is slow: ` + sql); - Logger.warn(`Execution time: ` + time); + Logger.warn('Query is slow: ' + sql); + Logger.warn('Execution time: ' + time.toString()); } logSchemaBuild(message: string, queryRunner?: QueryRunner): any { @@ -75,7 +75,10 @@ export class TypeOrmLogger implements TypeOrmLoggerInterface { } private formatQueryWithParams(query: string, parameters?: any[]) { - return query + (parameters?.length ? ' -- PARAMETERS: ' + this.stringifyParams(parameters) : ''); + return ( + query + + (parameters?.length ? ' -- PARAMETERS: ' + this.stringifyParams(parameters).toString() : '') + ); } /** diff --git a/packages/core/src/config/order/changed-price-handling-strategy.ts b/packages/core/src/config/order/changed-price-handling-strategy.ts index 756021e84c..65dad20634 100644 --- a/packages/core/src/config/order/changed-price-handling-strategy.ts +++ b/packages/core/src/config/order/changed-price-handling-strategy.ts @@ -1,8 +1,8 @@ import { RequestContext } from '../../api/common/request-context'; import { PriceCalculationResult } from '../../common/types/common-types'; import { InjectableStrategy } from '../../common/types/injectable-strategy'; -import { OrderLine } from '../../entity/order-line/order-line.entity'; import { Order } from '../../entity/order/order.entity'; +import { OrderLine } from '../../entity/order-line/order-line.entity'; /** * @description diff --git a/packages/core/src/config/order/default-active-order-strategy.ts b/packages/core/src/config/order/default-active-order-strategy.ts index 84ec4da3cc..8861a2401f 100644 --- a/packages/core/src/config/order/default-active-order-strategy.ts +++ b/packages/core/src/config/order/default-active-order-strategy.ts @@ -37,7 +37,7 @@ export class DefaultActiveOrderStrategy implements ActiveOrderStrategy { async determineActiveOrder(ctx: RequestContext) { if (!ctx.session) { - throw new InternalServerError(`error.no-active-session`); + throw new InternalServerError('error.no-active-session'); } let order = ctx.session.activeOrderId ? await this.connection diff --git a/packages/core/src/config/order/default-order-process.ts b/packages/core/src/config/order/default-order-process.ts index 96da76d3c4..f33d16c639 100644 --- a/packages/core/src/config/order/default-order-process.ts +++ b/packages/core/src/config/order/default-order-process.ts @@ -4,9 +4,9 @@ import { unique } from '@vendure/common/lib/unique'; import { RequestContext } from '../../api/index'; import { TransactionalConnection } from '../../connection/transactional-connection'; +import { Order } from '../../entity/order/order.entity'; import { OrderLine } from '../../entity/order-line/order-line.entity'; import { OrderModification } from '../../entity/order-modification/order-modification.entity'; -import { Order } from '../../entity/order/order.entity'; import { Payment } from '../../entity/payment/payment.entity'; import { ProductVariant } from '../../entity/product-variant/product-variant.entity'; import { OrderPlacedEvent } from '../../event-bus/events/order-placed-event'; @@ -264,11 +264,11 @@ export function configureDefaultOrderProcess(options: DefaultOrderProcessOptions 0 < modifications.length && modifications.every(modification => modification.isSettled) ) { - return `message.cannot-transition-no-additional-payments-needed`; + return 'message.cannot-transition-no-additional-payments-needed'; } } else { if (modifications.some(modification => !modification.isSettled)) { - return `message.cannot-transition-without-modification-payment`; + return 'message.cannot-transition-without-modification-payment'; } } } @@ -288,7 +288,7 @@ export function configureDefaultOrderProcess(options: DefaultOrderProcessOptions order.payments = existingPayments; const deficit = order.totalWithTax - totalCoveredByPayments(order); if (0 < deficit) { - return `message.cannot-transition-from-arranging-additional-payment`; + return 'message.cannot-transition-from-arranging-additional-payment'; } } if ( @@ -307,21 +307,21 @@ export function configureDefaultOrderProcess(options: DefaultOrderProcessOptions .andWhere('variant.id IN (:...variantIds)', { variantIds }); const availableVariants = await qb.getMany(); if (availableVariants.length !== variantIds.length) { - return `message.cannot-transition-order-contains-products-which-are-unavailable`; + return 'message.cannot-transition-order-contains-products-which-are-unavailable'; } } if (toState === 'ArrangingPayment') { if (options.arrangingPaymentRequiresContents !== false && order.lines.length === 0) { - return `message.cannot-transition-to-payment-when-order-is-empty`; + return 'message.cannot-transition-to-payment-when-order-is-empty'; } if (options.arrangingPaymentRequiresCustomer !== false && !order.customer) { - return `message.cannot-transition-to-payment-without-customer`; + return 'message.cannot-transition-to-payment-without-customer'; } if ( options.arrangingPaymentRequiresShipping !== false && (!order.shippingLines || order.shippingLines.length === 0) ) { - return `message.cannot-transition-to-payment-without-shipping-method`; + return 'message.cannot-transition-to-payment-without-shipping-method'; } if (options.arrangingPaymentRequiresStock !== false) { const variantsWithInsufficientSaleableStock: ProductVariant[] = []; @@ -350,11 +350,11 @@ export function configureDefaultOrderProcess(options: DefaultOrderProcessOptions if (toState === 'PaymentAuthorized') { const hasAnAuthorizedPayment = !!order.payments.find(p => p.state === 'Authorized'); if (!orderTotalIsCovered(order, ['Authorized', 'Settled']) || !hasAnAuthorizedPayment) { - return `message.cannot-transition-without-authorized-payments`; + return 'message.cannot-transition-without-authorized-payments'; } } if (toState === 'PaymentSettled' && !orderTotalIsCovered(order, 'Settled')) { - return `message.cannot-transition-without-settled-payments`; + return 'message.cannot-transition-without-settled-payments'; } } if (options.checkAllItemsBeforeCancel !== false) { @@ -364,7 +364,7 @@ export function configureDefaultOrderProcess(options: DefaultOrderProcessOptions fromState !== 'ArrangingPayment' ) { if (!orderLinesAreAllCancelled(order)) { - return `message.cannot-transition-unless-all-cancelled`; + return 'message.cannot-transition-unless-all-cancelled'; } } } @@ -372,25 +372,25 @@ export function configureDefaultOrderProcess(options: DefaultOrderProcessOptions if (toState === 'PartiallyShipped') { const orderWithFulfillments = await findOrderWithFulfillments(ctx, order.id); if (!orderItemsArePartiallyShipped(orderWithFulfillments)) { - return `message.cannot-transition-unless-some-order-items-shipped`; + return 'message.cannot-transition-unless-some-order-items-shipped'; } } if (toState === 'Shipped') { const orderWithFulfillments = await findOrderWithFulfillments(ctx, order.id); if (!orderItemsAreShipped(orderWithFulfillments)) { - return `message.cannot-transition-unless-all-order-items-shipped`; + return 'message.cannot-transition-unless-all-order-items-shipped'; } } if (toState === 'PartiallyDelivered') { const orderWithFulfillments = await findOrderWithFulfillments(ctx, order.id); if (!orderItemsArePartiallyDelivered(orderWithFulfillments)) { - return `message.cannot-transition-unless-some-order-items-delivered`; + return 'message.cannot-transition-unless-some-order-items-delivered'; } } if (toState === 'Delivered') { const orderWithFulfillments = await findOrderWithFulfillments(ctx, order.id); if (!orderItemsAreDelivered(orderWithFulfillments)) { - return `message.cannot-transition-unless-all-order-items-delivered`; + return 'message.cannot-transition-unless-all-order-items-delivered'; } } } diff --git a/packages/core/src/config/order/merge-orders-strategy.ts b/packages/core/src/config/order/merge-orders-strategy.ts index 259ef8ffc3..3e67adadf5 100644 --- a/packages/core/src/config/order/merge-orders-strategy.ts +++ b/packages/core/src/config/order/merge-orders-strategy.ts @@ -1,6 +1,6 @@ import { RequestContext } from '../../api/common/request-context'; -import { OrderLine } from '../../entity/order-line/order-line.entity'; import { Order } from '../../entity/order/order.entity'; +import { OrderLine } from '../../entity/order-line/order-line.entity'; import { MergedOrderLine, OrderMergeStrategy, toMergedOrderLine } from './order-merge-strategy'; diff --git a/packages/core/src/config/order/order-merge-strategy.ts b/packages/core/src/config/order/order-merge-strategy.ts index ea7a63b0b4..405ec7e3db 100644 --- a/packages/core/src/config/order/order-merge-strategy.ts +++ b/packages/core/src/config/order/order-merge-strategy.ts @@ -2,8 +2,8 @@ import { ID } from '@vendure/common/lib/shared-types'; import { RequestContext } from '../../api/common/request-context'; import { InjectableStrategy } from '../../common/types/injectable-strategy'; -import { OrderLine } from '../../entity/order-line/order-line.entity'; import { Order } from '../../entity/order/order.entity'; +import { OrderLine } from '../../entity/order-line/order-line.entity'; /** * @description diff --git a/packages/core/src/config/order/order-seller-strategy.ts b/packages/core/src/config/order/order-seller-strategy.ts index 5a3284ee69..4ad00f4bc6 100644 --- a/packages/core/src/config/order/order-seller-strategy.ts +++ b/packages/core/src/config/order/order-seller-strategy.ts @@ -3,8 +3,8 @@ import { ID } from '@vendure/common/lib/shared-types'; import { RequestContext } from '../../api/index'; import { InjectableStrategy } from '../../common/index'; import { Channel } from '../../entity/channel/channel.entity'; -import { OrderLine } from '../../entity/order-line/order-line.entity'; import { Order } from '../../entity/order/order.entity'; +import { OrderLine } from '../../entity/order-line/order-line.entity'; import { Payment } from '../../entity/payment/payment.entity'; import { ShippingLine } from '../../entity/shipping-line/shipping-line.entity'; import { Surcharge } from '../../entity/surcharge/surcharge.entity'; diff --git a/packages/core/src/config/payment/example-payment-method-handler.ts b/packages/core/src/config/payment/example-payment-method-handler.ts index 8b453ea39d..5111a8cd36 100644 --- a/packages/core/src/config/payment/example-payment-method-handler.ts +++ b/packages/core/src/config/payment/example-payment-method-handler.ts @@ -12,7 +12,7 @@ const gripeSDK = { id: Math.random().toString(36).substr(3), }); }, - capture: (transactionId: string) => { + capture: async (transactionId: string) => { return true; }, }, @@ -45,7 +45,7 @@ export const examplePaymentHandler = new PaymentMethodHandler({ } catch (err: any) { return { amount, - state: 'Declined' as 'Declined', + state: 'Declined' as const, metadata: { errorMessage: err.message, }, diff --git a/packages/core/src/config/promotion/conditions/has-facet-values-condition.ts b/packages/core/src/config/promotion/conditions/has-facet-values-condition.ts index dca1651010..80b237d47a 100644 --- a/packages/core/src/config/promotion/conditions/has-facet-values-condition.ts +++ b/packages/core/src/config/promotion/conditions/has-facet-values-condition.ts @@ -18,7 +18,7 @@ export const hasFacetValues = new PromotionCondition({ init(injector) { facetValueChecker = new FacetValueChecker(injector.get(TransactionalConnection)); }, - // tslint:disable-next-line:no-shadowed-variable + // eslint-disable-next-line no-shadow,@typescript-eslint/no-shadow async check(ctx, order, args) { let matches = 0; for (const line of order.lines) { diff --git a/packages/core/src/config/promotion/promotion-action.ts b/packages/core/src/config/promotion/promotion-action.ts index 93c3ee02ee..2b33fe3022 100644 --- a/packages/core/src/config/promotion/promotion-action.ts +++ b/packages/core/src/config/promotion/promotion-action.ts @@ -9,8 +9,8 @@ import { ConfigurableOperationDefOptions, } from '../../common/configurable-operation'; import { Promotion, PromotionState } from '../../entity'; -import { OrderLine } from '../../entity/order-line/order-line.entity'; import { Order } from '../../entity/order/order.entity'; +import { OrderLine } from '../../entity/order-line/order-line.entity'; import { ShippingLine } from '../../entity/shipping-line/shipping-line.entity'; import { PromotionCondition } from './promotion-condition'; @@ -245,7 +245,7 @@ export interface PromotionShippingActionConfig extends ConfigurableOperationDef { /** diff --git a/packages/core/src/config/promotion/utils/facet-value-checker.ts b/packages/core/src/config/promotion/utils/facet-value-checker.ts index e9da27f18b..6cd34ff743 100644 --- a/packages/core/src/config/promotion/utils/facet-value-checker.ts +++ b/packages/core/src/config/promotion/utils/facet-value-checker.ts @@ -31,7 +31,6 @@ import { ProductVariant } from '../../../entity/product-variant/product-variant. * init(injector) { * facetValueChecker = new FacetValueChecker(injector.get(TransactionalConnection)); * }, - * // tslint:disable-next-line:no-shadowed-variable * async check(ctx, order, args) { * let matches = 0; * for (const line of order.lines) { diff --git a/packages/core/src/config/session-cache/in-memory-session-cache-strategy.ts b/packages/core/src/config/session-cache/in-memory-session-cache-strategy.ts index 75bfce8700..92b6a08928 100644 --- a/packages/core/src/config/session-cache/in-memory-session-cache-strategy.ts +++ b/packages/core/src/config/session-cache/in-memory-session-cache-strategy.ts @@ -20,7 +20,7 @@ export class InMemorySessionCacheStrategy implements SessionCacheStrategy { constructor(cacheSize?: number) { if (cacheSize != null) { if (cacheSize < 1) { - throw new Error(`cacheSize must be a positive integer`); + throw new Error('cacheSize must be a positive integer'); } this.cacheSize = Math.round(cacheSize); } diff --git a/packages/core/src/config/shipping-method/default-shipping-line-assignment-strategy.ts b/packages/core/src/config/shipping-method/default-shipping-line-assignment-strategy.ts index 0eebe795ab..d815aaef70 100644 --- a/packages/core/src/config/shipping-method/default-shipping-line-assignment-strategy.ts +++ b/packages/core/src/config/shipping-method/default-shipping-line-assignment-strategy.ts @@ -1,6 +1,6 @@ import { RequestContext } from '../../api/index'; -import { OrderLine } from '../../entity/order-line/order-line.entity'; import { Order } from '../../entity/order/order.entity'; +import { OrderLine } from '../../entity/order-line/order-line.entity'; import { ShippingLine } from '../../entity/shipping-line/shipping-line.entity'; import { ShippingLineAssignmentStrategy } from './shipping-line-assignment-strategy'; diff --git a/packages/core/src/config/shipping-method/shipping-line-assignment-strategy.ts b/packages/core/src/config/shipping-method/shipping-line-assignment-strategy.ts index 4230daf3d3..379a99680f 100644 --- a/packages/core/src/config/shipping-method/shipping-line-assignment-strategy.ts +++ b/packages/core/src/config/shipping-method/shipping-line-assignment-strategy.ts @@ -1,7 +1,7 @@ import { RequestContext } from '../../api/index'; import { InjectableStrategy } from '../../common/index'; -import { OrderLine } from '../../entity/order-line/order-line.entity'; import { Order } from '../../entity/order/order.entity'; +import { OrderLine } from '../../entity/order-line/order-line.entity'; import { ShippingLine } from '../../entity/shipping-line/shipping-line.entity'; /** * @description diff --git a/packages/core/src/config/tax/tax-line-calculation-strategy.ts b/packages/core/src/config/tax/tax-line-calculation-strategy.ts index 931d8549df..05084247d1 100644 --- a/packages/core/src/config/tax/tax-line-calculation-strategy.ts +++ b/packages/core/src/config/tax/tax-line-calculation-strategy.ts @@ -2,8 +2,8 @@ import { TaxLine } from '@vendure/common/lib/generated-types'; import { RequestContext } from '../../api/common/request-context'; import { InjectableStrategy } from '../../common/types/injectable-strategy'; -import { OrderLine } from '../../entity/order-line/order-line.entity'; import { Order } from '../../entity/order/order.entity'; +import { OrderLine } from '../../entity/order-line/order-line.entity'; import { TaxRate } from '../../entity/tax-rate/tax-rate.entity'; /** diff --git a/packages/core/src/config/vendure-config.ts b/packages/core/src/config/vendure-config.ts index be295b9a95..60ef951bb6 100644 --- a/packages/core/src/config/vendure-config.ts +++ b/packages/core/src/config/vendure-config.ts @@ -22,9 +22,9 @@ import { ProductVariantPriceSelectionStrategy } from './catalog/product-variant- import { StockDisplayStrategy } from './catalog/stock-display-strategy'; import { StockLocationStrategy } from './catalog/stock-location-strategy'; import { CustomFields } from './custom-field/custom-field-types'; -import { EntityMetadataModifier } from './entity-metadata/entity-metadata-modifier'; import { EntityIdStrategy } from './entity/entity-id-strategy'; import { MoneyStrategy } from './entity/money-strategy'; +import { EntityMetadataModifier } from './entity-metadata/entity-metadata-modifier'; import { FulfillmentHandler } from './fulfillment/fulfillment-handler'; import { FulfillmentProcess } from './fulfillment/fulfillment-process'; import { JobQueueStrategy } from './job-queue/job-queue-strategy'; diff --git a/packages/core/src/connection/remove-custom-fields-with-eager-relations.ts b/packages/core/src/connection/remove-custom-fields-with-eager-relations.ts index 387a6953aa..b6e794d2cd 100644 --- a/packages/core/src/connection/remove-custom-fields-with-eager-relations.ts +++ b/packages/core/src/connection/remove-custom-fields-with-eager-relations.ts @@ -58,7 +58,9 @@ export function removeCustomFieldsWithEagerRelations( const relationsToRemove = relations.filter(r => r.startsWith(`customFields.${propertyName}`)); if (relationsToRemove.length) { Logger.debug( - `TransactionalConnection.findOneInChannel cannot automatically join relation [${mainAlias?.metadata.name}.customFields.${propertyName}]`, + `TransactionalConnection.findOneInChannel cannot automatically join relation [${ + mainAlias?.metadata.name ?? '(unknown)' + }.customFields.${propertyName}]`, ); resultingRelations = relations.filter(r => !r.startsWith(`customFields.${propertyName}`)); } diff --git a/packages/core/src/connection/transactional-connection.ts b/packages/core/src/connection/transactional-connection.ts index 07f4341de5..48c0e14696 100644 --- a/packages/core/src/connection/transactional-connection.ts +++ b/packages/core/src/connection/transactional-connection.ts @@ -79,14 +79,14 @@ export class TransactionalConnection { if (ctxOrTarget instanceof RequestContext) { const transactionManager = this.getTransactionManager(ctxOrTarget); if (transactionManager) { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion return transactionManager.getRepository(maybeTarget!); } else { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion return this.rawConnection.getRepository(maybeTarget!); } } else { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion return this.rawConnection.getRepository(ctxOrTarget ?? maybeTarget!); } } @@ -142,7 +142,7 @@ export class TransactionalConnection { let work: (ctx: RequestContext) => Promise; if (ctxOrWork instanceof RequestContext) { ctx = ctxOrWork; - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion work = maybeWork!; } else { ctx = RequestContext.empty(); @@ -276,7 +276,7 @@ export class TransactionalConnection { ) { const qb = this.getRepository(ctx, entity).createQueryBuilder('entity').setFindOptions(options); if (options.loadEagerRelations !== false) { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion FindOptionsUtils.joinEagerRelations(qb, qb.alias, qb.expressionMap.mainAlias!.metadata); } qb.leftJoin('entity.channels', '__channel') @@ -306,7 +306,7 @@ export class TransactionalConnection { const qb = this.getRepository(ctx, entity).createQueryBuilder('entity').setFindOptions(options); if (options.loadEagerRelations !== false) { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion FindOptionsUtils.joinEagerRelations(qb, qb.alias, qb.expressionMap.mainAlias!.metadata); } return qb diff --git a/packages/core/src/data-import/providers/import-parser/import-parser.ts b/packages/core/src/data-import/providers/import-parser/import-parser.ts index 141b5a9da2..3ed6e9d945 100644 --- a/packages/core/src/data-import/providers/import-parser/import-parser.ts +++ b/packages/core/src/data-import/providers/import-parser/import-parser.ts @@ -190,7 +190,7 @@ export class ImportParser { input.pipe(parser); parser.on('readable', () => { let record; - // tslint:disable-next-line:no-conditional-assignment + // eslint-disable-next-line no-cond-assign while ((record = parser.read())) { records.push(record); } @@ -514,7 +514,9 @@ function populateOptionGroupValues(currentRow: ParsedProductWithVariants) { currentRow.product.optionGroups.forEach((og, i) => { const ogTranslation = og.translations.find(t => t.languageCode === translation.languageCode); if (!ogTranslation) { - throw new InternalServerError(`No translation '${LanguageCode}' for option groups'`); + throw new InternalServerError( + `No translation '${translation.languageCode}' for option groups'`, + ); } ogTranslation.values = unique(values.map(v => v[i])); }); diff --git a/packages/core/src/data-import/providers/importer/fast-importer.service.ts b/packages/core/src/data-import/providers/importer/fast-importer.service.ts index d865c0e3a4..3d005fbef4 100644 --- a/packages/core/src/data-import/providers/importer/fast-importer.service.ts +++ b/packages/core/src/data-import/providers/importer/fast-importer.service.ts @@ -11,17 +11,17 @@ import { unique } from '@vendure/common/lib/unique'; import { RequestContext } from '../../../api/common/request-context'; import { TransactionalConnection } from '../../../connection/transactional-connection'; import { Channel } from '../../../entity/channel/channel.entity'; -import { ProductOptionGroupTranslation } from '../../../entity/product-option-group/product-option-group-translation.entity'; -import { ProductOptionGroup } from '../../../entity/product-option-group/product-option-group.entity'; +import { ProductAsset } from '../../../entity/product/product-asset.entity'; +import { ProductTranslation } from '../../../entity/product/product-translation.entity'; +import { Product } from '../../../entity/product/product.entity'; import { ProductOptionTranslation } from '../../../entity/product-option/product-option-translation.entity'; import { ProductOption } from '../../../entity/product-option/product-option.entity'; +import { ProductOptionGroupTranslation } from '../../../entity/product-option-group/product-option-group-translation.entity'; +import { ProductOptionGroup } from '../../../entity/product-option-group/product-option-group.entity'; import { ProductVariantAsset } from '../../../entity/product-variant/product-variant-asset.entity'; import { ProductVariantPrice } from '../../../entity/product-variant/product-variant-price.entity'; import { ProductVariantTranslation } from '../../../entity/product-variant/product-variant-translation.entity'; import { ProductVariant } from '../../../entity/product-variant/product-variant.entity'; -import { ProductAsset } from '../../../entity/product/product-asset.entity'; -import { ProductTranslation } from '../../../entity/product/product-translation.entity'; -import { Product } from '../../../entity/product/product.entity'; import { TranslatableSaver } from '../../../service/helpers/translatable-saver/translatable-saver'; import { RequestContextService, StockMovementService } from '../../../service/index'; import { ChannelService } from '../../../service/services/channel.service'; @@ -206,7 +206,7 @@ export class FastImporterService { private ensureInitialized() { if (!this.defaultChannel || !this.importCtx) { throw new Error( - `The FastImporterService must be initialized with a call to 'initialize()' before importing data`, + "The FastImporterService must be initialized with a call to 'initialize()' before importing data", ); } } diff --git a/packages/core/src/data-import/providers/importer/importer.ts b/packages/core/src/data-import/providers/importer/importer.ts index 886605e049..cc99133179 100644 --- a/packages/core/src/data-import/providers/importer/importer.ts +++ b/packages/core/src/data-import/providers/importer/importer.ts @@ -10,8 +10,8 @@ import { RequestContext } from '../../../api/common/request-context'; import { InternalServerError } from '../../../common/error/errors'; import { ConfigService } from '../../../config/config.service'; import { CustomFieldConfig } from '../../../config/custom-field/custom-field-types'; -import { FacetValue } from '../../../entity/facet-value/facet-value.entity'; import { Facet } from '../../../entity/facet/facet.entity'; +import { FacetValue } from '../../../entity/facet-value/facet-value.entity'; import { TaxCategory } from '../../../entity/tax-category/tax-category.entity'; import { ChannelService } from '../../../service/services/channel.service'; import { FacetValueService } from '../../../service/services/facet-value.service'; diff --git a/packages/core/src/data-import/providers/populator/populator.ts b/packages/core/src/data-import/providers/populator/populator.ts index 8586261a85..3c47901941 100644 --- a/packages/core/src/data-import/providers/populator/populator.ts +++ b/packages/core/src/data-import/providers/populator/populator.ts @@ -76,38 +76,38 @@ export class Populator { try { zoneMap = await this.populateCountries(ctx, data.countries); } catch (e: any) { - Logger.error(`Could not populate countries`); + Logger.error('Could not populate countries'); Logger.error(e, 'populator', e.stack); throw e; } try { await this.populateTaxRates(ctx, data.taxRates, zoneMap); } catch (e: any) { - Logger.error(`Could not populate tax rates`); + Logger.error('Could not populate tax rates'); Logger.error(e, 'populator', e.stack); } try { await this.populateShippingMethods(ctx, data.shippingMethods); } catch (e: any) { - Logger.error(`Could not populate shipping methods`); + Logger.error('Could not populate shipping methods'); Logger.error(e, 'populator', e.stack); } try { await this.populatePaymentMethods(ctx, data.paymentMethods); } catch (e: any) { - Logger.error(`Could not populate payment methods`); + Logger.error('Could not populate payment methods'); Logger.error(e, 'populator', e.stack); } try { await this.setChannelDefaults(zoneMap, data, ctx.channel); } catch (e: any) { - Logger.error(`Could not set channel defaults`); + Logger.error('Could not set channel defaults'); Logger.error(e, 'populator', e.stack); } try { await this.populateRoles(ctx, data.roles); } catch (e: any) { - Logger.error(`Could not populate roles`); + Logger.error('Could not populate roles'); Logger.error(e, 'populator', e.stack); } } @@ -195,7 +195,7 @@ export class Populator { ], }; default: - throw new Error(`Filter with code "${filter.code}" is not recognized.`); + throw new Error(`Filter with code "${filter.code as string}" is not recognized.`); } } diff --git a/packages/core/src/entity/entities.ts b/packages/core/src/entity/entities.ts index 536508a193..674f15b147 100644 --- a/packages/core/src/entity/entities.ts +++ b/packages/core/src/entity/entities.ts @@ -10,38 +10,38 @@ import { CollectionTranslation } from './collection/collection-translation.entit import { Collection } from './collection/collection.entity'; import { CountryTranslation } from './country/country-translation.entity'; import { Country } from './country/country.entity'; -import { CustomerGroup } from './customer-group/customer-group.entity'; import { Customer } from './customer/customer.entity'; -import { FacetValueTranslation } from './facet-value/facet-value-translation.entity'; -import { FacetValue } from './facet-value/facet-value.entity'; +import { CustomerGroup } from './customer-group/customer-group.entity'; import { FacetTranslation } from './facet/facet-translation.entity'; import { Facet } from './facet/facet.entity'; +import { FacetValueTranslation } from './facet-value/facet-value-translation.entity'; +import { FacetValue } from './facet-value/facet-value.entity'; import { Fulfillment } from './fulfillment/fulfillment.entity'; import { GlobalSettings } from './global-settings/global-settings.entity'; import { CustomerHistoryEntry } from './history-entry/customer-history-entry.entity'; import { HistoryEntry } from './history-entry/history-entry.entity'; import { OrderHistoryEntry } from './history-entry/order-history-entry.entity'; +import { Order } from './order/order.entity'; +import { OrderLine } from './order-line/order-line.entity'; import { FulfillmentLine } from './order-line-reference/fulfillment-line.entity'; import { OrderLineReference } from './order-line-reference/order-line-reference.entity'; import { OrderModificationLine } from './order-line-reference/order-modification-line.entity'; import { RefundLine } from './order-line-reference/refund-line.entity'; -import { OrderLine } from './order-line/order-line.entity'; import { OrderModification } from './order-modification/order-modification.entity'; -import { Order } from './order/order.entity'; +import { Payment } from './payment/payment.entity'; import { PaymentMethodTranslation } from './payment-method/payment-method-translation.entity'; import { PaymentMethod } from './payment-method/payment-method.entity'; -import { Payment } from './payment/payment.entity'; -import { ProductOptionGroupTranslation } from './product-option-group/product-option-group-translation.entity'; -import { ProductOptionGroup } from './product-option-group/product-option-group.entity'; +import { ProductAsset } from './product/product-asset.entity'; +import { ProductTranslation } from './product/product-translation.entity'; +import { Product } from './product/product.entity'; import { ProductOptionTranslation } from './product-option/product-option-translation.entity'; import { ProductOption } from './product-option/product-option.entity'; +import { ProductOptionGroupTranslation } from './product-option-group/product-option-group-translation.entity'; +import { ProductOptionGroup } from './product-option-group/product-option-group.entity'; import { ProductVariantAsset } from './product-variant/product-variant-asset.entity'; import { ProductVariantPrice } from './product-variant/product-variant-price.entity'; import { ProductVariantTranslation } from './product-variant/product-variant-translation.entity'; import { ProductVariant } from './product-variant/product-variant.entity'; -import { ProductAsset } from './product/product-asset.entity'; -import { ProductTranslation } from './product/product-translation.entity'; -import { Product } from './product/product.entity'; import { PromotionTranslation } from './promotion/promotion-translation.entity'; import { Promotion } from './promotion/promotion.entity'; import { Refund } from './refund/refund.entity'; diff --git a/packages/core/src/entity/entity-id.decorator.ts b/packages/core/src/entity/entity-id.decorator.ts index 2d34c708f1..15933b45b9 100644 --- a/packages/core/src/entity/entity-id.decorator.ts +++ b/packages/core/src/entity/entity-id.decorator.ts @@ -64,7 +64,7 @@ export function getIdColumnsFor(entityType: Type): IdColumnConfig[] { export function getPrimaryGeneratedIdColumn(): { entity: any; name: string } { if (!primaryGeneratedColumn) { throw new Error( - `primaryGeneratedColumn is undefined. The base VendureEntity must have the @PrimaryGeneratedId() decorator set on its id property.`, + 'primaryGeneratedColumn is undefined. The base VendureEntity must have the @PrimaryGeneratedId() decorator set on its id property.', ); } return primaryGeneratedColumn; diff --git a/packages/core/src/entity/order-modification/order-modification.entity.ts b/packages/core/src/entity/order-modification/order-modification.entity.ts index 681cb01a9e..2bab1825f4 100644 --- a/packages/core/src/entity/order-modification/order-modification.entity.ts +++ b/packages/core/src/entity/order-modification/order-modification.entity.ts @@ -5,8 +5,8 @@ import { Column, Entity, Index, JoinColumn, ManyToOne, OneToMany, OneToOne } fro import { Calculated } from '../../common/calculated-decorator'; import { VendureEntity } from '../base/base.entity'; import { Money } from '../money.decorator'; -import { OrderModificationLine } from '../order-line-reference/order-modification-line.entity'; import { Order } from '../order/order.entity'; +import { OrderModificationLine } from '../order-line-reference/order-modification-line.entity'; import { Payment } from '../payment/payment.entity'; import { Refund } from '../refund/refund.entity'; import { Surcharge } from '../surcharge/surcharge.entity'; diff --git a/packages/core/src/entity/order/order.entity.ts b/packages/core/src/entity/order/order.entity.ts index 599ff7280d..2e9dfdee08 100644 --- a/packages/core/src/entity/order/order.entity.ts +++ b/packages/core/src/entity/order/order.entity.ts @@ -332,7 +332,7 @@ export class Order extends VendureEntity implements ChannelAware, HasCustomField if (this.lines == null) { const errorMessage = [ `The property "${propertyName}" on the Order entity requires the Order.lines relation to be joined.`, - `This can be done with the EntityHydratorService: \`await entityHydratorService.hydrate(ctx, order, { relations: ['lines'] })\``, + "This can be done with the EntityHydratorService: `await entityHydratorService.hydrate(ctx, order, { relations: ['lines'] })`", ]; throw new InternalServerError(errorMessage.join('\n')); diff --git a/packages/core/src/entity/product-option-group/product-option-group.entity.ts b/packages/core/src/entity/product-option-group/product-option-group.entity.ts index b4d7535e9b..02c86837dc 100644 --- a/packages/core/src/entity/product-option-group/product-option-group.entity.ts +++ b/packages/core/src/entity/product-option-group/product-option-group.entity.ts @@ -6,8 +6,8 @@ import { LocaleString, Translatable, Translation } from '../../common/types/loca import { HasCustomFields } from '../../config/custom-field/custom-field-types'; import { VendureEntity } from '../base/base.entity'; import { CustomProductOptionGroupFields } from '../custom-entity-fields'; -import { ProductOption } from '../product-option/product-option.entity'; import { Product } from '../product/product.entity'; +import { ProductOption } from '../product-option/product-option.entity'; import { ProductOptionGroupTranslation } from './product-option-group-translation.entity'; diff --git a/packages/core/src/entity/product-variant/product-variant.entity.ts b/packages/core/src/entity/product-variant/product-variant.entity.ts index 1417a7084e..beadade656 100644 --- a/packages/core/src/entity/product-variant/product-variant.entity.ts +++ b/packages/core/src/entity/product-variant/product-variant.entity.ts @@ -14,8 +14,8 @@ import { Collection } from '../collection/collection.entity'; import { CustomProductVariantFields } from '../custom-entity-fields'; import { EntityId } from '../entity-id.decorator'; import { FacetValue } from '../facet-value/facet-value.entity'; -import { ProductOption } from '../product-option/product-option.entity'; import { Product } from '../product/product.entity'; +import { ProductOption } from '../product-option/product-option.entity'; import { StockLevel } from '../stock-level/stock-level.entity'; import { StockMovement } from '../stock-movement/stock-movement.entity'; import { TaxCategory } from '../tax-category/tax-category.entity'; diff --git a/packages/core/src/entity/promotion/promotion.entity.ts b/packages/core/src/entity/promotion/promotion.entity.ts index 79605c43ff..69f7a4d2c4 100644 --- a/packages/core/src/entity/promotion/promotion.entity.ts +++ b/packages/core/src/entity/promotion/promotion.entity.ts @@ -18,8 +18,8 @@ import { import { PromotionCondition, PromotionConditionState } from '../../config/promotion/promotion-condition'; import { Channel } from '../channel/channel.entity'; import { CustomPromotionFields } from '../custom-entity-fields'; -import { OrderLine } from '../order-line/order-line.entity'; import { Order } from '../order/order.entity'; +import { OrderLine } from '../order-line/order-line.entity'; import { PaymentMethodTranslation } from '../payment-method/payment-method-translation.entity'; import { ShippingLine } from '../shipping-line/shipping-line.entity'; diff --git a/packages/core/src/entity/register-custom-entity-fields.ts b/packages/core/src/entity/register-custom-entity-fields.ts index 4fbf24b6fc..bfcfb13bd3 100644 --- a/packages/core/src/entity/register-custom-entity-fields.ts +++ b/packages/core/src/entity/register-custom-entity-fields.ts @@ -67,7 +67,7 @@ const MAX_STRING_LENGTH = 65535; function registerCustomFieldsForEntity( config: VendureConfig, entityName: keyof CustomFields, - // tslint:disable-next-line:callable-types + // eslint-disable-next-line @typescript-eslint/prefer-function-type ctor: { new (): any }, translation = false, ) { @@ -98,7 +98,8 @@ function registerCustomFieldsForEntity( const length = customField.length || 255; if (MAX_STRING_LENGTH < length) { throw new Error( - `ERROR: The "length" property of the custom field "${customField.name}" is greater than the maximum allowed value of ${MAX_STRING_LENGTH}`, + `ERROR: The "length" property of the custom field "${customField.name}" is ` + + `greater than the maximum allowed value of ${MAX_STRING_LENGTH}`, ); } options.length = length; diff --git a/packages/core/src/entity/set-entity-id-strategy.ts b/packages/core/src/entity/set-entity-id-strategy.ts index 62bcc7bfb0..a21d6694cc 100644 --- a/packages/core/src/entity/set-entity-id-strategy.ts +++ b/packages/core/src/entity/set-entity-id-strategy.ts @@ -26,5 +26,5 @@ function setEntityIdColumnTypes(entityIdStrategy: EntityIdStrategy, entitie function setBaseEntityIdType(entityIdStrategy: EntityIdStrategy) { const { entity, name } = getPrimaryGeneratedIdColumn(); - PrimaryGeneratedColumn(entityIdStrategy.primaryKeyType as any)(entity, name); + PrimaryGeneratedColumn(entityIdStrategy.primaryKeyType)(entity, name); } diff --git a/packages/core/src/entity/subscribers.ts b/packages/core/src/entity/subscribers.ts index bec0a04e52..f7b01589fb 100644 --- a/packages/core/src/entity/subscribers.ts +++ b/packages/core/src/entity/subscribers.ts @@ -30,6 +30,7 @@ export class CalculatedPropertySubscriber implements EntitySubscriberInterface { prototype, calculatedPropertyDef.name, ); + // eslint-disable-next-line @typescript-eslint/unbound-method const getFn = getterDescriptor && getterDescriptor.get; if (getFn && !entity.hasOwnProperty(calculatedPropertyDef.name)) { const boundGetFn = getFn.bind(entity); diff --git a/packages/core/src/entity/surcharge/surcharge.entity.ts b/packages/core/src/entity/surcharge/surcharge.entity.ts index 4e9ae3634d..6874000af0 100644 --- a/packages/core/src/entity/surcharge/surcharge.entity.ts +++ b/packages/core/src/entity/surcharge/surcharge.entity.ts @@ -7,8 +7,8 @@ import { Calculated } from '../../common/calculated-decorator'; import { grossPriceOf, netPriceOf } from '../../common/tax-utils'; import { VendureEntity } from '../base/base.entity'; import { Money } from '../money.decorator'; -import { OrderModification } from '../order-modification/order-modification.entity'; import { Order } from '../order/order.entity'; +import { OrderModification } from '../order-modification/order-modification.entity'; /** * @description diff --git a/packages/core/src/entity/validate-custom-fields-config.ts b/packages/core/src/entity/validate-custom-fields-config.ts index 43969c28b8..728f530482 100644 --- a/packages/core/src/entity/validate-custom-fields-config.ts +++ b/packages/core/src/entity/validate-custom-fields-config.ts @@ -53,6 +53,7 @@ function assertNoDuplicatedCustomFieldNames(entityName: string, customFields: Cu const nameCounts = customFields .map(f => f.name) .reduce((hash, name) => { + // eslint-disable-next-line @typescript-eslint/no-unused-expressions hash[name] ? hash[name]++ : (hash[name] = 1); return hash; }, {} as { [name: string]: number }); diff --git a/packages/core/src/event-bus/events/customer-group-event.ts b/packages/core/src/event-bus/events/customer-group-event.ts index 00cc53f9ac..7cd134a585 100644 --- a/packages/core/src/event-bus/events/customer-group-event.ts +++ b/packages/core/src/event-bus/events/customer-group-event.ts @@ -1,6 +1,6 @@ import { RequestContext } from '../../api/common/request-context'; -import { CustomerGroup } from '../../entity/customer-group/customer-group.entity'; import { Customer } from '../../entity/customer/customer.entity'; +import { CustomerGroup } from '../../entity/customer-group/customer-group.entity'; import { VendureEvent } from '../vendure-event'; /** diff --git a/packages/core/src/i18n/i18n.service.ts b/packages/core/src/i18n/i18n.service.ts index 94fdee6c1a..3b8c7e3eae 100644 --- a/packages/core/src/i18n/i18n.service.ts +++ b/packages/core/src/i18n/i18n.service.ts @@ -86,7 +86,7 @@ export class I18nService implements OnModuleInit { const resources = JSON.parse(rawData.toString('utf-8')); this.addTranslation(langKey, resources); } catch (err: any) { - Logger.error(`Could not load resources file ${filePath}`, `I18nService`); + Logger.error(`Could not load resources file ${filePath}`, 'I18nService'); } } @@ -114,7 +114,9 @@ export class I18nService implements OnModuleInit { try { translation = t(originalError.message, originalError.variables); } catch (e: any) { - translation += ` (Translation format error: ${e.message})`; + const message = + typeof e.message === 'string' ? (e.message as string) : JSON.stringify(e.message); + translation += ` (Translation format error: ${message})`; } error.message = translation; // We can now safely remove the variables object so that they do not appear in @@ -136,7 +138,8 @@ export class I18nService implements OnModuleInit { try { translation = t(key, error as any); } catch (e: any) { - translation += ` (Translation format error: ${e.message})`; + const message = typeof e.message === 'string' ? (e.message as string) : JSON.stringify(e.message); + translation += ` (Translation format error: ${message})`; } error.message = translation; } diff --git a/packages/core/src/job-queue/in-memory-job-queue-strategy.spec.ts b/packages/core/src/job-queue/in-memory-job-queue-strategy.spec.ts index 13d1b52663..8e84b61e44 100644 --- a/packages/core/src/job-queue/in-memory-job-queue-strategy.spec.ts +++ b/packages/core/src/job-queue/in-memory-job-queue-strategy.spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { JobListOptions, SortOrder } from '@vendure/common/lib/generated-types'; import { afterEach, beforeEach, describe, expect, it } from 'vitest'; @@ -18,12 +18,12 @@ describe('InMemoryJobQueueStrategy', () => { }); afterEach(async () => { - await strategy.destroy(); + strategy.destroy(); }); describe('findMany options', () => { - beforeEach(() => { - strategy.add( + beforeEach(async () => { + await strategy.add( new Job({ id: 'video-1', queueName: 'video', @@ -31,7 +31,7 @@ describe('InMemoryJobQueueStrategy', () => { createdAt: new Date('2020-04-03T10:00:00.000Z'), }), ); - strategy.add( + await strategy.add( new Job({ id: 'video-2', queueName: 'video', @@ -39,7 +39,7 @@ describe('InMemoryJobQueueStrategy', () => { createdAt: new Date('2020-04-03T10:01:00.000Z'), }), ); - strategy.add( + await strategy.add( new Job({ id: 'email-1', queueName: 'email', @@ -47,7 +47,7 @@ describe('InMemoryJobQueueStrategy', () => { createdAt: new Date('2020-04-03T10:02:00.000Z'), }), ); - strategy.add( + await strategy.add( new Job({ id: 'video-3', queueName: 'video', @@ -55,7 +55,7 @@ describe('InMemoryJobQueueStrategy', () => { createdAt: new Date('2020-04-03T10:03:00.000Z'), }), ); - strategy.add( + await strategy.add( new Job({ id: 'email-2', queueName: 'email', diff --git a/packages/core/src/job-queue/in-memory-job-queue-strategy.ts b/packages/core/src/job-queue/in-memory-job-queue-strategy.ts index 1ee8f1948c..b67f967010 100644 --- a/packages/core/src/job-queue/in-memory-job-queue-strategy.ts +++ b/packages/core/src/job-queue/in-memory-job-queue-strategy.ts @@ -58,14 +58,14 @@ export class InMemoryJobQueueStrategy extends PollingJobQueueStrategy implements clearTimeout(this.timer); } - async add = {}>(job: Job): Promise> { + async add = object>(job: Job): Promise> { if (!job.id) { (job as any).id = Math.floor(Math.random() * 1000000000) .toString() .padEnd(10, '0'); } (job as any).retries = this.setRetries(job.queueName, job); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion this.jobs.set(job.id!, job); if (!this.unsettledJobs[job.queueName]) { this.unsettledJobs[job.queueName] = []; @@ -126,7 +126,7 @@ export class InMemoryJobQueueStrategy extends PollingJobQueueStrategy implements if (job.state === JobState.RETRYING || job.state === JobState.PENDING) { this.unsettledJobs[job.queueName].unshift({ job, updatedAt: new Date() }); } - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion this.jobs.set(job.id!, job); } @@ -139,12 +139,12 @@ export class InMemoryJobQueueStrategy extends PollingJobQueueStrategy implements if (job.isSettled) { if (olderThan) { if (job.settledAt && job.settledAt < olderThan) { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion this.jobs.delete(job.id!); removed++; } } else { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion this.jobs.delete(job.id!); removed++; } @@ -222,7 +222,7 @@ export class InMemoryJobQueueStrategy extends PollingJobQueueStrategy implements private evictSettledJobs = () => { const nowMs = +new Date(); const olderThanMs = nowMs - this.evictJobsAfterMs; - this.removeSettledJobs([], new Date(olderThanMs)); + void this.removeSettledJobs([], new Date(olderThanMs)); this.timer = setTimeout(this.evictSettledJobs, this.evictJobsAfterMs); }; @@ -230,7 +230,7 @@ export class InMemoryJobQueueStrategy extends PollingJobQueueStrategy implements if (!this.processContextChecked) { if (this.processContext.isWorker) { Logger.error( - `The InMemoryJobQueueStrategy will not work when running job queues outside the main server process!`, + 'The InMemoryJobQueueStrategy will not work when running job queues outside the main server process!', ); process.kill(process.pid, 'SIGINT'); } diff --git a/packages/core/src/job-queue/injectable-job-queue-strategy.ts b/packages/core/src/job-queue/injectable-job-queue-strategy.ts index c94682a702..b4e6eb57ed 100644 --- a/packages/core/src/job-queue/injectable-job-queue-strategy.ts +++ b/packages/core/src/job-queue/injectable-job-queue-strategy.ts @@ -3,7 +3,7 @@ import { Injector } from '../common'; import { Job } from './job'; import { JobData } from './types'; -type ProcessFunc = {}> = (job: Job) => Promise; +type ProcessFunc = object> = (job: Job) => Promise; /** * @description @@ -36,7 +36,7 @@ export abstract class InjectableJobQueueStrategy { this.hasInitialized = false; } - abstract start = {}>( + abstract start = object>( queueName: string, process: (job: Job) => Promise, ): void; diff --git a/packages/core/src/job-queue/job-buffer/job-buffer.service.ts b/packages/core/src/job-queue/job-buffer/job-buffer.service.ts index 532d77352a..47297cd5e5 100644 --- a/packages/core/src/job-queue/job-buffer/job-buffer.service.ts +++ b/packages/core/src/job-queue/job-buffer/job-buffer.service.ts @@ -68,7 +68,9 @@ export class JobBufferService { jobsToAdd = await buffer.reduce(jobsForBuffer); } catch (e: any) { Logger.error( - `Error encountered processing jobs in JobBuffer "${buffer.id}":\n${e.message}`, + `Error encountered processing jobs in JobBuffer "${buffer.id}":\n${JSON.stringify( + e.message, + )}`, undefined, e.stack, ); diff --git a/packages/core/src/job-queue/job-buffer/job-buffer.ts b/packages/core/src/job-queue/job-buffer/job-buffer.ts index df78dc571f..e54d6230fc 100644 --- a/packages/core/src/job-queue/job-buffer/job-buffer.ts +++ b/packages/core/src/job-queue/job-buffer/job-buffer.ts @@ -80,7 +80,7 @@ import { JobData } from '../types'; * @docsCategory JobQueue * @since 1.3.0 */ -export interface JobBuffer = {}> { +export interface JobBuffer = object> { readonly id: string; /** diff --git a/packages/core/src/job-queue/job-queue.service.spec.ts b/packages/core/src/job-queue/job-queue.service.spec.ts index da143ca147..ec97681e8d 100644 --- a/packages/core/src/job-queue/job-queue.service.spec.ts +++ b/packages/core/src/job-queue/job-queue.service.spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { Injectable, OnApplicationBootstrap, OnModuleDestroy } from '@nestjs/common'; import { ModuleRef } from '@nestjs/core'; import { Test, TestingModule } from '@nestjs/testing'; @@ -465,10 +465,10 @@ class MockConfigService implements OnApplicationBootstrap, OnModuleDestroy { async onApplicationBootstrap() { const injector = new Injector(this.moduleRef); - await this.jobQueueOptions.jobQueueStrategy.init(injector); + this.jobQueueOptions.jobQueueStrategy.init(injector); } async onModuleDestroy() { - await this.jobQueueOptions.jobQueueStrategy.destroy(); + this.jobQueueOptions.jobQueueStrategy.destroy(); } } diff --git a/packages/core/src/job-queue/job-queue.ts b/packages/core/src/job-queue/job-queue.ts index 2c9500740a..d6cf5f910e 100644 --- a/packages/core/src/job-queue/job-queue.ts +++ b/packages/core/src/job-queue/job-queue.ts @@ -22,7 +22,7 @@ import { CreateQueueOptions, JobConfig, JobData } from './types'; * * @docsCategory JobQueue */ -export class JobQueue = {}> { +export class JobQueue = object> { private running = false; get name(): string { diff --git a/packages/core/src/job-queue/job.ts b/packages/core/src/job-queue/job.ts index 5d2ed29702..7a8f9c5fc5 100644 --- a/packages/core/src/job-queue/job.ts +++ b/packages/core/src/job-queue/job.ts @@ -130,9 +130,9 @@ export class Job = any> { this._startedAt = new Date(); this._attempts++; Logger.debug( - `Job ${this.id} [${this.queueName}] starting (attempt ${this._attempts} of ${ - this.retries + 1 - })`, + `Job ${this.id?.toString() ?? 'null'} [${this.queueName}] starting (attempt ${ + this._attempts + } of ${this.retries + 1})`, ); } } @@ -156,7 +156,7 @@ export class Job = any> { this._progress = 100; this._state = JobState.COMPLETED; this._settledAt = new Date(); - Logger.debug(`Job ${this.id} [${this.queueName}] completed`); + Logger.debug(`Job ${this.id?.toString() ?? 'null'} [${this.queueName}] completed`); } /** @@ -169,14 +169,16 @@ export class Job = any> { if (this.retries >= this._attempts) { this._state = JobState.RETRYING; Logger.warn( - `Job ${this.id} [${this.queueName}] failed (attempt ${this._attempts} of ${ - this.retries + 1 - })`, + `Job ${this.id?.toString() ?? 'null'} [${this.queueName}] failed (attempt ${ + this._attempts + } of ${this.retries + 1})`, ); } else { if (this._state !== JobState.CANCELLED) { this._state = JobState.FAILED; - Logger.warn(`Job ${this.id} [${this.queueName}] failed and will not retry.`); + Logger.warn( + `Job ${this.id?.toString() ?? 'null'} [${this.queueName}] failed and will not retry.`, + ); } this._settledAt = new Date(); } @@ -196,7 +198,9 @@ export class Job = any> { if (this._state === JobState.RUNNING) { this._state = JobState.PENDING; this._attempts = 0; - Logger.debug(`Job ${this.id} [${this.queueName}] deferred back to PENDING state`); + Logger.debug( + `Job ${this.id?.toString() ?? 'null'} [${this.queueName}] deferred back to PENDING state`, + ); } } diff --git a/packages/core/src/job-queue/polling-job-queue-strategy.ts b/packages/core/src/job-queue/polling-job-queue-strategy.ts index f8e3412995..4a4864e7cc 100644 --- a/packages/core/src/job-queue/polling-job-queue-strategy.ts +++ b/packages/core/src/job-queue/polling-job-queue-strategy.ts @@ -55,7 +55,7 @@ export interface PollingJobQueueStrategyConfig { const STOP_SIGNAL = Symbol('STOP_SIGNAL'); -class ActiveQueue = {}> { +class ActiveQueue = object> { private timer: any; private running = false; private activeJobs: Array> = []; @@ -94,7 +94,7 @@ class ActiveQueue = {}> { const onProgress = (job: Job) => this.jobQueueStrategy.update(job); nextJob.on('progress', onProgress); const cancellationSignal$ = interval(this.pollInterval * 5).pipe( - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion switchMap(() => this.jobQueueStrategy.findOne(nextJob.id!)), filter(job => job?.state === JobState.CANCELLED), take(1), @@ -124,14 +124,16 @@ class ActiveQueue = {}> { nextJob.off('progress', onProgress); return this.onFailOrComplete(nextJob); }) - .catch(err => { - Logger.warn(`Error updating job info: ${err}`); + .catch((err: any) => { + Logger.warn(`Error updating job info: ${JSON.stringify(err)}`); }); } } } catch (e: any) { this.errorNotifier$.next([ - `Job queue "${this.queueName}" encountered an error (set log level to Debug for trace): ${e.message}`, + `Job queue "${ + this.queueName + }" encountered an error (set log level to Debug for trace): ${JSON.stringify(e.message)}`, e.stack, ]); } @@ -140,7 +142,7 @@ class ActiveQueue = {}> { } }; - runNextJobs(); + void runNextJobs(); } stop(): Promise { @@ -162,7 +164,7 @@ class ActiveQueue = {}> { pollTimer = setTimeout(pollActiveJobs, 50); } }; - pollActiveJobs(); + void pollActiveJobs(); }); } @@ -212,7 +214,7 @@ export abstract class PollingJobQueueStrategy extends InjectableJobQueueStrategy } } - async start = {}>( + async start = object>( queueName: string, process: (job: Job) => Promise, ) { @@ -228,7 +230,7 @@ export abstract class PollingJobQueueStrategy extends InjectableJobQueueStrategy this.activeQueues.set(queueName, process, active); } - async stop = {}>( + async stop = object>( queueName: string, process: (job: Job) => Promise, ) { diff --git a/packages/core/src/job-queue/subscribable-job.ts b/packages/core/src/job-queue/subscribable-job.ts index 2f7b16a4d5..ae8cb60739 100644 --- a/packages/core/src/job-queue/subscribable-job.ts +++ b/packages/core/src/job-queue/subscribable-job.ts @@ -27,15 +27,15 @@ export type JobUpdate> = Pick< /** * @description * Job update options, that you can specify by calling {@link SubscribableJob.updates updates()} method. - * + * * @docsCategory JobQueue * @docsPage types */ -export type JobUpdateOptions = { +export type JobUpdateOptions = { /** * Polling interval. Defaults to 200ms */ - pollInterval?: number; + pollInterval?: number; /** * Polling timeout in milliseconds. Defaults to 1 hour */ @@ -43,7 +43,7 @@ export type JobUpdateOptions = { /** * Observable sequence will end with an error if true. Default to false */ - errorOnFail?: boolean; + errorOnFail?: boolean; }; /** @@ -85,19 +85,21 @@ export class SubscribableJob = any> extends Job { `The configured JobQueueStrategy (${strategy.constructor.name}) is not inspectable, so Job updates cannot be subscribed to`, ); } else { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion return interval(pollInterval).pipe( tap(i => { if (timeoutMs < i * pollInterval) { throw new Error( - `Job ${this.id} SubscribableJob update polling timed out after ${timeoutMs}ms. The job may still be running.`, + `Job ${ + this.id ?? '' + } SubscribableJob update polling timed out after ${timeoutMs}ms. The job may still be running.`, ); } }), switchMap(() => { const id = this.id; if (!id) { - throw new Error(`Cannot subscribe to update: Job does not have an ID`); + throw new Error('Cannot subscribe to update: Job does not have an ID'); } return strategy.findOne(id); }), diff --git a/packages/core/src/migrate.ts b/packages/core/src/migrate.ts index 2f998f5e36..608b410fae 100644 --- a/packages/core/src/migrate.ts +++ b/packages/core/src/migrate.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-console */ +/* eslint-disable no-console */ import chalk from 'chalk'; import fs from 'fs-extra'; import path from 'path'; @@ -48,7 +48,7 @@ export async function runMigrations(userConfig: Partial) { console.log(chalk.green(`Successfully ran migration: ${migration.name}`)); } } catch (e: any) { - console.log(chalk.red(`An error occurred when running migrations:`)); + console.log(chalk.red('An error occurred when running migrations:')); console.log(e.message); process.exitCode = 1; } finally { @@ -63,7 +63,7 @@ async function checkMigrationStatus(connection: Connection) { if (builderLog.upQueries.length) { console.log( chalk.yellow( - `Your database schema does not match your current configuration. Generate a new migration for the following changes:`, + 'Your database schema does not match your current configuration. Generate a new migration for the following changes:', ), ); for (const query of builderLog.upQueries) { @@ -87,7 +87,7 @@ export async function revertLastMigration(userConfig: Partial) { connection.undoLastMigration({ transaction: 'each' }), ); } catch (e: any) { - console.log(chalk.red(`An error occurred when reverting migration:`)); + console.log(chalk.red('An error occurred when reverting migration:')); console.log(e.message); process.exitCode = 1; } finally { @@ -120,7 +120,7 @@ export async function generateMigration(userConfig: Partial, opti sqlInMemory.upQueries.forEach(upQuery => { upSqls.push( ' await queryRunner.query("' + - upQuery.query.replace(new RegExp(`"`, 'g'), `\\"`) + + upQuery.query.replace(new RegExp('"', 'g'), '\\"') + '", ' + JSON.stringify(upQuery.parameters) + ');', @@ -129,7 +129,7 @@ export async function generateMigration(userConfig: Partial, opti sqlInMemory.downQueries.forEach(downQuery => { downSqls.push( ' await queryRunner.query("' + - downQuery.query.replace(new RegExp(`"`, 'g'), `\\"`) + + downQuery.query.replace(new RegExp('"', 'g'), '\\"') + '", ' + JSON.stringify(downQuery.parameters) + ');', @@ -159,19 +159,19 @@ export async function generateMigration(userConfig: Partial, opti if (upSqls.length) { if (options.name) { const timestamp = new Date().getTime(); - const filename = timestamp + '-' + options.name + '.ts'; + const filename = timestamp.toString() + '-' + options.name + '.ts'; const directory = options.outputDir; const fileContent = getTemplate(options.name as any, timestamp, upSqls, downSqls.reverse()); const outputPath = directory ? path.join(directory, filename) : path.join(process.cwd(), filename); await fs.ensureFile(outputPath); - await fs.writeFileSync(outputPath, fileContent); + fs.writeFileSync(outputPath, fileContent); console.log(chalk.green(`Migration ${chalk.blue(outputPath)} has been generated successfully.`)); } } else { - console.log(chalk.yellow(`No changes in database schema were found - cannot generate a migration.`)); + console.log(chalk.yellow('No changes in database schema were found - cannot generate a migration.')); } await connection.close(); resetConfig(); diff --git a/packages/core/src/plugin/default-job-queue-plugin/sql-job-buffer-storage-strategy.ts b/packages/core/src/plugin/default-job-queue-plugin/sql-job-buffer-storage-strategy.ts index 0ad41298c0..4dd485d63c 100644 --- a/packages/core/src/plugin/default-job-queue-plugin/sql-job-buffer-storage-strategy.ts +++ b/packages/core/src/plugin/default-job-queue-plugin/sql-job-buffer-storage-strategy.ts @@ -29,14 +29,14 @@ export class SqlJobBufferStorageStrategy implements JobBufferStorageStrategy { } async bufferSize(bufferIds?: string[]): Promise<{ [bufferId: string]: number }> { - const qb = await this.connection.rawConnection + const qb = this.connection.rawConnection .getRepository(JobRecordBuffer) .createQueryBuilder('record') - .select(`COUNT(*)`, 'count') - .addSelect(`record.bufferId`, 'bufferId'); + .select('COUNT(*)', 'count') + .addSelect('record.bufferId', 'bufferId'); if (bufferIds?.length) { - qb.andWhere(`record.bufferId IN (:...bufferIds)`, { bufferIds }); + qb.andWhere('record.bufferId IN (:...bufferIds)', { bufferIds }); } const rows = await qb.groupBy('record.bufferId').getRawMany(); @@ -53,7 +53,7 @@ export class SqlJobBufferStorageStrategy implements JobBufferStorageStrategy { .getRepository(JobRecordBuffer) .createQueryBuilder('record'); if (bufferIds?.length) { - selectQb.where(`record.bufferId IN (:...bufferIds)`, { bufferIds }); + selectQb.where('record.bufferId IN (:...bufferIds)', { bufferIds }); } const rows = await selectQb.getMany(); const result: { [bufferId: string]: Job[] } = {}; @@ -65,7 +65,7 @@ export class SqlJobBufferStorageStrategy implements JobBufferStorageStrategy { } const deleteQb = this.connection.rawConnection.createQueryBuilder().delete().from(JobRecordBuffer); if (bufferIds?.length) { - deleteQb.where(`bufferId IN (:...bufferIds)`, { bufferIds }); + deleteQb.where('bufferId IN (:...bufferIds)', { bufferIds }); } await deleteQb.execute(); return result; diff --git a/packages/core/src/plugin/default-job-queue-plugin/sql-job-queue-strategy.ts b/packages/core/src/plugin/default-job-queue-plugin/sql-job-queue-strategy.ts index e362999783..8388e66a9b 100644 --- a/packages/core/src/plugin/default-job-queue-plugin/sql-job-queue-strategy.ts +++ b/packages/core/src/plugin/default-job-queue-plugin/sql-job-queue-strategy.ts @@ -34,7 +34,7 @@ export class SqlJobQueueStrategy extends PollingJobQueueStrategy implements Insp super.destroy(); } - async add = {}>(job: Job): Promise> { + async add = object>(job: Job): Promise> { if (!this.connectionAvailable(this.connection)) { throw new Error('Connection not available'); } @@ -48,7 +48,7 @@ export class SqlJobQueueStrategy extends PollingJobQueueStrategy implements Insp * MySQL & MariaDB store job data as a "text" type which has a limit of 64kb. Going over that limit will cause the job to not be stored. * In order to try to prevent that, this method will truncate any strings in the `data` object over 2kb in size. */ - private constrainDataSize = {}>(job: Job): Data | undefined { + private constrainDataSize = object>(job: Job): Data | undefined { const type = this.connection?.options.type; if (type === 'mysql' || type === 'mariadb') { const stringified = JSON.stringify(job.data); @@ -239,7 +239,7 @@ export class SqlJobQueueStrategy extends PollingJobQueueStrategy implements Insp }); } - private fromRecord(jobRecord: JobRecord): Job { + private fromRecord(this: void, jobRecord: JobRecord): Job { return new Job(jobRecord); } } diff --git a/packages/core/src/plugin/default-search-plugin/api/fulltext-search.resolver.ts b/packages/core/src/plugin/default-search-plugin/api/fulltext-search.resolver.ts index 5de945cf08..171bf92363 100644 --- a/packages/core/src/plugin/default-search-plugin/api/fulltext-search.resolver.ts +++ b/packages/core/src/plugin/default-search-plugin/api/fulltext-search.resolver.ts @@ -105,7 +105,7 @@ export class AdminFulltextSearchResolver implements BaseSearchResolver { @Allow(Permission.UpdateCatalog, Permission.UpdateProduct) async runPendingSearchIndexUpdates(...args: any[]): Promise { // Intentionally not awaiting this method call - this.searchJobBufferService.runPendingSearchUpdates(); + void this.searchJobBufferService.runPendingSearchUpdates(); return { success: true }; } } diff --git a/packages/core/src/plugin/default-search-plugin/fulltext-search.service.ts b/packages/core/src/plugin/default-search-plugin/fulltext-search.service.ts index eefa08ee4f..956436ad09 100644 --- a/packages/core/src/plugin/default-search-plugin/fulltext-search.service.ts +++ b/packages/core/src/plugin/default-search-plugin/fulltext-search.service.ts @@ -131,7 +131,7 @@ export class FulltextSearchService { this._searchStrategy = new PostgresSearchStrategy(); break; default: - throw new InternalServerError(`error.database-not-supported-by-default-search-plugin`); + throw new InternalServerError('error.database-not-supported-by-default-search-plugin'); } } } diff --git a/packages/core/src/plugin/default-search-plugin/indexer/indexer.controller.ts b/packages/core/src/plugin/default-search-plugin/indexer/indexer.controller.ts index d0b73c28ee..01882ce196 100644 --- a/packages/core/src/plugin/default-search-plugin/indexer/indexer.controller.ts +++ b/packages/core/src/plugin/default-search-plugin/indexer/indexer.controller.ts @@ -15,8 +15,8 @@ import { ConfigService } from '../../../config/config.service'; import { Logger } from '../../../config/logger/vendure-logger'; import { TransactionalConnection } from '../../../connection/transactional-connection'; import { FacetValue } from '../../../entity/facet-value/facet-value.entity'; -import { ProductVariant } from '../../../entity/product-variant/product-variant.entity'; import { Product } from '../../../entity/product/product.entity'; +import { ProductVariant } from '../../../entity/product-variant/product-variant.entity'; import { ProductPriceApplicator } from '../../../service/helpers/product-price-applicator/product-price-applicator'; import { ProductVariantService } from '../../../service/services/product-variant.service'; import { PLUGIN_INIT_OPTIONS } from '../constants'; @@ -90,7 +90,7 @@ export class IndexerController { duration: +new Date() - timeStart, }); } - Logger.verbose(`Completed reindexing`, workerLoggerCtx); + Logger.verbose('Completed reindexing', workerLoggerCtx); return { total: count, @@ -132,7 +132,7 @@ export class IndexerController { }); } } - Logger.verbose(`Completed reindexing!`); + Logger.verbose('Completed reindexing!'); return { total: ids.length, completed: ids.length, diff --git a/packages/core/src/plugin/default-search-plugin/indexer/mutable-request-context.ts b/packages/core/src/plugin/default-search-plugin/indexer/mutable-request-context.ts index 2bcf6e2227..6f3fe8a390 100644 --- a/packages/core/src/plugin/default-search-plugin/indexer/mutable-request-context.ts +++ b/packages/core/src/plugin/default-search-plugin/indexer/mutable-request-context.ts @@ -30,7 +30,7 @@ export class MutableRequestContext extends RequestContext { static deserialize(ctxObject: SerializedRequestContext): MutableRequestContext { return new MutableRequestContext({ - req: ctxObject._req as any, + req: ctxObject._req, apiType: ctxObject._apiType, channel: new Channel(ctxObject._channel), session: { diff --git a/packages/core/src/plugin/default-search-plugin/indexer/search-index.service.ts b/packages/core/src/plugin/default-search-plugin/indexer/search-index.service.ts index 8d899270d6..f5e3859c04 100644 --- a/packages/core/src/plugin/default-search-plugin/indexer/search-index.service.ts +++ b/packages/core/src/plugin/default-search-plugin/indexer/search-index.service.ts @@ -6,8 +6,8 @@ import { Observable } from 'rxjs'; import { RequestContext } from '../../../api/common/request-context'; import { Logger } from '../../../config/logger/vendure-logger'; import { Asset } from '../../../entity/asset/asset.entity'; -import { ProductVariant } from '../../../entity/product-variant/product-variant.entity'; import { Product } from '../../../entity/product/product.entity'; +import { ProductVariant } from '../../../entity/product-variant/product-variant.entity'; import { Job } from '../../../job-queue/job'; import { JobQueue } from '../../../job-queue/job-queue'; import { JobQueueService } from '../../../job-queue/job-queue.service'; @@ -31,7 +31,7 @@ export class SearchIndexService implements OnApplicationBootstrap { const data = job.data; switch (data.type) { case 'reindex': - Logger.verbose(`sending ReindexMessage`); + Logger.verbose('sending ReindexMessage'); return this.jobWithProgress(job, this.indexerController.reindex(data)); case 'update-product': return this.indexerController.updateProduct(data); @@ -68,37 +68,45 @@ export class SearchIndexService implements OnApplicationBootstrap { } updateProduct(ctx: RequestContext, product: Product) { - this.updateIndexQueue.add({ type: 'update-product', ctx: ctx.serialize(), productId: product.id }); + return this.updateIndexQueue.add({ + type: 'update-product', + ctx: ctx.serialize(), + productId: product.id, + }); } updateVariants(ctx: RequestContext, variants: ProductVariant[]) { const variantIds = variants.map(v => v.id); - this.updateIndexQueue.add({ type: 'update-variants', ctx: ctx.serialize(), variantIds }); + return this.updateIndexQueue.add({ type: 'update-variants', ctx: ctx.serialize(), variantIds }); } deleteProduct(ctx: RequestContext, product: Product) { - this.updateIndexQueue.add({ type: 'delete-product', ctx: ctx.serialize(), productId: product.id }); + return this.updateIndexQueue.add({ + type: 'delete-product', + ctx: ctx.serialize(), + productId: product.id, + }); } deleteVariant(ctx: RequestContext, variants: ProductVariant[]) { const variantIds = variants.map(v => v.id); - this.updateIndexQueue.add({ type: 'delete-variant', ctx: ctx.serialize(), variantIds }); + return this.updateIndexQueue.add({ type: 'delete-variant', ctx: ctx.serialize(), variantIds }); } updateVariantsById(ctx: RequestContext, ids: ID[]) { - this.updateIndexQueue.add({ type: 'update-variants-by-id', ctx: ctx.serialize(), ids }); + return this.updateIndexQueue.add({ type: 'update-variants-by-id', ctx: ctx.serialize(), ids }); } updateAsset(ctx: RequestContext, asset: Asset) { - this.updateIndexQueue.add({ type: 'update-asset', ctx: ctx.serialize(), asset: asset as any }); + return this.updateIndexQueue.add({ type: 'update-asset', ctx: ctx.serialize(), asset: asset as any }); } deleteAsset(ctx: RequestContext, asset: Asset) { - this.updateIndexQueue.add({ type: 'delete-asset', ctx: ctx.serialize(), asset: asset as any }); + return this.updateIndexQueue.add({ type: 'delete-asset', ctx: ctx.serialize(), asset: asset as any }); } assignProductToChannel(ctx: RequestContext, productId: ID, channelId: ID) { - this.updateIndexQueue.add({ + return this.updateIndexQueue.add({ type: 'assign-product-to-channel', ctx: ctx.serialize(), productId, @@ -107,7 +115,7 @@ export class SearchIndexService implements OnApplicationBootstrap { } removeProductFromChannel(ctx: RequestContext, productId: ID, channelId: ID) { - this.updateIndexQueue.add({ + return this.updateIndexQueue.add({ type: 'remove-product-from-channel', ctx: ctx.serialize(), productId, @@ -116,7 +124,7 @@ export class SearchIndexService implements OnApplicationBootstrap { } assignVariantToChannel(ctx: RequestContext, productVariantId: ID, channelId: ID) { - this.updateIndexQueue.add({ + return this.updateIndexQueue.add({ type: 'assign-variant-to-channel', ctx: ctx.serialize(), productVariantId, @@ -125,7 +133,7 @@ export class SearchIndexService implements OnApplicationBootstrap { } removeVariantFromChannel(ctx: RequestContext, productVariantId: ID, channelId: ID) { - this.updateIndexQueue.add({ + return this.updateIndexQueue.add({ type: 'remove-variant-from-channel', ctx: ctx.serialize(), productVariantId, diff --git a/packages/core/src/plugin/default-search-plugin/search-strategy/mysql-search-strategy.ts b/packages/core/src/plugin/default-search-plugin/search-strategy/mysql-search-strategy.ts index 40c58e46dc..5c1c7a722e 100644 --- a/packages/core/src/plugin/default-search-plugin/search-strategy/mysql-search-strategy.ts +++ b/packages/core/src/plugin/default-search-plugin/search-strategy/mysql-search-strategy.ts @@ -160,7 +160,7 @@ export class MysqlSearchStrategy implements SearchStrategy { .createQueryBuilder('si_inner') .select('si_inner.productId', 'inner_productId') .addSelect('si_inner.productVariantId', 'inner_productVariantId') - .addSelect(`IF (si_inner.sku LIKE :like_term, 10, 0)`, 'sku_score') + .addSelect('IF (si_inner.sku LIKE :like_term, 10, 0)', 'sku_score') .addSelect( `(SELECT sku_score) + MATCH (si_inner.productName) AGAINST (:term IN BOOLEAN MODE) * 2 + @@ -243,10 +243,10 @@ export class MysqlSearchStrategy implements SearchStrategy { ); } if (collectionId) { - qb.andWhere(`FIND_IN_SET (:collectionId, si.collectionIds)`, { collectionId }); + qb.andWhere('FIND_IN_SET (:collectionId, si.collectionIds)', { collectionId }); } if (collectionSlug) { - qb.andWhere(`FIND_IN_SET (:collectionSlug, si.collectionSlugs)`, { collectionSlug }); + qb.andWhere('FIND_IN_SET (:collectionSlug, si.collectionSlugs)', { collectionSlug }); } applyLanguageConstraints(qb, ctx.languageCode, ctx.channel.defaultLanguageCode); diff --git a/packages/core/src/plugin/default-search-plugin/search-strategy/postgres-search-strategy.ts b/packages/core/src/plugin/default-search-plugin/search-strategy/postgres-search-strategy.ts index 48daddd4bf..01ea7f834c 100644 --- a/packages/core/src/plugin/default-search-plugin/search-strategy/postgres-search-strategy.ts +++ b/packages/core/src/plugin/default-search-plugin/search-strategy/postgres-search-strategy.ts @@ -42,7 +42,7 @@ export class PostgresSearchStrategy implements SearchStrategy { .getRepository(ctx, SearchIndexItem) .createQueryBuilder('si') .select(['"si"."productId"', 'MAX("si"."productVariantId")']) - .addSelect(`string_agg("si"."facetValueIds",',')`, 'facetValues'); + .addSelect('string_agg("si"."facetValueIds",\',\')', 'facetValues'); this.applyTermAndFilters(ctx, facetValuesQb, input, true); if (!input.groupByProduct) { @@ -64,7 +64,7 @@ export class PostgresSearchStrategy implements SearchStrategy { .getRepository(ctx, SearchIndexItem) .createQueryBuilder('si') .select(['"si"."productId"', 'MAX("si"."productVariantId")']) - .addSelect(`string_agg("si"."collectionIds",',')`, 'collections'); + .addSelect('string_agg("si"."collectionIds",\',\')', 'collections'); this.applyTermAndFilters(ctx, collectionsQb, input, true); if (!input.groupByProduct) { @@ -237,10 +237,10 @@ export class PostgresSearchStrategy implements SearchStrategy { ); } if (collectionId) { - qb.andWhere(`:collectionId = ANY (string_to_array(si.collectionIds, ','))`, { collectionId }); + qb.andWhere(":collectionId = ANY (string_to_array(si.collectionIds, ','))", { collectionId }); } if (collectionSlug) { - qb.andWhere(`:collectionSlug = ANY (string_to_array(si.collectionSlugs, ','))`, { + qb.andWhere(":collectionSlug = ANY (string_to_array(si.collectionSlugs, ','))", { collectionSlug, }); } diff --git a/packages/core/src/plugin/default-search-plugin/search-strategy/search-strategy-utils.ts b/packages/core/src/plugin/default-search-plugin/search-strategy/search-strategy-utils.ts index b908fa9b08..c8c54c5db8 100644 --- a/packages/core/src/plugin/default-search-plugin/search-strategy/search-strategy-utils.ts +++ b/packages/core/src/plugin/default-search-plugin/search-strategy/search-strategy-utils.ts @@ -63,6 +63,7 @@ export function mapToSearchResult(raw: any, currencyCode: CurrencyCode): SearchR productAsset, productVariantAsset, score: raw.score || 0, + // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore inStock: raw.si_inStock, }; diff --git a/packages/core/src/plugin/default-search-plugin/search-strategy/sqlite-search-strategy.ts b/packages/core/src/plugin/default-search-plugin/search-strategy/sqlite-search-strategy.ts index 072806f113..ac831471c9 100644 --- a/packages/core/src/plugin/default-search-plugin/search-strategy/sqlite-search-strategy.ts +++ b/packages/core/src/plugin/default-search-plugin/search-strategy/sqlite-search-strategy.ts @@ -220,12 +220,12 @@ export class SqliteSearchStrategy implements SearchStrategy { ); } if (collectionId) { - qb.andWhere(`(',' || si.collectionIds || ',') LIKE :collectionId`, { + qb.andWhere("(',' || si.collectionIds || ',') LIKE :collectionId", { collectionId: `%,${collectionId},%`, }); } if (collectionSlug) { - qb.andWhere(`(',' || si.collectionSlugs || ',') LIKE :collectionSlug`, { + qb.andWhere("(',' || si.collectionSlugs || ',') LIKE :collectionSlug", { collectionSlug: `%,${collectionSlug},%`, }); } diff --git a/packages/core/src/plugin/dynamic-plugin-api.module.ts b/packages/core/src/plugin/dynamic-plugin-api.module.ts index c828b4a313..5a6733b91d 100644 --- a/packages/core/src/plugin/dynamic-plugin-api.module.ts +++ b/packages/core/src/plugin/dynamic-plugin-api.module.ts @@ -49,5 +49,5 @@ export function getDynamicGraphQlModulesForPlugins(apiType: 'shop' | 'admin'): A } function dynamicClassName(module: Type, apiType: 'shop' | 'admin'): string { - return module.name + `Dynamic` + (apiType === 'shop' ? 'Shop' : 'Admin') + 'Module'; + return module.name + 'Dynamic' + (apiType === 'shop' ? 'Shop' : 'Admin') + 'Module'; } diff --git a/packages/core/src/plugin/plugin-utils.ts b/packages/core/src/plugin/plugin-utils.ts index ee4059273f..809e0120c0 100644 --- a/packages/core/src/plugin/plugin-utils.ts +++ b/packages/core/src/plugin/plugin-utils.ts @@ -41,7 +41,7 @@ export function createProxyHandler(options: ProxyOptions): RequestHandler { // TODO: how do we detect https? target: `http://${proxyHostname}:${options.port}`, pathRewrite: { - [`^${route}`]: `/` + (options.basePath || ''), + [`^${route}`]: '/' + (options.basePath || ''), }, logProvider(provider) { return { diff --git a/packages/core/src/plugin/vendure-plugin.ts b/packages/core/src/plugin/vendure-plugin.ts index 35f6e5bd3d..155d5b4cad 100644 --- a/packages/core/src/plugin/vendure-plugin.ts +++ b/packages/core/src/plugin/vendure-plugin.ts @@ -130,7 +130,7 @@ export type PluginConfigurationFn = ( * @docsCategory plugin */ export function VendurePlugin(pluginMetadata: VendurePluginMetadata): ClassDecorator { - // tslint:disable-next-line:ban-types + // eslint-disable-next-line @typescript-eslint/ban-types return (target: Function) => { for (const metadataProperty of Object.values(PLUGIN_METADATA)) { const property = metadataProperty as keyof VendurePluginMetadata; diff --git a/packages/core/src/service/helpers/active-order/active-order.service.ts b/packages/core/src/service/helpers/active-order/active-order.service.ts index 2fd313598a..2945f6d23a 100644 --- a/packages/core/src/service/helpers/active-order/active-order.service.ts +++ b/packages/core/src/service/helpers/active-order/active-order.service.ts @@ -37,7 +37,7 @@ export class ActiveOrderService { async getOrderFromContext(ctx: RequestContext, createIfNotExists: true): Promise; async getOrderFromContext(ctx: RequestContext, createIfNotExists = false): Promise { if (!ctx.session) { - throw new InternalServerError(`error.no-active-session`); + throw new InternalServerError('error.no-active-session'); } let order = ctx.session.activeOrderId ? await this.connection diff --git a/packages/core/src/service/helpers/config-arg/config-arg.service.ts b/packages/core/src/service/helpers/config-arg/config-arg.service.ts index 6c4cc37d49..75d864d62b 100644 --- a/packages/core/src/service/helpers/config-arg/config-arg.service.ts +++ b/packages/core/src/service/helpers/config-arg/config-arg.service.ts @@ -55,12 +55,12 @@ export class ConfigArgService { const defsOfType = this.getDefinitions(defType); const match = defsOfType.find(def => def.code === code); if (!match) { - throw new UserInputError(`error.no-configurable-operation-def-with-code-found`, { + throw new UserInputError('error.no-configurable-operation-def-with-code-found', { code, type: defType, }); } - return match as ConfigDefTypeMap[T]; + return match; } /** diff --git a/packages/core/src/service/helpers/custom-field-relation/custom-field-relation.service.ts b/packages/core/src/service/helpers/custom-field-relation/custom-field-relation.service.ts index 2ff2996857..f02f824f16 100644 --- a/packages/core/src/service/helpers/custom-field-relation/custom-field-relation.service.ts +++ b/packages/core/src/service/helpers/custom-field-relation/custom-field-relation.service.ts @@ -65,7 +65,7 @@ export class CustomFieldRelationService { return entity; } - private isRelationalType(input: CustomFieldConfig): input is RelationCustomFieldConfig { + private isRelationalType(this: void, input: CustomFieldConfig): input is RelationCustomFieldConfig { return input.type === 'relation'; } diff --git a/packages/core/src/service/helpers/fulfillment-state-machine/fulfillment-state-machine.ts b/packages/core/src/service/helpers/fulfillment-state-machine/fulfillment-state-machine.ts index c804bb5d65..c8348e7bfa 100644 --- a/packages/core/src/service/helpers/fulfillment-state-machine/fulfillment-state-machine.ts +++ b/packages/core/src/service/helpers/fulfillment-state-machine/fulfillment-state-machine.ts @@ -31,7 +31,7 @@ export class FulfillmentStateMachine { return new FSM(this.config, currentState).canTransitionTo(newState); } - getNextStates(fulfillment: Fulfillment): ReadonlyArray { + getNextStates(fulfillment: Fulfillment): readonly FulfillmentState[] { const fsm = new FSM(this.config, fulfillment.state); return fsm.getNextStates(); } diff --git a/packages/core/src/service/helpers/list-query-builder/list-query-builder.ts b/packages/core/src/service/helpers/list-query-builder/list-query-builder.ts index a1a9cb51d3..913198853f 100644 --- a/packages/core/src/service/helpers/list-query-builder/list-query-builder.ts +++ b/packages/core/src/service/helpers/list-query-builder/list-query-builder.ts @@ -224,7 +224,7 @@ export class ListQueryBuilder implements OnApplicationBootstrap { // a Collection that joins its parent entity. // relationLoadStrategy: 'query', }); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion FindOptionsUtils.joinEagerRelations(qb, qb.alias, qb.expressionMap.mainAlias!.metadata); // join the tables required by calculated columns diff --git a/packages/core/src/service/helpers/list-query-builder/parse-filter-params.spec.ts b/packages/core/src/service/helpers/list-query-builder/parse-filter-params.spec.ts index 6e81fe8a28..b03b57e20c 100644 --- a/packages/core/src/service/helpers/list-query-builder/parse-filter-params.spec.ts +++ b/packages/core/src/service/helpers/list-query-builder/parse-filter-params.spec.ts @@ -25,7 +25,7 @@ describe('parseFilterParams()', () => { }, }; const result = parseFilterParams(connection as any, Product, filterParams); - expect(result[0].clause).toBe(`product.name = :arg1`); + expect(result[0].clause).toBe('product.name = :arg1'); expect(result[0].parameters).toEqual({ arg1: 'foo' }); }); @@ -41,9 +41,9 @@ describe('parseFilterParams()', () => { }, }; const result = parseFilterParams(connection as any, Product, filterParams); - expect(result[0].clause).toBe(`product.name = :arg1`); + expect(result[0].clause).toBe('product.name = :arg1'); expect(result[0].parameters).toEqual({ arg1: 'foo' }); - expect(result[1].clause).toBe(`product.id = :arg2`); + expect(result[1].clause).toBe('product.id = :arg2'); expect(result[1].parameters).toEqual({ arg2: '123' }); }); @@ -65,9 +65,9 @@ describe('parseFilterParams()', () => { }, }; const result = parseFilterParams(connection as any, Product, filterParams); - expect(result[0].clause).toBe(`product_translations.name = :arg1`); + expect(result[0].clause).toBe('product_translations.name = :arg1'); expect(result[0].parameters).toEqual({ arg1: 'foo' }); - expect(result[1].clause).toBe(`product.id = :arg2`); + expect(result[1].clause).toBe('product.id = :arg2'); expect(result[1].parameters).toEqual({ arg2: '123' }); }); @@ -81,7 +81,7 @@ describe('parseFilterParams()', () => { }, }; const result = parseFilterParams(connection as any, Product, filterParams); - expect(result[0].clause).toBe(`product.name = :arg1`); + expect(result[0].clause).toBe('product.name = :arg1'); expect(result[0].parameters).toEqual({ arg1: 'foo' }); }); @@ -94,7 +94,7 @@ describe('parseFilterParams()', () => { }, }; const result = parseFilterParams(connection as any, Product, filterParams); - expect(result[0].clause).toBe(`product.name LIKE :arg1`); + expect(result[0].clause).toBe('product.name LIKE :arg1'); expect(result[0].parameters).toEqual({ arg1: '%foo%' }); }); }); @@ -109,7 +109,7 @@ describe('parseFilterParams()', () => { }, }; const result = parseFilterParams(connection as any, Product, filterParams); - expect(result[0].clause).toBe(`product.price = :arg1`); + expect(result[0].clause).toBe('product.price = :arg1'); expect(result[0].parameters).toEqual({ arg1: 123 }); }); @@ -122,7 +122,7 @@ describe('parseFilterParams()', () => { }, }; const result = parseFilterParams(connection as any, Product, filterParams); - expect(result[0].clause).toBe(`product.price < :arg1`); + expect(result[0].clause).toBe('product.price < :arg1'); expect(result[0].parameters).toEqual({ arg1: 123 }); }); @@ -135,7 +135,7 @@ describe('parseFilterParams()', () => { }, }; const result = parseFilterParams(connection as any, Product, filterParams); - expect(result[0].clause).toBe(`product.price <= :arg1`); + expect(result[0].clause).toBe('product.price <= :arg1'); expect(result[0].parameters).toEqual({ arg1: 123 }); }); @@ -148,7 +148,7 @@ describe('parseFilterParams()', () => { }, }; const result = parseFilterParams(connection as any, Product, filterParams); - expect(result[0].clause).toBe(`product.price > :arg1`); + expect(result[0].clause).toBe('product.price > :arg1'); expect(result[0].parameters).toEqual({ arg1: 123 }); }); @@ -161,7 +161,7 @@ describe('parseFilterParams()', () => { }, }; const result = parseFilterParams(connection as any, Product, filterParams); - expect(result[0].clause).toBe(`product.price >= :arg1`); + expect(result[0].clause).toBe('product.price >= :arg1'); expect(result[0].parameters).toEqual({ arg1: 123 }); }); @@ -177,7 +177,7 @@ describe('parseFilterParams()', () => { }, }; const result = parseFilterParams(connection as any, Product, filterParams); - expect(result[0].clause).toBe(`product.price BETWEEN :arg1_a AND :arg1_b`); + expect(result[0].clause).toBe('product.price BETWEEN :arg1_a AND :arg1_b'); expect(result[0].parameters).toEqual({ arg1_a: 10, arg1_b: 50 }); }); }); @@ -192,7 +192,7 @@ describe('parseFilterParams()', () => { }, }; const result = parseFilterParams(connection as any, Product, filterParams); - expect(result[0].clause).toBe(`product.createdAt = :arg1`); + expect(result[0].clause).toBe('product.createdAt = :arg1'); expect(result[0].parameters).toEqual({ arg1: '2018-01-01 10:00:00.000' }); }); @@ -205,7 +205,7 @@ describe('parseFilterParams()', () => { }, }; const result = parseFilterParams(connection as any, Product, filterParams); - expect(result[0].clause).toBe(`product.createdAt < :arg1`); + expect(result[0].clause).toBe('product.createdAt < :arg1'); expect(result[0].parameters).toEqual({ arg1: '2018-01-01 10:00:00.000' }); }); @@ -218,7 +218,7 @@ describe('parseFilterParams()', () => { }, }; const result = parseFilterParams(connection as any, Product, filterParams); - expect(result[0].clause).toBe(`product.createdAt > :arg1`); + expect(result[0].clause).toBe('product.createdAt > :arg1'); expect(result[0].parameters).toEqual({ arg1: '2018-01-01 10:00:00.000' }); }); @@ -234,7 +234,7 @@ describe('parseFilterParams()', () => { }, }; const result = parseFilterParams(connection as any, Product, filterParams); - expect(result[0].clause).toBe(`product.createdAt BETWEEN :arg1_a AND :arg1_b`); + expect(result[0].clause).toBe('product.createdAt BETWEEN :arg1_a AND :arg1_b'); expect(result[0].parameters).toEqual({ arg1_a: '2018-01-01 10:00:00.000', arg1_b: '2018-02-01 10:00:00.000', @@ -252,7 +252,7 @@ describe('parseFilterParams()', () => { }, }; const result = parseFilterParams(connection as any, Product, filterParams); - expect(result[0].clause).toBe(`product.available = :arg1`); + expect(result[0].clause).toBe('product.available = :arg1'); expect(result[0].parameters).toEqual({ arg1: true }); }); }); diff --git a/packages/core/src/service/helpers/list-query-builder/parse-filter-params.ts b/packages/core/src/service/helpers/list-query-builder/parse-filter-params.ts index 08c0da1333..c2ff2487cb 100644 --- a/packages/core/src/service/helpers/list-query-builder/parse-filter-params.ts +++ b/packages/core/src/service/helpers/list-query-builder/parse-filter-params.ts @@ -104,6 +104,7 @@ function buildWhereCondition( return { clause: `${fieldName} ${LIKE} :arg${argIndex}`, parameters: { + // eslint-disable-next-line @typescript-eslint/restrict-template-expressions [`arg${argIndex}`]: `%${typeof operand === 'string' ? operand.trim() : operand}%`, }, }; @@ -112,6 +113,7 @@ function buildWhereCondition( const LIKE = dbType === 'postgres' ? 'ILIKE' : 'LIKE'; return { clause: `${fieldName} NOT ${LIKE} :arg${argIndex}`, + // eslint-disable-next-line @typescript-eslint/restrict-template-expressions parameters: { [`arg${argIndex}`]: `%${operand.trim()}%` }, }; } diff --git a/packages/core/src/service/helpers/locale-string-hydrator/locale-string-hydrator.ts b/packages/core/src/service/helpers/locale-string-hydrator/locale-string-hydrator.ts index a265ca6332..a4ef9c4782 100644 --- a/packages/core/src/service/helpers/locale-string-hydrator/locale-string-hydrator.ts +++ b/packages/core/src/service/helpers/locale-string-hydrator/locale-string-hydrator.ts @@ -58,7 +58,7 @@ export class LocaleStringHydrator { } await dbCallPromise.then(withTranslations => { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion entity.translations = withTranslations!.translations; }); } diff --git a/packages/core/src/service/helpers/order-calculator/order-calculator.spec.ts b/packages/core/src/service/helpers/order-calculator/order-calculator.spec.ts index b3be6facb7..6ee226be36 100644 --- a/packages/core/src/service/helpers/order-calculator/order-calculator.spec.ts +++ b/packages/core/src/service/helpers/order-calculator/order-calculator.spec.ts @@ -43,7 +43,7 @@ describe('OrderCalculator', () => { let orderCalculator: OrderCalculator; beforeAll(async () => { - ensureConfigLoaded(); + await ensureConfigLoaded(); const module = await createTestModule(); orderCalculator = module.get(OrderCalculator); const mockConfigService = module.get(ConfigService); diff --git a/packages/core/src/service/helpers/order-calculator/order-calculator.ts b/packages/core/src/service/helpers/order-calculator/order-calculator.ts index 295b777a6b..c8d01d0327 100644 --- a/packages/core/src/service/helpers/order-calculator/order-calculator.ts +++ b/packages/core/src/service/helpers/order-calculator/order-calculator.ts @@ -64,7 +64,7 @@ export class OrderCalculator { let taxZoneChanged = false; if (!activeTaxZone) { - throw new InternalServerError(`error.no-active-tax-zone`); + throw new InternalServerError('error.no-active-tax-zone'); } if (!order.taxZoneId || !idsAreEqual(order.taxZoneId, activeTaxZone.id)) { order.taxZoneId = activeTaxZone.id; diff --git a/packages/core/src/service/helpers/order-merger/order-merger.ts b/packages/core/src/service/helpers/order-merger/order-merger.ts index 635405a910..57d9f004c7 100644 --- a/packages/core/src/service/helpers/order-merger/order-merger.ts +++ b/packages/core/src/service/helpers/order-merger/order-merger.ts @@ -6,8 +6,8 @@ import { RequestContext } from '../../../api/common/request-context'; import { idsAreEqual } from '../../../common/utils'; import { ConfigService } from '../../../config/config.service'; import { MergedOrderLine } from '../../../config/order/order-merge-strategy'; -import { OrderLine } from '../../../entity/order-line/order-line.entity'; import { Order } from '../../../entity/order/order.entity'; +import { OrderLine } from '../../../entity/order-line/order-line.entity'; export type OrderWithNoLines = Order & { lines: undefined }; export type OrderWithEmptyLines = Order & { lines: ArrayLike & { length: 0 } }; diff --git a/packages/core/src/service/helpers/order-modifier/order-modifier.ts b/packages/core/src/service/helpers/order-modifier/order-modifier.ts index 610c1ce95b..2f2a2f2c79 100644 --- a/packages/core/src/service/helpers/order-modifier/order-modifier.ts +++ b/packages/core/src/service/helpers/order-modifier/order-modifier.ts @@ -36,11 +36,11 @@ import { ConfigService } from '../../../config/config.service'; import { CustomFieldConfig } from '../../../config/custom-field/custom-field-types'; import { TransactionalConnection } from '../../../connection/transactional-connection'; import { VendureEntity } from '../../../entity/base/base.entity'; +import { Order } from '../../../entity/order/order.entity'; +import { OrderLine } from '../../../entity/order-line/order-line.entity'; import { FulfillmentLine } from '../../../entity/order-line-reference/fulfillment-line.entity'; import { OrderModificationLine } from '../../../entity/order-line-reference/order-modification-line.entity'; -import { OrderLine } from '../../../entity/order-line/order-line.entity'; import { OrderModification } from '../../../entity/order-modification/order-modification.entity'; -import { Order } from '../../../entity/order/order.entity'; import { Payment } from '../../../entity/payment/payment.entity'; import { ProductVariant } from '../../../entity/product-variant/product-variant.entity'; import { ShippingLine } from '../../../entity/shipping-line/shipping-line.entity'; @@ -433,7 +433,7 @@ export class OrderModifier { } const orderLine = order.lines.find(line => idsAreEqual(line.id, orderLineId)); if (!orderLine) { - throw new UserInputError(`error.order-does-not-contain-line-with-id`, { id: orderLineId }); + throw new UserInputError('error.order-does-not-contain-line-with-id', { id: orderLineId }); } const initialLineQuantity = orderLine.quantity; let correctedQuantity = quantity; @@ -736,7 +736,7 @@ export class OrderModifier { } else if (def.type === 'relation') { const inputId = getGraphQlInputName(def); const inputValue = inputCustomFields?.[inputId]; - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const existingRelation = (lineWithCustomFieldRelations!.customFields as any)[key]; if (inputValue) { const customFieldNotEqual = def.list diff --git a/packages/core/src/service/helpers/order-splitter/order-splitter.ts b/packages/core/src/service/helpers/order-splitter/order-splitter.ts index 245e9114fc..31b09ca41e 100644 --- a/packages/core/src/service/helpers/order-splitter/order-splitter.ts +++ b/packages/core/src/service/helpers/order-splitter/order-splitter.ts @@ -6,8 +6,8 @@ import { RequestContext } from '../../../api/common/request-context'; import { ConfigService } from '../../../config/config.service'; import { TransactionalConnection } from '../../../connection/transactional-connection'; import { Channel } from '../../../entity/channel/channel.entity'; -import { OrderLine } from '../../../entity/order-line/order-line.entity'; import { Order } from '../../../entity/order/order.entity'; +import { OrderLine } from '../../../entity/order-line/order-line.entity'; import { ShippingLine } from '../../../entity/shipping-line/shipping-line.entity'; import { ChannelService } from '../../services/channel.service'; import { OrderService } from '../../services/order.service'; diff --git a/packages/core/src/service/helpers/order-state-machine/order-state-machine.ts b/packages/core/src/service/helpers/order-state-machine/order-state-machine.ts index 048ba0824a..318bf35994 100644 --- a/packages/core/src/service/helpers/order-state-machine/order-state-machine.ts +++ b/packages/core/src/service/helpers/order-state-machine/order-state-machine.ts @@ -31,7 +31,7 @@ export class OrderStateMachine { return new FSM(this.config, currentState).canTransitionTo(newState); } - getNextStates(order: Order): ReadonlyArray { + getNextStates(order: Order): readonly OrderState[] { const fsm = new FSM(this.config, order.state); return fsm.getNextStates(); } diff --git a/packages/core/src/service/helpers/payment-state-machine/payment-state-machine.ts b/packages/core/src/service/helpers/payment-state-machine/payment-state-machine.ts index ce1174e75e..fb609eb238 100644 --- a/packages/core/src/service/helpers/payment-state-machine/payment-state-machine.ts +++ b/packages/core/src/service/helpers/payment-state-machine/payment-state-machine.ts @@ -30,7 +30,7 @@ export class PaymentStateMachine { return new FSM(this.config, currentState).canTransitionTo(newState); } - getNextStates(payment: Payment): ReadonlyArray { + getNextStates(payment: Payment): readonly PaymentState[] { const fsm = new FSM(this.config, payment.state); return fsm.getNextStates(); } diff --git a/packages/core/src/service/helpers/product-price-applicator/product-price-applicator.ts b/packages/core/src/service/helpers/product-price-applicator/product-price-applicator.ts index 78f953f19e..d4c278f2d2 100644 --- a/packages/core/src/service/helpers/product-price-applicator/product-price-applicator.ts +++ b/packages/core/src/service/helpers/product-price-applicator/product-price-applicator.ts @@ -64,18 +64,18 @@ export class ProductPriceApplicator { variant.productVariantPrices, ); if (!channelPrice) { - throw new InternalServerError(`error.no-price-found-for-channel`, { + throw new InternalServerError('error.no-price-found-for-channel', { variantId: variant.id, channel: ctx.channel.code, }); } const { taxZoneStrategy } = this.configService.taxOptions; const zones = await this.requestCache.get(ctx, 'allZones', () => this.zoneService.findAll(ctx)); - const activeTaxZone = await this.requestCache.get(ctx, `activeTaxZone`, () => + const activeTaxZone = await this.requestCache.get(ctx, 'activeTaxZone', () => taxZoneStrategy.determineTaxZone(ctx, zones, ctx.channel, order), ); if (!activeTaxZone) { - throw new InternalServerError(`error.no-active-tax-zone`); + throw new InternalServerError('error.no-active-tax-zone'); } const applicableTaxRate = await this.requestCache.get( ctx, diff --git a/packages/core/src/service/helpers/refund-state-machine/refund-state-machine.ts b/packages/core/src/service/helpers/refund-state-machine/refund-state-machine.ts index ce647ce978..6b6cf489ba 100644 --- a/packages/core/src/service/helpers/refund-state-machine/refund-state-machine.ts +++ b/packages/core/src/service/helpers/refund-state-machine/refund-state-machine.ts @@ -42,7 +42,7 @@ export class RefundStateMachine { constructor(private configService: ConfigService, private historyService: HistoryService) {} - getNextStates(refund: Refund): ReadonlyArray { + getNextStates(refund: Refund): readonly RefundState[] { const fsm = new FSM(this.config, refund.state); return fsm.getNextStates(); } diff --git a/packages/core/src/service/helpers/slug-validator/slug-validator.ts b/packages/core/src/service/helpers/slug-validator/slug-validator.ts index 9bbf662404..6b09b5c75d 100644 --- a/packages/core/src/service/helpers/slug-validator/slug-validator.ts +++ b/packages/core/src/service/helpers/slug-validator/slug-validator.ts @@ -68,16 +68,16 @@ export class SlugValidator { .createQueryBuilder('translation') .innerJoinAndSelect('translation.base', 'base') .innerJoinAndSelect('base.channels', 'channel') - .where(`channel.id = :channelId`, { channelId: ctx.channelId }) - .andWhere(`translation.slug = :slug`, { slug: t.slug }) - .andWhere(`translation.languageCode = :languageCode`, { + .where('channel.id = :channelId', { channelId: ctx.channelId }) + .andWhere('translation.slug = :slug', { slug: t.slug }) + .andWhere('translation.languageCode = :languageCode', { languageCode: t.languageCode, }); if (input.id) { - qb.andWhere(`translation.base != :id`, { id: input.id }); + qb.andWhere('translation.base != :id', { id: input.id }); } if (seen.length) { - qb.andWhere(`translation.id NOT IN (:...seen)`, { seen }); + qb.andWhere('translation.id NOT IN (:...seen)', { seen }); } match = await qb.getOne(); if (match) { diff --git a/packages/core/src/service/helpers/utils/order-utils.ts b/packages/core/src/service/helpers/utils/order-utils.ts index 7d46955562..942d94df24 100644 --- a/packages/core/src/service/helpers/utils/order-utils.ts +++ b/packages/core/src/service/helpers/utils/order-utils.ts @@ -7,9 +7,9 @@ import { In } from 'typeorm'; import { RequestContext } from '../../../api/index'; import { EntityNotFoundError, idsAreEqual } from '../../../common/index'; import { TransactionalConnection } from '../../../connection/index'; -import { FulfillmentLine } from '../../../entity/order-line-reference/fulfillment-line.entity'; -import { OrderLine } from '../../../entity/order-line/order-line.entity'; import { Order } from '../../../entity/order/order.entity'; +import { OrderLine } from '../../../entity/order-line/order-line.entity'; +import { FulfillmentLine } from '../../../entity/order-line-reference/fulfillment-line.entity'; import { FulfillmentState } from '../fulfillment-state-machine/fulfillment-state'; import { PaymentState } from '../payment-state-machine/payment-state'; diff --git a/packages/core/src/service/helpers/utils/translate-entity.spec.ts b/packages/core/src/service/helpers/utils/translate-entity.spec.ts index 987f82e95f..233cfabd78 100644 --- a/packages/core/src/service/helpers/utils/translate-entity.spec.ts +++ b/packages/core/src/service/helpers/utils/translate-entity.spec.ts @@ -5,12 +5,12 @@ import { Translatable, Translation } from '../../../common/types/locale-types'; import { VendureEntity } from '../../../entity/base/base.entity'; import { CollectionTranslation } from '../../../entity/collection/collection-translation.entity'; import { Collection } from '../../../entity/collection/collection.entity'; +import { ProductTranslation } from '../../../entity/product/product-translation.entity'; +import { Product } from '../../../entity/product/product.entity'; import { ProductOptionTranslation } from '../../../entity/product-option/product-option-translation.entity'; import { ProductOption } from '../../../entity/product-option/product-option.entity'; import { ProductVariantTranslation } from '../../../entity/product-variant/product-variant-translation.entity'; import { ProductVariant } from '../../../entity/product-variant/product-variant.entity'; -import { ProductTranslation } from '../../../entity/product/product-translation.entity'; -import { Product } from '../../../entity/product/product.entity'; import { translateDeep, translateEntity, translateTree } from './translate-entity'; diff --git a/packages/core/src/service/helpers/utils/translate-entity.ts b/packages/core/src/service/helpers/utils/translate-entity.ts index 63f2dda6e1..03be904f99 100644 --- a/packages/core/src/service/helpers/utils/translate-entity.ts +++ b/packages/core/src/service/helpers/utils/translate-entity.ts @@ -62,7 +62,7 @@ export function translateEntity( } if (!translation) { - throw new InternalServerError(`error.entity-has-no-translation-in-language`, { + throw new InternalServerError('error.entity-has-no-translation-in-language', { entityName: translatable.constructor.name, languageCode: Array.isArray(languageCode) ? languageCode.join() : languageCode, }); diff --git a/packages/core/src/service/initializer.service.ts b/packages/core/src/service/initializer.service.ts index d457600173..d65f7a5ca3 100644 --- a/packages/core/src/service/initializer.service.ts +++ b/packages/core/src/service/initializer.service.ts @@ -77,7 +77,7 @@ export class InitializerService { Logger.warn(`Awaiting DB schema creation... (attempt ${attempt})`); await new Promise(resolve => setTimeout(resolve, delayMs)); } else { - Logger.error(`Timed out when awaiting the DB schema to be ready!`, undefined, e.stack); + Logger.error('Timed out when awaiting the DB schema to be ready!', undefined, e.stack); } } } diff --git a/packages/core/src/service/services/administrator.service.ts b/packages/core/src/service/services/administrator.service.ts index aa5f17f0de..db6781e1ad 100644 --- a/packages/core/src/service/services/administrator.service.ts +++ b/packages/core/src/service/services/administrator.service.ts @@ -259,8 +259,8 @@ export class AdministratorService { throw new InternalServerError('error.cannot-delete-sole-superadmin'); } await this.connection.getRepository(ctx, Administrator).update({ id }, { deletedAt: new Date() }); - // tslint:disable-next-line:no-non-null-assertion - await this.userService.softDelete(ctx, administrator.user!.id); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + await this.userService.softDelete(ctx, administrator.user.id); this.eventBus.publish(new AdministratorEvent(ctx, administrator, 'deleted', id)); return { result: DeletionResult.DELETED, diff --git a/packages/core/src/service/services/asset.service.ts b/packages/core/src/service/services/asset.service.ts index aea99056fa..b2c9dc21fa 100644 --- a/packages/core/src/service/services/asset.service.ts +++ b/packages/core/src/service/services/asset.service.ts @@ -39,8 +39,8 @@ import { Asset } from '../../entity/asset/asset.entity'; import { OrderableAsset } from '../../entity/asset/orderable-asset.entity'; import { VendureEntity } from '../../entity/base/base.entity'; import { Collection } from '../../entity/collection/collection.entity'; -import { ProductVariant } from '../../entity/product-variant/product-variant.entity'; import { Product } from '../../entity/product/product.entity'; +import { ProductVariant } from '../../entity/product-variant/product-variant.entity'; import { EventBus } from '../../event-bus/event-bus'; import { AssetChannelEvent } from '../../event-bus/events/asset-channel-event'; import { AssetEvent } from '../../event-bus/events/asset-event'; @@ -52,7 +52,7 @@ import { ChannelService } from './channel.service'; import { RoleService } from './role.service'; import { TagService } from './tag.service'; -// tslint:disable-next-line:no-var-requires +// eslint-disable-next-line @typescript-eslint/no-var-requires const sizeOf = require('image-size'); /** @@ -136,7 +136,7 @@ export class AssetService { .select('asset.id') .from(Asset, 'asset') .leftJoin('asset.tags', 'tags') - .where(`tags.value IN (:...tags)`); + .where('tags.value IN (:...tags)'); if (operator === LogicalOperator.AND) { subquery.groupBy('asset.id').having('COUNT(asset.id) = :tagCount'); @@ -469,7 +469,7 @@ export class AssetService { : RequestContext.empty(); return this.createAssetInternal(ctx, stream, filename, mimetype); } else { - throw new InternalServerError(`error.path-should-be-a-string-got-buffer`); + throw new InternalServerError('error.path-should-be-a-string-got-buffer'); } } @@ -498,7 +498,7 @@ export class AssetService { await this.configService.assetOptions.assetStorageStrategy.deleteFile(asset.source); await this.configService.assetOptions.assetStorageStrategy.deleteFile(asset.preview); } catch (e: any) { - Logger.error(`error.could-not-delete-asset-file`, undefined, e.stack); + Logger.error('error.could-not-delete-asset-file', undefined, e.stack); } this.eventBus.publish(new AssetEvent(ctx, deletedAsset, 'deleted', deletedAsset.id)); } @@ -540,7 +540,8 @@ export class AssetService { try { preview = await assetPreviewStrategy.generatePreviewImage(ctx, mimetype, sourceFile); } catch (e: any) { - Logger.error(`Could not create Asset preview image: ${e.message}`, undefined, e.stack); + const message: string = typeof e.message === 'string' ? e.message : e.message.toString(); + Logger.error(`Could not create Asset preview image: ${message}`, undefined, e.stack); throw e; } const previewFileIdentifier = await assetStorageStrategy.writeFileFromBuffer( @@ -597,7 +598,7 @@ export class AssetService { const { width, height } = sizeOf(imageFile); return { width, height }; } catch (e: any) { - Logger.error(`Could not determine Asset dimensions: ` + e); + Logger.error('Could not determine Asset dimensions: ' + JSON.stringify(e)); return { width: 0, height: 0 }; } } diff --git a/packages/core/src/service/services/channel.service.ts b/packages/core/src/service/services/channel.service.ts index 2ef06bcb66..b3a8d88133 100644 --- a/packages/core/src/service/services/channel.service.ts +++ b/packages/core/src/service/services/channel.service.ts @@ -167,7 +167,7 @@ export class ChannelService { async getChannelFromToken(ctx: RequestContext, token: string): Promise; async getChannelFromToken(ctxOrToken: RequestContext | string, token?: string): Promise { const [ctx, channelToken] = - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion ctxOrToken instanceof RequestContext ? [ctxOrToken, token!] : [undefined, ctxOrToken]; const allChannels = await this.allChannels.value(ctx); @@ -192,7 +192,7 @@ export class ChannelService { const defaultChannel = allChannels.find(channel => channel.code === DEFAULT_CHANNEL_CODE); if (!defaultChannel) { - throw new InternalServerError(`error.default-channel-not-found`); + throw new InternalServerError('error.default-channel-not-found'); } return defaultChannel; } diff --git a/packages/core/src/service/services/collection.service.ts b/packages/core/src/service/services/collection.service.ts index 8119a137cf..b500d3d4ed 100644 --- a/packages/core/src/service/services/collection.service.ts +++ b/packages/core/src/service/services/collection.service.ts @@ -94,6 +94,7 @@ export class CollectionService implements OnModuleInit { merge(productEvents$, variantEvents$) .pipe(debounceTime(50)) + // eslint-disable-next-line @typescript-eslint/no-misused-promises .subscribe(async event => { const collections = await this.connection.rawConnection .getRepository(Collection) @@ -132,9 +133,10 @@ export class CollectionService implements OnModuleInit { job.data.applyToChangedVariantsOnly, ); } catch (e: any) { - const translatedCollection = await this.translator.translate(collection, ctx); + const translatedCollection = this.translator.translate(collection, ctx); Logger.error( - `An error occurred when processing the filters for the collection "${translatedCollection.name}" (id: ${collection.id})`, + 'An error occurred when processing the filters for ' + + `the collection "${translatedCollection.name}" (id: ${collection.id})`, ); Logger.error(e.message); continue; @@ -531,7 +533,7 @@ export class CollectionService implements OnModuleInit { idsAreEqual(input.parentId, target.id) || descendants.some(cat => idsAreEqual(input.parentId, cat.id)) ) { - throw new IllegalOperationError(`error.cannot-move-collection-into-self`); + throw new IllegalOperationError('error.cannot-move-collection-into-self'); } let siblings = await this.connection @@ -707,7 +709,8 @@ export class CollectionService implements OnModuleInit { .select('MAX(collection.position)', 'index') .where('parent.id = :id', { id: parentId }) .getRawOne(); - return (result.index || 0) + 1; + const index = result.index; + return (typeof index === 'number' ? index : 0) + 1; } private async getParentCollection( diff --git a/packages/core/src/service/services/customer-group.service.ts b/packages/core/src/service/services/customer-group.service.ts index 7e5251f783..31b152e958 100644 --- a/packages/core/src/service/services/customer-group.service.ts +++ b/packages/core/src/service/services/customer-group.service.ts @@ -17,8 +17,8 @@ import { RelationPaths } from '../../api/index'; import { UserInputError } from '../../common/error/errors'; import { assertFound, idsAreEqual } from '../../common/utils'; import { TransactionalConnection } from '../../connection/transactional-connection'; -import { CustomerGroup } from '../../entity/customer-group/customer-group.entity'; import { Customer } from '../../entity/customer/customer.entity'; +import { CustomerGroup } from '../../entity/customer-group/customer-group.entity'; import { EventBus } from '../../event-bus/event-bus'; import { CustomerGroupEntityEvent } from '../../event-bus/events/customer-group-entity-event'; import { CustomerGroupChangeEvent, CustomerGroupEvent } from '../../event-bus/events/customer-group-event'; diff --git a/packages/core/src/service/services/customer.service.ts b/packages/core/src/service/services/customer.service.ts index 3e148b7e30..71e38be7c7 100644 --- a/packages/core/src/service/services/customer.service.ts +++ b/packages/core/src/service/services/customer.service.ts @@ -45,8 +45,8 @@ import { TransactionalConnection } from '../../connection/transactional-connecti import { Address } from '../../entity/address/address.entity'; import { NativeAuthenticationMethod } from '../../entity/authentication-method/native-authentication-method.entity'; import { Channel } from '../../entity/channel/channel.entity'; -import { CustomerGroup } from '../../entity/customer-group/customer-group.entity'; import { Customer } from '../../entity/customer/customer.entity'; +import { CustomerGroup } from '../../entity/customer-group/customer-group.entity'; import { HistoryEntry } from '../../entity/history-entry/history-entry.entity'; import { Order } from '../../entity/order/order.entity'; import { User } from '../../entity/user/user.entity'; @@ -788,7 +788,7 @@ export class CustomerService { await this.connection .getRepository(ctx, Customer) .update({ id: customerId }, { deletedAt: new Date() }); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion if (customer.user) { await this.userService.softDelete(ctx, customer.user.id); } diff --git a/packages/core/src/service/services/facet-value.service.ts b/packages/core/src/service/services/facet-value.service.ts index 9cb7ec1416..52a47200bc 100644 --- a/packages/core/src/service/services/facet-value.service.ts +++ b/packages/core/src/service/services/facet-value.service.ts @@ -17,9 +17,9 @@ import { assertFound } from '../../common/utils'; import { ConfigService } from '../../config/config.service'; import { TransactionalConnection } from '../../connection/transactional-connection'; import { Asset, Product, ProductVariant } from '../../entity'; +import { Facet } from '../../entity/facet/facet.entity'; import { FacetValueTranslation } from '../../entity/facet-value/facet-value-translation.entity'; import { FacetValue } from '../../entity/facet-value/facet-value.entity'; -import { Facet } from '../../entity/facet/facet.entity'; import { EventBus } from '../../event-bus'; import { FacetValueEvent } from '../../event-bus/events/facet-value-event'; import { CustomFieldRelationService } from '../helpers/custom-field-relation/custom-field-relation.service'; @@ -60,7 +60,7 @@ export class FacetValueService { ): Promise>> { const [repository, languageCode] = ctxOrLang instanceof RequestContext - ? // tslint:disable-next-line:no-non-null-assertion + ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion [this.connection.getRepository(ctxOrLang, FacetValue), lang!] : [this.connection.rawConnection.getRepository(FacetValue), ctxOrLang]; // TODO: Implement usage of channelLanguageCode diff --git a/packages/core/src/service/services/facet.service.ts b/packages/core/src/service/services/facet.service.ts index 663d399373..fb5381b2f0 100644 --- a/packages/core/src/service/services/facet.service.ts +++ b/packages/core/src/service/services/facet.service.ts @@ -21,9 +21,9 @@ import { Translated } from '../../common/types/locale-types'; import { assertFound, idsAreEqual } from '../../common/utils'; import { ConfigService } from '../../config/config.service'; import { TransactionalConnection } from '../../connection/transactional-connection'; -import { FacetValue } from '../../entity/facet-value/facet-value.entity'; import { FacetTranslation } from '../../entity/facet/facet-translation.entity'; import { Facet } from '../../entity/facet/facet.entity'; +import { FacetValue } from '../../entity/facet-value/facet-value.entity'; import { EventBus } from '../../event-bus'; import { FacetEvent } from '../../event-bus/events/facet-event'; import { CustomFieldRelationService } from '../helpers/custom-field-relation/custom-field-relation.service'; @@ -113,7 +113,7 @@ export class FacetService { const relations = ['values', 'values.facet']; const [repository, facetCode, languageCode] = ctxOrFacetCode instanceof RequestContext - ? // tslint:disable-next-line:no-non-null-assertion + ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion [this.connection.getRepository(ctxOrFacetCode, Facet), facetCodeOrLang, lang!] : [ this.connection.rawConnection.getRepository(Facet), diff --git a/packages/core/src/service/services/fulfillment.service.ts b/packages/core/src/service/services/fulfillment.service.ts index 212d3d79e6..0899bcb7ea 100644 --- a/packages/core/src/service/services/fulfillment.service.ts +++ b/packages/core/src/service/services/fulfillment.service.ts @@ -14,9 +14,9 @@ import { import { ConfigService } from '../../config/config.service'; import { TransactionalConnection } from '../../connection/transactional-connection'; import { Fulfillment } from '../../entity/fulfillment/fulfillment.entity'; -import { FulfillmentLine } from '../../entity/order-line-reference/fulfillment-line.entity'; -import { OrderLine } from '../../entity/order-line/order-line.entity'; import { Order } from '../../entity/order/order.entity'; +import { OrderLine } from '../../entity/order-line/order-line.entity'; +import { FulfillmentLine } from '../../entity/order-line-reference/fulfillment-line.entity'; import { EventBus } from '../../event-bus/event-bus'; import { FulfillmentEvent } from '../../event-bus/events/fulfillment-event'; import { FulfillmentStateTransitionEvent } from '../../event-bus/events/fulfillment-state-transition-event'; @@ -132,7 +132,7 @@ export class FulfillmentService { .getRepository(ctx, FulfillmentLine) .createQueryBuilder('fulfillmentLine') .leftJoin('fulfillmentLine.fulfillment', 'fulfillment') - .where(`fulfillmentLine.orderLineId = :orderLineId`, { orderLineId }) + .where('fulfillmentLine.orderLineId = :orderLineId', { orderLineId }) .andWhere('fulfillment.state != :cancelledState', { cancelledState: 'Cancelled' }) .getMany(); @@ -186,7 +186,7 @@ export class FulfillmentService { * @description * Returns an array of the next valid states for the Fulfillment. */ - getNextStates(fulfillment: Fulfillment): ReadonlyArray { + getNextStates(fulfillment: Fulfillment): readonly FulfillmentState[] { return this.fulfillmentStateMachine.getNextStates(fulfillment); } } diff --git a/packages/core/src/service/services/global-settings.service.ts b/packages/core/src/service/services/global-settings.service.ts index 357e349b64..755ca84902 100644 --- a/packages/core/src/service/services/global-settings.service.ts +++ b/packages/core/src/service/services/global-settings.service.ts @@ -66,7 +66,7 @@ export class GlobalSettingsService { .getOne(), ); if (!settings) { - throw new InternalServerError(`error.global-settings-not-found`); + throw new InternalServerError('error.global-settings-not-found'); } return settings; } diff --git a/packages/core/src/service/services/history.service.ts b/packages/core/src/service/services/history.service.ts index dfbddf0a97..31d9ec7ba7 100644 --- a/packages/core/src/service/services/history.service.ts +++ b/packages/core/src/service/services/history.service.ts @@ -51,9 +51,9 @@ export interface CustomerHistoryEntryData { [HistoryEntryType.CUSTOMER_ADDRESS_DELETED]: { address: string; }; - [HistoryEntryType.CUSTOMER_PASSWORD_UPDATED]: {}; - [HistoryEntryType.CUSTOMER_PASSWORD_RESET_REQUESTED]: {}; - [HistoryEntryType.CUSTOMER_PASSWORD_RESET_VERIFIED]: {}; + [HistoryEntryType.CUSTOMER_PASSWORD_UPDATED]: Record; + [HistoryEntryType.CUSTOMER_PASSWORD_RESET_REQUESTED]: Record; + [HistoryEntryType.CUSTOMER_PASSWORD_RESET_VERIFIED]: Record; [HistoryEntryType.CUSTOMER_EMAIL_UPDATE_REQUESTED]: { oldEmailAddress: string; newEmailAddress: string; diff --git a/packages/core/src/service/services/order-testing.service.ts b/packages/core/src/service/services/order-testing.service.ts index 01246d0cd3..e19c4c8553 100644 --- a/packages/core/src/service/services/order-testing.service.ts +++ b/packages/core/src/service/services/order-testing.service.ts @@ -13,8 +13,8 @@ import { RequestContext } from '../../api/common/request-context'; import { grossPriceOf, netPriceOf } from '../../common/tax-utils'; import { ConfigService } from '../../config/config.service'; import { TransactionalConnection } from '../../connection/transactional-connection'; -import { OrderLine } from '../../entity/order-line/order-line.entity'; import { Order } from '../../entity/order/order.entity'; +import { OrderLine } from '../../entity/order-line/order-line.entity'; import { ProductVariant } from '../../entity/product-variant/product-variant.entity'; import { ShippingLine } from '../../entity/shipping-line/shipping-line.entity'; import { ShippingMethod } from '../../entity/shipping-method/shipping-method.entity'; diff --git a/packages/core/src/service/services/order.service.ts b/packages/core/src/service/services/order.service.ts index 8195de0f40..ae059c8c39 100644 --- a/packages/core/src/service/services/order.service.ts +++ b/packages/core/src/service/services/order.service.ts @@ -79,10 +79,10 @@ import { Channel } from '../../entity/channel/channel.entity'; import { Customer } from '../../entity/customer/customer.entity'; import { Fulfillment } from '../../entity/fulfillment/fulfillment.entity'; import { HistoryEntry } from '../../entity/history-entry/history-entry.entity'; -import { FulfillmentLine } from '../../entity/order-line-reference/fulfillment-line.entity'; +import { Order } from '../../entity/order/order.entity'; import { OrderLine } from '../../entity/order-line/order-line.entity'; +import { FulfillmentLine } from '../../entity/order-line-reference/fulfillment-line.entity'; import { OrderModification } from '../../entity/order-modification/order-modification.entity'; -import { Order } from '../../entity/order/order.entity'; import { Payment } from '../../entity/payment/payment.entity'; import { ProductVariant } from '../../entity/product-variant/product-variant.entity'; import { Promotion } from '../../entity/promotion/promotion.entity'; @@ -245,7 +245,7 @@ export class OrderService { ); } - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion FindOptionsUtils.joinEagerRelations(qb, qb.alias, qb.expressionMap.mainAlias!.metadata); const order = await qb.getOne(); @@ -765,7 +765,7 @@ export class OrderService { * @description * Returns the next possible states that the Order may transition to. */ - getNextOrderStates(order: Order): ReadonlyArray { + getNextOrderStates(order: Order): readonly OrderState[] { return this.orderStateMachine.getNextStates(order); } @@ -782,7 +782,8 @@ export class OrderService { .createQueryBuilder('order') .update(Order) .set({ shippingAddress }) - .where('id = :id', { id: order.id }); + .where('id = :id', { id: order.id }) + .execute(); order.shippingAddress = shippingAddress; // Since a changed ShippingAddress could alter the activeTaxZone, // we will remove any cached activeTaxZone, so it can be re-calculated @@ -804,7 +805,8 @@ export class OrderService { .createQueryBuilder('order') .update(Order) .set({ billingAddress }) - .where('id = :id', { id: order.id }); + .where('id = :id', { id: order.id }) + .execute(); order.billingAddress = billingAddress; // Since a changed BillingAddress could alter the activeTaxZone, // we will remove any cached activeTaxZone, so it can be re-calculated @@ -904,7 +906,8 @@ export class OrderService { .getRepository(ctx, OrderLine) .createQueryBuilder('line') .update({ shippingLine: undefined }) - .whereInIds(order.lines.map(l => l.id)); + .whereInIds(order.lines.map(l => l.id)) + .execute(); const { shippingLineAssignmentStrategy } = this.configService.shippingOptions; for (const shippingLine of order.shippingLines) { const orderLinesForShippingLine = @@ -1258,7 +1261,7 @@ export class OrderService { }); for (const line of lines) { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const lineInput = input.lines.find(l => idsAreEqual(l.orderLineId, line.id))!; const fulfillableStockLevel = await this.productVariantService.getFulfillableStockLevel( @@ -1532,7 +1535,7 @@ export class OrderService { // so we do not want to merge at all. See https://github.com/vendure-ecommerce/vendure/issues/263 return existingOrder; } - const mergeResult = await this.orderMerger.merge(ctx, guestOrder, existingOrder); + const mergeResult = this.orderMerger.merge(ctx, guestOrder, existingOrder); const { orderToDelete, linesToInsert, linesToDelete, linesToModify } = mergeResult; let { order } = mergeResult; if (orderToDelete) { @@ -1596,7 +1599,7 @@ export class OrderService { private getOrderLineOrThrow(order: Order, orderLineId: ID): OrderLine { const orderLine = order.lines.find(line => idsAreEqual(line.id, orderLineId)); if (!orderLine) { - throw new UserInputError(`error.order-does-not-contain-line-with-id`, { id: orderLineId }); + throw new UserInputError('error.order-does-not-contain-line-with-id', { id: orderLineId }); } return orderLine; } diff --git a/packages/core/src/service/services/payment-method.service.ts b/packages/core/src/service/services/payment-method.service.ts index 5c0a11b7dc..222ffeddf7 100644 --- a/packages/core/src/service/services/payment-method.service.ts +++ b/packages/core/src/service/services/payment-method.service.ts @@ -250,7 +250,7 @@ export class PaymentMethodService { .andWhere('channel.id = :channelId', { channelId: ctx.channelId }) .getOne(); if (!paymentMethod) { - throw new UserInputError(`error.payment-method-not-found`, { method }); + throw new UserInputError('error.payment-method-not-found', { method }); } const handler = this.configArgService.getByCode('PaymentMethodHandler', paymentMethod.handler.code); const checker = diff --git a/packages/core/src/service/services/payment.service.ts b/packages/core/src/service/services/payment.service.ts index c39534c763..d8573639cc 100644 --- a/packages/core/src/service/services/payment.service.ts +++ b/packages/core/src/service/services/payment.service.ts @@ -17,12 +17,12 @@ import { Logger } from '../../config/logger/vendure-logger'; import { PaymentMethodHandler } from '../../config/payment/payment-method-handler'; import { TransactionalConnection } from '../../connection/transactional-connection'; import { Fulfillment } from '../../entity/fulfillment/fulfillment.entity'; +import { Order } from '../../entity/order/order.entity'; +import { OrderLine } from '../../entity/order-line/order-line.entity'; import { FulfillmentLine } from '../../entity/order-line-reference/fulfillment-line.entity'; import { RefundLine } from '../../entity/order-line-reference/refund-line.entity'; -import { OrderLine } from '../../entity/order-line/order-line.entity'; -import { Order } from '../../entity/order/order.entity'; -import { PaymentMethod } from '../../entity/payment-method/payment-method.entity'; import { Payment } from '../../entity/payment/payment.entity'; +import { PaymentMethod } from '../../entity/payment-method/payment-method.entity'; import { Refund } from '../../entity/refund/refund.entity'; import { EventBus } from '../../event-bus/event-bus'; import { PaymentStateTransitionEvent } from '../../event-bus/events/payment-state-transition-event'; @@ -87,7 +87,7 @@ export class PaymentService { return this.transitionStateAndSave(ctx, payment, fromState, state); } - getNextStates(payment: Payment): ReadonlyArray { + getNextStates(payment: Payment): readonly PaymentState[] { return this.paymentStateMachine.getNextStates(payment); } @@ -322,7 +322,7 @@ export class PaymentService { refundablePayments.find(p => !refundedPaymentIds.includes(p.id)) || refundablePayments[0]; if (!paymentToRefund) { - throw new InternalServerError(`Could not find a Payment to refund`); + throw new InternalServerError('Could not find a Payment to refund'); } const amountNotRefunded = paymentToRefund.amount - paymentRefundTotal(paymentToRefund); const total = Math.min(amountNotRefunded, refundOutstanding); @@ -348,7 +348,8 @@ export class PaymentService { handler = methodAndHandler.handler; } catch (e) { Logger.warn( - `Could not find a corresponding PaymentMethodHandler when creating a refund for the Payment with method "${paymentToRefund.method}"`, + 'Could not find a corresponding PaymentMethodHandler ' + + `when creating a refund for the Payment with method "${paymentToRefund.method}"`, ); } const createRefundResult = @@ -416,8 +417,8 @@ export class PaymentService { refundedPaymentIds.push(paymentToRefund.id); refundOutstanding = refundTotal - summate(refundsCreated, 'total'); } while (0 < refundOutstanding); - // tslint:disable-next-line:no-non-null-assertion - return primaryRefund!; + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + return primaryRefund; } private mergePaymentMetadata(m1: PaymentMetadata, m2?: PaymentMetadata): PaymentMetadata { diff --git a/packages/core/src/service/services/product-option-group.service.ts b/packages/core/src/service/services/product-option-group.service.ts index 7705a1855a..08a421ce9e 100644 --- a/packages/core/src/service/services/product-option-group.service.ts +++ b/packages/core/src/service/services/product-option-group.service.ts @@ -13,10 +13,10 @@ import { Translated } from '../../common/types/locale-types'; import { assertFound, idsAreEqual } from '../../common/utils'; import { Logger } from '../../config/logger/vendure-logger'; import { TransactionalConnection } from '../../connection/transactional-connection'; +import { Product } from '../../entity/product/product.entity'; import { ProductOptionGroupTranslation } from '../../entity/product-option-group/product-option-group-translation.entity'; import { ProductOptionGroup } from '../../entity/product-option-group/product-option-group.entity'; import { ProductVariant } from '../../entity/product-variant/product-variant.entity'; -import { Product } from '../../entity/product/product.entity'; import { EventBus } from '../../event-bus'; import { ProductOptionGroupEvent } from '../../event-bus/events/product-option-group-event'; import { CustomFieldRelationService } from '../helpers/custom-field-relation/custom-field-relation.service'; diff --git a/packages/core/src/service/services/product-option.service.ts b/packages/core/src/service/services/product-option.service.ts index ee5ec58850..b7e3cb6493 100644 --- a/packages/core/src/service/services/product-option.service.ts +++ b/packages/core/src/service/services/product-option.service.ts @@ -13,9 +13,9 @@ import { Translated } from '../../common/types/locale-types'; import { assertFound } from '../../common/utils'; import { Logger } from '../../config/logger/vendure-logger'; import { TransactionalConnection } from '../../connection/transactional-connection'; -import { ProductOptionGroup } from '../../entity/product-option-group/product-option-group.entity'; import { ProductOptionTranslation } from '../../entity/product-option/product-option-translation.entity'; import { ProductOption } from '../../entity/product-option/product-option.entity'; +import { ProductOptionGroup } from '../../entity/product-option-group/product-option-group.entity'; import { ProductVariant } from '../../entity/product-variant/product-variant.entity'; import { EventBus } from '../../event-bus'; import { ProductOptionEvent } from '../../event-bus/events/product-option-event'; diff --git a/packages/core/src/service/services/product-variant.service.ts b/packages/core/src/service/services/product-variant.service.ts index 81619fee1a..2fa56fa37f 100644 --- a/packages/core/src/service/services/product-variant.service.ts +++ b/packages/core/src/service/services/product-variant.service.ts @@ -32,10 +32,10 @@ import { TaxCategory, } from '../../entity'; import { FacetValue } from '../../entity/facet-value/facet-value.entity'; +import { Product } from '../../entity/product/product.entity'; import { ProductOption } from '../../entity/product-option/product-option.entity'; import { ProductVariantTranslation } from '../../entity/product-variant/product-variant-translation.entity'; import { ProductVariant } from '../../entity/product-variant/product-variant.entity'; -import { Product } from '../../entity/product/product.entity'; import { EventBus } from '../../event-bus/event-bus'; import { ProductVariantChannelEvent } from '../../event-bus/events/product-variant-channel-event'; import { ProductVariantEvent } from '../../event-bus/events/product-variant-event'; @@ -419,7 +419,7 @@ export class ProductVariantService { await this.stockMovementService.adjustProductVariantStock( ctx, createdVariant.id, - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion input.stockLevels || input.stockOnHand!, ); } @@ -479,7 +479,7 @@ export class ProductVariantService { await this.stockMovementService.adjustProductVariantStock( ctx, existingVariant.id, - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion input.stockLevels || input.stockOnHand!, ); } @@ -557,6 +557,7 @@ export class ProductVariantService { let populatePricesPromise = this.requestCache.get>(ctx, cacheKey); if (!populatePricesPromise) { + // eslint-disable-next-line @typescript-eslint/no-misused-promises populatePricesPromise = new Promise(async (resolve, reject) => { try { if (!variant.productVariantPrices?.length) { diff --git a/packages/core/src/service/services/product.service.ts b/packages/core/src/service/services/product.service.ts index 6ed1b70c59..6dbed2f478 100644 --- a/packages/core/src/service/services/product.service.ts +++ b/packages/core/src/service/services/product.service.ts @@ -23,9 +23,9 @@ import { assertFound, idsAreEqual } from '../../common/utils'; import { TransactionalConnection } from '../../connection/transactional-connection'; import { Channel } from '../../entity/channel/channel.entity'; import { FacetValue } from '../../entity/facet-value/facet-value.entity'; -import { ProductOptionGroup } from '../../entity/product-option-group/product-option-group.entity'; import { ProductTranslation } from '../../entity/product/product-translation.entity'; import { Product } from '../../entity/product/product.entity'; +import { ProductOptionGroup } from '../../entity/product-option-group/product-option-group.entity'; import { EventBus } from '../../event-bus/event-bus'; import { ProductChannelEvent } from '../../event-bus/events/product-channel-event'; import { ProductEvent } from '../../event-bus/events/product-event'; @@ -129,7 +129,7 @@ export class ProductService { .getRepository(ctx, Product) .createQueryBuilder('product') .setFindOptions({ relations: (relations && false) || this.relations }); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion FindOptionsUtils.joinEagerRelations(qb, qb.alias, qb.expressionMap.mainAlias!.metadata); return qb .leftJoin('product.channels', 'channel') @@ -186,7 +186,7 @@ export class ProductService { .setParameters(translationQb.getParameters()) .select('product.id', 'id') .addSelect( - // tslint:disable-next-line:max-line-length + // eslint-disable-next-line max-len `CASE translation.languageCode WHEN '${ctx.languageCode}' THEN 2 WHEN '${ctx.channel.defaultLanguageCode}' THEN 1 ELSE 0 END`, 'sort_order', ) @@ -366,7 +366,7 @@ export class ProductService { } if (optionGroup.product) { const translated = this.translator.translate(optionGroup.product, ctx); - throw new UserInputError(`error.product-option-group-already-assigned`, { + throw new UserInputError('error.product-option-group-already-assigned', { groupCode: optionGroup.code, productName: translated.name, }); @@ -412,7 +412,7 @@ export class ProductService { product.optionGroups = product.optionGroups.filter(g => g.id !== optionGroupId); await this.connection.getRepository(ctx, Product).save(product, { reload: false }); if (result.result === DeletionResult.NOT_DELETED) { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion throw new InternalServerError(result.message!); } this.eventBus.publish(new ProductOptionGroupChangeEvent(ctx, product, optionGroupId, 'removed')); diff --git a/packages/core/src/service/services/promotion.service.ts b/packages/core/src/service/services/promotion.service.ts index df715370ea..754e7a584e 100644 --- a/packages/core/src/service/services/promotion.service.ts +++ b/packages/core/src/service/services/promotion.service.ts @@ -210,7 +210,7 @@ export class PromotionService { ): Promise { const defaultChannel = await this.channelService.getDefaultChannel(ctx); if (!idsAreEqual(ctx.channelId, defaultChannel.id)) { - throw new IllegalOperationError(`promotion-channels-can-only-be-changed-from-default-channel`); + throw new IllegalOperationError('promotion-channels-can-only-be-changed-from-default-channel'); } const promotions = await this.connection.findByIdsInChannel( ctx, @@ -228,7 +228,7 @@ export class PromotionService { async removePromotionsFromChannel(ctx: RequestContext, input: RemovePromotionsFromChannelInput) { const defaultChannel = await this.channelService.getDefaultChannel(ctx); if (!idsAreEqual(ctx.channelId, defaultChannel.id)) { - throw new IllegalOperationError(`promotion-channels-can-only-be-changed-from-default-channel`); + throw new IllegalOperationError('promotion-channels-can-only-be-changed-from-default-channel'); } const promotions = await this.connection.findByIdsInChannel( ctx, diff --git a/packages/core/src/service/services/role.service.ts b/packages/core/src/service/services/role.service.ts index cbbea566d1..45cf834d05 100644 --- a/packages/core/src/service/services/role.service.ts +++ b/packages/core/src/service/services/role.service.ts @@ -99,7 +99,7 @@ export class RoleService { getSuperAdminRole(ctx?: RequestContext): Promise { return this.getRoleByCode(ctx, SUPER_ADMIN_ROLE_CODE).then(role => { if (!role) { - throw new InternalServerError(`error.super-admin-role-not-found`); + throw new InternalServerError('error.super-admin-role-not-found'); } return role; }); @@ -112,7 +112,7 @@ export class RoleService { getCustomerRole(ctx?: RequestContext): Promise { return this.getRoleByCode(ctx, CUSTOMER_ROLE_CODE).then(role => { if (!role) { - throw new InternalServerError(`error.customer-role-not-found`); + throw new InternalServerError('error.customer-role-not-found'); } return role; }); @@ -214,7 +214,7 @@ export class RoleService { throw new EntityNotFoundError('Role', input.id); } if (role.code === SUPER_ADMIN_ROLE_CODE || role.code === CUSTOMER_ROLE_CODE) { - throw new InternalServerError(`error.cannot-modify-role`, { roleCode: role.code }); + throw new InternalServerError('error.cannot-modify-role', { roleCode: role.code }); } const targetChannels = input.channelIds ? await this.getPermittedChannels(ctx, input.channelIds) @@ -247,7 +247,7 @@ export class RoleService { throw new EntityNotFoundError('Role', id); } if (role.code === SUPER_ADMIN_ROLE_CODE || role.code === CUSTOMER_ROLE_CODE) { - throw new InternalServerError(`error.cannot-delete-role`, { roleCode: role.code }); + throw new InternalServerError('error.cannot-delete-role', { roleCode: role.code }); } const deletedRole = new Role(role); await this.connection.getRepository(ctx, Role).remove(role); diff --git a/packages/core/src/service/services/search.service.ts b/packages/core/src/service/services/search.service.ts index b3631793c8..ace1b49f46 100644 --- a/packages/core/src/service/services/search.service.ts +++ b/packages/core/src/service/services/search.service.ts @@ -30,7 +30,7 @@ export class SearchService { return this.override.reindex(ctx); } if (!process.env.CI) { - Logger.warn(`The SearchService should be overridden by an appropriate search plugin.`); + Logger.warn('The SearchService should be overridden by an appropriate search plugin.'); } return new Job({ queueName: 'error', diff --git a/packages/core/src/service/services/session.service.ts b/packages/core/src/service/services/session.service.ts index a8fa141f49..5e948b8071 100644 --- a/packages/core/src/service/services/session.service.ts +++ b/packages/core/src/service/services/session.service.ts @@ -43,18 +43,18 @@ export class SessionService implements EntitySubscriberInterface { } /** @internal */ - afterInsert(event: InsertEvent): Promise | void { - this.clearSessionCacheOnDataChange(event); + async afterInsert(event: InsertEvent): Promise { + await this.clearSessionCacheOnDataChange(event); } /** @internal */ - afterRemove(event: RemoveEvent): Promise | void { - this.clearSessionCacheOnDataChange(event); + async afterRemove(event: RemoveEvent): Promise { + await this.clearSessionCacheOnDataChange(event); } /** @internal */ - afterUpdate(event: UpdateEvent): Promise | void { - this.clearSessionCacheOnDataChange(event); + async afterUpdate(event: UpdateEvent): Promise { + await this.clearSessionCacheOnDataChange(event); } private async clearSessionCacheOnDataChange( diff --git a/packages/core/src/service/services/shipping-method.service.ts b/packages/core/src/service/services/shipping-method.service.ts index e0453937c6..666b5c7944 100644 --- a/packages/core/src/service/services/shipping-method.service.ts +++ b/packages/core/src/service/services/shipping-method.service.ts @@ -55,7 +55,8 @@ export class ShippingMethodService { async initShippingMethods() { if (this.configService.shippingOptions.fulfillmentHandlers.length === 0) { throw new Error( - `No FulfillmentHandlers were found. Please ensure the VendureConfig.shippingOptions.fulfillmentHandlers array contains at least one FulfillmentHandler.`, + 'No FulfillmentHandlers were found.' + + ' Please ensure the VendureConfig.shippingOptions.fulfillmentHandlers array contains at least one FulfillmentHandler.', ); } await this.verifyShippingMethods(); diff --git a/packages/core/src/service/services/stock-location.service.ts b/packages/core/src/service/services/stock-location.service.ts index 109862e467..f4ca376e4f 100644 --- a/packages/core/src/service/services/stock-location.service.ts +++ b/packages/core/src/service/services/stock-location.service.ts @@ -84,7 +84,7 @@ export class StockLocationService { } getAllStockLocations(ctx: RequestContext) { - return this.requestContextCache.get(ctx, `StockLocationService.getAllStockLocations`, () => + return this.requestContextCache.get(ctx, 'StockLocationService.getAllStockLocations', () => this.connection.getRepository(ctx, StockLocation).find(), ); } diff --git a/packages/core/src/service/services/stock-movement.service.ts b/packages/core/src/service/services/stock-movement.service.ts index c307a6953b..e38fa9503d 100644 --- a/packages/core/src/service/services/stock-movement.service.ts +++ b/packages/core/src/service/services/stock-movement.service.ts @@ -16,8 +16,8 @@ import { ShippingCalculator } from '../../config/shipping-method/shipping-calcul import { ShippingEligibilityChecker } from '../../config/shipping-method/shipping-eligibility-checker'; import { TransactionalConnection } from '../../connection/transactional-connection'; import { StockLevel, StockLocation } from '../../entity/index'; -import { OrderLine } from '../../entity/order-line/order-line.entity'; import { Order } from '../../entity/order/order.entity'; +import { OrderLine } from '../../entity/order-line/order-line.entity'; import { ProductVariant } from '../../entity/product-variant/product-variant.entity'; import { ShippingMethod } from '../../entity/shipping-method/shipping-method.entity'; import { Allocation } from '../../entity/stock-movement/allocation.entity'; diff --git a/packages/core/src/testing/order-test-utils.ts b/packages/core/src/testing/order-test-utils.ts index 9ae079922d..f664946f83 100644 --- a/packages/core/src/testing/order-test-utils.ts +++ b/packages/core/src/testing/order-test-utils.ts @@ -4,8 +4,8 @@ import { ID } from '@vendure/common/lib/shared-types'; import { RequestContext } from '../api/common/request-context'; import { Channel } from '../entity/channel/channel.entity'; -import { OrderLine } from '../entity/order-line/order-line.entity'; import { Order } from '../entity/order/order.entity'; +import { OrderLine } from '../entity/order-line/order-line.entity'; import { ProductVariant } from '../entity/product-variant/product-variant.entity'; import { TaxCategory } from '../entity/tax-category/tax-category.entity'; import { TaxRate } from '../entity/tax-rate/tax-rate.entity'; diff --git a/packages/core/tslint.json b/packages/core/tslint.json deleted file mode 100644 index ee719b4ae6..0000000000 --- a/packages/core/tslint.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": [ - "../../tslint.json" - ] -} diff --git a/packages/create/build.ts b/packages/create/build.ts index 0a2e048072..d6f5c7bdb9 100644 --- a/packages/create/build.ts +++ b/packages/create/build.ts @@ -18,11 +18,7 @@ function copyProductData() { } function copyCliInitialData() { - return fs.outputFile( - './assets/initial-data.json', - JSON.stringify(initialData, null, 2), - 'utf-8', - ); + return fs.outputFile('./assets/initial-data.json', JSON.stringify(initialData, null, 2), 'utf-8'); } copyTemplates() @@ -31,6 +27,7 @@ copyTemplates() .then(copyCliInitialData) .then(() => process.exit(0)) .catch(err => { + // eslint-disable-next-line no-console console.error(err); process.exit(1); }); diff --git a/packages/create/package.json b/packages/create/package.json index 1baf1eadd3..e60fbae538 100644 --- a/packages/create/package.json +++ b/packages/create/package.json @@ -14,7 +14,7 @@ "copy-assets": "rimraf assets && ts-node ./build.ts", "build": "yarn copy-assets && rimraf lib && tsc -p ./tsconfig.build.json", "watch": "yarn copy-assets && rimraf lib && tsc -p ./tsconfig.build.json -w", - "lint": "tslint --fix --project ./" + "lint": "eslint --fix ." }, "homepage": "https://www.vendure.io/", "funding": "https://github.com/sponsors/michaelbromley", diff --git a/packages/create/src/create-vendure-app.ts b/packages/create/src/create-vendure-app.ts index d268aa9779..5a8ae2ff23 100644 --- a/packages/create/src/create-vendure-app.ts +++ b/packages/create/src/create-vendure-app.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-console */ +/* eslint-disable no-console */ import chalk from 'chalk'; import program from 'commander'; import detectPort from 'detect-port'; @@ -23,7 +23,7 @@ import { } from './helpers'; import { CliLogLevel } from './types'; -// tslint:disable-next-line:no-var-requires +// eslint-disable-next-line @typescript-eslint/no-var-requires const packageJson = require('../package.json'); checkNodeVersion(REQUIRED_NODE_VERSION); @@ -44,7 +44,7 @@ program }) .option( '--log-level ', - `Log level, either 'silent', 'info', or 'verbose'`, + 'Log level, either \'silent\', \'info\', or \'verbose\'', /^(silent|info|verbose)$/i, 'silent', ) @@ -53,7 +53,7 @@ program .parse(process.argv); const options = program.opts(); -createApp(projectName, options.useNpm, options.logLevel || 'silent', options.ci); +void createApp(projectName, options.useNpm, options.logLevel || 'silent', options.ci); async function createApp( name: string | undefined, @@ -69,9 +69,9 @@ async function createApp( process.exit(1); } - console.log(chalk.cyan(`Welcome to @vendure/create v${packageJson.version}!`)); + console.log(chalk.cyan(`Welcome to @vendure/create v${packageJson.version as string}!`)); console.log(); - console.log(`Let's configure a new Vendure project. First a few questions:`); + console.log('Let\'s configure a new Vendure project. First a few questions:'); console.log(); const root = path.resolve(name); @@ -81,7 +81,7 @@ async function createApp( if (scaffoldExists) { console.log( chalk.green( - `It appears that a new Vendure project scaffold already exists. Re-using the existing files...`, + 'It appears that a new Vendure project scaffold already exists. Re-using the existing files...', ), ); console.log(); @@ -149,7 +149,7 @@ async function createApp( ); const { dependencies, devDependencies } = getDependencies( dbType, - isCi ? `@${packageJson.version}` : '', + isCi ? `@${packageJson.version as string}` : '', ); subscriber.next(`Installing ${dependencies.join(', ')}`); @@ -196,7 +196,7 @@ async function createApp( fs.copyFile(assetPath('gitignore.template'), path.join(root, '.gitignore')), ) .then(() => { - subscriber.next(`Created files`); + subscriber.next('Created files'); return fs.copyFile( assetPath('tsconfig.template.json'), path.join(root, 'tsconfig.json'), @@ -204,11 +204,11 @@ async function createApp( }) .then(() => createDirectoryStructure(root)) .then(() => { - subscriber.next(`Created directory structure`); + subscriber.next('Created directory structure'); return copyEmailTemplates(root); }) .then(() => { - subscriber.next(`Copied email templates`); + subscriber.next('Copied email templates'); subscriber.complete(); }) .catch(err => subscriber.error(err)); @@ -222,6 +222,7 @@ async function createApp( task: async ctx => { try { // register ts-node so that the config file can be loaded + // eslint-disable-next-line @typescript-eslint/no-var-requires require(path.join(root, 'node_modules/ts-node')).register(); const { populate } = await import(path.join(root, 'node_modules/@vendure/core/cli/populate')); const { bootstrap, DefaultLogger, LogLevel, JobQueueService } = await import( @@ -299,7 +300,7 @@ async function createApp( console.log(); console.log(chalk.green(`Success! Created a new Vendure server at ${root}`)); console.log(); - console.log(`We suggest that you start by typing:`); + console.log('We suggest that you start by typing:'); console.log(); console.log(chalk.green(` cd ${name}`)); console.log(chalk.green(` ${startCommand}`)); @@ -347,6 +348,6 @@ async function copyEmailTemplates(root: string) { try { await fs.copy(templateDir, path.join(root, 'static', 'email', 'templates')); } catch (err: any) { - console.error(chalk.red(`Failed to copy email templates.`)); + console.error(chalk.red('Failed to copy email templates.')); } } diff --git a/packages/create/src/gather-user-responses.ts b/packages/create/src/gather-user-responses.ts index 323d84f43b..8965837fab 100644 --- a/packages/create/src/gather-user-responses.ts +++ b/packages/create/src/gather-user-responses.ts @@ -6,7 +6,7 @@ import prompts, { PromptObject } from 'prompts'; import { DbType, FileSources, UserResponses } from './types'; -// tslint:disable:no-console +/* eslint-disable no-console */ /** * Prompts the user to determine how the new Vendure app should be configured. @@ -44,37 +44,37 @@ export async function gatherUserResponses( { type: (() => (dbType === 'sqlite' || dbType === 'sqljs' ? null : 'text')) as any, name: 'dbHost', - message: `What's the database host address?`, + message: 'What\'s the database host address?', initial: 'localhost', }, { type: (() => (dbType === 'sqlite' || dbType === 'sqljs' ? null : 'text')) as any, name: 'dbPort', - message: `What port is the database listening on?`, + message: 'What port is the database listening on?', initial: (() => defaultDBPort(dbType)) as any, }, { type: (() => (dbType === 'sqlite' || dbType === 'sqljs' ? null : 'text')) as any, name: 'dbName', - message: `What's the name of the database?`, + message: 'What\'s the name of the database?', initial: 'vendure', }, { type: (() => (dbType === 'postgres' ? 'text' : null)) as any, name: 'dbSchema', - message: `What's the schema name we should use?`, + message: 'What\'s the schema name we should use?', initial: 'public', }, { type: (() => (dbType === 'sqlite' || dbType === 'sqljs' ? null : 'text')) as any, name: 'dbUserName', - message: `What's the database user name?`, + message: 'What\'s the database user name?', initial: 'root', }, { type: (() => (dbType === 'sqlite' || dbType === 'sqljs' ? null : 'password')) as any, name: 'dbPassword', - message: `What's the database password?`, + message: 'What\'s the database password?', }, { type: 'text', @@ -105,7 +105,7 @@ export async function gatherUserResponses( onSubmit, onCancel() { /* */ - console.log(`Setup cancelled`); + console.log('Setup cancelled'); process.exit(1); }, }); @@ -156,7 +156,7 @@ async function generateSources(root: string, answers: any, useYarn: boolean): Pr * Instead, we disable escaping and use this custom helper to escape only the single quote character. */ Handlebars.registerHelper('escapeSingle', (aString: unknown) => { - return typeof aString === 'string' ? aString.replace(/'/g, `\\'`) : aString; + return typeof aString === 'string' ? aString.replace(/'/g, '\\\'') : aString; }); const templateContext = { diff --git a/packages/create/src/helpers.ts b/packages/create/src/helpers.ts index ed05127f7e..585ff6a894 100644 --- a/packages/create/src/helpers.ts +++ b/packages/create/src/helpers.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-console */ +/* eslint-disable no-console */ import chalk from 'chalk'; import { execSync } from 'child_process'; import spawn from 'cross-spawn'; @@ -146,24 +146,24 @@ export function checkThatNpmCanReadCwd() { } console.error( chalk.red( - `Could not start an npm process in the right directory.\n\n` + + 'Could not start an npm process in the right directory.\n\n' + `The current directory is: ${chalk.bold(cwd)}\n` + `However, a newly started npm process runs in: ${chalk.bold(npmCWD)}\n\n` + - `This is probably caused by a misconfigured system terminal shell.`, + 'This is probably caused by a misconfigured system terminal shell.', ), ); if (process.platform === 'win32') { console.error( - chalk.red(`On Windows, this can usually be fixed by running:\n\n`) + + chalk.red('On Windows, this can usually be fixed by running:\n\n') + ` ${chalk.cyan( 'reg', )} delete "HKCU\\Software\\Microsoft\\Command Processor" /v AutoRun /f\n` + ` ${chalk.cyan( 'reg', )} delete "HKLM\\Software\\Microsoft\\Command Processor" /v AutoRun /f\n\n` + - chalk.red(`Try to run the above two lines in the terminal.\n`) + + chalk.red('Try to run the above two lines in the terminal.\n') + chalk.red( - `To learn more about this problem, read: https://blogs.msdn.microsoft.com/oldnewthing/20071121-00/?p=24433/`, + 'To learn more about this problem, read: https://blogs.msdn.microsoft.com/oldnewthing/20071121-00/?p=24433/', ), ); } @@ -276,7 +276,7 @@ function dbDriverPackage(dbType: DbType): string { return 'oracledb'; default: const n: never = dbType; - console.error(chalk.red(`No driver package configured for type "${dbType}"`)); + console.error(chalk.red(`No driver package configured for type "${dbType as string}"`)); return ''; } } @@ -342,7 +342,9 @@ async function checkPostgresDbExists(options: any, root: string): Promise await client.connect(); const schema = await client.query( - `SELECT schema_name FROM information_schema.schemata WHERE schema_name = '${options.schema}'`, + `SELECT schema_name FROM information_schema.schemata WHERE schema_name = '${ + options.schema as string + }'`, ); if (schema.rows.length === 0) { throw new Error('NO_SCHEMA'); @@ -363,9 +365,9 @@ async function checkPostgresDbExists(options: any, root: string): Promise function throwConnectionError(err: any) { throw new Error( - `Could not connect to the database. ` + + 'Could not connect to the database. ' + `Please check the connection settings in your Vendure config.\n[${ - err.message || err.toString() + (err.message || err.toString()) as string }]`, ); } @@ -380,12 +382,13 @@ function throwDatabaseSchemaDoesNotExist(dbName: string, schemaName: string) { ); } -export async function isServerPortInUse(): Promise { +export function isServerPortInUse(): Promise { + // eslint-disable-next-line @typescript-eslint/no-var-requires const tcpPortUsed = require('tcp-port-used'); try { return tcpPortUsed.check(SERVER_PORT); } catch (e: any) { console.log(chalk.yellow(`Warning: could not determine whether port ${SERVER_PORT} is available`)); - return false; + return Promise.resolve(false); } } diff --git a/packages/dev-server/dev-config.ts b/packages/dev-server/dev-config.ts index bd75f0561e..cb251ac9fa 100644 --- a/packages/dev-server/dev-config.ts +++ b/packages/dev-server/dev-config.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-console */ +/* eslint-disable no-console */ import { AdminUiPlugin } from '@vendure/admin-ui-plugin'; import { AssetServerPlugin } from '@vendure/asset-server-plugin'; import { ADMIN_API_PATH, API_PORT, SHOP_API_PATH } from '@vendure/common/lib/shared-constants'; diff --git a/packages/dev-server/index-worker.ts b/packages/dev-server/index-worker.ts index cf4ada293f..3ac3a30ab5 100644 --- a/packages/dev-server/index-worker.ts +++ b/packages/dev-server/index-worker.ts @@ -6,7 +6,7 @@ bootstrapWorker(devConfig) .then(worker => worker.startJobQueue()) // .then(worker => worker.startHealthCheckServer({ port: 3001 })) .catch(err => { - // tslint:disable-next-line + // eslint-disable-next-line console.log(err); process.exit(1); }); diff --git a/packages/dev-server/index.ts b/packages/dev-server/index.ts index 9b29d67cdf..845fa81e90 100644 --- a/packages/dev-server/index.ts +++ b/packages/dev-server/index.ts @@ -12,7 +12,7 @@ bootstrap(devConfig) } }) .catch(err => { - // tslint:disable-next-line + // eslint-disable-next-line console.log(err); process.exit(1); }); diff --git a/packages/dev-server/load-testing/benchmarks.ts b/packages/dev-server/load-testing/benchmarks.ts index d731fca477..9e64724e08 100644 --- a/packages/dev-server/load-testing/benchmarks.ts +++ b/packages/dev-server/load-testing/benchmarks.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-console */ +/* eslint-disable no-console */ import { INestApplication } from '@nestjs/common'; import { GlobalFlag } from '@vendure/common/lib/generated-types'; import { diff --git a/packages/dev-server/load-testing/generate-summary.ts b/packages/dev-server/load-testing/generate-summary.ts index 9396b1ec66..57fead8503 100644 --- a/packages/dev-server/load-testing/generate-summary.ts +++ b/packages/dev-server/load-testing/generate-summary.ts @@ -37,7 +37,7 @@ export type LoadTestSummary = { if (require.main === module) { const resultsFile = process.argv[2]; generateSummary(resultsFile).then(result => { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.log(JSON.stringify(result, null, 2)); process.exit(0); }); diff --git a/packages/dev-server/load-testing/init-load-test.ts b/packages/dev-server/load-testing/init-load-test.ts index 2bce3e88f4..91fadab0fc 100644 --- a/packages/dev-server/load-testing/init-load-test.ts +++ b/packages/dev-server/load-testing/init-load-test.ts @@ -1,4 +1,4 @@ -// tslint:disable-next-line:no-reference +// eslint-disable-next-line @typescript-eslint/triple-slash-reference /// import { bootstrap, JobQueueService, Logger } from '@vendure/core'; import { populate } from '@vendure/core/cli/populate'; @@ -17,7 +17,7 @@ import { getProductCsvFilePath, } from './load-test-config'; -// tslint:disable:no-console +/* eslint-disable no-console */ /** * A script used to populate a database with test data for load testing. @@ -143,7 +143,7 @@ function generateProductsCsv(productCount: number = 100): Promise { stringifier.on('readable', () => { let row; - // tslint:disable-next-line:no-conditional-assignment + // eslint-disable-next-line no-cond-assign while ((row = stringifier.read())) { data.push(row); } diff --git a/packages/dev-server/load-testing/load-test-config.ts b/packages/dev-server/load-testing/load-test-config.ts index 029a60e113..c2129cc4bf 100644 --- a/packages/dev-server/load-testing/load-test-config.ts +++ b/packages/dev-server/load-testing/load-test-config.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-console */ +/* eslint-disable no-console */ import { AssetServerPlugin } from '@vendure/asset-server-plugin'; import { addForeignKeyIndices, diff --git a/packages/dev-server/load-testing/run-load-test.ts b/packages/dev-server/load-testing/run-load-test.ts index 94224f8fa7..d008a88e27 100644 --- a/packages/dev-server/load-testing/run-load-test.ts +++ b/packages/dev-server/load-testing/run-load-test.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-console */ +/* eslint-disable no-console */ import { INestApplication } from '@nestjs/common'; import { bootstrap, JobQueueService } from '@vendure/core'; import { spawn } from 'child_process'; @@ -40,7 +40,7 @@ if (require.main === module) { return closeAndExit(app, summaries); }) .catch(err => { - // tslint:disable-next-line + // eslint-disable-next-line console.log(err); }); } else { @@ -112,7 +112,7 @@ async function getTimeSeriesCsvData(summary: LoadTestSummary): Promise { stringifier.on('readable', () => { let row; - // tslint:disable-next-line:no-conditional-assignment + // eslint-disable-next-line no-cond-assign while ((row = stringifier.read())) { data.push(row); } diff --git a/packages/dev-server/load-testing/typings.d.ts b/packages/dev-server/load-testing/typings.d.ts index 80d468e478..8051bb60cc 100644 --- a/packages/dev-server/load-testing/typings.d.ts +++ b/packages/dev-server/load-testing/typings.d.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-namespace no-internal-module */ +/* eslint-disable @typescript-eslint/no-namespace, @typescript-eslint/prefer-namespace-keyword */ declare module k6 { } diff --git a/packages/dev-server/memory-profiler.ts b/packages/dev-server/memory-profiler.ts index 2f84882c83..6f4e7b67e0 100644 --- a/packages/dev-server/memory-profiler.ts +++ b/packages/dev-server/memory-profiler.ts @@ -1,4 +1,4 @@ -/* tslint:disable */ +/* eslint-disable */ /** * Used to profile peak memory usage for perf optimization purposes * diff --git a/packages/dev-server/populate-dev-server.ts b/packages/dev-server/populate-dev-server.ts index 7dca6c8baf..19887abb82 100644 --- a/packages/dev-server/populate-dev-server.ts +++ b/packages/dev-server/populate-dev-server.ts @@ -1,4 +1,4 @@ -// tslint:disable-next-line:no-reference +// eslint-disable-next-line @typescript-eslint/triple-slash-reference /// import { bootstrap, defaultConfig, JobQueueService, Logger, mergeConfig } from '@vendure/core'; import { populate } from '@vendure/core/cli'; @@ -9,7 +9,7 @@ import { initialData } from '../core/mock-data/data-sources/initial-data'; import { devConfig } from './dev-config'; -// tslint:disable:no-console +/* eslint-disable no-console */ /** * A CLI script which populates the dev database with deterministic random data. diff --git a/packages/dev-server/test-plugins/entity-hydrate-plugin.ts b/packages/dev-server/test-plugins/entity-hydrate-plugin.ts index b42bb2960b..7e489b42cf 100644 --- a/packages/dev-server/test-plugins/entity-hydrate-plugin.ts +++ b/packages/dev-server/test-plugins/entity-hydrate-plugin.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { Args, Query, Resolver } from '@nestjs/graphql'; import { Asset, diff --git a/packages/dev-server/test-plugins/event-bus-transactions-plugin.ts b/packages/dev-server/test-plugins/event-bus-transactions-plugin.ts index 9877e620cf..e32f5c0941 100644 --- a/packages/dev-server/test-plugins/event-bus-transactions-plugin.ts +++ b/packages/dev-server/test-plugins/event-bus-transactions-plugin.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { OnModuleInit } from '@nestjs/common'; import { Args, Mutation, Resolver } from '@nestjs/graphql'; import { diff --git a/packages/dev-server/test-plugins/issue-1664/issue-1664.ts b/packages/dev-server/test-plugins/issue-1664/issue-1664.ts index c774d78670..4f86a8c66c 100644 --- a/packages/dev-server/test-plugins/issue-1664/issue-1664.ts +++ b/packages/dev-server/test-plugins/issue-1664/issue-1664.ts @@ -116,7 +116,7 @@ export class Test1664Plugin implements OnApplicationBootstrap { } // Create a Profile and assign it to all the products const users = await this.connection.rawConnection.getRepository(User).find(); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const user = users[1]!; const profile = await this.connection.rawConnection.getRepository(Profile).save( new Profile({ @@ -170,7 +170,7 @@ export class Test1664Plugin implements OnApplicationBootstrap { // Create order const users = await this.connection.rawConnection.getRepository(User).find(); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const customer = users[1]!; const created = await this.orderService.create(ctx, customer.id); diff --git a/packages/elasticsearch-plugin/e2e/e2e-helpers.ts b/packages/elasticsearch-plugin/e2e/e2e-helpers.ts index 41f92ad2ed..c2cca7dfa3 100644 --- a/packages/elasticsearch-plugin/e2e/e2e-helpers.ts +++ b/packages/elasticsearch-plugin/e2e/e2e-helpers.ts @@ -19,7 +19,7 @@ import { SearchProductsAdminQueryVariables, } from './graphql/generated-e2e-elasticsearch-plugin-types'; -// tslint:disable-next-line:no-var-requires +// eslint-disable-next-line @typescript-eslint/no-var-requires const { elasticsearchHost, elasticsearchPort } = require('./constants'); export function doAdminSearchQuery(client: SimpleGraphQLClient, input: SearchInput) { @@ -328,7 +328,7 @@ export async function testPriceRanges(client: SimpleGraphQLClient) { export async function dropElasticIndices(indexPrefix: string) { const esClient = new Client({ - node: `${elasticsearchHost}:${elasticsearchPort}`, + node: `${elasticsearchHost as string}:${elasticsearchPort as string}`, }); return deleteIndices(esClient, indexPrefix); } diff --git a/packages/elasticsearch-plugin/e2e/elasticsearch-plugin-uuid.e2e-spec.ts b/packages/elasticsearch-plugin/e2e/elasticsearch-plugin-uuid.e2e-spec.ts index 120e843c44..1100017b97 100644 --- a/packages/elasticsearch-plugin/e2e/elasticsearch-plugin-uuid.e2e-spec.ts +++ b/packages/elasticsearch-plugin/e2e/elasticsearch-plugin-uuid.e2e-spec.ts @@ -15,7 +15,8 @@ import { awaitRunningJobs } from '../../core/e2e/utils/await-running-jobs'; import { ElasticsearchPlugin } from '../src/plugin'; import { GetCollectionListQuery } from './graphql/generated-e2e-elasticsearch-plugin-types'; -// tslint:disable-next-line:no-var-requires + +// eslint-disable-next-line @typescript-eslint/no-var-requires const { elasticsearchHost, elasticsearchPort } = require('./constants'); // https://github.com/vendure-ecommerce/vendure/issues/494 diff --git a/packages/elasticsearch-plugin/e2e/elasticsearch-plugin.e2e-spec.ts b/packages/elasticsearch-plugin/e2e/elasticsearch-plugin.e2e-spec.ts index d2b7112a61..533260bf5b 100644 --- a/packages/elasticsearch-plugin/e2e/elasticsearch-plugin.e2e-spec.ts +++ b/packages/elasticsearch-plugin/e2e/elasticsearch-plugin.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion no-console */ +/* eslint-disable @typescript-eslint/no-non-null-assertion, no-console */ import { CurrencyCode, SortOrder } from '@vendure/common/lib/generated-types'; import { pick } from '@vendure/common/lib/pick'; import { @@ -70,7 +70,7 @@ import { JobState, } from './graphql/generated-e2e-elasticsearch-plugin-types'; -// tslint:disable-next-line:no-var-requires +// eslint-disable-next-line @typescript-eslint/no-var-requires const { elasticsearchHost, elasticsearchPort } = require('./constants'); interface SearchProductShopVariables extends SearchProductsShopQueryVariables { @@ -151,7 +151,7 @@ describe('Elasticsearch plugin', () => { context: 'product', scriptFn: input => { const factor = input.factor ?? 2; - return { script: `doc['product-answer'].value * ${factor}` }; + return { script: `doc['product-answer'].value * ${factor as string}` }; }, }, }, @@ -635,11 +635,11 @@ describe('Elasticsearch plugin', () => { arguments: [ { name: 'facetValueIds', - value: `["T_4"]`, + value: '["T_4"]', }, { name: 'containsAny', - value: `false`, + value: 'false', }, ], }, @@ -700,11 +700,11 @@ describe('Elasticsearch plugin', () => { arguments: [ { name: 'facetValueIds', - value: `["T_3"]`, + value: '["T_3"]', }, { name: 'containsAny', - value: `false`, + value: 'false', }, ], }, diff --git a/packages/elasticsearch-plugin/e2e/graphql/generated-e2e-elasticsearch-plugin-types.ts b/packages/elasticsearch-plugin/e2e/graphql/generated-e2e-elasticsearch-plugin-types.ts index 3d2ee08bd6..73682aa9e6 100644 --- a/packages/elasticsearch-plugin/e2e/graphql/generated-e2e-elasticsearch-plugin-types.ts +++ b/packages/elasticsearch-plugin/e2e/graphql/generated-e2e-elasticsearch-plugin-types.ts @@ -1,4 +1,4 @@ -// tslint:disable +/* eslint-disable */ export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; diff --git a/packages/elasticsearch-plugin/package.json b/packages/elasticsearch-plugin/package.json index 223b025eb6..c2d991807e 100644 --- a/packages/elasticsearch-plugin/package.json +++ b/packages/elasticsearch-plugin/package.json @@ -10,7 +10,7 @@ "scripts": { "watch": "tsc -p ./tsconfig.build.json --watch", "build": "rimraf lib && tsc -p ./tsconfig.build.json", - "lint": "tslint --fix --project ./", + "lint": "eslint --fix .", "test": "vitest --run", "e2e": "cross-env PACKAGE=elasticsearch-plugin vitest --config ../../e2e-common/vitest.config.ts --run", "e2e:watch": "cross-env PACKAGE=elasticsearch-plugin vitest --config ../../e2e-common/vitest.config.ts" diff --git a/packages/elasticsearch-plugin/src/api/api-extensions.ts b/packages/elasticsearch-plugin/src/api/api-extensions.ts index a9c8c51ca9..a01cd3ffc0 100644 --- a/packages/elasticsearch-plugin/src/api/api-extensions.ts +++ b/packages/elasticsearch-plugin/src/api/api-extensions.ts @@ -66,20 +66,20 @@ function generateCustomMappingTypes(options: ElasticsearchOptions): DocumentNode const scriptVariantFields = Object.entries(options.searchConfig?.scriptFields || {}).filter( ([, scriptField]) => scriptField.context !== 'product', ); - let sdl = ``; + let sdl = ''; if (scriptProductFields.length || scriptVariantFields.length) { if (scriptProductFields.length) { sdl += ` type CustomProductScriptFields { - ${scriptProductFields.map(([name, def]) => `${name}: ${def.graphQlType}`)} + ${scriptProductFields.map(([name, def]) => `${name}: ${def.graphQlType}`).join('\n')} } `; } if (scriptVariantFields.length) { sdl += ` type CustomProductVariantScriptFields { - ${scriptVariantFields.map(([name, def]) => `${name}: ${def.graphQlType}`)} + ${scriptVariantFields.map(([name, def]) => `${name}: ${def.graphQlType}`).join('\n')} } `; } @@ -110,14 +110,14 @@ function generateCustomMappingTypes(options: ElasticsearchOptions): DocumentNode if (productMappings.length) { sdl += ` type CustomProductMappings { - ${productMappings.map(([name, def]) => `${name}: ${def.graphQlType}`)} + ${productMappings.map(([name, def]) => `${name}: ${def.graphQlType}`).join('\n')} } `; } if (variantMappings.length) { sdl += ` type CustomProductVariantMappings { - ${variantMappings.map(([name, def]) => `${name}: ${def.graphQlType}`)} + ${variantMappings.map(([name, def]) => `${name}: ${def.graphQlType}`).join('\n')} } `; } diff --git a/packages/elasticsearch-plugin/src/api/elasticsearch-resolver.ts b/packages/elasticsearch-plugin/src/api/elasticsearch-resolver.ts index be80e42fed..f200b38c71 100644 --- a/packages/elasticsearch-plugin/src/api/elasticsearch-resolver.ts +++ b/packages/elasticsearch-plugin/src/api/elasticsearch-resolver.ts @@ -79,7 +79,7 @@ export class AdminElasticSearchResolver implements Pick { // Intentionally not awaiting this method call - this.searchJobBufferService.runPendingSearchUpdates(); + void this.searchJobBufferService.runPendingSearchUpdates(); return { success: true }; } } diff --git a/packages/elasticsearch-plugin/src/build-elastic-body.spec.ts b/packages/elasticsearch-plugin/src/build-elastic-body.spec.ts index c03d89a90b..e52d30887c 100644 --- a/packages/elasticsearch-plugin/src/build-elastic-body.spec.ts +++ b/packages/elasticsearch-plugin/src/build-elastic-body.spec.ts @@ -473,7 +473,7 @@ describe('buildElasticBody()', () => { graphQlType: 'String', context: 'both', scriptFn: input => ({ - script: `doc['property'].dummyScript(${input.term})`, + script: `doc['property'].dummyScript(${input.term as string})`, }), }, }, @@ -482,7 +482,7 @@ describe('buildElasticBody()', () => { const result = buildElasticBody({ term: 'test' }, config, CHANNEL_ID, LanguageCode.en); expect(result.script_fields).toEqual({ test: { - script: `doc['property'].dummyScript(test)`, + script: 'doc[\'property\'].dummyScript(test)', }, }); }); diff --git a/packages/elasticsearch-plugin/src/build-elastic-body.ts b/packages/elasticsearch-plugin/src/build-elastic-body.ts index 5d014b08b5..3e267634c1 100644 --- a/packages/elasticsearch-plugin/src/build-elastic-body.ts +++ b/packages/elasticsearch-plugin/src/build-elastic-body.ts @@ -143,7 +143,7 @@ export function buildElasticBody( : undefined), }; if (groupByProduct) { - body.collapse = { field: `productId` }; + body.collapse = { field: 'productId' }; } return body; } @@ -166,13 +166,13 @@ function createScriptFields( for (const name of fields) { const scriptField = scriptFields[name]; if (scriptField.context === 'product' && groupByProduct === true) { - (result as any)[name] = scriptField.scriptFn(input); + (result )[name] = scriptField.scriptFn(input); } if (scriptField.context === 'variant' && groupByProduct === false) { - (result as any)[name] = scriptField.scriptFn(input); + (result )[name] = scriptField.scriptFn(input); } if (scriptField.context === 'both' || scriptField.context === undefined) { - (result as any)[name] = scriptField.scriptFn(input); + (result )[name] = scriptField.scriptFn(input); } } return result; diff --git a/packages/elasticsearch-plugin/src/elasticsearch.service.ts b/packages/elasticsearch-plugin/src/elasticsearch.service.ts index 8e1d88d3e6..a46ea44d97 100644 --- a/packages/elasticsearch-plugin/src/elasticsearch.service.ts +++ b/packages/elasticsearch-plugin/src/elasticsearch.service.ts @@ -71,11 +71,14 @@ export class ElasticsearchService implements OnModuleInit, OnModuleDestroy { try { const pingResult = await this.client.ping({}, { requestTimeout: 1000 }); if (pingResult.body) { - Logger.verbose(`Ping to Elasticsearch successful`, loggerCtx); + Logger.verbose('Ping to Elasticsearch successful', loggerCtx); return resolve(); } } catch (e: any) { - Logger.verbose(`Ping to Elasticsearch failed with error "${e.message}"`, loggerCtx); + Logger.verbose( + `Ping to Elasticsearch failed with error "${e.message as string}"`, + loggerCtx, + ); } Logger.verbose( `Connection to Elasticsearch could not be made, trying again after ${connectionAttemptInterval}ms (attempt ${attempts} of ${connectionAttempts})`, @@ -83,7 +86,7 @@ export class ElasticsearchService implements OnModuleInit, OnModuleDestroy { ); await new Promise(resolve1 => setTimeout(resolve1, connectionAttemptInterval)); } - reject(`Could not connection to Elasticsearch. Aborting bootstrap.`); + reject('Could not connection to Elasticsearch. Aborting bootstrap.'); }); } @@ -112,7 +115,7 @@ export class ElasticsearchService implements OnModuleInit, OnModuleDestroy { const tempName = new Date().getTime(); const nameSalt = Math.random().toString(36).substring(7); - const tempPrefix = `temp-` + `${tempName}-${nameSalt}-`; + const tempPrefix = 'temp-' + `${tempName}-${nameSalt}-`; const tempIndex = tempPrefix + indexName; await createIndices( @@ -126,13 +129,13 @@ export class ElasticsearchService implements OnModuleInit, OnModuleDestroy { const tempIndexSettings = tempIndexSettingsResult.body[tempIndex].settings.index; const indexParamsToExclude = [ - `routing`, - `number_of_shards`, - `provided_name`, - `creation_date`, - `number_of_replicas`, - `uuid`, - `version`, + 'routing', + 'number_of_shards', + 'provided_name', + 'creation_date', + 'number_of_replicas', + 'uuid', + 'version', ]; for (const param of indexParamsToExclude) { delete tempIndexSettings[param]; @@ -154,7 +157,7 @@ export class ElasticsearchService implements OnModuleInit, OnModuleDestroy { }); const tempIndexMappings = tempIndexMappingsResult.body[tempIndex].mappings; if (!equal(tempIndexMappings, existingIndexMappings)) - // tslint:disable-next-line:max-line-length + // eslint-disable-next-line max-len Logger.warn( `Index "${index}" mapping differs from index mapping in vendure config! Consider re-indexing the data.`, loggerCtx, @@ -162,7 +165,7 @@ export class ElasticsearchService implements OnModuleInit, OnModuleDestroy { } await this.client.indices.delete({ - index: [tempPrefix + `variants`], + index: [tempPrefix + 'variants'], }); } }; @@ -259,7 +262,7 @@ export class ElasticsearchService implements OnModuleInit, OnModuleDestroy { elasticSearchBody.aggs = { total: { cardinality: { - field: `productId`, + field: 'productId', }, }, }; @@ -290,7 +293,7 @@ export class ElasticsearchService implements OnModuleInit, OnModuleDestroy { ctx, input, enabledOnly, - `facetValueIds`, + 'facetValueIds', this.options.searchConfig.facetValueMaxSize, ); @@ -326,7 +329,7 @@ export class ElasticsearchService implements OnModuleInit, OnModuleDestroy { ctx, input, enabledOnly, - `collectionIds`, + 'collectionIds', this.options.searchConfig.collectionMaxSize, ); @@ -380,7 +383,7 @@ export class ElasticsearchService implements OnModuleInit, OnModuleDestroy { elasticSearchBody.aggs.aggregation_field.aggs = { total: { cardinality: { - field: `productId`, + field: 'productId', }, }, }; @@ -481,8 +484,8 @@ export class ElasticsearchService implements OnModuleInit, OnModuleDestroy { */ async reindex(ctx: RequestContext): Promise { const job = await this.elasticsearchIndexService.reindex(ctx); - // tslint:disable-next-line:no-non-null-assertion - return job!; + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + return job; } private mapVariantToSearchResult(hit: SearchHit): ElasticSearchResult { @@ -596,22 +599,22 @@ export class ElasticsearchService implements OnModuleInit, OnModuleDestroy { if (productCustomMappings.length) { const customMappingsResult: any = {}; for (const name of productCustomMappings) { - customMappingsResult[name] = (source as any)[`product-${name}`]; + customMappingsResult[name] = source[`product-${name}`]; } - (result as any).customProductMappings = customMappingsResult; + result.customProductMappings = customMappingsResult; if (groupByProduct) { - (result as any).customMappings = customMappingsResult; + result.customMappings = customMappingsResult; } } const variantCustomMappings = Object.keys(variantMappings); if (variantCustomMappings.length) { const customMappingsResult: any = {}; for (const name of variantCustomMappings) { - customMappingsResult[name] = (source as any)[`variant-${name}`]; + customMappingsResult[name] = source[`variant-${name}`]; } - (result as any).customProductVariantMappings = customMappingsResult; + result.customProductVariantMappings = customMappingsResult; if (!groupByProduct) { - (result as any).customMappings = customMappingsResult; + result.customMappings = customMappingsResult; } } return result; @@ -629,7 +632,7 @@ export class ElasticsearchService implements OnModuleInit, OnModuleDestroy { for (const name of customMappings) { const env = mappings[name].context; if (env === environment || env === 'both') { - const fieldVal = (fields as any)[name] || undefined; + const fieldVal = fields[name] || undefined; if (Array.isArray(fieldVal)) { if (fieldVal.length === 1) { customScriptFieldsResult[name] = fieldVal[0]; @@ -642,7 +645,7 @@ export class ElasticsearchService implements OnModuleInit, OnModuleDestroy { } } } - (result as any).customScriptFields = customScriptFieldsResult; + result.customScriptFields = customScriptFieldsResult; } return result; } diff --git a/packages/elasticsearch-plugin/src/indexing/elasticsearch-index.service.ts b/packages/elasticsearch-plugin/src/indexing/elasticsearch-index.service.ts index 83e3e2bc39..9037bf73e5 100644 --- a/packages/elasticsearch-plugin/src/indexing/elasticsearch-index.service.ts +++ b/packages/elasticsearch-plugin/src/indexing/elasticsearch-index.service.ts @@ -34,7 +34,7 @@ export class ElasticsearchIndexService implements OnApplicationBootstrap { const data = job.data; switch (data.type) { case 'reindex': - Logger.verbose(`sending ReindexMessage`); + Logger.verbose('sending ReindexMessage'); return this.jobWithProgress(job, this.indexerController.reindex(data)); case 'update-product': return this.indexerController.updateProduct(data); @@ -71,25 +71,33 @@ export class ElasticsearchIndexService implements OnApplicationBootstrap { } updateProduct(ctx: RequestContext, product: Product) { - this.updateIndexQueue.add({ type: 'update-product', ctx: ctx.serialize(), productId: product.id }); + return this.updateIndexQueue.add({ + type: 'update-product', + ctx: ctx.serialize(), + productId: product.id, + }); } updateVariants(ctx: RequestContext, variants: ProductVariant[]) { const variantIds = variants.map(v => v.id); - this.updateIndexQueue.add({ type: 'update-variants', ctx: ctx.serialize(), variantIds }); + return this.updateIndexQueue.add({ type: 'update-variants', ctx: ctx.serialize(), variantIds }); } deleteProduct(ctx: RequestContext, product: Product) { - this.updateIndexQueue.add({ type: 'delete-product', ctx: ctx.serialize(), productId: product.id }); + return this.updateIndexQueue.add({ + type: 'delete-product', + ctx: ctx.serialize(), + productId: product.id, + }); } deleteVariant(ctx: RequestContext, variants: ProductVariant[]) { const variantIds = variants.map(v => v.id); - this.updateIndexQueue.add({ type: 'delete-variant', ctx: ctx.serialize(), variantIds }); + return this.updateIndexQueue.add({ type: 'delete-variant', ctx: ctx.serialize(), variantIds }); } assignProductToChannel(ctx: RequestContext, product: Product, channelId: ID) { - this.updateIndexQueue.add({ + return this.updateIndexQueue.add({ type: 'assign-product-to-channel', ctx: ctx.serialize(), productId: product.id, @@ -98,7 +106,7 @@ export class ElasticsearchIndexService implements OnApplicationBootstrap { } removeProductFromChannel(ctx: RequestContext, product: Product, channelId: ID) { - this.updateIndexQueue.add({ + return this.updateIndexQueue.add({ type: 'remove-product-from-channel', ctx: ctx.serialize(), productId: product.id, @@ -107,7 +115,7 @@ export class ElasticsearchIndexService implements OnApplicationBootstrap { } assignVariantToChannel(ctx: RequestContext, productVariantId: ID, channelId: ID) { - this.updateIndexQueue.add({ + return this.updateIndexQueue.add({ type: 'assign-variant-to-channel', ctx: ctx.serialize(), productVariantId, @@ -116,7 +124,7 @@ export class ElasticsearchIndexService implements OnApplicationBootstrap { } removeVariantFromChannel(ctx: RequestContext, productVariantId: ID, channelId: ID) { - this.updateIndexQueue.add({ + return this.updateIndexQueue.add({ type: 'remove-variant-from-channel', ctx: ctx.serialize(), productVariantId, @@ -125,15 +133,15 @@ export class ElasticsearchIndexService implements OnApplicationBootstrap { } updateVariantsById(ctx: RequestContext, ids: ID[]) { - this.updateIndexQueue.add({ type: 'update-variants-by-id', ctx: ctx.serialize(), ids }); + return this.updateIndexQueue.add({ type: 'update-variants-by-id', ctx: ctx.serialize(), ids }); } updateAsset(ctx: RequestContext, asset: Asset) { - this.updateIndexQueue.add({ type: 'update-asset', ctx: ctx.serialize(), asset: asset as any }); + return this.updateIndexQueue.add({ type: 'update-asset', ctx: ctx.serialize(), asset: asset as any }); } deleteAsset(ctx: RequestContext, asset: Asset) { - this.updateIndexQueue.add({ type: 'delete-asset', ctx: ctx.serialize(), asset: asset as any }); + return this.updateIndexQueue.add({ type: 'delete-asset', ctx: ctx.serialize(), asset: asset as any }); } private jobWithProgress( diff --git a/packages/elasticsearch-plugin/src/indexing/indexer.controller.ts b/packages/elasticsearch-plugin/src/indexing/indexer.controller.ts index 0693f9c1b5..85c1e891b3 100644 --- a/packages/elasticsearch-plugin/src/indexing/indexer.controller.ts +++ b/packages/elasticsearch-plugin/src/indexing/indexer.controller.ts @@ -222,7 +222,7 @@ export class ElasticsearchIndexerController implements OnModuleInit, OnModuleDes }); } } - Logger.verbose(`Completed updating variants`, loggerCtx); + Logger.verbose('Completed updating variants', loggerCtx); return { total: productIds.length, completed: productIds.length, @@ -252,7 +252,7 @@ export class ElasticsearchIndexerController implements OnModuleInit, OnModuleDes `-reindex-${reindexTempName}`, ); } catch (e: any) { - Logger.error(`Could not recreate indices.`, loggerCtx); + Logger.error('Could not recreate indices.', loggerCtx); Logger.error(JSON.stringify(e), loggerCtx); throw e; } @@ -383,7 +383,7 @@ export class ElasticsearchIndexerController implements OnModuleInit, OnModuleDes } } - Logger.verbose(`Completed reindexing!`, loggerCtx); + Logger.verbose('Completed reindexing!', loggerCtx); return { total: totalProductIds, @@ -474,7 +474,7 @@ export class ElasticsearchIndexerController implements OnModuleInit, OnModuleDes }, }); for (const failure of result1.body.failures) { - Logger.error(`${failure.cause.type}: ${failure.cause.reason}`, loggerCtx); + Logger.error(`${failure.cause.type as string}: ${failure.cause.reason as string}`, loggerCtx); } const result2 = await this.client.update_by_query({ index: this.options.indexPrefix + indexName, @@ -488,7 +488,7 @@ export class ElasticsearchIndexerController implements OnModuleInit, OnModuleDes }, }); for (const failure of result1.body.failures) { - Logger.error(`${failure.cause.type}: ${failure.cause.reason}`, loggerCtx); + Logger.error(`${failure.cause.type as string}: ${failure.cause.reason as string}`, loggerCtx); } return result1.body.failures.length === 0 && result2.body.failures === 0; } @@ -529,7 +529,7 @@ export class ElasticsearchIndexerController implements OnModuleInit, OnModuleDes id: 'ASC', }, }); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion updatedProductVariants.forEach(variant => (variant.product = product!)); if (!product.enabled) { updatedProductVariants.forEach(v => (v.enabled = false)); @@ -643,7 +643,7 @@ export class ElasticsearchIndexerController implements OnModuleInit, OnModuleDes if (2 < path.length) { throw new InternalServerError( [ - `hydrateProductRelations / hydrateProductVariantRelations does not currently support nested custom field relations`, + 'hydrateProductRelations / hydrateProductVariantRelations does not currently support nested custom field relations', `Received: "${relation}"`, ].join('\n'), ); @@ -666,7 +666,7 @@ export class ElasticsearchIndexerController implements OnModuleInit, OnModuleDes ctx: RequestContext, productId: ID, ): Promise { - const channels = await this.requestContextCache.get(ctx, `elastic-index-all-channels`, () => + const channels = await this.requestContextCache.get(ctx, 'elastic-index-all-channels', () => this.connection .getRepository(Channel) .createQueryBuilder('channel') @@ -812,7 +812,7 @@ export class ElasticsearchIndexerController implements OnModuleInit, OnModuleDes } return body; } catch (e: any) { - Logger.error(`Error when attempting to run bulk operations [${e.toString()}]`, loggerCtx); + Logger.error(`Error when attempting to run bulk operations [${JSON.stringify(e)}]`, loggerCtx); Logger.error('Error details: ' + JSON.stringify(e.body?.error, null, 2), loggerCtx); } } @@ -897,7 +897,7 @@ export class ElasticsearchIndexerController implements OnModuleInit, OnModuleDes return item; } catch (err: any) { Logger.error(err.toString()); - throw Error(`Error while reindexing!`); + throw Error('Error while reindexing!'); } } diff --git a/packages/elasticsearch-plugin/src/indexing/indexing-utils.ts b/packages/elasticsearch-plugin/src/indexing/indexing-utils.ts index 4037a5df5e..dedf09726a 100644 --- a/packages/elasticsearch-plugin/src/indexing/indexing-utils.ts +++ b/packages/elasticsearch-plugin/src/indexing/indexing-utils.ts @@ -11,7 +11,7 @@ export async function createIndices( indexSettings: object, indexMappingProperties: object, mapAlias = true, - aliasPostfix = ``, + aliasPostfix = '', ) { const textWithKeyword = { type: 'text', diff --git a/packages/elasticsearch-plugin/src/indexing/mutable-request-context.ts b/packages/elasticsearch-plugin/src/indexing/mutable-request-context.ts index b6f360ae93..02106d9a84 100644 --- a/packages/elasticsearch-plugin/src/indexing/mutable-request-context.ts +++ b/packages/elasticsearch-plugin/src/indexing/mutable-request-context.ts @@ -27,7 +27,7 @@ export class MutableRequestContext extends RequestContext { static deserialize(ctxObject: SerializedRequestContext): MutableRequestContext { return new MutableRequestContext({ - req: ctxObject._req as any, + req: ctxObject._req , apiType: ctxObject._apiType, channel: new Channel(ctxObject._channel), session: { diff --git a/packages/elasticsearch-plugin/src/plugin.ts b/packages/elasticsearch-plugin/src/plugin.ts index 3a14605342..1794f34bdf 100644 --- a/packages/elasticsearch-plugin/src/plugin.ts +++ b/packages/elasticsearch-plugin/src/plugin.ts @@ -65,7 +65,8 @@ function getCustomResolvers(options: ElasticsearchRuntimeOptions) { * ## Installation * * **Requires Elasticsearch v7.0 < required Elasticsearch version < 7.10 ** - * Elasticsearch version 7.10.2 will throw error due to incompatibility with elasticsearch-js client. [Check here for more info](https://github.com/elastic/elasticsearch-js/issues/1519) + * Elasticsearch version 7.10.2 will throw error due to incompatibility with elasticsearch-js client. + * [Check here for more info](https://github.com/elastic/elasticsearch-js/issues/1519) * `yarn add \@elastic/elasticsearch \@vendure/elasticsearch-plugin` * * or diff --git a/packages/email-plugin/package.json b/packages/email-plugin/package.json index 7981bd9369..45312097c6 100644 --- a/packages/email-plugin/package.json +++ b/packages/email-plugin/package.json @@ -12,7 +12,7 @@ "scripts": { "watch": "tsc -p ./tsconfig.build.json --watch", "build": "rimraf lib && tsc -p ./tsconfig.build.json", - "lint": "tslint --fix --project ./", + "lint": "eslint --fix .", "test": "vitest --config ./vitest.config.ts --run" }, "homepage": "https://www.vendure.io/", diff --git a/packages/email-plugin/src/default-email-handlers.ts b/packages/email-plugin/src/default-email-handlers.ts index 7df30e7d67..9b308dc67d 100644 --- a/packages/email-plugin/src/default-email-handlers.ts +++ b/packages/email-plugin/src/default-email-handlers.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { AccountRegistrationEvent, AssetStorageStrategy, @@ -36,8 +36,8 @@ export const orderConfirmationHandler = new EmailEventListener('order-confirmati return { shippingLines }; }) .setRecipient(event => event.order.customer!.emailAddress) - .setFrom(`{{ fromAddress }}`) - .setSubject(`Order confirmation for #{{ order.code }}`) + .setFrom('{{ fromAddress }}') + .setSubject('Order confirmation for #{{ order.code }}') .setTemplateVars(event => ({ order: event.order, shippingLines: event.data.shippingLines })) .setMockEvent(mockOrderStateTransitionEvent); @@ -51,8 +51,8 @@ export const emailVerificationHandler = new EmailEventListener('email-verificati return (nativeAuthMethod && !!nativeAuthMethod.identifier) || false; }) .setRecipient(event => event.user.identifier) - .setFrom(`{{ fromAddress }}`) - .setSubject(`Please verify your email address`) + .setFrom('{{ fromAddress }}') + .setSubject('Please verify your email address') .setTemplateVars(event => ({ verificationToken: event.user.getNativeAuthenticationMethod().verificationToken, })) @@ -61,8 +61,8 @@ export const emailVerificationHandler = new EmailEventListener('email-verificati export const passwordResetHandler = new EmailEventListener('password-reset') .on(PasswordResetEvent) .setRecipient(event => event.user.identifier) - .setFrom(`{{ fromAddress }}`) - .setSubject(`Forgotten password reset`) + .setFrom('{{ fromAddress }}') + .setSubject('Forgotten password reset') .setTemplateVars(event => ({ passwordResetToken: event.user.getNativeAuthenticationMethod().passwordResetToken, })) @@ -71,8 +71,8 @@ export const passwordResetHandler = new EmailEventListener('password-reset') export const emailAddressChangeHandler = new EmailEventListener('email-address-change') .on(IdentifierChangeRequestEvent) .setRecipient(event => event.user.getNativeAuthenticationMethod().pendingIdentifier!) - .setFrom(`{{ fromAddress }}`) - .setSubject(`Please verify your change of email address`) + .setFrom('{{ fromAddress }}') + .setSubject('Please verify your change of email address') .setTemplateVars(event => ({ identifierChangeToken: event.user.getNativeAuthenticationMethod().identifierChangeToken, })) diff --git a/packages/email-plugin/src/dev-mailbox.ts b/packages/email-plugin/src/dev-mailbox.ts index 25bc5cfe66..657631fef3 100644 --- a/packages/email-plugin/src/dev-mailbox.ts +++ b/packages/email-plugin/src/dev-mailbox.ts @@ -40,7 +40,7 @@ export class DevMailbox { return; } try { - await this.handleMockEventFn(handler, { + this.handleMockEventFn(handler, { ...handler.mockEvent, ctx: this.createRequestContext(languageCode as LanguageCode, req), } as EventWithContext); @@ -51,7 +51,7 @@ export class DevMailbox { } return; } else { - res.send({ success: false, error: `Mock email generation not set up.` }); + res.send({ success: false, error: 'Mock email generation not set up.' }); } }); server.get('/item/:id', async (req, res) => { @@ -61,6 +61,7 @@ export class DevMailbox { }); server.get('/placeholder-image', async (req, res) => { const img = Buffer.from( + // eslint-disable-next-line max-len '/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCADgAO4DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD7VooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACszXNeg0SENJ88rfdjB5NafTrXlPiHUW1PVZpScqDtX2AoGX7jxxqM0m5GWFf7qj/ABqL/hMtU/57/wDjorDooGbn/CZap/z3/wDHRR/wmWqf89//AB0Vh0UAbn/CZap/z3/8dFWLPx1fwSfvgs6Z5BGD+GK5uigD1vSdWg1i1E0J/wB5e6mrtea+DdQNlrCIWxHN8hHbPavSqBBRRRQIKKKKACiiigAooooAKKKKACiiigAooooAKKKKACqepatbaTD5lxIE9F6k/hU17dpY2ss8n3I1ya8p1TVJtWu3nlPU8LnhR6UDOquPiEqswhttwzwWNQ/8LDm/59U/M1x9FAzq7rx9PcW8ka26IXUruyeM965UnJyetJRQAUUUUDCiiigAooooAcjmNwykhgcgiutX4hTKoBtkYgdcmuQooEdh/wALDm/59U/M1Ys/iDG8gFzB5a/3k5rh6KAPYbG/g1GES28gkQ+nb61PXleg61Lo14rg5iY4dM8EV6lFIJY0cdGAIoEOooooEFFFFABRRRQAUUUUAFFFFABRRRQBgeOJDHoLY/idVP615tXo3jz/AJAP/bVf615zQUgooooGFFFLQAlWLXT7m8YCGF5M91HH510/hvwd9oVLq9BCdVi9R712sFvFaxhIo1jUdlFArnnkPgfUpFyypGfRm/wptx4J1KFcrGsvGflYf1r0nIHU0ZoFc8duLWa1bbNE8Z/2lIqGvYbqxgvoyk8SyL7iuD8SeE30sG4t8yW+eR3SgZzVFFFAwooooAK9W8NSGbQrN26lP6mvKa9T8K/8i/Zf7n9TQJmrRRRQSFFFFABRRRQAUUUUAFFFFABRRRQBzvjz/kA/9tV/rXnNejePP+QD/wBtV/rXnNBSCiiigYV0Xg7RRqV4ZpQfJh5+prna9P8ACNn9k0SDpuk+c0CNnp7CuQ8Q+NPs8jW9jy68NIen4VpeMNUOnaWVQ4kmOwEdRXmpJPJ5NAkW7jV7y6YmW5kf6tT7XXL6zYGK5kUD+HPFUKKCj0Lw74wTUWFvdYjnPRv4WrpJIxLGyMMqwwa8bVjGwYHBByK9U8O6kdU0mGZuHxtbnuOM0Es4DxNo/wDZGpMig+U/zITWRXonjqz8/SRMFy0Tde+K87oGFFFFAwr1Pwr/AMi/Zf7n9TXllep+Ff8AkX7L/c/qaBM1aKKKCQooooAKKKKACiiigAooooAKKKKAOd8ef8gH/tqv9a85r0bx5/yAf+2q/wBa85oKQUUUUDCvXtL/AOQdb/7gryGvU/C94LzRbdgclRsb6igTOf8AiJnfaemDXGV6R400ttQ0vzI8mSE7to7jvXnFACUUUUDCu++H27+zp8/d8zj8q4NVLsFUZJOAK9R8M6a2l6TFFJ/rG+ZvbPOKBMb4r/5AN1/u15dXo3jm8Fvo/lZw0rYH0HWvOaAQUUUUDCvU/Cv/ACL9l/uf1NeWV6n4V/5F+y/3P6mgTNWiiigkKKKKACiiigAooooAKKKKACiiigDnfHn/ACAf+2q/1rzmvRvHn/IB/wC2q/1rzmgpBRRRQMK6XwXrQ0+8NvKwEM3dj0Nc1SgkHI4NAHs/DDB5FcVr3ghy0lxYndk7jD/hS+GfGQAW2v2wBwsx/ka7KORJlDIwdT0KnNBOx5BcWNxasVmheNh2YU+1026vGCwwPIf9kV69tHpRgelAXOS8N+DvsrLc3oDSD7sfYe9dazBVJJwB1qOe4jtoy8rrGo7sa4bxN4u+3BrazYrD0aTpu/8ArUBuZ/irWjq2oELxDF8qjPU9zWJRRQUFFFFABXqfhX/kX7L/AHP6mvLK9T8K/wDIv2X+5/U0CZq0UUUEhRRRQAUUUUAFFFFABRRRQAUUUUAYHjiMyaC2P4XVj+tebV7BqFmmoWcsD9HGK8o1Cxl026kgmXDKcZ7H3FBSK1FFFAwooooAKuWerXmnsDBcPHjoucj8jVOigDpY/HmoR7dyxyY67h1ps3jrUZFYL5cZPQqOn51zlFAizdajc3rEzzvJnsTx+VVqKKBhRRRQAUUUUAFeq+GY2i0GzVhhgnT8TXnWh6TJq9/HCo+TOXbsBXqsMSwQpGowqjAoEx9FFFBIUUUUAFFFFABRRRQAUUUUAFFFFABVHVtFttYhCTplh91x1FXqKAOIuPh5Lu/cXSbf+mgP9Ki/4V5d/wDP1D+R/wAK7yigdzg/+FeXf/P1D+R/wo/4V5d/8/UP5H/Cu8ooC5wf/CvLv/n6h/I/4Uf8K8u/+fqH8j/hXeUUBc4P/hXl3/z9Q/kf8KP+FeXf/P1D+R/wrvKKAucH/wAK8u/+fqH8j/hR/wAK8u/+fqH8j/hXeUUBc4P/AIV5d/8AP1D+R/wo/wCFeXf/AD9Q/kf8K7yigLnB/wDCvLv/AJ+ofyP+FWLX4ekMDc3KkZ6Rg12lFAXKmm6VbaVD5dvGEB6nuat0UUCCiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP/9k=', 'base64', ); diff --git a/packages/email-plugin/src/email-processor.ts b/packages/email-plugin/src/email-processor.ts index 52e48b3247..7e9a1bd89d 100644 --- a/packages/email-plugin/src/email-processor.ts +++ b/packages/email-plugin/src/email-processor.ts @@ -44,7 +44,7 @@ export class EmailProcessor { } else { if (!this.options.transport) { throw new InternalServerError( - `When devMode is not set to true, the 'transport' property must be set.`, + 'When devMode is not set to true, the \'transport\' property must be set.', ); } this.transport = this.options.transport; @@ -60,12 +60,7 @@ export class EmailProcessor { async process(data: IntermediateEmailDetails) { try { const bodySource = await this.templateLoader.loadTemplate(data.type, data.templateFile); - const generated = await this.generator.generate( - data.from, - data.subject, - bodySource, - data.templateVars, - ); + const generated = this.generator.generate(data.from, data.subject, bodySource, data.templateVars); const emailDetails: EmailDetails = { ...generated, recipient: data.recipient, diff --git a/packages/email-plugin/src/event-handler.ts b/packages/email-plugin/src/event-handler.ts index e25fd819b8..c41640888f 100644 --- a/packages/email-plugin/src/event-handler.ts +++ b/packages/email-plugin/src/event-handler.ts @@ -346,13 +346,13 @@ export class EmailEventHandler { .setFrom('"test from" ') .setRecipient(() => 'test@test.com') .setSubject('Hello {{ testVar }}') - .setTemplateVars((event, globals) => ({ testVar: globals.globalVar + ' quux' })); + .setTemplateVars((event, globals) => ({ testVar: (globals.globalVar as string) + ' quux' })); await initPluginWithHandlers([handler], { globalTemplateVars: { globalVar: 'baz' }, @@ -655,7 +655,7 @@ describe('EmailPlugin', () => { await pause(); expect(testingLogger.warnSpy.mock.calls[0][0]).toContain( - `Email has a large 'content' attachment (64k). Consider using the 'path' instead for improved performance.`, + 'Email has a large \'content\' attachment (64k). Consider using the \'path\' instead for improved performance.', ); }); }); @@ -709,7 +709,7 @@ describe('EmailPlugin', () => { eventBus.publish(new OrderStateTransitionEvent('ArrangingPayment', 'PaymentSettled', ctx, order)); await pause(); - expect(onSend.mock.calls[0][0].subject).toBe(`Order confirmation for #${order.code}`); + expect(onSend.mock.calls[0][0].subject).toBe(`Order confirmation for #${order.code as string}`); }); }); @@ -731,7 +731,7 @@ describe('EmailPlugin', () => { eventBus.publish(new MockEvent(ctx, true)); await pause(); - expect(testingLogger.errorSpy.mock.calls[0][0]).toContain(`ENOENT: no such file or directory`); + expect(testingLogger.errorSpy.mock.calls[0][0]).toContain('ENOENT: no such file or directory'); }); it('Logs a Handlebars error if the template is invalid', async () => { @@ -751,7 +751,7 @@ describe('EmailPlugin', () => { eventBus.publish(new MockEvent(ctx, true)); await pause(); - expect(testingLogger.errorSpy.mock.calls[0][0]).toContain(`Parse error on line 3:`); + expect(testingLogger.errorSpy.mock.calls[0][0]).toContain('Parse error on line 3:'); }); it('Logs an error if the loadData method throws', async () => { @@ -774,7 +774,7 @@ describe('EmailPlugin', () => { eventBus.publish(new MockEvent(ctx, true)); await pause(); - expect(testingLogger.errorSpy.mock.calls[0][0]).toContain(`something went horribly wrong!`); + expect(testingLogger.errorSpy.mock.calls[0][0]).toContain('something went horribly wrong!'); }); }); diff --git a/packages/email-plugin/src/types.ts b/packages/email-plugin/src/types.ts index 864ccead1c..c57c05fee3 100644 --- a/packages/email-plugin/src/types.ts +++ b/packages/email-plugin/src/types.ts @@ -2,12 +2,12 @@ import { LanguageCode } from '@vendure/common/lib/generated-types'; import { Omit } from '@vendure/common/lib/omit'; import { Injector, RequestContext, VendureEvent } from '@vendure/core'; import { Attachment } from 'nodemailer/lib/mailer'; +import SESTransport from 'nodemailer/lib/ses-transport' import SMTPTransport from 'nodemailer/lib/smtp-transport'; import { EmailGenerator } from './email-generator'; import { EmailSender } from './email-sender'; import { EmailEventHandler } from './event-handler'; -import SESTransport from 'nodemailer/lib/ses-transport' /** * @description diff --git a/packages/harden-plugin/package.json b/packages/harden-plugin/package.json index 2c92701f3d..f9cad961ed 100644 --- a/packages/harden-plugin/package.json +++ b/packages/harden-plugin/package.json @@ -10,7 +10,7 @@ "scripts": { "watch": "tsc -p ./tsconfig.build.json --watch", "build": "rimraf lib && tsc -p ./tsconfig.build.json", - "lint": "tslint --fix --project ./" + "lint": "eslint --fix ." }, "homepage": "https://www.vendure.io/", "funding": "https://github.com/sponsors/michaelbromley", diff --git a/packages/harden-plugin/src/harden.plugin.ts b/packages/harden-plugin/src/harden.plugin.ts index 421ad57f0a..170666fc69 100644 --- a/packages/harden-plugin/src/harden.plugin.ts +++ b/packages/harden-plugin/src/harden.plugin.ts @@ -88,7 +88,8 @@ import { HardenPluginOptions } from './types'; * - The requirements of your storefront and other clients using the Shop API * - The resources available to your server * - * You should aim to set the maximum as low as possible while still being able to service all the requests required. This will take some manual tuning. + * You should aim to set the maximum as low as possible while still being able to service all the requests required. + * This will take some manual tuning. * While tuning the max, you can turn on the `logComplexityScore` to get a detailed breakdown of the complexity of each query, as well as how * that total score is derived from its child fields: * @@ -147,7 +148,7 @@ import { HardenPluginOptions } from './types'; ], configuration: config => { if (HardenPlugin.options.hideFieldSuggestions !== false) { - Logger.verbose(`Configuring HideValidationErrorsPlugin`, loggerCtx); + Logger.verbose('Configuring HideValidationErrorsPlugin', loggerCtx); config.apiOptions.apolloServerPlugins.push(new HideValidationErrorsPlugin()); } config.apiOptions.apolloServerPlugins.push(new QueryComplexityPlugin(HardenPlugin.options)); diff --git a/packages/harden-plugin/src/middleware/query-complexity-plugin.ts b/packages/harden-plugin/src/middleware/query-complexity-plugin.ts index 5cb102d40d..d06763dfdb 100644 --- a/packages/harden-plugin/src/middleware/query-complexity-plugin.ts +++ b/packages/harden-plugin/src/middleware/query-complexity-plugin.ts @@ -67,7 +67,7 @@ export class QueryComplexityPlugin implements ApolloServerPlugin { }" is ${complexity}, which exceeds the maximum of ${maxQueryComplexity}`, loggerCtx, ); - throw new InternalServerError(`Query is too complex`); + throw new InternalServerError('Query is too complex'); } }, }; diff --git a/packages/job-queue-plugin/e2e/bullmq-job-queue-plugin.e2e-spec.ts b/packages/job-queue-plugin/e2e/bullmq-job-queue-plugin.e2e-spec.ts index 95af9f8268..d83a95a092 100644 --- a/packages/job-queue-plugin/e2e/bullmq-job-queue-plugin.e2e-spec.ts +++ b/packages/job-queue-plugin/e2e/bullmq-job-queue-plugin.e2e-spec.ts @@ -7,9 +7,11 @@ import { initialData } from '../../../e2e-common/e2e-initial-data'; import { testConfig, TEST_SETUP_TIMEOUT_MS } from '../../../e2e-common/test-config'; import { awaitRunningJobs } from '../../core/e2e/utils/await-running-jobs'; import { BullMQJobQueuePlugin } from '../src/bullmq/plugin'; -// tslint:disable-next-line:no-var-requires + +// eslint-disable-next-line @typescript-eslint/no-var-requires const Redis = require('ioredis'); -// tslint:disable-next-line:no-var-requires + +// eslint-disable-next-line @typescript-eslint/no-var-requires const { redisHost, redisPort } = require('./constants'); jest.setTimeout(10 * 3000); diff --git a/packages/job-queue-plugin/package.json b/packages/job-queue-plugin/package.json index 6bb5dfb897..d9ae643e44 100644 --- a/packages/job-queue-plugin/package.json +++ b/packages/job-queue-plugin/package.json @@ -11,7 +11,7 @@ "scripts": { "watch": "tsc -p ./tsconfig.build.json --watch", "build": "rimraf package && tsc -p ./tsconfig.build.json", - "lint": "tslint --fix --project ./", + "lint": "eslint --fix .", "test": "vitest --run", "e2e-wip": "node e2e/check-connection.js || jest --config ../../e2e-common/jest-config.js --runInBand --package=job-queue-plugin", "ci": "yarn build" diff --git a/packages/job-queue-plugin/src/bullmq/bullmq-job-queue-strategy.ts b/packages/job-queue-plugin/src/bullmq/bullmq-job-queue-strategy.ts index c203d7a767..630c05a415 100644 --- a/packages/job-queue-plugin/src/bullmq/bullmq-job-queue-strategy.ts +++ b/packages/job-queue-plugin/src/bullmq/bullmq-job-queue-strategy.ts @@ -63,21 +63,23 @@ export class BullMQJobQueueStrategy implements InspectableJobQueueStrategy { : new Redis(this.connectionOptions); const redisHealthIndicator = injector.get(RedisHealthIndicator); - Logger.info(`Checking Redis connection...`, loggerCtx); + Logger.info('Checking Redis connection...', loggerCtx); const health = await redisHealthIndicator.isHealthy('redis'); if (health.redis.status === 'down') { Logger.error('Could not connect to Redis', loggerCtx); } else { - Logger.info(`Connected to Redis ✔`, loggerCtx); + Logger.info('Connected to Redis ✔', loggerCtx); } this.queue = new Queue(QUEUE_NAME, { ...options.queueOptions, connection: this.redisConnection, }) - .on('error', (e: any) => Logger.error(`BullMQ Queue error: ${e.message}`, loggerCtx, e.stack)) - .on('resumed', () => Logger.verbose(`BullMQ Queue resumed`, loggerCtx)) - .on('paused', () => Logger.verbose(`BullMQ Queue paused`, loggerCtx)); + .on('error', (e: any) => + Logger.error(`BullMQ Queue error: ${JSON.stringify(e.message)}`, loggerCtx, e.stack), + ) + .on('resumed', () => Logger.verbose('BullMQ Queue resumed', loggerCtx)) + .on('paused', () => Logger.verbose('BullMQ Queue paused', loggerCtx)); if (await this.queue.isPaused()) { await this.queue.resume(); @@ -86,7 +88,7 @@ export class BullMQJobQueueStrategy implements InspectableJobQueueStrategy { this.workerProcessor = async bullJob => { const queueName = bullJob.name; Logger.debug( - `Job ${bullJob.id} [${queueName}] starting (attempt ${bullJob.attemptsMade + 1} of ${ + `Job ${bullJob.id ?? ''} [${queueName}] starting (attempt ${bullJob.attemptsMade + 1} of ${ bullJob.opts.attempts ?? 1 })`, ); @@ -109,7 +111,9 @@ export class BullMQJobQueueStrategy implements InspectableJobQueueStrategy { ...options.schedulerOptions, connection: this.redisConnection, }) - .on('error', (e: any) => Logger.error(`BullMQ Scheduler error: ${e.message}`, loggerCtx, e.stack)) + .on('error', (e: any) => + Logger.error(`BullMQ Scheduler error: ${JSON.stringify(e.message)}`, loggerCtx, e.stack), + ) .on('stalled', jobId => Logger.warn(`BullMQ Scheduler stalled on job ${jobId}`, loggerCtx)) .on('failed', jobId => Logger.warn(`BullMQ Scheduler failed on job ${jobId}`, loggerCtx)); } @@ -118,7 +122,7 @@ export class BullMQJobQueueStrategy implements InspectableJobQueueStrategy { await Promise.all([this.queue.close(), this.worker?.close(), this.scheduler.close()]); } - async add = {}>(job: Job): Promise> { + async add = object>(job: Job): Promise> { const retries = this.options.setRetries?.(job.queueName, job) ?? job.retries; const backoff = this.options.setBackoff?.(job.queueName, job) ?? { delay: 1000, @@ -137,13 +141,13 @@ export class BullMQJobQueueStrategy implements InspectableJobQueueStrategy { if (await bullJob.isActive()) { // Not yet possible in BullMQ, see // https://github.com/taskforcesh/bullmq/issues/632 - throw new InternalServerError(`Cannot cancel a running job`); + throw new InternalServerError('Cannot cancel a running job'); } try { await bullJob.remove(); return this.createVendureJob(bullJob); } catch (e: any) { - const message = `Error when cancelling job: ${e.message}`; + const message = `Error when cancelling job: ${JSON.stringify(e.message)}`; Logger.error(message, loggerCtx); throw new InternalServerError(message); } @@ -232,7 +236,7 @@ export class BullMQJobQueueStrategy implements InspectableJobQueueStrategy { } } - async start = {}>( + async start = object>( queueName: string, process: (job: Job) => Promise, ): Promise { @@ -246,22 +250,22 @@ export class BullMQJobQueueStrategy implements InspectableJobQueueStrategy { this.worker = new Worker(QUEUE_NAME, this.workerProcessor, options) .on('error', e => Logger.error(`BullMQ Worker error: ${e.message}`, loggerCtx, e.stack)) .on('closing', e => Logger.verbose(`BullMQ Worker closing: ${e}`, loggerCtx)) - .on('closed', () => Logger.verbose(`BullMQ Worker closed`)) + .on('closed', () => Logger.verbose('BullMQ Worker closed')) .on('failed', (job: Bull.Job, failedReason) => { Logger.warn( - `Job ${job.id} [${job.name}] failed (attempt ${job.attemptsMade} of ${ + `Job ${job.id ?? ''} [${job.name}] failed (attempt ${job.attemptsMade} of ${ job.opts.attempts ?? 1 })`, ); }) .on('completed', (job: Bull.Job, failedReason: string) => { - Logger.debug(`Job ${job.id} [${job.name}] completed`); + Logger.debug(`Job ${job.id ?? ''} [${job.name}] completed`); }); } } private stopped = false; - async stop = {}>( + async stop = object>( queueName: string, process: (job: Job) => Promise, ): Promise { diff --git a/packages/job-queue-plugin/src/bullmq/index.ts b/packages/job-queue-plugin/src/bullmq/index.ts index ec58c0bfce..b5ce627ce8 100644 --- a/packages/job-queue-plugin/src/bullmq/index.ts +++ b/packages/job-queue-plugin/src/bullmq/index.ts @@ -2,10 +2,10 @@ import { Logger } from '@vendure/core'; // ensure that the bullmq package is installed try { - // tslint:disable-next-line:no-var-requires + // eslint-disable-next-line @typescript-eslint/no-var-requires require('bullmq'); } catch (e: any) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.error('The BullMQJobQueuePlugin depends on the "bullmq" package being installed.'); process.exit(1); } diff --git a/packages/job-queue-plugin/src/bullmq/redis-health-indicator.ts b/packages/job-queue-plugin/src/bullmq/redis-health-indicator.ts index 92c8a551ac..a23d516213 100644 --- a/packages/job-queue-plugin/src/bullmq/redis-health-indicator.ts +++ b/packages/job-queue-plugin/src/bullmq/redis-health-indicator.ts @@ -18,7 +18,11 @@ export class RedisHealthIndicator extends HealthIndicator { const pingResult = await new Promise(async (resolve, reject) => { try { connection.on('error', err => { - Logger.error(`Redis health check error: ${err.message}`, loggerCtx, err.stack); + Logger.error( + `Redis health check error: ${JSON.stringify(err.message)}`, + loggerCtx, + err.stack, + ); resolve(err); }); if (this.timeoutTimer) { @@ -33,7 +37,7 @@ export class RedisHealthIndicator extends HealthIndicator { resolve('timeout'); return; } - client.ping((err: any, res: any) => { + void client.ping((err: any, res: any) => { if (err) { resolve(err); } else { @@ -49,7 +53,11 @@ export class RedisHealthIndicator extends HealthIndicator { await connection.close(); // await connection.disconnect(); } catch (e: any) { - Logger.error(`Redis health check error closing connection: ${e.message}`, loggerCtx, e.stack); + Logger.error( + `Redis health check error closing connection: ${JSON.stringify(e.message)}`, + loggerCtx, + e.stack, + ); } const result = this.getStatus(key, pingResult === 'PONG'); diff --git a/packages/job-queue-plugin/src/bullmq/redis-job-buffer-storage-strategy.ts b/packages/job-queue-plugin/src/bullmq/redis-job-buffer-storage-strategy.ts index 94601c54ab..aab72d06f5 100644 --- a/packages/job-queue-plugin/src/bullmq/redis-job-buffer-storage-strategy.ts +++ b/packages/job-queue-plugin/src/bullmq/redis-job-buffer-storage-strategy.ts @@ -66,7 +66,7 @@ export class RedisJobBufferStorageStrategy implements JobBufferStorageStrategy { const jobConfig: JobConfig = JSON.parse(jobConfigString); return new Job(jobConfig); } catch (e: any) { - Logger.error(`Could not parse buffered job:\n${e.message}`, loggerCtx, e.stack); + Logger.error(`Could not parse buffered job:\n${JSON.stringify(e.message)}`, loggerCtx, e.stack); throw e; } } diff --git a/packages/job-queue-plugin/src/pub-sub/pub-sub-job-queue-strategy.ts b/packages/job-queue-plugin/src/pub-sub/pub-sub-job-queue-strategy.ts index 4627aaa308..e5743dc4af 100644 --- a/packages/job-queue-plugin/src/pub-sub/pub-sub-job-queue-strategy.ts +++ b/packages/job-queue-plugin/src/pub-sub/pub-sub-job-queue-strategy.ts @@ -39,7 +39,7 @@ export class PubSubJobQueueStrategy extends InjectableJobQueueStrategy implement this.topics.clear(); } - async add = {}>(job: Job): Promise> { + async add = object>(job: Job): Promise> { if (!this.hasInitialized) { throw new Error('Cannot add job before init'); } @@ -57,7 +57,7 @@ export class PubSubJobQueueStrategy extends InjectableJobQueueStrategy implement }); } - async start = {}>( + async start = object>( queueName: string, process: (job: Job) => Promise, ) { @@ -96,7 +96,7 @@ export class PubSubJobQueueStrategy extends InjectableJobQueueStrategy implement subscription.on('message', listener); } - async stop = {}>( + async stop = object>( queueName: string, process: (job: Job) => Promise, ) { diff --git a/packages/payments-plugin/e2e/graphql/generated-admin-types.ts b/packages/payments-plugin/e2e/graphql/generated-admin-types.ts index 670f2da0f5..ac2a9f50b2 100644 --- a/packages/payments-plugin/e2e/graphql/generated-admin-types.ts +++ b/packages/payments-plugin/e2e/graphql/generated-admin-types.ts @@ -1,4 +1,4 @@ -// tslint:disable +/* eslint-disable */ export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; diff --git a/packages/payments-plugin/e2e/graphql/generated-shop-types.ts b/packages/payments-plugin/e2e/graphql/generated-shop-types.ts index 6a82dcb478..cf43260fad 100644 --- a/packages/payments-plugin/e2e/graphql/generated-shop-types.ts +++ b/packages/payments-plugin/e2e/graphql/generated-shop-types.ts @@ -1,4 +1,4 @@ -// tslint:disable +/* eslint-disable */ export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; diff --git a/packages/payments-plugin/e2e/mollie-dev-server.ts b/packages/payments-plugin/e2e/mollie-dev-server.ts index eb9c611b98..62fd6e5984 100644 --- a/packages/payments-plugin/e2e/mollie-dev-server.ts +++ b/packages/payments-plugin/e2e/mollie-dev-server.ts @@ -26,8 +26,9 @@ import { CREATE_MOLLIE_PAYMENT_INTENT, setShipping } from './payment-helpers'; /** * This should only be used to locally test the Mollie payment plugin */ -/* tslint:disable:no-floating-promises */ +/* eslint-disable @typescript-eslint/no-floating-promises */ (async () => { + // eslint-disable-next-line @typescript-eslint/no-var-requires require('dotenv').config(); registerInitializer('sqljs', new SqljsInitializer(path.join(__dirname, '__data__'))); @@ -70,8 +71,11 @@ import { CREATE_MOLLIE_PAYMENT_INTENT, setShipping } from './payment-helpers'; handler: { code: molliePaymentHandler.code, arguments: [ - { name: 'redirectUrl', value: `${tunnel.url}/admin/orders?filter=open&page=1` }, - // tslint:disable-next-line:no-non-null-assertion + { + name: 'redirectUrl', + value: `${tunnel.url as string}/admin/orders?filter=open&page=1`, + }, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion { name: 'apiKey', value: process.env.MOLLIE_APIKEY! }, { name: 'autoCapture', value: 'false' }, ], @@ -105,5 +109,5 @@ import { CREATE_MOLLIE_PAYMENT_INTENT, setShipping } from './payment-helpers'; if (createMolliePaymentIntent.errorCode) { throw createMolliePaymentIntent; } - Logger.info(`Mollie payment link: ${createMolliePaymentIntent.url}`, 'Mollie DevServer'); + Logger.info(`Mollie payment link: ${createMolliePaymentIntent.url as string}`, 'Mollie DevServer'); })(); diff --git a/packages/payments-plugin/e2e/mollie-payment.e2e-spec.ts b/packages/payments-plugin/e2e/mollie-payment.e2e-spec.ts index fb30b90962..0a77161f7c 100644 --- a/packages/payments-plugin/e2e/mollie-payment.e2e-spec.ts +++ b/packages/payments-plugin/e2e/mollie-payment.e2e-spec.ts @@ -308,7 +308,7 @@ describe('Mollie payments', () => { code: order.code, }, ); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion order = orderByCode!; expect(order.state).toBe('PaymentSettled'); }); @@ -338,7 +338,7 @@ describe('Mollie payments', () => { return true; }) .reply(200, { status: 'failed', resource: 'payment' }); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const refund = await refundOne(adminClient, order.lines[0].id, order.payments![0].id); expect(refund.state).toBe('Failed'); }); @@ -351,7 +351,7 @@ describe('Mollie payments', () => { return true; }) .reply(200, { status: 'pending', resource: 'payment' }); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const refund = await refundOne(adminClient, order.lines[0].id, order.payments![0].id); expect(mollieRequest?.amount.value).toBe('119.99'); expect(refund.total).toBe(11999); @@ -406,7 +406,7 @@ describe('Mollie payments', () => { code: order.code, }, ); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion order = orderByCode!; expect(order.state).toBe('PaymentAuthorized'); }); @@ -432,7 +432,7 @@ describe('Mollie payments', () => { SettlePaymentMutation, SettlePaymentMutationVariables >(SETTLE_PAYMENT, { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion id: order.payments![0].id, }); const { orderByCode } = await shopClient.query( @@ -441,7 +441,7 @@ describe('Mollie payments', () => { code: order.code, }, ); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion order = orderByCode!; expect(createShipmentBody).toBeDefined(); expect(order.state).toBe('PaymentSettled'); diff --git a/packages/payments-plugin/e2e/payment-helpers.ts b/packages/payments-plugin/e2e/payment-helpers.ts index 2413764390..27e71c6a22 100644 --- a/packages/payments-plugin/e2e/payment-helpers.ts +++ b/packages/payments-plugin/e2e/payment-helpers.ts @@ -41,7 +41,7 @@ export async function proceedToArrangingPayment(shopClient: SimpleGraphQLClient) TransitionToState.Mutation, TransitionToState.Variables >(TRANSITION_TO_STATE, { state: 'ArrangingPayment' }); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion return (transitionOrderToState as TestOrderFragmentFragment)!.id; } diff --git a/packages/payments-plugin/e2e/stripe-payment.e2e-spec.ts b/packages/payments-plugin/e2e/stripe-payment.e2e-spec.ts index c03e920b49..987eb594d3 100644 --- a/packages/payments-plugin/e2e/stripe-payment.e2e-spec.ts +++ b/packages/payments-plugin/e2e/stripe-payment.e2e-spec.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { mergeConfig } from '@vendure/core'; import { CreateProduct, CreateProductVariants } from '@vendure/core/e2e/graphql/generated-e2e-admin-types'; import { CREATE_PRODUCT, CREATE_PRODUCT_VARIANTS } from '@vendure/core/e2e/graphql/shared-definitions'; diff --git a/packages/payments-plugin/package.json b/packages/payments-plugin/package.json index 0d7c746b8e..f20876d310 100644 --- a/packages/payments-plugin/package.json +++ b/packages/payments-plugin/package.json @@ -13,7 +13,7 @@ "build": "rimraf package && tsc -p ./tsconfig.build.json", "e2e": "cross-env PACKAGE=payments-plugin vitest --config ../../e2e-common/vitest.config.ts --run", "e2e:watch": "cross-env PACKAGE=payments-plugin vitest --config ../../e2e-common/vitest.config.ts", - "lint": "tslint --fix --project ./", + "lint": "eslint --fix .", "ci": "yarn build", "dev-server:mollie": "yarn build && DB=sqlite node -r ts-node/register e2e/mollie-dev-server.ts" }, diff --git a/packages/payments-plugin/src/braintree/braintree.resolver.ts b/packages/payments-plugin/src/braintree/braintree.resolver.ts index 0fd59d704c..442e4a7223 100644 --- a/packages/payments-plugin/src/braintree/braintree.resolver.ts +++ b/packages/payments-plugin/src/braintree/braintree.resolver.ts @@ -34,13 +34,13 @@ export class BraintreeResolver { ) { if (orderId) { Logger.warn( - `The orderId argument to the generateBraintreeClientToken mutation has been deprecated and may be omitted.`, + 'The orderId argument to the generateBraintreeClientToken mutation has been deprecated and may be omitted.', ); } const sessionOrder = await this.activeOrderService.getOrderFromContext(ctx); if (!sessionOrder) { throw new InternalServerError( - `Cannot generate Braintree clientToken as there is no active Order.`, + 'Cannot generate Braintree clientToken as there is no active Order.', ); } const order = await this.orderService.findOne(ctx, sessionOrder.id); @@ -75,7 +75,7 @@ export class BraintreeResolver { } } catch (e: any) { Logger.error( - `Could not generate Braintree clientToken. Check the configured credentials.`, + 'Could not generate Braintree clientToken. Check the configured credentials.', loggerCtx, ); throw e; diff --git a/packages/payments-plugin/src/mollie/graphql/generated-shop-types.ts b/packages/payments-plugin/src/mollie/graphql/generated-shop-types.ts index bc2e8c656c..c063e5db0b 100644 --- a/packages/payments-plugin/src/mollie/graphql/generated-shop-types.ts +++ b/packages/payments-plugin/src/mollie/graphql/generated-shop-types.ts @@ -1,4 +1,4 @@ -// tslint:disable +/* eslint-disable */ export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; diff --git a/packages/payments-plugin/src/mollie/mollie.controller.ts b/packages/payments-plugin/src/mollie/mollie.controller.ts index a7822a032b..7371a394dd 100644 --- a/packages/payments-plugin/src/mollie/mollie.controller.ts +++ b/packages/payments-plugin/src/mollie/mollie.controller.ts @@ -15,7 +15,7 @@ export class MollieController { @Body() body: any, ): Promise { if (!body.id) { - return Logger.warn(` Ignoring incoming webhook, because it has no body.id.`, loggerCtx); + return Logger.warn(' Ignoring incoming webhook, because it has no body.id.', loggerCtx); } try { await this.mollieService.handleMollieStatusUpdate({ @@ -24,7 +24,11 @@ export class MollieController { orderId: body.id, }); } catch (error: any) { - Logger.error(`Failed to process incoming webhook: ${error?.message}`, loggerCtx, error); + Logger.error( + `Failed to process incoming webhook: ${JSON.stringify(error?.message)}`, + loggerCtx, + error.stack, + ); throw error; } } diff --git a/packages/payments-plugin/src/mollie/mollie.handler.ts b/packages/payments-plugin/src/mollie/mollie.handler.ts index 58e52beae1..00d6f5e3c1 100644 --- a/packages/payments-plugin/src/mollie/mollie.handler.ts +++ b/packages/payments-plugin/src/mollie/mollie.handler.ts @@ -41,7 +41,10 @@ export const molliePaymentHandler = new PaymentMethodHandler({ description: [ { languageCode: LanguageCode.en, - value: 'This option only affects pay-later methods. Automatically capture payments immediately after authorization. Without autoCapture orders will remain in the PaymentAuthorized state, and you need to manually settle payments to get paid.', + value: + 'This option only affects pay-later methods. Automatically capture payments ' + + 'immediately after authorization. Without autoCapture orders will remain in the PaymentAuthorized state, ' + + 'and you need to manually settle payments to get paid.', }, ], }, @@ -62,10 +65,15 @@ export const molliePaymentHandler = new PaymentMethodHandler({ } if (metadata.status !== 'Authorized' && metadata.status !== 'Settled') { throw Error( - `Cannot create payment for status ${metadata.status} for order ${order.code}. Only Authorized or Settled are allowed.`, + `Cannot create payment for status ${metadata.status as string} for order ${ + order.code + }. Only Authorized or Settled are allowed.`, ); } - Logger.info(`Payment for order ${order.code} created with state '${metadata.status}'`, loggerCtx); + Logger.info( + `Payment for order ${order.code} created with state '${metadata.status as string}'`, + loggerCtx, + ); return { amount, state: metadata.status, diff --git a/packages/payments-plugin/src/mollie/mollie.service.ts b/packages/payments-plugin/src/mollie/mollie.service.ts index bbc53704dd..1b31bc02a3 100644 --- a/packages/payments-plugin/src/mollie/mollie.service.ts +++ b/packages/payments-plugin/src/mollie/mollie.service.ts @@ -116,7 +116,7 @@ export class MollieService { toMollieAddress(order.shippingAddress, order.customer); if (!billingAddress) { return new InvalidInputError( - `Order doesn't have a complete shipping address or billing address. At least city, streetline1 and country are needed to create a payment intent.`, + 'Order doesn\'t have a complete shipping address or billing address. At least city, streetline1 and country are needed to create a payment intent.', ); } const orderInput: CreateParameters = { @@ -135,7 +135,7 @@ export class MollieService { Logger.info(`Created Mollie order ${mollieOrder.id} for order ${order.code}`); const url = mollieOrder.getCheckoutUrl(); if (!url) { - throw Error(`Unable to getCheckoutUrl() from Mollie order`); + throw Error('Unable to getCheckoutUrl() from Mollie order'); } return { url, @@ -225,7 +225,8 @@ export class MollieService { ); if (transitionToStateResult instanceof OrderStateTransitionError) { throw Error( - `Error transitioning order ${order.code} from ${transitionToStateResult.fromState} to ${transitionToStateResult.toState}: ${transitionToStateResult.message}`, + `Error transitioning order ${order.code} from ${transitionToStateResult.fromState} ` + + `to ${transitionToStateResult.toState}: ${transitionToStateResult.message}`, ); } } diff --git a/packages/payments-plugin/src/stripe/stripe.controller.ts b/packages/payments-plugin/src/stripe/stripe.controller.ts index f8cf86f8f1..f5ce1d6b46 100644 --- a/packages/payments-plugin/src/stripe/stripe.controller.ts +++ b/packages/payments-plugin/src/stripe/stripe.controller.ts @@ -48,7 +48,7 @@ export class StripeController { try { event = this.stripeService.constructEventFromPayload(request.rawBody, signature); } catch (e: any) { - Logger.error(`${signatureErrorMessage} ${signature}: ${e.message}`, loggerCtx); + Logger.error(`${signatureErrorMessage} ${signature}: ${JSON.stringify(e.message)}`, loggerCtx); response.status(HttpStatus.BAD_REQUEST).send(signatureErrorMessage); return; } @@ -63,7 +63,7 @@ export class StripeController { const { metadata: { channelToken, orderCode, orderId } = {} } = paymentIntent; if (event.type === 'payment_intent.payment_failed') { - const message = paymentIntent.last_payment_error?.message; + const message = paymentIntent.last_payment_error?.message ?? 'unknown error'; Logger.warn(`Payment for order ${orderCode} failed: ${message}`, loggerCtx); response.status(HttpStatus.OK).send('Ok'); return; diff --git a/packages/testing/package.json b/packages/testing/package.json index 5eee7a2de2..4e13034cb6 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -26,7 +26,7 @@ "scripts": { "build": "tsc -p ./tsconfig.build.json", "watch": "tsc -p ./tsconfig.build.json -w", - "lint": "tslint --fix --project ./", + "lint": "eslint --fix .", "ci": "yarn build" }, "bugs": { diff --git a/packages/testing/src/config/testing-asset-preview-strategy.ts b/packages/testing/src/config/testing-asset-preview-strategy.ts index f5e2b34fc2..f8e086125e 100644 --- a/packages/testing/src/config/testing-asset-preview-strategy.ts +++ b/packages/testing/src/config/testing-asset-preview-strategy.ts @@ -1,7 +1,7 @@ import { AssetPreviewStrategy, RequestContext } from '@vendure/core'; const TEST_IMAGE_BASE_64 = - // tslint:disable-next-line:max-line-length + // eslint-disable-next-line max-len 'iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyppVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NjcyOSwgMjAxMi8wNS8wMy0xMzo0MDowMyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIEVsZW1lbnRzIDEyLjAgV2luZG93cyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowQzYyREUzNEM1QTcxMUU5OEJCNUU3Qzg2NjgyOTVFOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowQzYyREUzNUM1QTcxMUU5OEJCNUU3Qzg2NjgyOTVFOSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjBDNjJERTMyQzVBNzExRTk4QkI1RTdDODY2ODI5NUU5IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjBDNjJERTMzQzVBNzExRTk4QkI1RTdDODY2ODI5NUU5Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+1hstBAAAAvxJREFUeNrsmslu4zAQRGlZ8u7DXPL/HzZfMAcH8G7Ly7iEeUKboR0pkWIIQwKMrI2s6i52N4X0FovFb+fcL9fN9p7e/rzd+ryjBLLk9id33W154jreIoFIIBKIBCKB/5tA+qqJe73e3fn1en0NASYWoBAoe41nL5eLO5/PZU+SxI1Gow/vt0pAk202G3c8HgsAOtex3+8XnWsCLZCn06kATtd1SzDLsqLX9UT6VfCaSKB0tIDsM4DzrxcTp2kBWGPICBoj9HxjBACNRfM8LyaVpWez2R0RKxGsDCgrI43BfZFQw4ONEtAE+/3eHQ6HEiBNk8maobVhuyVliTKWCCBHjSejNOoBWUvuFmC5nmtYy7pdvwXk2eLmCCEIIic/AHybAIAULcbjsdvtdqXFACoA2+22OOq54XD4VNN6B2PotwyiMQkCVdZCUpcALhdIe11NEhMATSyCVmqh2O9LjTVTZw1UJsCgVr++PCCDhOw9/SZqPWq67xulEQlhFXWshEYtaEkGcvqNDAC/Wq3cZDIpn/NbyCiNrgENzGLDyr5WtT78TKx3lPR0LpkNBoOHUqrrgaROHgCszQF2Mr9sIP6v1+uCNJ7Q+2paJ/Y5O2bVZFYrE0tChFM/VFIucJ1IIsvrOuR0JIKp20iFVFsjQMJisQFKSQ5rhiTnaxoZ2gxNPgjJq7H9gB9ZZC1NKl2HFiSh9llpAhGerVuRVvaADY3olj6fz+9KA8DbyvNRQsObtkZqrRoVWNYB5TSkCLPURv6Cxtq2yLMEkRpld1VPfJkAiQ0wLGDrGbtHILpI4/a+b3mVFq3kAbsONKmsPJ1O7ypMSmSb7Ci9/Z0bxDjXuzpXomt1Q4NkiOc64na7J7C5w+YLu/mhbiq/lf8r7FolgNVk2eVy+QGsPGO3ltbKoVLaeg/5tLIjs5GIraCO6Nvug0MbeR8UpbRv9R/ZE0v7NhN/BvazLxov+S5U19Xxy1wkEAlEApFAJBAJPCCQdRh/plLij+vuP3y8/xVgAAkZCFP/heS9AAAAAElFTkSuQmCC'; /** diff --git a/packages/testing/src/config/testing-asset-storage-strategy.ts b/packages/testing/src/config/testing-asset-storage-strategy.ts index af80c7f86d..2f48131716 100644 --- a/packages/testing/src/config/testing-asset-storage-strategy.ts +++ b/packages/testing/src/config/testing-asset-storage-strategy.ts @@ -20,7 +20,7 @@ export class TestingAssetStorageStrategy implements AssetStorageStrategy { } toAbsoluteUrl(reqest: Request, identifier: string): string { - const prefix = `test-url/`; + const prefix = 'test-url/'; return identifier.startsWith(prefix) ? identifier : `${prefix}${identifier}`; } diff --git a/packages/testing/src/create-test-environment.ts b/packages/testing/src/create-test-environment.ts index a26303cbba..811097cf61 100644 --- a/packages/testing/src/create-test-environment.ts +++ b/packages/testing/src/create-test-environment.ts @@ -60,8 +60,10 @@ export interface TestEnvironment { export function createTestEnvironment(config: Required): TestEnvironment { const server = new TestServer(config); const { port, adminApiPath, shopApiPath } = config.apiOptions; - const adminClient = new SimpleGraphQLClient(config, `http://localhost:${port}/${adminApiPath}`); - const shopClient = new SimpleGraphQLClient(config, `http://localhost:${port}/${shopApiPath}`); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const adminClient = new SimpleGraphQLClient(config, `http://localhost:${port}/${adminApiPath!}`); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const shopClient = new SimpleGraphQLClient(config, `http://localhost:${port}/${shopApiPath!}`); return { server, adminClient, diff --git a/packages/testing/src/data-population/clear-all-tables.ts b/packages/testing/src/data-population/clear-all-tables.ts index e30379d34d..5b65c27a6b 100644 --- a/packages/testing/src/data-population/clear-all-tables.ts +++ b/packages/testing/src/data-population/clear-all-tables.ts @@ -2,8 +2,8 @@ import { VendureConfig } from '@vendure/core'; import { preBootstrapConfig } from '@vendure/core/dist/bootstrap'; import { createConnection } from 'typeorm'; -// tslint:disable:no-console -// tslint:disable:no-floating-promises +/* eslint-disable no-console */ +/* eslint-disable @typescript-eslint/no-floating-promises */ /** * Clears all tables in the database specified by the connectionOptions */ diff --git a/packages/testing/src/data-population/mock-data.service.ts b/packages/testing/src/data-population/mock-data.service.ts index 12be3c1fed..bd4f47cd96 100644 --- a/packages/testing/src/data-population/mock-data.service.ts +++ b/packages/testing/src/data-population/mock-data.service.ts @@ -4,7 +4,7 @@ import gql from 'graphql-tag'; import { SimpleGraphQLClient } from '../simple-graphql-client'; -// tslint:disable:no-console +/* eslint-disable no-console */ /** * A service for creating mock data via the GraphQL API. */ diff --git a/packages/testing/src/data-population/populate-customers.ts b/packages/testing/src/data-population/populate-customers.ts index ceed1a65e3..d542b492f3 100644 --- a/packages/testing/src/data-population/populate-customers.ts +++ b/packages/testing/src/data-population/populate-customers.ts @@ -26,7 +26,7 @@ export async function populateCustomers( } await customerService.createAddress(ctx, createdCustomer.id, address); } catch (e: any) { - loggingFn(`Failed to create customer: ${e.message}`); + loggingFn(`Failed to create customer: ${JSON.stringify(e.message)}`); } } } diff --git a/packages/testing/src/data-population/populate-for-testing.ts b/packages/testing/src/data-population/populate-for-testing.ts index 20644b5624..075989ba61 100644 --- a/packages/testing/src/data-population/populate-for-testing.ts +++ b/packages/testing/src/data-population/populate-for-testing.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-console */ +/* eslint-disable no-console */ import { INestApplicationContext } from '@nestjs/common'; import { LanguageCode } from '@vendure/common/lib/generated-types'; import { VendureConfig } from '@vendure/core'; @@ -8,7 +8,7 @@ import { TestServerOptions } from '../types'; import { populateCustomers } from './populate-customers'; -// tslint:disable:no-floating-promises +/* eslint-disable @typescript-eslint/no-floating-promises */ /** * Clears all tables from the database and populates with (deterministic) random data. */ @@ -42,7 +42,7 @@ async function populateProducts( ) { if (!productsCsvPath) { if (logging) { - console.log(`\nNo product data provided, skipping product import`); + console.log('\nNo product data provided, skipping product import'); } return; } diff --git a/packages/testing/src/error-result-guard.ts b/packages/testing/src/error-result-guard.ts index a8567b8f8c..ea441915b4 100644 --- a/packages/testing/src/error-result-guard.ts +++ b/packages/testing/src/error-result-guard.ts @@ -76,7 +76,7 @@ export class ErrorResultGuard { */ assertErrorResult(input: T | R): asserts input is R { if (this.isSuccess(input)) { - fail(`Should have errored`); + fail('Should have errored'); } } } diff --git a/packages/testing/src/initializers/mysql-initializer.ts b/packages/testing/src/initializers/mysql-initializer.ts index 0ed3864402..f1b6d10c5a 100644 --- a/packages/testing/src/initializers/mysql-initializer.ts +++ b/packages/testing/src/initializers/mysql-initializer.ts @@ -27,6 +27,7 @@ export class MysqlInitializer implements TestDbInitializer { + // eslint-disable-next-line @typescript-eslint/no-var-requires const { Client } = require('pg'); const client = new Client({ host: connectionOptions.host, diff --git a/packages/testing/src/initializers/sqljs-initializer.ts b/packages/testing/src/initializers/sqljs-initializer.ts index 542329520a..1ad38080b4 100644 --- a/packages/testing/src/initializers/sqljs-initializer.ts +++ b/packages/testing/src/initializers/sqljs-initializer.ts @@ -48,7 +48,7 @@ export class SqljsInitializer implements TestDbInitializer { Error.prepareStackTrace = pst; return _stack; @@ -104,7 +103,10 @@ export class TestServer { /** * Bootstraps an instance of the Vendure server for testing against. */ - private async bootstrapForTesting(userConfig: Partial): Promise { + private async bootstrapForTesting( + this: void, + userConfig: Partial, + ): Promise { const config = await preBootstrapConfig(userConfig); Logger.useLogger(config.logger); const appModule = await import('@vendure/core/dist/app.module'); diff --git a/packages/testing/src/utils/create-upload-post-data.ts b/packages/testing/src/utils/create-upload-post-data.ts index edf11286a4..f52e760ea9 100644 --- a/packages/testing/src/utils/create-upload-post-data.ts +++ b/packages/testing/src/utils/create-upload-post-data.ts @@ -32,7 +32,7 @@ export function createUploadPostData

( d => d.kind === Kind.OPERATION_DEFINITION, ) as OperationDefinitionNode; - const filePathsArray = (Array.isArray(filePaths) ? filePaths : [filePaths]) as string[]; + const filePathsArray: string[] = Array.isArray(filePaths) ? filePaths : [filePaths]; const variables = mapVariables(filePaths); const postData: UploadPostData = { operations: { @@ -40,12 +40,9 @@ export function createUploadPostData

( variables, query: print(mutation), }, - map: filePathsArray.reduce( - (output, filePath, i) => { - return { ...output, [i.toString()]: objectPath(variables, i).join('.') }; - }, - {} as { [index: number]: string }, - ), + map: filePathsArray.reduce((output, filePath, i) => { + return { ...output, [i.toString()]: objectPath(variables, i).join('.') }; + }, {} as Record), filePaths: filePathsArray.map((filePath, i) => ({ name: i.toString(), file: filePath, diff --git a/packages/ui-devkit/package.json b/packages/ui-devkit/package.json index 42b5d052e9..206088cd93 100644 --- a/packages/ui-devkit/package.json +++ b/packages/ui-devkit/package.json @@ -30,7 +30,7 @@ "build:compiler": "rimraf ./compiler && tsc -p tsconfig.compiler.json", "build": "yarn build:client && yarn build:compiler", "watch": "rimraf ./lib && rollup -c rollup.config.mjs -w", - "lint": "tslint --fix --project ./" + "lint": "eslint --fix ." }, "bugs": { "url": "https://github.com/vendure-ecommerce/vendure/issues" diff --git a/packages/ui-devkit/scaffold/src/main.ts b/packages/ui-devkit/scaffold/src/main.ts index 93c335ff92..23a931e54f 100644 --- a/packages/ui-devkit/scaffold/src/main.ts +++ b/packages/ui-devkit/scaffold/src/main.ts @@ -12,6 +12,6 @@ if (environment.production) { loadAppConfig() .then(() => platformBrowserDynamic().bootstrapModule(AppModule)) .catch((err: any) => { - // tslint:disable:no-console + /* eslint-disable no-console */ console.log(err); }); diff --git a/packages/ui-devkit/src/client/devkit-client-api.ts b/packages/ui-devkit/src/client/devkit-client-api.ts index 52ef3306db..490e606ccf 100644 --- a/packages/ui-devkit/src/client/devkit-client-api.ts +++ b/packages/ui-devkit/src/client/devkit-client-api.ts @@ -145,7 +145,7 @@ export function graphQlMutation( * @docsPage UiDevkitClient */ export function notify(options: NotificationMessage['data']): void { - sendMessage('notification', options).toPromise(); + void sendMessage('notification', options).toPromise(); } function sendMessage(type: T['type'], data: T['data']): Observable { diff --git a/packages/ui-devkit/src/compiler/compile.ts b/packages/ui-devkit/src/compiler/compile.ts index d9c90a6dbd..9f6d81aef9 100644 --- a/packages/ui-devkit/src/compiler/compile.ts +++ b/packages/ui-devkit/src/compiler/compile.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-console */ +/* eslint-disable no-console */ import { LanguageCode } from '@vendure/common/lib/generated-types'; import { AdminUiAppConfig, AdminUiAppDevModeConfig } from '@vendure/common/lib/shared-types'; import { ChildProcess, spawn } from 'child_process'; @@ -235,7 +235,7 @@ function runWatchMode( } } for (const languageCode of Object.keys(allTranslationFiles)) { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const translationFiles = allTranslationFiles[languageCode as LanguageCode]!; for (const file of translationFiles) { if (filePath.includes(path.normalize(file))) { @@ -252,7 +252,7 @@ function runWatchMode( close = () => { if (watcher) { - watcher.close(); + void watcher.close(); } if (buildProcess) { buildProcess.kill(); @@ -268,7 +268,7 @@ function buildProcessArguments(args?: UiExtensionCompilerProcessArgument[]): str if (Array.isArray(arg)) { const [key, value] = arg; - return `${key}=${value}`; + return `${key}=${value as string}`; } return arg; diff --git a/packages/ui-devkit/src/compiler/scaffold.ts b/packages/ui-devkit/src/compiler/scaffold.ts index efe7081b10..f99fac12d0 100644 --- a/packages/ui-devkit/src/compiler/scaffold.ts +++ b/packages/ui-devkit/src/compiler/scaffold.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-console */ +/* eslint-disable no-console */ import { spawn } from 'child_process'; import * as fs from 'fs-extra'; import { globSync } from 'glob'; @@ -160,7 +160,7 @@ async function addGlobalStyles( const globalStylesSource = overridesImport + - `@import "./styles/styles";\n` + + '@import "./styles/styles";\n' + imports.map(file => `@import "./${GLOBAL_STYLES_OUTPUT_DIR}/${file}";`).join('\n'); const globalStylesFile = path.join(outputPath, 'src', 'global-styles.scss'); @@ -176,7 +176,7 @@ export async function copyGlobalStyleFile(outputPath: string, stylePath: string) function generateLazyExtensionRoutes(extensions: AdminUiExtensionWithId[]): string { const routes: string[] = []; - for (const extension of extensions as AdminUiExtensionWithId[]) { + for (const extension of extensions) { for (const module of extension.ngModules) { if (module.type === 'lazy') { routes.push(` { @@ -269,6 +269,7 @@ function configureModulePathMapping( return; } + // eslint-disable-next-line @typescript-eslint/no-var-requires const tsconfig = require(tsconfigFilePath); tsconfig.compilerOptions.paths = modulePathMapping; fs.writeFileSync(tsconfigFilePath, JSON.stringify(tsconfig, null, 2)); @@ -285,7 +286,7 @@ function configureModulePathMapping( async function checkIfNgccWasRun(): Promise { const coreUmdFile = require.resolve('@vendure/admin-ui/core'); if (!coreUmdFile) { - logger.error(`Could not resolve the "@vendure/admin-ui/core" package!`); + logger.error('Could not resolve the "@vendure/admin-ui/core" package!'); return; } // ngcc creates a particular folder after it has been run once diff --git a/packages/ui-devkit/src/compiler/translations.ts b/packages/ui-devkit/src/compiler/translations.ts index 4700905020..30f7460cfd 100644 --- a/packages/ui-devkit/src/compiler/translations.ts +++ b/packages/ui-devkit/src/compiler/translations.ts @@ -22,7 +22,7 @@ export function getAllTranslationFiles(extensions: TranslationExtension[]): { if (!allTranslationsWithGlobs[code]) { allTranslationsWithGlobs[code] = [globPattern]; } else { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion allTranslationsWithGlobs[code]!.push(globPattern); } } @@ -39,7 +39,7 @@ export function getAllTranslationFiles(extensions: TranslationExtension[]): { } for (const pattern of globs) { const files = globSync(pattern); - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion allTranslationsWithFiles[code]!.push(...files); } } diff --git a/packages/ui-devkit/src/compiler/utils.ts b/packages/ui-devkit/src/compiler/utils.ts index 71a014306e..328d8d09d7 100644 --- a/packages/ui-devkit/src/compiler/utils.ts +++ b/packages/ui-devkit/src/compiler/utils.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-console */ +/* eslint-disable no-console */ import chalk from 'chalk'; import { execSync } from 'child_process'; import { createHash } from 'crypto'; @@ -57,9 +57,8 @@ export function copyUiDevkit(outputPath: string) { */ export async function copyStaticAsset(outputPath: string, staticAssetDef: StaticAssetDefinition) { const staticAssetPath = getStaticAssetPath(staticAssetDef); - let assetOutputPath: string; const assetBasename = path.basename(staticAssetPath); - assetOutputPath = path.join(outputPath, STATIC_ASSETS_OUTPUT_DIR, assetBasename); + const assetOutputPath = path.join(outputPath, STATIC_ASSETS_OUTPUT_DIR, assetBasename); fs.copySync(staticAssetPath, assetOutputPath); if (typeof staticAssetDef !== 'string') { // The asset is being renamed diff --git a/scripts/changelogs/generate-changelog.ts b/scripts/changelogs/generate-changelog.ts index 7cdeaa060a..6ffba5c329 100644 --- a/scripts/changelogs/generate-changelog.ts +++ b/scripts/changelogs/generate-changelog.ts @@ -2,7 +2,7 @@ import fs from 'fs-extra'; import path from 'path'; import { addStream } from './add-stream'; -// tslint:disable-next-line:no-var-requires +// eslint-disable-next-line @typescript-eslint/no-var-requires const conventionalChangelogCore = require('conventional-changelog-core'); let changelogFileName = 'CHANGELOG.md'; diff --git a/scripts/check-angular-versions.ts b/scripts/check-angular-versions.ts index 6f5df884c1..7713127180 100644 --- a/scripts/check-angular-versions.ts +++ b/scripts/check-angular-versions.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-console */ +/* eslint-disable no-console */ import path from 'path'; /** diff --git a/scripts/check-core-type-defs.ts b/scripts/check-core-type-defs.ts index 49f6fb0d3d..bd1325d94d 100644 --- a/scripts/check-core-type-defs.ts +++ b/scripts/check-core-type-defs.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-console */ +/* eslint-disable no-console */ import fs from 'fs'; import path from 'path'; diff --git a/scripts/check-imports.ts b/scripts/check-imports.ts index 9e590a6f20..9fdf9900fa 100644 --- a/scripts/check-imports.ts +++ b/scripts/check-imports.ts @@ -1,7 +1,7 @@ -/* tslint:disable:no-console */ +/* eslint-disable no-console */ import fs from 'fs'; import path from 'path'; -// tslint:disable-next-line:no-var-requires +// eslint-disable-next-line @typescript-eslint/no-var-requires const find = require('find'); /** diff --git a/scripts/codegen/download-introspection-schema.ts b/scripts/codegen/download-introspection-schema.ts index 639009fb9f..c002506d4b 100644 --- a/scripts/codegen/download-introspection-schema.ts +++ b/scripts/codegen/download-introspection-schema.ts @@ -4,7 +4,7 @@ import http from 'http'; import { ADMIN_API_PATH, API_PORT } from '../../packages/common/src/shared-constants'; -// tslint:disable:no-console +/* eslint-disable no-console */ /** * Makes an introspection query to the Vendure server and writes the result to a diff --git a/scripts/codegen/generate-graphql-types.ts b/scripts/codegen/generate-graphql-types.ts index 674dda4964..f064e8df7d 100644 --- a/scripts/codegen/generate-graphql-types.ts +++ b/scripts/codegen/generate-graphql-types.ts @@ -45,7 +45,7 @@ const E2E_ASSET_SERVER_PLUGIN_QUERY_FILES = path.join( const ADMIN_SCHEMA_OUTPUT_FILE = path.join(__dirname, '../../schema-admin.json'); const SHOP_SCHEMA_OUTPUT_FILE = path.join(__dirname, '../../schema-shop.json'); -// tslint:disable:no-console +/* eslint-disable no-console */ Promise.all([ downloadIntrospectionSchema(ADMIN_API_PATH, ADMIN_SCHEMA_OUTPUT_FILE), @@ -74,9 +74,9 @@ Promise.all([ ...config, skipTypename: true, }; - const disableTsLintPlugin = { add: { content: '// tslint:disable' } }; + const disableEsLintPlugin = { add: { content: '/* eslint-disable */' } }; const graphQlErrorsPlugin = path.join(__dirname, './plugins/graphql-errors-plugin.js'); - const commonPlugins = [disableTsLintPlugin, 'typescript']; + const commonPlugins = [disableEsLintPlugin, 'typescript']; const clientPlugins = [...commonPlugins, 'typescript-operations']; return generate({ @@ -87,14 +87,14 @@ Promise.all([ '../../packages/core/src/common/error/generated-graphql-admin-errors.ts', )]: { schema: [ADMIN_SCHEMA_OUTPUT_FILE], - plugins: [disableTsLintPlugin, graphQlErrorsPlugin], + plugins: [disableEsLintPlugin, graphQlErrorsPlugin], }, [path.join( __dirname, '../../packages/core/src/common/error/generated-graphql-shop-errors.ts', )]: { schema: [SHOP_SCHEMA_OUTPUT_FILE], - plugins: [disableTsLintPlugin, graphQlErrorsPlugin], + plugins: [disableEsLintPlugin, graphQlErrorsPlugin], }, [path.join(__dirname, '../../packages/core/e2e/graphql/generated-e2e-admin-types.ts')]: { schema: [ADMIN_SCHEMA_OUTPUT_FILE], @@ -142,7 +142,7 @@ Promise.all([ )]: { schema: [ADMIN_SCHEMA_OUTPUT_FILE, path.join(__dirname, 'client-schema.ts')], documents: CLIENT_QUERY_FILES, - plugins: [disableTsLintPlugin, 'fragment-matcher'], + plugins: [disableEsLintPlugin, 'fragment-matcher'], config: { ...config, apolloClientVersion: 3 }, }, [path.join(__dirname, '../../packages/common/src/generated-types.ts')]: { diff --git a/scripts/codegen/plugins/graphql-errors-plugin.ts b/scripts/codegen/plugins/graphql-errors-plugin.ts index b8088c83aa..b640f4591c 100644 --- a/scripts/codegen/plugins/graphql-errors-plugin.ts +++ b/scripts/codegen/plugins/graphql-errors-plugin.ts @@ -180,7 +180,7 @@ function generateTypeResolvers(schema: GraphQLSchema) { result.push( ` ${returnType.name}: {`, ` __resolveType(value: any) {`, - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion ` return isGraphQLError(value) ? (value as any).__typename : '${nonErrorResult!.name}';`, ` },`, ` },`, diff --git a/scripts/docs/docgen-utils.ts b/scripts/docs/docgen-utils.ts index c628d8b79b..ed4ee15b67 100644 --- a/scripts/docs/docgen-utils.ts +++ b/scripts/docs/docgen-utils.ts @@ -1,7 +1,7 @@ import fs from 'fs'; import klawSync from 'klaw-sync'; import { basename } from 'path'; -// tslint:disable:no-console +/* eslint-disable no-console */ /** * Generates the Hugo front matter with the title of the document diff --git a/scripts/docs/generate-graphql-docs.ts b/scripts/docs/generate-graphql-docs.ts index 80e3a088a3..19cfc51a42 100644 --- a/scripts/docs/generate-graphql-docs.ts +++ b/scripts/docs/generate-graphql-docs.ts @@ -18,7 +18,7 @@ import path from 'path'; import { deleteGeneratedDocs, generateFrontMatter } from './docgen-utils'; -// tslint:disable:no-console +/* eslint-disable no-console */ type TargetApi = 'shop' | 'admin'; diff --git a/scripts/docs/generate-typescript-docs.ts b/scripts/docs/generate-typescript-docs.ts index 7cf692b002..a8fa2082d1 100644 --- a/scripts/docs/generate-typescript-docs.ts +++ b/scripts/docs/generate-typescript-docs.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-console */ +/* eslint-disable no-console */ import fs from 'fs-extra'; import klawSync from 'klaw-sync'; import path, { extname } from 'path'; diff --git a/scripts/docs/typescript-docs-renderer.ts b/scripts/docs/typescript-docs-renderer.ts index a9a8d5e137..52fb9adab4 100644 --- a/scripts/docs/typescript-docs-renderer.ts +++ b/scripts/docs/typescript-docs-renderer.ts @@ -1,4 +1,4 @@ -// tslint:disable:no-console +/* eslint-disable no-console */ import fs from 'fs-extra'; import path from 'path'; import { HeritageClause } from 'typescript'; diff --git a/scripts/docs/update-build-info.ts b/scripts/docs/update-build-info.ts index e3a08021df..ecb96dc31a 100644 --- a/scripts/docs/update-build-info.ts +++ b/scripts/docs/update-build-info.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-console */ +/* eslint-disable no-console */ import { exec } from 'child_process'; import fs from 'fs'; import path from 'path'; diff --git a/tslint.json b/tslint.json deleted file mode 100644 index 8da8852241..0000000000 --- a/tslint.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "defaultSeverity": "error", - "extends": [ - "tslint:recommended" - ], - "jsRules": { - "no-unused-expression": true, - "quotemark": [true, "single"], - "object-literal-sort-keys": false - }, - "rules": { - "interface-over-type-literal": false, - "quotemark": [ - true, - "single" - ], - "indent": false, - "ordered-imports": [ - true, - { - "grouped-imports": true - } - ], - "jsdoc-format": false, - "no-inferrable-types": [ - true, - "ignore-params" - ], - "max-line-length": [ - true, - 150 - ], - "member-access": false, - "member-ordering": false, - "interface-name": false, - "array-type": [ - true, - "array-simple" - ], - "no-non-null-assertion": true, - "no-empty-interface": false, - "no-switch-case-fall-through": true, - "arrow-parens": false, - "object-literal-sort-keys": false, - "no-unused-expression": true, - "max-classes-per-file": [ - false - ], - "variable-name": [ - false - ], - "no-floating-promises": true - }, - "rulesDirectory": [] -} diff --git a/yarn.lock b/yarn.lock index a5b97c611f..767fa2071c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -116,6 +116,63 @@ ora "5.4.1" rxjs "6.6.7" +"@angular-eslint/builder@15.2.1": + version "15.2.1" + resolved "https://registry.yarnpkg.com/@angular-eslint/builder/-/builder-15.2.1.tgz#ce8c65e3b671897db75ad90b41ef4cd6efe626f0" + integrity sha512-7x2DANebLRl997Mj4DhZrnz5+vnSjavGGveJ0mBuU7CEsL0ZYLftdRqL0e0HtU3ksseS7xpchD6OM08nkNgySw== + +"@angular-eslint/bundled-angular-compiler@15.2.1": + version "15.2.1" + resolved "https://registry.yarnpkg.com/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-15.2.1.tgz#7c77a4a19942868d844372b5b3b562c0d630de1e" + integrity sha512-LO7Am8eVCr7oh6a0VmKSL7K03CnQEQhFO7Wt/YtbfYOxVjrbwmYLwJn+wZPOT7A02t/BttOD/WXuDrOWtSMQ/Q== + +"@angular-eslint/eslint-plugin-template@15.2.1": + version "15.2.1" + resolved "https://registry.yarnpkg.com/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-15.2.1.tgz#af39f66e9d971d7f7635add9cf1a396f1766fd64" + integrity sha512-IeiSLk6YxapFdH2z5o/O3R7VwtBd2T6fWmhLFPwDYMDknrwegnOjwswCdBplOccpUp0wqlCeGUx7LTsuzwaz7w== + dependencies: + "@angular-eslint/bundled-angular-compiler" "15.2.1" + "@angular-eslint/utils" "15.2.1" + "@typescript-eslint/type-utils" "5.48.2" + "@typescript-eslint/utils" "5.48.2" + aria-query "5.1.3" + axobject-query "3.1.1" + +"@angular-eslint/eslint-plugin@15.2.1": + version "15.2.1" + resolved "https://registry.yarnpkg.com/@angular-eslint/eslint-plugin/-/eslint-plugin-15.2.1.tgz#616e7aa1f3aea6203e887c20749b87d08bb95d3e" + integrity sha512-OM7b1kS4E4CkXjkaWN+lEzawh4VxY6l7FO1Cuk4s7iv3/YpZG3rJxIZBqnFLTixwrBuqw8y4FNBzF3eDgmFAUw== + dependencies: + "@angular-eslint/utils" "15.2.1" + "@typescript-eslint/utils" "5.48.2" + +"@angular-eslint/schematics@15.2.1": + version "15.2.1" + resolved "https://registry.yarnpkg.com/@angular-eslint/schematics/-/schematics-15.2.1.tgz#f562e1b8b0824ade1cfdc5bbabab26c50510a7f1" + integrity sha512-0ZfBCejHWIcgy3J5kFs9sS/jqi8i5AptxggOwFySOlCLJ+CzNrktjD4jff1Zy8K/VLzY0Ci0BSZXvgWfP0k9Rg== + dependencies: + "@angular-eslint/eslint-plugin" "15.2.1" + "@angular-eslint/eslint-plugin-template" "15.2.1" + ignore "5.2.4" + strip-json-comments "3.1.1" + tmp "0.2.1" + +"@angular-eslint/template-parser@15.2.1": + version "15.2.1" + resolved "https://registry.yarnpkg.com/@angular-eslint/template-parser/-/template-parser-15.2.1.tgz#dbe4978afdcea81b9d5cac3d672c20de5821dc54" + integrity sha512-ViCi79gC2aKJecmYLkOT+QlT5WMRNXeYz0Dr9Pr8qXzIbY0oAWE7nOT5jkXwQ9oUk+ybtGCWHma5JVJWVJsIog== + dependencies: + "@angular-eslint/bundled-angular-compiler" "15.2.1" + eslint-scope "^7.0.0" + +"@angular-eslint/utils@15.2.1": + version "15.2.1" + resolved "https://registry.yarnpkg.com/@angular-eslint/utils/-/utils-15.2.1.tgz#b286fddb1b8b43d96b91009237da7f74d9e64dda" + integrity sha512-++FneAJHxJqcSu0igVN6uOkSoHxlzgLoMBswuovYJy3UKwm33/T6WFku8++753Ca/JucIoR1gdUfO7SoSspMDg== + dependencies: + "@angular-eslint/bundled-angular-compiler" "15.2.1" + "@typescript-eslint/utils" "5.48.2" + "@angular/animations@15.2.1": version "15.2.1" resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-15.2.1.tgz#7ee4e058bf1234d1780498af0407851bb591c04f" @@ -186,11 +243,6 @@ dependencies: tslib "^2.3.0" -"@angular/compiler@9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0.tgz#87e0bef4c369b6cadae07e3a4295778fc93799d5" - integrity sha512-ctjwuntPfZZT2mNj2NDIVu51t9cvbhl/16epc5xEwyzyDt76pX9UgwvY+MbXrf/C/FWwdtmNtfP698BKI+9leQ== - "@angular/compiler@^13.1.2": version "13.3.12" resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-13.3.12.tgz#9fa94d116310060bcdd429c24d593b70f8a082da" @@ -205,11 +257,6 @@ dependencies: tslib "^2.3.0" -"@angular/core@9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0.tgz#227dc53e1ac81824f998c6e76000b7efc522641e" - integrity sha512-6Pxgsrf0qF9iFFqmIcWmjJGkkCaCm6V5QNnxMy2KloO3SDq6QuMVRbN9RtC8Urmo25LP+eZ6ZgYqFYpdD8Hd9w== - "@angular/forms@15.2.1": version "15.2.1" resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-15.2.1.tgz#77b070cb8397183eb0bf115cc40179b2e52f57e1" @@ -1673,6 +1720,15 @@ pump "^3.0.0" secure-json-parse "^2.1.0" +"@es-joy/jsdoccomment@~0.36.1": + version "0.36.1" + resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.36.1.tgz#c37db40da36e4b848da5fd427a74bae3b004a30f" + integrity sha512-922xqFsTpHs6D0BUiG4toiyPOMc8/jafnWKxz1KWgS4XzKPy2qXf1Pe6UFuNSCQqt6tOuhAWXBNuuyUhJmw9Vg== + dependencies: + comment-parser "1.3.1" + esquery "^1.4.0" + jsdoc-type-pratt-parser "~3.1.0" + "@esbuild/android-arm64@0.16.17": version "0.16.17" resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz#cf91e86df127aa3d141744edafcba0abdc577d23" @@ -2003,6 +2059,26 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.17.8.tgz#200a0965cf654ac28b971358ecdca9cc5b44c335" integrity sha512-1iuezdyDNngPnz8rLRDO2C/ZZ/emJLb72OsZeqQ6gL6Avko/XCXZw+NuxBSNhBAP13Hie418V7VMt9et1FMvpg== +"@eslint/eslintrc@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.0.tgz#943309d8697c52fc82c076e90c1c74fbbe69dbff" + integrity sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.4.0" + globals "^13.19.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@eslint/js@8.35.0": + version "8.35.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.35.0.tgz#b7569632b0b788a0ca0e438235154e45d42813a7" + integrity sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw== + "@gar/promisify@^1.0.1", "@gar/promisify@^1.1.3": version "1.1.3" resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" @@ -2582,6 +2658,25 @@ protobufjs "^7.0.0" yargs "^16.2.0" +"@humanwhocodes/config-array@^0.11.8": + version "0.11.8" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz#03595ac2075a4dc0f191cc2131de14fbd7d410b9" + integrity sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g== + dependencies: + "@humanwhocodes/object-schema" "^1.2.1" + debug "^4.1.1" + minimatch "^3.0.5" + +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/object-schema@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + "@hutson/parse-repository-url@^3.0.0": version "3.0.2" resolved "https://registry.yarnpkg.com/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz#98c23c950a3d9b6c8f0daed06da6c3af06981340" @@ -3577,7 +3672,7 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.3": +"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": version "1.2.8" resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -4451,6 +4546,11 @@ resolved "https://registry.yarnpkg.com/@types/json-stable-stringify/-/json-stable-stringify-1.0.34.tgz#c0fb25e4d957e0ee2e497c1f553d7f8bb668fd75" integrity sha512-s2cfwagOQAS8o06TcwKfr9Wx11dNGbH2E9vJz1cqV+a/LOyhWNLUNd6JSRYNzvB4d29UuJX2M0Dj9vE1T8fRXw== +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + "@types/jsonfile@*": version "6.1.1" resolved "https://registry.yarnpkg.com/@types/jsonfile/-/jsonfile-6.1.1.tgz#ac84e9aefa74a2425a0fb3012bdea44f58970f1b" @@ -4660,6 +4760,11 @@ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-6.2.3.tgz#5798ecf1bec94eaa64db39ee52808ec0693315aa" integrity sha512-KQf+QAMWKMrtBMsB8/24w53tEsxllMj6TuA80TT/5igJalLI/zm0L3oXRbIAl4Ohfc85gyHX/jhMwsVkmhLU4A== +"@types/semver@^7.3.12": + version "7.3.13" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91" + integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw== + "@types/serve-index@^1.9.1": version "1.9.1" resolved "https://registry.yarnpkg.com/@types/serve-index/-/serve-index-1.9.1.tgz#1b5e85370a192c01ec6cec4735cf2917337a6278" @@ -4740,6 +4845,173 @@ dependencies: "@types/node" "*" +"@typescript-eslint/eslint-plugin@5.48.2": + version "5.48.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.48.2.tgz#112e6ae1e23a1dc8333ce82bb9c65c2608b4d8a3" + integrity sha512-sR0Gja9Ky1teIq4qJOl0nC+Tk64/uYdX+mi+5iB//MH8gwyx8e3SOyhEzeLZEFEEfCaLf8KJq+Bd/6je1t+CAg== + dependencies: + "@typescript-eslint/scope-manager" "5.48.2" + "@typescript-eslint/type-utils" "5.48.2" + "@typescript-eslint/utils" "5.48.2" + debug "^4.3.4" + ignore "^5.2.0" + natural-compare-lite "^1.4.0" + regexpp "^3.2.0" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/eslint-plugin@^5.54.1": + version "5.54.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.54.1.tgz#0c5091289ce28372e38ab8d28e861d2dbe1ab29e" + integrity sha512-a2RQAkosH3d3ZIV08s3DcL/mcGc2M/UC528VkPULFxR9VnVPT8pBu0IyBAJJmVsCmhVfwQX1v6q+QGnmSe1bew== + dependencies: + "@typescript-eslint/scope-manager" "5.54.1" + "@typescript-eslint/type-utils" "5.54.1" + "@typescript-eslint/utils" "5.54.1" + debug "^4.3.4" + grapheme-splitter "^1.0.4" + ignore "^5.2.0" + natural-compare-lite "^1.4.0" + regexpp "^3.2.0" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/parser@5.48.2": + version "5.48.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.48.2.tgz#c9edef2a0922d26a37dba03be20c5fff378313b3" + integrity sha512-38zMsKsG2sIuM5Oi/olurGwYJXzmtdsHhn5mI/pQogP+BjYVkK5iRazCQ8RGS0V+YLk282uWElN70zAAUmaYHw== + dependencies: + "@typescript-eslint/scope-manager" "5.48.2" + "@typescript-eslint/types" "5.48.2" + "@typescript-eslint/typescript-estree" "5.48.2" + debug "^4.3.4" + +"@typescript-eslint/parser@^5.54.1": + version "5.54.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.54.1.tgz#05761d7f777ef1c37c971d3af6631715099b084c" + integrity sha512-8zaIXJp/nG9Ff9vQNh7TI+C3nA6q6iIsGJ4B4L6MhZ7mHnTMR4YP5vp2xydmFXIy8rpyIVbNAG44871LMt6ujg== + dependencies: + "@typescript-eslint/scope-manager" "5.54.1" + "@typescript-eslint/types" "5.54.1" + "@typescript-eslint/typescript-estree" "5.54.1" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@5.48.2": + version "5.48.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.48.2.tgz#bb7676cb78f1e94921eaab637a4b5d596f838abc" + integrity sha512-zEUFfonQid5KRDKoI3O+uP1GnrFd4tIHlvs+sTJXiWuypUWMuDaottkJuR612wQfOkjYbsaskSIURV9xo4f+Fw== + dependencies: + "@typescript-eslint/types" "5.48.2" + "@typescript-eslint/visitor-keys" "5.48.2" + +"@typescript-eslint/scope-manager@5.54.1": + version "5.54.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.54.1.tgz#6d864b4915741c608a58ce9912edf5a02bb58735" + integrity sha512-zWKuGliXxvuxyM71UA/EcPxaviw39dB2504LqAmFDjmkpO8qNLHcmzlh6pbHs1h/7YQ9bnsO8CCcYCSA8sykUg== + dependencies: + "@typescript-eslint/types" "5.54.1" + "@typescript-eslint/visitor-keys" "5.54.1" + +"@typescript-eslint/type-utils@5.48.2": + version "5.48.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.48.2.tgz#7d3aeca9fa37a7ab7e3d9056a99b42f342c48ad7" + integrity sha512-QVWx7J5sPMRiOMJp5dYshPxABRoZV1xbRirqSk8yuIIsu0nvMTZesKErEA3Oix1k+uvsk8Cs8TGJ6kQ0ndAcew== + dependencies: + "@typescript-eslint/typescript-estree" "5.48.2" + "@typescript-eslint/utils" "5.48.2" + debug "^4.3.4" + tsutils "^3.21.0" + +"@typescript-eslint/type-utils@5.54.1": + version "5.54.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.54.1.tgz#4825918ec27e55da8bb99cd07ec2a8e5f50ab748" + integrity sha512-WREHsTz0GqVYLIbzIZYbmUUr95DKEKIXZNH57W3s+4bVnuF1TKe2jH8ZNH8rO1CeMY3U4j4UQeqPNkHMiGem3g== + dependencies: + "@typescript-eslint/typescript-estree" "5.54.1" + "@typescript-eslint/utils" "5.54.1" + debug "^4.3.4" + tsutils "^3.21.0" + +"@typescript-eslint/types@5.48.2": + version "5.48.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.48.2.tgz#635706abb1ec164137f92148f06f794438c97b8e" + integrity sha512-hE7dA77xxu7ByBc6KCzikgfRyBCTst6dZQpwaTy25iMYOnbNljDT4hjhrGEJJ0QoMjrfqrx+j1l1B9/LtKeuqA== + +"@typescript-eslint/types@5.54.1": + version "5.54.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.54.1.tgz#29fbac29a716d0f08c62fe5de70c9b6735de215c" + integrity sha512-G9+1vVazrfAfbtmCapJX8jRo2E4MDXxgm/IMOF4oGh3kq7XuK3JRkOg6y2Qu1VsTRmWETyTkWt1wxy7X7/yLkw== + +"@typescript-eslint/typescript-estree@5.48.2": + version "5.48.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.48.2.tgz#6e206b462942b32383582a6c9251c05021cc21b0" + integrity sha512-bibvD3z6ilnoVxUBFEgkO0k0aFvUc4Cttt0dAreEr+nrAHhWzkO83PEVVuieK3DqcgL6VAK5dkzK8XUVja5Zcg== + dependencies: + "@typescript-eslint/types" "5.48.2" + "@typescript-eslint/visitor-keys" "5.48.2" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/typescript-estree@5.54.1": + version "5.54.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.54.1.tgz#df7b6ae05fd8fef724a87afa7e2f57fa4a599be1" + integrity sha512-bjK5t+S6ffHnVwA0qRPTZrxKSaFYocwFIkZx5k7pvWfsB1I57pO/0M0Skatzzw1sCkjJ83AfGTL0oFIFiDX3bg== + dependencies: + "@typescript-eslint/types" "5.54.1" + "@typescript-eslint/visitor-keys" "5.54.1" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.48.2": + version "5.48.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.48.2.tgz#3777a91dcb22b8499a25519e06eef2e9569295a3" + integrity sha512-2h18c0d7jgkw6tdKTlNaM7wyopbLRBiit8oAxoP89YnuBOzCZ8g8aBCaCqq7h208qUTroL7Whgzam7UY3HVLow== + dependencies: + "@types/json-schema" "^7.0.9" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.48.2" + "@typescript-eslint/types" "5.48.2" + "@typescript-eslint/typescript-estree" "5.48.2" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + semver "^7.3.7" + +"@typescript-eslint/utils@5.54.1": + version "5.54.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.54.1.tgz#7a3ee47409285387b9d4609ea7e1020d1797ec34" + integrity sha512-IY5dyQM8XD1zfDe5X8jegX6r2EVU5o/WJnLu/znLPWCBF7KNGC+adacXnt5jEYS9JixDcoccI6CvE4RCjHMzCQ== + dependencies: + "@types/json-schema" "^7.0.9" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.54.1" + "@typescript-eslint/types" "5.54.1" + "@typescript-eslint/typescript-estree" "5.54.1" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + semver "^7.3.7" + +"@typescript-eslint/visitor-keys@5.48.2": + version "5.48.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.48.2.tgz#c247582a0bcce467461d7b696513bf9455000060" + integrity sha512-z9njZLSkwmjFWUelGEwEbdf4NwKvfHxvGC0OcGN1Hp/XNDIcJ7D5DpPNPv6x6/mFvc1tQHsaWmpD/a4gOvvCJQ== + dependencies: + "@typescript-eslint/types" "5.48.2" + eslint-visitor-keys "^3.3.0" + +"@typescript-eslint/visitor-keys@5.54.1": + version "5.54.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.54.1.tgz#d7a8a0f7181d6ac748f4d47b2306e0513b98bf8b" + integrity sha512-q8iSoHTgwCfgcRJ2l2x+xCbu8nBlRAlsQ33k24Adj8eoVBE0f8dUeI+bAa8F84Mv05UGbAx57g2zrRsYIooqQg== + dependencies: + "@typescript-eslint/types" "5.54.1" + eslint-visitor-keys "^3.3.0" + "@vendure/ngx-translate-extract@^8.0.5": version "8.0.5" resolved "https://registry.yarnpkg.com/@vendure/ngx-translate-extract/-/ngx-translate-extract-8.0.5.tgz#2de6a14ba9970e18b096b836e0599ad9ef03540e" @@ -5029,12 +5301,17 @@ acorn-import-assertions@^1.7.6: resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9" integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw== +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + acorn-walk@^8.1.1, acorn-walk@^8.2.0: version "8.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^8.4.1, acorn@^8.5.0, acorn@^8.7.1, acorn@^8.8.1, acorn@^8.8.2: +acorn@^8.4.1, acorn@^8.5.0, acorn@^8.7.1, acorn@^8.8.0, acorn@^8.8.1, acorn@^8.8.2: version "8.8.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== @@ -5110,7 +5387,7 @@ ajv@8.12.0, ajv@^8.0.0, ajv@^8.11.0, ajv@^8.8.0: require-from-string "^2.0.2" uri-js "^4.2.2" -ajv@^6.12.3, ajv@^6.12.5: +ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -5359,7 +5636,7 @@ apollo-upload-client@^17.0.0: dependencies: extract-files "^11.0.0" -app-root-path@^3.0.0, app-root-path@^3.1.0: +app-root-path@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-3.1.0.tgz#5971a2fc12ba170369a7a1ef018c71e6e47c2e86" integrity sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA== @@ -5432,13 +5709,12 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -aria-query@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-3.0.0.tgz#65b3fcc1ca1155a8c9ae64d6eee297f15d5133cc" - integrity sha512-majUxHgLehQTeSA+hClx+DY09OVUqG3GtezWkF1krgLGNdlDu9l9V8DaqNMWbq4Eddc8wsyDA0hpDUtnYxQEXw== +aria-query@5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.1.3.tgz#19db27cd101152773631396f7a95a3b58c22c35e" + integrity sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ== dependencies: - ast-types-flow "0.0.7" - commander "^2.11.0" + deep-equal "^2.0.5" arr-diff@^4.0.0: version "4.0.0" @@ -5494,6 +5770,17 @@ array-ify@^1.0.0: resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" integrity sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng== +array-includes@^3.1.6: + version "3.1.6" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f" + integrity sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + get-intrinsic "^1.1.3" + is-string "^1.0.7" + array-initial@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/array-initial/-/array-initial-1.1.0.tgz#2fa74b26739371c3947bd7a7adc73be334b3d795" @@ -5533,6 +5820,26 @@ array-unique@^0.3.2: resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ== +array.prototype.flat@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2" + integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + es-shim-unscopables "^1.0.0" + +array.prototype.flatmap@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz#1aae7903c2100433cb8261cd4ed310aab5c4a183" + integrity sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + es-shim-unscopables "^1.0.0" + array.prototype.reduce@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/array.prototype.reduce/-/array.prototype.reduce-1.0.5.tgz#6b20b0daa9d9734dd6bc7ea66b5bbce395471eac" @@ -5590,11 +5897,6 @@ assign-symbols@^1.0.0: resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" integrity sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw== -ast-types-flow@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" - integrity sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag== - astral-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" @@ -5699,12 +6001,12 @@ axios@^0.25.0: dependencies: follow-redirects "^1.14.7" -axobject-query@2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.0.2.tgz#ea187abe5b9002b377f925d8bf7d1c561adf38f9" - integrity sha512-MCeek8ZH7hKyO1rWUbKNQBbl4l2eY0ntk7OGi+q0RlafrCnfPxC06WZA+uebCfmYp4mNU9jRBP1AhGyf8+W3ww== +axobject-query@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.1.1.tgz#3b6e5c6d4e43ca7ba51c5babf99d22a9c68485e1" + integrity sha512-goKlv8DZrK9hUh975fnHzhNIO4jUnFCfv/dszV5VwUGDFjI6vQ2VwoyjYjYNEbBE8AH87TduWP5uyDR1D+Iteg== dependencies: - ast-types-flow "0.0.7" + deep-equal "^2.0.5" babel-loader@9.1.2: version "9.1.2" @@ -6102,11 +6404,6 @@ buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" -builtin-modules@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - integrity sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ== - builtin-modules@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" @@ -6349,7 +6646,7 @@ chalk@^1.0.0, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -6722,26 +7019,6 @@ codejar@^3.7.0: resolved "https://registry.yarnpkg.com/codejar/-/codejar-3.7.0.tgz#135913e26957c0a0c6a3a99305cfe8492c7b5c2b" integrity sha512-rqyDu2zNwfu1EhXI++LEMQDzhykS+V0BV52RemtCj5lczgTgWSufyEa+tS7RP7qCXH/WXOkU0eIthmFUzvG78Q== -codelyzer@^6.0.0: - version "6.0.2" - resolved "https://registry.yarnpkg.com/codelyzer/-/codelyzer-6.0.2.tgz#25d72eae641e8ff13ffd7d99b27c9c7ad5d7e135" - integrity sha512-v3+E0Ucu2xWJMOJ2fA/q9pDT/hlxHftHGPUay1/1cTgyPV5JTHFdO9hqo837Sx2s9vKBMTt5gO+lhF95PO6J+g== - dependencies: - "@angular/compiler" "9.0.0" - "@angular/core" "9.0.0" - app-root-path "^3.0.0" - aria-query "^3.0.0" - axobject-query "2.0.2" - css-selector-tokenizer "^0.7.1" - cssauron "^1.4.0" - damerau-levenshtein "^1.0.4" - rxjs "^6.5.3" - semver-dsl "^1.0.1" - source-map "^0.5.7" - sprintf-js "^1.1.2" - tslib "^1.10.0" - zone.js "~0.10.3" - collection-map@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collection-map/-/collection-map-1.0.0.tgz#aea0f06f8d26c780c2b75494385544b2255af18c" @@ -6834,7 +7111,7 @@ commander@^10.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.0.tgz#71797971162cd3cf65f0b9d24eb28f8d303acdf1" integrity sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA== -commander@^2.11.0, commander@^2.12.1, commander@^2.19.0, commander@^2.20.0, commander@^2.20.3: +commander@^2.19.0, commander@^2.20.0, commander@^2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -6854,6 +7131,11 @@ commander@^7.1.0: resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== +comment-parser@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.3.1.tgz#3d7ea3adaf9345594aedee6563f422348f165c1b" + integrity sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA== + common-tags@1.8.2: version "1.8.2" resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6" @@ -7293,7 +7575,7 @@ cross-fetch@3.1.5, cross-fetch@^3.1.5: dependencies: node-fetch "2.6.7" -cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.3: +cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -7338,14 +7620,6 @@ css-select@^5.1.0: domutils "^3.0.1" nth-check "^2.0.1" -css-selector-tokenizer@^0.7.1: - version "0.7.3" - resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.3.tgz#735f26186e67c749aaf275783405cf0661fae8f1" - integrity sha512-jWQv3oCEL5kMErj4wRnK/OPoBi0D+P1FR2cDCKYPaMeD2eW3/mttav8HT4hT1CKopiJI/psEULjkClhvJo4Lvg== - dependencies: - cssesc "^3.0.0" - fastparse "^1.1.2" - css-vars-ponyfill@^2.3.2: version "2.4.8" resolved "https://registry.yarnpkg.com/css-vars-ponyfill/-/css-vars-ponyfill-2.4.8.tgz#5e34912730b9ea272197e44f33cd8679907dc72c" @@ -7359,13 +7633,6 @@ css-what@^6.0.1, css-what@^6.1.0: resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== -cssauron@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/cssauron/-/cssauron-1.4.0.tgz#a6602dff7e04a8306dc0db9a551e92e8b5662ad8" - integrity sha512-Ht70DcFBh+/ekjVrYS2PlDMdSQEl3OFNmjK6lcn49HptBgilXf/Zwg4uFh9Xn0pX3Q8YOkSjIFOfK2osvdqpBw== - dependencies: - through X.X.X - cssesc@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" @@ -7414,11 +7681,6 @@ d@1, d@^1.0.1: es5-ext "^0.10.50" type "^1.0.1" -damerau-levenshtein@^1.0.4: - version "1.0.8" - resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz#b43d286ccbd36bc5b2f7ed41caf2d0aba1f8a6e7" - integrity sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA== - dargs@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" @@ -7478,14 +7740,14 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3: dependencies: ms "2.0.0" -debug@3.2.7, debug@^3.2.6: +debug@3.2.7, debug@^3.2.6, debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== dependencies: ms "^2.1.1" -debug@4, debug@4.3.4, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3.1, debug@^4.3.3, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: +debug@4, debug@4.3.4, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -7548,6 +7810,29 @@ deep-eql@^4.1.2: dependencies: type-detect "^4.0.0" +deep-equal@^2.0.5: + version "2.2.0" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.2.0.tgz#5caeace9c781028b9ff459f33b779346637c43e6" + integrity sha512-RdpzE0Hv4lhowpIUKKMJfeH6C1pXdtT1/it80ubgWqwI3qpuxUBpC1S4hnHg+zjnuOoDkzUtUCEEkG+XG5l3Mw== + dependencies: + call-bind "^1.0.2" + es-get-iterator "^1.1.2" + get-intrinsic "^1.1.3" + is-arguments "^1.1.1" + is-array-buffer "^3.0.1" + is-date-object "^1.0.5" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + isarray "^2.0.5" + object-is "^1.1.5" + object-keys "^1.1.1" + object.assign "^4.1.4" + regexp.prototype.flags "^1.4.3" + side-channel "^1.0.4" + which-boxed-primitive "^1.0.2" + which-collection "^1.0.1" + which-typed-array "^1.1.9" + deep-extend@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" @@ -7749,6 +8034,20 @@ dns-packet@^5.2.2: dependencies: "@leichtgewicht/ip-codec" "^2.0.1" +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + dom-serialize@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" @@ -8094,6 +8393,21 @@ es-array-method-boxes-properly@^1.0.0: resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== +es-get-iterator@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6" + integrity sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.3" + has-symbols "^1.0.3" + is-arguments "^1.1.1" + is-map "^2.0.2" + is-set "^2.0.2" + is-string "^1.0.7" + isarray "^2.0.5" + stop-iteration-iterator "^1.0.0" + es-module-lexer@^0.9.0: version "0.9.3" resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" @@ -8108,6 +8422,13 @@ es-set-tostringtag@^2.0.1: has "^1.0.3" has-tostringtag "^1.0.0" +es-shim-unscopables@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" + integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + dependencies: + has "^1.0.3" + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -8267,7 +8588,72 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== -eslint-scope@5.1.1: +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-config-prettier@^8.7.0: + version "8.7.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.7.0.tgz#f1cc58a8afebc50980bd53475451df146c13182d" + integrity sha512-HHVXLSlVUhMSmyW4ZzEuvjpwqamgmlfkutD53cYXLikh4pt/modINRcCIApJ84czDxM4GZInwUrromsDdTImTA== + +eslint-import-resolver-node@^0.3.7: + version "0.3.7" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7" + integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA== + dependencies: + debug "^3.2.7" + is-core-module "^2.11.0" + resolve "^1.22.1" + +eslint-module-utils@^2.7.4: + version "2.7.4" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974" + integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== + dependencies: + debug "^3.2.7" + +eslint-plugin-import@^2.27.5, eslint-plugin-import@latest: + version "2.27.5" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz#876a6d03f52608a3e5bb439c2550588e51dd6c65" + integrity sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow== + dependencies: + array-includes "^3.1.6" + array.prototype.flat "^1.3.1" + array.prototype.flatmap "^1.3.1" + debug "^3.2.7" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.7" + eslint-module-utils "^2.7.4" + has "^1.0.3" + is-core-module "^2.11.0" + is-glob "^4.0.3" + minimatch "^3.1.2" + object.values "^1.1.6" + resolve "^1.22.1" + semver "^6.3.0" + tsconfig-paths "^3.14.1" + +eslint-plugin-jsdoc@^40.0.1, eslint-plugin-jsdoc@latest: + version "40.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-40.0.1.tgz#5f028b4928d5c77f54bfd3c42c00acb61d27bb9f" + integrity sha512-KkiRInury7YrjjV5aCHDxwsPy6XFt5p2b2CnpDMITnWs8patNPf5kj24+VXIWw45kP6z/B0GOKfrYczB56OjQQ== + dependencies: + "@es-joy/jsdoccomment" "~0.36.1" + comment-parser "1.3.1" + debug "^4.3.4" + escape-string-regexp "^4.0.0" + esquery "^1.4.0" + semver "^7.3.8" + spdx-expression-parse "^3.0.1" + +eslint-plugin-prefer-arrow@^1.2.3, eslint-plugin-prefer-arrow@latest: + version "1.2.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-prefer-arrow/-/eslint-plugin-prefer-arrow-1.2.3.tgz#e7fbb3fa4cd84ff1015b9c51ad86550e55041041" + integrity sha512-J9I5PKCOJretVuiZRGvPQxCbllxGAV/viI20JO3LYblAodofBxyMnZAJ+WGeClHgANnSJberTNoFWWjrWKBuXQ== + +eslint-scope@5.1.1, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -8275,12 +8661,92 @@ eslint-scope@5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" +eslint-scope@^7.0.0, eslint-scope@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" + integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + +eslint-visitor-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + +eslint@^8.33.0, eslint@^8.35.0: + version "8.35.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.35.0.tgz#fffad7c7e326bae606f0e8f436a6158566d42323" + integrity sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw== + dependencies: + "@eslint/eslintrc" "^2.0.0" + "@eslint/js" "8.35.0" + "@humanwhocodes/config-array" "^0.11.8" + "@humanwhocodes/module-importer" "^1.0.1" + "@nodelib/fs.walk" "^1.2.8" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.1.1" + eslint-utils "^3.0.0" + eslint-visitor-keys "^3.3.0" + espree "^9.4.0" + esquery "^1.4.2" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + find-up "^5.0.0" + glob-parent "^6.0.2" + globals "^13.19.0" + grapheme-splitter "^1.0.4" + ignore "^5.2.0" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + is-path-inside "^3.0.3" + js-sdsl "^4.1.4" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.1" + regexpp "^3.2.0" + strip-ansi "^6.0.1" + strip-json-comments "^3.1.0" + text-table "^0.2.0" + +espree@^9.4.0: + version "9.4.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.1.tgz#51d6092615567a2c2cff7833445e37c28c0065bd" + integrity sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg== + dependencies: + acorn "^8.8.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.3.0" + esprima@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.0.1: +esquery@^1.0.1, esquery@^1.4.0, esquery@^1.4.2: version "1.5.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== @@ -8568,6 +9034,11 @@ fast-levenshtein@^1.0.0: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz#e6a754cc8f15e58987aa9cbd27af66fd6f4e5af9" integrity sha512-Ia0sQNrMPXXkqVFt6w6M1n1oKo3NfKs+mvaV811Jwir7vAk9a6PVV9VPYf6X3BU97QiLEmuW3uXH9u87zDFfdw== +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + fast-querystring@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/fast-querystring/-/fast-querystring-1.1.1.tgz#f4c56ef56b1a954880cfd8c01b83f9e1a3d3fda2" @@ -8592,11 +9063,6 @@ fast-url-parser@^1.1.3: dependencies: punycode "^1.3.2" -fastparse@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.2.tgz#91728c5a5942eced8531283c79441ee4122c35a9" - integrity sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ== - fastq@^1.6.0: version "1.15.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" @@ -8665,6 +9131,13 @@ figures@^3.0.0: dependencies: escape-string-regexp "^1.0.5" +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + file-type@^16.5.3: version "16.5.4" resolved "https://registry.yarnpkg.com/file-type/-/file-type-16.5.4.tgz#474fb4f704bee427681f98dd390058a172a6c2fd" @@ -8824,12 +9297,20 @@ flagged-respawn@^1.0.0: resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.1.tgz#e7de6f1279ddd9ca9aac8a5971d618606b3aab41" integrity sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q== +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + dependencies: + flatted "^3.1.0" + rimraf "^3.0.2" + flat@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== -flatted@^3.2.7: +flatted@^3.1.0, flatted@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== @@ -9267,7 +9748,7 @@ glob-parent@^5.1.1, glob-parent@^5.1.2, glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob-parent@^6.0.1: +glob-parent@^6.0.1, glob-parent@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== @@ -9373,6 +9854,13 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== +globals@^13.19.0: + version "13.20.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" + integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== + dependencies: + type-fest "^0.20.2" + globalthis@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" @@ -9380,7 +9868,7 @@ globalthis@^1.0.3: dependencies: define-properties "^1.1.3" -globby@^11.0.2, globby@^11.0.3: +globby@^11.0.2, globby@^11.0.3, globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -9463,6 +9951,11 @@ graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2 resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== +grapheme-splitter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" + integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== + graphql-config@^4.4.0: version "4.5.0" resolved "https://registry.yarnpkg.com/graphql-config/-/graphql-config-4.5.0.tgz#257c2338950b8dce295a27f75c5f6c39f8f777b2" @@ -10032,7 +10525,7 @@ ignore-walk@^3.0.1: dependencies: minimatch "^3.0.4" -ignore@^5.2.0: +ignore@5.2.4, ignore@^5.2.0: version "5.2.4" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== @@ -10304,7 +10797,7 @@ is-accessor-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" -is-arguments@^1.0.4: +is-arguments@^1.0.4, is-arguments@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== @@ -10384,7 +10877,7 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-core-module@^2.5.0, is-core-module@^2.8.1, is-core-module@^2.9.0: +is-core-module@^2.11.0, is-core-module@^2.5.0, is-core-module@^2.8.1, is-core-module@^2.9.0: version "2.11.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== @@ -10405,7 +10898,7 @@ is-data-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" -is-date-object@^1.0.1: +is-date-object@^1.0.1, is-date-object@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== @@ -10512,6 +11005,11 @@ is-lower-case@^2.0.2: dependencies: tslib "^2.0.3" +is-map@^2.0.1, is-map@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" + integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== + is-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" @@ -10568,6 +11066,11 @@ is-observable@^1.1.0: dependencies: symbol-observable "^1.1.0" +is-path-inside@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" @@ -10620,6 +11123,11 @@ is-relative@^1.0.0: dependencies: is-unc-path "^1.0.0" +is-set@^2.0.1, is-set@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" + integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g== + is-shared-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" @@ -10720,6 +11228,11 @@ is-valid-glob@^1.0.0: resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-1.0.0.tgz#29bf3eff701be2d4d315dbacc39bc39fe8f601aa" integrity sha512-AhiROmoEFDSsjx8hW+5sGwgKVIORcXnrlAx/R0ZSeaPw70Vw0CqkGBBhHGL58Uox2eXnU1AnvXJl1XlyedO5bA== +is-weakmap@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" + integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA== + is-weakref@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" @@ -10727,6 +11240,14 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" +is-weakset@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.2.tgz#4569d67a747a1ce5a994dfd4ef6dcea76e7c0a1d" + integrity sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + is-what@^3.14.1: version "3.14.1" resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.14.1.tgz#e1222f46ddda85dead0fd1c9df131760e77755c1" @@ -10758,6 +11279,11 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + isbinaryfile@^4.0.8: version "4.0.10" resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.10.tgz#0c5b5e30c2557a2f06febd37b7322946aaee42b3" @@ -10912,6 +11438,11 @@ js-beautify@^1.6.14: glob "^8.0.3" nopt "^6.0.0" +js-sdsl@^4.1.4: + version "4.3.0" + resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.3.0.tgz#aeefe32a451f7af88425b11fdb5f58c90ae1d711" + integrity sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ== + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -10937,6 +11468,11 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== +jsdoc-type-pratt-parser@~3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-3.1.0.tgz#a4a56bdc6e82e5865ffd9febc5b1a227ff28e67e" + integrity sha512-MgtD0ZiCDk9B+eI73BextfRrVQl0oyzRG8B2BjORts6jbunj4ScKPcyXGTbB6eXL4y9TzxCm6hyeLq/2ASzNdw== + jsesc@^2.5.1: version "2.5.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -11009,6 +11545,13 @@ json-to-pretty-yaml@^1.2.2: remedial "^1.0.7" remove-trailing-spaces "^1.0.6" +json5@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" + integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== + dependencies: + minimist "^1.2.0" + json5@^2.1.2, json5@^2.2.1, json5@^2.2.2: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" @@ -11294,6 +11837,14 @@ less@4.1.3, less@^4.1.3: needle "^3.1.0" source-map "~0.6.0" +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + libnpmaccess@^4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-4.0.3.tgz#dfb0e5b0a53c315a2610d300e46b4ddeb66e7eec" @@ -12149,7 +12700,7 @@ minimatch@4.2.3: dependencies: brace-expansion "^1.1.7" -minimatch@^3.0.4, minimatch@^3.1.1: +minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -12661,7 +13212,7 @@ mkdirp-infer-owner@^2.0.0: infer-owner "^1.0.4" mkdirp "^1.0.3" -mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.4, mkdirp@^0.5.5: +mkdirp@^0.5.1, mkdirp@^0.5.4, mkdirp@^0.5.5: version "0.5.6" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== @@ -12832,6 +13383,16 @@ napi-build-utils@^1.0.1: resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== +natural-compare-lite@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" + integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + needle@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/needle/-/needle-3.2.0.tgz#07d240ebcabfd65c76c03afae7f6defe6469df44" @@ -13378,6 +13939,14 @@ object-inspect@^1.12.2, object-inspect@^1.9.0: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== +object-is@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" + integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" @@ -13448,6 +14017,15 @@ object.reduce@^1.0.0: for-own "^1.0.0" make-iterator "^1.0.0" +object.values@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" + integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + obuf@^1.0.0, obuf@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" @@ -13524,6 +14102,18 @@ optimism@^0.16.1: "@wry/context" "^0.7.0" "@wry/trie" "^0.3.0" +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" + ora@5.4.1, ora@^5.1.0, ora@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" @@ -14297,6 +14887,11 @@ prebuild-install@^7.1.0, prebuild-install@^7.1.1: tar-fs "^2.0.0" tunnel-agent "^0.6.0" +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + prettier@^2.2.1: version "2.8.4" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.4.tgz#34dd2595629bfbb79d344ac4a91ff948694463c3" @@ -15105,6 +15700,11 @@ regexp.prototype.flags@^1.4.3: define-properties "^1.1.3" functions-have-names "^1.2.2" +regexpp@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + regexpu-core@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.3.1.tgz#66900860f88def39a5cb79ebd9490e84f17bcdfb" @@ -15300,7 +15900,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg== -resolve@1.22.1, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.22.1, resolve@^1.3.2, resolve@^1.4.0: +resolve@1.22.1, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.22.1, resolve@^1.4.0: version "1.22.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== @@ -15422,7 +16022,7 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -rxjs@6.6.7, rxjs@^6.3.3, rxjs@^6.5.1, rxjs@^6.5.2, rxjs@^6.5.3, rxjs@^6.6.0, rxjs@^6.6.3: +rxjs@6.6.7, rxjs@^6.3.3, rxjs@^6.5.1, rxjs@^6.5.2, rxjs@^6.6.0, rxjs@^6.6.3: version "6.6.7" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== @@ -15554,13 +16154,6 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" integrity sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow== -semver-dsl@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/semver-dsl/-/semver-dsl-1.0.1.tgz#d3678de5555e8a61f629eed025366ae5f27340a0" - integrity sha512-e8BOaTo007E3dMuQQTnPdalbKTABKNS7UxoBIDnwOqRa+QwMrCPjynB8zAlPF6xlqUfdLPPLIJ13hJNmhtq8Ng== - dependencies: - semver "^5.3.0" - semver-greatest-satisfied-range@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz#13e8c2658ab9691cb0cd71093240280d36f77a5b" @@ -15573,7 +16166,7 @@ semver-regex@^3.1.2: resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-3.1.4.tgz#13053c0d4aa11d070a2f2872b6b1e3ae1e1971b4" integrity sha512-6IiqeZNgq01qGf0TId0t3NvKzSvUsjcpdEO3AQNeIjR6A2+ckTnQlDpl4qu1bjRv0RzN3FP9hzFmws3lKqRWkA== -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.6.0, semver@^5.7.1: +"semver@2 || 3 || 4 || 5", semver@^5.6.0, semver@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -16021,7 +16614,7 @@ source-map@0.7.4: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== -source-map@^0.5.6, source-map@^0.5.7: +source-map@^0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== @@ -16049,7 +16642,7 @@ spdx-exceptions@^2.1.0: resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== -spdx-expression-parse@^3.0.0: +spdx-expression-parse@^3.0.0, spdx-expression-parse@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== @@ -16123,11 +16716,6 @@ sponge-case@^1.0.1: dependencies: tslib "^2.0.3" -sprintf-js@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673" - integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug== - sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -16233,6 +16821,13 @@ std-env@^3.3.1: resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.3.2.tgz#af27343b001616015534292178327b202b9ee955" integrity sha512-uUZI65yrV2Qva5gqE0+A7uVAvO40iPo6jGhs7s8keRfHCmtg+uB2X6EiLGCI9IgL1J17xGhvoOqSz79lzICPTA== +stop-iteration-iterator@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz#6a60be0b4ee757d1ed5254858ec66b10c49285e4" + integrity sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ== + dependencies: + internal-slot "^1.0.4" + stream-exhaust@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/stream-exhaust/-/stream-exhaust-1.0.2.tgz#acdac8da59ef2bc1e17a2c0ccf6c320d120e555d" @@ -16421,6 +17016,11 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" +strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" @@ -16668,7 +17268,7 @@ text-extensions@^1.0.0: resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26" integrity sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ== -text-table@0.2.0: +text-table@0.2.0, text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== @@ -16710,7 +17310,7 @@ through2@^4.0.0: dependencies: readable-stream "3" -through@2, "through@>=2.2.7 <3", through@X.X.X, through@^2.3.4, through@^2.3.6, through@^2.3.8: +through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== @@ -16747,6 +17347,13 @@ title-case@^3.0.3: dependencies: tslib "^2.0.3" +tmp@0.2.1, tmp@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" + integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== + dependencies: + rimraf "^3.0.0" + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -16754,13 +17361,6 @@ tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" -tmp@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" - integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== - dependencies: - rimraf "^3.0.0" - to-absolute-glob@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz#1865f43d9e74b0822db9f145b78cff7d0f7c849b" @@ -16892,12 +17492,22 @@ ts-node@^10.8.1, ts-node@^10.9.1: v8-compile-cache-lib "^3.0.1" yn "3.1.1" +tsconfig-paths@^3.14.1: + version "3.14.2" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" + integrity sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.2" + minimist "^1.2.6" + strip-bom "^3.0.0" + tslib@2.5.0, tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.4.1, tslib@^2.5.0, tslib@~2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== -tslib@^1.10.0, tslib@^1.13.0, tslib@^1.8.1, tslib@^1.9.0: +tslib@^1.8.1, tslib@^1.9.0: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -16907,34 +17517,15 @@ tslib@~2.4.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== -tslint@^6.1.3, tslint@~6.1.3: - version "6.1.3" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-6.1.3.tgz#5c23b2eccc32487d5523bd3a470e9aa31789d904" - integrity sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg== - dependencies: - "@babel/code-frame" "^7.0.0" - builtin-modules "^1.1.1" - chalk "^2.3.0" - commander "^2.12.1" - diff "^4.0.1" - glob "^7.1.1" - js-yaml "^3.13.1" - minimatch "^3.0.4" - mkdirp "^0.5.3" - resolve "^1.3.2" - semver "^5.3.0" - tslib "^1.13.0" - tsutils "^2.29.0" - tsscmp@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.6.tgz#85b99583ac3589ec4bfef825b5000aa911d605eb" integrity sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA== -tsutils@^2.29.0: - version "2.29.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" - integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== +tsutils@^3.21.0: + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== dependencies: tslib "^1.8.1" @@ -16958,6 +17549,13 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + type-detect@^4.0.0, type-detect@^4.0.5: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" @@ -17813,6 +18411,16 @@ which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" +which-collection@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.1.tgz#70eab71ebbbd2aefaf32f917082fc62cdcb70906" + integrity sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A== + dependencies: + is-map "^2.0.1" + is-set "^2.0.1" + is-weakmap "^2.0.1" + is-weakset "^2.0.1" + which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" @@ -17895,6 +18503,11 @@ wildcard@^2.0.0: resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== +word-wrap@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + wordwrap@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" @@ -18280,11 +18893,6 @@ zen-observable@0.8.15: resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15" integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ== -zone.js@~0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.10.3.tgz#3e5e4da03c607c9dcd92e37dd35687a14a140c16" - integrity sha512-LXVLVEq0NNOqK/fLJo3d0kfzd4sxwn2/h67/02pjCjfKDxgx1i9QqpvtHD8CrBnSSwMw5+dy11O7FRX5mkO7Cg== - zone.js@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.12.0.tgz#a4a6e5fab6d34bd37d89c77e89ac2e6f4a3d2c30"