Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
197 changes: 197 additions & 0 deletions admin-ui/src/gql/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,36 @@ export type IGeoPosition = {
longitude: Scalars['Float']['output'];
};

export type IGlobalSearchResponse = {
counts: Array<IGlobalSearchTypeCount>;
results: Array<IGlobalSearchResult>;
};

export type IGlobalSearchResult =
| IAssortment
| IBundleProduct
| IConfigurableProduct
| IEnrollment
| IFilter
| IOrder
| IPlanProduct
| IQuotation
| ISimpleProduct
| ITokenizedProduct
| IUser
| IWork;

export type IGlobalSearchTypeCount = {
authorized: Scalars['Boolean']['output'];
totalCount: Scalars['Int']['output'];
type: ISearchableEntity;
};

export type IGlobalSearchTypeLimitInput = {
limit: Scalars['Int']['input'];
type: ISearchableEntity;
};

export type ILanguage = {
_id: Scalars['ID']['output'];
isActive?: Maybe<Scalars['Boolean']['output']>;
Expand Down Expand Up @@ -2833,6 +2863,8 @@ export type IQuery = {
filters: Array<IFilter>;
/** Returns total number of filters */
filtersCount: Scalars['Int']['output'];
/** Search across multiple entity types in a single request */
globalSearch: IGlobalSearchResponse;
/** User impersonating currently logged in user */
impersonator?: Maybe<IUser>;
/** Get a specific language */
Expand Down Expand Up @@ -3072,6 +3104,18 @@ export type IQueryFiltersCountArgs = {
queryString?: InputMaybe<Scalars['String']['input']>;
};

export type IQueryGlobalSearchArgs = {
includeCarts?: InputMaybe<Scalars['Boolean']['input']>;
includeDraftProducts?: InputMaybe<Scalars['Boolean']['input']>;
includeGuestUsers?: InputMaybe<Scalars['Boolean']['input']>;
includeInactiveAssortments?: InputMaybe<Scalars['Boolean']['input']>;
includeInactiveFilters?: InputMaybe<Scalars['Boolean']['input']>;
limit?: InputMaybe<Scalars['Int']['input']>;
query: Scalars['String']['input'];
typeLimits?: InputMaybe<Array<IGlobalSearchTypeLimitInput>>;
types?: InputMaybe<Array<ISearchableEntity>>;
};

export type IQueryLanguageArgs = {
languageId: Scalars['ID']['input'];
};
Expand Down Expand Up @@ -3521,6 +3565,17 @@ export type ISearchResultProductsArgs = {
offset?: InputMaybe<Scalars['Int']['input']>;
};

export enum ISearchableEntity {
Assortment = 'ASSORTMENT',
Enrollment = 'ENROLLMENT',
Filter = 'FILTER',
Order = 'ORDER',
Product = 'PRODUCT',
Quotation = 'QUOTATION',
User = 'USER',
Work = 'WORK',
}

export type IShop = {
_id: Scalars['ID']['output'];
adminUiConfig: IAdminUiConfig;
Expand Down Expand Up @@ -15792,6 +15847,148 @@ export type IVerifyQuotationMutation = {
};
};

type IGlobalSearchProductFragment_BundleProduct = {
__typename: 'BundleProduct';
_id: string;
texts?: { _id: string; title?: string | null; slug?: string | null } | null;
media: Array<{ file?: { url?: string | null } | null }>;
};

type IGlobalSearchProductFragment_ConfigurableProduct = {
__typename: 'ConfigurableProduct';
_id: string;
texts?: { _id: string; title?: string | null; slug?: string | null } | null;
media: Array<{ file?: { url?: string | null } | null }>;
};

type IGlobalSearchProductFragment_PlanProduct = {
__typename: 'PlanProduct';
_id: string;
texts?: { _id: string; title?: string | null; slug?: string | null } | null;
media: Array<{ file?: { url?: string | null } | null }>;
};

type IGlobalSearchProductFragment_SimpleProduct = {
__typename: 'SimpleProduct';
_id: string;
texts?: { _id: string; title?: string | null; slug?: string | null } | null;
media: Array<{ file?: { url?: string | null } | null }>;
};

type IGlobalSearchProductFragment_TokenizedProduct = {
__typename: 'TokenizedProduct';
_id: string;
texts?: { _id: string; title?: string | null; slug?: string | null } | null;
media: Array<{ file?: { url?: string | null } | null }>;
};

export type IGlobalSearchProductFragment =
| IGlobalSearchProductFragment_BundleProduct
| IGlobalSearchProductFragment_ConfigurableProduct
| IGlobalSearchProductFragment_PlanProduct
| IGlobalSearchProductFragment_SimpleProduct
| IGlobalSearchProductFragment_TokenizedProduct;

export type IGlobalSearchProductFragmentVariables = Exact<{
[key: string]: never;
}>;

export type IGlobalSearchQueryVariables = Exact<{
query: Scalars['String']['input'];
types?: InputMaybe<Array<ISearchableEntity>>;
limit?: InputMaybe<Scalars['Int']['input']>;
includeDraftProducts?: InputMaybe<Scalars['Boolean']['input']>;
includeInactiveAssortments?: InputMaybe<Scalars['Boolean']['input']>;
includeInactiveFilters?: InputMaybe<Scalars['Boolean']['input']>;
includeGuestUsers?: InputMaybe<Scalars['Boolean']['input']>;
includeCarts?: InputMaybe<Scalars['Boolean']['input']>;
}>;

export type IGlobalSearchQuery = {
globalSearch: {
counts: Array<{
type: ISearchableEntity;
totalCount: number;
authorized: boolean;
}>;
results: Array<
| {
__typename: 'Assortment';
_id: string;
texts?: {
_id: string;
title?: string | null;
slug?: string | null;
} | null;
media: Array<{ file?: { url?: string | null } | null }>;
}
| {
__typename: 'BundleProduct';
_id: string;
texts?: {
_id: string;
title?: string | null;
slug?: string | null;
} | null;
media: Array<{ file?: { url?: string | null } | null }>;
}
| {
__typename: 'ConfigurableProduct';
_id: string;
texts?: {
_id: string;
title?: string | null;
slug?: string | null;
} | null;
media: Array<{ file?: { url?: string | null } | null }>;
}
| { __typename: 'Enrollment'; _id: string }
| { __typename: 'Filter'; _id: string; key?: string | null }
| { __typename: 'Order'; _id: string; orderNumber?: string | null }
| {
__typename: 'PlanProduct';
_id: string;
texts?: {
_id: string;
title?: string | null;
slug?: string | null;
} | null;
media: Array<{ file?: { url?: string | null } | null }>;
}
| { __typename: 'Quotation'; _id: string }
| {
__typename: 'SimpleProduct';
_id: string;
texts?: {
_id: string;
title?: string | null;
slug?: string | null;
} | null;
media: Array<{ file?: { url?: string | null } | null }>;
}
| {
__typename: 'TokenizedProduct';
_id: string;
texts?: {
_id: string;
title?: string | null;
slug?: string | null;
} | null;
media: Array<{ file?: { url?: string | null } | null }>;
}
| {
__typename: 'User';
_id: string;
username?: string | null;
name: string;
emails?: Array<{ address: string; verified: boolean }> | null;
avatar?: { url?: string | null } | null;
}
| { __typename: 'Work'; _id: string; type: IWorkType }
>;
};
};

export type IInvalidateTokenMutationVariables = Exact<{
tokenId: Scalars['ID']['input'];
}>;
Expand Down
5 changes: 5 additions & 0 deletions admin-ui/src/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,9 @@
"go_back": "Zurück",
"go_back_home": "Zurück zur Startseite",
"go_to_login": "Zur Anmeldung",
"global_search_error": "Suche fehlgeschlagen. Bitte erneut versuchen.",
"global_search_hint": "Mindestens 2 Zeichen eingeben",
"global_search_placeholder": "Produkte, Bestellungen, Benutzer suchen...",
"goodbye_simple": "Auf Wiedersehen\\!",
"goodbye_user": "Auf Wiedersehen, {name}\\!",
"gross_price": "Brutto",
Expand Down Expand Up @@ -521,6 +524,7 @@
"no_orders_title": "Noch keine Bestellungen",
"no_payload": "Payload",
"no_result_found": "Kein Ergebnis gefunden",
"no_results_found": "Keine Ergebnisse gefunden",
"no_tag": "Kein Tag",
"no_variations_configured": "Noch keine Variationen konfiguriert. Bitte fügen Sie zuerst Variationen und deren Optionen im Variationen-Tab hinzu.",
"non_taxable": "Nicht steuerpflichtig",
Expand Down Expand Up @@ -986,6 +990,7 @@
"worker.noStatistics": "Keine Statistiken verfügbar",
"worker.startCount": "Start",
"worker.successCount": "Erfolgreich",
"work": "Arbeit",
"workers": "Arbeiter",
"ordered": "Bestellt",
"registered": "Eingetragen",
Expand Down
5 changes: 5 additions & 0 deletions admin-ui/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,9 @@
"go_back": "Go Back",
"go_back_home": "Go back home",
"go_to_login": "Go to Login",
"global_search_error": "Search failed. Please try again.",
"global_search_hint": "Type at least 2 characters to search",
"global_search_placeholder": "Search products, orders, users...",
"goodbye_simple": "Goodbye!",
"goodbye_user": "See you later, {name}!",
"gross_price": "Gross",
Expand Down Expand Up @@ -597,6 +600,7 @@
"no_payload": "Payload",
"no_price": "N/A",
"no_result_found": "No result found",
"no_results_found": "No results found",
"no_retries": "No retries",
"no_statistics_available": "No statistics available",
"no_tag": "No Tag",
Expand Down Expand Up @@ -1060,6 +1064,7 @@
"worker.startCount": "Start",
"worker.successCount": "Success",
"worker_dynamic": "{worker}",
"work": "Work",
"workers": "Workers",
"write_review": "Write a Review"
}
Loading