Add product search (#64)
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import { Category } from './category-types';
|
||||
import { Designer } from './designer-types';
|
||||
import { Keyword } from './keyword-types';
|
||||
import { Maybe, PaginationInput, PaginationResult } from './types';
|
||||
|
||||
// Mutation inputs
|
||||
@@ -45,6 +48,14 @@ export interface ProductsFilter {
|
||||
browsable?: boolean;
|
||||
}
|
||||
|
||||
export interface ProductsSearchResult {
|
||||
q: string;
|
||||
products: Promise<Array<Product>>;
|
||||
batches: Promise<Array<Batch>>;
|
||||
keywords: Promise<Array<Keyword>>;
|
||||
categories: Promise<Array<Category>>;
|
||||
designers: Promise<Array<Designer>>;
|
||||
}
|
||||
export interface ProductListResult {
|
||||
pagination: PaginationResult;
|
||||
items: Array<Product> | Promise<Array<Product>>;
|
||||
@@ -112,6 +123,11 @@ export interface PrintProduct {
|
||||
updated?: Date;
|
||||
}
|
||||
|
||||
export interface Batch {
|
||||
name: string;
|
||||
products: Promise<Array<Product>>;
|
||||
}
|
||||
|
||||
export interface Product {
|
||||
id: number;
|
||||
stockid: number;
|
||||
|
||||
Reference in New Issue
Block a user