Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
319 changes: 11 additions & 308 deletions shared/src/api/generated/views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const injectedRtkApi = api.injectEndpoints({
query: (queryArg) => ({
url: `/api/views/${queryArg.viewType}`,
method: 'POST',
body: queryArg.payload,
body: queryArg.genericViewPostModel,
params: {
project_name: queryArg.projectName,
},
Expand Down Expand Up @@ -74,7 +74,7 @@ const injectedRtkApi = api.injectEndpoints({
query: (queryArg) => ({
url: `/api/views/${queryArg.viewType}/${queryArg.viewId}`,
method: 'PATCH',
body: queryArg.payload,
body: queryArg.genericViewPatchModel,
params: {
project_name: queryArg.projectName,
},
Expand All @@ -93,43 +93,19 @@ export type CreateViewApiResponse = /** status 200 Successful Response */ Entity
export type CreateViewApiArg = {
viewType: string
projectName?: string
payload:
| OverviewViewPostModel
| TaskProgressViewPostModel
| ListsViewPostModel
| ReviewsViewPostModel
| VersionsViewPostModel
| GenericViewPostModel
genericViewPostModel: GenericViewPostModel
}
export type GetWorkingViewApiResponse = /** status 200 Successful Response */
| OverviewViewModel
| TaskProgressViewModel
| ListsViewModel
| ReviewsViewModel
| VersionsViewModel
| GenericViewModel
export type GetWorkingViewApiResponse = /** status 200 Successful Response */ GenericViewModel
export type GetWorkingViewApiArg = {
viewType: string
projectName?: string
}
export type GetBaseViewApiResponse = /** status 200 Successful Response */
| OverviewViewModel
| TaskProgressViewModel
| ListsViewModel
| ReviewsViewModel
| VersionsViewModel
| GenericViewModel
export type GetBaseViewApiResponse = /** status 200 Successful Response */ GenericViewModel
export type GetBaseViewApiArg = {
viewType: string
projectName?: string
}
export type GetDefaultViewApiResponse = /** status 200 Successful Response */
| OverviewViewModel
| TaskProgressViewModel
| ListsViewModel
| ReviewsViewModel
| VersionsViewModel
| GenericViewModel
export type GetDefaultViewApiResponse = /** status 200 Successful Response */ GenericViewModel
export type GetDefaultViewApiArg = {
viewType: string
projectName?: string
Expand All @@ -140,13 +116,7 @@ export type SetDefaultViewApiArg = {
projectName?: string
setDefaultViewRequestModel: SetDefaultViewRequestModel
}
export type GetViewApiResponse = /** status 200 Successful Response */
| OverviewViewModel
| TaskProgressViewModel
| ListsViewModel
| ReviewsViewModel
| VersionsViewModel
| GenericViewModel
export type GetViewApiResponse = /** status 200 Successful Response */ GenericViewModel
export type GetViewApiArg = {
viewType: string
viewId: string
Expand All @@ -163,13 +133,7 @@ export type UpdateViewApiArg = {
viewType: string
viewId: string
projectName?: string
payload:
| OverviewViewPatchModel
| TaskProgressViewPatchModel
| ListsViewPatchModel
| ReviewsViewPatchModel
| VersionsViewPatchModel
| GenericViewPatchModel
genericViewPatchModel: GenericViewPatchModel
}
export type ViewListItemModel = {
/** Unique identifier for the view within the given scope. */
Expand Down Expand Up @@ -202,246 +166,15 @@ export type EntityIdResponse = {
/** Entity ID */
id: string
}
export type QueryCondition = {
/** Path to the key separated by slashes */
key: string
/** Value to compare against */
value?: string | number | number | boolean | string[] | number[] | number[]
/** Comparison operator */
operator?:
| 'eq'
| 'like'
| 'lt'
| 'gt'
| 'lte'
| 'gte'
| 'ne'
| 'isnull'
| 'notnull'
| 'in'
| 'notin'
| 'includes'
| 'excludes'
| 'includesall'
| 'excludesall'
| 'includesany'
| 'excludesany'
}
export type QueryFilter = {
/** List of conditions to be evaluated */
conditions?: (QueryCondition | QueryFilter)[]
/** Operator to use when joining conditions */
operator?: 'and' | 'or'
}
export type ColumnItemModel = {
name: string
visible?: boolean
pinned?: boolean
width?: number
}
export type OverviewSettings = {
showHierarchy?: boolean
rowHeight?: number
groupBy?: string
groupSortByDesc?: boolean
showEmptyGroups?: boolean
sortBy?: string
sortDesc?: boolean
filter?: QueryFilter
folderFilter?: QueryFilter
sliceType?: string
columns?: ColumnItemModel[]
}
export type OverviewViewPostModel = {
/** Unique identifier for the view within the given scope. */
id?: string
/** Human-readable name of the view. */
label: string
/** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */
working?: boolean
settings: OverviewSettings
viewType?: 'overview'
}
export type TaskProgressSettings = {
filter?: QueryFilter
sliceType?: string
columns?: ColumnItemModel[]
}
export type TaskProgressViewPostModel = {
/** Unique identifier for the view within the given scope. */
id?: string
/** Human-readable name of the view. */
label: string
/** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */
working?: boolean
settings: TaskProgressSettings
viewType?: 'taskProgress'
}
export type ListsSettings = {
rowHeight?: number
sortBy?: string
sortDesc?: boolean
filter?: QueryFilter
columns?: ColumnItemModel[]
}
export type ListsViewPostModel = {
/** Unique identifier for the view within the given scope. */
id?: string
/** Human-readable name of the view. */
label: string
/** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */
working?: boolean
settings: ListsSettings
viewType?: 'lists'
}
export type ReviewsSettings = {
rowHeight?: number
sortBy?: string
sortDesc?: boolean
filter?: QueryFilter
columns?: ColumnItemModel[]
gridHeight?: number
displayStyle?: 'cards' | 'table' | 'playlist'
}
export type ReviewsViewPostModel = {
/** Unique identifier for the view within the given scope. */
id?: string
/** Human-readable name of the view. */
label: string
/** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */
working?: boolean
settings: ReviewsSettings
viewType?: 'reviews'
}
export type VersionsSettings = {
showProducts?: boolean
rowHeight?: number
showGrid?: boolean
gridHeight?: number
featuredVersionOrder?: string[]
slicerType?: string
groupBy?: string
groupSortByDesc?: boolean
showEmptyGroups?: boolean
sortBy?: string
sortDesc?: boolean
filter?: QueryFilter
columns?: ColumnItemModel[]
}
export type VersionsViewPostModel = {
/** Unique identifier for the view within the given scope. */
id?: string
/** Human-readable name of the view. */
label: string
/** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */
working?: boolean
settings: VersionsSettings
viewType?: 'versions'
}
export type GenericViewPostModel = {
/** Unique identifier for the view within the given scope. */
id?: string
/** Human-readable name of the view. */
label: string
/** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */
working?: boolean
viewType?: string
settings: object
viewType: string
}
export type OverviewViewModel = {
/** Unique identifier for the view within the given scope. */
id?: string
/** Human-readable name of the view. */
label: string
/** Determines whether the view is only available for the given project or for all projects (studio). */
scope: 'project' | 'studio'
/** Name of the user who created the view. Owners have full control over the view, */
owner: string
/** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */
visibility: 'public' | 'private'
/** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */
working: boolean
position: number
accessLevel: number
settings: OverviewSettings
access: object
viewType?: 'overview'
}
export type TaskProgressViewModel = {
/** Unique identifier for the view within the given scope. */
id?: string
/** Human-readable name of the view. */
label: string
/** Determines whether the view is only available for the given project or for all projects (studio). */
scope: 'project' | 'studio'
/** Name of the user who created the view. Owners have full control over the view, */
owner: string
/** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */
visibility: 'public' | 'private'
/** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */
working: boolean
position: number
accessLevel: number
settings: TaskProgressSettings
access: object
viewType?: 'taskProgress'
}
export type ListsViewModel = {
/** Unique identifier for the view within the given scope. */
id?: string
/** Human-readable name of the view. */
label: string
/** Determines whether the view is only available for the given project or for all projects (studio). */
scope: 'project' | 'studio'
/** Name of the user who created the view. Owners have full control over the view, */
owner: string
/** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */
visibility: 'public' | 'private'
/** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */
working: boolean
position: number
accessLevel: number
settings: ListsSettings
access: object
viewType?: 'lists'
}
export type ReviewsViewModel = {
/** Unique identifier for the view within the given scope. */
id?: string
/** Human-readable name of the view. */
label: string
/** Determines whether the view is only available for the given project or for all projects (studio). */
scope: 'project' | 'studio'
/** Name of the user who created the view. Owners have full control over the view, */
owner: string
/** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */
visibility: 'public' | 'private'
/** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */
working: boolean
position: number
accessLevel: number
settings: ReviewsSettings
access: object
viewType?: 'reviews'
}
export type VersionsViewModel = {
/** Unique identifier for the view within the given scope. */
id?: string
/** Human-readable name of the view. */
label: string
/** Determines whether the view is only available for the given project or for all projects (studio). */
scope: 'project' | 'studio'
/** Name of the user who created the view. Owners have full control over the view, */
owner: string
/** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */
visibility: 'public' | 'private'
/** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */
working: boolean
position: number
accessLevel: number
settings: VersionsSettings
access: object
viewType?: 'versions'
}
export type GenericViewModel = {
/** Unique identifier for the view within the given scope. */
Expand All @@ -458,46 +191,16 @@ export type GenericViewModel = {
working: boolean
position: number
accessLevel: number
viewType: string
settings: object
access: object
viewType: string
}
export type SetDefaultViewRequestModel = {
viewId: string
}
export type OverviewViewPatchModel = {
label?: string
owner?: string
settings?: OverviewSettings
viewType?: 'overview'
}
export type TaskProgressViewPatchModel = {
label?: string
owner?: string
settings?: TaskProgressSettings
viewType?: 'taskProgress'
}
export type ListsViewPatchModel = {
label?: string
owner?: string
settings?: ListsSettings
viewType?: 'lists'
}
export type ReviewsViewPatchModel = {
label?: string
owner?: string
settings?: ReviewsSettings
viewType?: 'reviews'
}
export type VersionsViewPatchModel = {
label?: string
owner?: string
settings?: VersionsSettings
viewType?: 'versions'
}
export type GenericViewPatchModel = {
label?: string
owner?: string
viewType?: string
settings?: object
viewType: string
}
Loading