Skip to content

Commit

Permalink
feat: expose workflow in changelog [HOMER-1505] (#1592)
Browse files Browse the repository at this point in the history
* feat: expose workflow in the changelog
* feat: versioned linked for the workflow parent entity
  • Loading branch information
ronaldronson authored Dec 14, 2022
1 parent 3f3043a commit 4ab6719
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
14 changes: 2 additions & 12 deletions lib/entities/comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,20 @@ import {
GetSpaceEnvironmentParams,
Link,
MakeRequest,
PaginationQueryOptions,
SysLink,
VersionedLink,
} from '../common-types'
import { wrapCollection } from '../common-utils'
import enhanceWithMethods from '../enhance-with-methods'

export interface LinkWithRef<T extends string> {
sys: {
type: 'Link'
linkType: T
id: string
// Selected `ref` over explicit `version` for the future (e.g. `fields.de-DE.foo`)
ref?: `versions.${number}`
}
}

export type CommentSysProps = Pick<
BasicMetaSysProps,
'id' | 'version' | 'createdAt' | 'createdBy' | 'updatedAt' | 'updatedBy'
> & {
type: 'Comment'
space: SysLink
environment: SysLink
parentEntity: Link<'Entry'> | LinkWithRef<'Workflow'>
parentEntity: Link<'Entry'> | VersionedLink<'Workflow'>
}

export type CommentProps = {
Expand Down
3 changes: 2 additions & 1 deletion lib/entities/workflows-changelog-entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
MakeRequest,
PaginationQueryOptions,
SysLink,
VersionedLink,
} from '../common-types'
import { wrapCollection } from '../common-utils'
import enhanceWithMethods from '../enhance-with-methods'
Expand All @@ -22,7 +23,7 @@ export type WorkflowsChangelogEntryProps = {
event: string
eventBy: SysLink
eventAt: string
workflow: Link<'Workflow'>
workflow: VersionedLink<'Workflow'>
workflowDefinition: Link<'WorkflowDefinition'>
entity: Link<'Entry'>
stepId: string
Expand Down
1 change: 0 additions & 1 deletion lib/export-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export type {
DeleteCommentParams,
GetCommentParentEntityParams,
GetManyCommentsParams,
LinkWithRef,
} from './entities/comment'
export type {
ContentType,
Expand Down

0 comments on commit 4ab6719

Please sign in to comment.