-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from amplication/amplication-amplication-blog
chore(Amplication): Update Generated Code
- Loading branch information
Showing
46 changed files
with
2,205 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { StoryCreateInput } from "./StoryCreateInput"; | ||
|
||
export type CreateStoryArgs = { | ||
data: StoryCreateInput; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { StoryWhereUniqueInput } from "./StoryWhereUniqueInput"; | ||
|
||
export type DeleteStoryArgs = { | ||
where: StoryWhereUniqueInput; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export type Story = { | ||
content: string; | ||
createdAt: Date; | ||
draft: boolean | null; | ||
featuredImage: string; | ||
id: string; | ||
metaDescription: string | null; | ||
metaTitle: string | null; | ||
publishedAt: Date | null; | ||
slug: string | null; | ||
tag: string; | ||
title: string; | ||
updatedAt: Date; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { StoryWhereInput } from "./StoryWhereInput"; | ||
|
||
export type StoryCountArgs = { | ||
where?: StoryWhereInput; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export type StoryCreateInput = { | ||
content: string; | ||
draft?: boolean | null; | ||
featuredImage: string; | ||
metaDescription?: string | null; | ||
metaTitle?: string | null; | ||
publishedAt?: Date | null; | ||
slug?: string | null; | ||
tag: string; | ||
title: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { StoryWhereInput } from "./StoryWhereInput"; | ||
import { StoryOrderByInput } from "./StoryOrderByInput"; | ||
|
||
export type StoryFindManyArgs = { | ||
where?: StoryWhereInput; | ||
orderBy?: Array<StoryOrderByInput>; | ||
skip?: number; | ||
take?: number; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { StoryWhereUniqueInput } from "./StoryWhereUniqueInput"; | ||
|
||
export type StoryFindUniqueArgs = { | ||
where: StoryWhereUniqueInput; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { StoryWhereInput } from "./StoryWhereInput"; | ||
|
||
export type StoryListRelationFilter = { | ||
every?: StoryWhereInput; | ||
some?: StoryWhereInput; | ||
none?: StoryWhereInput; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { SortOrder } from "../../util/SortOrder"; | ||
|
||
export type StoryOrderByInput = { | ||
content?: SortOrder; | ||
createdAt?: SortOrder; | ||
draft?: SortOrder; | ||
featuredImage?: SortOrder; | ||
id?: SortOrder; | ||
metaDescription?: SortOrder; | ||
metaTitle?: SortOrder; | ||
publishedAt?: SortOrder; | ||
slug?: SortOrder; | ||
tag?: SortOrder; | ||
title?: SortOrder; | ||
updatedAt?: SortOrder; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export type StoryUpdateInput = { | ||
content?: string; | ||
draft?: boolean | null; | ||
featuredImage?: string; | ||
metaDescription?: string | null; | ||
metaTitle?: string | null; | ||
publishedAt?: Date | null; | ||
slug?: string | null; | ||
tag?: string; | ||
title?: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { StringFilter } from "../../util/StringFilter"; | ||
import { DateTimeFilter } from "../../util/DateTimeFilter"; | ||
import { BooleanNullableFilter } from "../../util/BooleanNullableFilter"; | ||
import { StringNullableFilter } from "../../util/StringNullableFilter"; | ||
import { DateTimeNullableFilter } from "../../util/DateTimeNullableFilter"; | ||
|
||
export type StoryWhereInput = { | ||
content?: StringFilter; | ||
createdAt?: DateTimeFilter; | ||
draft?: BooleanNullableFilter; | ||
featuredImage?: StringFilter; | ||
id?: StringFilter; | ||
metaDescription?: StringNullableFilter; | ||
metaTitle?: StringNullableFilter; | ||
publishedAt?: DateTimeNullableFilter; | ||
slug?: StringNullableFilter; | ||
tag?: StringFilter; | ||
title?: StringFilter; | ||
updatedAt?: DateTimeFilter; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export type StoryWhereUniqueInput = { | ||
id: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { StoryWhereUniqueInput } from "./StoryWhereUniqueInput"; | ||
import { StoryUpdateInput } from "./StoryUpdateInput"; | ||
|
||
export type UpdateStoryArgs = { | ||
where: StoryWhereUniqueInput; | ||
data: StoryUpdateInput; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import * as React from "react"; | ||
import { | ||
Create, | ||
SimpleForm, | ||
CreateProps, | ||
TextInput, | ||
BooleanInput, | ||
DateTimeInput, | ||
} from "react-admin"; | ||
|
||
export const StoryCreate = (props: CreateProps): React.ReactElement => { | ||
return ( | ||
<Create {...props}> | ||
<SimpleForm> | ||
<TextInput label="Content" source="content" /> | ||
<BooleanInput label="Draft" source="draft" /> | ||
<TextInput label="Featured Image" source="featuredImage" /> | ||
<TextInput label="Meta Description" source="metaDescription" /> | ||
<TextInput label="Meta Title" source="metaTitle" /> | ||
<DateTimeInput label="Published At" source="publishedAt" /> | ||
<TextInput label="Slug" source="slug" /> | ||
<TextInput label="Tag" source="tag" /> | ||
<TextInput label="Title" source="title" /> | ||
</SimpleForm> | ||
</Create> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import * as React from "react"; | ||
import { | ||
Edit, | ||
SimpleForm, | ||
EditProps, | ||
TextInput, | ||
BooleanInput, | ||
DateTimeInput, | ||
} from "react-admin"; | ||
|
||
export const StoryEdit = (props: EditProps): React.ReactElement => { | ||
return ( | ||
<Edit {...props}> | ||
<SimpleForm> | ||
<TextInput label="Content" source="content" /> | ||
<BooleanInput label="Draft" source="draft" /> | ||
<TextInput label="Featured Image" source="featuredImage" /> | ||
<TextInput label="Meta Description" source="metaDescription" /> | ||
<TextInput label="Meta Title" source="metaTitle" /> | ||
<DateTimeInput label="Published At" source="publishedAt" /> | ||
<TextInput label="Slug" source="slug" /> | ||
<TextInput label="Tag" source="tag" /> | ||
<TextInput label="Title" source="title" /> | ||
</SimpleForm> | ||
</Edit> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import * as React from "react"; | ||
import { | ||
List, | ||
Datagrid, | ||
ListProps, | ||
TextField, | ||
DateField, | ||
BooleanField, | ||
} from "react-admin"; | ||
import Pagination from "../Components/Pagination"; | ||
|
||
export const StoryList = (props: ListProps): React.ReactElement => { | ||
return ( | ||
<List | ||
{...props} | ||
bulkActionButtons={false} | ||
title={"Stories"} | ||
perPage={50} | ||
pagination={<Pagination />} | ||
> | ||
<Datagrid rowClick="show"> | ||
<TextField label="Content" source="content" /> | ||
<DateField source="createdAt" label="Created At" /> | ||
<BooleanField label="Draft" source="draft" /> | ||
<TextField label="Featured Image" source="featuredImage" /> | ||
<TextField label="ID" source="id" /> | ||
<TextField label="Meta Description" source="metaDescription" /> | ||
<TextField label="Meta Title" source="metaTitle" /> | ||
<TextField label="Published At" source="publishedAt" /> | ||
<TextField label="Slug" source="slug" /> | ||
<TextField label="Tag" source="tag" /> | ||
<TextField label="Title" source="title" /> | ||
<DateField source="updatedAt" label="Updated At" /> | ||
</Datagrid> | ||
</List> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import * as React from "react"; | ||
import { | ||
Show, | ||
SimpleShowLayout, | ||
ShowProps, | ||
TextField, | ||
DateField, | ||
BooleanField, | ||
} from "react-admin"; | ||
|
||
export const StoryShow = (props: ShowProps): React.ReactElement => { | ||
return ( | ||
<Show {...props}> | ||
<SimpleShowLayout> | ||
<TextField label="Content" source="content" /> | ||
<DateField source="createdAt" label="Created At" /> | ||
<BooleanField label="Draft" source="draft" /> | ||
<TextField label="Featured Image" source="featuredImage" /> | ||
<TextField label="ID" source="id" /> | ||
<TextField label="Meta Description" source="metaDescription" /> | ||
<TextField label="Meta Title" source="metaTitle" /> | ||
<TextField label="Published At" source="publishedAt" /> | ||
<TextField label="Slug" source="slug" /> | ||
<TextField label="Tag" source="tag" /> | ||
<TextField label="Title" source="title" /> | ||
<DateField source="updatedAt" label="Updated At" /> | ||
</SimpleShowLayout> | ||
</Show> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Story as TStory } from "../api/story/Story"; | ||
|
||
export const STORY_TITLE_FIELD = "metaTitle"; | ||
|
||
export const StoryTitle = (record: TStory): string => { | ||
return record.metaTitle?.toString() || String(record.id); | ||
}; |
Oops, something went wrong.