mirror of
https://github.com/vercel/commerce.git
synced 2025-05-18 15:36:58 +00:00
229 lines
5.0 KiB
TypeScript
229 lines
5.0 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* This file was automatically generated by Payload.
|
|
* DO NOT MODIFY IT BY HAND. Instead, modify your source Payload config,
|
|
* and re-run `payload generate:types` to regenerate this file.
|
|
*/
|
|
|
|
export interface Config {
|
|
collections: {
|
|
posts: Post;
|
|
categories: Category;
|
|
media: Media;
|
|
users: User;
|
|
options: Option;
|
|
products: Product;
|
|
carts: Cart;
|
|
'payload-preferences': PayloadPreference;
|
|
'payload-migrations': PayloadMigration;
|
|
};
|
|
globals: {};
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "posts".
|
|
*/
|
|
export interface Post {
|
|
id: string;
|
|
title: string;
|
|
summary?: string | null;
|
|
content?: {
|
|
root: {
|
|
type: string;
|
|
children: {
|
|
type: string;
|
|
version: number;
|
|
[k: string]: unknown;
|
|
}[];
|
|
direction: ('ltr' | 'rtl') | null;
|
|
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
|
|
indent: number;
|
|
version: number;
|
|
};
|
|
[k: string]: unknown;
|
|
} | null;
|
|
categories?: (string | Category)[] | null;
|
|
publishedAt?: string | null;
|
|
authors?: (string | User)[] | null;
|
|
populatedAuthors?:
|
|
| {
|
|
id?: string | null;
|
|
name?: string | null;
|
|
}[]
|
|
| null;
|
|
slug?: string | null;
|
|
meta?: {
|
|
title?: string | null;
|
|
description?: string | null;
|
|
image?: string | Media | null;
|
|
};
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "categories".
|
|
*/
|
|
export interface Category {
|
|
id: string;
|
|
title: string;
|
|
description?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "users".
|
|
*/
|
|
export interface User {
|
|
id: string;
|
|
name?: string | null;
|
|
roles?: ('admin' | 'user')[] | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
email: string;
|
|
resetPasswordToken?: string | null;
|
|
resetPasswordExpiration?: string | null;
|
|
salt?: string | null;
|
|
hash?: string | null;
|
|
loginAttempts?: number | null;
|
|
lockUntil?: string | null;
|
|
password: string | null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "media".
|
|
*/
|
|
export interface Media {
|
|
id: string;
|
|
alt: string;
|
|
caption?: {
|
|
root: {
|
|
type: string;
|
|
children: {
|
|
type: string;
|
|
version: number;
|
|
[k: string]: unknown;
|
|
}[];
|
|
direction: ('ltr' | 'rtl') | null;
|
|
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
|
|
indent: number;
|
|
version: number;
|
|
};
|
|
[k: string]: unknown;
|
|
} | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
url?: string | null;
|
|
filename?: string | null;
|
|
mimeType?: string | null;
|
|
filesize?: number | null;
|
|
width?: number | null;
|
|
height?: number | null;
|
|
focalX?: number | null;
|
|
focalY?: number | null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "options".
|
|
*/
|
|
export interface Option {
|
|
id: string;
|
|
name: string;
|
|
values: {
|
|
value: string;
|
|
label: string;
|
|
id?: string | null;
|
|
}[];
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "products".
|
|
*/
|
|
export interface Product {
|
|
id: string;
|
|
title: string;
|
|
disabled?: boolean | null;
|
|
description: string;
|
|
media: string | Media;
|
|
variants: {
|
|
price: {
|
|
amount: number;
|
|
currencyCode: 'eur';
|
|
stripePriceID?: string | null;
|
|
};
|
|
selectedOptions?:
|
|
| {
|
|
option: string | Option;
|
|
value: string;
|
|
id?: string | null;
|
|
}[]
|
|
| null;
|
|
id?: string | null;
|
|
}[];
|
|
categories?: (string | Category)[] | null;
|
|
tags?: string[] | null;
|
|
stripeProductID?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "carts".
|
|
*/
|
|
export interface Cart {
|
|
id: string;
|
|
totalAmount?: number | null;
|
|
totalTaxAmount?: number | null;
|
|
currencyCode?: string | null;
|
|
totalQuantity?: number | null;
|
|
user?: (string | null) | User;
|
|
lines?:
|
|
| {
|
|
product: string | Product;
|
|
variant: string;
|
|
quantity: number;
|
|
id?: string | null;
|
|
}[]
|
|
| null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "payload-preferences".
|
|
*/
|
|
export interface PayloadPreference {
|
|
id: string;
|
|
user: {
|
|
relationTo: 'users';
|
|
value: string | User;
|
|
};
|
|
key?: string | null;
|
|
value?:
|
|
| {
|
|
[k: string]: unknown;
|
|
}
|
|
| unknown[]
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "payload-migrations".
|
|
*/
|
|
export interface PayloadMigration {
|
|
id: string;
|
|
name?: string | null;
|
|
batch?: number | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|