P5 7619 refactor products to return list (#11)
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
import { PaginationResult } from './types';
|
||||
|
||||
export interface OrdersResult {
|
||||
pagination: PaginationResult;
|
||||
items: Array<Order> | Promise<Array<Order>>;
|
||||
}
|
||||
|
||||
export interface Address {
|
||||
id: number;
|
||||
firstname: string;
|
||||
|
||||
@@ -1,3 +1,19 @@
|
||||
import { PaginationInput, PaginationResult } from './types';
|
||||
|
||||
export interface ProductsFilterInput {
|
||||
pagination: PaginationInput;
|
||||
filter?: ProductsFilter;
|
||||
}
|
||||
export interface ProductsFilter {
|
||||
visible?: boolean;
|
||||
browsable?: boolean;
|
||||
}
|
||||
|
||||
export interface ProductListResult {
|
||||
pagination: PaginationResult;
|
||||
items: Array<Product> | Promise<Array<Product>>;
|
||||
}
|
||||
|
||||
export enum ProductGroup {
|
||||
PHOTO_WALLPAPER = 1,
|
||||
CANVAS = 2,
|
||||
|
||||
+15
-5
@@ -1,16 +1,26 @@
|
||||
export type Maybe<T> = T | undefined;
|
||||
|
||||
export interface PaginationInput {
|
||||
limit: number;
|
||||
offset?: number;
|
||||
}
|
||||
|
||||
export interface DateInput {
|
||||
from: Date;
|
||||
to: Date;
|
||||
}
|
||||
|
||||
export interface GeneralInput {
|
||||
export interface DateFilterInput {
|
||||
dates: DateInput;
|
||||
limit: number;
|
||||
offset: number;
|
||||
}
|
||||
|
||||
export interface FilterInput {
|
||||
filter: GeneralInput;
|
||||
export interface GeneralInput {
|
||||
pagination: PaginationInput;
|
||||
filter?: DateFilterInput;
|
||||
}
|
||||
|
||||
export interface PaginationResult {
|
||||
total: Promise<number> | number;
|
||||
offset: number;
|
||||
limit: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user