diff --git a/.changeset/eight-apples-itch.md b/.changeset/eight-apples-itch.md
new file mode 100644
index 0000000..f869017
--- /dev/null
+++ b/.changeset/eight-apples-itch.md
@@ -0,0 +1,5 @@
+---
+"saleor-app-invoices": patch
+---
+
+Link local eslint config to package json
diff --git a/.changeset/honest-timers-float.md b/.changeset/honest-timers-float.md
new file mode 100644
index 0000000..4088e2f
--- /dev/null
+++ b/.changeset/honest-timers-float.md
@@ -0,0 +1,5 @@
+---
+"saleor-app-search": major
+---
+
+Include Search app to apps
diff --git a/apps/invoices/package.json b/apps/invoices/package.json
index fc13a45..e97d968 100644
--- a/apps/invoices/package.json
+++ b/apps/invoices/package.json
@@ -64,7 +64,8 @@
"rimraf": "^3.0.2",
"typescript": "4.9.4",
"vite": "^4.1.1",
- "vitest": "^0.28.4"
+ "vitest": "^0.28.4",
+ "eslint-config-saleor": "workspace:*"
},
"lint-staged": {
"*.{js,ts,tsx}": "eslint --cache --fix",
diff --git a/apps/search/.env.example b/apps/search/.env.example
new file mode 100644
index 0000000..e382ef7
--- /dev/null
+++ b/apps/search/.env.example
@@ -0,0 +1,2 @@
+# Encryption key used by the EncryptedSettingsManager. Required by the production builds
+SECRET_KEY=
\ No newline at end of file
diff --git a/apps/search/.eslintrc b/apps/search/.eslintrc
new file mode 100644
index 0000000..0784400
--- /dev/null
+++ b/apps/search/.eslintrc
@@ -0,0 +1,3 @@
+{
+ "extends": ["saleor"]
+}
diff --git a/apps/search/.graphqlrc.yml b/apps/search/.graphqlrc.yml
new file mode 100644
index 0000000..ee7c7af
--- /dev/null
+++ b/apps/search/.graphqlrc.yml
@@ -0,0 +1,20 @@
+schema: graphql/schema.graphql
+documents: [graphql/**/*.graphql, src/**/*.ts, src/**/*.tsx]
+extensions:
+ codegen:
+ overwrite: true
+ generates:
+ generated/graphql.ts:
+ config:
+ dedupeFragments: true
+ plugins:
+ - typescript
+ - typescript-operations
+ - urql-introspection
+ - typescript-urql:
+ documentVariablePrefix: "Untyped"
+ fragmentVariablePrefix: "Untyped"
+ - typed-document-node
+ generated/schema.graphql:
+ plugins:
+ - schema-ast
diff --git a/apps/search/README.md b/apps/search/README.md
new file mode 100644
index 0000000..2695f79
--- /dev/null
+++ b/apps/search/README.md
@@ -0,0 +1,85 @@
+
+
+
+
Saleor App Search
+
+
+## About
+
+Saleor App providing integration with the Algolia (and more search engines in the future).
+
+### What's included?
+
+- Synchronize changes of your products catalog with Algolia
+- Search results preview
+- Each channel is a separate index
+
+### How to install
+
+- start local dev server or deploy the application
+- install the application in your Saleor Instance using manifest URL
+- [configure the application](./docs/application-setup.md)
+
+### Learn more about Apps
+
+[Apps guide](https://docs.saleor.io/docs/3.x/developer/extending/apps/key-concepts)
+
+[Configuring apps in dashboard](https://docs.saleor.io/docs/3.x/dashboard/apps)
+
+## Development
+
+### Requirements
+
+Before you start, make sure you have installed:
+
+- [Node.js](https://nodejs.org/en/)
+- [pnpm](https://pnpm.io/)
+- [Saleor CLI](https://docs.saleor.io/docs/3.x/cli) - optional, but recommended
+
+1. Install the dependencies by running:
+
+```
+pnpm install
+```
+
+2. Start the local server with:
+
+```
+pnpm dev
+```
+
+3. Expose local environment using tunnel:
+
+- Use Saleor CLI `saleor app tunnel`
+- Use tunneling tools like [localtunnel](https://github.com/localtunnel/localtunnel) or [ngrok](https://ngrok.com/).
+
+4. Install application at your dashboard:
+
+If you use Saleor Cloud or your local server is exposed, you can install your app by following this link:
+
+```
+[YOUR_SALEOR_DASHBOARD_URL]/apps/install?manifestUrl=[YOUR_APP_TUNNEL_MANIFEST_URL]
+```
+
+This template host manifest at `/api/manifest`
+
+You can also install application using GQL or command line. Follow the guide [how to install your app](https://docs.saleor.io/docs/3.x/developer/extending/apps/installing-apps#installation-using-graphql-api) to learn more.
+
+### Generated schema and typings
+
+Commands `build` and `dev` would generate schema and typed functions using Saleor's GraphQL endpoint. Commit the `generated` folder to your repo as they are necessary for queries and keeping track of the schema changes.
+
+[Learn more](https://www.graphql-code-generator.com/) about GraphQL code generation.
+
+### Storing registration data - APL
+
+During registration process Saleor API pass the auth token to the app. With this token App can query Saleor API with privileged access (depending on requested permissions during the installation).
+To store this data, app-template use a different [APL interfaces](https://github.com/saleor/saleor-app-sdk/blob/main/docs/apl.md).
+
+The choice of the APL is done using `APL` environment variable. If value is not set, FileAPL is used. Available choices:
+
+- `file`: no additional setup is required. Good choice for local development. Can't be used for multi tenant-apps or be deployed (not intended for production)
+- `upstash`: use [Upstash](https://upstash.com/) Redis as storage method. Free account required. Can be used for development and production and supports multi-tenancy. Requires `UPSTASH_URL` and `UPSTASH_TOKEN` environment variables to be set
+- `vercel`: used by deployments from the Marketplace. It's single-tenant only and only supported by Vercel deployments done with Saleor CLI. Requires `SALEOR_REGISTER_APP_URL` and `SALEOR_DEPLOYMENT_TOKEN` environment variables to be set (handled automatically by the Saleor CLI)
+
+If you want to use your own database, you can implement your own APL. [Check the documentation to read more.](https://github.com/saleor/saleor-app-sdk/blob/main/docs/apl.md)
diff --git a/apps/search/docs/application-setup.md b/apps/search/docs/application-setup.md
new file mode 100644
index 0000000..8d89eec
--- /dev/null
+++ b/apps/search/docs/application-setup.md
@@ -0,0 +1,40 @@
+# App Configuration
+
+## Required configuration options
+
+Setting up those values is required by the application to work properly"
+
+- Application ID: ID of the Algolia application
+- Admin key: key required to update documents in the Algolia API
+- Search key: public key used by search preview
+
+All can be found in your Algolia dashboard. Choose existing application or create new one. Then choose `Overview` from the menu on the left hand side.
+Below the welcome message you'll find link to the section with keys:
+
+
+
+This view contains all the keys we'll need:
+
+
+
+Now you can set it in the Search App configuration view and run reindexing operation.
+
+## Optional
+
+- Index prefix: App will create multiple indices. For testing purposes you might want to have separate indices with names starting with `staging`.
+
+# Algolia configuration
+
+## Grouping
+
+To provide the most precise search results on variant level, Search app uploads each variant as separate document. Most likely you would like to group results by product. To achieve that, navigate to index settings:
+
+
+
+At the menu on the left choose `Deduplication and Grouping`. Change value of distinct to `true` and set attribute as `productId`. If attribute is not there, make sure you already reindexed your products
+
+
+
+After saving the changes variants will be displayed as single product:
+
+
diff --git a/apps/search/docs/images/index_configuration.png b/apps/search/docs/images/index_configuration.png
new file mode 100644
index 0000000..8de53ce
Binary files /dev/null and b/apps/search/docs/images/index_configuration.png differ
diff --git a/apps/search/docs/images/index_configured.png b/apps/search/docs/images/index_configured.png
new file mode 100644
index 0000000..964bf9e
Binary files /dev/null and b/apps/search/docs/images/index_configured.png differ
diff --git a/apps/search/docs/images/index_initial.png b/apps/search/docs/images/index_initial.png
new file mode 100644
index 0000000..77b2e37
Binary files /dev/null and b/apps/search/docs/images/index_initial.png differ
diff --git a/apps/search/docs/images/keys.png b/apps/search/docs/images/keys.png
new file mode 100644
index 0000000..7dcc2af
Binary files /dev/null and b/apps/search/docs/images/keys.png differ
diff --git a/apps/search/docs/images/overview.png b/apps/search/docs/images/overview.png
new file mode 100644
index 0000000..1618760
Binary files /dev/null and b/apps/search/docs/images/overview.png differ
diff --git a/apps/search/generated/graphql.ts b/apps/search/generated/graphql.ts
new file mode 100644
index 0000000..97c6030
--- /dev/null
+++ b/apps/search/generated/graphql.ts
@@ -0,0 +1,77137 @@
+import gql from 'graphql-tag';
+import * as Urql from 'urql';
+import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
+export type Maybe = T | null;
+export type InputMaybe = Maybe;
+export type Exact = { [K in keyof T]: T[K] };
+export type MakeOptional = Omit & { [SubKey in K]?: Maybe };
+export type MakeMaybe = Omit & { [SubKey in K]: Maybe };
+export type Omit = Pick>;
+/** All built-in and custom scalars, mapped to their actual values */
+export type Scalars = {
+ ID: string;
+ String: string;
+ Boolean: boolean;
+ Int: number;
+ Float: number;
+ /**
+ * The `Date` scalar type represents a Date
+ * value as specified by
+ * [iso8601](https://en.wikipedia.org/wiki/ISO_8601).
+ */
+ Date: any;
+ /**
+ * The `DateTime` scalar type represents a DateTime
+ * value as specified by
+ * [iso8601](https://en.wikipedia.org/wiki/ISO_8601).
+ */
+ DateTime: any;
+ /**
+ * The `GenericScalar` scalar type represents a generic
+ * GraphQL scalar value that could be:
+ * String, Boolean, Int, Float, List or Object.
+ */
+ GenericScalar: any;
+ JSONString: any;
+ /**
+ * Metadata is a map of key-value pairs, both keys and values are `String`.
+ *
+ * Example:
+ * ```
+ * {
+ * "key1": "value1",
+ * "key2": "value2"
+ * }
+ * ```
+ */
+ Metadata: any;
+ /**
+ * Positive Decimal scalar implementation.
+ *
+ * Should be used in places where value must be positive.
+ */
+ PositiveDecimal: any;
+ UUID: any;
+ /** Variables of this type must be set to null in mutations. They will be replaced with a filename from a following multipart part containing a binary file. See: https://github.com/jaydenseric/graphql-multipart-request-spec. */
+ Upload: any;
+ WeightScalar: any;
+ /** _Any value scalar as defined by Federation spec. */
+ _Any: any;
+};
+
+/**
+ * Create a new address for the customer.
+ *
+ * Requires one of the following permissions: AUTHENTICATED_USER.
+ */
+export type AccountAddressCreate = {
+ __typename?: 'AccountAddressCreate';
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ accountErrors: Array;
+ address?: Maybe;
+ errors: Array;
+ /** A user instance for which the address was created. */
+ user?: Maybe;
+};
+
+/** Delete an address of the logged-in user. Requires one of the following permissions: MANAGE_USERS, IS_OWNER. */
+export type AccountAddressDelete = {
+ __typename?: 'AccountAddressDelete';
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ accountErrors: Array;
+ address?: Maybe;
+ errors: Array;
+ /** A user instance for which the address was deleted. */
+ user?: Maybe;
+};
+
+/** Updates an address of the logged-in user. Requires one of the following permissions: MANAGE_USERS, IS_OWNER. */
+export type AccountAddressUpdate = {
+ __typename?: 'AccountAddressUpdate';
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ accountErrors: Array;
+ address?: Maybe;
+ errors: Array;
+ /** A user object for which the address was edited. */
+ user?: Maybe;
+};
+
+/**
+ * Remove user account.
+ *
+ * Requires one of the following permissions: AUTHENTICATED_USER.
+ */
+export type AccountDelete = {
+ __typename?: 'AccountDelete';
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ accountErrors: Array;
+ errors: Array;
+ user?: Maybe;
+};
+
+export type AccountError = {
+ __typename?: 'AccountError';
+ /** A type of address that causes the error. */
+ addressType?: Maybe;
+ /** The error code. */
+ code: AccountErrorCode;
+ /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */
+ field?: Maybe;
+ /** The error message. */
+ message?: Maybe;
+};
+
+/** An enumeration. */
+export enum AccountErrorCode {
+ AccountNotConfirmed = 'ACCOUNT_NOT_CONFIRMED',
+ ActivateOwnAccount = 'ACTIVATE_OWN_ACCOUNT',
+ ActivateSuperuserAccount = 'ACTIVATE_SUPERUSER_ACCOUNT',
+ ChannelInactive = 'CHANNEL_INACTIVE',
+ DeactivateOwnAccount = 'DEACTIVATE_OWN_ACCOUNT',
+ DeactivateSuperuserAccount = 'DEACTIVATE_SUPERUSER_ACCOUNT',
+ DeleteNonStaffUser = 'DELETE_NON_STAFF_USER',
+ DeleteOwnAccount = 'DELETE_OWN_ACCOUNT',
+ DeleteStaffAccount = 'DELETE_STAFF_ACCOUNT',
+ DeleteSuperuserAccount = 'DELETE_SUPERUSER_ACCOUNT',
+ DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM',
+ GraphqlError = 'GRAPHQL_ERROR',
+ Inactive = 'INACTIVE',
+ Invalid = 'INVALID',
+ InvalidCredentials = 'INVALID_CREDENTIALS',
+ InvalidPassword = 'INVALID_PASSWORD',
+ JwtDecodeError = 'JWT_DECODE_ERROR',
+ JwtInvalidCsrfToken = 'JWT_INVALID_CSRF_TOKEN',
+ JwtInvalidToken = 'JWT_INVALID_TOKEN',
+ JwtMissingToken = 'JWT_MISSING_TOKEN',
+ JwtSignatureExpired = 'JWT_SIGNATURE_EXPIRED',
+ LeftNotManageablePermission = 'LEFT_NOT_MANAGEABLE_PERMISSION',
+ MissingChannelSlug = 'MISSING_CHANNEL_SLUG',
+ NotFound = 'NOT_FOUND',
+ OutOfScopeGroup = 'OUT_OF_SCOPE_GROUP',
+ OutOfScopePermission = 'OUT_OF_SCOPE_PERMISSION',
+ OutOfScopeUser = 'OUT_OF_SCOPE_USER',
+ PasswordEntirelyNumeric = 'PASSWORD_ENTIRELY_NUMERIC',
+ PasswordTooCommon = 'PASSWORD_TOO_COMMON',
+ PasswordTooShort = 'PASSWORD_TOO_SHORT',
+ PasswordTooSimilar = 'PASSWORD_TOO_SIMILAR',
+ Required = 'REQUIRED',
+ Unique = 'UNIQUE'
+}
+
+export type AccountInput = {
+ /** Billing address of the customer. */
+ defaultBillingAddress?: InputMaybe;
+ /** Shipping address of the customer. */
+ defaultShippingAddress?: InputMaybe;
+ /** Given name. */
+ firstName?: InputMaybe;
+ /** User language code. */
+ languageCode?: InputMaybe;
+ /** Family name. */
+ lastName?: InputMaybe;
+};
+
+/** Register a new user. */
+export type AccountRegister = {
+ __typename?: 'AccountRegister';
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ accountErrors: Array;
+ errors: Array;
+ /** Informs whether users need to confirm their email address. */
+ requiresConfirmation?: Maybe;
+ user?: Maybe;
+};
+
+export type AccountRegisterInput = {
+ /** Slug of a channel which will be used to notify users. Optional when only one channel exists. */
+ channel?: InputMaybe;
+ /** The email address of the user. */
+ email: Scalars['String'];
+ /** Given name. */
+ firstName?: InputMaybe;
+ /** User language code. */
+ languageCode?: InputMaybe;
+ /** Family name. */
+ lastName?: InputMaybe;
+ /** User public metadata. */
+ metadata?: InputMaybe>;
+ /** Password. */
+ password: Scalars['String'];
+ /** Base of frontend URL that will be needed to create confirmation URL. */
+ redirectUrl?: InputMaybe;
+};
+
+/**
+ * Sends an email with the account removal link for the logged-in user.
+ *
+ * Requires one of the following permissions: AUTHENTICATED_USER.
+ */
+export type AccountRequestDeletion = {
+ __typename?: 'AccountRequestDeletion';
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ accountErrors: Array;
+ errors: Array;
+};
+
+/**
+ * Sets a default address for the authenticated user.
+ *
+ * Requires one of the following permissions: AUTHENTICATED_USER.
+ */
+export type AccountSetDefaultAddress = {
+ __typename?: 'AccountSetDefaultAddress';
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ accountErrors: Array;
+ errors: Array;
+ /** An updated user instance. */
+ user?: Maybe;
+};
+
+/**
+ * Updates the account of the logged-in user.
+ *
+ * Requires one of the following permissions: AUTHENTICATED_USER.
+ */
+export type AccountUpdate = {
+ __typename?: 'AccountUpdate';
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ accountErrors: Array;
+ errors: Array;
+ user?: Maybe;
+};
+
+/** Represents user address data. */
+export type Address = Node & {
+ __typename?: 'Address';
+ city: Scalars['String'];
+ cityArea: Scalars['String'];
+ companyName: Scalars['String'];
+ /** Shop's default country. */
+ country: CountryDisplay;
+ countryArea: Scalars['String'];
+ firstName: Scalars['String'];
+ id: Scalars['ID'];
+ /** Address is user's default billing address. */
+ isDefaultBillingAddress?: Maybe;
+ /** Address is user's default shipping address. */
+ isDefaultShippingAddress?: Maybe;
+ lastName: Scalars['String'];
+ phone?: Maybe;
+ postalCode: Scalars['String'];
+ streetAddress1: Scalars['String'];
+ streetAddress2: Scalars['String'];
+};
+
+/**
+ * Creates user address.
+ *
+ * Requires one of the following permissions: MANAGE_USERS.
+ */
+export type AddressCreate = {
+ __typename?: 'AddressCreate';
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ accountErrors: Array;
+ address?: Maybe;
+ errors: Array;
+ /** A user instance for which the address was created. */
+ user?: Maybe;
+};
+
+/**
+ * Event sent when new address is created.
+ *
+ * Added in Saleor 3.5.
+ *
+ * Note: this API is currently in Feature Preview and can be subject to changes at later point.
+ */
+export type AddressCreated = Event & {
+ __typename?: 'AddressCreated';
+ /** The address the event relates to. */
+ address?: Maybe;
+ /** Time of the event. */
+ issuedAt?: Maybe;
+ /** The user or application that triggered the event. */
+ issuingPrincipal?: Maybe;
+ /** The application receiving the webhook. */
+ recipient?: Maybe;
+ /** Saleor version that triggered the event. */
+ version?: Maybe;
+};
+
+/**
+ * Deletes an address.
+ *
+ * Requires one of the following permissions: MANAGE_USERS.
+ */
+export type AddressDelete = {
+ __typename?: 'AddressDelete';
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ accountErrors: Array;
+ address?: Maybe;
+ errors: Array;
+ /** A user instance for which the address was deleted. */
+ user?: Maybe;
+};
+
+/**
+ * Event sent when address is deleted.
+ *
+ * Added in Saleor 3.5.
+ *
+ * Note: this API is currently in Feature Preview and can be subject to changes at later point.
+ */
+export type AddressDeleted = Event & {
+ __typename?: 'AddressDeleted';
+ /** The address the event relates to. */
+ address?: Maybe;
+ /** Time of the event. */
+ issuedAt?: Maybe;
+ /** The user or application that triggered the event. */
+ issuingPrincipal?: Maybe;
+ /** The application receiving the webhook. */
+ recipient?: Maybe;
+ /** Saleor version that triggered the event. */
+ version?: Maybe;
+};
+
+export type AddressInput = {
+ /** City. */
+ city?: InputMaybe;
+ /** District. */
+ cityArea?: InputMaybe;
+ /** Company or organization. */
+ companyName?: InputMaybe;
+ /** Country. */
+ country?: InputMaybe;
+ /** State or province. */
+ countryArea?: InputMaybe;
+ /** Given name. */
+ firstName?: InputMaybe;
+ /** Family name. */
+ lastName?: InputMaybe;
+ /** Phone number. */
+ phone?: InputMaybe;
+ /** Postal code. */
+ postalCode?: InputMaybe;
+ /** Address. */
+ streetAddress1?: InputMaybe;
+ /** Address. */
+ streetAddress2?: InputMaybe;
+};
+
+/**
+ * Sets a default address for the given user.
+ *
+ * Requires one of the following permissions: MANAGE_USERS.
+ */
+export type AddressSetDefault = {
+ __typename?: 'AddressSetDefault';
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ accountErrors: Array;
+ errors: Array;
+ /** An updated user instance. */
+ user?: Maybe;
+};
+
+/** An enumeration. */
+export enum AddressTypeEnum {
+ Billing = 'BILLING',
+ Shipping = 'SHIPPING'
+}
+
+/**
+ * Updates an address.
+ *
+ * Requires one of the following permissions: MANAGE_USERS.
+ */
+export type AddressUpdate = {
+ __typename?: 'AddressUpdate';
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ accountErrors: Array;
+ address?: Maybe;
+ errors: Array;
+ /** A user object for which the address was edited. */
+ user?: Maybe;
+};
+
+/**
+ * Event sent when address is updated.
+ *
+ * Added in Saleor 3.5.
+ *
+ * Note: this API is currently in Feature Preview and can be subject to changes at later point.
+ */
+export type AddressUpdated = Event & {
+ __typename?: 'AddressUpdated';
+ /** The address the event relates to. */
+ address?: Maybe;
+ /** Time of the event. */
+ issuedAt?: Maybe;
+ /** The user or application that triggered the event. */
+ issuingPrincipal?: Maybe;
+ /** The application receiving the webhook. */
+ recipient?: Maybe;
+ /** Saleor version that triggered the event. */
+ version?: Maybe;
+};
+
+export type AddressValidationData = {
+ __typename?: 'AddressValidationData';
+ addressFormat: Scalars['String'];
+ addressLatinFormat: Scalars['String'];
+ allowedFields: Array;
+ cityAreaChoices: Array;
+ cityAreaType: Scalars['String'];
+ cityChoices: Array;
+ cityType: Scalars['String'];
+ countryAreaChoices: Array;
+ countryAreaType: Scalars['String'];
+ countryCode: Scalars['String'];
+ countryName: Scalars['String'];
+ postalCodeExamples: Array;
+ postalCodeMatchers: Array;
+ postalCodePrefix: Scalars['String'];
+ postalCodeType: Scalars['String'];
+ requiredFields: Array;
+ upperFields: Array;
+};
+
+/** Represents allocation. */
+export type Allocation = Node & {
+ __typename?: 'Allocation';
+ id: Scalars['ID'];
+ /**
+ * Quantity allocated for orders.
+ *
+ * Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS.
+ */
+ quantity: Scalars['Int'];
+ /**
+ * The warehouse were items were allocated.
+ *
+ * Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS.
+ */
+ warehouse: Warehouse;
+};
+
+/**
+ * Determine the allocation strategy for the channel.
+ *
+ * PRIORITIZE_SORTING_ORDER - allocate stocks according to the warehouses' order
+ * within the channel
+ *
+ * PRIORITIZE_HIGH_STOCK - allocate stock in a warehouse with the most stock
+ */
+export enum AllocationStrategyEnum {
+ PrioritizeHighStock = 'PRIORITIZE_HIGH_STOCK',
+ PrioritizeSortingOrder = 'PRIORITIZE_SORTING_ORDER'
+}
+
+/** Represents app data. */
+export type App = Node & ObjectWithMetadata & {
+ __typename?: 'App';
+ /** Description of this app. */
+ aboutApp?: Maybe;
+ /** JWT token used to authenticate by thridparty app. */
+ accessToken?: Maybe;
+ /** URL to iframe with the app. */
+ appUrl?: Maybe;
+ /**
+ * URL to iframe with the configuration for the app.
+ * @deprecated This field will be removed in Saleor 4.0. Use `appUrl` instead.
+ */
+ configurationUrl?: Maybe;
+ /** The date and time when the app was created. */
+ created?: Maybe;
+ /**
+ * Description of the data privacy defined for this app.
+ * @deprecated This field will be removed in Saleor 4.0. Use `dataPrivacyUrl` instead.
+ */
+ dataPrivacy?: Maybe;
+ /** URL to details about the privacy policy on the app owner page. */
+ dataPrivacyUrl?: Maybe;
+ /**
+ * App's dashboard extensions.
+ *
+ * Added in Saleor 3.1.
+ *
+ * Note: this API is currently in Feature Preview and can be subject to changes at later point.
+ */
+ extensions: Array;
+ /** Homepage of the app. */
+ homepageUrl?: Maybe;
+ id: Scalars['ID'];
+ /** Determine if app will be set active or not. */
+ isActive?: Maybe;
+ /**
+ * URL to manifest used during app's installation.
+ *
+ * Added in Saleor 3.5.
+ */
+ manifestUrl?: Maybe;
+ /** List of public metadata items. Can be accessed without permissions. */
+ metadata: Array;
+ /**
+ * A single key from public metadata.
+ *
+ * Tip: Use GraphQL aliases to fetch multiple keys.
+ *
+ * Added in Saleor 3.3.
+ *
+ * Note: this API is currently in Feature Preview and can be subject to changes at later point.
+ */
+ metafield?: Maybe;
+ /**
+ * Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.
+ *
+ * Added in Saleor 3.3.
+ *
+ * Note: this API is currently in Feature Preview and can be subject to changes at later point.
+ */
+ metafields?: Maybe;
+ /** Name of the app. */
+ name?: Maybe;
+ /** List of the app's permissions. */
+ permissions?: Maybe>;
+ /** List of private metadata items. Requires staff permissions to access. */
+ privateMetadata: Array;
+ /**
+ * A single key from private metadata. Requires staff permissions to access.
+ *
+ * Tip: Use GraphQL aliases to fetch multiple keys.
+ *
+ * Added in Saleor 3.3.
+ *
+ * Note: this API is currently in Feature Preview and can be subject to changes at later point.
+ */
+ privateMetafield?: Maybe;
+ /**
+ * Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.
+ *
+ * Added in Saleor 3.3.
+ *
+ * Note: this API is currently in Feature Preview and can be subject to changes at later point.
+ */
+ privateMetafields?: Maybe;
+ /** Support page for the app. */
+ supportUrl?: Maybe;
+ /**
+ * Last 4 characters of the tokens.
+ *
+ * Requires one of the following permissions: MANAGE_APPS, OWNER.
+ */
+ tokens?: Maybe>;
+ /** Type of the app. */
+ type?: Maybe;
+ /** Version number of the app. */
+ version?: Maybe;
+ /**
+ * List of webhooks assigned to this app.
+ *
+ * Requires one of the following permissions: MANAGE_APPS, OWNER.
+ */
+ webhooks?: Maybe>;
+};
+
+
+/** Represents app data. */
+export type AppMetafieldArgs = {
+ key: Scalars['String'];
+};
+
+
+/** Represents app data. */
+export type AppMetafieldsArgs = {
+ keys?: InputMaybe>;
+};
+
+
+/** Represents app data. */
+export type AppPrivateMetafieldArgs = {
+ key: Scalars['String'];
+};
+
+
+/** Represents app data. */
+export type AppPrivateMetafieldsArgs = {
+ keys?: InputMaybe>;
+};
+
+/**
+ * Activate the app.
+ *
+ * Requires one of the following permissions: MANAGE_APPS.
+ */
+export type AppActivate = {
+ __typename?: 'AppActivate';
+ app?: Maybe;
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ appErrors: Array;
+ errors: Array;
+};
+
+export type AppCountableConnection = {
+ __typename?: 'AppCountableConnection';
+ edges: Array;
+ /** Pagination data for this connection. */
+ pageInfo: PageInfo;
+ /** A total count of items in the collection. */
+ totalCount?: Maybe;
+};
+
+export type AppCountableEdge = {
+ __typename?: 'AppCountableEdge';
+ /** A cursor for use in pagination. */
+ cursor: Scalars['String'];
+ /** The item at the end of the edge. */
+ node: App;
+};
+
+/** Creates a new app. Requires the following permissions: AUTHENTICATED_STAFF_USER and MANAGE_APPS. */
+export type AppCreate = {
+ __typename?: 'AppCreate';
+ app?: Maybe;
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ appErrors: Array;
+ /** The newly created authentication token. */
+ authToken?: Maybe;
+ errors: Array;
+};
+
+/**
+ * Deactivate the app.
+ *
+ * Requires one of the following permissions: MANAGE_APPS.
+ */
+export type AppDeactivate = {
+ __typename?: 'AppDeactivate';
+ app?: Maybe;
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ appErrors: Array;
+ errors: Array;
+};
+
+/**
+ * Deletes an app.
+ *
+ * Requires one of the following permissions: MANAGE_APPS.
+ */
+export type AppDelete = {
+ __typename?: 'AppDelete';
+ app?: Maybe;
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ appErrors: Array;
+ errors: Array;
+};
+
+/**
+ * Delete failed installation.
+ *
+ * Requires one of the following permissions: MANAGE_APPS.
+ */
+export type AppDeleteFailedInstallation = {
+ __typename?: 'AppDeleteFailedInstallation';
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ appErrors: Array;
+ appInstallation?: Maybe;
+ errors: Array;
+};
+
+/**
+ * Event sent when app is deleted.
+ *
+ * Added in Saleor 3.4.
+ *
+ * Note: this API is currently in Feature Preview and can be subject to changes at later point.
+ */
+export type AppDeleted = Event & {
+ __typename?: 'AppDeleted';
+ /** The application the event relates to. */
+ app?: Maybe;
+ /** Time of the event. */
+ issuedAt?: Maybe;
+ /** The user or application that triggered the event. */
+ issuingPrincipal?: Maybe;
+ /** The application receiving the webhook. */
+ recipient?: Maybe;
+ /** Saleor version that triggered the event. */
+ version?: Maybe;
+};
+
+export type AppError = {
+ __typename?: 'AppError';
+ /** The error code. */
+ code: AppErrorCode;
+ /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */
+ field?: Maybe;
+ /** The error message. */
+ message?: Maybe;
+ /** List of permissions which causes the error. */
+ permissions?: Maybe>;
+};
+
+/** An enumeration. */
+export enum AppErrorCode {
+ Forbidden = 'FORBIDDEN',
+ GraphqlError = 'GRAPHQL_ERROR',
+ Invalid = 'INVALID',
+ InvalidManifestFormat = 'INVALID_MANIFEST_FORMAT',
+ InvalidPermission = 'INVALID_PERMISSION',
+ InvalidStatus = 'INVALID_STATUS',
+ InvalidUrlFormat = 'INVALID_URL_FORMAT',
+ ManifestUrlCantConnect = 'MANIFEST_URL_CANT_CONNECT',
+ NotFound = 'NOT_FOUND',
+ OutOfScopeApp = 'OUT_OF_SCOPE_APP',
+ OutOfScopePermission = 'OUT_OF_SCOPE_PERMISSION',
+ Required = 'REQUIRED',
+ Unique = 'UNIQUE'
+}
+
+/** Represents app data. */
+export type AppExtension = Node & {
+ __typename?: 'AppExtension';
+ /** JWT token used to authenticate by thridparty app extension. */
+ accessToken?: Maybe;
+ app: App;
+ id: Scalars['ID'];
+ /** Label of the extension to show in the dashboard. */
+ label: Scalars['String'];
+ /** Place where given extension will be mounted. */
+ mount: AppExtensionMountEnum;
+ /** List of the app extension's permissions. */
+ permissions: Array;
+ /** Type of way how app extension will be opened. */
+ target: AppExtensionTargetEnum;
+ /** URL of a view where extension's iframe is placed. */
+ url: Scalars['String'];
+};
+
+export type AppExtensionCountableConnection = {
+ __typename?: 'AppExtensionCountableConnection';
+ edges: Array;
+ /** Pagination data for this connection. */
+ pageInfo: PageInfo;
+ /** A total count of items in the collection. */
+ totalCount?: Maybe;
+};
+
+export type AppExtensionCountableEdge = {
+ __typename?: 'AppExtensionCountableEdge';
+ /** A cursor for use in pagination. */
+ cursor: Scalars['String'];
+ /** The item at the end of the edge. */
+ node: AppExtension;
+};
+
+export type AppExtensionFilterInput = {
+ mount?: InputMaybe>;
+ target?: InputMaybe;
+};
+
+/** All places where app extension can be mounted. */
+export enum AppExtensionMountEnum {
+ CustomerDetailsMoreActions = 'CUSTOMER_DETAILS_MORE_ACTIONS',
+ CustomerOverviewCreate = 'CUSTOMER_OVERVIEW_CREATE',
+ CustomerOverviewMoreActions = 'CUSTOMER_OVERVIEW_MORE_ACTIONS',
+ NavigationCatalog = 'NAVIGATION_CATALOG',
+ NavigationCustomers = 'NAVIGATION_CUSTOMERS',
+ NavigationDiscounts = 'NAVIGATION_DISCOUNTS',
+ NavigationOrders = 'NAVIGATION_ORDERS',
+ NavigationPages = 'NAVIGATION_PAGES',
+ NavigationTranslations = 'NAVIGATION_TRANSLATIONS',
+ OrderDetailsMoreActions = 'ORDER_DETAILS_MORE_ACTIONS',
+ OrderOverviewCreate = 'ORDER_OVERVIEW_CREATE',
+ OrderOverviewMoreActions = 'ORDER_OVERVIEW_MORE_ACTIONS',
+ ProductDetailsMoreActions = 'PRODUCT_DETAILS_MORE_ACTIONS',
+ ProductOverviewCreate = 'PRODUCT_OVERVIEW_CREATE',
+ ProductOverviewMoreActions = 'PRODUCT_OVERVIEW_MORE_ACTIONS'
+}
+
+/**
+ * All available ways of opening an app extension.
+ *
+ * POPUP - app's extension will be mounted as a popup window
+ * APP_PAGE - redirect to app's page
+ */
+export enum AppExtensionTargetEnum {
+ AppPage = 'APP_PAGE',
+ Popup = 'POPUP'
+}
+
+/**
+ * Fetch and validate manifest.
+ *
+ * Requires one of the following permissions: MANAGE_APPS.
+ */
+export type AppFetchManifest = {
+ __typename?: 'AppFetchManifest';
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ appErrors: Array;
+ errors: Array;
+ manifest?: Maybe;
+};
+
+export type AppFilterInput = {
+ isActive?: InputMaybe;
+ search?: InputMaybe;
+ type?: InputMaybe;
+};
+
+export type AppInput = {
+ /** Name of the app. */
+ name?: InputMaybe;
+ /** List of permission code names to assign to this app. */
+ permissions?: InputMaybe>;
+};
+
+/** Install new app by using app manifest. Requires the following permissions: AUTHENTICATED_STAFF_USER and MANAGE_APPS. */
+export type AppInstall = {
+ __typename?: 'AppInstall';
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ appErrors: Array;
+ appInstallation?: Maybe;
+ errors: Array;
+};
+
+export type AppInstallInput = {
+ /** Determine if app will be set active or not. */
+ activateAfterInstallation?: InputMaybe;
+ /** Name of the app to install. */
+ appName?: InputMaybe;
+ /** Url to app's manifest in JSON format. */
+ manifestUrl?: InputMaybe;
+ /** List of permission code names to assign to this app. */
+ permissions?: InputMaybe>;
+};
+
+/** Represents ongoing installation of app. */
+export type AppInstallation = Job & Node & {
+ __typename?: 'AppInstallation';
+ appName: Scalars['String'];
+ /** Created date time of job in ISO 8601 format. */
+ createdAt: Scalars['DateTime'];
+ id: Scalars['ID'];
+ manifestUrl: Scalars['String'];
+ /** Job message. */
+ message?: Maybe;
+ /** Job status. */
+ status: JobStatusEnum;
+ /** Date time of job last update in ISO 8601 format. */
+ updatedAt: Scalars['DateTime'];
+};
+
+/**
+ * Event sent when new app is installed.
+ *
+ * Added in Saleor 3.4.
+ *
+ * Note: this API is currently in Feature Preview and can be subject to changes at later point.
+ */
+export type AppInstalled = Event & {
+ __typename?: 'AppInstalled';
+ /** The application the event relates to. */
+ app?: Maybe;
+ /** Time of the event. */
+ issuedAt?: Maybe;
+ /** The user or application that triggered the event. */
+ issuingPrincipal?: Maybe;
+ /** The application receiving the webhook. */
+ recipient?: Maybe;
+ /** Saleor version that triggered the event. */
+ version?: Maybe;
+};
+
+export type AppManifestExtension = {
+ __typename?: 'AppManifestExtension';
+ /** Label of the extension to show in the dashboard. */
+ label: Scalars['String'];
+ /** Place where given extension will be mounted. */
+ mount: AppExtensionMountEnum;
+ /** List of the app extension's permissions. */
+ permissions: Array;
+ /** Type of way how app extension will be opened. */
+ target: AppExtensionTargetEnum;
+ /** URL of a view where extension's iframe is placed. */
+ url: Scalars['String'];
+};
+
+export type AppManifestWebhook = {
+ __typename?: 'AppManifestWebhook';
+ /** The asynchronous events that webhook wants to subscribe. */
+ asyncEvents?: Maybe>;
+ /** The name of the webhook. */
+ name: Scalars['String'];
+ /** Subscription query of a webhook */
+ query: Scalars['String'];
+ /** The synchronous events that webhook wants to subscribe. */
+ syncEvents?: Maybe>;
+ /** The url to receive the payload. */
+ targetUrl: Scalars['String'];
+};
+
+/**
+ * Retry failed installation of new app.
+ *
+ * Requires one of the following permissions: MANAGE_APPS.
+ */
+export type AppRetryInstall = {
+ __typename?: 'AppRetryInstall';
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ appErrors: Array;
+ appInstallation?: Maybe;
+ errors: Array;
+};
+
+export enum AppSortField {
+ /** Sort apps by creation date. */
+ CreationDate = 'CREATION_DATE',
+ /** Sort apps by name. */
+ Name = 'NAME'
+}
+
+export type AppSortingInput = {
+ /** Specifies the direction in which to sort products. */
+ direction: OrderDirection;
+ /** Sort apps by the selected field. */
+ field: AppSortField;
+};
+
+/**
+ * Event sent when app status has changed.
+ *
+ * Added in Saleor 3.4.
+ *
+ * Note: this API is currently in Feature Preview and can be subject to changes at later point.
+ */
+export type AppStatusChanged = Event & {
+ __typename?: 'AppStatusChanged';
+ /** The application the event relates to. */
+ app?: Maybe;
+ /** Time of the event. */
+ issuedAt?: Maybe;
+ /** The user or application that triggered the event. */
+ issuingPrincipal?: Maybe;
+ /** The application receiving the webhook. */
+ recipient?: Maybe;
+ /** Saleor version that triggered the event. */
+ version?: Maybe;
+};
+
+/** Represents token data. */
+export type AppToken = Node & {
+ __typename?: 'AppToken';
+ /** Last 4 characters of the token. */
+ authToken?: Maybe;
+ id: Scalars['ID'];
+ /** Name of the authenticated token. */
+ name?: Maybe;
+};
+
+/**
+ * Creates a new token.
+ *
+ * Requires one of the following permissions: MANAGE_APPS.
+ */
+export type AppTokenCreate = {
+ __typename?: 'AppTokenCreate';
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ appErrors: Array;
+ appToken?: Maybe;
+ /** The newly created authentication token. */
+ authToken?: Maybe;
+ errors: Array;
+};
+
+/**
+ * Deletes an authentication token assigned to app.
+ *
+ * Requires one of the following permissions: MANAGE_APPS.
+ */
+export type AppTokenDelete = {
+ __typename?: 'AppTokenDelete';
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ appErrors: Array;
+ appToken?: Maybe;
+ errors: Array;
+};
+
+export type AppTokenInput = {
+ /** ID of app. */
+ app: Scalars['ID'];
+ /** Name of the token. */
+ name?: InputMaybe;
+};
+
+/** Verify provided app token. */
+export type AppTokenVerify = {
+ __typename?: 'AppTokenVerify';
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ appErrors: Array;
+ errors: Array;
+ /** Determine if token is valid or not. */
+ valid: Scalars['Boolean'];
+};
+
+/** Enum determining type of your App. */
+export enum AppTypeEnum {
+ /** Local Saleor App. The app is fully manageable from dashboard. You can change assigned permissions, add webhooks, or authentication token */
+ Local = 'LOCAL',
+ /** Third party external App. Installation is fully automated. Saleor uses a defined App manifest to gather all required information. */
+ Thirdparty = 'THIRDPARTY'
+}
+
+/**
+ * Updates an existing app.
+ *
+ * Requires one of the following permissions: MANAGE_APPS.
+ */
+export type AppUpdate = {
+ __typename?: 'AppUpdate';
+ app?: Maybe;
+ /** @deprecated This field will be removed in Saleor 4.0. Use `errors` field instead. */
+ appErrors: Array;
+ errors: Array;
+};
+
+/**
+ * Event sent when app is updated.
+ *
+ * Added in Saleor 3.4.
+ *
+ * Note: this API is currently in Feature Preview and can be subject to changes at later point.
+ */
+export type AppUpdated = Event & {
+ __typename?: 'AppUpdated';
+ /** The application the event relates to. */
+ app?: Maybe;
+ /** Time of the event. */
+ issuedAt?: Maybe;
+ /** The user or application that triggered the event. */
+ issuingPrincipal?: Maybe;
+ /** The application receiving the webhook. */
+ recipient?: Maybe;
+ /** Saleor version that triggered the event. */
+ version?: Maybe;
+};
+
+/** An enumeration. */
+export enum AreaUnitsEnum {
+ SqCm = 'SQ_CM',
+ SqFt = 'SQ_FT',
+ SqInch = 'SQ_INCH',
+ SqKm = 'SQ_KM',
+ SqM = 'SQ_M',
+ SqYd = 'SQ_YD'
+}
+
+/**
+ * Assigns storefront's navigation menus.
+ *
+ * Requires one of the following permissions: MANAGE_MENUS, MANAGE_SETTINGS.
+ */
+export type AssignNavigation = {
+ __typename?: 'AssignNavigation';
+ errors: Array;
+ /** Assigned navigation menu. */
+ menu?: Maybe