saleor-dashboard/src/home/fixtures.ts

437 lines
11 KiB
TypeScript
Raw Normal View History

// @ts-strict-ignore
import { HomeQuery, OrderEventsEnum } from "@dashboard/graphql";
2019-06-19 14:40:52 +00:00
Use graphql-codegen (#1874) * Use generated hooks in apps * Remove unused files * Use proper types in apps * Use generated hooks in attributes * Use generated hooks in auth module * Use generated hooks in categories * Use generated hooks in channels * Use generated types in collections * Remove legacy types from background tasks * Use generated hooks in customers * Use generated hooks in discounts * Use generated hook in file upload * Use generated types in gift cards * Use generated types in home * Use generated hooks in navigation * Use generated hooks in orders * Use generated hooks in pages * Use generated hooks in page types * Use generated hooks in permission groups * Use generated hooks in plugins * Use generated hooks in products * Use fragment to mark product variants * Improve code a bit * Use generated hooks in page types * Use generated types in searches * Use generated hooks in shipping * Use generated hooks in site settings * Use generated hooks in staff members * Use generated hooks in taxes * Place all gql generated files in one directory * Use generated hooks in translations * Use global types from new generated module * Use generated hooks in warehouses * Use generated hooks in webhooks * Use generated fragment types * Unclutter types * Remove hoc components * Split hooks and types * Fetch introspection file * Delete obsolete schema file * Fix rebase artifacts * Fix autoreplace * Fix auth provider tests * Fix urls * Remove leftover types * Fix rebase artifacts
2022-03-09 08:56:55 +00:00
export const shop: (placeholderImage: string) => HomeQuery = (
placeholderImage: string,
2019-06-19 14:40:52 +00:00
) => ({
Use graphql-codegen (#1874) * Use generated hooks in apps * Remove unused files * Use proper types in apps * Use generated hooks in attributes * Use generated hooks in auth module * Use generated hooks in categories * Use generated hooks in channels * Use generated types in collections * Remove legacy types from background tasks * Use generated hooks in customers * Use generated hooks in discounts * Use generated hook in file upload * Use generated types in gift cards * Use generated types in home * Use generated hooks in navigation * Use generated hooks in orders * Use generated hooks in pages * Use generated hooks in page types * Use generated hooks in permission groups * Use generated hooks in plugins * Use generated hooks in products * Use fragment to mark product variants * Improve code a bit * Use generated hooks in page types * Use generated types in searches * Use generated hooks in shipping * Use generated hooks in site settings * Use generated hooks in staff members * Use generated hooks in taxes * Place all gql generated files in one directory * Use generated hooks in translations * Use global types from new generated module * Use generated hooks in warehouses * Use generated hooks in webhooks * Use generated fragment types * Unclutter types * Remove hoc components * Split hooks and types * Fetch introspection file * Delete obsolete schema file * Fix rebase artifacts * Fix autoreplace * Fix auth provider tests * Fix urls * Remove leftover types * Fix rebase artifacts
2022-03-09 08:56:55 +00:00
__typename: "Query",
2019-06-19 14:40:52 +00:00
activities: {
__typename: "OrderEventCountableConnection",
edges: [
{
__typename: "OrderEventCountableEdge",
node: {
__typename: "OrderEvent",
amount: null,
composedId: null,
date: "2018-09-14T16:10:27.137126+00:00",
email: null,
emailType: null,
id: "T3JkZXJFdmVudDoxOA==",
message: null,
orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEventsEnum.PLACED_FROM_DRAFT,
user: {
__typename: "User",
email: "admin@example.com",
id: "VXNlcjoyMQ==",
},
},
2019-06-19 14:40:52 +00:00
},
{
__typename: "OrderEventCountableEdge",
node: {
__typename: "OrderEvent",
amount: null,
composedId: null,
date: "2018-10-03T13:28:46.325279+00:00",
email: null,
emailType: null,
id: "T3JkZXJFdmVudDozNQ==",
message: null,
orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEventsEnum.PLACED,
user: null,
},
2019-06-19 14:40:52 +00:00
},
{
__typename: "OrderEventCountableEdge",
node: {
__typename: "OrderEvent",
amount: null,
composedId: null,
date: "2018-10-03T13:29:01.837496+00:00",
email: null,
emailType: null,
id: "T3JkZXJFdmVudDozNw==",
message: null,
orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEventsEnum.ORDER_FULLY_PAID,
user: null,
},
2019-06-19 14:40:52 +00:00
},
{
__typename: "OrderEventCountableEdge",
node: {
__typename: "OrderEvent",
amount: null,
composedId: null,
date: "2018-10-04T01:01:51.243723+00:00",
email: null,
emailType: null,
id: "T3JkZXJFdmVudDo1OA==",
message: null,
orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEventsEnum.PLACED_FROM_DRAFT,
user: {
__typename: "User",
email: "admin@example.com",
id: "VXNlcjoyMQ==",
},
},
2019-06-19 14:40:52 +00:00
},
{
__typename: "OrderEventCountableEdge",
node: {
__typename: "OrderEvent",
amount: null,
composedId: null,
date: "2018-10-04T19:36:18.831561+00:00",
email: null,
emailType: null,
id: "T3JkZXJFdmVudDo2Nw==",
message: null,
orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEventsEnum.PLACED_FROM_DRAFT,
user: {
__typename: "User",
email: "admin@example.com",
id: "VXNlcjoyMQ==",
},
},
2019-06-19 14:40:52 +00:00
},
{
__typename: "OrderEventCountableEdge",
node: {
__typename: "OrderEvent",
amount: null,
composedId: null,
date: "2018-10-04T19:38:01.420365+00:00",
email: null,
emailType: null,
id: "T3JkZXJFdmVudDo2OA==",
message: null,
orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEventsEnum.PLACED_FROM_DRAFT,
user: {
__typename: "User",
email: "admin@example.com",
id: "VXNlcjoyMQ==",
},
},
2019-06-19 14:40:52 +00:00
},
{
__typename: "OrderEventCountableEdge",
node: {
__typename: "OrderEvent",
amount: null,
composedId: null,
date: "2018-10-05T12:30:57.268592+00:00",
email: null,
emailType: null,
id: "T3JkZXJFdmVudDo3MQ==",
message: null,
orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEventsEnum.PLACED_FROM_DRAFT,
user: {
__typename: "User",
email: "admin@example.com",
id: "VXNlcjoyMQ==",
},
},
2019-06-19 14:40:52 +00:00
},
{
__typename: "OrderEventCountableEdge",
node: {
__typename: "OrderEvent",
amount: null,
composedId: null,
date: "2018-10-08T09:50:42.622253+00:00",
email: null,
emailType: null,
id: "T3JkZXJFdmVudDo3Mw==",
message: null,
orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEventsEnum.PLACED,
user: null,
},
2019-06-19 14:40:52 +00:00
},
{
__typename: "OrderEventCountableEdge",
node: {
__typename: "OrderEvent",
amount: null,
composedId: null,
date: "2018-10-12T15:51:11.665838+00:00",
email: null,
emailType: null,
id: "T3JkZXJFdmVudDo3Nw==",
message: null,
orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEventsEnum.PLACED_FROM_DRAFT,
user: {
__typename: "User",
email: "admin@example.com",
id: "VXNlcjoyMQ==",
},
},
2019-06-19 14:40:52 +00:00
},
{
__typename: "OrderEventCountableEdge",
node: {
__typename: "OrderEvent",
amount: null,
composedId: null,
date: "2018-10-12T15:51:11.665838+00:00",
email: null,
emailType: null,
id: "T3JkZXJFdmVudDo3Nw==",
message: null,
orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEventsEnum.PLACED_FROM_DRAFT,
user: {
__typename: "User",
email: null,
id: "VXNlcjoyMQ==",
},
},
},
2019-06-19 14:40:52 +00:00
{
__typename: "OrderEventCountableEdge",
node: {
__typename: "OrderEvent",
amount: null,
composedId: null,
date: "2018-10-25T11:25:58.843860+00:00",
email: null,
emailType: null,
id: "T3JkZXJFdmVudDo3OA==",
message: null,
orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEventsEnum.PLACED,
user: null,
},
2019-06-19 14:40:52 +00:00
},
{
__typename: "OrderEventCountableEdge",
node: {
__typename: "OrderEvent",
amount: null,
composedId: null,
date: "2018-10-26T09:34:57.580167+00:00",
email: null,
emailType: null,
id: "T3JkZXJFdmVudDo4MA==",
message: null,
orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEventsEnum.PLACED,
user: null,
},
2019-06-19 14:40:52 +00:00
},
{
__typename: "OrderEventCountableEdge",
node: {
__typename: "OrderEvent",
amount: null,
composedId: null,
date: "2018-10-26T09:38:02.440061+00:00",
email: null,
emailType: null,
id: "T3JkZXJFdmVudDo4Mg==",
message: null,
orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEventsEnum.ORDER_FULLY_PAID,
user: null,
},
2019-06-19 14:40:52 +00:00
},
{
__typename: "OrderEventCountableEdge",
node: {
__typename: "OrderEvent",
amount: null,
composedId: null,
date: "2018-10-26T09:38:02.467443+00:00",
email: null,
emailType: null,
id: "T3JkZXJFdmVudDo4NA==",
message: null,
orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEventsEnum.ORDER_FULLY_PAID,
user: null,
},
},
],
2019-06-19 14:40:52 +00:00
},
ordersToCapture: {
__typename: "OrderCountableConnection",
totalCount: 0,
2019-06-19 14:40:52 +00:00
},
ordersToFulfill: {
__typename: "OrderCountableConnection",
totalCount: 1,
2019-06-19 14:40:52 +00:00
},
ordersToday: {
__typename: "OrderCountableConnection",
totalCount: 1,
2019-06-19 14:40:52 +00:00
},
productTopToday: {
__typename: "ProductVariantCountableConnection",
edges: [
{
__typename: "ProductVariantCountableEdge",
node: {
__typename: "ProductVariant",
attributes: [
{
__typename: "SelectedAttribute",
2020-01-09 11:13:24 +00:00
values: [
{
__typename: "AttributeValue",
id: "QXR0cmlidXRlVmFsdWU6OTI=",
2023-07-18 10:01:15 +00:00
name: "XL",
sortOrder: 0,
},
],
},
2019-06-19 14:40:52 +00:00
],
id: "UHJvZHVjdFZhcmlhbnQ6NDM=",
product: {
__typename: "Product",
id: "UHJvZHVjdDo4",
2023-07-18 10:01:15 +00:00
name: "Black Hoodie",
thumbnail: {
__typename: "Image",
url: placeholderImage,
},
},
quantityOrdered: 1,
revenue: {
__typename: "TaxedMoney",
gross: {
__typename: "Money",
amount: 37.65,
currency: "USD",
},
},
},
},
{
__typename: "ProductVariantCountableEdge",
node: {
__typename: "ProductVariant",
attributes: [
{
__typename: "SelectedAttribute",
values: [
{
__typename: "AttributeValue",
id: "QXR0cmlidXRlVmFsdWU6OTI2=",
name: "2l",
sortOrder: 0,
},
],
},
],
id: "UHJvZHVjdFZhcmlhbnQ6NDM=2",
product: {
__typename: "Product",
id: "UHJvZHVjdDo4",
name: "Bean Juice",
thumbnail: {
__typename: "Image",
url: placeholderImage,
},
},
quantityOrdered: 1,
revenue: {
__typename: "TaxedMoney",
gross: {
__typename: "Money",
amount: 37.65,
currency: "USD",
},
},
},
},
{
__typename: "ProductVariantCountableEdge",
node: {
__typename: "ProductVariant",
attributes: [
{
__typename: "SelectedAttribute",
values: [
{
__typename: "AttributeValue",
id: "QXR0cmlidXRlVmFsdWU6OTI=3",
name: "L",
sortOrder: 0,
},
],
},
],
id: "UHJvZHVjdFZhcmlhbnQ6NDM=3",
product: {
__typename: "Product",
id: "UHJvZHVjdDo4",
name: "Black Hoodie",
2019-06-19 14:40:52 +00:00
thumbnail: {
__typename: "Image",
url: placeholderImage,
},
2019-06-19 14:40:52 +00:00
},
quantityOrdered: 1,
revenue: {
__typename: "TaxedMoney",
gross: {
__typename: "Money",
amount: 37.65,
currency: "USD",
},
},
},
},
],
2019-06-19 14:40:52 +00:00
},
productsOutOfStock: {
__typename: "ProductCountableConnection",
totalCount: 0,
2019-06-19 14:40:52 +00:00
},
salesToday: {
__typename: "TaxedMoney",
gross: {
__typename: "Money",
amount: 57.15,
currency: "USD",
},
},
2019-06-19 14:40:52 +00:00
});