mirror of
https://github.com/KevinMidboe/planetposen-frontend.git
synced 2025-10-29 13:10:12 +00:00
Updated interfaces
This commit is contained in:
@@ -2,6 +2,7 @@ import type { IProduct } from './IProduct';
|
|||||||
import type { IOrder, IOrderSummary } from './IOrder';
|
import type { IOrder, IOrderSummary } from './IOrder';
|
||||||
import type ICustomer from './ICustomer';
|
import type ICustomer from './ICustomer';
|
||||||
import type ICart from './ICart';
|
import type ICart from './ICart';
|
||||||
|
import type IOrderValidationError from './IOrderValidationError';
|
||||||
|
|
||||||
export interface IProductResponse {
|
export interface IProductResponse {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
@@ -37,3 +38,15 @@ export interface ICartDTO {
|
|||||||
cart: ICart[];
|
cart: ICart[];
|
||||||
success: boolean;
|
success: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IOrderCreateUnsuccessfullResponse {
|
||||||
|
success: boolean;
|
||||||
|
validationErrors: IOrderValidationError[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IOrderCreateResponse {
|
||||||
|
success: boolean;
|
||||||
|
customer_no: string;
|
||||||
|
order_id: string;
|
||||||
|
validationErrors?: IOrderValidationError[];
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
enum BadgeType {
|
enum BadgeType {
|
||||||
SUCCESS = 'success',
|
SUCCESS = 'SUCCESS',
|
||||||
WARNING = 'warning',
|
WARNING = 'WARNING',
|
||||||
ERROR = 'error',
|
REFUNDED = 'REFUNDED',
|
||||||
PENDING = 'pending',
|
ERROR = 'ERROR',
|
||||||
INFO = 'info'
|
PENDING = 'PENDING',
|
||||||
|
INFO = 'INFO',
|
||||||
|
INITIATED = 'INITIATED',
|
||||||
|
NOT_FOUND = 'NOT_FOUND'
|
||||||
}
|
}
|
||||||
|
|
||||||
export default BadgeType;
|
export default BadgeType;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export default interface ICart {
|
export default interface ICart {
|
||||||
client_id: string;
|
planet_id: string;
|
||||||
cart_id: number;
|
cart_id: number;
|
||||||
lineitem_id: number;
|
lineitem_id: number;
|
||||||
quantity: number;
|
quantity: number;
|
||||||
|
|||||||
@@ -2,11 +2,6 @@
|
|||||||
// import type BadgeType from './BadgeType';
|
// import type BadgeType from './BadgeType';
|
||||||
import type ICustomer from './ICustomer';
|
import type ICustomer from './ICustomer';
|
||||||
|
|
||||||
export interface IStripePayment {
|
|
||||||
amount: number;
|
|
||||||
currency: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IOrderSummary {
|
export interface IOrderSummary {
|
||||||
created: Date;
|
created: Date;
|
||||||
email: string;
|
email: string;
|
||||||
@@ -22,6 +17,7 @@ export interface IOrder {
|
|||||||
lineItems: ILineItem[];
|
lineItems: ILineItem[];
|
||||||
orderid: string;
|
orderid: string;
|
||||||
shipping: IShipping;
|
shipping: IShipping;
|
||||||
|
payment: IStripePayment;
|
||||||
status: string;
|
status: string;
|
||||||
updated?: Date;
|
updated?: Date;
|
||||||
created?: Date;
|
created?: Date;
|
||||||
@@ -41,6 +37,7 @@ export interface IShipping {
|
|||||||
tracking_code: string;
|
tracking_code: string;
|
||||||
tracking_link: string;
|
tracking_link: string;
|
||||||
user_notified: null;
|
user_notified: null;
|
||||||
|
has_api: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IOrdersLineitem {
|
export interface IOrdersLineitem {
|
||||||
@@ -59,3 +56,15 @@ export interface ITracking {
|
|||||||
trackingCompany: string;
|
trackingCompany: string;
|
||||||
trackingLink: string;
|
trackingLink: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IStripePayment {
|
||||||
|
amount: number;
|
||||||
|
amount_captured: number;
|
||||||
|
amount_received: number;
|
||||||
|
amount_refunded: number;
|
||||||
|
created: Date;
|
||||||
|
stripe_transaction_id: string;
|
||||||
|
stripe_status: string;
|
||||||
|
type: string;
|
||||||
|
updated: Date;
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ export interface IProduct {
|
|||||||
name: string;
|
name: string;
|
||||||
subtext?: string;
|
subtext?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
image: string;
|
images?: IImage[];
|
||||||
primary_color?: string;
|
primary_color?: string;
|
||||||
|
|
||||||
variation_count?: string;
|
variation_count?: string;
|
||||||
@@ -23,3 +23,9 @@ export interface IVariation {
|
|||||||
updated?: Date;
|
updated?: Date;
|
||||||
created?: Date;
|
created?: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IImage {
|
||||||
|
image_id: number;
|
||||||
|
url: string;
|
||||||
|
default_image: boolean;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user